// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "time" "bnema.dev/ermite/internal/domain" "bnema.dev/ermite/internal/ports" mock "github.com/stretchr/testify/mock" ) // NewCISettingsStore creates a new instance of CISettingsStore. 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 NewCISettingsStore(t interface { mock.TestingT Cleanup(func()) }) *CISettingsStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &CISettingsStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // CISettingsStore is an autogenerated mock type for the CISettingsStore type type CISettingsStore struct { mock.Mock } type CISettingsStore_Expecter struct { mock *mock.Mock } func (_m *CISettingsStore) EXPECT() *CISettingsStore_Expecter { return &CISettingsStore_Expecter{mock: &_m.Mock} } // BindSecretsKey provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) BindSecretsKey(ctx context.Context, check []byte) error { ret := _mock.Called(ctx, check) if len(ret) == 0 { panic("no return value specified for BindSecretsKey") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) error); ok { r0 = returnFunc(ctx, check) } else { r0 = ret.Error(0) } return r0 } // CISettingsStore_BindSecretsKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BindSecretsKey' type CISettingsStore_BindSecretsKey_Call struct { *mock.Call } // BindSecretsKey is a helper method to define mock.On call // - ctx context.Context // - check []byte func (_e *CISettingsStore_Expecter) BindSecretsKey(ctx any, check any) *CISettingsStore_BindSecretsKey_Call { return &CISettingsStore_BindSecretsKey_Call{Call: _e.mock.On("BindSecretsKey", ctx, check)} } func (_c *CISettingsStore_BindSecretsKey_Call) Run(run func(ctx context.Context, check []byte)) *CISettingsStore_BindSecretsKey_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []byte if args[1] != nil { arg1 = args[1].([]byte) } run( arg0, arg1, ) }) return _c } func (_c *CISettingsStore_BindSecretsKey_Call) Return(err error) *CISettingsStore_BindSecretsKey_Call { _c.Call.Return(err) return _c } func (_c *CISettingsStore_BindSecretsKey_Call) RunAndReturn(run func(ctx context.Context, check []byte) error) *CISettingsStore_BindSecretsKey_Call { _c.Call.Return(run) return _c } // CreateEnvironment provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) CreateEnvironment(ctx context.Context, repo domain.RepoName, name string, at time.Time) (domain.Environment, error) { ret := _mock.Called(ctx, repo, name, at) if len(ret) == 0 { panic("no return value specified for CreateEnvironment") } var r0 domain.Environment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, time.Time) (domain.Environment, error)); ok { return returnFunc(ctx, repo, name, at) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, time.Time) domain.Environment); ok { r0 = returnFunc(ctx, repo, name, at) } else { r0 = ret.Get(0).(domain.Environment) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string, time.Time) error); ok { r1 = returnFunc(ctx, repo, name, at) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_CreateEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEnvironment' type CISettingsStore_CreateEnvironment_Call struct { *mock.Call } // CreateEnvironment is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - name string // - at time.Time func (_e *CISettingsStore_Expecter) CreateEnvironment(ctx any, repo any, name any, at any) *CISettingsStore_CreateEnvironment_Call { return &CISettingsStore_CreateEnvironment_Call{Call: _e.mock.On("CreateEnvironment", ctx, repo, name, at)} } func (_c *CISettingsStore_CreateEnvironment_Call) Run(run func(ctx context.Context, repo domain.RepoName, name string, at time.Time)) *CISettingsStore_CreateEnvironment_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 time.Time if args[3] != nil { arg3 = args[3].(time.Time) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *CISettingsStore_CreateEnvironment_Call) Return(environment domain.Environment, err error) *CISettingsStore_CreateEnvironment_Call { _c.Call.Return(environment, err) return _c } func (_c *CISettingsStore_CreateEnvironment_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, name string, at time.Time) (domain.Environment, error)) *CISettingsStore_CreateEnvironment_Call { _c.Call.Return(run) return _c } // DeleteEnvironment provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) DeleteEnvironment(ctx context.Context, repo domain.RepoName, name string) error { ret := _mock.Called(ctx, repo, name) if len(ret) == 0 { panic("no return value specified for DeleteEnvironment") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) error); ok { r0 = returnFunc(ctx, repo, name) } else { r0 = ret.Error(0) } return r0 } // CISettingsStore_DeleteEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEnvironment' type CISettingsStore_DeleteEnvironment_Call struct { *mock.Call } // DeleteEnvironment is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName // - name string func (_e *CISettingsStore_Expecter) DeleteEnvironment(ctx any, repo any, name any) *CISettingsStore_DeleteEnvironment_Call { return &CISettingsStore_DeleteEnvironment_Call{Call: _e.mock.On("DeleteEnvironment", ctx, repo, name)} } func (_c *CISettingsStore_DeleteEnvironment_Call) Run(run func(ctx context.Context, repo domain.RepoName, name string)) *CISettingsStore_DeleteEnvironment_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CISettingsStore_DeleteEnvironment_Call) Return(err error) *CISettingsStore_DeleteEnvironment_Call { _c.Call.Return(err) return _c } func (_c *CISettingsStore_DeleteEnvironment_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, name string) error) *CISettingsStore_DeleteEnvironment_Call { _c.Call.Return(run) return _c } // DeleteSecret provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) DeleteSecret(ctx context.Context, scope domain.SettingsScope, name string) error { ret := _mock.Called(ctx, scope, name) if len(ret) == 0 { panic("no return value specified for DeleteSecret") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string) error); ok { r0 = returnFunc(ctx, scope, name) } else { r0 = ret.Error(0) } return r0 } // CISettingsStore_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret' type CISettingsStore_DeleteSecret_Call struct { *mock.Call } // DeleteSecret is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope // - name string func (_e *CISettingsStore_Expecter) DeleteSecret(ctx any, scope any, name any) *CISettingsStore_DeleteSecret_Call { return &CISettingsStore_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, scope, name)} } func (_c *CISettingsStore_DeleteSecret_Call) Run(run func(ctx context.Context, scope domain.SettingsScope, name string)) *CISettingsStore_DeleteSecret_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CISettingsStore_DeleteSecret_Call) Return(err error) *CISettingsStore_DeleteSecret_Call { _c.Call.Return(err) return _c } func (_c *CISettingsStore_DeleteSecret_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope, name string) error) *CISettingsStore_DeleteSecret_Call { _c.Call.Return(run) return _c } // DeleteVariable provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) DeleteVariable(ctx context.Context, scope domain.SettingsScope, name string) error { ret := _mock.Called(ctx, scope, name) if len(ret) == 0 { panic("no return value specified for DeleteVariable") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string) error); ok { r0 = returnFunc(ctx, scope, name) } else { r0 = ret.Error(0) } return r0 } // CISettingsStore_DeleteVariable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteVariable' type CISettingsStore_DeleteVariable_Call struct { *mock.Call } // DeleteVariable is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope // - name string func (_e *CISettingsStore_Expecter) DeleteVariable(ctx any, scope any, name any) *CISettingsStore_DeleteVariable_Call { return &CISettingsStore_DeleteVariable_Call{Call: _e.mock.On("DeleteVariable", ctx, scope, name)} } func (_c *CISettingsStore_DeleteVariable_Call) Run(run func(ctx context.Context, scope domain.SettingsScope, name string)) *CISettingsStore_DeleteVariable_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CISettingsStore_DeleteVariable_Call) Return(err error) *CISettingsStore_DeleteVariable_Call { _c.Call.Return(err) return _c } func (_c *CISettingsStore_DeleteVariable_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope, name string) error) *CISettingsStore_DeleteVariable_Call { _c.Call.Return(run) return _c } // GetSealedSecret provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) GetSealedSecret(ctx context.Context, scope domain.SettingsScope, name string) (ports.SealedSecret, error) { ret := _mock.Called(ctx, scope, name) if len(ret) == 0 { panic("no return value specified for GetSealedSecret") } var r0 ports.SealedSecret var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string) (ports.SealedSecret, error)); ok { return returnFunc(ctx, scope, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string) ports.SealedSecret); ok { r0 = returnFunc(ctx, scope, name) } else { r0 = ret.Get(0).(ports.SealedSecret) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.SettingsScope, string) error); ok { r1 = returnFunc(ctx, scope, name) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_GetSealedSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSealedSecret' type CISettingsStore_GetSealedSecret_Call struct { *mock.Call } // GetSealedSecret is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope // - name string func (_e *CISettingsStore_Expecter) GetSealedSecret(ctx any, scope any, name any) *CISettingsStore_GetSealedSecret_Call { return &CISettingsStore_GetSealedSecret_Call{Call: _e.mock.On("GetSealedSecret", ctx, scope, name)} } func (_c *CISettingsStore_GetSealedSecret_Call) Run(run func(ctx context.Context, scope domain.SettingsScope, name string)) *CISettingsStore_GetSealedSecret_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CISettingsStore_GetSealedSecret_Call) Return(sealedSecret ports.SealedSecret, err error) *CISettingsStore_GetSealedSecret_Call { _c.Call.Return(sealedSecret, err) return _c } func (_c *CISettingsStore_GetSealedSecret_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope, name string) (ports.SealedSecret, error)) *CISettingsStore_GetSealedSecret_Call { _c.Call.Return(run) return _c } // GetVariable provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) GetVariable(ctx context.Context, scope domain.SettingsScope, name string) (domain.Variable, error) { ret := _mock.Called(ctx, scope, name) if len(ret) == 0 { panic("no return value specified for GetVariable") } var r0 domain.Variable var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string) (domain.Variable, error)); ok { return returnFunc(ctx, scope, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string) domain.Variable); ok { r0 = returnFunc(ctx, scope, name) } else { r0 = ret.Get(0).(domain.Variable) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.SettingsScope, string) error); ok { r1 = returnFunc(ctx, scope, name) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_GetVariable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVariable' type CISettingsStore_GetVariable_Call struct { *mock.Call } // GetVariable is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope // - name string func (_e *CISettingsStore_Expecter) GetVariable(ctx any, scope any, name any) *CISettingsStore_GetVariable_Call { return &CISettingsStore_GetVariable_Call{Call: _e.mock.On("GetVariable", ctx, scope, name)} } func (_c *CISettingsStore_GetVariable_Call) Run(run func(ctx context.Context, scope domain.SettingsScope, name string)) *CISettingsStore_GetVariable_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *CISettingsStore_GetVariable_Call) Return(variable domain.Variable, err error) *CISettingsStore_GetVariable_Call { _c.Call.Return(variable, err) return _c } func (_c *CISettingsStore_GetVariable_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope, name string) (domain.Variable, error)) *CISettingsStore_GetVariable_Call { _c.Call.Return(run) return _c } // ListEnvironments provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) ListEnvironments(ctx context.Context, repo domain.RepoName) ([]domain.Environment, error) { ret := _mock.Called(ctx, repo) if len(ret) == 0 { panic("no return value specified for ListEnvironments") } var r0 []domain.Environment var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) ([]domain.Environment, error)); ok { return returnFunc(ctx, repo) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName) []domain.Environment); ok { r0 = returnFunc(ctx, repo) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Environment) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName) error); ok { r1 = returnFunc(ctx, repo) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_ListEnvironments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEnvironments' type CISettingsStore_ListEnvironments_Call struct { *mock.Call } // ListEnvironments is a helper method to define mock.On call // - ctx context.Context // - repo domain.RepoName func (_e *CISettingsStore_Expecter) ListEnvironments(ctx any, repo any) *CISettingsStore_ListEnvironments_Call { return &CISettingsStore_ListEnvironments_Call{Call: _e.mock.On("ListEnvironments", ctx, repo)} } func (_c *CISettingsStore_ListEnvironments_Call) Run(run func(ctx context.Context, repo domain.RepoName)) *CISettingsStore_ListEnvironments_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.RepoName if args[1] != nil { arg1 = args[1].(domain.RepoName) } run( arg0, arg1, ) }) return _c } func (_c *CISettingsStore_ListEnvironments_Call) Return(environments []domain.Environment, err error) *CISettingsStore_ListEnvironments_Call { _c.Call.Return(environments, err) return _c } func (_c *CISettingsStore_ListEnvironments_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName) ([]domain.Environment, error)) *CISettingsStore_ListEnvironments_Call { _c.Call.Return(run) return _c } // ListSealedSecrets provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) ListSealedSecrets(ctx context.Context, scope domain.SettingsScope) ([]ports.SealedSecret, error) { ret := _mock.Called(ctx, scope) if len(ret) == 0 { panic("no return value specified for ListSealedSecrets") } var r0 []ports.SealedSecret var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope) ([]ports.SealedSecret, error)); ok { return returnFunc(ctx, scope) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope) []ports.SealedSecret); ok { r0 = returnFunc(ctx, scope) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]ports.SealedSecret) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.SettingsScope) error); ok { r1 = returnFunc(ctx, scope) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_ListSealedSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSealedSecrets' type CISettingsStore_ListSealedSecrets_Call struct { *mock.Call } // ListSealedSecrets is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope func (_e *CISettingsStore_Expecter) ListSealedSecrets(ctx any, scope any) *CISettingsStore_ListSealedSecrets_Call { return &CISettingsStore_ListSealedSecrets_Call{Call: _e.mock.On("ListSealedSecrets", ctx, scope)} } func (_c *CISettingsStore_ListSealedSecrets_Call) Run(run func(ctx context.Context, scope domain.SettingsScope)) *CISettingsStore_ListSealedSecrets_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } run( arg0, arg1, ) }) return _c } func (_c *CISettingsStore_ListSealedSecrets_Call) Return(sealedSecrets []ports.SealedSecret, err error) *CISettingsStore_ListSealedSecrets_Call { _c.Call.Return(sealedSecrets, err) return _c } func (_c *CISettingsStore_ListSealedSecrets_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope) ([]ports.SealedSecret, error)) *CISettingsStore_ListSealedSecrets_Call { _c.Call.Return(run) return _c } // ListVariables provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) ListVariables(ctx context.Context, scope domain.SettingsScope) ([]domain.Variable, error) { ret := _mock.Called(ctx, scope) if len(ret) == 0 { panic("no return value specified for ListVariables") } var r0 []domain.Variable var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope) ([]domain.Variable, error)); ok { return returnFunc(ctx, scope) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope) []domain.Variable); ok { r0 = returnFunc(ctx, scope) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Variable) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.SettingsScope) error); ok { r1 = returnFunc(ctx, scope) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_ListVariables_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVariables' type CISettingsStore_ListVariables_Call struct { *mock.Call } // ListVariables is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope func (_e *CISettingsStore_Expecter) ListVariables(ctx any, scope any) *CISettingsStore_ListVariables_Call { return &CISettingsStore_ListVariables_Call{Call: _e.mock.On("ListVariables", ctx, scope)} } func (_c *CISettingsStore_ListVariables_Call) Run(run func(ctx context.Context, scope domain.SettingsScope)) *CISettingsStore_ListVariables_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } run( arg0, arg1, ) }) return _c } func (_c *CISettingsStore_ListVariables_Call) Return(variables []domain.Variable, err error) *CISettingsStore_ListVariables_Call { _c.Call.Return(variables, err) return _c } func (_c *CISettingsStore_ListVariables_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope) ([]domain.Variable, error)) *CISettingsStore_ListVariables_Call { _c.Call.Return(run) return _c } // PutSecret provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) PutSecret(ctx context.Context, scope domain.SettingsScope, name string, sealed []byte, at time.Time) (domain.Secret, error) { ret := _mock.Called(ctx, scope, name, sealed, at) if len(ret) == 0 { panic("no return value specified for PutSecret") } var r0 domain.Secret var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string, []byte, time.Time) (domain.Secret, error)); ok { return returnFunc(ctx, scope, name, sealed, at) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string, []byte, time.Time) domain.Secret); ok { r0 = returnFunc(ctx, scope, name, sealed, at) } else { r0 = ret.Get(0).(domain.Secret) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.SettingsScope, string, []byte, time.Time) error); ok { r1 = returnFunc(ctx, scope, name, sealed, at) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_PutSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutSecret' type CISettingsStore_PutSecret_Call struct { *mock.Call } // PutSecret is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope // - name string // - sealed []byte // - at time.Time func (_e *CISettingsStore_Expecter) PutSecret(ctx any, scope any, name any, sealed any, at any) *CISettingsStore_PutSecret_Call { return &CISettingsStore_PutSecret_Call{Call: _e.mock.On("PutSecret", ctx, scope, name, sealed, at)} } func (_c *CISettingsStore_PutSecret_Call) Run(run func(ctx context.Context, scope domain.SettingsScope, name string, sealed []byte, at time.Time)) *CISettingsStore_PutSecret_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 []byte if args[3] != nil { arg3 = args[3].([]byte) } var arg4 time.Time if args[4] != nil { arg4 = args[4].(time.Time) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *CISettingsStore_PutSecret_Call) Return(secret domain.Secret, err error) *CISettingsStore_PutSecret_Call { _c.Call.Return(secret, err) return _c } func (_c *CISettingsStore_PutSecret_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope, name string, sealed []byte, at time.Time) (domain.Secret, error)) *CISettingsStore_PutSecret_Call { _c.Call.Return(run) return _c } // PutVariable provides a mock function for the type CISettingsStore func (_mock *CISettingsStore) PutVariable(ctx context.Context, scope domain.SettingsScope, name string, value string, at time.Time) (domain.Variable, error) { ret := _mock.Called(ctx, scope, name, value, at) if len(ret) == 0 { panic("no return value specified for PutVariable") } var r0 domain.Variable var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string, string, time.Time) (domain.Variable, error)); ok { return returnFunc(ctx, scope, name, value, at) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.SettingsScope, string, string, time.Time) domain.Variable); ok { r0 = returnFunc(ctx, scope, name, value, at) } else { r0 = ret.Get(0).(domain.Variable) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.SettingsScope, string, string, time.Time) error); ok { r1 = returnFunc(ctx, scope, name, value, at) } else { r1 = ret.Error(1) } return r0, r1 } // CISettingsStore_PutVariable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutVariable' type CISettingsStore_PutVariable_Call struct { *mock.Call } // PutVariable is a helper method to define mock.On call // - ctx context.Context // - scope domain.SettingsScope // - name string // - value string // - at time.Time func (_e *CISettingsStore_Expecter) PutVariable(ctx any, scope any, name any, value any, at any) *CISettingsStore_PutVariable_Call { return &CISettingsStore_PutVariable_Call{Call: _e.mock.On("PutVariable", ctx, scope, name, value, at)} } func (_c *CISettingsStore_PutVariable_Call) Run(run func(ctx context.Context, scope domain.SettingsScope, name string, value string, at time.Time)) *CISettingsStore_PutVariable_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.SettingsScope if args[1] != nil { arg1 = args[1].(domain.SettingsScope) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 time.Time if args[4] != nil { arg4 = args[4].(time.Time) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *CISettingsStore_PutVariable_Call) Return(variable domain.Variable, err error) *CISettingsStore_PutVariable_Call { _c.Call.Return(variable, err) return _c } func (_c *CISettingsStore_PutVariable_Call) RunAndReturn(run func(ctx context.Context, scope domain.SettingsScope, name string, value string, at time.Time) (domain.Variable, error)) *CISettingsStore_PutVariable_Call { _c.Call.Return(run) return _c }