Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockBackend ¶
MockBackend is an autogenerated mock type for the Backend type
func NewMockBackend ¶
func NewMockBackend[K z.Key, V interface{}](t interface { mock.TestingT Cleanup(func()) }) *MockBackend[K, V]
NewMockBackend creates a new instance of MockBackend. 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 (*MockBackend[K, V]) EXPECT ¶
func (_m *MockBackend[K, V]) EXPECT() *MockBackend_Expecter[K, V]
func (*MockBackend[K, V]) Get ¶
func (_m *MockBackend[K, V]) Get(key K) (V, bool)
Get provides a mock function with given fields: key
func (*MockBackend[K, V]) Set ¶
func (_m *MockBackend[K, V]) Set(key K, value V) bool
Set provides a mock function with given fields: key, value
type MockBackend_Expecter ¶
type MockBackend_Expecter[K z.Key, V interface{}] struct { // contains filtered or unexported fields }
func (*MockBackend_Expecter[K, V]) Get ¶
func (_e *MockBackend_Expecter[K, V]) Get(key interface{}) *MockBackend_Get_Call[K, V]
Get is a helper method to define mock.On call
- key K
func (*MockBackend_Expecter[K, V]) Set ¶
func (_e *MockBackend_Expecter[K, V]) Set(key interface{}, value interface{}) *MockBackend_Set_Call[K, V]
Set is a helper method to define mock.On call
- key K
- value V
type MockBackend_Get_Call ¶
MockBackend_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*MockBackend_Get_Call[K, V]) Return ¶
func (_c *MockBackend_Get_Call[K, V]) Return(_a0 V, _a1 bool) *MockBackend_Get_Call[K, V]
func (*MockBackend_Get_Call[K, V]) Run ¶
func (_c *MockBackend_Get_Call[K, V]) Run(run func(key K)) *MockBackend_Get_Call[K, V]
func (*MockBackend_Get_Call[K, V]) RunAndReturn ¶
func (_c *MockBackend_Get_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *MockBackend_Get_Call[K, V]
type MockBackend_Set_Call ¶
MockBackend_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
func (*MockBackend_Set_Call[K, V]) Return ¶
func (_c *MockBackend_Set_Call[K, V]) Return(_a0 bool) *MockBackend_Set_Call[K, V]
func (*MockBackend_Set_Call[K, V]) Run ¶
func (_c *MockBackend_Set_Call[K, V]) Run(run func(key K, value V)) *MockBackend_Set_Call[K, V]
func (*MockBackend_Set_Call[K, V]) RunAndReturn ¶
func (_c *MockBackend_Set_Call[K, V]) RunAndReturn(run func(K, V) bool) *MockBackend_Set_Call[K, V]