Documentation ¶
Index ¶
- type MockClient
- func (m *MockClient) Decr(key string) redis.Result
- func (m *MockClient) Del(keys ...string) redis.Result
- func (m *MockClient) Eval(script string, keys []string, args ...interface{}) redis.Result
- func (m *MockClient) Exists(keys ...string) redis.Result
- func (m *MockClient) Expire(key string, value time.Duration) redis.Result
- func (m *MockClient) Get(key string) redis.Result
- func (m *MockClient) HGetAll(key string) redis.Result
- func (m *MockClient) HIncrBy(key string, field string, value int64) redis.Result
- func (m *MockClient) Incr(key string) redis.Result
- func (m *MockClient) Keys(pattern string) redis.Result
- func (m *MockClient) LLen(key string) redis.Result
- func (m *MockClient) LRange(key string, start, stop int64) redis.Result
- func (m *MockClient) LTrim(key string, start, stop int64) redis.Result
- func (m *MockClient) MGet(keys []string) redis.Result
- func (m *MockClient) Ping() redis.Result
- func (m *MockClient) RPush(key string, values ...interface{}) redis.Result
- func (m *MockClient) SAdd(key string, members ...interface{}) redis.Result
- func (m *MockClient) SCard(key string) redis.Result
- func (m *MockClient) SIsMember(key string, member interface{}) redis.Result
- func (m *MockClient) SMembers(key string) redis.Result
- func (m *MockClient) SRem(key string, members ...interface{}) redis.Result
- func (m *MockClient) Set(key string, value interface{}, expiration time.Duration) redis.Result
- func (m *MockClient) TTL(key string) redis.Result
- type MockResultOutput
- func (m *MockResultOutput) Bool() bool
- func (m *MockResultOutput) Duration() time.Duration
- func (m *MockResultOutput) Err() error
- func (m *MockResultOutput) Int() int64
- func (m *MockResultOutput) MapStringString() (map[string]string, error)
- func (m *MockResultOutput) Multi() ([]string, error)
- func (m *MockResultOutput) MultiInterface() ([]interface{}, error)
- func (m *MockResultOutput) Result() (int64, error)
- func (m *MockResultOutput) ResultString() (string, error)
- func (m *MockResultOutput) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct { DelCall func(keys ...string) redis.Result GetCall func(key string) redis.Result SetCall func(key string, value interface{}, expiration time.Duration) redis.Result PingCall func() redis.Result ExistsCall func(keys ...string) redis.Result KeysCall func(pattern string) redis.Result SMembersCall func(key string) redis.Result SIsMemberCall func(key string, member interface{}) redis.Result SAddCall func(key string, members ...interface{}) redis.Result SRemCall func(key string, members ...interface{}) redis.Result IncrCall func(key string) redis.Result DecrCall func(key string) redis.Result RPushCall func(key string, values ...interface{}) redis.Result LRangeCall func(key string, start, stop int64) redis.Result LTrimCall func(key string, start, stop int64) redis.Result LLenCall func(key string) redis.Result ExpireCall func(key string, value time.Duration) redis.Result TTLCall func(key string) redis.Result MGetCall func(keys []string) redis.Result SCardCall func(key string) redis.Result EvalCall func(script string, keys []string, args ...interface{}) redis.Result HIncrByCall func(key string, field string, value int64) redis.Result HGetAllCall func(key string) redis.Result }
MockClient mocks for testing purposes
func (*MockClient) Eval ¶
func (m *MockClient) Eval(script string, keys []string, args ...interface{}) redis.Result
Eval mocks Eval
func (*MockClient) Exists ¶
func (m *MockClient) Exists(keys ...string) redis.Result
Exists mocks set
func (*MockClient) HGetAll ¶
func (m *MockClient) HGetAll(key string) redis.Result
HGetAll mocks HGetAll
func (*MockClient) LRange ¶
func (m *MockClient) LRange(key string, start, stop int64) redis.Result
LRange mocks LRange
func (*MockClient) LTrim ¶
func (m *MockClient) LTrim(key string, start, stop int64) redis.Result
LTrim mocks LTrim
func (*MockClient) RPush ¶
func (m *MockClient) RPush(key string, values ...interface{}) redis.Result
RPush mocks RPush
func (*MockClient) SAdd ¶
func (m *MockClient) SAdd(key string, members ...interface{}) redis.Result
SAdd mocks SAdd
func (*MockClient) SIsMember ¶
func (m *MockClient) SIsMember(key string, member interface{}) redis.Result
SIsMember mocks SIsMember
func (*MockClient) SMembers ¶
func (m *MockClient) SMembers(key string) redis.Result
SMembers mocks SMembers
func (*MockClient) SRem ¶
func (m *MockClient) SRem(key string, members ...interface{}) redis.Result
SRem mocks SRem
type MockResultOutput ¶
type MockResultOutput struct { ErrCall func() error IntCall func() int64 StringCall func() string BoolCall func() bool DurationCall func() time.Duration ResultCall func() (int64, error) ResultStringCall func() (string, error) MultiCall func() ([]string, error) MultiInterfaceCall func() ([]interface{}, error) MapStringStringCall func() (map[string]string, error) }
MockResultOutput mocks struct
func (*MockResultOutput) Duration ¶
func (m *MockResultOutput) Duration() time.Duration
Duration mocks Duration
func (*MockResultOutput) MapStringString ¶
func (m *MockResultOutput) MapStringString() (map[string]string, error)
MapStringString mocks MapStringString
func (*MockResultOutput) Multi ¶
func (m *MockResultOutput) Multi() ([]string, error)
Multi mocks Multi
func (*MockResultOutput) MultiInterface ¶
func (m *MockResultOutput) MultiInterface() ([]interface{}, error)
MultiInterface mocks MultiInterface
func (*MockResultOutput) Result ¶
func (m *MockResultOutput) Result() (int64, error)
Result mocks Result
func (*MockResultOutput) ResultString ¶
func (m *MockResultOutput) ResultString() (string, error)
ResultString mocks ResultString
Click to show internal directories.
Click to hide internal directories.