Documentation ¶
Index ¶
- type Store
- func (_m *Store[K, V]) All() []V
- func (_m *Store[K, V]) Delete(key K)
- 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])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store[K comparable, V interface{}] struct { mock.Mock }
Store is an autogenerated mock type for the Store type
func NewStore ¶
func NewStore[K comparable, V interface{}](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 given 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]) 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
Click to show internal directories.
Click to hide internal directories.