Documentation ¶
Index ¶
- type Cache
- func (_m *Cache[T]) Contains(key string) bool
- func (_m *Cache[T]) Delete(key string) bool
- func (_m *Cache[T]) EXPECT() *Cache_Expecter[T]
- func (_m *Cache[T]) Expire(key string) bool
- func (_m *Cache[T]) Get(key string) (T, bool)
- func (_m *Cache[T]) Mutate(key string, mutate func(*T) T) T
- func (_m *Cache[T]) MutateX(key string, mutate func(*T) T, ttl time.Duration) T
- func (_m *Cache[T]) Provide(key string, provider func() T) T
- func (_m *Cache[T]) ProvideWithError(key string, provider func() (T, error)) (T, error)
- func (_m *Cache[T]) Set(key string, value T)
- func (_m *Cache[T]) SetX(key string, value T, ttl time.Duration)
- type Cache_Contains_Call
- type Cache_Delete_Call
- type Cache_Expecter
- func (_e *Cache_Expecter[T]) Contains(key interface{}) *Cache_Contains_Call[T]
- func (_e *Cache_Expecter[T]) Delete(key interface{}) *Cache_Delete_Call[T]
- func (_e *Cache_Expecter[T]) Expire(key interface{}) *Cache_Expire_Call[T]
- func (_e *Cache_Expecter[T]) Get(key interface{}) *Cache_Get_Call[T]
- func (_e *Cache_Expecter[T]) Mutate(key interface{}, mutate interface{}) *Cache_Mutate_Call[T]
- func (_e *Cache_Expecter[T]) MutateX(key interface{}, mutate interface{}, ttl interface{}) *Cache_MutateX_Call[T]
- func (_e *Cache_Expecter[T]) Provide(key interface{}, provider interface{}) *Cache_Provide_Call[T]
- func (_e *Cache_Expecter[T]) ProvideWithError(key interface{}, provider interface{}) *Cache_ProvideWithError_Call[T]
- func (_e *Cache_Expecter[T]) Set(key interface{}, value interface{}) *Cache_Set_Call[T]
- func (_e *Cache_Expecter[T]) SetX(key interface{}, value interface{}, ttl interface{}) *Cache_SetX_Call[T]
- type Cache_Expire_Call
- type Cache_Get_Call
- type Cache_MutateX_Call
- func (_c *Cache_MutateX_Call[T]) Return(_a0 T) *Cache_MutateX_Call[T]
- func (_c *Cache_MutateX_Call[T]) Run(run func(key string, mutate func(*T) T, ttl time.Duration)) *Cache_MutateX_Call[T]
- func (_c *Cache_MutateX_Call[T]) RunAndReturn(run func(string, func(*T) T, time.Duration) T) *Cache_MutateX_Call[T]
- type Cache_Mutate_Call
- type Cache_ProvideWithError_Call
- func (_c *Cache_ProvideWithError_Call[T]) Return(_a0 T, _a1 error) *Cache_ProvideWithError_Call[T]
- func (_c *Cache_ProvideWithError_Call[T]) Run(run func(key string, provider func() (T, error))) *Cache_ProvideWithError_Call[T]
- func (_c *Cache_ProvideWithError_Call[T]) RunAndReturn(run func(string, func() (T, error)) (T, error)) *Cache_ProvideWithError_Call[T]
- type Cache_Provide_Call
- type Cache_SetX_Call
- type Cache_Set_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache is an autogenerated mock type for the Cache type
func NewCache ¶
NewCache creates a new instance of Cache. 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 (*Cache[T]) EXPECT ¶
func (_m *Cache[T]) EXPECT() *Cache_Expecter[T]
func (*Cache[T]) Mutate ¶ added in v0.26.2
Mutate provides a mock function with given fields: key, mutate
func (*Cache[T]) MutateX ¶ added in v0.26.2
MutateX provides a mock function with given fields: key, mutate, ttl
func (*Cache[T]) ProvideWithError ¶
ProvideWithError provides a mock function with given fields: key, provider
type Cache_Contains_Call ¶
Cache_Contains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Contains'
func (*Cache_Contains_Call[T]) Return ¶
func (_c *Cache_Contains_Call[T]) Return(_a0 bool) *Cache_Contains_Call[T]
func (*Cache_Contains_Call[T]) Run ¶
func (_c *Cache_Contains_Call[T]) Run(run func(key string)) *Cache_Contains_Call[T]
func (*Cache_Contains_Call[T]) RunAndReturn ¶
func (_c *Cache_Contains_Call[T]) RunAndReturn(run func(string) bool) *Cache_Contains_Call[T]
type Cache_Delete_Call ¶ added in v0.26.4
Cache_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*Cache_Delete_Call[T]) Return ¶ added in v0.26.4
func (_c *Cache_Delete_Call[T]) Return(_a0 bool) *Cache_Delete_Call[T]
func (*Cache_Delete_Call[T]) Run ¶ added in v0.26.4
func (_c *Cache_Delete_Call[T]) Run(run func(key string)) *Cache_Delete_Call[T]
func (*Cache_Delete_Call[T]) RunAndReturn ¶ added in v0.26.4
func (_c *Cache_Delete_Call[T]) RunAndReturn(run func(string) bool) *Cache_Delete_Call[T]
type Cache_Expecter ¶
type Cache_Expecter[T interface{}] struct {
// contains filtered or unexported fields
}
func (*Cache_Expecter[T]) Contains ¶
func (_e *Cache_Expecter[T]) Contains(key interface{}) *Cache_Contains_Call[T]
Contains is a helper method to define mock.On call
- key string
func (*Cache_Expecter[T]) Delete ¶ added in v0.26.4
func (_e *Cache_Expecter[T]) Delete(key interface{}) *Cache_Delete_Call[T]
Delete is a helper method to define mock.On call
- key string
func (*Cache_Expecter[T]) Expire ¶
func (_e *Cache_Expecter[T]) Expire(key interface{}) *Cache_Expire_Call[T]
Expire is a helper method to define mock.On call
- key string
func (*Cache_Expecter[T]) Get ¶
func (_e *Cache_Expecter[T]) Get(key interface{}) *Cache_Get_Call[T]
Get is a helper method to define mock.On call
- key string
func (*Cache_Expecter[T]) Mutate ¶ added in v0.26.2
func (_e *Cache_Expecter[T]) Mutate(key interface{}, mutate interface{}) *Cache_Mutate_Call[T]
Mutate is a helper method to define mock.On call
- key string
- mutate func(*T) T
func (*Cache_Expecter[T]) MutateX ¶ added in v0.26.2
func (_e *Cache_Expecter[T]) MutateX(key interface{}, mutate interface{}, ttl interface{}) *Cache_MutateX_Call[T]
MutateX is a helper method to define mock.On call
- key string
- mutate func(*T) T
- ttl time.Duration
func (*Cache_Expecter[T]) Provide ¶
func (_e *Cache_Expecter[T]) Provide(key interface{}, provider interface{}) *Cache_Provide_Call[T]
Provide is a helper method to define mock.On call
- key string
- provider func() T
func (*Cache_Expecter[T]) ProvideWithError ¶
func (_e *Cache_Expecter[T]) ProvideWithError(key interface{}, provider interface{}) *Cache_ProvideWithError_Call[T]
ProvideWithError is a helper method to define mock.On call
- key string
- provider func()(T , error)
func (*Cache_Expecter[T]) Set ¶
func (_e *Cache_Expecter[T]) Set(key interface{}, value interface{}) *Cache_Set_Call[T]
Set is a helper method to define mock.On call
- key string
- value T
func (*Cache_Expecter[T]) SetX ¶
func (_e *Cache_Expecter[T]) SetX(key interface{}, value interface{}, ttl interface{}) *Cache_SetX_Call[T]
SetX is a helper method to define mock.On call
- key string
- value T
- ttl time.Duration
type Cache_Expire_Call ¶
Cache_Expire_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Expire'
func (*Cache_Expire_Call[T]) Return ¶
func (_c *Cache_Expire_Call[T]) Return(_a0 bool) *Cache_Expire_Call[T]
func (*Cache_Expire_Call[T]) Run ¶
func (_c *Cache_Expire_Call[T]) Run(run func(key string)) *Cache_Expire_Call[T]
func (*Cache_Expire_Call[T]) RunAndReturn ¶
func (_c *Cache_Expire_Call[T]) RunAndReturn(run func(string) bool) *Cache_Expire_Call[T]
type Cache_Get_Call ¶
Cache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*Cache_Get_Call[T]) Return ¶
func (_c *Cache_Get_Call[T]) Return(_a0 T, _a1 bool) *Cache_Get_Call[T]
func (*Cache_Get_Call[T]) Run ¶
func (_c *Cache_Get_Call[T]) Run(run func(key string)) *Cache_Get_Call[T]
func (*Cache_Get_Call[T]) RunAndReturn ¶
func (_c *Cache_Get_Call[T]) RunAndReturn(run func(string) (T, bool)) *Cache_Get_Call[T]
type Cache_MutateX_Call ¶ added in v0.26.2
Cache_MutateX_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MutateX'
func (*Cache_MutateX_Call[T]) Return ¶ added in v0.26.2
func (_c *Cache_MutateX_Call[T]) Return(_a0 T) *Cache_MutateX_Call[T]
func (*Cache_MutateX_Call[T]) Run ¶ added in v0.26.2
func (_c *Cache_MutateX_Call[T]) Run(run func(key string, mutate func(*T) T, ttl time.Duration)) *Cache_MutateX_Call[T]
func (*Cache_MutateX_Call[T]) RunAndReturn ¶ added in v0.26.2
func (_c *Cache_MutateX_Call[T]) RunAndReturn(run func(string, func(*T) T, time.Duration) T) *Cache_MutateX_Call[T]
type Cache_Mutate_Call ¶ added in v0.26.2
Cache_Mutate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mutate'
func (*Cache_Mutate_Call[T]) Return ¶ added in v0.26.2
func (_c *Cache_Mutate_Call[T]) Return(_a0 T) *Cache_Mutate_Call[T]
func (*Cache_Mutate_Call[T]) Run ¶ added in v0.26.2
func (_c *Cache_Mutate_Call[T]) Run(run func(key string, mutate func(*T) T)) *Cache_Mutate_Call[T]
func (*Cache_Mutate_Call[T]) RunAndReturn ¶ added in v0.26.2
func (_c *Cache_Mutate_Call[T]) RunAndReturn(run func(string, func(*T) T) T) *Cache_Mutate_Call[T]
type Cache_ProvideWithError_Call ¶
Cache_ProvideWithError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProvideWithError'
func (*Cache_ProvideWithError_Call[T]) Return ¶
func (_c *Cache_ProvideWithError_Call[T]) Return(_a0 T, _a1 error) *Cache_ProvideWithError_Call[T]
func (*Cache_ProvideWithError_Call[T]) Run ¶
func (_c *Cache_ProvideWithError_Call[T]) Run(run func(key string, provider func() (T, error))) *Cache_ProvideWithError_Call[T]
func (*Cache_ProvideWithError_Call[T]) RunAndReturn ¶
func (_c *Cache_ProvideWithError_Call[T]) RunAndReturn(run func(string, func() (T, error)) (T, error)) *Cache_ProvideWithError_Call[T]
type Cache_Provide_Call ¶
Cache_Provide_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Provide'
func (*Cache_Provide_Call[T]) Return ¶
func (_c *Cache_Provide_Call[T]) Return(_a0 T) *Cache_Provide_Call[T]
func (*Cache_Provide_Call[T]) Run ¶
func (_c *Cache_Provide_Call[T]) Run(run func(key string, provider func() T)) *Cache_Provide_Call[T]
func (*Cache_Provide_Call[T]) RunAndReturn ¶
func (_c *Cache_Provide_Call[T]) RunAndReturn(run func(string, func() T) T) *Cache_Provide_Call[T]
type Cache_SetX_Call ¶
Cache_SetX_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetX'
func (*Cache_SetX_Call[T]) Return ¶
func (_c *Cache_SetX_Call[T]) Return() *Cache_SetX_Call[T]
func (*Cache_SetX_Call[T]) Run ¶
func (_c *Cache_SetX_Call[T]) Run(run func(key string, value T, ttl time.Duration)) *Cache_SetX_Call[T]
func (*Cache_SetX_Call[T]) RunAndReturn ¶
func (_c *Cache_SetX_Call[T]) RunAndReturn(run func(string, T, time.Duration)) *Cache_SetX_Call[T]
type Cache_Set_Call ¶
Cache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
func (*Cache_Set_Call[T]) Return ¶
func (_c *Cache_Set_Call[T]) Return() *Cache_Set_Call[T]
func (*Cache_Set_Call[T]) Run ¶
func (_c *Cache_Set_Call[T]) Run(run func(key string, value T)) *Cache_Set_Call[T]
func (*Cache_Set_Call[T]) RunAndReturn ¶
func (_c *Cache_Set_Call[T]) RunAndReturn(run func(string, T)) *Cache_Set_Call[T]