Documentation ¶
Index ¶
- type MockLocalCache
- type MockLocalCache_Del_Call
- type MockLocalCache_Expecter
- type MockLocalCache_Get_Call
- type MockLocalCache_Set_Call
- type MockRedisCache
- func (_m *MockRedisCache) Del(ctx context.Context, keys []string) error
- func (_m *MockRedisCache) EXPECT() *MockRedisCache_Expecter
- func (_m *MockRedisCache) Expire(ctx context.Context, key string, ttl time.Duration) (bool, error)
- func (_m *MockRedisCache) Get(ctx context.Context, maxItems int, keyIter func(int) string) (func() ([]byte, bool), error)
- func (_m *MockRedisCache) Listen(ctx context.Context, key string, ready ...func() error) (string, error)
- func (_m *MockRedisCache) LockGet(ctx context.Context, keySet string, value string, ttl time.Duration, ...) (bool, []byte, error)
- func (_m *MockRedisCache) Set(ctx context.Context, maxItems int, ...) error
- func (_m *MockRedisCache) Unlock(ctx context.Context, key string, value string) (bool, error)
- type MockRedisCache_Del_Call
- func (_c *MockRedisCache_Del_Call) Return(_a0 error) *MockRedisCache_Del_Call
- func (_c *MockRedisCache_Del_Call) Run(run func(ctx context.Context, keys []string)) *MockRedisCache_Del_Call
- func (_c *MockRedisCache_Del_Call) RunAndReturn(run func(context.Context, []string) error) *MockRedisCache_Del_Call
- type MockRedisCache_Expecter
- func (_e *MockRedisCache_Expecter) Del(ctx interface{}, keys interface{}) *MockRedisCache_Del_Call
- func (_e *MockRedisCache_Expecter) Expire(ctx interface{}, key interface{}, ttl interface{}) *MockRedisCache_Expire_Call
- func (_e *MockRedisCache_Expecter) Get(ctx interface{}, maxItems interface{}, keyIter interface{}) *MockRedisCache_Get_Call
- func (_e *MockRedisCache_Expecter) Listen(ctx interface{}, key interface{}, ready ...interface{}) *MockRedisCache_Listen_Call
- func (_e *MockRedisCache_Expecter) LockGet(ctx interface{}, keySet interface{}, value interface{}, ttl interface{}, ...) *MockRedisCache_LockGet_Call
- func (_e *MockRedisCache_Expecter) Set(ctx interface{}, maxItems interface{}, iter interface{}) *MockRedisCache_Set_Call
- func (_e *MockRedisCache_Expecter) Unlock(ctx interface{}, key interface{}, value interface{}) *MockRedisCache_Unlock_Call
- type MockRedisCache_Expire_Call
- func (_c *MockRedisCache_Expire_Call) Return(_a0 bool, _a1 error) *MockRedisCache_Expire_Call
- func (_c *MockRedisCache_Expire_Call) Run(run func(ctx context.Context, key string, ttl time.Duration)) *MockRedisCache_Expire_Call
- func (_c *MockRedisCache_Expire_Call) RunAndReturn(run func(context.Context, string, time.Duration) (bool, error)) *MockRedisCache_Expire_Call
- type MockRedisCache_Get_Call
- func (_c *MockRedisCache_Get_Call) Return(_a0 func() ([]byte, bool), _a1 error) *MockRedisCache_Get_Call
- func (_c *MockRedisCache_Get_Call) Run(run func(ctx context.Context, maxItems int, keyIter func(int) string)) *MockRedisCache_Get_Call
- func (_c *MockRedisCache_Get_Call) RunAndReturn(...) *MockRedisCache_Get_Call
- type MockRedisCache_Listen_Call
- func (_c *MockRedisCache_Listen_Call) Return(_a0 string, _a1 error) *MockRedisCache_Listen_Call
- func (_c *MockRedisCache_Listen_Call) Run(run func(ctx context.Context, key string, ready ...func() error)) *MockRedisCache_Listen_Call
- func (_c *MockRedisCache_Listen_Call) RunAndReturn(run func(context.Context, string, ...func() error) (string, error)) *MockRedisCache_Listen_Call
- type MockRedisCache_LockGet_Call
- type MockRedisCache_Set_Call
- type MockRedisCache_Unlock_Call
- func (_c *MockRedisCache_Unlock_Call) Return(_a0 bool, _a1 error) *MockRedisCache_Unlock_Call
- func (_c *MockRedisCache_Unlock_Call) Run(run func(ctx context.Context, key string, value string)) *MockRedisCache_Unlock_Call
- func (_c *MockRedisCache_Unlock_Call) RunAndReturn(run func(context.Context, string, string) (bool, error)) *MockRedisCache_Unlock_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLocalCache ¶
MockLocalCache is an autogenerated mock type for the LocalCache type
func NewMockLocalCache ¶
func NewMockLocalCache(t interface { mock.TestingT Cleanup(func()) }) *MockLocalCache
NewMockLocalCache creates a new instance of MockLocalCache. 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 (*MockLocalCache) Del ¶
func (_m *MockLocalCache) Del(key string)
Del provides a mock function with given fields: key
func (*MockLocalCache) EXPECT ¶
func (_m *MockLocalCache) EXPECT() *MockLocalCache_Expecter
func (*MockLocalCache) Get ¶
func (_m *MockLocalCache) Get(key string) []byte
Get provides a mock function with given fields: key
func (*MockLocalCache) Set ¶
func (_m *MockLocalCache) Set(key string, data []byte)
Set provides a mock function with given fields: key, data
type MockLocalCache_Del_Call ¶
MockLocalCache_Del_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Del'
func (*MockLocalCache_Del_Call) Return ¶
func (_c *MockLocalCache_Del_Call) Return() *MockLocalCache_Del_Call
func (*MockLocalCache_Del_Call) Run ¶
func (_c *MockLocalCache_Del_Call) Run(run func(key string)) *MockLocalCache_Del_Call
func (*MockLocalCache_Del_Call) RunAndReturn ¶
func (_c *MockLocalCache_Del_Call) RunAndReturn(run func(string)) *MockLocalCache_Del_Call
type MockLocalCache_Expecter ¶
type MockLocalCache_Expecter struct {
// contains filtered or unexported fields
}
func (*MockLocalCache_Expecter) Del ¶
func (_e *MockLocalCache_Expecter) Del(key interface{}) *MockLocalCache_Del_Call
Del is a helper method to define mock.On call
- key string
func (*MockLocalCache_Expecter) Get ¶
func (_e *MockLocalCache_Expecter) Get(key interface{}) *MockLocalCache_Get_Call
Get is a helper method to define mock.On call
- key string
func (*MockLocalCache_Expecter) Set ¶
func (_e *MockLocalCache_Expecter) Set(key interface{}, data interface{}) *MockLocalCache_Set_Call
Set is a helper method to define mock.On call
- key string
- data []byte
type MockLocalCache_Get_Call ¶
MockLocalCache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*MockLocalCache_Get_Call) Return ¶
func (_c *MockLocalCache_Get_Call) Return(_a0 []byte) *MockLocalCache_Get_Call
func (*MockLocalCache_Get_Call) Run ¶
func (_c *MockLocalCache_Get_Call) Run(run func(key string)) *MockLocalCache_Get_Call
func (*MockLocalCache_Get_Call) RunAndReturn ¶
func (_c *MockLocalCache_Get_Call) RunAndReturn(run func(string) []byte) *MockLocalCache_Get_Call
type MockLocalCache_Set_Call ¶
MockLocalCache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
func (*MockLocalCache_Set_Call) Return ¶
func (_c *MockLocalCache_Set_Call) Return() *MockLocalCache_Set_Call
func (*MockLocalCache_Set_Call) Run ¶
func (_c *MockLocalCache_Set_Call) Run(run func(key string, data []byte)) *MockLocalCache_Set_Call
func (*MockLocalCache_Set_Call) RunAndReturn ¶
func (_c *MockLocalCache_Set_Call) RunAndReturn(run func(string, []byte)) *MockLocalCache_Set_Call
type MockRedisCache ¶
MockRedisCache is an autogenerated mock type for the RedisCache type
func NewMockRedisCache ¶
func NewMockRedisCache(t interface { mock.TestingT Cleanup(func()) }) *MockRedisCache
NewMockRedisCache creates a new instance of MockRedisCache. 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 (*MockRedisCache) Del ¶
func (_m *MockRedisCache) Del(ctx context.Context, keys []string) error
Del provides a mock function with given fields: ctx, keys
func (*MockRedisCache) EXPECT ¶
func (_m *MockRedisCache) EXPECT() *MockRedisCache_Expecter
func (*MockRedisCache) Get ¶
func (_m *MockRedisCache) Get(ctx context.Context, maxItems int, keyIter func(int) string) (func() ([]byte, bool), error)
Get provides a mock function with given fields: ctx, maxItems, keyIter
func (*MockRedisCache) Listen ¶
func (_m *MockRedisCache) Listen(ctx context.Context, key string, ready ...func() error) (string, error)
Listen provides a mock function with given fields: ctx, key, ready
func (*MockRedisCache) LockGet ¶
func (_m *MockRedisCache) LockGet(ctx context.Context, keySet string, value string, ttl time.Duration, keyGet string) (bool, []byte, error)
LockGet provides a mock function with given fields: ctx, keySet, value, ttl, keyGet
type MockRedisCache_Del_Call ¶
MockRedisCache_Del_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Del'
func (*MockRedisCache_Del_Call) Return ¶
func (_c *MockRedisCache_Del_Call) Return(_a0 error) *MockRedisCache_Del_Call
func (*MockRedisCache_Del_Call) Run ¶
func (_c *MockRedisCache_Del_Call) Run(run func(ctx context.Context, keys []string)) *MockRedisCache_Del_Call
func (*MockRedisCache_Del_Call) RunAndReturn ¶
func (_c *MockRedisCache_Del_Call) RunAndReturn(run func(context.Context, []string) error) *MockRedisCache_Del_Call
type MockRedisCache_Expecter ¶
type MockRedisCache_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRedisCache_Expecter) Del ¶
func (_e *MockRedisCache_Expecter) Del(ctx interface{}, keys interface{}) *MockRedisCache_Del_Call
Del is a helper method to define mock.On call
- ctx context.Context
- keys []string
func (*MockRedisCache_Expecter) Expire ¶
func (_e *MockRedisCache_Expecter) Expire(ctx interface{}, key interface{}, ttl interface{}) *MockRedisCache_Expire_Call
Expire is a helper method to define mock.On call
- ctx context.Context
- key string
- ttl time.Duration
func (*MockRedisCache_Expecter) Get ¶
func (_e *MockRedisCache_Expecter) Get(ctx interface{}, maxItems interface{}, keyIter interface{}) *MockRedisCache_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- maxItems int
- keyIter func(int) string
func (*MockRedisCache_Expecter) Listen ¶
func (_e *MockRedisCache_Expecter) Listen(ctx interface{}, key interface{}, ready ...interface{}) *MockRedisCache_Listen_Call
Listen is a helper method to define mock.On call
- ctx context.Context
- key string
- ready ...func() error
func (*MockRedisCache_Expecter) LockGet ¶
func (_e *MockRedisCache_Expecter) LockGet(ctx interface{}, keySet interface{}, value interface{}, ttl interface{}, keyGet interface{}) *MockRedisCache_LockGet_Call
LockGet is a helper method to define mock.On call
- ctx context.Context
- keySet string
- value string
- ttl time.Duration
- keyGet string
func (*MockRedisCache_Expecter) Set ¶
func (_e *MockRedisCache_Expecter) Set(ctx interface{}, maxItems interface{}, iter interface{}) *MockRedisCache_Set_Call
Set is a helper method to define mock.On call
- ctx context.Context
- maxItems int
- iter func(int)(string , []byte , time.Duration)
func (*MockRedisCache_Expecter) Unlock ¶
func (_e *MockRedisCache_Expecter) Unlock(ctx interface{}, key interface{}, value interface{}) *MockRedisCache_Unlock_Call
Unlock is a helper method to define mock.On call
- ctx context.Context
- key string
- value string
type MockRedisCache_Expire_Call ¶
MockRedisCache_Expire_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Expire'
func (*MockRedisCache_Expire_Call) Return ¶
func (_c *MockRedisCache_Expire_Call) Return(_a0 bool, _a1 error) *MockRedisCache_Expire_Call
func (*MockRedisCache_Expire_Call) Run ¶
func (_c *MockRedisCache_Expire_Call) Run(run func(ctx context.Context, key string, ttl time.Duration)) *MockRedisCache_Expire_Call
func (*MockRedisCache_Expire_Call) RunAndReturn ¶
func (_c *MockRedisCache_Expire_Call) RunAndReturn(run func(context.Context, string, time.Duration) (bool, error)) *MockRedisCache_Expire_Call
type MockRedisCache_Get_Call ¶
MockRedisCache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*MockRedisCache_Get_Call) Return ¶
func (_c *MockRedisCache_Get_Call) Return(_a0 func() ([]byte, bool), _a1 error) *MockRedisCache_Get_Call
func (*MockRedisCache_Get_Call) Run ¶
func (_c *MockRedisCache_Get_Call) Run(run func(ctx context.Context, maxItems int, keyIter func(int) string)) *MockRedisCache_Get_Call
func (*MockRedisCache_Get_Call) RunAndReturn ¶
func (_c *MockRedisCache_Get_Call) RunAndReturn(run func(context.Context, int, func(int) string) (func() ([]byte, bool), error)) *MockRedisCache_Get_Call
type MockRedisCache_Listen_Call ¶
MockRedisCache_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'
func (*MockRedisCache_Listen_Call) Return ¶
func (_c *MockRedisCache_Listen_Call) Return(_a0 string, _a1 error) *MockRedisCache_Listen_Call
func (*MockRedisCache_Listen_Call) Run ¶
func (_c *MockRedisCache_Listen_Call) Run(run func(ctx context.Context, key string, ready ...func() error)) *MockRedisCache_Listen_Call
func (*MockRedisCache_Listen_Call) RunAndReturn ¶
func (_c *MockRedisCache_Listen_Call) RunAndReturn(run func(context.Context, string, ...func() error) (string, error)) *MockRedisCache_Listen_Call
type MockRedisCache_LockGet_Call ¶
MockRedisCache_LockGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LockGet'
func (*MockRedisCache_LockGet_Call) Return ¶
func (_c *MockRedisCache_LockGet_Call) Return(ok bool, b []byte, err error) *MockRedisCache_LockGet_Call
func (*MockRedisCache_LockGet_Call) Run ¶
func (_c *MockRedisCache_LockGet_Call) Run(run func(ctx context.Context, keySet string, value string, ttl time.Duration, keyGet string)) *MockRedisCache_LockGet_Call
func (*MockRedisCache_LockGet_Call) RunAndReturn ¶
type MockRedisCache_Set_Call ¶
MockRedisCache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
func (*MockRedisCache_Set_Call) Return ¶
func (_c *MockRedisCache_Set_Call) Return(_a0 error) *MockRedisCache_Set_Call
func (*MockRedisCache_Set_Call) Run ¶
func (_c *MockRedisCache_Set_Call) Run(run func(ctx context.Context, maxItems int, iter func(int) (string, []byte, time.Duration))) *MockRedisCache_Set_Call
func (*MockRedisCache_Set_Call) RunAndReturn ¶
type MockRedisCache_Unlock_Call ¶
MockRedisCache_Unlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unlock'
func (*MockRedisCache_Unlock_Call) Return ¶
func (_c *MockRedisCache_Unlock_Call) Return(_a0 bool, _a1 error) *MockRedisCache_Unlock_Call
func (*MockRedisCache_Unlock_Call) Run ¶
func (_c *MockRedisCache_Unlock_Call) Run(run func(ctx context.Context, key string, value string)) *MockRedisCache_Unlock_Call
func (*MockRedisCache_Unlock_Call) RunAndReturn ¶
func (_c *MockRedisCache_Unlock_Call) RunAndReturn(run func(context.Context, string, string) (bool, error)) *MockRedisCache_Unlock_Call