Versions in this module Expand all Collapse all v6 v6.0.0 Dec 21, 2020 Changes in this version + type ClientMock struct + func NewMock() *ClientMock + func NewNiceMock(client *redis.Client) *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 Other modules containing this package github.com/elliotchance/redismock github.com/elliotchance/redismock/v7 github.com/elliotchance/redismock/v8