Documentation ¶
Overview ¶
Package redismock is useful for unit testing applications that interact with Redis.
The two constructors NewMock and NewNiceMock are explained in more detail on the functions themselves.
Index ¶
- type ClientMock
- func (m *ClientMock) Append(key, value string) *redis.IntCmd
- func (m *ClientMock) BLPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd
- func (m *ClientMock) BRPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd
- func (m *ClientMock) BRPopLPush(source, destination string, timeout time.Duration) *redis.StringCmd
- func (m *ClientMock) BZPopMax(timeout time.Duration, keys ...string) *redis.ZWithKeyCmd
- func (m *ClientMock) BZPopMin(timeout time.Duration, keys ...string) *redis.ZWithKeyCmd
- func (m *ClientMock) BgRewriteAOF() *redis.StatusCmd
- func (m *ClientMock) BgSave() *redis.StatusCmd
- func (m *ClientMock) BitCount(key string, bitCount *redis.BitCount) *redis.IntCmd
- func (m *ClientMock) BitOpAnd(destKey string, keys ...string) *redis.IntCmd
- func (m *ClientMock) BitOpNot(destKey string, key string) *redis.IntCmd
- func (m *ClientMock) BitOpOr(destKey string, keys ...string) *redis.IntCmd
- func (m *ClientMock) BitOpXor(destKey string, keys ...string) *redis.IntCmd
- func (m *ClientMock) BitPos(key string, bit int64, pos ...int64) *redis.IntCmd
- func (m *ClientMock) ClientGetName() *redis.StringCmd
- func (m *ClientMock) ClientID() *redis.IntCmd
- func (m *ClientMock) ClientKill(ipPort string) *redis.StatusCmd
- func (m *ClientMock) ClientKillByFilter(keys ...string) *redis.IntCmd
- func (m *ClientMock) ClientList() *redis.StringCmd
- func (m *ClientMock) ClientPause(dur time.Duration) *redis.BoolCmd
- func (m *ClientMock) ClusterAddSlots(slots ...int) *redis.StatusCmd
- func (m *ClientMock) ClusterAddSlotsRange(min, max int) *redis.StatusCmd
- func (m *ClientMock) ClusterCountFailureReports(nodeID string) *redis.IntCmd
- func (m *ClientMock) ClusterCountKeysInSlot(slot int) *redis.IntCmd
- func (m *ClientMock) ClusterDelSlots(slots ...int) *redis.StatusCmd
- func (m *ClientMock) ClusterDelSlotsRange(min, max int) *redis.StatusCmd
- func (m *ClientMock) ClusterFailover() *redis.StatusCmd
- func (m *ClientMock) ClusterForget(nodeID string) *redis.StatusCmd
- func (m *ClientMock) ClusterGetKeysInSlot(slot int, count int) *redis.StringSliceCmd
- func (m *ClientMock) ClusterInfo() *redis.StringCmd
- func (m *ClientMock) ClusterKeySlot(key string) *redis.IntCmd
- func (m *ClientMock) ClusterMeet(host, port string) *redis.StatusCmd
- func (m *ClientMock) ClusterNodes() *redis.StringCmd
- func (m *ClientMock) ClusterReplicate(nodeID string) *redis.StatusCmd
- func (m *ClientMock) ClusterResetHard() *redis.StatusCmd
- func (m *ClientMock) ClusterResetSoft() *redis.StatusCmd
- func (m *ClientMock) ClusterSaveConfig() *redis.StatusCmd
- func (m *ClientMock) ClusterSlaves(nodeID string) *redis.StringSliceCmd
- func (m *ClientMock) ClusterSlots() *redis.ClusterSlotsCmd
- func (m *ClientMock) Command() *redis.CommandsInfoCmd
- func (m *ClientMock) ConfigGet(parameter string) *redis.SliceCmd
- func (m *ClientMock) ConfigResetStat() *redis.StatusCmd
- func (m *ClientMock) ConfigRewrite() *redis.StatusCmd
- func (m *ClientMock) ConfigSet(parameter, value string) *redis.StatusCmd
- func (m *ClientMock) DBSize() *redis.IntCmd
- func (m *ClientMock) DebugObject(key string) *redis.StringCmd
- func (m *ClientMock) Decr(key string) *redis.IntCmd
- func (m *ClientMock) DecrBy(key string, decrement int64) *redis.IntCmd
- func (m *ClientMock) Del(keys ...string) *redis.IntCmd
- func (m *ClientMock) Dump(key string) *redis.StringCmd
- func (m *ClientMock) Echo(message interface{}) *redis.StringCmd
- func (m *ClientMock) Eval(script string, keys []string, args ...interface{}) *redis.Cmd
- func (m *ClientMock) EvalSha(sha1 string, keys []string, args ...interface{}) *redis.Cmd
- func (m *ClientMock) Exists(keys ...string) *redis.IntCmd
- func (m *ClientMock) Expire(key string, expiration time.Duration) *redis.BoolCmd
- func (m *ClientMock) ExpireAt(key string, tm time.Time) *redis.BoolCmd
- func (m *ClientMock) FlushAll() *redis.StatusCmd
- func (m *ClientMock) FlushAllAsync() *redis.StatusCmd
- func (m *ClientMock) FlushDB() *redis.StatusCmd
- func (m *ClientMock) FlushDBAsync() *redis.StatusCmd
- func (m *ClientMock) GeoAdd(key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd
- func (m *ClientMock) GeoDist(key string, member1, member2, unit string) *redis.FloatCmd
- func (m *ClientMock) GeoHash(key string, members ...string) *redis.StringSliceCmd
- func (m *ClientMock) GeoPos(key string, members ...string) *redis.GeoPosCmd
- func (m *ClientMock) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (m *ClientMock) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (m *ClientMock) GeoRadiusByMemberRO(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (m *ClientMock) GeoRadiusRO(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
- func (m *ClientMock) Get(key string) *redis.StringCmd
- func (m *ClientMock) GetBit(key string, offset int64) *redis.IntCmd
- func (m *ClientMock) GetRange(key string, start, end int64) *redis.StringCmd
- func (m *ClientMock) GetSet(key string, value interface{}) *redis.StringCmd
- func (m *ClientMock) HDel(key string, fields ...string) *redis.IntCmd
- func (m *ClientMock) HExists(key, field string) *redis.BoolCmd
- func (m *ClientMock) HGet(key, field string) *redis.StringCmd
- func (m *ClientMock) HGetAll(key string) *redis.StringStringMapCmd
- func (m *ClientMock) HIncrBy(key, field string, incr int64) *redis.IntCmd
- func (m *ClientMock) HIncrByFloat(key, field string, incr float64) *redis.FloatCmd
- func (m *ClientMock) HKeys(key string) *redis.StringSliceCmd
- func (m *ClientMock) HLen(key string) *redis.IntCmd
- func (m *ClientMock) HMGet(key string, fields ...string) *redis.SliceCmd
- func (m *ClientMock) HMSet(key string, fields map[string]interface{}) *redis.StatusCmd
- func (m *ClientMock) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (m *ClientMock) HSet(key, field string, value interface{}) *redis.BoolCmd
- func (m *ClientMock) HSetNX(key, field string, value interface{}) *redis.BoolCmd
- func (m *ClientMock) HVals(key string) *redis.StringSliceCmd
- func (m *ClientMock) Incr(key string) *redis.IntCmd
- func (m *ClientMock) IncrBy(key string, value int64) *redis.IntCmd
- func (m *ClientMock) IncrByFloat(key string, value float64) *redis.FloatCmd
- func (m *ClientMock) Info(section ...string) *redis.StringCmd
- func (m *ClientMock) Keys(pattern string) *redis.StringSliceCmd
- func (m *ClientMock) LIndex(key string, index int64) *redis.StringCmd
- func (m *ClientMock) LInsert(key, op string, pivot, value interface{}) *redis.IntCmd
- func (m *ClientMock) LInsertAfter(key string, pivot, value interface{}) *redis.IntCmd
- func (m *ClientMock) LInsertBefore(key string, pivot, value interface{}) *redis.IntCmd
- func (m *ClientMock) LLen(key string) *redis.IntCmd
- func (m *ClientMock) LPop(key string) *redis.StringCmd
- func (m *ClientMock) LPush(key string, values ...interface{}) *redis.IntCmd
- func (m *ClientMock) LPushX(key string, value interface{}) *redis.IntCmd
- func (m *ClientMock) LRange(key string, start, stop int64) *redis.StringSliceCmd
- func (m *ClientMock) LRem(key string, count int64, value interface{}) *redis.IntCmd
- func (m *ClientMock) LSet(key string, index int64, value interface{}) *redis.StatusCmd
- func (m *ClientMock) LTrim(key string, start, stop int64) *redis.StatusCmd
- func (m *ClientMock) LastSave() *redis.IntCmd
- func (m *ClientMock) MGet(keys ...string) *redis.SliceCmd
- func (m *ClientMock) MSet(pairs ...interface{}) *redis.StatusCmd
- func (m *ClientMock) MSetNX(pairs ...interface{}) *redis.BoolCmd
- func (m *ClientMock) MemoryUsage(key string, samples ...int) *redis.IntCmd
- func (m *ClientMock) Migrate(host, port, key string, db int64, timeout time.Duration) *redis.StatusCmd
- func (m *ClientMock) Move(key string, db int64) *redis.BoolCmd
- func (m *ClientMock) ObjectEncoding(key string) *redis.StringCmd
- func (m *ClientMock) ObjectIdleTime(key string) *redis.DurationCmd
- func (m *ClientMock) ObjectRefCount(key string) *redis.IntCmd
- func (m *ClientMock) PExpire(key string, expiration time.Duration) *redis.BoolCmd
- func (m *ClientMock) PExpireAt(key string, tm time.Time) *redis.BoolCmd
- func (m *ClientMock) PFAdd(key string, els ...interface{}) *redis.IntCmd
- func (m *ClientMock) PFCount(keys ...string) *redis.IntCmd
- func (m *ClientMock) PFMerge(dest string, keys ...string) *redis.StatusCmd
- func (m *ClientMock) PTTL(key string) *redis.DurationCmd
- func (m *ClientMock) Persist(key string) *redis.BoolCmd
- func (m *ClientMock) Ping() *redis.StatusCmd
- func (m *ClientMock) Pipeline() redis.Pipeliner
- func (m *ClientMock) Pipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
- func (m *ClientMock) PubSubChannels(pattern string) *redis.StringSliceCmd
- func (m *ClientMock) PubSubNumPat() *redis.IntCmd
- func (m *ClientMock) PubSubNumSub(channels ...string) *redis.StringIntMapCmd
- func (m *ClientMock) Publish(channel string, message interface{}) *redis.IntCmd
- func (m *ClientMock) Quit() *redis.StatusCmd
- func (m *ClientMock) RPop(key string) *redis.StringCmd
- func (m *ClientMock) RPopLPush(source, destination string) *redis.StringCmd
- func (m *ClientMock) RPush(key string, values ...interface{}) *redis.IntCmd
- func (m *ClientMock) RPushX(key string, value interface{}) *redis.IntCmd
- func (m *ClientMock) RandomKey() *redis.StringCmd
- func (m *ClientMock) ReadOnly() *redis.StatusCmd
- func (m *ClientMock) ReadWrite() *redis.StatusCmd
- func (m *ClientMock) Rename(key, newkey string) *redis.StatusCmd
- func (m *ClientMock) RenameNX(key, newkey string) *redis.BoolCmd
- func (m *ClientMock) Restore(key string, ttl time.Duration, value string) *redis.StatusCmd
- func (m *ClientMock) RestoreReplace(key string, ttl time.Duration, value string) *redis.StatusCmd
- func (m *ClientMock) SAdd(key string, members ...interface{}) *redis.IntCmd
- func (m *ClientMock) SCard(key string) *redis.IntCmd
- func (m *ClientMock) SDiff(keys ...string) *redis.StringSliceCmd
- func (m *ClientMock) SDiffStore(destination string, keys ...string) *redis.IntCmd
- func (m *ClientMock) SInter(keys ...string) *redis.StringSliceCmd
- func (m *ClientMock) SInterStore(destination string, keys ...string) *redis.IntCmd
- func (m *ClientMock) SIsMember(key string, member interface{}) *redis.BoolCmd
- func (m *ClientMock) SMembers(key string) *redis.StringSliceCmd
- func (m *ClientMock) SMembersMap(key string) *redis.StringStructMapCmd
- func (m *ClientMock) SMove(source, destination string, member interface{}) *redis.BoolCmd
- func (m *ClientMock) SPop(key string) *redis.StringCmd
- func (m *ClientMock) SPopN(key string, count int64) *redis.StringSliceCmd
- func (m *ClientMock) SRandMember(key string) *redis.StringCmd
- func (m *ClientMock) SRandMemberN(key string, count int64) *redis.StringSliceCmd
- func (m *ClientMock) SRem(key string, members ...interface{}) *redis.IntCmd
- func (m *ClientMock) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (m *ClientMock) SUnion(keys ...string) *redis.StringSliceCmd
- func (m *ClientMock) SUnionStore(destination string, keys ...string) *redis.IntCmd
- func (m *ClientMock) Save() *redis.StatusCmd
- func (m *ClientMock) Scan(cursor uint64, match string, count int64) *redis.ScanCmd
- func (m *ClientMock) ScriptExists(hashes ...string) *redis.BoolSliceCmd
- func (m *ClientMock) ScriptFlush() *redis.StatusCmd
- func (m *ClientMock) ScriptKill() *redis.StatusCmd
- func (m *ClientMock) ScriptLoad(script string) *redis.StringCmd
- func (m *ClientMock) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (m *ClientMock) SetBit(key string, offset int64, value int) *redis.IntCmd
- func (m *ClientMock) SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- func (m *ClientMock) SetRange(key string, offset int64, value string) *redis.IntCmd
- func (m *ClientMock) SetXX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
- func (m *ClientMock) Shutdown() *redis.StatusCmd
- func (m *ClientMock) ShutdownNoSave() *redis.StatusCmd
- func (m *ClientMock) ShutdownSave() *redis.StatusCmd
- func (m *ClientMock) SlaveOf(host, port string) *redis.StatusCmd
- func (m *ClientMock) Sort(key string, sort *redis.Sort) *redis.StringSliceCmd
- func (m *ClientMock) SortInterfaces(key string, sort *redis.Sort) *redis.SliceCmd
- func (m *ClientMock) SortStore(key, store string, sort *redis.Sort) *redis.IntCmd
- func (m *ClientMock) StrLen(key string) *redis.IntCmd
- func (m *ClientMock) TTL(key string) *redis.DurationCmd
- func (m *ClientMock) Time() *redis.TimeCmd
- func (m *ClientMock) Touch(keys ...string) *redis.IntCmd
- func (m *ClientMock) TxPipeline() redis.Pipeliner
- func (m *ClientMock) TxPipelined(fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
- func (m *ClientMock) Type(key string) *redis.StatusCmd
- func (m *ClientMock) Unlink(keys ...string) *redis.IntCmd
- func (m *ClientMock) Watch(fn func(*redis.Tx) error, keys ...string) error
- func (m *ClientMock) XAck(stream, group string, ids ...string) *redis.IntCmd
- func (m *ClientMock) XAdd(a *redis.XAddArgs) *redis.StringCmd
- func (m *ClientMock) XClaim(a *redis.XClaimArgs) *redis.XMessageSliceCmd
- func (m *ClientMock) XClaimJustID(a *redis.XClaimArgs) *redis.StringSliceCmd
- func (m *ClientMock) XDel(stream string, ids ...string) *redis.IntCmd
- func (m *ClientMock) XGroupCreate(stream, group, start string) *redis.StatusCmd
- func (m *ClientMock) XGroupCreateMkStream(stream, group, start string) *redis.StatusCmd
- func (m *ClientMock) XGroupDelConsumer(stream, group, consumer string) *redis.IntCmd
- func (m *ClientMock) XGroupDestroy(stream, group string) *redis.IntCmd
- func (m *ClientMock) XGroupSetID(stream, group, start string) *redis.StatusCmd
- func (m *ClientMock) XLen(stream string) *redis.IntCmd
- func (m *ClientMock) XPending(stream, group string) *redis.XPendingCmd
- func (m *ClientMock) XPendingExt(a *redis.XPendingExtArgs) *redis.XPendingExtCmd
- func (m *ClientMock) XRange(stream, start, stop string) *redis.XMessageSliceCmd
- func (m *ClientMock) XRangeN(stream, start, stop string, count int64) *redis.XMessageSliceCmd
- func (m *ClientMock) XRead(a *redis.XReadArgs) *redis.XStreamSliceCmd
- func (m *ClientMock) XReadGroup(a *redis.XReadGroupArgs) *redis.XStreamSliceCmd
- func (m *ClientMock) XReadStreams(streams ...string) *redis.XStreamSliceCmd
- func (m *ClientMock) XRevRange(stream string, start, stop string) *redis.XMessageSliceCmd
- func (m *ClientMock) XRevRangeN(stream string, start, stop string, count int64) *redis.XMessageSliceCmd
- func (m *ClientMock) XTrim(key string, maxLen int64) *redis.IntCmd
- func (m *ClientMock) XTrimApprox(key string, maxLen int64) *redis.IntCmd
- func (m *ClientMock) ZAdd(key string, members ...redis.Z) *redis.IntCmd
- func (m *ClientMock) ZAddCh(key string, members ...redis.Z) *redis.IntCmd
- func (m *ClientMock) ZAddNX(key string, members ...redis.Z) *redis.IntCmd
- func (m *ClientMock) ZAddNXCh(key string, members ...redis.Z) *redis.IntCmd
- func (m *ClientMock) ZAddXX(key string, members ...redis.Z) *redis.IntCmd
- func (m *ClientMock) ZAddXXCh(key string, members ...redis.Z) *redis.IntCmd
- func (m *ClientMock) ZCard(key string) *redis.IntCmd
- func (m *ClientMock) ZCount(key, min, max string) *redis.IntCmd
- func (m *ClientMock) ZIncr(key string, member redis.Z) *redis.FloatCmd
- func (m *ClientMock) ZIncrBy(key string, increment float64, member string) *redis.FloatCmd
- func (m *ClientMock) ZIncrNX(key string, member redis.Z) *redis.FloatCmd
- func (m *ClientMock) ZIncrXX(key string, member redis.Z) *redis.FloatCmd
- func (m *ClientMock) ZInterStore(destination string, store redis.ZStore, keys ...string) *redis.IntCmd
- func (m *ClientMock) ZLexCount(key, min, max string) *redis.IntCmd
- func (m *ClientMock) ZPopMax(key string, count ...int64) *redis.ZSliceCmd
- func (m *ClientMock) ZPopMin(key string, count ...int64) *redis.ZSliceCmd
- func (m *ClientMock) ZRange(key string, start, stop int64) *redis.StringSliceCmd
- func (m *ClientMock) ZRangeByLex(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (m *ClientMock) ZRangeByScore(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (m *ClientMock) ZRangeByScoreWithScores(key string, opt redis.ZRangeBy) *redis.ZSliceCmd
- func (m *ClientMock) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (m *ClientMock) ZRank(key, member string) *redis.IntCmd
- func (m *ClientMock) ZRem(key string, members ...interface{}) *redis.IntCmd
- func (m *ClientMock) ZRemRangeByLex(key, min, max string) *redis.IntCmd
- func (m *ClientMock) ZRemRangeByRank(key string, start, stop int64) *redis.IntCmd
- func (m *ClientMock) ZRemRangeByScore(key, min, max string) *redis.IntCmd
- func (m *ClientMock) ZRevRange(key string, start, stop int64) *redis.StringSliceCmd
- func (m *ClientMock) ZRevRangeByLex(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (m *ClientMock) ZRevRangeByScore(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
- func (m *ClientMock) ZRevRangeByScoreWithScores(key string, opt redis.ZRangeBy) *redis.ZSliceCmd
- func (m *ClientMock) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
- func (m *ClientMock) ZRevRank(key, member string) *redis.IntCmd
- func (m *ClientMock) ZScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd
- func (m *ClientMock) ZScore(key, member string) *redis.FloatCmd
- func (m *ClientMock) ZUnionStore(dest string, store redis.ZStore, keys ...string) *redis.IntCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientMock ¶
func NewMock ¶
func NewMock() *ClientMock
NewMock creates a hollow mock. You will need to stub all commands that you will need to interact with.
This is most useful when you want to strictly test all Redis interactions. See NewNiceMock().
func NewNiceMock ¶
func NewNiceMock(client *redis.Client) *ClientMock
NewNiceMock will create a mock that falls back to the real client in cases where a command has not been stubbed.
This is most useful when you want a real Redis instance, but you need to stub off certain commands or behaviors. See NewMock().
func (*ClientMock) BLPop ¶
func (m *ClientMock) BLPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd
func (*ClientMock) BRPop ¶
func (m *ClientMock) BRPop(timeout time.Duration, keys ...string) *redis.StringSliceCmd
func (*ClientMock) BRPopLPush ¶
func (*ClientMock) BZPopMax ¶ added in v1.3.0
func (m *ClientMock) BZPopMax(timeout time.Duration, keys ...string) *redis.ZWithKeyCmd
func (*ClientMock) BZPopMin ¶ added in v1.3.0
func (m *ClientMock) BZPopMin(timeout time.Duration, keys ...string) *redis.ZWithKeyCmd
func (*ClientMock) BgRewriteAOF ¶
func (m *ClientMock) BgRewriteAOF() *redis.StatusCmd
func (*ClientMock) BgSave ¶
func (m *ClientMock) BgSave() *redis.StatusCmd
func (*ClientMock) BitOpAnd ¶
func (m *ClientMock) BitOpAnd(destKey string, keys ...string) *redis.IntCmd
func (*ClientMock) BitOpNot ¶
func (m *ClientMock) BitOpNot(destKey string, key string) *redis.IntCmd
func (*ClientMock) BitOpOr ¶
func (m *ClientMock) BitOpOr(destKey string, keys ...string) *redis.IntCmd
func (*ClientMock) BitOpXor ¶
func (m *ClientMock) BitOpXor(destKey string, keys ...string) *redis.IntCmd
func (*ClientMock) ClientGetName ¶
func (m *ClientMock) ClientGetName() *redis.StringCmd
func (*ClientMock) ClientID ¶ added in v1.4.0
func (m *ClientMock) ClientID() *redis.IntCmd
func (*ClientMock) ClientKill ¶
func (m *ClientMock) ClientKill(ipPort string) *redis.StatusCmd
func (*ClientMock) ClientKillByFilter ¶ added in v1.1.0
func (m *ClientMock) ClientKillByFilter(keys ...string) *redis.IntCmd
func (*ClientMock) ClientList ¶
func (m *ClientMock) ClientList() *redis.StringCmd
func (*ClientMock) ClientPause ¶
func (m *ClientMock) ClientPause(dur time.Duration) *redis.BoolCmd
func (*ClientMock) ClusterAddSlots ¶
func (m *ClientMock) ClusterAddSlots(slots ...int) *redis.StatusCmd
func (*ClientMock) ClusterAddSlotsRange ¶
func (m *ClientMock) ClusterAddSlotsRange(min, max int) *redis.StatusCmd
func (*ClientMock) ClusterCountFailureReports ¶
func (m *ClientMock) ClusterCountFailureReports(nodeID string) *redis.IntCmd
func (*ClientMock) ClusterCountKeysInSlot ¶
func (m *ClientMock) ClusterCountKeysInSlot(slot int) *redis.IntCmd
func (*ClientMock) ClusterDelSlots ¶
func (m *ClientMock) ClusterDelSlots(slots ...int) *redis.StatusCmd
func (*ClientMock) ClusterDelSlotsRange ¶
func (m *ClientMock) ClusterDelSlotsRange(min, max int) *redis.StatusCmd
func (*ClientMock) ClusterFailover ¶
func (m *ClientMock) ClusterFailover() *redis.StatusCmd
func (*ClientMock) ClusterForget ¶
func (m *ClientMock) ClusterForget(nodeID string) *redis.StatusCmd
func (*ClientMock) ClusterGetKeysInSlot ¶ added in v1.5.0
func (m *ClientMock) ClusterGetKeysInSlot(slot int, count int) *redis.StringSliceCmd
func (*ClientMock) ClusterInfo ¶
func (m *ClientMock) ClusterInfo() *redis.StringCmd
func (*ClientMock) ClusterKeySlot ¶
func (m *ClientMock) ClusterKeySlot(key string) *redis.IntCmd
func (*ClientMock) ClusterMeet ¶
func (m *ClientMock) ClusterMeet(host, port string) *redis.StatusCmd
func (*ClientMock) ClusterNodes ¶
func (m *ClientMock) ClusterNodes() *redis.StringCmd
func (*ClientMock) ClusterReplicate ¶
func (m *ClientMock) ClusterReplicate(nodeID string) *redis.StatusCmd
func (*ClientMock) ClusterResetHard ¶
func (m *ClientMock) ClusterResetHard() *redis.StatusCmd
func (*ClientMock) ClusterResetSoft ¶
func (m *ClientMock) ClusterResetSoft() *redis.StatusCmd
func (*ClientMock) ClusterSaveConfig ¶
func (m *ClientMock) ClusterSaveConfig() *redis.StatusCmd
func (*ClientMock) ClusterSlaves ¶
func (m *ClientMock) ClusterSlaves(nodeID string) *redis.StringSliceCmd
func (*ClientMock) ClusterSlots ¶
func (m *ClientMock) ClusterSlots() *redis.ClusterSlotsCmd
func (*ClientMock) Command ¶
func (m *ClientMock) Command() *redis.CommandsInfoCmd
func (*ClientMock) ConfigResetStat ¶
func (m *ClientMock) ConfigResetStat() *redis.StatusCmd
func (*ClientMock) ConfigRewrite ¶
func (m *ClientMock) ConfigRewrite() *redis.StatusCmd
func (*ClientMock) ConfigSet ¶
func (m *ClientMock) ConfigSet(parameter, value string) *redis.StatusCmd
func (*ClientMock) DBSize ¶
func (m *ClientMock) DBSize() *redis.IntCmd
func (*ClientMock) DebugObject ¶
func (m *ClientMock) DebugObject(key string) *redis.StringCmd
func (*ClientMock) Echo ¶
func (m *ClientMock) Echo(message interface{}) *redis.StringCmd
func (*ClientMock) Eval ¶
func (m *ClientMock) Eval(script string, keys []string, args ...interface{}) *redis.Cmd
func (*ClientMock) EvalSha ¶
func (m *ClientMock) EvalSha(sha1 string, keys []string, args ...interface{}) *redis.Cmd
func (*ClientMock) FlushAll ¶
func (m *ClientMock) FlushAll() *redis.StatusCmd
func (*ClientMock) FlushAllAsync ¶
func (m *ClientMock) FlushAllAsync() *redis.StatusCmd
func (*ClientMock) FlushDB ¶
func (m *ClientMock) FlushDB() *redis.StatusCmd
func (*ClientMock) FlushDBAsync ¶
func (m *ClientMock) FlushDBAsync() *redis.StatusCmd
func (*ClientMock) GeoAdd ¶
func (m *ClientMock) GeoAdd(key string, geoLocation ...*redis.GeoLocation) *redis.IntCmd
func (*ClientMock) GeoDist ¶
func (m *ClientMock) GeoDist(key string, member1, member2, unit string) *redis.FloatCmd
func (*ClientMock) GeoHash ¶
func (m *ClientMock) GeoHash(key string, members ...string) *redis.StringSliceCmd
func (*ClientMock) GeoPos ¶
func (m *ClientMock) GeoPos(key string, members ...string) *redis.GeoPosCmd
func (*ClientMock) GeoRadius ¶
func (m *ClientMock) GeoRadius(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*ClientMock) GeoRadiusByMember ¶
func (m *ClientMock) GeoRadiusByMember(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*ClientMock) GeoRadiusByMemberRO ¶
func (m *ClientMock) GeoRadiusByMemberRO(key, member string, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*ClientMock) GeoRadiusRO ¶
func (m *ClientMock) GeoRadiusRO(key string, longitude, latitude float64, query *redis.GeoRadiusQuery) *redis.GeoLocationCmd
func (*ClientMock) GetRange ¶
func (m *ClientMock) GetRange(key string, start, end int64) *redis.StringCmd
func (*ClientMock) GetSet ¶
func (m *ClientMock) GetSet(key string, value interface{}) *redis.StringCmd
func (*ClientMock) HGetAll ¶
func (m *ClientMock) HGetAll(key string) *redis.StringStringMapCmd
func (*ClientMock) HIncrBy ¶
func (m *ClientMock) HIncrBy(key, field string, incr int64) *redis.IntCmd
func (*ClientMock) HIncrByFloat ¶
func (m *ClientMock) HIncrByFloat(key, field string, incr float64) *redis.FloatCmd
func (*ClientMock) HKeys ¶
func (m *ClientMock) HKeys(key string) *redis.StringSliceCmd
func (*ClientMock) HMSet ¶
func (m *ClientMock) HMSet(key string, fields map[string]interface{}) *redis.StatusCmd
func (*ClientMock) HSet ¶
func (m *ClientMock) HSet(key, field string, value interface{}) *redis.BoolCmd
func (*ClientMock) HSetNX ¶
func (m *ClientMock) HSetNX(key, field string, value interface{}) *redis.BoolCmd
func (*ClientMock) HVals ¶
func (m *ClientMock) HVals(key string) *redis.StringSliceCmd
func (*ClientMock) IncrByFloat ¶
func (m *ClientMock) IncrByFloat(key string, value float64) *redis.FloatCmd
func (*ClientMock) Keys ¶
func (m *ClientMock) Keys(pattern string) *redis.StringSliceCmd
func (*ClientMock) LInsert ¶
func (m *ClientMock) LInsert(key, op string, pivot, value interface{}) *redis.IntCmd
func (*ClientMock) LInsertAfter ¶
func (m *ClientMock) LInsertAfter(key string, pivot, value interface{}) *redis.IntCmd
func (*ClientMock) LInsertBefore ¶
func (m *ClientMock) LInsertBefore(key string, pivot, value interface{}) *redis.IntCmd
func (*ClientMock) LPush ¶
func (m *ClientMock) LPush(key string, values ...interface{}) *redis.IntCmd
func (*ClientMock) LPushX ¶
func (m *ClientMock) LPushX(key string, value interface{}) *redis.IntCmd
func (*ClientMock) LRange ¶
func (m *ClientMock) LRange(key string, start, stop int64) *redis.StringSliceCmd
func (*ClientMock) LRem ¶
func (m *ClientMock) LRem(key string, count int64, value interface{}) *redis.IntCmd
func (*ClientMock) LSet ¶
func (m *ClientMock) LSet(key string, index int64, value interface{}) *redis.StatusCmd
func (*ClientMock) LTrim ¶
func (m *ClientMock) LTrim(key string, start, stop int64) *redis.StatusCmd
func (*ClientMock) LastSave ¶
func (m *ClientMock) LastSave() *redis.IntCmd
func (*ClientMock) MSet ¶
func (m *ClientMock) MSet(pairs ...interface{}) *redis.StatusCmd
func (*ClientMock) MSetNX ¶
func (m *ClientMock) MSetNX(pairs ...interface{}) *redis.BoolCmd
func (*ClientMock) MemoryUsage ¶ added in v1.1.0
func (m *ClientMock) MemoryUsage(key string, samples ...int) *redis.IntCmd
func (*ClientMock) ObjectEncoding ¶
func (m *ClientMock) ObjectEncoding(key string) *redis.StringCmd
func (*ClientMock) ObjectIdleTime ¶
func (m *ClientMock) ObjectIdleTime(key string) *redis.DurationCmd
func (*ClientMock) ObjectRefCount ¶
func (m *ClientMock) ObjectRefCount(key string) *redis.IntCmd
func (*ClientMock) PFMerge ¶
func (m *ClientMock) PFMerge(dest string, keys ...string) *redis.StatusCmd
func (*ClientMock) PTTL ¶
func (m *ClientMock) PTTL(key string) *redis.DurationCmd
func (*ClientMock) Ping ¶
func (m *ClientMock) Ping() *redis.StatusCmd
func (*ClientMock) Pipeline ¶
func (m *ClientMock) Pipeline() redis.Pipeliner
func (*ClientMock) PubSubChannels ¶
func (m *ClientMock) PubSubChannels(pattern string) *redis.StringSliceCmd
func (*ClientMock) PubSubNumPat ¶
func (m *ClientMock) PubSubNumPat() *redis.IntCmd
func (*ClientMock) PubSubNumSub ¶
func (m *ClientMock) PubSubNumSub(channels ...string) *redis.StringIntMapCmd
func (*ClientMock) Publish ¶
func (m *ClientMock) Publish(channel string, message interface{}) *redis.IntCmd
func (*ClientMock) Quit ¶
func (m *ClientMock) Quit() *redis.StatusCmd
func (*ClientMock) RPopLPush ¶
func (m *ClientMock) RPopLPush(source, destination string) *redis.StringCmd
func (*ClientMock) RPush ¶
func (m *ClientMock) RPush(key string, values ...interface{}) *redis.IntCmd
func (*ClientMock) RPushX ¶
func (m *ClientMock) RPushX(key string, value interface{}) *redis.IntCmd
func (*ClientMock) RandomKey ¶
func (m *ClientMock) RandomKey() *redis.StringCmd
func (*ClientMock) ReadOnly ¶ added in v1.1.0
func (m *ClientMock) ReadOnly() *redis.StatusCmd
func (*ClientMock) ReadWrite ¶ added in v1.1.0
func (m *ClientMock) ReadWrite() *redis.StatusCmd
func (*ClientMock) RestoreReplace ¶
func (*ClientMock) SAdd ¶
func (m *ClientMock) SAdd(key string, members ...interface{}) *redis.IntCmd
func (*ClientMock) SDiff ¶
func (m *ClientMock) SDiff(keys ...string) *redis.StringSliceCmd
func (*ClientMock) SDiffStore ¶
func (m *ClientMock) SDiffStore(destination string, keys ...string) *redis.IntCmd
func (*ClientMock) SInter ¶
func (m *ClientMock) SInter(keys ...string) *redis.StringSliceCmd
func (*ClientMock) SInterStore ¶
func (m *ClientMock) SInterStore(destination string, keys ...string) *redis.IntCmd
func (*ClientMock) SIsMember ¶
func (m *ClientMock) SIsMember(key string, member interface{}) *redis.BoolCmd
func (*ClientMock) SMembers ¶
func (m *ClientMock) SMembers(key string) *redis.StringSliceCmd
func (*ClientMock) SMembersMap ¶
func (m *ClientMock) SMembersMap(key string) *redis.StringStructMapCmd
func (*ClientMock) SMove ¶
func (m *ClientMock) SMove(source, destination string, member interface{}) *redis.BoolCmd
func (*ClientMock) SPopN ¶
func (m *ClientMock) SPopN(key string, count int64) *redis.StringSliceCmd
func (*ClientMock) SRandMember ¶
func (m *ClientMock) SRandMember(key string) *redis.StringCmd
func (*ClientMock) SRandMemberN ¶
func (m *ClientMock) SRandMemberN(key string, count int64) *redis.StringSliceCmd
func (*ClientMock) SRem ¶
func (m *ClientMock) SRem(key string, members ...interface{}) *redis.IntCmd
func (*ClientMock) SUnion ¶
func (m *ClientMock) SUnion(keys ...string) *redis.StringSliceCmd
func (*ClientMock) SUnionStore ¶
func (m *ClientMock) SUnionStore(destination string, keys ...string) *redis.IntCmd
func (*ClientMock) Save ¶
func (m *ClientMock) Save() *redis.StatusCmd
func (*ClientMock) ScriptExists ¶
func (m *ClientMock) ScriptExists(hashes ...string) *redis.BoolSliceCmd
func (*ClientMock) ScriptFlush ¶
func (m *ClientMock) ScriptFlush() *redis.StatusCmd
func (*ClientMock) ScriptKill ¶
func (m *ClientMock) ScriptKill() *redis.StatusCmd
func (*ClientMock) ScriptLoad ¶
func (m *ClientMock) ScriptLoad(script string) *redis.StringCmd
func (*ClientMock) Shutdown ¶
func (m *ClientMock) Shutdown() *redis.StatusCmd
func (*ClientMock) ShutdownNoSave ¶
func (m *ClientMock) ShutdownNoSave() *redis.StatusCmd
func (*ClientMock) ShutdownSave ¶
func (m *ClientMock) ShutdownSave() *redis.StatusCmd
func (*ClientMock) Sort ¶
func (m *ClientMock) Sort(key string, sort *redis.Sort) *redis.StringSliceCmd
func (*ClientMock) SortInterfaces ¶
func (*ClientMock) TTL ¶
func (m *ClientMock) TTL(key string) *redis.DurationCmd
func (*ClientMock) Time ¶
func (m *ClientMock) Time() *redis.TimeCmd
func (*ClientMock) TxPipeline ¶
func (m *ClientMock) TxPipeline() redis.Pipeliner
func (*ClientMock) TxPipelined ¶
func (*ClientMock) XAck ¶ added in v1.2.0
func (m *ClientMock) XAck(stream, group string, ids ...string) *redis.IntCmd
func (*ClientMock) XAdd ¶ added in v1.1.0
func (m *ClientMock) XAdd(a *redis.XAddArgs) *redis.StringCmd
func (*ClientMock) XClaim ¶ added in v1.2.0
func (m *ClientMock) XClaim(a *redis.XClaimArgs) *redis.XMessageSliceCmd
func (*ClientMock) XClaimJustID ¶ added in v1.2.0
func (m *ClientMock) XClaimJustID(a *redis.XClaimArgs) *redis.StringSliceCmd
func (*ClientMock) XDel ¶ added in v1.3.0
func (m *ClientMock) XDel(stream string, ids ...string) *redis.IntCmd
func (*ClientMock) XGroupCreate ¶ added in v1.2.0
func (m *ClientMock) XGroupCreate(stream, group, start string) *redis.StatusCmd
func (*ClientMock) XGroupCreateMkStream ¶ added in v1.4.0
func (m *ClientMock) XGroupCreateMkStream(stream, group, start string) *redis.StatusCmd
func (*ClientMock) XGroupDelConsumer ¶ added in v1.2.0
func (m *ClientMock) XGroupDelConsumer(stream, group, consumer string) *redis.IntCmd
func (*ClientMock) XGroupDestroy ¶ added in v1.2.0
func (m *ClientMock) XGroupDestroy(stream, group string) *redis.IntCmd
func (*ClientMock) XGroupSetID ¶ added in v1.2.0
func (m *ClientMock) XGroupSetID(stream, group, start string) *redis.StatusCmd
func (*ClientMock) XPending ¶ added in v1.2.0
func (m *ClientMock) XPending(stream, group string) *redis.XPendingCmd
func (*ClientMock) XPendingExt ¶ added in v1.2.0
func (m *ClientMock) XPendingExt(a *redis.XPendingExtArgs) *redis.XPendingExtCmd
func (*ClientMock) XRange ¶ added in v1.1.0
func (m *ClientMock) XRange(stream, start, stop string) *redis.XMessageSliceCmd
func (*ClientMock) XRangeN ¶ added in v1.1.0
func (m *ClientMock) XRangeN(stream, start, stop string, count int64) *redis.XMessageSliceCmd
func (*ClientMock) XRead ¶ added in v1.1.0
func (m *ClientMock) XRead(a *redis.XReadArgs) *redis.XStreamSliceCmd
func (*ClientMock) XReadGroup ¶ added in v1.2.0
func (m *ClientMock) XReadGroup(a *redis.XReadGroupArgs) *redis.XStreamSliceCmd
func (*ClientMock) XReadStreams ¶ added in v1.2.0
func (m *ClientMock) XReadStreams(streams ...string) *redis.XStreamSliceCmd
func (*ClientMock) XRevRange ¶ added in v1.1.0
func (m *ClientMock) XRevRange(stream string, start, stop string) *redis.XMessageSliceCmd
func (*ClientMock) XRevRangeN ¶ added in v1.1.0
func (m *ClientMock) XRevRangeN(stream string, start, stop string, count int64) *redis.XMessageSliceCmd
func (*ClientMock) XTrim ¶ added in v1.2.0
func (m *ClientMock) XTrim(key string, maxLen int64) *redis.IntCmd
func (*ClientMock) XTrimApprox ¶ added in v1.2.0
func (m *ClientMock) XTrimApprox(key string, maxLen int64) *redis.IntCmd
func (*ClientMock) ZInterStore ¶
func (*ClientMock) ZPopMax ¶ added in v1.2.0
func (m *ClientMock) ZPopMax(key string, count ...int64) *redis.ZSliceCmd
func (*ClientMock) ZPopMin ¶ added in v1.2.0
func (m *ClientMock) ZPopMin(key string, count ...int64) *redis.ZSliceCmd
func (*ClientMock) ZRange ¶
func (m *ClientMock) ZRange(key string, start, stop int64) *redis.StringSliceCmd
func (*ClientMock) ZRangeByLex ¶
func (m *ClientMock) ZRangeByLex(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
func (*ClientMock) ZRangeByScore ¶
func (m *ClientMock) ZRangeByScore(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
func (*ClientMock) ZRangeByScoreWithScores ¶
func (*ClientMock) ZRangeWithScores ¶
func (m *ClientMock) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
func (*ClientMock) ZRem ¶
func (m *ClientMock) ZRem(key string, members ...interface{}) *redis.IntCmd
func (*ClientMock) ZRemRangeByLex ¶
func (m *ClientMock) ZRemRangeByLex(key, min, max string) *redis.IntCmd
func (*ClientMock) ZRemRangeByRank ¶
func (m *ClientMock) ZRemRangeByRank(key string, start, stop int64) *redis.IntCmd
func (*ClientMock) ZRemRangeByScore ¶
func (m *ClientMock) ZRemRangeByScore(key, min, max string) *redis.IntCmd
func (*ClientMock) ZRevRange ¶
func (m *ClientMock) ZRevRange(key string, start, stop int64) *redis.StringSliceCmd
func (*ClientMock) ZRevRangeByLex ¶
func (m *ClientMock) ZRevRangeByLex(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
func (*ClientMock) ZRevRangeByScore ¶
func (m *ClientMock) ZRevRangeByScore(key string, opt redis.ZRangeBy) *redis.StringSliceCmd
func (*ClientMock) ZRevRangeByScoreWithScores ¶
func (*ClientMock) ZRevRangeWithScores ¶
func (m *ClientMock) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd
func (*ClientMock) ZUnionStore ¶
Click to show internal directories.
Click to hide internal directories.