// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/gordon/internal/boundaries/out" mock "github.com/stretchr/testify/mock" ) // NewMockSecretService creates a new instance of MockSecretService. 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 NewMockSecretService(t interface { mock.TestingT Cleanup(func()) }) *MockSecretService { mock := &MockSecretService{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockSecretService is an autogenerated mock type for the SecretService type type MockSecretService struct { mock.Mock } type MockSecretService_Expecter struct { mock *mock.Mock } func (_m *MockSecretService) EXPECT() *MockSecretService_Expecter { return &MockSecretService_Expecter{mock: &_m.Mock} } // Delete provides a mock function for the type MockSecretService func (_mock *MockSecretService) Delete(ctx context.Context, domain string, key string) error { ret := _mock.Called(ctx, domain, key) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, domain, key) } else { r0 = ret.Error(0) } return r0 } // MockSecretService_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type MockSecretService_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - domain string // - key string func (_e *MockSecretService_Expecter) Delete(ctx interface{}, domain interface{}, key interface{}) *MockSecretService_Delete_Call { return &MockSecretService_Delete_Call{Call: _e.mock.On("Delete", ctx, domain, key)} } func (_c *MockSecretService_Delete_Call) Run(run func(ctx context.Context, domain string, key string)) *MockSecretService_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockSecretService_Delete_Call) Return(err error) *MockSecretService_Delete_Call { _c.Call.Return(err) return _c } func (_c *MockSecretService_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string, key string) error) *MockSecretService_Delete_Call { _c.Call.Return(run) return _c } // GetAll provides a mock function for the type MockSecretService func (_mock *MockSecretService) GetAll(ctx context.Context, domain string) (map[string]string, error) { ret := _mock.Called(ctx, domain) if len(ret) == 0 { panic("no return value specified for GetAll") } var r0 map[string]string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (map[string]string, error)); ok { return returnFunc(ctx, domain) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) map[string]string); ok { r0 = returnFunc(ctx, domain) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, domain) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretService_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' type MockSecretService_GetAll_Call struct { *mock.Call } // GetAll is a helper method to define mock.On call // - ctx context.Context // - domain string func (_e *MockSecretService_Expecter) GetAll(ctx interface{}, domain interface{}) *MockSecretService_GetAll_Call { return &MockSecretService_GetAll_Call{Call: _e.mock.On("GetAll", ctx, domain)} } func (_c *MockSecretService_GetAll_Call) Run(run func(ctx context.Context, domain string)) *MockSecretService_GetAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockSecretService_GetAll_Call) Return(stringToString map[string]string, err error) *MockSecretService_GetAll_Call { _c.Call.Return(stringToString, err) return _c } func (_c *MockSecretService_GetAll_Call) RunAndReturn(run func(ctx context.Context, domain string) (map[string]string, error)) *MockSecretService_GetAll_Call { _c.Call.Return(run) return _c } // ListKeys provides a mock function for the type MockSecretService func (_mock *MockSecretService) ListKeys(ctx context.Context, domain string) ([]string, error) { ret := _mock.Called(ctx, domain) if len(ret) == 0 { panic("no return value specified for ListKeys") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { return returnFunc(ctx, domain) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { r0 = returnFunc(ctx, domain) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, domain) } else { r1 = ret.Error(1) } return r0, r1 } // MockSecretService_ListKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListKeys' type MockSecretService_ListKeys_Call struct { *mock.Call } // ListKeys is a helper method to define mock.On call // - ctx context.Context // - domain string func (_e *MockSecretService_Expecter) ListKeys(ctx interface{}, domain interface{}) *MockSecretService_ListKeys_Call { return &MockSecretService_ListKeys_Call{Call: _e.mock.On("ListKeys", ctx, domain)} } func (_c *MockSecretService_ListKeys_Call) Run(run func(ctx context.Context, domain string)) *MockSecretService_ListKeys_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockSecretService_ListKeys_Call) Return(strings []string, err error) *MockSecretService_ListKeys_Call { _c.Call.Return(strings, err) return _c } func (_c *MockSecretService_ListKeys_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]string, error)) *MockSecretService_ListKeys_Call { _c.Call.Return(run) return _c } // ListKeysWithAttachments provides a mock function for the type MockSecretService func (_mock *MockSecretService) ListKeysWithAttachments(ctx context.Context, domain string) ([]string, []out.AttachmentSecrets, error) { ret := _mock.Called(ctx, domain) if len(ret) == 0 { panic("no return value specified for ListKeysWithAttachments") } var r0 []string var r1 []out.AttachmentSecrets var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, []out.AttachmentSecrets, error)); ok { return returnFunc(ctx, domain) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok { r0 = returnFunc(ctx, domain) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) []out.AttachmentSecrets); ok { r1 = returnFunc(ctx, domain) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]out.AttachmentSecrets) } } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, domain) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockSecretService_ListKeysWithAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListKeysWithAttachments' type MockSecretService_ListKeysWithAttachments_Call struct { *mock.Call } // ListKeysWithAttachments is a helper method to define mock.On call // - ctx context.Context // - domain string func (_e *MockSecretService_Expecter) ListKeysWithAttachments(ctx interface{}, domain interface{}) *MockSecretService_ListKeysWithAttachments_Call { return &MockSecretService_ListKeysWithAttachments_Call{Call: _e.mock.On("ListKeysWithAttachments", ctx, domain)} } func (_c *MockSecretService_ListKeysWithAttachments_Call) Run(run func(ctx context.Context, domain string)) *MockSecretService_ListKeysWithAttachments_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockSecretService_ListKeysWithAttachments_Call) Return(strings []string, attachmentSecretss []out.AttachmentSecrets, err error) *MockSecretService_ListKeysWithAttachments_Call { _c.Call.Return(strings, attachmentSecretss, err) return _c } func (_c *MockSecretService_ListKeysWithAttachments_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]string, []out.AttachmentSecrets, error)) *MockSecretService_ListKeysWithAttachments_Call { _c.Call.Return(run) return _c } // Set provides a mock function for the type MockSecretService func (_mock *MockSecretService) Set(ctx context.Context, domain string, secrets map[string]string) error { ret := _mock.Called(ctx, domain, secrets) if len(ret) == 0 { panic("no return value specified for Set") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, map[string]string) error); ok { r0 = returnFunc(ctx, domain, secrets) } else { r0 = ret.Error(0) } return r0 } // MockSecretService_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' type MockSecretService_Set_Call struct { *mock.Call } // Set is a helper method to define mock.On call // - ctx context.Context // - domain string // - secrets map[string]string func (_e *MockSecretService_Expecter) Set(ctx interface{}, domain interface{}, secrets interface{}) *MockSecretService_Set_Call { return &MockSecretService_Set_Call{Call: _e.mock.On("Set", ctx, domain, secrets)} } func (_c *MockSecretService_Set_Call) Run(run func(ctx context.Context, domain string, secrets map[string]string)) *MockSecretService_Set_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 map[string]string if args[2] != nil { arg2 = args[2].(map[string]string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockSecretService_Set_Call) Return(err error) *MockSecretService_Set_Call { _c.Call.Return(err) return _c } func (_c *MockSecretService_Set_Call) RunAndReturn(run func(ctx context.Context, domain string, secrets map[string]string) error) *MockSecretService_Set_Call { _c.Call.Return(run) return _c }