Documentation
¶
Overview ¶
Package mock_modagent is a generated GoMock package.
Index ¶
- type MockAPI
- func (m *MockAPI) EXPECT() *MockAPIMockRecorder
- func (m *MockAPI) GetAgentKey(ctx context.Context) (api.AgentKey, error)
- func (m *MockAPI) GetGitLabExternalURL(ctx context.Context) (url.URL, error)
- func (m *MockAPI) HandleProcessingError(ctx context.Context, log *slog.Logger, msg string, err error, ...)
- func (m *MockAPI) MakeGitLabRequest(ctx context.Context, path string, opts ...modagent.GitLabRequestOption) (*modagent.GitLabResponse, error)
- func (m *MockAPI) TryGetAgentKey() (api.AgentKey, bool)
- type MockAPIGetAgentKeyCall
- func (c *MockAPIGetAgentKeyCall) Do(f func(context.Context) (api.AgentKey, error)) *MockAPIGetAgentKeyCall
- func (c *MockAPIGetAgentKeyCall) DoAndReturn(f func(context.Context) (api.AgentKey, error)) *MockAPIGetAgentKeyCall
- func (c *MockAPIGetAgentKeyCall) Return(arg0 api.AgentKey, arg1 error) *MockAPIGetAgentKeyCall
- type MockAPIGetGitLabExternalURLCall
- func (c *MockAPIGetGitLabExternalURLCall) Do(f func(context.Context) (url.URL, error)) *MockAPIGetGitLabExternalURLCall
- func (c *MockAPIGetGitLabExternalURLCall) DoAndReturn(f func(context.Context) (url.URL, error)) *MockAPIGetGitLabExternalURLCall
- func (c *MockAPIGetGitLabExternalURLCall) Return(arg0 url.URL, arg1 error) *MockAPIGetGitLabExternalURLCall
- type MockAPIHandleProcessingErrorCall
- func (c *MockAPIHandleProcessingErrorCall) Do(f func(context.Context, *slog.Logger, string, error, ...fieldz.Field)) *MockAPIHandleProcessingErrorCall
- func (c *MockAPIHandleProcessingErrorCall) DoAndReturn(f func(context.Context, *slog.Logger, string, error, ...fieldz.Field)) *MockAPIHandleProcessingErrorCall
- func (c *MockAPIHandleProcessingErrorCall) Return() *MockAPIHandleProcessingErrorCall
- type MockAPIMakeGitLabRequestCall
- type MockAPIMockRecorder
- func (mr *MockAPIMockRecorder) GetAgentKey(ctx any) *MockAPIGetAgentKeyCall
- func (mr *MockAPIMockRecorder) GetGitLabExternalURL(ctx any) *MockAPIGetGitLabExternalURLCall
- func (mr *MockAPIMockRecorder) HandleProcessingError(ctx, log, msg, err any, fields ...any) *MockAPIHandleProcessingErrorCall
- func (mr *MockAPIMockRecorder) MakeGitLabRequest(ctx, path any, opts ...any) *MockAPIMakeGitLabRequestCall
- func (mr *MockAPIMockRecorder) TryGetAgentKey() *MockAPITryGetAgentKeyCall
- type MockAPITryGetAgentKeyCall
- func (c *MockAPITryGetAgentKeyCall) Do(f func() (api.AgentKey, bool)) *MockAPITryGetAgentKeyCall
- func (c *MockAPITryGetAgentKeyCall) DoAndReturn(f func() (api.AgentKey, bool)) *MockAPITryGetAgentKeyCall
- func (c *MockAPITryGetAgentKeyCall) Return(arg0 api.AgentKey, arg1 bool) *MockAPITryGetAgentKeyCall
- type MockFactory
- type MockFactoryIsProducingLeaderModulesCall
- func (c *MockFactoryIsProducingLeaderModulesCall[CF, CM]) Do(f func() bool) *MockFactoryIsProducingLeaderModulesCall[CF, CM]
- func (c *MockFactoryIsProducingLeaderModulesCall[CF, CM]) DoAndReturn(f func() bool) *MockFactoryIsProducingLeaderModulesCall[CF, CM]
- func (c *MockFactoryIsProducingLeaderModulesCall[CF, CM]) Return(arg0 bool) *MockFactoryIsProducingLeaderModulesCall[CF, CM]
- type MockFactoryMockRecorder
- type MockFactoryNameCall
- type MockFactoryNewCall
- func (c *MockFactoryNewCall[CF, CM]) Do(f func(CF) (modagent.Module[CM], error)) *MockFactoryNewCall[CF, CM]
- func (c *MockFactoryNewCall[CF, CM]) DoAndReturn(f func(CF) (modagent.Module[CM], error)) *MockFactoryNewCall[CF, CM]
- func (c *MockFactoryNewCall[CF, CM]) Return(arg0 modagent.Module[CM], arg1 error) *MockFactoryNewCall[CF, CM]
- type MockModule
- type MockModuleDefaultAndValidateConfigurationCall
- func (c *MockModuleDefaultAndValidateConfigurationCall[CM]) Do(f func(CM) error) *MockModuleDefaultAndValidateConfigurationCall[CM]
- func (c *MockModuleDefaultAndValidateConfigurationCall[CM]) DoAndReturn(f func(CM) error) *MockModuleDefaultAndValidateConfigurationCall[CM]
- func (c *MockModuleDefaultAndValidateConfigurationCall[CM]) Return(arg0 error) *MockModuleDefaultAndValidateConfigurationCall[CM]
- type MockModuleMockRecorder
- type MockModuleNameCall
- type MockModuleRunCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAPI ¶
type MockAPI struct {
// contains filtered or unexported fields
}
MockAPI is a mock of API interface.
func NewMockAPI ¶
func NewMockAPI(ctrl *gomock.Controller) *MockAPI
NewMockAPI creates a new mock instance.
func (*MockAPI) EXPECT ¶
func (m *MockAPI) EXPECT() *MockAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAPI) GetAgentKey ¶ added in v18.1.0
GetAgentKey mocks base method.
func (*MockAPI) GetGitLabExternalURL ¶
GetGitLabExternalURL mocks base method.
func (*MockAPI) HandleProcessingError ¶
func (m *MockAPI) HandleProcessingError(ctx context.Context, log *slog.Logger, msg string, err error, fields ...fieldz.Field)
HandleProcessingError mocks base method.
func (*MockAPI) MakeGitLabRequest ¶
func (m *MockAPI) MakeGitLabRequest(ctx context.Context, path string, opts ...modagent.GitLabRequestOption) (*modagent.GitLabResponse, error)
MakeGitLabRequest mocks base method.
type MockAPIGetAgentKeyCall ¶ added in v18.1.0
MockAPIGetAgentKeyCall wrap *gomock.Call
func (*MockAPIGetAgentKeyCall) Do ¶ added in v18.1.0
func (c *MockAPIGetAgentKeyCall) Do(f func(context.Context) (api.AgentKey, error)) *MockAPIGetAgentKeyCall
Do rewrite *gomock.Call.Do
func (*MockAPIGetAgentKeyCall) DoAndReturn ¶ added in v18.1.0
func (c *MockAPIGetAgentKeyCall) DoAndReturn(f func(context.Context) (api.AgentKey, error)) *MockAPIGetAgentKeyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAPIGetAgentKeyCall) Return ¶ added in v18.1.0
func (c *MockAPIGetAgentKeyCall) Return(arg0 api.AgentKey, arg1 error) *MockAPIGetAgentKeyCall
Return rewrite *gomock.Call.Return
type MockAPIGetGitLabExternalURLCall ¶
MockAPIGetGitLabExternalURLCall wrap *gomock.Call
func (*MockAPIGetGitLabExternalURLCall) Do ¶
func (c *MockAPIGetGitLabExternalURLCall) Do(f func(context.Context) (url.URL, error)) *MockAPIGetGitLabExternalURLCall
Do rewrite *gomock.Call.Do
func (*MockAPIGetGitLabExternalURLCall) DoAndReturn ¶
func (c *MockAPIGetGitLabExternalURLCall) DoAndReturn(f func(context.Context) (url.URL, error)) *MockAPIGetGitLabExternalURLCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAPIGetGitLabExternalURLCall) Return ¶
func (c *MockAPIGetGitLabExternalURLCall) Return(arg0 url.URL, arg1 error) *MockAPIGetGitLabExternalURLCall
Return rewrite *gomock.Call.Return
type MockAPIHandleProcessingErrorCall ¶
MockAPIHandleProcessingErrorCall wrap *gomock.Call
func (*MockAPIHandleProcessingErrorCall) Do ¶
func (c *MockAPIHandleProcessingErrorCall) Do(f func(context.Context, *slog.Logger, string, error, ...fieldz.Field)) *MockAPIHandleProcessingErrorCall
Do rewrite *gomock.Call.Do
func (*MockAPIHandleProcessingErrorCall) DoAndReturn ¶
func (c *MockAPIHandleProcessingErrorCall) DoAndReturn(f func(context.Context, *slog.Logger, string, error, ...fieldz.Field)) *MockAPIHandleProcessingErrorCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAPIHandleProcessingErrorCall) Return ¶
func (c *MockAPIHandleProcessingErrorCall) Return() *MockAPIHandleProcessingErrorCall
Return rewrite *gomock.Call.Return
type MockAPIMakeGitLabRequestCall ¶
MockAPIMakeGitLabRequestCall wrap *gomock.Call
func (*MockAPIMakeGitLabRequestCall) Do ¶
func (c *MockAPIMakeGitLabRequestCall) Do(f func(context.Context, string, ...modagent.GitLabRequestOption) (*modagent.GitLabResponse, error)) *MockAPIMakeGitLabRequestCall
Do rewrite *gomock.Call.Do
func (*MockAPIMakeGitLabRequestCall) DoAndReturn ¶
func (c *MockAPIMakeGitLabRequestCall) DoAndReturn(f func(context.Context, string, ...modagent.GitLabRequestOption) (*modagent.GitLabResponse, error)) *MockAPIMakeGitLabRequestCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAPIMakeGitLabRequestCall) Return ¶
func (c *MockAPIMakeGitLabRequestCall) Return(arg0 *modagent.GitLabResponse, arg1 error) *MockAPIMakeGitLabRequestCall
Return rewrite *gomock.Call.Return
type MockAPIMockRecorder ¶
type MockAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockAPIMockRecorder is the mock recorder for MockAPI.
func (*MockAPIMockRecorder) GetAgentKey ¶ added in v18.1.0
func (mr *MockAPIMockRecorder) GetAgentKey(ctx any) *MockAPIGetAgentKeyCall
GetAgentKey indicates an expected call of GetAgentKey.
func (*MockAPIMockRecorder) GetGitLabExternalURL ¶
func (mr *MockAPIMockRecorder) GetGitLabExternalURL(ctx any) *MockAPIGetGitLabExternalURLCall
GetGitLabExternalURL indicates an expected call of GetGitLabExternalURL.
func (*MockAPIMockRecorder) HandleProcessingError ¶
func (mr *MockAPIMockRecorder) HandleProcessingError(ctx, log, msg, err any, fields ...any) *MockAPIHandleProcessingErrorCall
HandleProcessingError indicates an expected call of HandleProcessingError.
func (*MockAPIMockRecorder) MakeGitLabRequest ¶
func (mr *MockAPIMockRecorder) MakeGitLabRequest(ctx, path any, opts ...any) *MockAPIMakeGitLabRequestCall
MakeGitLabRequest indicates an expected call of MakeGitLabRequest.
func (*MockAPIMockRecorder) TryGetAgentKey ¶ added in v18.1.0
func (mr *MockAPIMockRecorder) TryGetAgentKey() *MockAPITryGetAgentKeyCall
TryGetAgentKey indicates an expected call of TryGetAgentKey.
type MockAPITryGetAgentKeyCall ¶ added in v18.1.0
MockAPITryGetAgentKeyCall wrap *gomock.Call
func (*MockAPITryGetAgentKeyCall) Do ¶ added in v18.1.0
func (c *MockAPITryGetAgentKeyCall) Do(f func() (api.AgentKey, bool)) *MockAPITryGetAgentKeyCall
Do rewrite *gomock.Call.Do
func (*MockAPITryGetAgentKeyCall) DoAndReturn ¶ added in v18.1.0
func (c *MockAPITryGetAgentKeyCall) DoAndReturn(f func() (api.AgentKey, bool)) *MockAPITryGetAgentKeyCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockAPITryGetAgentKeyCall) Return ¶ added in v18.1.0
func (c *MockAPITryGetAgentKeyCall) Return(arg0 api.AgentKey, arg1 bool) *MockAPITryGetAgentKeyCall
Return rewrite *gomock.Call.Return
type MockFactory ¶
MockFactory is a mock of Factory interface.
func NewMockFactory ¶
func NewMockFactory[CF any, CM any](ctrl *gomock.Controller) *MockFactory[CF, CM]
NewMockFactory creates a new mock instance.
func (*MockFactory[CF, CM]) EXPECT ¶
func (m *MockFactory[CF, CM]) EXPECT() *MockFactoryMockRecorder[CF, CM]
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFactory[CF, CM]) IsProducingLeaderModules ¶
func (m *MockFactory[CF, CM]) IsProducingLeaderModules() bool
IsProducingLeaderModules mocks base method.
func (*MockFactory[CF, CM]) Name ¶
func (m *MockFactory[CF, CM]) Name() string
Name mocks base method.
type MockFactoryIsProducingLeaderModulesCall ¶
MockFactoryIsProducingLeaderModulesCall wrap *gomock.Call
func (*MockFactoryIsProducingLeaderModulesCall[CF, CM]) Do ¶
func (c *MockFactoryIsProducingLeaderModulesCall[CF, CM]) Do(f func() bool) *MockFactoryIsProducingLeaderModulesCall[CF, CM]
Do rewrite *gomock.Call.Do
func (*MockFactoryIsProducingLeaderModulesCall[CF, CM]) DoAndReturn ¶
func (c *MockFactoryIsProducingLeaderModulesCall[CF, CM]) DoAndReturn(f func() bool) *MockFactoryIsProducingLeaderModulesCall[CF, CM]
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockFactoryIsProducingLeaderModulesCall[CF, CM]) Return ¶
func (c *MockFactoryIsProducingLeaderModulesCall[CF, CM]) Return(arg0 bool) *MockFactoryIsProducingLeaderModulesCall[CF, CM]
Return rewrite *gomock.Call.Return
type MockFactoryMockRecorder ¶
MockFactoryMockRecorder is the mock recorder for MockFactory.
func (*MockFactoryMockRecorder[CF, CM]) IsProducingLeaderModules ¶
func (mr *MockFactoryMockRecorder[CF, CM]) IsProducingLeaderModules() *MockFactoryIsProducingLeaderModulesCall[CF, CM]
IsProducingLeaderModules indicates an expected call of IsProducingLeaderModules.
func (*MockFactoryMockRecorder[CF, CM]) Name ¶
func (mr *MockFactoryMockRecorder[CF, CM]) Name() *MockFactoryNameCall[CF, CM]
Name indicates an expected call of Name.
func (*MockFactoryMockRecorder[CF, CM]) New ¶
func (mr *MockFactoryMockRecorder[CF, CM]) New(arg0 any) *MockFactoryNewCall[CF, CM]
New indicates an expected call of New.
type MockFactoryNameCall ¶
MockFactoryNameCall wrap *gomock.Call
func (*MockFactoryNameCall[CF, CM]) Do ¶
func (c *MockFactoryNameCall[CF, CM]) Do(f func() string) *MockFactoryNameCall[CF, CM]
Do rewrite *gomock.Call.Do
func (*MockFactoryNameCall[CF, CM]) DoAndReturn ¶
func (c *MockFactoryNameCall[CF, CM]) DoAndReturn(f func() string) *MockFactoryNameCall[CF, CM]
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockFactoryNameCall[CF, CM]) Return ¶
func (c *MockFactoryNameCall[CF, CM]) Return(arg0 string) *MockFactoryNameCall[CF, CM]
Return rewrite *gomock.Call.Return
type MockFactoryNewCall ¶
MockFactoryNewCall wrap *gomock.Call
func (*MockFactoryNewCall[CF, CM]) Do ¶
func (c *MockFactoryNewCall[CF, CM]) Do(f func(CF) (modagent.Module[CM], error)) *MockFactoryNewCall[CF, CM]
Do rewrite *gomock.Call.Do
func (*MockFactoryNewCall[CF, CM]) DoAndReturn ¶
func (c *MockFactoryNewCall[CF, CM]) DoAndReturn(f func(CF) (modagent.Module[CM], error)) *MockFactoryNewCall[CF, CM]
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockFactoryNewCall[CF, CM]) Return ¶
func (c *MockFactoryNewCall[CF, CM]) Return(arg0 modagent.Module[CM], arg1 error) *MockFactoryNewCall[CF, CM]
Return rewrite *gomock.Call.Return
type MockModule ¶
type MockModule[CM any] struct { // contains filtered or unexported fields }
MockModule is a mock of Module interface.
func NewMockModule ¶
func NewMockModule[CM any](ctrl *gomock.Controller) *MockModule[CM]
NewMockModule creates a new mock instance.
func (*MockModule[CM]) DefaultAndValidateConfiguration ¶
func (m *MockModule[CM]) DefaultAndValidateConfiguration(cfg CM) error
DefaultAndValidateConfiguration mocks base method.
func (*MockModule[CM]) EXPECT ¶
func (m *MockModule[CM]) EXPECT() *MockModuleMockRecorder[CM]
EXPECT returns an object that allows the caller to indicate expected use.
type MockModuleDefaultAndValidateConfigurationCall ¶
MockModuleDefaultAndValidateConfigurationCall wrap *gomock.Call
func (*MockModuleDefaultAndValidateConfigurationCall[CM]) Do ¶
func (c *MockModuleDefaultAndValidateConfigurationCall[CM]) Do(f func(CM) error) *MockModuleDefaultAndValidateConfigurationCall[CM]
Do rewrite *gomock.Call.Do
func (*MockModuleDefaultAndValidateConfigurationCall[CM]) DoAndReturn ¶
func (c *MockModuleDefaultAndValidateConfigurationCall[CM]) DoAndReturn(f func(CM) error) *MockModuleDefaultAndValidateConfigurationCall[CM]
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModuleDefaultAndValidateConfigurationCall[CM]) Return ¶
func (c *MockModuleDefaultAndValidateConfigurationCall[CM]) Return(arg0 error) *MockModuleDefaultAndValidateConfigurationCall[CM]
Return rewrite *gomock.Call.Return
type MockModuleMockRecorder ¶
type MockModuleMockRecorder[CM any] struct { // contains filtered or unexported fields }
MockModuleMockRecorder is the mock recorder for MockModule.
func (*MockModuleMockRecorder[CM]) DefaultAndValidateConfiguration ¶
func (mr *MockModuleMockRecorder[CM]) DefaultAndValidateConfiguration(cfg any) *MockModuleDefaultAndValidateConfigurationCall[CM]
DefaultAndValidateConfiguration indicates an expected call of DefaultAndValidateConfiguration.
func (*MockModuleMockRecorder[CM]) Name ¶
func (mr *MockModuleMockRecorder[CM]) Name() *MockModuleNameCall[CM]
Name indicates an expected call of Name.
func (*MockModuleMockRecorder[CM]) Run ¶
func (mr *MockModuleMockRecorder[CM]) Run(ctx, cfg any) *MockModuleRunCall[CM]
Run indicates an expected call of Run.
type MockModuleNameCall ¶
MockModuleNameCall wrap *gomock.Call
func (*MockModuleNameCall[CM]) Do ¶
func (c *MockModuleNameCall[CM]) Do(f func() string) *MockModuleNameCall[CM]
Do rewrite *gomock.Call.Do
func (*MockModuleNameCall[CM]) DoAndReturn ¶
func (c *MockModuleNameCall[CM]) DoAndReturn(f func() string) *MockModuleNameCall[CM]
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModuleNameCall[CM]) Return ¶
func (c *MockModuleNameCall[CM]) Return(arg0 string) *MockModuleNameCall[CM]
Return rewrite *gomock.Call.Return
type MockModuleRunCall ¶
MockModuleRunCall wrap *gomock.Call
func (*MockModuleRunCall[CM]) Do ¶
func (c *MockModuleRunCall[CM]) Do(f func(context.Context, <-chan CM) error) *MockModuleRunCall[CM]
Do rewrite *gomock.Call.Do
func (*MockModuleRunCall[CM]) DoAndReturn ¶
func (c *MockModuleRunCall[CM]) DoAndReturn(f func(context.Context, <-chan CM) error) *MockModuleRunCall[CM]
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockModuleRunCall[CM]) Return ¶
func (c *MockModuleRunCall[CM]) Return(arg0 error) *MockModuleRunCall[CM]
Return rewrite *gomock.Call.Return