mocks

package
v0.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendMock

type BackendMock struct {
	mock.Mock
}

BackendMock is an autogenerated mock type for the Backend type

func NewBackendMock

func NewBackendMock(t mockConstructorTestingTNewBackendMock) *BackendMock

NewBackendMock creates a new instance of BackendMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BackendMock) EXPECT

func (_m *BackendMock) EXPECT() *BackendMock_Expecter

func (*BackendMock) URL

func (_m *BackendMock) URL() *url.URL

URL provides a mock function with given fields:

type BackendMock_Expecter

type BackendMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*BackendMock_Expecter) URL

URL is a helper method to define mock.On call

type BackendMock_URL_Call

type BackendMock_URL_Call struct {
	*mock.Call
}

BackendMock_URL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'URL'

func (*BackendMock_URL_Call) Return

func (*BackendMock_URL_Call) Run

func (_c *BackendMock_URL_Call) Run(run func()) *BackendMock_URL_Call

func (*BackendMock_URL_Call) RunAndReturn

func (_c *BackendMock_URL_Call) RunAndReturn(run func() *url.URL) *BackendMock_URL_Call

type ExecutorMock

type ExecutorMock struct {
	mock.Mock
}

ExecutorMock is an autogenerated mock type for the Executor type

func NewExecutorMock

func NewExecutorMock(t mockConstructorTestingTNewExecutorMock) *ExecutorMock

NewExecutorMock creates a new instance of ExecutorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ExecutorMock) EXPECT

func (_m *ExecutorMock) EXPECT() *ExecutorMock_Expecter

func (*ExecutorMock) Execute

func (_m *ExecutorMock) Execute(ctx heimdall.Context) (rule.Backend, error)

Execute provides a mock function with given fields: ctx

type ExecutorMock_Execute_Call

type ExecutorMock_Execute_Call struct {
	*mock.Call
}

ExecutorMock_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*ExecutorMock_Execute_Call) Return

func (*ExecutorMock_Execute_Call) Run

func (*ExecutorMock_Execute_Call) RunAndReturn

type ExecutorMock_Expecter

type ExecutorMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*ExecutorMock_Expecter) Execute

func (_e *ExecutorMock_Expecter) Execute(ctx interface{}) *ExecutorMock_Execute_Call

Execute is a helper method to define mock.On call

  • ctx heimdall.Context

type FactoryMock

type FactoryMock struct {
	mock.Mock
}

FactoryMock is an autogenerated mock type for the Factory type

func NewFactoryMock

func NewFactoryMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *FactoryMock

NewFactoryMock creates a new instance of FactoryMock. 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 (*FactoryMock) CreateRule

func (_m *FactoryMock) CreateRule(version string, srcID string, ruleConfig config.Rule) (rule.Rule, error)

CreateRule provides a mock function with given fields: version, srcID, ruleConfig

func (*FactoryMock) DefaultRule

func (_m *FactoryMock) DefaultRule() rule.Rule

DefaultRule provides a mock function with given fields:

func (*FactoryMock) EXPECT

func (_m *FactoryMock) EXPECT() *FactoryMock_Expecter

func (*FactoryMock) HasDefaultRule

func (_m *FactoryMock) HasDefaultRule() bool

HasDefaultRule provides a mock function with given fields:

type FactoryMock_CreateRule_Call

type FactoryMock_CreateRule_Call struct {
	*mock.Call
}

FactoryMock_CreateRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRule'

func (*FactoryMock_CreateRule_Call) Return

func (*FactoryMock_CreateRule_Call) Run

func (_c *FactoryMock_CreateRule_Call) Run(run func(version string, srcID string, ruleConfig config.Rule)) *FactoryMock_CreateRule_Call

func (*FactoryMock_CreateRule_Call) RunAndReturn

type FactoryMock_DefaultRule_Call

type FactoryMock_DefaultRule_Call struct {
	*mock.Call
}

FactoryMock_DefaultRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DefaultRule'

func (*FactoryMock_DefaultRule_Call) Return

func (*FactoryMock_DefaultRule_Call) Run

func (*FactoryMock_DefaultRule_Call) RunAndReturn

type FactoryMock_Expecter

type FactoryMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*FactoryMock_Expecter) CreateRule

func (_e *FactoryMock_Expecter) CreateRule(version interface{}, srcID interface{}, ruleConfig interface{}) *FactoryMock_CreateRule_Call

CreateRule is a helper method to define mock.On call

  • version string
  • srcID string
  • ruleConfig config.Rule

func (*FactoryMock_Expecter) DefaultRule

DefaultRule is a helper method to define mock.On call

func (*FactoryMock_Expecter) HasDefaultRule

HasDefaultRule is a helper method to define mock.On call

type FactoryMock_HasDefaultRule_Call

type FactoryMock_HasDefaultRule_Call struct {
	*mock.Call
}

FactoryMock_HasDefaultRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasDefaultRule'

func (*FactoryMock_HasDefaultRule_Call) Return

func (*FactoryMock_HasDefaultRule_Call) Run

func (*FactoryMock_HasDefaultRule_Call) RunAndReturn

type RepositoryMock

type RepositoryMock struct {
	mock.Mock
}

RepositoryMock is an autogenerated mock type for the Repository type

func NewRepositoryMock

func NewRepositoryMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *RepositoryMock

NewRepositoryMock creates a new instance of RepositoryMock. 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 (*RepositoryMock) AddRuleSet

func (_m *RepositoryMock) AddRuleSet(srcID string, rules []rule.Rule) error

AddRuleSet provides a mock function with given fields: srcID, rules

func (*RepositoryMock) DeleteRuleSet

func (_m *RepositoryMock) DeleteRuleSet(srcID string) error

DeleteRuleSet provides a mock function with given fields: srcID

func (*RepositoryMock) EXPECT

func (*RepositoryMock) FindRule

func (_m *RepositoryMock) FindRule(ctx heimdall.Context) (rule.Rule, error)

FindRule provides a mock function with given fields: ctx

func (*RepositoryMock) UpdateRuleSet

func (_m *RepositoryMock) UpdateRuleSet(srcID string, rules []rule.Rule) error

UpdateRuleSet provides a mock function with given fields: srcID, rules

type RepositoryMock_AddRuleSet_Call

type RepositoryMock_AddRuleSet_Call struct {
	*mock.Call
}

RepositoryMock_AddRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRuleSet'

func (*RepositoryMock_AddRuleSet_Call) Return

func (*RepositoryMock_AddRuleSet_Call) Run

func (*RepositoryMock_AddRuleSet_Call) RunAndReturn

type RepositoryMock_DeleteRuleSet_Call

type RepositoryMock_DeleteRuleSet_Call struct {
	*mock.Call
}

RepositoryMock_DeleteRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRuleSet'

func (*RepositoryMock_DeleteRuleSet_Call) Return

func (*RepositoryMock_DeleteRuleSet_Call) Run

func (*RepositoryMock_DeleteRuleSet_Call) RunAndReturn

type RepositoryMock_Expecter

type RepositoryMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*RepositoryMock_Expecter) AddRuleSet

func (_e *RepositoryMock_Expecter) AddRuleSet(srcID interface{}, rules interface{}) *RepositoryMock_AddRuleSet_Call

AddRuleSet is a helper method to define mock.On call

  • srcID string
  • rules []rule.Rule

func (*RepositoryMock_Expecter) DeleteRuleSet

func (_e *RepositoryMock_Expecter) DeleteRuleSet(srcID interface{}) *RepositoryMock_DeleteRuleSet_Call

DeleteRuleSet is a helper method to define mock.On call

  • srcID string

func (*RepositoryMock_Expecter) FindRule

func (_e *RepositoryMock_Expecter) FindRule(ctx interface{}) *RepositoryMock_FindRule_Call

FindRule is a helper method to define mock.On call

  • ctx heimdall.Context

func (*RepositoryMock_Expecter) UpdateRuleSet

func (_e *RepositoryMock_Expecter) UpdateRuleSet(srcID interface{}, rules interface{}) *RepositoryMock_UpdateRuleSet_Call

UpdateRuleSet is a helper method to define mock.On call

  • srcID string
  • rules []rule.Rule

type RepositoryMock_FindRule_Call

type RepositoryMock_FindRule_Call struct {
	*mock.Call
}

RepositoryMock_FindRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRule'

func (*RepositoryMock_FindRule_Call) Return

func (*RepositoryMock_FindRule_Call) Run

func (*RepositoryMock_FindRule_Call) RunAndReturn

type RepositoryMock_UpdateRuleSet_Call

type RepositoryMock_UpdateRuleSet_Call struct {
	*mock.Call
}

RepositoryMock_UpdateRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRuleSet'

func (*RepositoryMock_UpdateRuleSet_Call) Return

func (*RepositoryMock_UpdateRuleSet_Call) Run

func (*RepositoryMock_UpdateRuleSet_Call) RunAndReturn

type RuleMock

type RuleMock struct {
	mock.Mock
}

RuleMock is an autogenerated mock type for the Rule type

func NewRuleMock

func NewRuleMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *RuleMock

NewRuleMock creates a new instance of RuleMock. 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 (*RuleMock) AllowsBacktracking

func (_m *RuleMock) AllowsBacktracking() bool

AllowsBacktracking provides a mock function with given fields:

func (*RuleMock) EXPECT

func (_m *RuleMock) EXPECT() *RuleMock_Expecter

func (*RuleMock) EqualTo

func (_m *RuleMock) EqualTo(other rule.Rule) bool

EqualTo provides a mock function with given fields: other

func (*RuleMock) Execute

func (_m *RuleMock) Execute(ctx heimdall.Context) (rule.Backend, error)

Execute provides a mock function with given fields: ctx

func (*RuleMock) ID

func (_m *RuleMock) ID() string

ID provides a mock function with given fields:

func (*RuleMock) Routes

func (_m *RuleMock) Routes() []rule.Route

Routes provides a mock function with given fields:

func (*RuleMock) SameAs

func (_m *RuleMock) SameAs(other rule.Rule) bool

SameAs provides a mock function with given fields: other

func (*RuleMock) SrcID

func (_m *RuleMock) SrcID() string

SrcID provides a mock function with given fields:

type RuleMock_AllowsBacktracking_Call

type RuleMock_AllowsBacktracking_Call struct {
	*mock.Call
}

RuleMock_AllowsBacktracking_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllowsBacktracking'

func (*RuleMock_AllowsBacktracking_Call) Return

func (*RuleMock_AllowsBacktracking_Call) Run

func (*RuleMock_AllowsBacktracking_Call) RunAndReturn

type RuleMock_EqualTo_Call

type RuleMock_EqualTo_Call struct {
	*mock.Call
}

RuleMock_EqualTo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EqualTo'

func (*RuleMock_EqualTo_Call) Return

func (*RuleMock_EqualTo_Call) Run

func (_c *RuleMock_EqualTo_Call) Run(run func(other rule.Rule)) *RuleMock_EqualTo_Call

func (*RuleMock_EqualTo_Call) RunAndReturn

func (_c *RuleMock_EqualTo_Call) RunAndReturn(run func(rule.Rule) bool) *RuleMock_EqualTo_Call

type RuleMock_Execute_Call

type RuleMock_Execute_Call struct {
	*mock.Call
}

RuleMock_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*RuleMock_Execute_Call) Return

func (*RuleMock_Execute_Call) Run

func (*RuleMock_Execute_Call) RunAndReturn

type RuleMock_Expecter

type RuleMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*RuleMock_Expecter) AllowsBacktracking

func (_e *RuleMock_Expecter) AllowsBacktracking() *RuleMock_AllowsBacktracking_Call

AllowsBacktracking is a helper method to define mock.On call

func (*RuleMock_Expecter) EqualTo

func (_e *RuleMock_Expecter) EqualTo(other interface{}) *RuleMock_EqualTo_Call

EqualTo is a helper method to define mock.On call

  • other rule.Rule

func (*RuleMock_Expecter) Execute

func (_e *RuleMock_Expecter) Execute(ctx interface{}) *RuleMock_Execute_Call

Execute is a helper method to define mock.On call

  • ctx heimdall.Context

func (*RuleMock_Expecter) ID

ID is a helper method to define mock.On call

func (*RuleMock_Expecter) Routes

Routes is a helper method to define mock.On call

func (*RuleMock_Expecter) SameAs

func (_e *RuleMock_Expecter) SameAs(other interface{}) *RuleMock_SameAs_Call

SameAs is a helper method to define mock.On call

  • other rule.Rule

func (*RuleMock_Expecter) SrcID

SrcID is a helper method to define mock.On call

type RuleMock_ID_Call

type RuleMock_ID_Call struct {
	*mock.Call
}

RuleMock_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID'

func (*RuleMock_ID_Call) Return

func (_c *RuleMock_ID_Call) Return(_a0 string) *RuleMock_ID_Call

func (*RuleMock_ID_Call) Run

func (_c *RuleMock_ID_Call) Run(run func()) *RuleMock_ID_Call

func (*RuleMock_ID_Call) RunAndReturn

func (_c *RuleMock_ID_Call) RunAndReturn(run func() string) *RuleMock_ID_Call

type RuleMock_Routes_Call

type RuleMock_Routes_Call struct {
	*mock.Call
}

RuleMock_Routes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Routes'

func (*RuleMock_Routes_Call) Return

func (*RuleMock_Routes_Call) Run

func (_c *RuleMock_Routes_Call) Run(run func()) *RuleMock_Routes_Call

func (*RuleMock_Routes_Call) RunAndReturn

func (_c *RuleMock_Routes_Call) RunAndReturn(run func() []rule.Route) *RuleMock_Routes_Call

type RuleMock_SameAs_Call

type RuleMock_SameAs_Call struct {
	*mock.Call
}

RuleMock_SameAs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SameAs'

func (*RuleMock_SameAs_Call) Return

func (*RuleMock_SameAs_Call) Run

func (_c *RuleMock_SameAs_Call) Run(run func(other rule.Rule)) *RuleMock_SameAs_Call

func (*RuleMock_SameAs_Call) RunAndReturn

func (_c *RuleMock_SameAs_Call) RunAndReturn(run func(rule.Rule) bool) *RuleMock_SameAs_Call

type RuleMock_SrcID_Call

type RuleMock_SrcID_Call struct {
	*mock.Call
}

RuleMock_SrcID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SrcID'

func (*RuleMock_SrcID_Call) Return

func (*RuleMock_SrcID_Call) Run

func (_c *RuleMock_SrcID_Call) Run(run func()) *RuleMock_SrcID_Call

func (*RuleMock_SrcID_Call) RunAndReturn

func (_c *RuleMock_SrcID_Call) RunAndReturn(run func() string) *RuleMock_SrcID_Call

type RuleSetProcessorMock

type RuleSetProcessorMock struct {
	mock.Mock
}

RuleSetProcessorMock is an autogenerated mock type for the SetProcessor type

func NewRuleSetProcessorMock

func NewRuleSetProcessorMock(t mockConstructorTestingTNewRuleSetProcessorMock) *RuleSetProcessorMock

NewRuleSetProcessorMock creates a new instance of RuleSetProcessorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RuleSetProcessorMock) EXPECT

func (*RuleSetProcessorMock) OnCreated

func (_m *RuleSetProcessorMock) OnCreated(ruleSet *config.RuleSet) error

OnCreated provides a mock function with given fields: ruleSet

func (*RuleSetProcessorMock) OnDeleted

func (_m *RuleSetProcessorMock) OnDeleted(ruleSet *config.RuleSet) error

OnDeleted provides a mock function with given fields: ruleSet

func (*RuleSetProcessorMock) OnUpdated

func (_m *RuleSetProcessorMock) OnUpdated(ruleSet *config.RuleSet) error

OnUpdated provides a mock function with given fields: ruleSet

type RuleSetProcessorMock_Expecter

type RuleSetProcessorMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*RuleSetProcessorMock_Expecter) OnCreated

func (_e *RuleSetProcessorMock_Expecter) OnCreated(ruleSet interface{}) *RuleSetProcessorMock_OnCreated_Call

OnCreated is a helper method to define mock.On call

  • ruleSet *config.RuleSet

func (*RuleSetProcessorMock_Expecter) OnDeleted

func (_e *RuleSetProcessorMock_Expecter) OnDeleted(ruleSet interface{}) *RuleSetProcessorMock_OnDeleted_Call

OnDeleted is a helper method to define mock.On call

  • ruleSet *config.RuleSet

func (*RuleSetProcessorMock_Expecter) OnUpdated

func (_e *RuleSetProcessorMock_Expecter) OnUpdated(ruleSet interface{}) *RuleSetProcessorMock_OnUpdated_Call

OnUpdated is a helper method to define mock.On call

  • ruleSet *config.RuleSet

type RuleSetProcessorMock_OnCreated_Call

type RuleSetProcessorMock_OnCreated_Call struct {
	*mock.Call
}

RuleSetProcessorMock_OnCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnCreated'

func (*RuleSetProcessorMock_OnCreated_Call) Return

func (*RuleSetProcessorMock_OnCreated_Call) Run

func (*RuleSetProcessorMock_OnCreated_Call) RunAndReturn

type RuleSetProcessorMock_OnDeleted_Call

type RuleSetProcessorMock_OnDeleted_Call struct {
	*mock.Call
}

RuleSetProcessorMock_OnDeleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDeleted'

func (*RuleSetProcessorMock_OnDeleted_Call) Return

func (*RuleSetProcessorMock_OnDeleted_Call) Run

func (*RuleSetProcessorMock_OnDeleted_Call) RunAndReturn

type RuleSetProcessorMock_OnUpdated_Call

type RuleSetProcessorMock_OnUpdated_Call struct {
	*mock.Call
}

RuleSetProcessorMock_OnUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnUpdated'

func (*RuleSetProcessorMock_OnUpdated_Call) Return

func (*RuleSetProcessorMock_OnUpdated_Call) Run

func (*RuleSetProcessorMock_OnUpdated_Call) RunAndReturn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL