Documentation
¶
Overview ¶
Package cache is a generated GoMock package.
Index ¶
- type MockRedis
- func (m *MockRedis) Close() error
- func (m *MockRedis) EXPECT() *MockRedisMockRecorder
- func (m *MockRedis) Get(ctx context.Context, key string) (string, error)
- func (m *MockRedis) MGet(ctx context.Context, keys ...string) ([]string, error)
- func (m *MockRedis) ObtainLock(ctx context.Context, key string, expire time.Duration) *redislock.Lock
- func (m *MockRedis) SAdd(ctx context.Context, key string, values []string) error
- func (m *MockRedis) SMembers(ctx context.Context, key string) ([]string, error)
- func (m *MockRedis) Set(ctx context.Context, key, val string, expired time.Duration) error
- func (m *MockRedis) SetExpire(ctx context.Context, key string, expired time.Time) error
- type MockRedisMockRecorder
- func (mr *MockRedisMockRecorder) Close() *gomock.Call
- func (mr *MockRedisMockRecorder) Get(ctx, key interface{}) *gomock.Call
- func (mr *MockRedisMockRecorder) MGet(ctx interface{}, keys ...interface{}) *gomock.Call
- func (mr *MockRedisMockRecorder) ObtainLock(ctx, key, expire interface{}) *gomock.Call
- func (mr *MockRedisMockRecorder) SAdd(ctx, key, values interface{}) *gomock.Call
- func (mr *MockRedisMockRecorder) SMembers(ctx, key interface{}) *gomock.Call
- func (mr *MockRedisMockRecorder) Set(ctx, key, val, expired interface{}) *gomock.Call
- func (mr *MockRedisMockRecorder) SetExpire(ctx, key, expired interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRedis ¶
type MockRedis struct {
// contains filtered or unexported fields
}
MockRedis is a mock of Redis interface.
func NewMockRedis ¶
func NewMockRedis(ctrl *gomock.Controller) *MockRedis
NewMockRedis creates a new mock instance.
func (*MockRedis) EXPECT ¶
func (m *MockRedis) EXPECT() *MockRedisMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRedis) ObtainLock ¶
func (m *MockRedis) ObtainLock(ctx context.Context, key string, expire time.Duration) *redislock.Lock
ObtainLock mocks base method.
type MockRedisMockRecorder ¶
type MockRedisMockRecorder struct {
// contains filtered or unexported fields
}
MockRedisMockRecorder is the mock recorder for MockRedis.
func (*MockRedisMockRecorder) Close ¶
func (mr *MockRedisMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockRedisMockRecorder) Get ¶
func (mr *MockRedisMockRecorder) Get(ctx, key interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockRedisMockRecorder) MGet ¶
func (mr *MockRedisMockRecorder) MGet(ctx interface{}, keys ...interface{}) *gomock.Call
MGet indicates an expected call of MGet.
func (*MockRedisMockRecorder) ObtainLock ¶
func (mr *MockRedisMockRecorder) ObtainLock(ctx, key, expire interface{}) *gomock.Call
ObtainLock indicates an expected call of ObtainLock.
func (*MockRedisMockRecorder) SAdd ¶
func (mr *MockRedisMockRecorder) SAdd(ctx, key, values interface{}) *gomock.Call
SAdd indicates an expected call of SAdd.
func (*MockRedisMockRecorder) SMembers ¶
func (mr *MockRedisMockRecorder) SMembers(ctx, key interface{}) *gomock.Call
SMembers indicates an expected call of SMembers.
func (*MockRedisMockRecorder) Set ¶
func (mr *MockRedisMockRecorder) Set(ctx, key, val, expired interface{}) *gomock.Call
Set indicates an expected call of Set.
func (*MockRedisMockRecorder) SetExpire ¶
func (mr *MockRedisMockRecorder) SetExpire(ctx, key, expired interface{}) *gomock.Call
SetExpire indicates an expected call of SetExpire.