rredis

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: GPL-3.0 Imports: 10 Imported by: 2

README

rose-redis

Introduce

Derived from the built-in redis methods in go-zero project, we have enhanced and optimized operations on redis.

Install

go get -u github.com/leafney/rose-redis

Use

    // client,err := rredis.NewRedis("127.0.0.1:6379", nil)
    client, err := NewRedis("127.0.0.1:6379", &Option{
        DB:   3,
        Type: TypeNode,
    })
	if err != nil{
		fmt.Println(err)
		return
	}
	
	client.Set("hello", "world")

Methods

zset
  • ZRange
  • ZRangeCtx
  • ZRangeByScore
  • ZRangeByScoreCtx
  • ZRangeByScoreAll
  • ZRangeByScoreAllCtx
  • ZRangeByScoreAndLimit
  • ZRangeByScoreAndLimitCtx
  • ZRangeByScoreAllAndLimit
  • ZRangeByScoreAllAndLimitCtx
  • ZRangeWithScores
  • ZRangeWithScoresCtx
  • ZRangeWithScoresFloat
  • ZRangeWithScoresFloatCtx
  • ZRangeByScoreWithScores
  • ZRangeByScoreWithScoresCtx
  • ZRangeByScoreWithScoresAll
  • ZRangeByScoreWithScoresAllCtx
  • ZRangeByScoreWithScoresInt64
  • ZRangeByScoreWithScoresInt64Ctx
  • ZRangeByScoreWithScoresFloat
  • ZRangeByScoreWithScoresFloatCtx
  • ZRangeByScoreWithScoresAndLimit
  • ZRangeByScoreWithScoresAndLimitCtx
  • ZRangeByScoreWithScoresAllAndLimit
  • ZRangeByScoreWithScoresAllAndLimitCtx
  • ZRangeByScoreWithScoresInt64AndLimit
  • ZRangeByScoreWithScoresInt64AndLimitCtx
  • ZRangeByScoreWithScoresFloatAndLimit
  • ZRangeByScoreWithScoresFloatAndLimitCtx
  • ZRangeByScoreWithScoresInt64AllLimit
  • ZRangeByScoreWithScoresInt64AllLimitCtx
  • ZRangeByScoreWithScoresFloatAllLimit
  • ZRangeByScoreWithScoresFloatAllLimitCtx
  • ZRevRange
  • ZRevRangeCtx
  • ZRevRangeByScore
  • ZRevRangeByScoreCtx
  • ZRevRangeByScoreAll
  • ZRevRangeByScoreAllCtx
  • ZRevRangeByScoreAndLimit
  • ZRevRangeByScoreAndLimitCtx
  • ZRevRangeByScoreAllAndLimit
  • ZRevRangeByScoreAllAndLimitCtx
  • ZRevRangeByScoreWithScores
  • ZRevRangeByScoreWithScoresCtx
  • ZRevRangeByScoreWithScoresAll
  • ZRevRangeByScoreWithScoresAllCtx
  • ZRevRangeByScoreWithScoresInt64
  • ZRevRangeByScoreWithScoresInt64Ctx
  • ZRevRangeByScoreWithScoresFloat
  • ZRevRangeByScoreWithScoresFloatCtx
  • ZRevRangeByScoreWithScoresAndLimit
  • ZRevRangeByScoreWithScoresAndLimitCtx
  • ZRevRangeByScoreWithScoresAllAndLimit
  • ZRevRangeByScoreWithScoresAllAndLimitCtx
  • ZRevRangeByScoreWithScoresInt64AndLimit
  • ZRevRangeByScoreWithScoresInt64AndLimitCtx
  • ZRevRangeByScoreWithScoresFloatAndLimit
  • ZRevRangeByScoreWithScoresFloatAndLimitCtx
  • ZRevRangeByScoreWithScoresInt64AllLimit
  • ZRevRangeByScoreWithScoresInt64AllLimitCtx
  • ZRevRangeByScoreWithScoresFloatAllLimit
  • ZRevRangeByScoreWithScoresFloatAllLimitCtx

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilNode is an error that indicates a nil redis node.
	ErrNilNode = errors.New("nil redis node")
)

Functions

func Repr

func Repr(v interface{}) string

Repr returns the string representation of v.

Types

type FloatCmd

type FloatCmd = red.FloatCmd

FloatCmd is an alias of redis.FloatCmd.

type FloatPair added in v0.1.3

type FloatPair struct {
	Key   string
	Score float64
}

A FloatPair is a key/pair for float set used in redis zet.

type GeoLocation

type GeoLocation = red.GeoLocation

GeoLocation is used with GeoAdd to add geospatial location.

type GeoPos

type GeoPos = red.GeoPos

GeoPos is used to represent a geo position.

type GeoRadiusQuery

type GeoRadiusQuery = red.GeoRadiusQuery

GeoRadiusQuery is used with GeoRadius to query geospatial index.

type IntCmd

type IntCmd = red.IntCmd

IntCmd is an alias of redis.IntCmd.

type Option

type Option struct {

	//
	Type RType
	Pass string
	DB   int
	Tls  bool
	// contains filtered or unexported fields
}

type Pair added in v0.1.3

type Pair struct {
	Key   string
	Score int64
}

A Pair is a key/pair set used in redis zset.

type Pipeliner

type Pipeliner = red.Pipeliner

Pipeliner is an alias of redis.Pipeliner.

type RType added in v0.1.3

type RType string
const (
	// TypeCluster means redis cluster.
	TypeCluster RType = "cluster"
	// TypeNode means redis node.
	TypeNode RType = "node"
	// Nil is an alias of redis.Nil.
	Nil = red.Nil
)

type Redis

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

func MustNewRedis added in v0.1.6

func MustNewRedis(addr string, opts *Option) *Redis

MustNewRedis returns a Redis with given options.

func NewClient added in v1.0.1

func NewClient(addr string, opt *Option) *Redis

func NewRedis

func NewRedis(addr string, opt *Option) (*Redis, error)

func (*Redis) Append added in v0.1.4

func (s *Redis) Append(key string, value string) (val int64, err error)

Append is the implementation of redis append command.

func (*Redis) AppendCtx added in v0.1.4

func (s *Redis) AppendCtx(ctx context.Context, key string, value string) (val int64, err error)

AppendCtx is the implementation of redis append command.

func (*Redis) BLPop added in v0.1.8

func (s *Redis) BLPop(key string) (string, error)

BLPop Execute blocking queries with default timeout 5 seconds

func (*Redis) BLPopCtx added in v0.1.8

func (s *Redis) BLPopCtx(ctx context.Context, key string) (string, error)

BLPopCtx Execute blocking queries with default timeout 5 seconds

func (*Redis) BLPopWithTimeout added in v0.1.8

func (s *Redis) BLPopWithTimeout(timeout time.Duration, keys ...string) (string, error)

BLPopWithTimeout Execute blocking queries with timeout

func (*Redis) BLPopWithTimeoutCtx added in v0.1.8

func (s *Redis) BLPopWithTimeoutCtx(ctx context.Context, timeout time.Duration, keys ...string) (string, error)

BLPopWithTimeoutCtx Execute blocking queries with timeout

func (*Redis) BRPop added in v0.1.8

func (s *Redis) BRPop(key string) (string, error)

BRPop Execute blocking queries with default timeout 5 seconds

func (*Redis) BRPopCtx added in v0.1.8

func (s *Redis) BRPopCtx(ctx context.Context, key string) (string, error)

BRPopCtx Execute blocking queries with default timeout 5 seconds

func (*Redis) BRPopLPush added in v0.1.8

func (s *Redis) BRPopLPush(sourceKey string, destKey string, timeout time.Duration) (string, error)

BRPopLPush

func (*Redis) BRPopLPushCtx added in v0.1.8

func (s *Redis) BRPopLPushCtx(ctx context.Context, sourceKey string, destKey string, timeout time.Duration) (string, error)

BRPopLPushCtx

func (*Redis) BRPopWithTimeout added in v0.1.8

func (s *Redis) BRPopWithTimeout(timeout time.Duration, keys ...string) (string, error)

BRPopWithTimeout Execute blocking queries with timeout

func (*Redis) BRPopWithTimeoutCtx added in v0.1.8

func (s *Redis) BRPopWithTimeoutCtx(ctx context.Context, timeout time.Duration, keys ...string) (string, error)

BRPopWithTimeoutCtx Execute blocking queries with timeout

func (*Redis) BitCount

func (s *Redis) BitCount(key string, start, end int64) (int64, error)

BitCount is redis bitcount command implementation.

func (*Redis) BitCountCtx

func (s *Redis) BitCountCtx(ctx context.Context, key string, start, end int64) (val int64, err error)

BitCountCtx is redis bitcount command implementation.

func (*Redis) BitOpAnd

func (s *Redis) BitOpAnd(destKey string, keys ...string) (int64, error)

BitOpAnd is redis bit operation (and) command implementation.

func (*Redis) BitOpAndCtx

func (s *Redis) BitOpAndCtx(ctx context.Context, destKey string, keys ...string) (val int64, err error)

BitOpAndCtx is redis bit operation (and) command implementation.

func (*Redis) BitOpNot

func (s *Redis) BitOpNot(destKey, key string) (int64, error)

BitOpNot is redis bit operation (not) command implementation.

func (*Redis) BitOpNotCtx

func (s *Redis) BitOpNotCtx(ctx context.Context, destKey, key string) (val int64, err error)

BitOpNotCtx is redis bit operation (not) command implementation.

func (*Redis) BitOpOr

func (s *Redis) BitOpOr(destKey string, keys ...string) (int64, error)

BitOpOr is redis bit operation (or) command implementation.

func (*Redis) BitOpOrCtx

func (s *Redis) BitOpOrCtx(ctx context.Context, destKey string, keys ...string) (val int64, err error)

BitOpOrCtx is redis bit operation (or) command implementation.

func (*Redis) BitOpXor

func (s *Redis) BitOpXor(destKey string, keys ...string) (int64, error)

BitOpXor is redis bit operation (xor) command implementation.

func (*Redis) BitOpXorCtx

func (s *Redis) BitOpXorCtx(ctx context.Context, destKey string, keys ...string) (val int64, err error)

BitOpXorCtx is redis bit operation (xor) command implementation.

func (*Redis) BitPos

func (s *Redis) BitPos(key string, bit, start, end int64) (int64, error)

BitPos is redis bitpos command implementation.

func (*Redis) BitPosCtx

func (s *Redis) BitPosCtx(ctx context.Context, key string, bit, start, end int64) (val int64, err error)

BitPosCtx is redis bitpos command implementation.

func (*Redis) Close added in v0.1.3

func (s *Redis) Close() error

Close

func (*Redis) Decr

func (s *Redis) Decr(key string) (int64, error)

Decr is the implementation of redis decr command.

func (*Redis) DecrBy

func (s *Redis) DecrBy(key string, decrement int64) (int64, error)

DecrBy is the implementation of redis decrby command.

func (*Redis) DecrByCtx

func (s *Redis) DecrByCtx(ctx context.Context, key string, decrement int64) (val int64, err error)

DecrByCtx is the implementation of redis decrby command.

func (*Redis) DecrCtx

func (s *Redis) DecrCtx(ctx context.Context, key string) (val int64, err error)

DecrCtx is the implementation of redis decr command.

func (*Redis) Del

func (s *Redis) Del(keys ...string) (int64, error)

Del deletes keys.

func (*Redis) DelCtx

func (s *Redis) DelCtx(ctx context.Context, keys ...string) (val int64, err error)

DelCtx deletes keys.

func (*Redis) Eval

func (s *Redis) Eval(script string, keys []string, args ...interface{}) (interface{}, error)

Eval is the implementation of redis eval command.

func (*Redis) EvalCtx

func (s *Redis) EvalCtx(ctx context.Context, script string, keys []string,
	args ...interface{}) (val interface{}, err error)

EvalCtx is the implementation of redis eval command.

func (*Redis) EvalSha

func (s *Redis) EvalSha(sha string, keys []string, args ...interface{}) (interface{}, error)

EvalSha is the implementation of redis evalsha command.

func (*Redis) EvalShaCtx

func (s *Redis) EvalShaCtx(ctx context.Context, sha string, keys []string,
	args ...interface{}) (val interface{}, err error)

EvalShaCtx is the implementation of redis evalsha command.

func (*Redis) Exists

func (s *Redis) Exists(key string) (bool, error)

Exists is the implementation of redis exists command.

func (*Redis) ExistsCtx

func (s *Redis) ExistsCtx(ctx context.Context, key string) (val bool, err error)

ExistsCtx is the implementation of redis exists command.

func (*Redis) Expire

func (s *Redis) Expire(key string, seconds int64) error

Expire is the implementation of redis expire command.

func (*Redis) ExpireAt

func (s *Redis) ExpireAt(key string, expireTime int64) error

ExpireAt is the implementation of redis expireat command.

func (*Redis) ExpireAtCtx

func (s *Redis) ExpireAtCtx(ctx context.Context, key string, expireTime int64) error

ExpireAtCtx is the implementation of redis expireat command.

func (*Redis) ExpireCtx

func (s *Redis) ExpireCtx(ctx context.Context, key string, seconds int64) error

ExpireCtx is the implementation of redis expire command.

func (*Redis) GeoAdd

func (s *Redis) GeoAdd(key string, geoLocation ...*GeoLocation) (int64, error)

GeoAdd is the implementation of redis geoadd command.

func (*Redis) GeoAddCtx

func (s *Redis) GeoAddCtx(ctx context.Context, key string, geoLocation ...*GeoLocation) (
	val int64, err error)

GeoAddCtx is the implementation of redis geoadd command.

func (*Redis) GeoDist

func (s *Redis) GeoDist(key, member1, member2, unit string) (float64, error)

GeoDist is the implementation of redis geodist command.

func (*Redis) GeoDistCtx

func (s *Redis) GeoDistCtx(ctx context.Context, key, member1, member2, unit string) (
	val float64, err error)

GeoDistCtx is the implementation of redis geodist command.

func (*Redis) GeoHash

func (s *Redis) GeoHash(key string, members ...string) ([]string, error)

GeoHash is the implementation of redis geohash command.

func (*Redis) GeoHashCtx

func (s *Redis) GeoHashCtx(ctx context.Context, key string, members ...string) (
	val []string, err error)

GeoHashCtx is the implementation of redis geohash command.

func (*Redis) GeoPos

func (s *Redis) GeoPos(key string, members ...string) ([]*GeoPos, error)

GeoPos is the implementation of redis geopos command.

func (*Redis) GeoPosCtx

func (s *Redis) GeoPosCtx(ctx context.Context, key string, members ...string) (
	val []*GeoPos, err error)

GeoPosCtx is the implementation of redis geopos command.

func (*Redis) GeoRadius

func (s *Redis) GeoRadius(key string, longitude, latitude float64, query *GeoRadiusQuery) (
	[]GeoLocation, error)

GeoRadius is the implementation of redis georadius command.

func (*Redis) GeoRadiusByMember

func (s *Redis) GeoRadiusByMember(key, member string, query *GeoRadiusQuery) ([]GeoLocation, error)

GeoRadiusByMember is the implementation of redis georadiusbymember command.

func (*Redis) GeoRadiusByMemberCtx

func (s *Redis) GeoRadiusByMemberCtx(ctx context.Context, key, member string,
	query *GeoRadiusQuery) (val []GeoLocation, err error)

GeoRadiusByMemberCtx is the implementation of redis georadiusbymember command.

func (*Redis) GeoRadiusCtx

func (s *Redis) GeoRadiusCtx(ctx context.Context, key string, longitude, latitude float64,
	query *GeoRadiusQuery) (val []GeoLocation, err error)

GeoRadiusCtx is the implementation of redis georadius command.

func (*Redis) Get

func (s *Redis) Get(key string) (string, error)

Get is the implementation of redis get command.

func (*Redis) GetBit

func (s *Redis) GetBit(key string, offset int64) (int64, error)

GetBit is the implementation of redis getbit command.

func (*Redis) GetBitCtx

func (s *Redis) GetBitCtx(ctx context.Context, key string, offset int64) (val int64, err error)

GetBitCtx is the implementation of redis getbit command.

func (*Redis) GetCtx

func (s *Redis) GetCtx(ctx context.Context, key string) (val string, err error)

GetCtx is the implementation of redis get command.

func (*Redis) GetSet

func (s *Redis) GetSet(key string, value interface{}) (string, error)

GetSet is the implementation of redis getset command.

func (*Redis) GetSetCtx

func (s *Redis) GetSetCtx(ctx context.Context, key string, value interface{}) (val string, err error)

GetSetCtx is the implementation of redis getset command.

func (*Redis) GetWithCache added in v0.1.6

func (s *Redis) GetWithCache(key string, minExpire, maxExpire int64, queryFunc func() (interface{}, error)) (interface{}, error)

func (*Redis) HDel

func (s *Redis) HDel(key string, fields ...string) (bool, error)

HDel is the implementation of redis hdel command.

func (*Redis) HDelCtx

func (s *Redis) HDelCtx(ctx context.Context, key string, fields ...string) (val bool, err error)

HDelCtx is the implementation of redis hdel command.

func (*Redis) HExists

func (s *Redis) HExists(key, field string) (bool, error)

HExists is the implementation of redis hexists command.

func (*Redis) HExistsCtx

func (s *Redis) HExistsCtx(ctx context.Context, key, field string) (val bool, err error)

HExistsCtx is the implementation of redis hexists command.

func (*Redis) HGet

func (s *Redis) HGet(key, field string) (string, error)

HGet is the implementation of redis hget command.

func (*Redis) HGetAll

func (s *Redis) HGetAll(key string) (map[string]string, error)

HGetAll is the implementation of redis hgetall command.

func (*Redis) HGetAllCtx

func (s *Redis) HGetAllCtx(ctx context.Context, key string) (val map[string]string, err error)

HGetAllCtx is the implementation of redis hgetall command.

func (*Redis) HGetCtx

func (s *Redis) HGetCtx(ctx context.Context, key, field string) (val string, err error)

HGetCtx is the implementation of redis hget command.

func (*Redis) HIncrBy

func (s *Redis) HIncrBy(key, field string, increment int64) (int64, error)

HIncrBy is the implementation of redis hincrby command.

func (*Redis) HIncrByCtx

func (s *Redis) HIncrByCtx(ctx context.Context, key, field string, increment int64) (val int64, err error)

HIncrByCtx is the implementation of redis hincrby command.

func (*Redis) HIncrByFloat

func (s *Redis) HIncrByFloat(key, field string, increment float64) (float64, error)

HIncrByFloat is the implementation of redis hincrbyfloat command.

func (*Redis) HIncrByFloatCtx

func (s *Redis) HIncrByFloatCtx(ctx context.Context, key, field string, increment float64) (val float64, err error)

HIncrByFloatCtx is the implementation of redis hincrbyfloat command.

func (*Redis) HKeys

func (s *Redis) HKeys(key string) ([]string, error)

HKeys is the implementation of redis hkeys command.

func (*Redis) HKeysCtx

func (s *Redis) HKeysCtx(ctx context.Context, key string) (val []string, err error)

HKeysCtx is the implementation of redis hkeys command.

func (*Redis) HLen

func (s *Redis) HLen(key string) (int64, error)

HLen is the implementation of redis hlen command.

func (*Redis) HLenCtx

func (s *Redis) HLenCtx(ctx context.Context, key string) (val int64, err error)

HLenCtx is the implementation of redis hlen command.

func (*Redis) HMGet

func (s *Redis) HMGet(key string, fields ...string) ([]string, error)

HMGet is the implementation of redis hmget command.

func (*Redis) HMGetCtx

func (s *Redis) HMGetCtx(ctx context.Context, key string, fields ...string) (val []string, err error)

HMGetCtx is the implementation of redis hmget command.

func (*Redis) HMSet

func (s *Redis) HMSet(key string, fieldsAndValues map[string]string) error

HMSet is the implementation of redis hmset command.

func (*Redis) HMSetCtx

func (s *Redis) HMSetCtx(ctx context.Context, key string, fieldsAndValues map[string]string) error

HMSetCtx is the implementation of redis hmset command.

func (*Redis) HScan

func (s *Redis) HScan(key string, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

HScan is the implementation of redis hscan command.

func (*Redis) HScanCtx

func (s *Redis) HScanCtx(ctx context.Context, key string, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

HScanCtx is the implementation of redis hscan command.

func (*Redis) HSet

func (s *Redis) HSet(key, field, value string) error

HSet is the implementation of redis hset command.

func (*Redis) HSetCtx

func (s *Redis) HSetCtx(ctx context.Context, key, field, value string) error

HSetCtx is the implementation of redis hset command.

func (*Redis) HSetNX

func (s *Redis) HSetNX(key, field, value string) (bool, error)

HSetNX is the implementation of redis hsetnx command.

func (*Redis) HSetNXCtx

func (s *Redis) HSetNXCtx(ctx context.Context, key, field, value string) (val bool, err error)

HSetNXCtx is the implementation of redis hsetnx command.

func (*Redis) HVals

func (s *Redis) HVals(key string) ([]string, error)

HVals is the implementation of redis hvals command.

func (*Redis) HValsCtx

func (s *Redis) HValsCtx(ctx context.Context, key string) (val []string, err error)

HValsCtx is the implementation of redis hvals command.

func (*Redis) Incr added in v0.1.3

func (s *Redis) Incr(key string) (int64, error)

Incr is the implementation of redis incr command.

func (*Redis) IncrBy added in v0.1.3

func (s *Redis) IncrBy(key string, increment int64) (int64, error)

IncrBy is the implementation of redis incrby command.

func (*Redis) IncrByCtx added in v0.1.3

func (s *Redis) IncrByCtx(ctx context.Context, key string, increment int64) (val int64, err error)

IncrByCtx is the implementation of redis incrby command.

func (*Redis) IncrByFloat added in v0.1.3

func (s *Redis) IncrByFloat(key string, increment float64) (float64, error)

IncrByFloat is the implementation of redis incrbyfloat command.

func (*Redis) IncrByFloatCtx added in v0.1.3

func (s *Redis) IncrByFloatCtx(ctx context.Context, key string, increment float64) (val float64, err error)

IncrByFloatCtx is the implementation of redis incrbyfloat command.

func (*Redis) IncrCtx added in v0.1.3

func (s *Redis) IncrCtx(ctx context.Context, key string) (val int64, err error)

IncrCtx is the implementation of redis incr command.

func (*Redis) Keys added in v0.1.3

func (s *Redis) Keys(pattern string) ([]string, error)

Keys is the implementation of redis keys command.

func (*Redis) KeysCtx added in v0.1.3

func (s *Redis) KeysCtx(ctx context.Context, pattern string) (val []string, err error)

KeysCtx is the implementation of redis keys command.

func (*Redis) LIndex added in v0.1.3

func (s *Redis) LIndex(key string, index int64) (string, error)

LIndex is the implementation of redis lindex command.

func (*Redis) LIndexCtx added in v0.1.3

func (s *Redis) LIndexCtx(ctx context.Context, key string, index int64) (val string, err error)

LIndexCtx is the implementation of redis lindex command.

func (*Redis) LLen added in v0.1.3

func (s *Redis) LLen(key string) (int64, error)

LLen is the implementation of redis llen command.

func (*Redis) LLenCtx added in v0.1.3

func (s *Redis) LLenCtx(ctx context.Context, key string) (val int64, err error)

LLenCtx is the implementation of redis llen command.

func (*Redis) LPop added in v0.1.3

func (s *Redis) LPop(key string) (string, error)

LPop is the implementation of redis lpop command.

func (*Redis) LPopCount added in v0.1.3

func (s *Redis) LPopCount(key string, count int) ([]string, error)

LPopCount is the implementation of redis lpopCount command.

func (*Redis) LPopCountCtx added in v0.1.3

func (s *Redis) LPopCountCtx(ctx context.Context, key string, count int) (val []string, err error)

LPopCountCtx is the implementation of redis lpopCount command.

func (*Redis) LPopCtx added in v0.1.3

func (s *Redis) LPopCtx(ctx context.Context, key string) (val string, err error)

LPopCtx is the implementation of redis lpop command.

func (*Redis) LPush added in v0.1.3

func (s *Redis) LPush(key string, values ...interface{}) (int64, error)

LPush is the implementation of redis lpush command.

func (*Redis) LPushCtx added in v0.1.3

func (s *Redis) LPushCtx(ctx context.Context, key string, values ...interface{}) (val int64, err error)

LPushCtx is the implementation of redis lpush command.

func (*Redis) LRange added in v0.1.3

func (s *Redis) LRange(key string, start, stop int64) ([]string, error)

LRange is the implementation of redis lrange command.

func (*Redis) LRangeCtx added in v0.1.3

func (s *Redis) LRangeCtx(ctx context.Context, key string, start, stop int64) (val []string, err error)

LRangeCtx is the implementation of redis lrange command.

func (*Redis) LRem added in v0.1.3

func (s *Redis) LRem(key string, count int64, value string) (int64, error)

LRem is the implementation of redis lrem command.

func (*Redis) LRemCtx added in v0.1.3

func (s *Redis) LRemCtx(ctx context.Context, key string, count int64, value string) (val int64, err error)

LRemCtx is the implementation of redis lrem command.

func (*Redis) LTrim added in v0.1.3

func (s *Redis) LTrim(key string, start, stop int64) error

LTrim is the implementation of redis ltrim command.

func (*Redis) LTrimCtx added in v0.1.3

func (s *Redis) LTrimCtx(ctx context.Context, key string, start, stop int64) error

LTrimCtx is the implementation of redis ltrim command.

func (*Redis) MGet added in v0.1.4

func (s *Redis) MGet(keys ...string) ([]string, error)

MGet is the implementation of redis mget command.

func (*Redis) MGetCtx added in v0.1.4

func (s *Redis) MGetCtx(ctx context.Context, keys ...string) (val []string, err error)

MGetCtx is the implementation of redis mget command.

func (*Redis) MSet added in v0.1.4

func (s *Redis) MSet(values ...interface{}) (string, error)

MGet is the implementation of redis mset command.

func (*Redis) MSetCtx added in v0.1.4

func (s *Redis) MSetCtx(ctx context.Context, values ...interface{}) (val string, err error)

MGetCtx is the implementation of redis mset command.

func (*Redis) MSetNx added in v0.1.4

func (s *Redis) MSetNx(values ...interface{}) (bool, error)

MSetNx is the implementation of redis msetnx command.

func (*Redis) MSetNxCtx added in v0.1.4

func (s *Redis) MSetNxCtx(ctx context.Context, values ...interface{}) (val bool, err error)

MSetNxCtx is the implementation of redis msetnx command.

func (*Redis) PFAdd added in v0.1.3

func (s *Redis) PFAdd(key string, values ...interface{}) (bool, error)

PFAdd is the implementation of redis pfadd command.

func (*Redis) PFAddCtx added in v0.1.3

func (s *Redis) PFAddCtx(ctx context.Context, key string, values ...interface{}) (val bool, err error)

PFAddCtx is the implementation of redis pfadd command.

func (*Redis) PFCount added in v0.1.3

func (s *Redis) PFCount(key string) (int64, error)

PFCount is the implementation of redis pfcount command.

func (*Redis) PFCountCtx added in v0.1.3

func (s *Redis) PFCountCtx(ctx context.Context, key string) (val int64, err error)

PFCountCtx is the implementation of redis pfcount command.

func (*Redis) PFMerge added in v0.1.3

func (s *Redis) PFMerge(dest string, keys ...string) error

PFMerge is the implementation of redis pfmerge command.

func (*Redis) PFMergeCtx added in v0.1.3

func (s *Redis) PFMergeCtx(ctx context.Context, dest string, keys ...string) error

PFMergeCtx is the implementation of redis pfmerge command.

func (*Redis) Persist added in v0.1.3

func (s *Redis) Persist(key string) (bool, error)

Persist is the implementation of redis persist command.

func (*Redis) PersistCtx added in v0.1.3

func (s *Redis) PersistCtx(ctx context.Context, key string) (val bool, err error)

PersistCtx is the implementation of redis persist command.

func (*Redis) Ping

func (s *Redis) Ping() bool

Ping is the implementation of redis ping command.

func (*Redis) PingCtx

func (s *Redis) PingCtx(ctx context.Context) (val bool)

PingCtx is the implementation of redis ping command.

func (*Redis) Pipelined added in v0.1.3

func (s *Redis) Pipelined(fn func(Pipeliner) error) error

Pipelined lets fn execute pipelined commands.

func (*Redis) PipelinedCtx added in v0.1.3

func (s *Redis) PipelinedCtx(ctx context.Context, fn func(Pipeliner) error) error

PipelinedCtx lets fn execute pipelined commands. Results need to be retrieved by calling Pipeline.Exec()

func (*Redis) RPop added in v0.1.3

func (s *Redis) RPop(key string) (string, error)

RPop is the implementation of redis rpop command.

func (*Redis) RPopCount added in v0.1.3

func (s *Redis) RPopCount(key string, count int) ([]string, error)

RPopCount is the implementation of redis rpopCount command.

func (*Redis) RPopCountCtx added in v0.1.3

func (s *Redis) RPopCountCtx(ctx context.Context, key string, count int) (val []string, err error)

RPopCountCtx is the implementation of redis rpopCount command.

func (*Redis) RPopCtx added in v0.1.3

func (s *Redis) RPopCtx(ctx context.Context, key string) (val string, err error)

RPopCtx is the implementation of redis rpop command.

func (*Redis) RPush added in v0.1.3

func (s *Redis) RPush(key string, values ...interface{}) (int64, error)

RPush is the implementation of redis rpush command.

func (*Redis) RPushCtx added in v0.1.3

func (s *Redis) RPushCtx(ctx context.Context, key string, values ...interface{}) (val int64, err error)

RPushCtx is the implementation of redis rpush command.

func (*Redis) SAdd added in v0.1.3

func (s *Redis) SAdd(key string, values ...interface{}) (int64, error)

SAdd is the implementation of redis sadd command.

func (*Redis) SAddCtx added in v0.1.3

func (s *Redis) SAddCtx(ctx context.Context, key string, values ...interface{}) (val int64, err error)

SAddCtx is the implementation of redis sadd command.

func (*Redis) SCard added in v0.1.3

func (s *Redis) SCard(key string) (int64, error)

SCard is the implementation of redis scard command.

func (*Redis) SCardCtx added in v0.1.3

func (s *Redis) SCardCtx(ctx context.Context, key string) (val int64, err error)

SCardCtx is the implementation of redis scard command.

func (*Redis) SDiff added in v0.1.3

func (s *Redis) SDiff(keys ...string) ([]string, error)

SDiff is the implementation of redis sdiff command.

func (*Redis) SDiffCtx added in v0.1.3

func (s *Redis) SDiffCtx(ctx context.Context, keys ...string) (val []string, err error)

SDiffCtx is the implementation of redis sdiff command.

func (*Redis) SDiffStore added in v0.1.3

func (s *Redis) SDiffStore(destination string, keys ...string) (int64, error)

SDiffStore is the implementation of redis sdiffstore command.

func (*Redis) SDiffStoreCtx added in v0.1.3

func (s *Redis) SDiffStoreCtx(ctx context.Context, destination string, keys ...string) (
	val int64, err error)

SDiffStoreCtx is the implementation of redis sdiffstore command.

func (*Redis) SInter added in v0.1.3

func (s *Redis) SInter(keys ...string) ([]string, error)

SInter is the implementation of redis sinter command.

func (*Redis) SInterCtx added in v0.1.3

func (s *Redis) SInterCtx(ctx context.Context, keys ...string) (val []string, err error)

SInterCtx is the implementation of redis sinter command.

func (*Redis) SInterStore added in v0.1.3

func (s *Redis) SInterStore(destination string, keys ...string) (int64, error)

SInterStore is the implementation of redis sinterstore command.

func (*Redis) SInterStoreCtx added in v0.1.3

func (s *Redis) SInterStoreCtx(ctx context.Context, destination string, keys ...string) (
	val int64, err error)

SInterStoreCtx is the implementation of redis sinterstore command.

func (*Redis) SIsMember added in v0.1.3

func (s *Redis) SIsMember(key string, value interface{}) (bool, error)

SIsMember is the implementation of redis sismember command.

func (*Redis) SIsMemberCtx added in v0.1.3

func (s *Redis) SIsMemberCtx(ctx context.Context, key string, value interface{}) (val bool, err error)

SIsMemberCtx is the implementation of redis sismember command.

func (*Redis) SMembers added in v0.1.3

func (s *Redis) SMembers(key string) ([]string, error)

SMembers is the implementation of redis smembers command.

func (*Redis) SMembersCtx added in v0.1.3

func (s *Redis) SMembersCtx(ctx context.Context, key string) (val []string, err error)

SMembersCtx is the implementation of redis smembers command.

func (*Redis) SPop added in v0.1.3

func (s *Redis) SPop(key string) (string, error)

SPop is the implementation of redis spop command.

func (*Redis) SPopCtx added in v0.1.3

func (s *Redis) SPopCtx(ctx context.Context, key string) (val string, err error)

SPopCtx is the implementation of redis spop command.

func (*Redis) SRandMember added in v0.1.3

func (s *Redis) SRandMember(key string) (string, error)

SRandMember is the implementation of redis srandmember command.

func (*Redis) SRandMemberCtx added in v0.1.3

func (s *Redis) SRandMemberCtx(ctx context.Context, key string) (val string, err error)

SRandMemberCtx is the implementation of redis srandmember command.

func (*Redis) SRandMemberN added in v0.1.3

func (s *Redis) SRandMemberN(key string, count int64) ([]string, error)

SRandMemberN is the implementation of redis SRandMemberN command.

func (*Redis) SRandMemberNCtx added in v0.1.3

func (s *Redis) SRandMemberNCtx(ctx context.Context, key string, count int64) (val []string, err error)

SRandMemberNCtx is the implementation of redis SRandMemberN command.

func (*Redis) SRem added in v0.1.3

func (s *Redis) SRem(key string, values ...interface{}) (int64, error)

SRem is the implementation of redis srem command.

func (*Redis) SRemCtx added in v0.1.3

func (s *Redis) SRemCtx(ctx context.Context, key string, values ...interface{}) (val int64, err error)

SRemCtx is the implementation of redis srem command.

func (*Redis) SScan added in v0.1.3

func (s *Redis) SScan(key string, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

SScan is the implementation of redis sscan command.

func (*Redis) SScanCtx added in v0.1.3

func (s *Redis) SScanCtx(ctx context.Context, key string, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

SScanCtx is the implementation of redis sscan command.

func (*Redis) SUnion added in v0.1.3

func (s *Redis) SUnion(keys ...string) ([]string, error)

SUnion is the implementation of redis sunion command.

func (*Redis) SUnionCtx added in v0.1.3

func (s *Redis) SUnionCtx(ctx context.Context, keys ...string) (val []string, err error)

SUnionCtx is the implementation of redis sunion command.

func (*Redis) SUnionStore added in v0.1.3

func (s *Redis) SUnionStore(destination string, keys ...string) (int64, error)

SUnionStore is the implementation of redis sunionstore command.

func (*Redis) SUnionStoreCtx added in v0.1.3

func (s *Redis) SUnionStoreCtx(ctx context.Context, destination string, keys ...string) (
	val int64, err error)

SUnionStoreCtx is the implementation of redis sunionstore command.

func (*Redis) Scan added in v0.1.3

func (s *Redis) Scan(cursor uint64, match string, count int64) (keys []string, cur uint64, err error)

Scan is the implementation of redis scan command.

func (*Redis) ScanCtx added in v0.1.3

func (s *Redis) ScanCtx(ctx context.Context, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

ScanCtx is the implementation of redis scan command.

func (*Redis) ScriptLoad added in v0.1.3

func (s *Redis) ScriptLoad(script string) (string, error)

ScriptLoad is the implementation of redis script load command.

func (*Redis) ScriptLoadCtx added in v0.1.3

func (s *Redis) ScriptLoadCtx(ctx context.Context, script string) (string, error)

ScriptLoadCtx is the implementation of redis script load command.

func (*Redis) Set

func (s *Redis) Set(key string, value interface{}) error

Set is the implementation of redis set command.

func (*Redis) SetBit added in v0.1.3

func (s *Redis) SetBit(key string, offset int64, value int) (int64, error)

SetBit is the implementation of redis setbit command.

func (*Redis) SetBitCtx added in v0.1.3

func (s *Redis) SetBitCtx(ctx context.Context, key string, offset int64, value int) (val int64, err error)

SetBitCtx is the implementation of redis setbit command.

func (*Redis) SetCtx

func (s *Redis) SetCtx(ctx context.Context, key string, value interface{}) error

SetCtx is the implementation of redis set command.

func (*Redis) SetEx added in v0.1.4

func (s *Redis) SetEx(key string, value interface{}, seconds int64) error

SetEx is the implementation of redis setex command.

func (*Redis) SetExCtx added in v0.1.4

func (s *Redis) SetExCtx(ctx context.Context, key string, value interface{}, seconds int64) error

SetExCtx is the implementation of redis setex command.

func (*Redis) SetNx added in v0.1.4

func (s *Redis) SetNx(key string, value interface{}) (bool, error)

SetNx is the implementation of redis setnx command.

func (*Redis) SetNxCtx added in v0.1.4

func (s *Redis) SetNxCtx(ctx context.Context, key string, value interface{}) (val bool, err error)

SetNxCtx is the implementation of redis setnx command.

func (*Redis) SetNxEx added in v0.1.4

func (s *Redis) SetNxEx(key string, value interface{}, seconds int64) (bool, error)

SetNxEx is the implementation of redis setnx command with expire.

func (*Redis) SetNxExCtx added in v0.1.4

func (s *Redis) SetNxExCtx(ctx context.Context, key string, value interface{}, seconds int64) (val bool, err error)

SetNxExCtx is the implementation of redis setnx command with expire.

func (*Redis) TTL added in v0.1.3

func (s *Redis) TTL(key string) (int64, error)

TTL is the implementation of redis ttl command.

func (*Redis) TTLCtx added in v0.1.3

func (s *Redis) TTLCtx(ctx context.Context, key string) (val int64, err error)

TTLCtx is the implementation of redis ttl command.

func (*Redis) XAck added in v0.2.0

func (s *Redis) XAck(ctx context.Context, stream, group string, ids ...string) error

func (*Redis) XAdd added in v0.2.0

func (s *Redis) XAdd(ctx context.Context, a *redis.XAddArgs) (string, error)

func (*Redis) XDel added in v0.2.0

func (s *Redis) XDel(ctx context.Context, stream string, ids ...string) error

func (*Redis) XGroupCreateMkStream added in v0.2.0

func (s *Redis) XGroupCreateMkStream(ctx context.Context, stream, group, start string) error

func (*Redis) XInfoStream added in v0.2.0

func (s *Redis) XInfoStream(ctx context.Context, key string) (*redis.XInfoStream, error)

func (*Redis) XLen added in v0.2.0

func (s *Redis) XLen(ctx context.Context, stream string) (int64, error)

func (*Redis) XPending added in v0.2.0

func (s *Redis) XPending(ctx context.Context, stream, group string) (*redis.XPending, error)

func (*Redis) XReadGroup added in v0.2.0

func (s *Redis) XReadGroup(ctx context.Context, a *redis.XReadGroupArgs) ([]redis.XStream, error)

func (*Redis) XTrimMaxLenApprox added in v0.2.0

func (s *Redis) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) error

func (*Redis) ZAdd added in v0.1.3

func (s *Redis) ZAdd(key string, score int64, value string) (bool, error)

ZAdd is the implementation of redis zadd command.

func (*Redis) ZAddCtx added in v0.1.3

func (s *Redis) ZAddCtx(ctx context.Context, key string, score int64, value string) (
	val bool, err error)

ZAddCtx is the implementation of redis zadd command.

func (*Redis) ZAddFloat added in v0.1.3

func (s *Redis) ZAddFloat(key string, score float64, value string) (bool, error)

ZAddFloat is the implementation of redis zadd command.

func (*Redis) ZAddFloatCtx added in v0.1.3

func (s *Redis) ZAddFloatCtx(ctx context.Context, key string, score float64, value string) (
	val bool, err error)

ZAddFloatCtx is the implementation of redis zadd command.

func (*Redis) ZAdds added in v0.1.3

func (s *Redis) ZAdds(key string, ps ...Pair) (int64, error)

ZAdds is the implementation of redis zadds command.

func (*Redis) ZAddsCtx added in v0.1.3

func (s *Redis) ZAddsCtx(ctx context.Context, key string, ps ...Pair) (val int64, err error)

ZAddsCtx is the implementation of redis zadds command.

func (*Redis) ZCard added in v0.1.3

func (s *Redis) ZCard(key string) (int64, error)

ZCard is the implementation of redis zcard command.

func (*Redis) ZCardCtx added in v0.1.3

func (s *Redis) ZCardCtx(ctx context.Context, key string) (val int64, err error)

ZCardCtx is the implementation of redis zcard command.

func (*Redis) ZCount added in v0.1.3

func (s *Redis) ZCount(key string, min, max string) (int64, error)

ZCount is the implementation of redis zcount command.

func (*Redis) ZCountCtx added in v0.1.3

func (s *Redis) ZCountCtx(ctx context.Context, key string, min, max string) (val int64, err error)

ZCountCtx is the implementation of redis zcount command.

func (*Redis) ZIncrBy added in v0.1.3

func (s *Redis) ZIncrBy(key string, increment int64, field string) (int64, error)

ZIncrBy is the implementation of redis zincrby command.

func (*Redis) ZIncrByCtx added in v0.1.3

func (s *Redis) ZIncrByCtx(ctx context.Context, key string, increment int64, field string) (
	val int64, err error)

ZIncrByCtx is the implementation of redis zincrby command.

func (*Redis) ZIncrByFloat added in v0.1.3

func (s *Redis) ZIncrByFloat(key string, increment float64, field string) (float64, error)

ZIncrByFloat is the implementation of redis zincrby command.

func (*Redis) ZIncrByFloatCtx added in v0.1.3

func (s *Redis) ZIncrByFloatCtx(ctx context.Context, key string, increment float64, field string) (
	val float64, err error)

ZIncrByFloatCtx is the implementation of redis zincrby command.

func (*Redis) ZRange added in v0.1.3

func (s *Redis) ZRange(key string, start, stop int64) ([]string, error)

ZRange is the implementation of redis zrange command.

func (*Redis) ZRangeByScore added in v0.1.5

func (s *Redis) ZRangeByScore(key string, min, max string) ([]string, error)

ZRangeByScore is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreAll added in v0.1.7

func (s *Redis) ZRangeByScoreAll(key string) ([]string, error)

ZRangeByScoreAll is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreAllAndLimit added in v0.1.7

func (s *Redis) ZRangeByScoreAllAndLimit(key string, page, size int64) ([]string, error)

ZRangeByScoreAllAndLimit is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreAllAndLimitCtx added in v0.1.7

func (s *Redis) ZRangeByScoreAllAndLimitCtx(ctx context.Context, key string, page, size int64) (
	val []string, err error)

ZRangeByScoreAllAndLimitCtx is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreAllCtx added in v0.1.7

func (s *Redis) ZRangeByScoreAllCtx(ctx context.Context, key string) (
	val []string, err error)

ZRangeByScoreAllCtx is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreAndLimit added in v0.1.5

func (s *Redis) ZRangeByScoreAndLimit(key string, min, max string, page, size int64) ([]string, error)

ZRangeByScoreAndLimit is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreAndLimitCtx added in v0.1.5

func (s *Redis) ZRangeByScoreAndLimitCtx(ctx context.Context, key string, min, max string, page, size int64) (
	val []string, err error)

ZRangeByScoreAndLimitCtx is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreCtx added in v0.1.5

func (s *Redis) ZRangeByScoreCtx(ctx context.Context, key string, min, max string) (
	val []string, err error)

ZRangeByScoreCtx is the implementation of redis zrangebyscore command.

func (*Redis) ZRangeByScoreWithScores added in v0.1.3

func (s *Redis) ZRangeByScoreWithScores(key string, min, max string) ([]Pair, error)

ZRangeByScoreWithScores is the implementation of redis zrangebyscore command with scores.

func (*Redis) ZRangeByScoreWithScoresAll added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresAll(key string) ([]Pair, error)

ZRangeByScoreWithScoresAll is the implementation of redis zrangebyscore command with scores.

func (*Redis) ZRangeByScoreWithScoresAllAndLimit added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresAllAndLimit(key string, page, size int64) ([]Pair, error)

ZRangeByScoreWithScoresAllAndLimit is the implementation of redis zrangebyscore command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresAllAndLimitCtx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresAllAndLimitCtx(ctx context.Context, key string, page, size int64) (val []Pair, err error)

ZRangeByScoreWithScoresAllAndLimitCtx is the implementation of redis zrangebyscore command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresAllCtx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresAllCtx(ctx context.Context, key string) (
	val []Pair, err error)

ZRangeByScoreWithScoresAllCtx is the implementation of redis zrangebyscore command with scores.

func (*Redis) ZRangeByScoreWithScoresAndLimit added in v0.1.3

func (s *Redis) ZRangeByScoreWithScoresAndLimit(key string, min, max string, page, size int64) ([]Pair, error)

ZRangeByScoreWithScoresAndLimit is the implementation of redis zrangebyscore command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresAndLimitCtx added in v0.1.3

func (s *Redis) ZRangeByScoreWithScoresAndLimitCtx(ctx context.Context, key string, min, max string, page, size int64) (val []Pair, err error)

ZRangeByScoreWithScoresAndLimitCtx is the implementation of redis zrangebyscore command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresCtx added in v0.1.3

func (s *Redis) ZRangeByScoreWithScoresCtx(ctx context.Context, key string, min, max string) (
	val []Pair, err error)

ZRangeByScoreWithScoresCtx is the implementation of redis zrangebyscore command with scores.

func (*Redis) ZRangeByScoreWithScoresFloat added in v0.1.3

func (s *Redis) ZRangeByScoreWithScoresFloat(key string, start, stop float64) ([]FloatPair, error)

ZRangeByScoreWithScoresFloat is the implementation of redis zrangebyscore command with scores by float.

func (*Redis) ZRangeByScoreWithScoresFloatAllLimit added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresFloatAllLimit(key string, start, stop float64, page, size int64) ([]FloatPair, error)

ZRangeByScoreWithScoresFloatAllLimit is the implementation of redis ZRangeByScoreWithScores command with scores by float and limit.

func (*Redis) ZRangeByScoreWithScoresFloatAllLimitCtx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresFloatAllLimitCtx(ctx context.Context, key string, start, stop float64, page, size int64) (val []FloatPair, err error)

ZRangeByScoreWithScoresFloatAllLimitCtx is the implementation of redis ZRangeByScoreWithScores command with scores by float and limit.

func (*Redis) ZRangeByScoreWithScoresFloatAndLimit added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresFloatAndLimit(key string, start, stop float64,
	page, size int64) ([]FloatPair, error)

ZRangeByScoreWithScoresFloatAndLimit is the implementation of redis zrangebyscore command with scores by float and limit.

func (*Redis) ZRangeByScoreWithScoresFloatAndLimitCtx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresFloatAndLimitCtx(ctx context.Context, key string, start,
	stop float64, page, size int64) (val []FloatPair, err error)

ZRangeByScoreWithScoresFloatAndLimitCtx is the implementation of redis zrangebyscore command with scores by float and limit.

func (*Redis) ZRangeByScoreWithScoresFloatCtx added in v0.1.3

func (s *Redis) ZRangeByScoreWithScoresFloatCtx(ctx context.Context, key string, start, stop float64) (
	val []FloatPair, err error)

ZRangeByScoreWithScoresFloatCtx is the implementation of redis zrangebyscore command with scores by float.

func (*Redis) ZRangeByScoreWithScoresInt64 added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresInt64(key string, start, stop int64) ([]Pair, error)

ZRangeByScoreWithScoresInt64 is the implementation of redis zrangebyscore command with scores.

func (*Redis) ZRangeByScoreWithScoresInt64AllLimit added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresInt64AllLimit(key string, start, stop int64,
	page, size int64) ([]Pair, error)

ZRangeByScoreWithScoresInt64AllLimit is the implementation of redis ZRangeByScoreWithScores command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresInt64AllLimitCtx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresInt64AllLimitCtx(ctx context.Context, key string, start, stop int64,
	page, size int64) (val []Pair, err error)

ZRangeByScoreWithScoresInt64AllLimitCtx is the implementation of redis ZRangeByScoreWithScores command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresInt64AndLimit added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresInt64AndLimit(key string, start, stop int64,
	page, size int64) ([]Pair, error)

ZRangeByScoreWithScoresInt64AndLimit is the implementation of redis zrangebyscore command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresInt64AndLimitCtx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresInt64AndLimitCtx(ctx context.Context, key string, start,
	stop int64, page, size int64) (val []Pair, err error)

ZRangeByScoreWithScoresInt64AndLimitCtx is the implementation of redis zrangebyscore command with scores and limit.

func (*Redis) ZRangeByScoreWithScoresInt64Ctx added in v0.1.7

func (s *Redis) ZRangeByScoreWithScoresInt64Ctx(ctx context.Context, key string, start, stop int64) (
	val []Pair, err error)

ZRangeByScoreWithScoresInt64Ctx is the implementation of redis zrangebyscore command with scores.

func (*Redis) ZRangeCtx added in v0.1.3

func (s *Redis) ZRangeCtx(ctx context.Context, key string, start, stop int64) (
	val []string, err error)

ZRangeCtx is the implementation of redis zrange command.

func (*Redis) ZRangeWithScores added in v0.1.3

func (s *Redis) ZRangeWithScores(key string, start, stop int64) ([]Pair, error)

ZRangeWithScores is the implementation of redis zrange command with scores.

func (*Redis) ZRangeWithScoresCtx added in v0.1.3

func (s *Redis) ZRangeWithScoresCtx(ctx context.Context, key string, start, stop int64) (
	val []Pair, err error)

ZRangeWithScoresCtx is the implementation of redis zrange command with scores.

func (*Redis) ZRangeWithScoresFloat added in v0.1.3

func (s *Redis) ZRangeWithScoresFloat(key string, start, stop int64) ([]FloatPair, error)

ZRangeWithScoresFloat is the implementation of redis zrange command with scores by float64.

func (*Redis) ZRangeWithScoresFloatCtx added in v0.1.3

func (s *Redis) ZRangeWithScoresFloatCtx(ctx context.Context, key string, start, stop int64) (
	val []FloatPair, err error)

ZRangeWithScoresFloatCtx is the implementation of redis zrange command with scores by float64.

func (*Redis) ZRank added in v0.1.3

func (s *Redis) ZRank(key, field string) (int64, error)

ZRank is the implementation of redis zrank command.

func (*Redis) ZRankCtx added in v0.1.3

func (s *Redis) ZRankCtx(ctx context.Context, key, field string) (val int64, err error)

ZRankCtx is the implementation of redis zrank command.

func (*Redis) ZRem added in v0.1.3

func (s *Redis) ZRem(key string, values ...interface{}) (int64, error)

ZRem is the implementation of redis zrem command.

func (*Redis) ZRemCtx added in v0.1.3

func (s *Redis) ZRemCtx(ctx context.Context, key string, values ...interface{}) (val int64, err error)

ZRemCtx is the implementation of redis zrem command.

func (*Redis) ZRemRangeByRank added in v0.1.3

func (s *Redis) ZRemRangeByRank(key string, start, stop int64) (int64, error)

ZRemRangeByRank is the implementation of redis zremrangebyrank command.

func (*Redis) ZRemRangeByRankCtx added in v0.1.3

func (s *Redis) ZRemRangeByRankCtx(ctx context.Context, key string, start, stop int64) (
	val int64, err error)

ZRemRangeByRankCtx is the implementation of redis zremrangebyrank command.

func (*Redis) ZRemRangeByScore added in v0.1.3

func (s *Redis) ZRemRangeByScore(key string, min, max string) (int64, error)

ZRemRangeByScore is the implementation of redis zremrangebyscore command.

func (*Redis) ZRemRangeByScoreCtx added in v0.1.3

func (s *Redis) ZRemRangeByScoreCtx(ctx context.Context, key string, min, max string) (
	val int64, err error)

ZRemRangeByScoreCtx is the implementation of redis zremrangebyscore command.

func (*Redis) ZRemRangeByScoreInt64 added in v0.1.3

func (s *Redis) ZRemRangeByScoreInt64(key string, start, stop int64) (int64, error)

ZRemRangeByScoreInt64 is the implementation of redis zremrangebyscore command.

func (*Redis) ZRemRangeByScoreInt64Ctx added in v0.1.3

func (s *Redis) ZRemRangeByScoreInt64Ctx(ctx context.Context, key string, start, stop int64) (
	val int64, err error)

ZRemRangeByScoreInt64Ctx is the implementation of redis zremrangebyscore command.

func (*Redis) ZRevRange added in v0.1.3

func (s *Redis) ZRevRange(key string, start, stop int64) ([]string, error)

ZRevRange is the implementation of redis zrevrange command.

func (*Redis) ZRevRangeByScore added in v0.1.5

func (s *Redis) ZRevRangeByScore(key string, min, max string) ([]string, error)

ZRevRangeByScore is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreAll added in v0.1.7

func (s *Redis) ZRevRangeByScoreAll(key string) ([]string, error)

ZRevRangeByScoreAll is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreAllAndLimit added in v0.1.7

func (s *Redis) ZRevRangeByScoreAllAndLimit(key string, page, size int64) ([]string, error)

ZRevRangeByScoreAllAndLimit is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreAllAndLimitCtx added in v0.1.7

func (s *Redis) ZRevRangeByScoreAllAndLimitCtx(ctx context.Context, key string, page, size int64) (
	val []string, err error)

ZRevRangeByScoreAllAndLimitCtx is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreAllCtx added in v0.1.7

func (s *Redis) ZRevRangeByScoreAllCtx(ctx context.Context, key string) (
	val []string, err error)

ZRevRangeByScoreAllCtx is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreAndLimit added in v0.1.5

func (s *Redis) ZRevRangeByScoreAndLimit(key string, min, max string, page, size int64) ([]string, error)

ZRevRangeByScoreAndLimit is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreAndLimitCtx added in v0.1.5

func (s *Redis) ZRevRangeByScoreAndLimitCtx(ctx context.Context, key string, min, max string, page, size int64) (
	val []string, err error)

ZRevRangeByScoreAndLimitCtx is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreCtx added in v0.1.5

func (s *Redis) ZRevRangeByScoreCtx(ctx context.Context, key string, min, max string) (
	val []string, err error)

ZRevRangeByScoreCtx is the implementation of redis zrevrangebyscore command.

func (*Redis) ZRevRangeByScoreWithScores added in v0.1.3

func (s *Redis) ZRevRangeByScoreWithScores(key string, min, max string) ([]Pair, error)

ZRevRangeByScoreWithScores is the implementation of redis zrevrangebyscore command with scores.

func (*Redis) ZRevRangeByScoreWithScoresAll added in v0.1.7

func (s *Redis) ZRevRangeByScoreWithScoresAll(key string) ([]Pair, error)

ZRevRangeByScoreWithScoresAll is the implementation of redis zrevrangebyscore command with scores.

func (*Redis) ZRevRangeByScoreWithScoresAllAndLimit added in v0.1.7

func (s *Redis) ZRevRangeByScoreWithScoresAllAndLimit(key string,
	page, size int64) ([]Pair, error)

ZRevRangeByScoreWithScoresAllAndLimit is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresAllAndLimitCtx added in v0.1.7

func (s *Redis) ZRevRangeByScoreWithScoresAllAndLimitCtx(ctx context.Context, key string,
	page, size int64) (val []Pair, err error)

ZRevRangeByScoreWithScoresAllAndLimitCtx is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresAllCtx added in v0.1.7

func (s *Redis) ZRevRangeByScoreWithScoresAllCtx(ctx context.Context, key string) (
	val []Pair, err error)

ZRevRangeByScoreWithScoresAllCtx is the implementation of redis zrevrangebyscore command with scores.

func (*Redis) ZRevRangeByScoreWithScoresAndLimit added in v0.1.3

func (s *Redis) ZRevRangeByScoreWithScoresAndLimit(key string, min, max string,
	page, size int64) ([]Pair, error)

ZRevRangeByScoreWithScoresAndLimit is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresAndLimitCtx added in v0.1.3

func (s *Redis) ZRevRangeByScoreWithScoresAndLimitCtx(ctx context.Context, key string,
	min, max string, page, size int64) (val []Pair, err error)

ZRevRangeByScoreWithScoresAndLimitCtx is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresCtx added in v0.1.3

func (s *Redis) ZRevRangeByScoreWithScoresCtx(ctx context.Context, key string, min, max string) (
	val []Pair, err error)

ZRevRangeByScoreWithScoresCtx is the implementation of redis zrevrangebyscore command with scores.

func (*Redis) ZRevRangeByScoreWithScoresFloat added in v0.1.3

func (s *Redis) ZRevRangeByScoreWithScoresFloat(key string, start, stop float64) (
	[]FloatPair, error)

ZRevRangeByScoreWithScoresFloat is the implementation of redis zrevrangebyscore command with scores by float.

func (*Redis) ZRevRangeByScoreWithScoresFloatAllLimit added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresFloatAllLimit(key string, start, stop float64,
	page, size int64) ([]FloatPair, error)

ZRevRangeByScoreWithScoresFloatAllLimit is the implementation of redis zrevrangebyscore command with scores by float and limit.

func (*Redis) ZRevRangeByScoreWithScoresFloatAllLimitCtx added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresFloatAllLimitCtx(ctx context.Context, key string,
	page, size int64) (val []FloatPair, err error)

ZRevRangeByScoreWithScoresFloatAllLimitCtx is the implementation of redis zrevrangebyscore command with scores by float and limit.

func (*Redis) ZRevRangeByScoreWithScoresFloatAndLimit added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresFloatAndLimit(key string, start, stop float64,
	page, size int64) ([]FloatPair, error)

ZRevRangeByScoreWithScoresFloatAndLimit is the implementation of redis zrevrangebyscore command with scores by float and limit.

func (*Redis) ZRevRangeByScoreWithScoresFloatAndLimitCtx added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresFloatAndLimitCtx(ctx context.Context, key string,
	start, stop float64, page, size int64) (val []FloatPair, err error)

ZRevRangeByScoreWithScoresFloatAndLimitCtx is the implementation of redis zrevrangebyscore command with scores by float and limit.

func (*Redis) ZRevRangeByScoreWithScoresFloatCtx added in v0.1.3

func (s *Redis) ZRevRangeByScoreWithScoresFloatCtx(ctx context.Context, key string,
	start, stop float64) (val []FloatPair, err error)

ZRevRangeByScoreWithScoresFloatCtx is the implementation of redis zrevrangebyscore command with scores by float.

func (*Redis) ZRevRangeByScoreWithScoresInt64 added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresInt64(key string, start, stop int64) ([]Pair, error)

ZRevRangeByScoreWithScoresInt64 is the implementation of redis zrevrangebyscore command with scores.

func (*Redis) ZRevRangeByScoreWithScoresInt64AllLimit added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresInt64AllLimit(key string, page, size int64) ([]Pair, error)

ZRevRangeByScoreWithScoresInt64AllLimit is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresInt64AllLimitCtx added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresInt64AllLimitCtx(ctx context.Context, key string,
	page, size int64) (val []Pair, err error)

ZRevRangeByScoreWithScoresInt64AllLimitCtx is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresInt64AndLimit added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresInt64AndLimit(key string, start, stop int64,
	page, size int64) ([]Pair, error)

ZRevRangeByScoreWithScoresInt64AndLimit is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresInt64AndLimitCtx added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresInt64AndLimitCtx(ctx context.Context, key string,
	start, stop int64, page, size int64) (val []Pair, err error)

ZRevRangeByScoreWithScoresInt64AndLimitCtx is the implementation of redis zrevrangebyscore command with scores and limit.

func (*Redis) ZRevRangeByScoreWithScoresInt64Ctx added in v0.1.5

func (s *Redis) ZRevRangeByScoreWithScoresInt64Ctx(ctx context.Context, key string, start, stop int64) (
	val []Pair, err error)

ZRevRangeByScoreWithScoresInt64Ctx is the implementation of redis zrevrangebyscore command with scores.

func (*Redis) ZRevRangeCtx added in v0.1.3

func (s *Redis) ZRevRangeCtx(ctx context.Context, key string, start, stop int64) (
	val []string, err error)

ZRevRangeCtx is the implementation of redis zrevrange command.

func (*Redis) ZRevRank added in v0.1.3

func (s *Redis) ZRevRank(key, field string) (int64, error)

ZRevRank is the implementation of redis zrevrank command.

func (*Redis) ZRevRankCtx added in v0.1.3

func (s *Redis) ZRevRankCtx(ctx context.Context, key, field string) (val int64, err error)

ZRevRankCtx is the implementation of redis zrevrank command.

func (*Redis) ZScan added in v0.1.3

func (s *Redis) ZScan(key string, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

ZScan is the implementation of redis zscan command.

func (*Redis) ZScanCtx added in v0.1.3

func (s *Redis) ZScanCtx(ctx context.Context, key string, cursor uint64, match string, count int64) (
	keys []string, cur uint64, err error)

ZScanCtx is the implementation of redis zscan command.

func (*Redis) ZScore added in v0.1.3

func (s *Redis) ZScore(key, value string) (int64, error)

ZScore is the implementation of redis zscore command.

func (*Redis) ZScoreCtx added in v0.1.3

func (s *Redis) ZScoreCtx(ctx context.Context, key, value string) (val int64, err error)

ZScoreCtx is the implementation of redis zscore command.

func (*Redis) ZScoreFloat added in v0.1.3

func (s *Redis) ZScoreFloat(key, value string) (float64, error)

ZScoreFloat is the implementation of redis zscore command score by float.

func (*Redis) ZScoreFloatCtx added in v0.1.3

func (s *Redis) ZScoreFloatCtx(ctx context.Context, key, value string) (val float64, err error)

ZScoreFloatCtx is the implementation of redis zscore command score by float.

func (*Redis) ZUnionStore added in v0.1.3

func (s *Redis) ZUnionStore(dest string, store *ZStore) (int64, error)

ZUnionStore is the implementation of redis zunionstore command.

func (*Redis) ZUnionStoreCtx added in v0.1.3

func (s *Redis) ZUnionStoreCtx(ctx context.Context, dest string, store *ZStore) (
	val int64, err error)

ZUnionStoreCtx is the implementation of redis zunionstore command.

type RedisNode added in v0.1.3

type RedisNode interface {
	red.Cmdable
}

RedisNode interface represents a redis node.

type StringCmd

type StringCmd = red.StringCmd

StringCmd is an alias of redis.StringCmd.

type Z

type Z = red.Z

Z represents sorted set member.

type ZStore

type ZStore = red.ZStore

ZStore is an alias of redis.ZStore.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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