// Code generated by mockery v2.53.0. DO NOT EDIT. package model import ( model "codeberg.org/crowci/crow/v3/server/model" mock "github.com/stretchr/testify/mock" ) // MockSecretStore is an autogenerated mock type for the SecretStore type type MockSecretStore struct { mock.Mock } type MockSecretStore_Expecter struct { mock *mock.Mock } func (_m *MockSecretStore) EXPECT() *MockSecretStore_Expecter { return &MockSecretStore_Expecter{mock: &_m.Mock} } // GlobalSecretFind provides a mock function with given fields: _a0 func (_m *MockSecretStore) GlobalSecretFind(_a0 string) (*model.Secret, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GlobalSecretFind") } var r0 *model.Secret var r1 error if rf, ok := ret.Get(0).(func(string) (*model.Secret, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(string) *model.Secret); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.Secret) } } if rf, ok := ret.Get(1).(func(string) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_GlobalSecretFind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GlobalSecretFind' type MockSecretStore_GlobalSecretFind_Call struct { *mock.Call } // GlobalSecretFind is a helper method to define mock.On call // - _a0 string func (_e *MockSecretStore_Expecter) GlobalSecretFind(_a0 interface{}) *MockSecretStore_GlobalSecretFind_Call { return &MockSecretStore_GlobalSecretFind_Call{Call: _e.mock.On("GlobalSecretFind", _a0)} } func (_c *MockSecretStore_GlobalSecretFind_Call) Run(run func(_a0 string)) *MockSecretStore_GlobalSecretFind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } func (_c *MockSecretStore_GlobalSecretFind_Call) Return(_a0 *model.Secret, _a1 error) *MockSecretStore_GlobalSecretFind_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_GlobalSecretFind_Call) RunAndReturn(run func(string) (*model.Secret, error)) *MockSecretStore_GlobalSecretFind_Call { _c.Call.Return(run) return _c } // GlobalSecretList provides a mock function with given fields: _a0 func (_m *MockSecretStore) GlobalSecretList(_a0 *model.ListOptions) ([]*model.Secret, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GlobalSecretList") } var r0 []*model.Secret var r1 error if rf, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Secret, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(*model.ListOptions) []*model.Secret); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Secret) } } if rf, ok := ret.Get(1).(func(*model.ListOptions) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_GlobalSecretList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GlobalSecretList' type MockSecretStore_GlobalSecretList_Call struct { *mock.Call } // GlobalSecretList is a helper method to define mock.On call // - _a0 *model.ListOptions func (_e *MockSecretStore_Expecter) GlobalSecretList(_a0 interface{}) *MockSecretStore_GlobalSecretList_Call { return &MockSecretStore_GlobalSecretList_Call{Call: _e.mock.On("GlobalSecretList", _a0)} } func (_c *MockSecretStore_GlobalSecretList_Call) Run(run func(_a0 *model.ListOptions)) *MockSecretStore_GlobalSecretList_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*model.ListOptions)) }) return _c } func (_c *MockSecretStore_GlobalSecretList_Call) Return(_a0 []*model.Secret, _a1 error) *MockSecretStore_GlobalSecretList_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_GlobalSecretList_Call) RunAndReturn(run func(*model.ListOptions) ([]*model.Secret, error)) *MockSecretStore_GlobalSecretList_Call { _c.Call.Return(run) return _c } // OrgSecretFind provides a mock function with given fields: _a0, _a1 func (_m *MockSecretStore) OrgSecretFind(_a0 int64, _a1 string) (*model.Secret, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { panic("no return value specified for OrgSecretFind") } var r0 *model.Secret var r1 error if rf, ok := ret.Get(0).(func(int64, string) (*model.Secret, error)); ok { return rf(_a0, _a1) } if rf, ok := ret.Get(0).(func(int64, string) *model.Secret); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.Secret) } } if rf, ok := ret.Get(1).(func(int64, string) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_OrgSecretFind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OrgSecretFind' type MockSecretStore_OrgSecretFind_Call struct { *mock.Call } // OrgSecretFind is a helper method to define mock.On call // - _a0 int64 // - _a1 string func (_e *MockSecretStore_Expecter) OrgSecretFind(_a0 interface{}, _a1 interface{}) *MockSecretStore_OrgSecretFind_Call { return &MockSecretStore_OrgSecretFind_Call{Call: _e.mock.On("OrgSecretFind", _a0, _a1)} } func (_c *MockSecretStore_OrgSecretFind_Call) Run(run func(_a0 int64, _a1 string)) *MockSecretStore_OrgSecretFind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(int64), args[1].(string)) }) return _c } func (_c *MockSecretStore_OrgSecretFind_Call) Return(_a0 *model.Secret, _a1 error) *MockSecretStore_OrgSecretFind_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_OrgSecretFind_Call) RunAndReturn(run func(int64, string) (*model.Secret, error)) *MockSecretStore_OrgSecretFind_Call { _c.Call.Return(run) return _c } // OrgSecretList provides a mock function with given fields: _a0, _a1 func (_m *MockSecretStore) OrgSecretList(_a0 int64, _a1 *model.ListOptions) ([]*model.Secret, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { panic("no return value specified for OrgSecretList") } var r0 []*model.Secret var r1 error if rf, ok := ret.Get(0).(func(int64, *model.ListOptions) ([]*model.Secret, error)); ok { return rf(_a0, _a1) } if rf, ok := ret.Get(0).(func(int64, *model.ListOptions) []*model.Secret); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Secret) } } if rf, ok := ret.Get(1).(func(int64, *model.ListOptions) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_OrgSecretList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OrgSecretList' type MockSecretStore_OrgSecretList_Call struct { *mock.Call } // OrgSecretList is a helper method to define mock.On call // - _a0 int64 // - _a1 *model.ListOptions func (_e *MockSecretStore_Expecter) OrgSecretList(_a0 interface{}, _a1 interface{}) *MockSecretStore_OrgSecretList_Call { return &MockSecretStore_OrgSecretList_Call{Call: _e.mock.On("OrgSecretList", _a0, _a1)} } func (_c *MockSecretStore_OrgSecretList_Call) Run(run func(_a0 int64, _a1 *model.ListOptions)) *MockSecretStore_OrgSecretList_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(int64), args[1].(*model.ListOptions)) }) return _c } func (_c *MockSecretStore_OrgSecretList_Call) Return(_a0 []*model.Secret, _a1 error) *MockSecretStore_OrgSecretList_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_OrgSecretList_Call) RunAndReturn(run func(int64, *model.ListOptions) ([]*model.Secret, error)) *MockSecretStore_OrgSecretList_Call { _c.Call.Return(run) return _c } // SecretCreate provides a mock function with given fields: _a0 func (_m *MockSecretStore) SecretCreate(_a0 *model.Secret) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for SecretCreate") } var r0 error if rf, ok := ret.Get(0).(func(*model.Secret) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // MockSecretStore_SecretCreate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretCreate' type MockSecretStore_SecretCreate_Call struct { *mock.Call } // SecretCreate is a helper method to define mock.On call // - _a0 *model.Secret func (_e *MockSecretStore_Expecter) SecretCreate(_a0 interface{}) *MockSecretStore_SecretCreate_Call { return &MockSecretStore_SecretCreate_Call{Call: _e.mock.On("SecretCreate", _a0)} } func (_c *MockSecretStore_SecretCreate_Call) Run(run func(_a0 *model.Secret)) *MockSecretStore_SecretCreate_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*model.Secret)) }) return _c } func (_c *MockSecretStore_SecretCreate_Call) Return(_a0 error) *MockSecretStore_SecretCreate_Call { _c.Call.Return(_a0) return _c } func (_c *MockSecretStore_SecretCreate_Call) RunAndReturn(run func(*model.Secret) error) *MockSecretStore_SecretCreate_Call { _c.Call.Return(run) return _c } // SecretDelete provides a mock function with given fields: _a0 func (_m *MockSecretStore) SecretDelete(_a0 *model.Secret) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for SecretDelete") } var r0 error if rf, ok := ret.Get(0).(func(*model.Secret) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // MockSecretStore_SecretDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretDelete' type MockSecretStore_SecretDelete_Call struct { *mock.Call } // SecretDelete is a helper method to define mock.On call // - _a0 *model.Secret func (_e *MockSecretStore_Expecter) SecretDelete(_a0 interface{}) *MockSecretStore_SecretDelete_Call { return &MockSecretStore_SecretDelete_Call{Call: _e.mock.On("SecretDelete", _a0)} } func (_c *MockSecretStore_SecretDelete_Call) Run(run func(_a0 *model.Secret)) *MockSecretStore_SecretDelete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*model.Secret)) }) return _c } func (_c *MockSecretStore_SecretDelete_Call) Return(_a0 error) *MockSecretStore_SecretDelete_Call { _c.Call.Return(_a0) return _c } func (_c *MockSecretStore_SecretDelete_Call) RunAndReturn(run func(*model.Secret) error) *MockSecretStore_SecretDelete_Call { _c.Call.Return(run) return _c } // SecretFind provides a mock function with given fields: _a0, _a1 func (_m *MockSecretStore) SecretFind(_a0 *model.Repo, _a1 string) (*model.Secret, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { panic("no return value specified for SecretFind") } var r0 *model.Secret var r1 error if rf, ok := ret.Get(0).(func(*model.Repo, string) (*model.Secret, error)); ok { return rf(_a0, _a1) } if rf, ok := ret.Get(0).(func(*model.Repo, string) *model.Secret); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.Secret) } } if rf, ok := ret.Get(1).(func(*model.Repo, string) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_SecretFind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretFind' type MockSecretStore_SecretFind_Call struct { *mock.Call } // SecretFind is a helper method to define mock.On call // - _a0 *model.Repo // - _a1 string func (_e *MockSecretStore_Expecter) SecretFind(_a0 interface{}, _a1 interface{}) *MockSecretStore_SecretFind_Call { return &MockSecretStore_SecretFind_Call{Call: _e.mock.On("SecretFind", _a0, _a1)} } func (_c *MockSecretStore_SecretFind_Call) Run(run func(_a0 *model.Repo, _a1 string)) *MockSecretStore_SecretFind_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*model.Repo), args[1].(string)) }) return _c } func (_c *MockSecretStore_SecretFind_Call) Return(_a0 *model.Secret, _a1 error) *MockSecretStore_SecretFind_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_SecretFind_Call) RunAndReturn(run func(*model.Repo, string) (*model.Secret, error)) *MockSecretStore_SecretFind_Call { _c.Call.Return(run) return _c } // SecretList provides a mock function with given fields: _a0, _a1, _a2 func (_m *MockSecretStore) SecretList(_a0 *model.Repo, _a1 bool, _a2 *model.ListOptions) ([]*model.Secret, error) { ret := _m.Called(_a0, _a1, _a2) if len(ret) == 0 { panic("no return value specified for SecretList") } var r0 []*model.Secret var r1 error if rf, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptions) ([]*model.Secret, error)); ok { return rf(_a0, _a1, _a2) } if rf, ok := ret.Get(0).(func(*model.Repo, bool, *model.ListOptions) []*model.Secret); ok { r0 = rf(_a0, _a1, _a2) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Secret) } } if rf, ok := ret.Get(1).(func(*model.Repo, bool, *model.ListOptions) error); ok { r1 = rf(_a0, _a1, _a2) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_SecretList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretList' type MockSecretStore_SecretList_Call struct { *mock.Call } // SecretList is a helper method to define mock.On call // - _a0 *model.Repo // - _a1 bool // - _a2 *model.ListOptions func (_e *MockSecretStore_Expecter) SecretList(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockSecretStore_SecretList_Call { return &MockSecretStore_SecretList_Call{Call: _e.mock.On("SecretList", _a0, _a1, _a2)} } func (_c *MockSecretStore_SecretList_Call) Run(run func(_a0 *model.Repo, _a1 bool, _a2 *model.ListOptions)) *MockSecretStore_SecretList_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*model.Repo), args[1].(bool), args[2].(*model.ListOptions)) }) return _c } func (_c *MockSecretStore_SecretList_Call) Return(_a0 []*model.Secret, _a1 error) *MockSecretStore_SecretList_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_SecretList_Call) RunAndReturn(run func(*model.Repo, bool, *model.ListOptions) ([]*model.Secret, error)) *MockSecretStore_SecretList_Call { _c.Call.Return(run) return _c } // SecretListAll provides a mock function with no fields func (_m *MockSecretStore) SecretListAll() ([]*model.Secret, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for SecretListAll") } var r0 []*model.Secret var r1 error if rf, ok := ret.Get(0).(func() ([]*model.Secret, error)); ok { return rf() } if rf, ok := ret.Get(0).(func() []*model.Secret); ok { r0 = rf() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.Secret) } } if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretStore_SecretListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretListAll' type MockSecretStore_SecretListAll_Call struct { *mock.Call } // SecretListAll is a helper method to define mock.On call func (_e *MockSecretStore_Expecter) SecretListAll() *MockSecretStore_SecretListAll_Call { return &MockSecretStore_SecretListAll_Call{Call: _e.mock.On("SecretListAll")} } func (_c *MockSecretStore_SecretListAll_Call) Run(run func()) *MockSecretStore_SecretListAll_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockSecretStore_SecretListAll_Call) Return(_a0 []*model.Secret, _a1 error) *MockSecretStore_SecretListAll_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockSecretStore_SecretListAll_Call) RunAndReturn(run func() ([]*model.Secret, error)) *MockSecretStore_SecretListAll_Call { _c.Call.Return(run) return _c } // SecretUpdate provides a mock function with given fields: _a0 func (_m *MockSecretStore) SecretUpdate(_a0 *model.Secret) error { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for SecretUpdate") } var r0 error if rf, ok := ret.Get(0).(func(*model.Secret) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) } return r0 } // MockSecretStore_SecretUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretUpdate' type MockSecretStore_SecretUpdate_Call struct { *mock.Call } // SecretUpdate is a helper method to define mock.On call // - _a0 *model.Secret func (_e *MockSecretStore_Expecter) SecretUpdate(_a0 interface{}) *MockSecretStore_SecretUpdate_Call { return &MockSecretStore_SecretUpdate_Call{Call: _e.mock.On("SecretUpdate", _a0)} } func (_c *MockSecretStore_SecretUpdate_Call) Run(run func(_a0 *model.Secret)) *MockSecretStore_SecretUpdate_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(*model.Secret)) }) return _c } func (_c *MockSecretStore_SecretUpdate_Call) Return(_a0 error) *MockSecretStore_SecretUpdate_Call { _c.Call.Return(_a0) return _c } func (_c *MockSecretStore_SecretUpdate_Call) RunAndReturn(run func(*model.Secret) error) *MockSecretStore_SecretUpdate_Call { _c.Call.Return(run) return _c } // NewMockSecretStore creates a new instance of MockSecretStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockSecretStore(t interface { mock.TestingT Cleanup(func()) }) *MockSecretStore { mock := &MockSecretStore{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }