Documentation
¶
Index ¶
- type SpamRecordCache
- func (_mock *SpamRecordCache) AdjustWithInit(originId flow.Identifier, adjustFunc model.RecordAdjustFunc) (float64, error)
- func (_m *SpamRecordCache) EXPECT() *SpamRecordCache_Expecter
- func (_mock *SpamRecordCache) Get(originId flow.Identifier) (*model.ProtocolSpamRecord, bool)
- func (_mock *SpamRecordCache) Identities() []flow.Identifier
- func (_mock *SpamRecordCache) Remove(originId flow.Identifier) bool
- func (_mock *SpamRecordCache) Size() uint
- type SpamRecordCache_AdjustWithInit_Call
- func (_c *SpamRecordCache_AdjustWithInit_Call) Return(f float64, err error) *SpamRecordCache_AdjustWithInit_Call
- func (_c *SpamRecordCache_AdjustWithInit_Call) Run(run func(originId flow.Identifier, adjustFunc model.RecordAdjustFunc)) *SpamRecordCache_AdjustWithInit_Call
- func (_c *SpamRecordCache_AdjustWithInit_Call) RunAndReturn(...) *SpamRecordCache_AdjustWithInit_Call
- type SpamRecordCache_Expecter
- func (_e *SpamRecordCache_Expecter) AdjustWithInit(originId interface{}, adjustFunc interface{}) *SpamRecordCache_AdjustWithInit_Call
- func (_e *SpamRecordCache_Expecter) Get(originId interface{}) *SpamRecordCache_Get_Call
- func (_e *SpamRecordCache_Expecter) Identities() *SpamRecordCache_Identities_Call
- func (_e *SpamRecordCache_Expecter) Remove(originId interface{}) *SpamRecordCache_Remove_Call
- func (_e *SpamRecordCache_Expecter) Size() *SpamRecordCache_Size_Call
- type SpamRecordCache_Get_Call
- func (_c *SpamRecordCache_Get_Call) Return(protocolSpamRecord *model.ProtocolSpamRecord, b bool) *SpamRecordCache_Get_Call
- func (_c *SpamRecordCache_Get_Call) Run(run func(originId flow.Identifier)) *SpamRecordCache_Get_Call
- func (_c *SpamRecordCache_Get_Call) RunAndReturn(run func(originId flow.Identifier) (*model.ProtocolSpamRecord, bool)) *SpamRecordCache_Get_Call
- type SpamRecordCache_Identities_Call
- func (_c *SpamRecordCache_Identities_Call) Return(identifiers []flow.Identifier) *SpamRecordCache_Identities_Call
- func (_c *SpamRecordCache_Identities_Call) Run(run func()) *SpamRecordCache_Identities_Call
- func (_c *SpamRecordCache_Identities_Call) RunAndReturn(run func() []flow.Identifier) *SpamRecordCache_Identities_Call
- type SpamRecordCache_Remove_Call
- func (_c *SpamRecordCache_Remove_Call) Return(b bool) *SpamRecordCache_Remove_Call
- func (_c *SpamRecordCache_Remove_Call) Run(run func(originId flow.Identifier)) *SpamRecordCache_Remove_Call
- func (_c *SpamRecordCache_Remove_Call) RunAndReturn(run func(originId flow.Identifier) bool) *SpamRecordCache_Remove_Call
- type SpamRecordCache_Size_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpamRecordCache ¶
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 (_m *SpamRecordCache) EXPECT() *SpamRecordCache_Expecter
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
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 (_c *SpamRecordCache_AdjustWithInit_Call) Return(f float64, err error) *SpamRecordCache_AdjustWithInit_Call
func (*SpamRecordCache_AdjustWithInit_Call) Run ¶ added in v0.46.0
func (_c *SpamRecordCache_AdjustWithInit_Call) Run(run func(originId flow.Identifier, adjustFunc model.RecordAdjustFunc)) *SpamRecordCache_AdjustWithInit_Call
func (*SpamRecordCache_AdjustWithInit_Call) RunAndReturn ¶ added in v0.46.0
func (_c *SpamRecordCache_AdjustWithInit_Call) RunAndReturn(run func(originId flow.Identifier, adjustFunc model.RecordAdjustFunc) (float64, error)) *SpamRecordCache_AdjustWithInit_Call
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
func (_e *SpamRecordCache_Expecter) Identities() *SpamRecordCache_Identities_Call
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
func (_e *SpamRecordCache_Expecter) Size() *SpamRecordCache_Size_Call
Size is a helper method to define mock.On call
type SpamRecordCache_Get_Call ¶ added in v0.46.0
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 (_c *SpamRecordCache_Get_Call) Return(protocolSpamRecord *model.ProtocolSpamRecord, b bool) *SpamRecordCache_Get_Call
func (*SpamRecordCache_Get_Call) Run ¶ added in v0.46.0
func (_c *SpamRecordCache_Get_Call) Run(run func(originId flow.Identifier)) *SpamRecordCache_Get_Call
func (*SpamRecordCache_Get_Call) RunAndReturn ¶ added in v0.46.0
func (_c *SpamRecordCache_Get_Call) RunAndReturn(run func(originId flow.Identifier) (*model.ProtocolSpamRecord, bool)) *SpamRecordCache_Get_Call
type SpamRecordCache_Identities_Call ¶ added in v0.46.0
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 (_c *SpamRecordCache_Identities_Call) Return(identifiers []flow.Identifier) *SpamRecordCache_Identities_Call
func (*SpamRecordCache_Identities_Call) Run ¶ added in v0.46.0
func (_c *SpamRecordCache_Identities_Call) Run(run func()) *SpamRecordCache_Identities_Call
func (*SpamRecordCache_Identities_Call) RunAndReturn ¶ added in v0.46.0
func (_c *SpamRecordCache_Identities_Call) RunAndReturn(run func() []flow.Identifier) *SpamRecordCache_Identities_Call
type SpamRecordCache_Remove_Call ¶ added in v0.46.0
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 (_c *SpamRecordCache_Remove_Call) Return(b bool) *SpamRecordCache_Remove_Call
func (*SpamRecordCache_Remove_Call) Run ¶ added in v0.46.0
func (_c *SpamRecordCache_Remove_Call) Run(run func(originId flow.Identifier)) *SpamRecordCache_Remove_Call
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
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 (_c *SpamRecordCache_Size_Call) Return(v uint) *SpamRecordCache_Size_Call
func (*SpamRecordCache_Size_Call) Run ¶ added in v0.46.0
func (_c *SpamRecordCache_Size_Call) Run(run func()) *SpamRecordCache_Size_Call
func (*SpamRecordCache_Size_Call) RunAndReturn ¶ added in v0.46.0
func (_c *SpamRecordCache_Size_Call) RunAndReturn(run func() uint) *SpamRecordCache_Size_Call