gredis

package
v0.0.0-...-b6b8bdf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RedisObjTag = "redis"
	RedisDomain = "redis.domain"
)
View Source
const (
	CasScript = "local l=1;\n local rawVal = redis.call('hget', KEYS[1], ARGV[1])\n" +
		"if not rawVal then rawVal='' end\n" +
		"if rawVal == ARGV[2] then\n" +
		"   redis.call('hset', KEYS[1], ARGV[1], ARGV[3])\n" +
		"   return true\n" +
		"else\n" +
		"   return false\n" +
		"end\n"
)
View Source
const (
	CasValueScript = "local l=1;\n local rawVal = redis.call('get', KEYS[1])\n" +
		"if not rawVal then rawVal='' end\n" +
		"if rawVal == ARGV[1] then\n" +
		"   redis.call('set', KEYS[1], ARGV[2])\n" +
		"   return true\n" +
		"else\n" +
		"   return false\n" +
		"end\n"
)

Variables

View Source
var IRedisDriverType = reflect.TypeOf((*IRedisDriver)(nil)).Elem()

Functions

func NewRedisDriverCluster

func NewRedisDriverCluster(domain string, appGroup string, keySep string, opt *redis.ClusterOptions) *redisDriver

func NewRedisDriverStandalone

func NewRedisDriverStandalone(domain string, appGroup string, keySep string, opt *redis.Options) *redisDriver

func NewRedisTagProcessor

func NewRedisTagProcessor(driver IRedisDriver) *redisTagProcessor

Types

type AutoConfigReids

type AutoConfigReids struct {

	// 启动条件
	gioc.IBeanCondition
	gioc.IConfigBase

	IRedisDriver
	// contains filtered or unexported fields
}

func NewAutoConfigReids

func NewAutoConfigReids(cfgBase, domain string) *AutoConfigReids

func (*AutoConfigReids) PrepareProcess

func (this *AutoConfigReids) PrepareProcess()

func (*AutoConfigReids) TagProcess

func (this *AutoConfigReids) TagProcess(bean interface{}, fType reflect.StructField, fValue reflect.Value, tags map[string]string)

func (*AutoConfigReids) TagProcessorName

func (this *AutoConfigReids) TagProcessorName() string

type BoundHashOperation

type BoundHashOperation struct {
	// contains filtered or unexported fields
}

func NewBoundHashOperation

func NewBoundHashOperation(boundKey string, cmdable redis.Cmdable) *BoundHashOperation

func (*BoundHashOperation) Cas

func (this *BoundHashOperation) Cas(hashKey string, old string, new string) (bool, error)

func (*BoundHashOperation) Expire

func (this *BoundHashOperation) Expire(duration time.Duration) (bool, error)

func (*BoundHashOperation) HDel

func (this *BoundHashOperation) HDel(hashKeys ...string) (int64, error)

func (*BoundHashOperation) HExists

func (this *BoundHashOperation) HExists(hashKey string) (bool, error)

func (*BoundHashOperation) HGet

func (this *BoundHashOperation) HGet(hashKey string) (string, error)

func (*BoundHashOperation) HGetAll

func (this *BoundHashOperation) HGetAll() (map[string]string, error)

func (*BoundHashOperation) HIncrBy

func (this *BoundHashOperation) HIncrBy(hashKey string, delta int64) (int64, error)

func (*BoundHashOperation) HIncrByFloat

func (this *BoundHashOperation) HIncrByFloat(hashKey string, delta float64) (float64, error)

func (*BoundHashOperation) HKeys

func (this *BoundHashOperation) HKeys() ([]string, error)

func (*BoundHashOperation) HLen

func (this *BoundHashOperation) HLen() (int64, error)

func (*BoundHashOperation) HMGet

func (this *BoundHashOperation) HMGet(hashKeys ...string) ([]interface{}, error)

func (*BoundHashOperation) HMSet

func (this *BoundHashOperation) HMSet(kv map[string]interface{}) (string, error)

func (*BoundHashOperation) HScan

func (this *BoundHashOperation) HScan(cursor uint64, match string, count int64) *redis.ScanCmd

func (*BoundHashOperation) HSet

func (this *BoundHashOperation) HSet(hashKey string, value string) (bool, error)

func (*BoundHashOperation) HSetNX

func (this *BoundHashOperation) HSetNX(hashKey string, value string) (bool, error)

type BoundListOperation

type BoundListOperation struct {
	// contains filtered or unexported fields
}

func NewBoundListOperation

func NewBoundListOperation(boundKey string, cmdable redis.Cmdable) *BoundListOperation

func (*BoundListOperation) Expire

func (this *BoundListOperation) Expire(key string, duration time.Duration) (bool, error)

func (*BoundListOperation) LIndex

func (this *BoundListOperation) LIndex(index int64) (string, error)

func (*BoundListOperation) LInsert

func (this *BoundListOperation) LInsert(op string, pivot, value string) (int64, error)

func (*BoundListOperation) LLen

func (this *BoundListOperation) LLen() (int64, error)

func (*BoundListOperation) LPop

func (this *BoundListOperation) LPop() (string, error)

func (*BoundListOperation) LPush

func (this *BoundListOperation) LPush(value ...string) (int64, error)

func (*BoundListOperation) LPushX

func (this *BoundListOperation) LPushX(value string) (int64, error)

func (*BoundListOperation) LRange

func (this *BoundListOperation) LRange(start int64, end int64) ([]string, error)

func (*BoundListOperation) LRem

func (this *BoundListOperation) LRem(count int64, value string) (int64, error)

func (*BoundListOperation) LSet

func (this *BoundListOperation) LSet(index int64, value string) (string, error)

func (*BoundListOperation) LTrim

func (this *BoundListOperation) LTrim(start int64, end int64) (string, error)

func (*BoundListOperation) RPop

func (this *BoundListOperation) RPop() (string, error)

func (*BoundListOperation) RPush

func (this *BoundListOperation) RPush(value ...interface{}) (int64, error)

type BoundSetOperation

type BoundSetOperation struct {
	// contains filtered or unexported fields
}

func NewBoundSetOperation

func NewBoundSetOperation(boundKey string, cmdable redis.Cmdable) *BoundSetOperation

func (*BoundSetOperation) SAdd

func (this *BoundSetOperation) SAdd(values ...string) (int64, error)

func (*BoundSetOperation) SCard

func (this *BoundSetOperation) SCard() (int64, error)

func (*BoundSetOperation) SIsMember

func (this *BoundSetOperation) SIsMember(o string) (bool, error)

func (*BoundSetOperation) SMembers

func (this *BoundSetOperation) SMembers() ([]string, error)

func (*BoundSetOperation) SPop

func (this *BoundSetOperation) SPop() (string, error)

func (*BoundSetOperation) SPopN

func (this *BoundSetOperation) SPopN(count int64) ([]string, error)

func (*BoundSetOperation) SRandMember

func (this *BoundSetOperation) SRandMember() (string, error)

func (*BoundSetOperation) SRandMemberN

func (this *BoundSetOperation) SRandMemberN(count int64) ([]string, error)

func (*BoundSetOperation) SRem

func (this *BoundSetOperation) SRem(values ...string) (int64, error)

func (*BoundSetOperation) SScan

func (this *BoundSetOperation) SScan(cursor uint64, match string, count int64) *redis.ScanCmd

type BoundValueOperation

type BoundValueOperation struct {
	// contains filtered or unexported fields
}

func NewBoundValueOperation

func NewBoundValueOperation(boundKey string, cmdable redis.Cmdable) *BoundValueOperation

func (*BoundValueOperation) Append

func (this *BoundValueOperation) Append(value string) (int64, error)

func (*BoundValueOperation) Cas

func (this *BoundValueOperation) Cas(old string, new string) (bool, error)

func (*BoundValueOperation) Decr

func (this *BoundValueOperation) Decr() (int64, error)

func (*BoundValueOperation) DecrBy

func (this *BoundValueOperation) DecrBy(delta int64) (int64, error)

func (*BoundValueOperation) Expire

func (this *BoundValueOperation) Expire(key string, duration time.Duration) (bool, error)

func (*BoundValueOperation) Get

func (this *BoundValueOperation) Get() (string, error)

func (*BoundValueOperation) GetBit

func (this *BoundValueOperation) GetBit(offset int64) (int64, error)

func (*BoundValueOperation) GetRange

func (this *BoundValueOperation) GetRange(start int64, end int64) (string, error)

func (*BoundValueOperation) GetSet

func (this *BoundValueOperation) GetSet(value string) (string, error)

func (*BoundValueOperation) Incr

func (this *BoundValueOperation) Incr() (int64, error)

func (*BoundValueOperation) IncrBy

func (this *BoundValueOperation) IncrBy(delta int64) (int64, error)

func (*BoundValueOperation) IncrByFloat

func (this *BoundValueOperation) IncrByFloat(delta float64) (float64, error)

func (*BoundValueOperation) Set

func (this *BoundValueOperation) Set(value string) (string, error)

func (*BoundValueOperation) SetBit

func (this *BoundValueOperation) SetBit(offset int64, value int) (int64, error)

func (*BoundValueOperation) SetNX

func (this *BoundValueOperation) SetNX(value string) (bool, error)

func (*BoundValueOperation) SetNXTimeout

func (this *BoundValueOperation) SetNXTimeout(value string, timeout time.Duration) (bool, error)

func (*BoundValueOperation) SetRange

func (this *BoundValueOperation) SetRange(value string, offset int64) (int64, error)

func (*BoundValueOperation) SetTimeout

func (this *BoundValueOperation) SetTimeout(value string, timeout time.Duration) (string, error)

func (*BoundValueOperation) StrLen

func (this *BoundValueOperation) StrLen() (int64, error)

type BoundZSetOperation

type BoundZSetOperation struct {
	// contains filtered or unexported fields
}

func NewBoundZSetOperation

func NewBoundZSetOperation(boundKey string, cmdable redis.Cmdable) *BoundZSetOperation

func (*BoundZSetOperation) ZAdd

func (this *BoundZSetOperation) ZAdd(members ...redis.Z) (int64, error)

func (*BoundZSetOperation) ZAddCh

func (this *BoundZSetOperation) ZAddCh(members ...redis.Z) (int64, error)

func (*BoundZSetOperation) ZAddNX

func (this *BoundZSetOperation) ZAddNX(members ...redis.Z) (int64, error)

func (*BoundZSetOperation) ZAddNXCh

func (this *BoundZSetOperation) ZAddNXCh(members ...redis.Z) (int64, error)

func (*BoundZSetOperation) ZAddXX

func (this *BoundZSetOperation) ZAddXX(members ...redis.Z) (int64, error)

func (*BoundZSetOperation) ZAddXXCh

func (this *BoundZSetOperation) ZAddXXCh(members ...redis.Z) (int64, error)

func (*BoundZSetOperation) ZCard

func (this *BoundZSetOperation) ZCard() (int64, error)

func (*BoundZSetOperation) ZCount

func (this *BoundZSetOperation) ZCount(min, max string) (int64, error)

func (*BoundZSetOperation) ZIncr

func (this *BoundZSetOperation) ZIncr(member redis.Z) (float64, error)

func (*BoundZSetOperation) ZIncrBy

func (this *BoundZSetOperation) ZIncrBy(increment float64, member string) (float64, error)

func (*BoundZSetOperation) ZIncrNX

func (this *BoundZSetOperation) ZIncrNX(member redis.Z) (float64, error)

func (*BoundZSetOperation) ZIncrXX

func (this *BoundZSetOperation) ZIncrXX(member redis.Z) (float64, error)

func (*BoundZSetOperation) ZLexCount

func (this *BoundZSetOperation) ZLexCount(min, max string) (int64, error)

func (*BoundZSetOperation) ZPopMax

func (this *BoundZSetOperation) ZPopMax(count ...int64) ([]redis.Z, error)

func (*BoundZSetOperation) ZPopMin

func (this *BoundZSetOperation) ZPopMin(count ...int64) ([]redis.Z, error)

func (*BoundZSetOperation) ZRange

func (this *BoundZSetOperation) ZRange(start, stop int64) ([]string, error)

func (*BoundZSetOperation) ZRangeByLex

func (this *BoundZSetOperation) ZRangeByLex(opt redis.ZRangeBy) ([]string, error)

func (*BoundZSetOperation) ZRangeByScore

func (this *BoundZSetOperation) ZRangeByScore(opt redis.ZRangeBy) ([]string, error)

func (*BoundZSetOperation) ZRangeByScoreWithScores

func (this *BoundZSetOperation) ZRangeByScoreWithScores(opt redis.ZRangeBy) ([]redis.Z, error)

func (*BoundZSetOperation) ZRangeWithScores

func (this *BoundZSetOperation) ZRangeWithScores(start, stop int64) ([]redis.Z, error)

func (*BoundZSetOperation) ZRank

func (this *BoundZSetOperation) ZRank(member string) (int64, error)

func (*BoundZSetOperation) ZRem

func (this *BoundZSetOperation) ZRem(members ...interface{}) (int64, error)

func (*BoundZSetOperation) ZRemRangeByLex

func (this *BoundZSetOperation) ZRemRangeByLex(min, max string) (int64, error)

func (*BoundZSetOperation) ZRemRangeByRank

func (this *BoundZSetOperation) ZRemRangeByRank(start, stop int64) (int64, error)

func (*BoundZSetOperation) ZRemRangeByScore

func (this *BoundZSetOperation) ZRemRangeByScore(min, max string) (int64, error)

func (*BoundZSetOperation) ZRevRange

func (this *BoundZSetOperation) ZRevRange(start, stop int64) ([]string, error)

func (*BoundZSetOperation) ZRevRangeByLex

func (this *BoundZSetOperation) ZRevRangeByLex(opt redis.ZRangeBy) ([]string, error)

func (*BoundZSetOperation) ZRevRangeByScore

func (this *BoundZSetOperation) ZRevRangeByScore(opt redis.ZRangeBy) ([]string, error)

func (*BoundZSetOperation) ZRevRangeByScoreWithScores

func (this *BoundZSetOperation) ZRevRangeByScoreWithScores(opt redis.ZRangeBy) ([]redis.Z, error)

func (*BoundZSetOperation) ZRevRangeWithScores

func (this *BoundZSetOperation) ZRevRangeWithScores(start, stop int64) ([]redis.Z, error)

func (*BoundZSetOperation) ZRevRank

func (this *BoundZSetOperation) ZRevRank(member string) (int64, error)

func (*BoundZSetOperation) ZScore

func (this *BoundZSetOperation) ZScore(member string) (float64, error)

type HashOperation

type HashOperation struct {
	// contains filtered or unexported fields
}

func NewHashOperation

func NewHashOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *HashOperation

func (*HashOperation) Cas

func (this *HashOperation) Cas(key string, hashKey string, old string, new string) (bool, error)

func (*HashOperation) Expire

func (this *HashOperation) Expire(key string, duration time.Duration) (bool, error)

func (*HashOperation) HDel

func (this *HashOperation) HDel(key string, hashKeys ...string) (int64, error)

func (*HashOperation) HExists

func (this *HashOperation) HExists(key string, hashKey string) (bool, error)

func (*HashOperation) HGet

func (this *HashOperation) HGet(key string, hashKey string) (string, error)

func (*HashOperation) HGetAll

func (this *HashOperation) HGetAll(key string) (map[string]string, error)

func (*HashOperation) HIncrBy

func (this *HashOperation) HIncrBy(key string, hashKey string, delta int64) (int64, error)

func (*HashOperation) HIncrByFloat

func (this *HashOperation) HIncrByFloat(key string, hashKey string, delta float64) (float64, error)

func (*HashOperation) HKeys

func (this *HashOperation) HKeys(key string) ([]string, error)

func (*HashOperation) HLen

func (this *HashOperation) HLen(key string) (int64, error)

func (*HashOperation) HMGet

func (this *HashOperation) HMGet(key string, hashKeys ...string) ([]interface{}, error)

func (*HashOperation) HMSet

func (this *HashOperation) HMSet(key string, kv map[string]interface{}) (string, error)

func (*HashOperation) HScan

func (this *HashOperation) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*HashOperation) HSet

func (this *HashOperation) HSet(key string, hashKey string, value string) (bool, error)

func (*HashOperation) HSetNX

func (this *HashOperation) HSetNX(key string, hashKey string, value string) (bool, error)

type IRedisDriver

type IRedisDriver interface {
	Domain() string
	RedisDB()
	GetHashOperation() *HashOperation
	GetBoundHashOperation(key string) *BoundHashOperation
	GetListOperation() *ListOperation
	GetBoundListOperation(key string) *BoundListOperation
	GetValueOperation() *ValueOperation
	GetBoundValueOperation(key string) *BoundValueOperation
	GetSetOperation() *SetOperation
	GetBoundSetOperation(key string) *BoundSetOperation
	GetZSetOperation() *ZSetOperation
	GetBoundZSetOperation(key string) *BoundZSetOperation
	GetPriority() int
	GetMessageQueue(group, id string) gproto.IMessageQueue
	GetAttributeGroup(group, id string) gdb.IDBAttributeGroup
}

type ListOperation

type ListOperation struct {
	// contains filtered or unexported fields
}

func NewListOperation

func NewListOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *ListOperation

func (*ListOperation) BLPop

func (this *ListOperation) BLPop(timeout time.Duration, keys ...string) ([]string, error)

func (*ListOperation) BRPop

func (this *ListOperation) BRPop(timeout time.Duration, keys ...string) ([]string, error)

func (*ListOperation) BRPopLPush

func (this *ListOperation) BRPopLPush(source, destination string, timeout time.Duration) (string, error)

func (*ListOperation) Expire

func (this *ListOperation) Expire(key string, duration time.Duration) (bool, error)

func (*ListOperation) LIndex

func (this *ListOperation) LIndex(key string, index int64) (string, error)

func (*ListOperation) LInsert

func (this *ListOperation) LInsert(key, op string, pivot, value string) (int64, error)

func (*ListOperation) LLen

func (this *ListOperation) LLen(key string) (int64, error)

func (*ListOperation) LPop

func (this *ListOperation) LPop(key string) (string, error)

func (*ListOperation) LPush

func (this *ListOperation) LPush(key string, value ...string) (int64, error)

func (*ListOperation) LPushX

func (this *ListOperation) LPushX(key string, value string) (int64, error)

func (*ListOperation) LRange

func (this *ListOperation) LRange(key string, start int64, end int64) ([]string, error)

func (*ListOperation) LRem

func (this *ListOperation) LRem(key string, count int64, value string) (int64, error)

func (*ListOperation) LSet

func (this *ListOperation) LSet(key string, index int64, value string) (string, error)

func (*ListOperation) LTrim

func (this *ListOperation) LTrim(key string, start int64, end int64) (string, error)

func (*ListOperation) RPop

func (this *ListOperation) RPop(key string) (string, error)

func (*ListOperation) RPopLPush

func (this *ListOperation) RPopLPush(sourceKey string, destinationKey string) (string, error)

func (*ListOperation) RPush

func (this *ListOperation) RPush(key string, value ...interface{}) (int64, error)

type RedisAttributeGroup

type RedisAttributeGroup struct {
	// contains filtered or unexported fields
}

func NewRedisAttributeGroup

func NewRedisAttributeGroup(opt *BoundHashOperation) *RedisAttributeGroup

func (*RedisAttributeGroup) CasSetAttribute

func (this *RedisAttributeGroup) CasSetAttribute(key string, oldValue string, newValue string) bool

func (*RedisAttributeGroup) GetAttribute

func (this *RedisAttributeGroup) GetAttribute(key string) (string, error)

func (*RedisAttributeGroup) SetAttribute

func (this *RedisAttributeGroup) SetAttribute(key string, value string) error

func (*RedisAttributeGroup) SetAttributes

func (this *RedisAttributeGroup) SetAttributes(values map[string]interface{}) error

func (*RedisAttributeGroup) SetExpireDuration

func (this *RedisAttributeGroup) SetExpireDuration(duration time.Duration) error

type RedisMQBundle

type RedisMQBundle struct {
	// contains filtered or unexported fields
}

func NewRedisMQBundle

func NewRedisMQBundle(queue string, encoder gproto.IEncoder, decoder gproto.IDecoder, listOpt *ListOperation) *RedisMQBundle

func (*RedisMQBundle) Pop

func (this *RedisMQBundle) Pop(id interface{}, num int) []interface{}

func (*RedisMQBundle) Push

func (this *RedisMQBundle) Push(id interface{}, msg interface{}) bool

type RedisMessageQueue

type RedisMessageQueue struct {
	// contains filtered or unexported fields
}

func NewRedisMessageQueue

func NewRedisMessageQueue(queue string, listOpt *ListOperation) *RedisMessageQueue

func (*RedisMessageQueue) Name

func (this *RedisMessageQueue) Name() string

func (*RedisMessageQueue) Pop

func (this *RedisMessageQueue) Pop(num int) []string

func (*RedisMessageQueue) Push

func (this *RedisMessageQueue) Push(msg string) bool

func (*RedisMessageQueue) SetExpireDuration

func (this *RedisMessageQueue) SetExpireDuration(duration time.Duration) error

type SetOperation

type SetOperation struct {
	// contains filtered or unexported fields
}

func NewSetOperation

func NewSetOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *SetOperation

func (*SetOperation) SAdd

func (this *SetOperation) SAdd(key string, values ...string) (int64, error)

func (*SetOperation) SCard

func (this *SetOperation) SCard(key string) (int64, error)

func (*SetOperation) SDiff

func (this *SetOperation) SDiff(keys ...string) ([]string, error)

func (*SetOperation) SDiffStore

func (this *SetOperation) SDiffStore(destination string, keys ...string) (int64, error)

func (*SetOperation) SInter

func (this *SetOperation) SInter(keys ...string) ([]string, error)

func (*SetOperation) SInterStore

func (this *SetOperation) SInterStore(destination string, keys ...string) (int64, error)

func (*SetOperation) SIsMember

func (this *SetOperation) SIsMember(key string, o string) (bool, error)

func (*SetOperation) SMembers

func (this *SetOperation) SMembers(key string) ([]string, error)

func (*SetOperation) SMove

func (this *SetOperation) SMove(key string, value string, destKey string) (bool, error)

func (*SetOperation) SPop

func (this *SetOperation) SPop(key string) (string, error)

func (*SetOperation) SPopN

func (this *SetOperation) SPopN(key string, count int64) ([]string, error)

func (*SetOperation) SRandMember

func (this *SetOperation) SRandMember(key string) (string, error)

func (*SetOperation) SRandMemberN

func (this *SetOperation) SRandMemberN(key string, count int64) ([]string, error)

func (*SetOperation) SRem

func (this *SetOperation) SRem(key string, values ...string) (int64, error)

func (*SetOperation) SScan

func (this *SetOperation) SScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*SetOperation) SUnion

func (this *SetOperation) SUnion(keys ...string) ([]string, error)

func (*SetOperation) SUnionStore

func (this *SetOperation) SUnionStore(destination string, keys ...string) (int64, error)

type ValueOperation

type ValueOperation struct {
	// contains filtered or unexported fields
}

func NewValueOperation

func NewValueOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *ValueOperation

func (*ValueOperation) Append

func (this *ValueOperation) Append(key string, value string) (int64, error)

func (*ValueOperation) Cas

func (this *ValueOperation) Cas(key string, old string, new string) (bool, error)

func (*ValueOperation) Decr

func (this *ValueOperation) Decr(key string) (int64, error)

func (*ValueOperation) DecrBy

func (this *ValueOperation) DecrBy(key string, delta int64) (int64, error)

func (*ValueOperation) Expire

func (this *ValueOperation) Expire(key string, duration time.Duration) (bool, error)

func (*ValueOperation) Get

func (this *ValueOperation) Get(key string) (string, error)

func (*ValueOperation) GetBit

func (this *ValueOperation) GetBit(key string, offset int64) (int64, error)

func (*ValueOperation) GetRange

func (this *ValueOperation) GetRange(key string, start int64, end int64) (string, error)

func (*ValueOperation) GetSet

func (this *ValueOperation) GetSet(key string, value string) (string, error)

func (*ValueOperation) Incr

func (this *ValueOperation) Incr(key string) (int64, error)

func (*ValueOperation) IncrBy

func (this *ValueOperation) IncrBy(key string, delta int64) (int64, error)

func (*ValueOperation) IncrByFloat

func (this *ValueOperation) IncrByFloat(key string, delta float64) (float64, error)

func (*ValueOperation) MGet

func (this *ValueOperation) MGet(keys ...string) ([]string, error)

func (*ValueOperation) MSet

func (this *ValueOperation) MSet(kvalues map[string]string) (string, error)

func (*ValueOperation) MSetNX

func (this *ValueOperation) MSetNX(kvalues map[string]string) (bool, error)

func (*ValueOperation) Set

func (this *ValueOperation) Set(key string, value string) (string, error)

func (*ValueOperation) SetBit

func (this *ValueOperation) SetBit(key string, offset int64, value int) (int64, error)

func (*ValueOperation) SetNX

func (this *ValueOperation) SetNX(key string, value string) (bool, error)

func (*ValueOperation) SetNXTimeout

func (this *ValueOperation) SetNXTimeout(key string, value string, timeout time.Duration) (bool, error)

func (*ValueOperation) SetRange

func (this *ValueOperation) SetRange(key string, value string, offset int64) (int64, error)

func (*ValueOperation) SetTimeout

func (this *ValueOperation) SetTimeout(key string, value string, timeout time.Duration) (string, error)

func (*ValueOperation) StrLen

func (this *ValueOperation) StrLen(key string) (int64, error)

type WrapKeyFunc

type WrapKeyFunc func(key string) string

type ZSetOperation

type ZSetOperation struct {
	// contains filtered or unexported fields
}

func NewZSetOperation

func NewZSetOperation(wrapKeyFunc WrapKeyFunc, cmdable redis.Cmdable) *ZSetOperation

func (*ZSetOperation) Add

func (this *ZSetOperation) Add(key string, members ...redis.Z) (int64, error)

func (*ZSetOperation) BZPopMax

func (this *ZSetOperation) BZPopMax(timeout time.Duration, keys ...string) (redis.ZWithKey, error)

func (*ZSetOperation) BZPopMin

func (this *ZSetOperation) BZPopMin(timeout time.Duration, keys ...string) (redis.ZWithKey, error)

func (*ZSetOperation) ZAddCh

func (this *ZSetOperation) ZAddCh(key string, members ...redis.Z) (int64, error)

func (*ZSetOperation) ZAddNX

func (this *ZSetOperation) ZAddNX(key string, members ...redis.Z) (int64, error)

func (*ZSetOperation) ZAddNXCh

func (this *ZSetOperation) ZAddNXCh(key string, members ...redis.Z) (int64, error)

func (*ZSetOperation) ZAddXX

func (this *ZSetOperation) ZAddXX(key string, members ...redis.Z) (int64, error)

func (*ZSetOperation) ZAddXXCh

func (this *ZSetOperation) ZAddXXCh(key string, members ...redis.Z) (int64, error)

func (*ZSetOperation) ZCard

func (this *ZSetOperation) ZCard(key string) (int64, error)

func (*ZSetOperation) ZCount

func (this *ZSetOperation) ZCount(key, min, max string) (int64, error)

func (*ZSetOperation) ZIncr

func (this *ZSetOperation) ZIncr(key string, member redis.Z) (float64, error)

func (*ZSetOperation) ZIncrBy

func (this *ZSetOperation) ZIncrBy(key string, increment float64, member string) (float64, error)

func (*ZSetOperation) ZIncrNX

func (this *ZSetOperation) ZIncrNX(key string, member redis.Z) (float64, error)

func (*ZSetOperation) ZIncrXX

func (this *ZSetOperation) ZIncrXX(key string, member redis.Z) (float64, error)

func (*ZSetOperation) ZInterStore

func (this *ZSetOperation) ZInterStore(destination string, store redis.ZStore, keys ...string) (int64, error)

func (*ZSetOperation) ZLexCount

func (this *ZSetOperation) ZLexCount(key, min, max string) (int64, error)

func (*ZSetOperation) ZPopMax

func (this *ZSetOperation) ZPopMax(key string, count ...int64) ([]redis.Z, error)

func (*ZSetOperation) ZPopMin

func (this *ZSetOperation) ZPopMin(key string, count ...int64) ([]redis.Z, error)

func (*ZSetOperation) ZRange

func (this *ZSetOperation) ZRange(key string, start, stop int64) ([]string, error)

func (*ZSetOperation) ZRangeByLex

func (this *ZSetOperation) ZRangeByLex(key string, opt redis.ZRangeBy) ([]string, error)

func (*ZSetOperation) ZRangeByScore

func (this *ZSetOperation) ZRangeByScore(key string, opt redis.ZRangeBy) ([]string, error)

func (*ZSetOperation) ZRangeByScoreWithScores

func (this *ZSetOperation) ZRangeByScoreWithScores(key string, opt redis.ZRangeBy) ([]redis.Z, error)

func (*ZSetOperation) ZRangeWithScores

func (this *ZSetOperation) ZRangeWithScores(key string, start, stop int64) ([]redis.Z, error)

func (*ZSetOperation) ZRank

func (this *ZSetOperation) ZRank(key, member string) (int64, error)

func (*ZSetOperation) ZRem

func (this *ZSetOperation) ZRem(key string, members ...interface{}) (int64, error)

func (*ZSetOperation) ZRemRangeByLex

func (this *ZSetOperation) ZRemRangeByLex(key, min, max string) (int64, error)

func (*ZSetOperation) ZRemRangeByRank

func (this *ZSetOperation) ZRemRangeByRank(key string, start, stop int64) (int64, error)

func (*ZSetOperation) ZRemRangeByScore

func (this *ZSetOperation) ZRemRangeByScore(key, min, max string) (int64, error)

func (*ZSetOperation) ZRevRange

func (this *ZSetOperation) ZRevRange(key string, start, stop int64) ([]string, error)

func (*ZSetOperation) ZRevRangeByLex

func (this *ZSetOperation) ZRevRangeByLex(key string, opt redis.ZRangeBy) ([]string, error)

func (*ZSetOperation) ZRevRangeByScore

func (this *ZSetOperation) ZRevRangeByScore(key string, opt redis.ZRangeBy) ([]string, error)

func (*ZSetOperation) ZRevRangeByScoreWithScores

func (this *ZSetOperation) ZRevRangeByScoreWithScores(key string, opt redis.ZRangeBy) ([]redis.Z, error)

func (*ZSetOperation) ZRevRangeWithScores

func (this *ZSetOperation) ZRevRangeWithScores(key string, start, stop int64) ([]redis.Z, error)

func (*ZSetOperation) ZRevRank

func (this *ZSetOperation) ZRevRank(key, member string) (int64, error)

func (*ZSetOperation) ZScore

func (this *ZSetOperation) ZScore(key, member string) (float64, error)

func (*ZSetOperation) ZUnionStore

func (this *ZSetOperation) ZUnionStore(dest string, store redis.ZStore, keys ...string) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL