// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/gordon/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewMockAppState creates a new instance of MockAppState. 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 NewMockAppState(t interface { mock.TestingT Cleanup(func()) }) *MockAppState { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockAppState{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockAppState is an autogenerated mock type for the AppState type type MockAppState struct { mock.Mock } type MockAppState_Expecter struct { mock *mock.Mock } func (_m *MockAppState) EXPECT() *MockAppState_Expecter { return &MockAppState_Expecter{mock: &_m.Mock} } // AcceptApply provides a mock function for the type MockAppState func (_mock *MockAppState) AcceptApply(ctx context.Context, intent domain.AppApplyIntent) error { ret := _mock.Called(ctx, intent) if len(ret) == 0 { panic("no return value specified for AcceptApply") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppApplyIntent) error); ok { r0 = returnFunc(ctx, intent) } else { r0 = ret.Error(0) } return r0 } // MockAppState_AcceptApply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptApply' type MockAppState_AcceptApply_Call struct { *mock.Call } // AcceptApply is a helper method to define mock.On call // - ctx context.Context // - intent domain.AppApplyIntent func (_e *MockAppState_Expecter) AcceptApply(ctx any, intent any) *MockAppState_AcceptApply_Call { return &MockAppState_AcceptApply_Call{Call: _e.mock.On("AcceptApply", ctx, intent)} } func (_c *MockAppState_AcceptApply_Call) Run(run func(ctx context.Context, intent domain.AppApplyIntent)) *MockAppState_AcceptApply_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppApplyIntent if args[1] != nil { arg1 = args[1].(domain.AppApplyIntent) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_AcceptApply_Call) Return(err error) *MockAppState_AcceptApply_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_AcceptApply_Call) RunAndReturn(run func(ctx context.Context, intent domain.AppApplyIntent) error) *MockAppState_AcceptApply_Call { _c.Call.Return(run) return _c } // AppExists provides a mock function for the type MockAppState func (_mock *MockAppState) AppExists(ctx context.Context, app string) (bool, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for AppExists") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_AppExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppExists' type MockAppState_AppExists_Call struct { *mock.Call } // AppExists is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) AppExists(ctx any, app any) *MockAppState_AppExists_Call { return &MockAppState_AppExists_Call{Call: _e.mock.On("AppExists", ctx, app)} } func (_c *MockAppState_AppExists_Call) Run(run func(ctx context.Context, app string)) *MockAppState_AppExists_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 *MockAppState_AppExists_Call) Return(b bool, err error) *MockAppState_AppExists_Call { _c.Call.Return(b, err) return _c } func (_c *MockAppState_AppExists_Call) RunAndReturn(run func(ctx context.Context, app string) (bool, error)) *MockAppState_AppExists_Call { _c.Call.Return(run) return _c } // ClaimOperation provides a mock function for the type MockAppState func (_mock *MockAppState) ClaimOperation(ctx context.Context, candidate domain.AppOperation) (domain.AppOperation, bool, error) { ret := _mock.Called(ctx, candidate) if len(ret) == 0 { panic("no return value specified for ClaimOperation") } var r0 domain.AppOperation var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppOperation) (domain.AppOperation, bool, error)); ok { return returnFunc(ctx, candidate) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppOperation) domain.AppOperation); ok { r0 = returnFunc(ctx, candidate) } else { r0 = ret.Get(0).(domain.AppOperation) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.AppOperation) bool); ok { r1 = returnFunc(ctx, candidate) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.AppOperation) error); ok { r2 = returnFunc(ctx, candidate) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockAppState_ClaimOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClaimOperation' type MockAppState_ClaimOperation_Call struct { *mock.Call } // ClaimOperation is a helper method to define mock.On call // - ctx context.Context // - candidate domain.AppOperation func (_e *MockAppState_Expecter) ClaimOperation(ctx any, candidate any) *MockAppState_ClaimOperation_Call { return &MockAppState_ClaimOperation_Call{Call: _e.mock.On("ClaimOperation", ctx, candidate)} } func (_c *MockAppState_ClaimOperation_Call) Run(run func(ctx context.Context, candidate domain.AppOperation)) *MockAppState_ClaimOperation_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppOperation if args[1] != nil { arg1 = args[1].(domain.AppOperation) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_ClaimOperation_Call) Return(existing domain.AppOperation, claimed bool, err error) *MockAppState_ClaimOperation_Call { _c.Call.Return(existing, claimed, err) return _c } func (_c *MockAppState_ClaimOperation_Call) RunAndReturn(run func(ctx context.Context, candidate domain.AppOperation) (domain.AppOperation, bool, error)) *MockAppState_ClaimOperation_Call { _c.Call.Return(run) return _c } // ClearRecoveryInhibition provides a mock function for the type MockAppState func (_mock *MockAppState) ClearRecoveryInhibition(ctx context.Context, app string, service string, containerID string) error { ret := _mock.Called(ctx, app, service, containerID) if len(ret) == 0 { panic("no return value specified for ClearRecoveryInhibition") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { r0 = returnFunc(ctx, app, service, containerID) } else { r0 = ret.Error(0) } return r0 } // MockAppState_ClearRecoveryInhibition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearRecoveryInhibition' type MockAppState_ClearRecoveryInhibition_Call struct { *mock.Call } // ClearRecoveryInhibition is a helper method to define mock.On call // - ctx context.Context // - app string // - service string // - containerID string func (_e *MockAppState_Expecter) ClearRecoveryInhibition(ctx any, app any, service any, containerID any) *MockAppState_ClearRecoveryInhibition_Call { return &MockAppState_ClearRecoveryInhibition_Call{Call: _e.mock.On("ClearRecoveryInhibition", ctx, app, service, containerID)} } func (_c *MockAppState_ClearRecoveryInhibition_Call) Run(run func(ctx context.Context, app string, service string, containerID string)) *MockAppState_ClearRecoveryInhibition_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 *MockAppState_ClearRecoveryInhibition_Call) Return(err error) *MockAppState_ClearRecoveryInhibition_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_ClearRecoveryInhibition_Call) RunAndReturn(run func(ctx context.Context, app string, service string, containerID string) error) *MockAppState_ClearRecoveryInhibition_Call { _c.Call.Return(run) return _c } // Close provides a mock function for the type MockAppState func (_mock *MockAppState) Close() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // MockAppState_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockAppState_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockAppState_Expecter) Close() *MockAppState_Close_Call { return &MockAppState_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockAppState_Close_Call) Run(run func()) *MockAppState_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockAppState_Close_Call) Return(err error) *MockAppState_Close_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_Close_Call) RunAndReturn(run func() error) *MockAppState_Close_Call { _c.Call.Return(run) return _c } // ListApps provides a mock function for the type MockAppState func (_mock *MockAppState) ListApps(ctx context.Context) ([]string, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for ListApps") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_ListApps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListApps' type MockAppState_ListApps_Call struct { *mock.Call } // ListApps is a helper method to define mock.On call // - ctx context.Context func (_e *MockAppState_Expecter) ListApps(ctx any) *MockAppState_ListApps_Call { return &MockAppState_ListApps_Call{Call: _e.mock.On("ListApps", ctx)} } func (_c *MockAppState_ListApps_Call) Run(run func(ctx context.Context)) *MockAppState_ListApps_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 *MockAppState_ListApps_Call) Return(strings []string, err error) *MockAppState_ListApps_Call { _c.Call.Return(strings, err) return _c } func (_c *MockAppState_ListApps_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockAppState_ListApps_Call { _c.Call.Return(run) return _c } // LoadActive provides a mock function for the type MockAppState func (_mock *MockAppState) LoadActive(ctx context.Context, app string) (domain.AppActive, bool, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadActive") } var r0 domain.AppActive var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppActive, bool, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppActive); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppActive) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, app) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockAppState_LoadActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadActive' type MockAppState_LoadActive_Call struct { *mock.Call } // LoadActive is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) LoadActive(ctx any, app any) *MockAppState_LoadActive_Call { return &MockAppState_LoadActive_Call{Call: _e.mock.On("LoadActive", ctx, app)} } func (_c *MockAppState_LoadActive_Call) Run(run func(ctx context.Context, app string)) *MockAppState_LoadActive_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 *MockAppState_LoadActive_Call) Return(appActive domain.AppActive, b bool, err error) *MockAppState_LoadActive_Call { _c.Call.Return(appActive, b, err) return _c } func (_c *MockAppState_LoadActive_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppActive, bool, error)) *MockAppState_LoadActive_Call { _c.Call.Return(run) return _c } // LoadCheckpoint provides a mock function for the type MockAppState func (_mock *MockAppState) LoadCheckpoint(ctx context.Context) (domain.AppStoreCheckpoint, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for LoadCheckpoint") } var r0 domain.AppStoreCheckpoint var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) (domain.AppStoreCheckpoint, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) domain.AppStoreCheckpoint); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(domain.AppStoreCheckpoint) } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_LoadCheckpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadCheckpoint' type MockAppState_LoadCheckpoint_Call struct { *mock.Call } // LoadCheckpoint is a helper method to define mock.On call // - ctx context.Context func (_e *MockAppState_Expecter) LoadCheckpoint(ctx any) *MockAppState_LoadCheckpoint_Call { return &MockAppState_LoadCheckpoint_Call{Call: _e.mock.On("LoadCheckpoint", ctx)} } func (_c *MockAppState_LoadCheckpoint_Call) Run(run func(ctx context.Context)) *MockAppState_LoadCheckpoint_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 *MockAppState_LoadCheckpoint_Call) Return(appStoreCheckpoint domain.AppStoreCheckpoint, err error) *MockAppState_LoadCheckpoint_Call { _c.Call.Return(appStoreCheckpoint, err) return _c } func (_c *MockAppState_LoadCheckpoint_Call) RunAndReturn(run func(ctx context.Context) (domain.AppStoreCheckpoint, error)) *MockAppState_LoadCheckpoint_Call { _c.Call.Return(run) return _c } // LoadDesired provides a mock function for the type MockAppState func (_mock *MockAppState) LoadDesired(ctx context.Context, app string) (domain.AppDesiredRevision, bool, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadDesired") } var r0 domain.AppDesiredRevision var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppDesiredRevision, bool, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppDesiredRevision); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppDesiredRevision) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, app) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockAppState_LoadDesired_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadDesired' type MockAppState_LoadDesired_Call struct { *mock.Call } // LoadDesired is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) LoadDesired(ctx any, app any) *MockAppState_LoadDesired_Call { return &MockAppState_LoadDesired_Call{Call: _e.mock.On("LoadDesired", ctx, app)} } func (_c *MockAppState_LoadDesired_Call) Run(run func(ctx context.Context, app string)) *MockAppState_LoadDesired_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 *MockAppState_LoadDesired_Call) Return(appDesiredRevision domain.AppDesiredRevision, b bool, err error) *MockAppState_LoadDesired_Call { _c.Call.Return(appDesiredRevision, b, err) return _c } func (_c *MockAppState_LoadDesired_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppDesiredRevision, bool, error)) *MockAppState_LoadDesired_Call { _c.Call.Return(run) return _c } // LoadIntent provides a mock function for the type MockAppState func (_mock *MockAppState) LoadIntent(ctx context.Context, app string) (domain.AppStopIntent, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadIntent") } var r0 domain.AppStopIntent var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppStopIntent, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppStopIntent); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppStopIntent) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_LoadIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadIntent' type MockAppState_LoadIntent_Call struct { *mock.Call } // LoadIntent is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) LoadIntent(ctx any, app any) *MockAppState_LoadIntent_Call { return &MockAppState_LoadIntent_Call{Call: _e.mock.On("LoadIntent", ctx, app)} } func (_c *MockAppState_LoadIntent_Call) Run(run func(ctx context.Context, app string)) *MockAppState_LoadIntent_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 *MockAppState_LoadIntent_Call) Return(appStopIntent domain.AppStopIntent, err error) *MockAppState_LoadIntent_Call { _c.Call.Return(appStopIntent, err) return _c } func (_c *MockAppState_LoadIntent_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppStopIntent, error)) *MockAppState_LoadIntent_Call { _c.Call.Return(run) return _c } // LoadLatestOperation provides a mock function for the type MockAppState func (_mock *MockAppState) LoadLatestOperation(ctx context.Context, app string) (domain.AppOperation, bool, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadLatestOperation") } var r0 domain.AppOperation var r1 bool var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppOperation, bool, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppOperation); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppOperation) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Get(1).(bool) } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, app) } else { r2 = ret.Error(2) } return r0, r1, r2 } // MockAppState_LoadLatestOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadLatestOperation' type MockAppState_LoadLatestOperation_Call struct { *mock.Call } // LoadLatestOperation is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) LoadLatestOperation(ctx any, app any) *MockAppState_LoadLatestOperation_Call { return &MockAppState_LoadLatestOperation_Call{Call: _e.mock.On("LoadLatestOperation", ctx, app)} } func (_c *MockAppState_LoadLatestOperation_Call) Run(run func(ctx context.Context, app string)) *MockAppState_LoadLatestOperation_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 *MockAppState_LoadLatestOperation_Call) Return(appOperation domain.AppOperation, b bool, err error) *MockAppState_LoadLatestOperation_Call { _c.Call.Return(appOperation, b, err) return _c } func (_c *MockAppState_LoadLatestOperation_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppOperation, bool, error)) *MockAppState_LoadLatestOperation_Call { _c.Call.Return(run) return _c } // LoadOperation provides a mock function for the type MockAppState func (_mock *MockAppState) LoadOperation(ctx context.Context, app string, opID string) (domain.AppOperation, error) { ret := _mock.Called(ctx, app, opID) if len(ret) == 0 { panic("no return value specified for LoadOperation") } 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, opID) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) domain.AppOperation); ok { r0 = returnFunc(ctx, app, opID) } else { r0 = ret.Get(0).(domain.AppOperation) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, opID) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_LoadOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadOperation' type MockAppState_LoadOperation_Call struct { *mock.Call } // LoadOperation is a helper method to define mock.On call // - ctx context.Context // - app string // - opID string func (_e *MockAppState_Expecter) LoadOperation(ctx any, app any, opID any) *MockAppState_LoadOperation_Call { return &MockAppState_LoadOperation_Call{Call: _e.mock.On("LoadOperation", ctx, app, opID)} } func (_c *MockAppState_LoadOperation_Call) Run(run func(ctx context.Context, app string, opID string)) *MockAppState_LoadOperation_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 *MockAppState_LoadOperation_Call) Return(appOperation domain.AppOperation, err error) *MockAppState_LoadOperation_Call { _c.Call.Return(appOperation, err) return _c } func (_c *MockAppState_LoadOperation_Call) RunAndReturn(run func(ctx context.Context, app string, opID string) (domain.AppOperation, error)) *MockAppState_LoadOperation_Call { _c.Call.Return(run) return _c } // LoadOwnership provides a mock function for the type MockAppState func (_mock *MockAppState) LoadOwnership(ctx context.Context, app string) (domain.AppOwnership, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadOwnership") } var r0 domain.AppOwnership var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppOwnership, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppOwnership); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Get(0).(domain.AppOwnership) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_LoadOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadOwnership' type MockAppState_LoadOwnership_Call struct { *mock.Call } // LoadOwnership is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) LoadOwnership(ctx any, app any) *MockAppState_LoadOwnership_Call { return &MockAppState_LoadOwnership_Call{Call: _e.mock.On("LoadOwnership", ctx, app)} } func (_c *MockAppState_LoadOwnership_Call) Run(run func(ctx context.Context, app string)) *MockAppState_LoadOwnership_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 *MockAppState_LoadOwnership_Call) Return(appOwnership domain.AppOwnership, err error) *MockAppState_LoadOwnership_Call { _c.Call.Return(appOwnership, err) return _c } func (_c *MockAppState_LoadOwnership_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppOwnership, error)) *MockAppState_LoadOwnership_Call { _c.Call.Return(run) return _c } // LoadRecoveryInhibitions provides a mock function for the type MockAppState func (_mock *MockAppState) LoadRecoveryInhibitions(ctx context.Context, app string) ([]domain.AppRecoveryInhibition, error) { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for LoadRecoveryInhibitions") } var r0 []domain.AppRecoveryInhibition var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]domain.AppRecoveryInhibition, error)); ok { return returnFunc(ctx, app) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) []domain.AppRecoveryInhibition); ok { r0 = returnFunc(ctx, app) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.AppRecoveryInhibition) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, app) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_LoadRecoveryInhibitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadRecoveryInhibitions' type MockAppState_LoadRecoveryInhibitions_Call struct { *mock.Call } // LoadRecoveryInhibitions is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) LoadRecoveryInhibitions(ctx any, app any) *MockAppState_LoadRecoveryInhibitions_Call { return &MockAppState_LoadRecoveryInhibitions_Call{Call: _e.mock.On("LoadRecoveryInhibitions", ctx, app)} } func (_c *MockAppState_LoadRecoveryInhibitions_Call) Run(run func(ctx context.Context, app string)) *MockAppState_LoadRecoveryInhibitions_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 *MockAppState_LoadRecoveryInhibitions_Call) Return(appRecoveryInhibitions []domain.AppRecoveryInhibition, err error) *MockAppState_LoadRecoveryInhibitions_Call { _c.Call.Return(appRecoveryInhibitions, err) return _c } func (_c *MockAppState_LoadRecoveryInhibitions_Call) RunAndReturn(run func(ctx context.Context, app string) ([]domain.AppRecoveryInhibition, error)) *MockAppState_LoadRecoveryInhibitions_Call { _c.Call.Return(run) return _c } // LoadRevision provides a mock function for the type MockAppState func (_mock *MockAppState) LoadRevision(ctx context.Context, app string, revision string) (domain.AppDesiredRevision, error) { ret := _mock.Called(ctx, app, revision) if len(ret) == 0 { panic("no return value specified for LoadRevision") } var r0 domain.AppDesiredRevision var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (domain.AppDesiredRevision, error)); ok { return returnFunc(ctx, app, revision) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) domain.AppDesiredRevision); ok { r0 = returnFunc(ctx, app, revision) } else { r0 = ret.Get(0).(domain.AppDesiredRevision) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, app, revision) } else { r1 = ret.Error(1) } return r0, r1 } // MockAppState_LoadRevision_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadRevision' type MockAppState_LoadRevision_Call struct { *mock.Call } // LoadRevision is a helper method to define mock.On call // - ctx context.Context // - app string // - revision string func (_e *MockAppState_Expecter) LoadRevision(ctx any, app any, revision any) *MockAppState_LoadRevision_Call { return &MockAppState_LoadRevision_Call{Call: _e.mock.On("LoadRevision", ctx, app, revision)} } func (_c *MockAppState_LoadRevision_Call) Run(run func(ctx context.Context, app string, revision string)) *MockAppState_LoadRevision_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 *MockAppState_LoadRevision_Call) Return(appDesiredRevision domain.AppDesiredRevision, err error) *MockAppState_LoadRevision_Call { _c.Call.Return(appDesiredRevision, err) return _c } func (_c *MockAppState_LoadRevision_Call) RunAndReturn(run func(ctx context.Context, app string, revision string) (domain.AppDesiredRevision, error)) *MockAppState_LoadRevision_Call { _c.Call.Return(run) return _c } // Recover provides a mock function for the type MockAppState func (_mock *MockAppState) Recover(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Recover") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // MockAppState_Recover_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Recover' type MockAppState_Recover_Call struct { *mock.Call } // Recover is a helper method to define mock.On call // - ctx context.Context func (_e *MockAppState_Expecter) Recover(ctx any) *MockAppState_Recover_Call { return &MockAppState_Recover_Call{Call: _e.mock.On("Recover", ctx)} } func (_c *MockAppState_Recover_Call) Run(run func(ctx context.Context)) *MockAppState_Recover_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 *MockAppState_Recover_Call) Return(err error) *MockAppState_Recover_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_Recover_Call) RunAndReturn(run func(ctx context.Context) error) *MockAppState_Recover_Call { _c.Call.Return(run) return _c } // RegisterBackendBinds provides a mock function for the type MockAppState func (_mock *MockAppState) RegisterBackendBinds(ctx context.Context, binds []domain.AppListenerReservation) error { ret := _mock.Called(ctx, binds) if len(ret) == 0 { panic("no return value specified for RegisterBackendBinds") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, []domain.AppListenerReservation) error); ok { r0 = returnFunc(ctx, binds) } else { r0 = ret.Error(0) } return r0 } // MockAppState_RegisterBackendBinds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterBackendBinds' type MockAppState_RegisterBackendBinds_Call struct { *mock.Call } // RegisterBackendBinds is a helper method to define mock.On call // - ctx context.Context // - binds []domain.AppListenerReservation func (_e *MockAppState_Expecter) RegisterBackendBinds(ctx any, binds any) *MockAppState_RegisterBackendBinds_Call { return &MockAppState_RegisterBackendBinds_Call{Call: _e.mock.On("RegisterBackendBinds", ctx, binds)} } func (_c *MockAppState_RegisterBackendBinds_Call) Run(run func(ctx context.Context, binds []domain.AppListenerReservation)) *MockAppState_RegisterBackendBinds_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []domain.AppListenerReservation if args[1] != nil { arg1 = args[1].([]domain.AppListenerReservation) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_RegisterBackendBinds_Call) Return(err error) *MockAppState_RegisterBackendBinds_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_RegisterBackendBinds_Call) RunAndReturn(run func(ctx context.Context, binds []domain.AppListenerReservation) error) *MockAppState_RegisterBackendBinds_Call { _c.Call.Return(run) return _c } // ReleaseBackendBinds provides a mock function for the type MockAppState func (_mock *MockAppState) ReleaseBackendBinds(ctx context.Context, app string, containerID string) error { ret := _mock.Called(ctx, app, containerID) if len(ret) == 0 { panic("no return value specified for ReleaseBackendBinds") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = returnFunc(ctx, app, containerID) } else { r0 = ret.Error(0) } return r0 } // MockAppState_ReleaseBackendBinds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseBackendBinds' type MockAppState_ReleaseBackendBinds_Call struct { *mock.Call } // ReleaseBackendBinds is a helper method to define mock.On call // - ctx context.Context // - app string // - containerID string func (_e *MockAppState_Expecter) ReleaseBackendBinds(ctx any, app any, containerID any) *MockAppState_ReleaseBackendBinds_Call { return &MockAppState_ReleaseBackendBinds_Call{Call: _e.mock.On("ReleaseBackendBinds", ctx, app, containerID)} } func (_c *MockAppState_ReleaseBackendBinds_Call) Run(run func(ctx context.Context, app string, containerID string)) *MockAppState_ReleaseBackendBinds_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 *MockAppState_ReleaseBackendBinds_Call) Return(err error) *MockAppState_ReleaseBackendBinds_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_ReleaseBackendBinds_Call) RunAndReturn(run func(ctx context.Context, app string, containerID string) error) *MockAppState_ReleaseBackendBinds_Call { _c.Call.Return(run) return _c } // RetireApp provides a mock function for the type MockAppState func (_mock *MockAppState) RetireApp(ctx context.Context, app string) error { ret := _mock.Called(ctx, app) if len(ret) == 0 { panic("no return value specified for RetireApp") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, app) } else { r0 = ret.Error(0) } return r0 } // MockAppState_RetireApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetireApp' type MockAppState_RetireApp_Call struct { *mock.Call } // RetireApp is a helper method to define mock.On call // - ctx context.Context // - app string func (_e *MockAppState_Expecter) RetireApp(ctx any, app any) *MockAppState_RetireApp_Call { return &MockAppState_RetireApp_Call{Call: _e.mock.On("RetireApp", ctx, app)} } func (_c *MockAppState_RetireApp_Call) Run(run func(ctx context.Context, app string)) *MockAppState_RetireApp_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 *MockAppState_RetireApp_Call) Return(err error) *MockAppState_RetireApp_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_RetireApp_Call) RunAndReturn(run func(ctx context.Context, app string) error) *MockAppState_RetireApp_Call { _c.Call.Return(run) return _c } // SaveActive provides a mock function for the type MockAppState func (_mock *MockAppState) SaveActive(ctx context.Context, active domain.AppActive) error { ret := _mock.Called(ctx, active) if len(ret) == 0 { panic("no return value specified for SaveActive") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppActive) error); ok { r0 = returnFunc(ctx, active) } else { r0 = ret.Error(0) } return r0 } // MockAppState_SaveActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveActive' type MockAppState_SaveActive_Call struct { *mock.Call } // SaveActive is a helper method to define mock.On call // - ctx context.Context // - active domain.AppActive func (_e *MockAppState_Expecter) SaveActive(ctx any, active any) *MockAppState_SaveActive_Call { return &MockAppState_SaveActive_Call{Call: _e.mock.On("SaveActive", ctx, active)} } func (_c *MockAppState_SaveActive_Call) Run(run func(ctx context.Context, active domain.AppActive)) *MockAppState_SaveActive_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppActive if args[1] != nil { arg1 = args[1].(domain.AppActive) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_SaveActive_Call) Return(err error) *MockAppState_SaveActive_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_SaveActive_Call) RunAndReturn(run func(ctx context.Context, active domain.AppActive) error) *MockAppState_SaveActive_Call { _c.Call.Return(run) return _c } // SaveIntent provides a mock function for the type MockAppState func (_mock *MockAppState) SaveIntent(ctx context.Context, intent domain.AppStopIntent) error { ret := _mock.Called(ctx, intent) if len(ret) == 0 { panic("no return value specified for SaveIntent") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppStopIntent) error); ok { r0 = returnFunc(ctx, intent) } else { r0 = ret.Error(0) } return r0 } // MockAppState_SaveIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveIntent' type MockAppState_SaveIntent_Call struct { *mock.Call } // SaveIntent is a helper method to define mock.On call // - ctx context.Context // - intent domain.AppStopIntent func (_e *MockAppState_Expecter) SaveIntent(ctx any, intent any) *MockAppState_SaveIntent_Call { return &MockAppState_SaveIntent_Call{Call: _e.mock.On("SaveIntent", ctx, intent)} } func (_c *MockAppState_SaveIntent_Call) Run(run func(ctx context.Context, intent domain.AppStopIntent)) *MockAppState_SaveIntent_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppStopIntent if args[1] != nil { arg1 = args[1].(domain.AppStopIntent) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_SaveIntent_Call) Return(err error) *MockAppState_SaveIntent_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_SaveIntent_Call) RunAndReturn(run func(ctx context.Context, intent domain.AppStopIntent) error) *MockAppState_SaveIntent_Call { _c.Call.Return(run) return _c } // SaveOperation provides a mock function for the type MockAppState func (_mock *MockAppState) SaveOperation(ctx context.Context, op domain.AppOperation) error { ret := _mock.Called(ctx, op) if len(ret) == 0 { panic("no return value specified for SaveOperation") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppOperation) error); ok { r0 = returnFunc(ctx, op) } else { r0 = ret.Error(0) } return r0 } // MockAppState_SaveOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveOperation' type MockAppState_SaveOperation_Call struct { *mock.Call } // SaveOperation is a helper method to define mock.On call // - ctx context.Context // - op domain.AppOperation func (_e *MockAppState_Expecter) SaveOperation(ctx any, op any) *MockAppState_SaveOperation_Call { return &MockAppState_SaveOperation_Call{Call: _e.mock.On("SaveOperation", ctx, op)} } func (_c *MockAppState_SaveOperation_Call) Run(run func(ctx context.Context, op domain.AppOperation)) *MockAppState_SaveOperation_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppOperation if args[1] != nil { arg1 = args[1].(domain.AppOperation) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_SaveOperation_Call) Return(err error) *MockAppState_SaveOperation_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_SaveOperation_Call) RunAndReturn(run func(ctx context.Context, op domain.AppOperation) error) *MockAppState_SaveOperation_Call { _c.Call.Return(run) return _c } // SaveOwnership provides a mock function for the type MockAppState func (_mock *MockAppState) SaveOwnership(ctx context.Context, ownership domain.AppOwnership) error { ret := _mock.Called(ctx, ownership) if len(ret) == 0 { panic("no return value specified for SaveOwnership") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppOwnership) error); ok { r0 = returnFunc(ctx, ownership) } else { r0 = ret.Error(0) } return r0 } // MockAppState_SaveOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveOwnership' type MockAppState_SaveOwnership_Call struct { *mock.Call } // SaveOwnership is a helper method to define mock.On call // - ctx context.Context // - ownership domain.AppOwnership func (_e *MockAppState_Expecter) SaveOwnership(ctx any, ownership any) *MockAppState_SaveOwnership_Call { return &MockAppState_SaveOwnership_Call{Call: _e.mock.On("SaveOwnership", ctx, ownership)} } func (_c *MockAppState_SaveOwnership_Call) Run(run func(ctx context.Context, ownership domain.AppOwnership)) *MockAppState_SaveOwnership_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppOwnership if args[1] != nil { arg1 = args[1].(domain.AppOwnership) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_SaveOwnership_Call) Return(err error) *MockAppState_SaveOwnership_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_SaveOwnership_Call) RunAndReturn(run func(ctx context.Context, ownership domain.AppOwnership) error) *MockAppState_SaveOwnership_Call { _c.Call.Return(run) return _c } // SaveRecoveryInhibition provides a mock function for the type MockAppState func (_mock *MockAppState) SaveRecoveryInhibition(ctx context.Context, inhibition domain.AppRecoveryInhibition) error { ret := _mock.Called(ctx, inhibition) if len(ret) == 0 { panic("no return value specified for SaveRecoveryInhibition") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppRecoveryInhibition) error); ok { r0 = returnFunc(ctx, inhibition) } else { r0 = ret.Error(0) } return r0 } // MockAppState_SaveRecoveryInhibition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveRecoveryInhibition' type MockAppState_SaveRecoveryInhibition_Call struct { *mock.Call } // SaveRecoveryInhibition is a helper method to define mock.On call // - ctx context.Context // - inhibition domain.AppRecoveryInhibition func (_e *MockAppState_Expecter) SaveRecoveryInhibition(ctx any, inhibition any) *MockAppState_SaveRecoveryInhibition_Call { return &MockAppState_SaveRecoveryInhibition_Call{Call: _e.mock.On("SaveRecoveryInhibition", ctx, inhibition)} } func (_c *MockAppState_SaveRecoveryInhibition_Call) Run(run func(ctx context.Context, inhibition domain.AppRecoveryInhibition)) *MockAppState_SaveRecoveryInhibition_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.AppRecoveryInhibition if args[1] != nil { arg1 = args[1].(domain.AppRecoveryInhibition) } run( arg0, arg1, ) }) return _c } func (_c *MockAppState_SaveRecoveryInhibition_Call) Return(err error) *MockAppState_SaveRecoveryInhibition_Call { _c.Call.Return(err) return _c } func (_c *MockAppState_SaveRecoveryInhibition_Call) RunAndReturn(run func(ctx context.Context, inhibition domain.AppRecoveryInhibition) error) *MockAppState_SaveRecoveryInhibition_Call { _c.Call.Return(run) return _c }