mock

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpamRecordCache

type SpamRecordCache struct {
	mock.Mock
}

SpamRecordCache is an autogenerated mock type for the SpamRecordCache type

func NewSpamRecordCache

func NewSpamRecordCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *SpamRecordCache

NewSpamRecordCache creates a new instance of SpamRecordCache. 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 (*SpamRecordCache) AdjustWithInit added in v0.33.1

func (_mock *SpamRecordCache) AdjustWithInit(originId flow.Identifier, adjustFunc model.RecordAdjustFunc) (float64, error)

AdjustWithInit provides a mock function for the type SpamRecordCache

func (*SpamRecordCache) EXPECT added in v0.46.0

func (*SpamRecordCache) Get

func (_mock *SpamRecordCache) Get(originId flow.Identifier) (*model.ProtocolSpamRecord, bool)

Get provides a mock function for the type SpamRecordCache

func (*SpamRecordCache) Identities

func (_mock *SpamRecordCache) Identities() []flow.Identifier

Identities provides a mock function for the type SpamRecordCache

func (*SpamRecordCache) Remove

func (_mock *SpamRecordCache) Remove(originId flow.Identifier) bool

Remove provides a mock function for the type SpamRecordCache

func (*SpamRecordCache) Size

func (_mock *SpamRecordCache) Size() uint

Size provides a mock function for the type SpamRecordCache

type SpamRecordCache_AdjustWithInit_Call added in v0.46.0

type SpamRecordCache_AdjustWithInit_Call struct {
	*mock.Call
}

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

func (*SpamRecordCache_AdjustWithInit_Call) Return added in v0.46.0

func (*SpamRecordCache_AdjustWithInit_Call) Run added in v0.46.0

func (*SpamRecordCache_AdjustWithInit_Call) RunAndReturn added in v0.46.0

type SpamRecordCache_Expecter added in v0.46.0

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

func (*SpamRecordCache_Expecter) AdjustWithInit added in v0.46.0

func (_e *SpamRecordCache_Expecter) AdjustWithInit(originId interface{}, adjustFunc interface{}) *SpamRecordCache_AdjustWithInit_Call

AdjustWithInit is a helper method to define mock.On call

  • originId flow.Identifier
  • adjustFunc model.RecordAdjustFunc

func (*SpamRecordCache_Expecter) Get added in v0.46.0

func (_e *SpamRecordCache_Expecter) Get(originId interface{}) *SpamRecordCache_Get_Call

Get is a helper method to define mock.On call

  • originId flow.Identifier

func (*SpamRecordCache_Expecter) Identities added in v0.46.0

Identities is a helper method to define mock.On call

func (*SpamRecordCache_Expecter) Remove added in v0.46.0

func (_e *SpamRecordCache_Expecter) Remove(originId interface{}) *SpamRecordCache_Remove_Call

Remove is a helper method to define mock.On call

  • originId flow.Identifier

func (*SpamRecordCache_Expecter) Size added in v0.46.0

Size is a helper method to define mock.On call

type SpamRecordCache_Get_Call added in v0.46.0

type SpamRecordCache_Get_Call struct {
	*mock.Call
}

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

func (*SpamRecordCache_Get_Call) Return added in v0.46.0

func (*SpamRecordCache_Get_Call) Run added in v0.46.0

func (*SpamRecordCache_Get_Call) RunAndReturn added in v0.46.0

type SpamRecordCache_Identities_Call added in v0.46.0

type SpamRecordCache_Identities_Call struct {
	*mock.Call
}

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

func (*SpamRecordCache_Identities_Call) Return added in v0.46.0

func (*SpamRecordCache_Identities_Call) Run added in v0.46.0

func (*SpamRecordCache_Identities_Call) RunAndReturn added in v0.46.0

type SpamRecordCache_Remove_Call added in v0.46.0

type SpamRecordCache_Remove_Call struct {
	*mock.Call
}

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

func (*SpamRecordCache_Remove_Call) Return added in v0.46.0

func (*SpamRecordCache_Remove_Call) Run added in v0.46.0

func (*SpamRecordCache_Remove_Call) RunAndReturn added in v0.46.0

func (_c *SpamRecordCache_Remove_Call) RunAndReturn(run func(originId flow.Identifier) bool) *SpamRecordCache_Remove_Call

type SpamRecordCache_Size_Call added in v0.46.0

type SpamRecordCache_Size_Call struct {
	*mock.Call
}

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

func (*SpamRecordCache_Size_Call) Return added in v0.46.0

func (*SpamRecordCache_Size_Call) Run added in v0.46.0

func (*SpamRecordCache_Size_Call) RunAndReturn added in v0.46.0

func (_c *SpamRecordCache_Size_Call) RunAndReturn(run func() uint) *SpamRecordCache_Size_Call

Jump to

Keyboard shortcuts

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