Documentation
¶
Index ¶
- type Store
- func (_m *Store[K, V]) All() []V
- func (_m *Store[K, V]) Delete(key K)
- func (_m *Store[K, V]) EXPECT() *Store_Expecter[K, V]
- func (_m *Store[K, V]) Get(key K) (V, bool)
- func (_m *Store[K, V]) GetAndDelete(key K) (V, bool)
- func (_m *Store[K, V]) IsZero() bool
- func (_m *Store[K, V]) Len() int
- func (_m *Store[K, V]) Put(key K, data V)
- func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V
- func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V])
- type Store_All_Call
- type Store_Delete_Call
- type Store_Expecter
- func (_e *Store_Expecter[K, V]) All() *Store_All_Call[K, V]
- func (_e *Store_Expecter[K, V]) Delete(key interface{}) *Store_Delete_Call[K, V]
- func (_e *Store_Expecter[K, V]) Get(key interface{}) *Store_Get_Call[K, V]
- func (_e *Store_Expecter[K, V]) GetAndDelete(key interface{}) *Store_GetAndDelete_Call[K, V]
- func (_e *Store_Expecter[K, V]) IsZero() *Store_IsZero_Call[K, V]
- func (_e *Store_Expecter[K, V]) Len() *Store_Len_Call[K, V]
- func (_e *Store_Expecter[K, V]) Put(key interface{}, data interface{}) *Store_Put_Call[K, V]
- func (_e *Store_Expecter[K, V]) Query(spec interface{}, limit interface{}) *Store_Query_Call[K, V]
- func (_e *Store_Expecter[K, V]) Update(key interface{}, updates ...interface{}) *Store_Update_Call[K, V]
- type Store_GetAndDelete_Call
- type Store_Get_Call
- type Store_IsZero_Call
- type Store_Len_Call
- type Store_Put_Call
- type Store_Query_Call
- type Store_Update_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store[K comparable, V any] struct { mock.Mock }
Store is an autogenerated mock type for the Store type
func NewStore ¶
func NewStore[K comparable, V any](t interface { mock.TestingT Cleanup(func()) }) *Store[K, V]
NewStore creates a new instance of Store. 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 (*Store[K, V]) All ¶
func (_m *Store[K, V]) All() []V
All provides a mock function with no fields
func (*Store[K, V]) Delete ¶
func (_m *Store[K, V]) Delete(key K)
Delete provides a mock function with given fields: key
func (*Store[K, V]) EXPECT ¶ added in v1.4.0
func (_m *Store[K, V]) EXPECT() *Store_Expecter[K, V]
func (*Store[K, V]) GetAndDelete ¶
GetAndDelete provides a mock function with given fields: key
func (*Store[K, V]) Put ¶
func (_m *Store[K, V]) Put(key K, data V)
Put provides a mock function with given fields: key, data
func (*Store[K, V]) Update ¶
func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V])
Update provides a mock function with given fields: key, updates
type Store_All_Call ¶ added in v1.4.0
type Store_All_Call[K comparable, V any] struct { *mock.Call }
Store_All_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'All'
func (*Store_All_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_All_Call[K, V]) Return(_a0 []V) *Store_All_Call[K, V]
func (*Store_All_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_All_Call[K, V]) Run(run func()) *Store_All_Call[K, V]
func (*Store_All_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_All_Call[K, V]) RunAndReturn(run func() []V) *Store_All_Call[K, V]
type Store_Delete_Call ¶ added in v1.4.0
type Store_Delete_Call[K comparable, V any] struct { *mock.Call }
Store_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*Store_Delete_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_Delete_Call[K, V]) Return() *Store_Delete_Call[K, V]
func (*Store_Delete_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_Delete_Call[K, V]) Run(run func(key K)) *Store_Delete_Call[K, V]
func (*Store_Delete_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_Delete_Call[K, V]) RunAndReturn(run func(K)) *Store_Delete_Call[K, V]
type Store_Expecter ¶ added in v1.4.0
type Store_Expecter[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Store_Expecter[K, V]) All ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) All() *Store_All_Call[K, V]
All is a helper method to define mock.On call
func (*Store_Expecter[K, V]) Delete ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) Delete(key interface{}) *Store_Delete_Call[K, V]
Delete is a helper method to define mock.On call
- key K
func (*Store_Expecter[K, V]) Get ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) Get(key interface{}) *Store_Get_Call[K, V]
Get is a helper method to define mock.On call
- key K
func (*Store_Expecter[K, V]) GetAndDelete ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) GetAndDelete(key interface{}) *Store_GetAndDelete_Call[K, V]
GetAndDelete is a helper method to define mock.On call
- key K
func (*Store_Expecter[K, V]) IsZero ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) IsZero() *Store_IsZero_Call[K, V]
IsZero is a helper method to define mock.On call
func (*Store_Expecter[K, V]) Len ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) Len() *Store_Len_Call[K, V]
Len is a helper method to define mock.On call
func (*Store_Expecter[K, V]) Put ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) Put(key interface{}, data interface{}) *Store_Put_Call[K, V]
Put is a helper method to define mock.On call
- key K
- data V
func (*Store_Expecter[K, V]) Query ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) Query(spec interface{}, limit interface{}) *Store_Query_Call[K, V]
Query is a helper method to define mock.On call
- spec store.QueryFunc[K,V]
- limit int
func (*Store_Expecter[K, V]) Update ¶ added in v1.4.0
func (_e *Store_Expecter[K, V]) Update(key interface{}, updates ...interface{}) *Store_Update_Call[K, V]
Update is a helper method to define mock.On call
- key K
- updates ...store.UpdateFunc[K,V]
type Store_GetAndDelete_Call ¶ added in v1.4.0
type Store_GetAndDelete_Call[K comparable, V any] struct { *mock.Call }
Store_GetAndDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAndDelete'
func (*Store_GetAndDelete_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_GetAndDelete_Call[K, V]) Return(_a0 V, _a1 bool) *Store_GetAndDelete_Call[K, V]
func (*Store_GetAndDelete_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_GetAndDelete_Call[K, V]) Run(run func(key K)) *Store_GetAndDelete_Call[K, V]
func (*Store_GetAndDelete_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_GetAndDelete_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *Store_GetAndDelete_Call[K, V]
type Store_Get_Call ¶ added in v1.4.0
type Store_Get_Call[K comparable, V any] struct { *mock.Call }
Store_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*Store_Get_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_Get_Call[K, V]) Return(_a0 V, _a1 bool) *Store_Get_Call[K, V]
func (*Store_Get_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_Get_Call[K, V]) Run(run func(key K)) *Store_Get_Call[K, V]
func (*Store_Get_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_Get_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *Store_Get_Call[K, V]
type Store_IsZero_Call ¶ added in v1.4.0
type Store_IsZero_Call[K comparable, V any] struct { *mock.Call }
Store_IsZero_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsZero'
func (*Store_IsZero_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_IsZero_Call[K, V]) Return(_a0 bool) *Store_IsZero_Call[K, V]
func (*Store_IsZero_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_IsZero_Call[K, V]) Run(run func()) *Store_IsZero_Call[K, V]
func (*Store_IsZero_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_IsZero_Call[K, V]) RunAndReturn(run func() bool) *Store_IsZero_Call[K, V]
type Store_Len_Call ¶ added in v1.4.0
type Store_Len_Call[K comparable, V any] struct { *mock.Call }
Store_Len_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Len'
func (*Store_Len_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_Len_Call[K, V]) Return(_a0 int) *Store_Len_Call[K, V]
func (*Store_Len_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_Len_Call[K, V]) Run(run func()) *Store_Len_Call[K, V]
func (*Store_Len_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_Len_Call[K, V]) RunAndReturn(run func() int) *Store_Len_Call[K, V]
type Store_Put_Call ¶ added in v1.4.0
type Store_Put_Call[K comparable, V any] struct { *mock.Call }
Store_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'
func (*Store_Put_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_Put_Call[K, V]) Return() *Store_Put_Call[K, V]
func (*Store_Put_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_Put_Call[K, V]) Run(run func(key K, data V)) *Store_Put_Call[K, V]
func (*Store_Put_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_Put_Call[K, V]) RunAndReturn(run func(K, V)) *Store_Put_Call[K, V]
type Store_Query_Call ¶ added in v1.4.0
type Store_Query_Call[K comparable, V any] struct { *mock.Call }
Store_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*Store_Query_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_Query_Call[K, V]) Return(_a0 []V) *Store_Query_Call[K, V]
func (*Store_Query_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_Query_Call[K, V]) Run(run func(spec store.QueryFunc[K, V], limit int)) *Store_Query_Call[K, V]
func (*Store_Query_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_Query_Call[K, V]) RunAndReturn(run func(store.QueryFunc[K, V], int) []V) *Store_Query_Call[K, V]
type Store_Update_Call ¶ added in v1.4.0
type Store_Update_Call[K comparable, V any] struct { *mock.Call }
Store_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
func (*Store_Update_Call[K, V]) Return ¶ added in v1.4.0
func (_c *Store_Update_Call[K, V]) Return() *Store_Update_Call[K, V]
func (*Store_Update_Call[K, V]) Run ¶ added in v1.4.0
func (_c *Store_Update_Call[K, V]) Run(run func(key K, updates ...store.UpdateFunc[K, V])) *Store_Update_Call[K, V]
func (*Store_Update_Call[K, V]) RunAndReturn ¶ added in v1.4.0
func (_c *Store_Update_Call[K, V]) RunAndReturn(run func(K, ...store.UpdateFunc[K, V])) *Store_Update_Call[K, V]