// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/gordon/internal/boundaries/in" "github.com/bnema/gordon/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMockAppService creates a new instance of MockAppService. 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 NewMockAppService(t interface { mock.TestingT Cleanup(func()) }) *MockAppService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockAppService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockAppService is an autogenerated mock type for the AppService type type MockAppService struct { mock.Mock } type MockAppService_Expecter struct { mock *mock.Mock } func (_m *MockAppService) EXPECT() *MockAppService_Expecter { return &MockAppService_Expecter{mock: &_m.Mock} } // Apply provides a mock function for the type MockAppService func (_mock *MockAppService) Apply(ctx context.Context, spec domain.AppSpec, source []byte, dryRun bool) (*in.AppApplyResult, *in.AppDryRunResult, error) { ret := _mock.Called(ctx, spec, source, dryRun) if len(ret) == 0 { panic("no return value specified for Apply") } var r0 *in.AppApplyResult var r1 *in.AppDryRunResult var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppSpec, []byte, bool) (*in.AppApplyResult, *in.AppDryRunResult, error)); ok { return returnFunc(ctx, spec, source, dryRun) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppSpec, []byte, bool) *in.AppApplyResult); ok { r0 = returnFunc(ctx, spec, source, dryRun) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*in.AppApplyResult) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.AppSpec, []byte, bool) *in.AppDryRunResult); ok { r1 = returnFunc(ctx, spec, source, dryRun) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*in.AppDryRunResult) } } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.AppSpec, []byte, bool) error); ok { r2 = returnFunc(ctx, spec, source, dryRun) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockAppService_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply' type MockAppService_Apply_Call struct { *mock.Call } // Apply is a helper method to define mock.On call // - ctx context.Context // - spec domain.AppSpec // - source []byte // - dryRun bool func (_e *MockAppService_Expecter) Apply(ctx any, spec any, source any, dryRun any) *MockAppService_Apply_Call { return &MockAppService_Apply_Call{Call: _e.mock.On("Apply", ctx, spec, source, dryRun)} } func (_c *MockAppService_Apply_Call) Run(run func(ctx context.Context, spec domain.AppSpec, source []byte, dryRun bool)) *MockAppService_Apply_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppSpec if args[1] != nil { arg1 = args[1].(domain.AppSpec) } var arg2 []byte if args[2] != nil { arg2 = args[2].([]byte) } var arg3 bool if args[3] != nil { arg3 = args[3].(bool) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockAppService_Apply_Call) Return(appApplyResult *in.AppApplyResult, appDryRunResult *in.AppDryRunResult, err error) *MockAppService_Apply_Call { _c.Call.Return(appApplyResult, appDryRunResult, err) return _c } func (_c *MockAppService_Apply_Call) RunAndReturn(run func(ctx context.Context, spec domain.AppSpec, source []byte, dryRun bool) (*in.AppApplyResult, *in.AppDryRunResult, error)) *MockAppService_Apply_Call { _c.Call.Return(run) return _c } // DeleteSecret provides a mock function for the type MockAppService func (_mock *MockAppService) DeleteSecret(ctx context.Context, app string, service string, key string) error { ret := _mock.Called(ctx, app, service, key) if len(ret) == 0 { panic("no return value specified for DeleteSecret") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { r0 = returnFunc(ctx, app, service, key) } else { r0 = ret.Error(0) } return r0 } // MockAppService_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret' type MockAppService_DeleteSecret_Call struct { *mock.Call } // DeleteSecret is a helper method to define mock.On call // - ctx context.Context // - app string // - service string // - key string func (_e *MockAppService_Expecter) DeleteSecret(ctx any, app any, service any, key any) *MockAppService_DeleteSecret_Call { return &MockAppService_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, app, service, key)} } func (_c *MockAppService_DeleteSecret_Call) Run(run func(ctx context.Context, app string, service string, key string)) *MockAppService_DeleteSecret_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) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockAppService_DeleteSecret_Call) Return(err error) *MockAppService_DeleteSecret_Call { _c.Call.Return(err) return _c } func (_c *MockAppService_DeleteSecret_Call) RunAndReturn(run func(ctx context.Context, app string, service string, key string) error) *MockAppService_DeleteSecret_Call { _c.Call.Return(run) return _c } // Deploy provides a mock function for the type MockAppService func (_mock *MockAppService) Deploy(ctx context.Context, app string, revision string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error) { ret := _mock.Called(ctx, app, revision, service, all, idempotencyKey) if len(ret) == 0 { panic("no return value specified for Deploy") } var r0 *domain.AppOperation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, string) (*domain.AppOperation, error)); ok { return returnFunc(ctx, app, revision, service, all, idempotencyKey) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, string) *domain.AppOperation); ok { r0 = returnFunc(ctx, app, revision, service, all, idempotencyKey) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.AppOperation) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, bool, string) error); ok { r1 = returnFunc(ctx, app, revision, service, all, idempotencyKey) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Deploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deploy' type MockAppService_Deploy_Call struct { *mock.Call } // Deploy is a helper method to define mock.On call // - ctx context.Context // - app string // - revision string // - service string // - all bool // - idempotencyKey string func (_e *MockAppService_Expecter) Deploy(ctx any, app any, revision any, service any, all any, idempotencyKey any) *MockAppService_Deploy_Call { return &MockAppService_Deploy_Call{Call: _e.mock.On("Deploy", ctx, app, revision, service, all, idempotencyKey)} } func (_c *MockAppService_Deploy_Call) Run(run func(ctx context.Context, app string, revision string, service string, all bool, idempotencyKey string)) *MockAppService_Deploy_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) } var arg3 string if args[3] != nil { arg3 = args[3].(string) } var arg4 bool if args[4] != nil { arg4 = args[4].(bool) } var arg5 string if args[5] != nil { arg5 = args[5].(string) } run( arg0, arg1, arg2, arg3, arg4, arg5, ) }) return _c } func (_c *MockAppService_Deploy_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Deploy_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppService_Deploy_Call) RunAndReturn(run func(ctx context.Context, app string, revision string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Deploy_Call { _c.Call.Return(run) return _c } // Diff provides a mock function for the type MockAppService func (_mock *MockAppService) Diff(ctx context.Context, app string) (domain.AppDiff, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for Diff") } var r0 domain.AppDiff var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppDiff, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppDiff); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppDiff) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Diff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Diff' type MockAppService_Diff_Call struct { *mock.Call } // Diff is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppService_Expecter) Diff(ctx any, app any) *MockAppService_Diff_Call { return &MockAppService_Diff_Call{Call: _e.mock.On("Diff", ctx, app)} } func (_c *MockAppService_Diff_Call) Run(run func(ctx context.Context, app string)) *MockAppService_Diff_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 *MockAppService_Diff_Call) Return(appDiff domain.AppDiff, err error) *MockAppService_Diff_Call { _c.Call.Return(appDiff, err) return _c } func (_c *MockAppService_Diff_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppDiff, error)) *MockAppService_Diff_Call { _c.Call.Return(run) return _c } // List provides a mock function for the type MockAppService func (_mock *MockAppService) List(ctx context.Context) ([]in.AppSummary, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for List") } var r0 []in.AppSummary var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]in.AppSummary, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []in.AppSummary); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]in.AppSummary) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type MockAppService_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context func (_e *MockAppService_Expecter) List(ctx any) *MockAppService_List_Call { return &MockAppService_List_Call{Call: _e.mock.On("List", ctx)} } func (_c *MockAppService_List_Call) Run(run func(ctx context.Context)) *MockAppService_List_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockAppService_List_Call) Return(appSummarys []in.AppSummary, err error) *MockAppService_List_Call { _c.Call.Return(appSummarys, err) return _c } func (_c *MockAppService_List_Call) RunAndReturn(run func(ctx context.Context) ([]in.AppSummary, error)) *MockAppService_List_Call { _c.Call.Return(run) return _c } // ListSecrets provides a mock function for the type MockAppService func (_mock *MockAppService) ListSecrets(ctx context.Context, app string, service string) ([]in.AppSecretMetadata, error) { ret := _mock.Called(ctx, app, service) if len(ret) == 0 { panic("no return value specified for ListSecrets") } var r0 []in.AppSecretMetadata var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]in.AppSecretMetadata, error)); ok { return returnFunc(ctx, app, service) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []in.AppSecretMetadata); ok { r0 = returnFunc(ctx, app, service) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]in.AppSecretMetadata) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, service) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_ListSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecrets' type MockAppService_ListSecrets_Call struct { *mock.Call } // ListSecrets is a helper method to define mock.On call // - ctx context.Context // - app string // - service string func (_e *MockAppService_Expecter) ListSecrets(ctx any, app any, service any) *MockAppService_ListSecrets_Call { return &MockAppService_ListSecrets_Call{Call: _e.mock.On("ListSecrets", ctx, app, service)} } func (_c *MockAppService_ListSecrets_Call) Run(run func(ctx context.Context, app string, service string)) *MockAppService_ListSecrets_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 *MockAppService_ListSecrets_Call) Return(appSecretMetadatas []in.AppSecretMetadata, err error) *MockAppService_ListSecrets_Call { _c.Call.Return(appSecretMetadatas, err) return _c } func (_c *MockAppService_ListSecrets_Call) RunAndReturn(run func(ctx context.Context, app string, service string) ([]in.AppSecretMetadata, error)) *MockAppService_ListSecrets_Call { _c.Call.Return(run) return _c } // OperationByKey provides a mock function for the type MockAppService func (_mock *MockAppService) OperationByKey(ctx context.Context, app string, key string) (*domain.AppOperation, error) { ret := _mock.Called(ctx, app, key) if len(ret) == 0 { panic("no return value specified for OperationByKey") } var r0 *domain.AppOperation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok { return returnFunc(ctx, app, key) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok { r0 = returnFunc(ctx, app, key) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.AppOperation) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, key) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_OperationByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperationByKey' type MockAppService_OperationByKey_Call struct { *mock.Call } // OperationByKey is a helper method to define mock.On call // - ctx context.Context // - app string // - key string func (_e *MockAppService_Expecter) OperationByKey(ctx any, app any, key any) *MockAppService_OperationByKey_Call { return &MockAppService_OperationByKey_Call{Call: _e.mock.On("OperationByKey", ctx, app, key)} } func (_c *MockAppService_OperationByKey_Call) Run(run func(ctx context.Context, app string, key string)) *MockAppService_OperationByKey_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 *MockAppService_OperationByKey_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_OperationByKey_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppService_OperationByKey_Call) RunAndReturn(run func(ctx context.Context, app string, key string) (*domain.AppOperation, error)) *MockAppService_OperationByKey_Call { _c.Call.Return(run) return _c } // Remove provides a mock function for the type MockAppService func (_mock *MockAppService) Remove(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error) { ret := _mock.Called(ctx, app, idempotencyKey) if len(ret) == 0 { panic("no return value specified for Remove") } var r0 *domain.AppOperation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok { return returnFunc(ctx, app, idempotencyKey) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok { r0 = returnFunc(ctx, app, idempotencyKey) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.AppOperation) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, idempotencyKey) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' type MockAppService_Remove_Call struct { *mock.Call } // Remove is a helper method to define mock.On call // - ctx context.Context // - app string // - idempotencyKey string func (_e *MockAppService_Expecter) Remove(ctx any, app any, idempotencyKey any) *MockAppService_Remove_Call { return &MockAppService_Remove_Call{Call: _e.mock.On("Remove", ctx, app, idempotencyKey)} } func (_c *MockAppService_Remove_Call) Run(run func(ctx context.Context, app string, idempotencyKey string)) *MockAppService_Remove_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 *MockAppService_Remove_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Remove_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppService_Remove_Call) RunAndReturn(run func(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Remove_Call { _c.Call.Return(run) return _c } // Restart provides a mock function for the type MockAppService func (_mock *MockAppService) Restart(ctx context.Context, app string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error) { ret := _mock.Called(ctx, app, service, all, idempotencyKey) if len(ret) == 0 { panic("no return value specified for Restart") } var r0 *domain.AppOperation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool, string) (*domain.AppOperation, error)); ok { return returnFunc(ctx, app, service, all, idempotencyKey) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool, string) *domain.AppOperation); ok { r0 = returnFunc(ctx, app, service, all, idempotencyKey) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.AppOperation) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, bool, string) error); ok { r1 = returnFunc(ctx, app, service, all, idempotencyKey) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Restart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restart' type MockAppService_Restart_Call struct { *mock.Call } // Restart is a helper method to define mock.On call // - ctx context.Context // - app string // - service string // - all bool // - idempotencyKey string func (_e *MockAppService_Expecter) Restart(ctx any, app any, service any, all any, idempotencyKey any) *MockAppService_Restart_Call { return &MockAppService_Restart_Call{Call: _e.mock.On("Restart", ctx, app, service, all, idempotencyKey)} } func (_c *MockAppService_Restart_Call) Run(run func(ctx context.Context, app string, service string, all bool, idempotencyKey string)) *MockAppService_Restart_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) } var arg3 bool if args[3] != nil { arg3 = args[3].(bool) } var arg4 string if args[4] != nil { arg4 = args[4].(string) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *MockAppService_Restart_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Restart_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppService_Restart_Call) RunAndReturn(run func(ctx context.Context, app string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Restart_Call { _c.Call.Return(run) return _c } // SetSecrets provides a mock function for the type MockAppService func (_mock *MockAppService) SetSecrets(ctx context.Context, app string, service string, values map[string]string) error { ret := _mock.Called(ctx, app, service, values) if len(ret) == 0 { panic("no return value specified for SetSecrets") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) error); ok { r0 = returnFunc(ctx, app, service, values) } else { r0 = ret.Error(0) } return r0 } // MockAppService_SetSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSecrets' type MockAppService_SetSecrets_Call struct { *mock.Call } // SetSecrets is a helper method to define mock.On call // - ctx context.Context // - app string // - service string // - values map[string]string func (_e *MockAppService_Expecter) SetSecrets(ctx any, app any, service any, values any) *MockAppService_SetSecrets_Call { return &MockAppService_SetSecrets_Call{Call: _e.mock.On("SetSecrets", ctx, app, service, values)} } func (_c *MockAppService_SetSecrets_Call) Run(run func(ctx context.Context, app string, service string, values map[string]string)) *MockAppService_SetSecrets_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) } var arg3 map[string]string if args[3] != nil { arg3 = args[3].(map[string]string) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockAppService_SetSecrets_Call) Return(err error) *MockAppService_SetSecrets_Call { _c.Call.Return(err) return _c } func (_c *MockAppService_SetSecrets_Call) RunAndReturn(run func(ctx context.Context, app string, service string, values map[string]string) error) *MockAppService_SetSecrets_Call { _c.Call.Return(run) return _c } // Show provides a mock function for the type MockAppService func (_mock *MockAppService) Show(ctx context.Context, app string) (*in.AppDetail, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for Show") } var r0 *in.AppDetail var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*in.AppDetail, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) *in.AppDetail); ok { r0 = returnFunc(ctx, app) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*in.AppDetail) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show' type MockAppService_Show_Call struct { *mock.Call } // Show is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppService_Expecter) Show(ctx any, app any) *MockAppService_Show_Call { return &MockAppService_Show_Call{Call: _e.mock.On("Show", ctx, app)} } func (_c *MockAppService_Show_Call) Run(run func(ctx context.Context, app string)) *MockAppService_Show_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 *MockAppService_Show_Call) Return(appDetail *in.AppDetail, err error) *MockAppService_Show_Call { _c.Call.Return(appDetail, err) return _c } func (_c *MockAppService_Show_Call) RunAndReturn(run func(ctx context.Context, app string) (*in.AppDetail, error)) *MockAppService_Show_Call { _c.Call.Return(run) return _c } // Start provides a mock function for the type MockAppService func (_mock *MockAppService) Start(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error) { ret := _mock.Called(ctx, app, idempotencyKey) if len(ret) == 0 { panic("no return value specified for Start") } var r0 *domain.AppOperation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok { return returnFunc(ctx, app, idempotencyKey) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok { r0 = returnFunc(ctx, app, idempotencyKey) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.AppOperation) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, idempotencyKey) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' type MockAppService_Start_Call struct { *mock.Call } // Start is a helper method to define mock.On call // - ctx context.Context // - app string // - idempotencyKey string func (_e *MockAppService_Expecter) Start(ctx any, app any, idempotencyKey any) *MockAppService_Start_Call { return &MockAppService_Start_Call{Call: _e.mock.On("Start", ctx, app, idempotencyKey)} } func (_c *MockAppService_Start_Call) Run(run func(ctx context.Context, app string, idempotencyKey string)) *MockAppService_Start_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 *MockAppService_Start_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Start_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppService_Start_Call) RunAndReturn(run func(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Start_Call { _c.Call.Return(run) return _c } // Stop provides a mock function for the type MockAppService func (_mock *MockAppService) Stop(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error) { ret := _mock.Called(ctx, app, idempotencyKey) if len(ret) == 0 { panic("no return value specified for Stop") } var r0 *domain.AppOperation var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok { return returnFunc(ctx, app, idempotencyKey) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok { r0 = returnFunc(ctx, app, idempotencyKey) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*domain.AppOperation) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, idempotencyKey) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' type MockAppService_Stop_Call struct { *mock.Call } // Stop is a helper method to define mock.On call // - ctx context.Context // - app string // - idempotencyKey string func (_e *MockAppService_Expecter) Stop(ctx any, app any, idempotencyKey any) *MockAppService_Stop_Call { return &MockAppService_Stop_Call{Call: _e.mock.On("Stop", ctx, app, idempotencyKey)} } func (_c *MockAppService_Stop_Call) Run(run func(ctx context.Context, app string, idempotencyKey string)) *MockAppService_Stop_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 *MockAppService_Stop_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Stop_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppService_Stop_Call) RunAndReturn(run func(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Stop_Call { _c.Call.Return(run) return _c }