redis

package
v0.0.8-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const KeepTTL = -1

KeepTTL is an option for Set command to keep key's existing TTL. For example: Set(key, value, redis.KeepTTL)

View Source
const Nil = ErrorRedis("redis: nil")

Variables

This section is empty.

Functions

This section is empty.

Types

type BitCountArgs

type BitCountArgs struct {
	Start, End int64
}

type BoolCmd

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

func NewBoolCmd

func NewBoolCmd(client *Redis, name string, args ...interface{}) *BoolCmd

func (*BoolCmd) Err

func (c *BoolCmd) Err() error

func (*BoolCmd) Result

func (c *BoolCmd) Result() (bool, error)

func (*BoolCmd) Val

func (c *BoolCmd) Val() bool

type DurationCmd

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

func NewDurationCmd

func NewDurationCmd(client *Redis, name string, args ...interface{}) *DurationCmd

func (*DurationCmd) Err

func (c *DurationCmd) Err() error

func (*DurationCmd) Result

func (c *DurationCmd) Result() (time.Duration, error)

func (*DurationCmd) Val

func (c *DurationCmd) Val() time.Duration

type ErrorRedis

type ErrorRedis string

func (ErrorRedis) Error

func (e ErrorRedis) Error() string

type FloatCmd

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

func NewFloatCmd

func NewFloatCmd(client *Redis, name string, args ...interface{}) *FloatCmd

func (*FloatCmd) Err

func (c *FloatCmd) Err() error

func (*FloatCmd) Result

func (c *FloatCmd) Result() (float64, error)

func (*FloatCmd) Val

func (c *FloatCmd) Val() float64

type IRedis

type IRedis interface {
	TTL(ctx context.Context, key string) *DurationCmd
	Type(ctx context.Context, key string) *StatusCmd
	Append(ctx context.Context, key, value string) *IntCmd
	GetRange(ctx context.Context, key string, start, end int64) *StringCmd
	GetSet(ctx context.Context, key string, value interface{}) *StringCmd
	Get(ctx context.Context, key string) *StringCmd
	Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
	Del(ctx context.Context, keys ...string) *IntCmd
	Exists(ctx context.Context, keys ...string) *IntCmd
	Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
	ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
	Persist(ctx context.Context, key string) *BoolCmd
	PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
	PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd
	PTTL(ctx context.Context, key string) *DurationCmd
	Incr(ctx context.Context, key string) *IntCmd
	Decr(ctx context.Context, key string) *IntCmd
	IncrBy(ctx context.Context, key string, value int64) *IntCmd
	DecrBy(ctx context.Context, key string, value int64) *IntCmd
	IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd
	MGet(ctx context.Context, keys ...string) *SliceCmd
	MSet(ctx context.Context, pairs ...interface{}) *StatusCmd
	SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
	SetXX(ctx context.Context, key string, value interface{}) *BoolCmd
	SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd
	StrLen(ctx context.Context, key string) *IntCmd
	GetBit(ctx context.Context, key string, offset int64) *IntCmd
	SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd
	BitCount(ctx context.Context, key string, bitCount *BitCountArgs) *IntCmd
	HDel(ctx context.Context, key string, fields ...string) *IntCmd
	HExists(ctx context.Context, key, field string) *BoolCmd
	HGet(ctx context.Context, key, field string) *StringCmd
	HGetAll(ctx context.Context, key string) *StrStrMapCmd
	HIncrBy(ctx context.Context, key, field string, incr int64) *IntCmd
	HIncrByFloat(ctx context.Context, key, field string, incr float64) *FloatCmd
	HKeys(ctx context.Context, key string) *StrSliceCmd
	HLen(ctx context.Context, key string) *IntCmd
	HMSet(ctx context.Context, key string, pairs ...interface{}) *StatusCmd
	HMGet(ctx context.Context, key string, fields ...string) *SliceCmd
	HSet(ctx context.Context, key string, field string, value interface{}) *BoolCmd
	HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd
	HVals(ctx context.Context, key string) *StrSliceCmd
	LIndex(ctx context.Context, key string, index int64) *StringCmd
	LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd
	LLen(ctx context.Context, key string) *IntCmd
	LPop(ctx context.Context, key string) *StringCmd
	LPush(ctx context.Context, key string, values ...interface{}) *IntCmd
	LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
	LRange(ctx context.Context, key string, start, stop int64) *StrSliceCmd
	LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd
	LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd
	LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd
	RPop(ctx context.Context, key string) *StringCmd
	RPush(ctx context.Context, key string, values ...interface{}) *IntCmd
	RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd
	SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd
	SCard(ctx context.Context, key string) *IntCmd
	SDiff(ctx context.Context, keys ...string) *StrSliceCmd
	SDiffStore(destination string, ctx context.Context, keys ...string) *IntCmd
	SInter(ctx context.Context, keys ...string) *StrSliceCmd
	SInterStore(destination string, ctx context.Context, keys ...string) *IntCmd
	SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd
	SMembers(ctx context.Context, key string) *StrSliceCmd
	SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd
	SPop(ctx context.Context, key string) *StringCmd
	SPopN(ctx context.Context, key string, count int64) *StrSliceCmd
	SRandMember(ctx context.Context, key string) *StringCmd
	SRandMemberN(ctx context.Context, key string, count int64) *StrSliceCmd
	SRem(ctx context.Context, key string, members ...interface{}) *IntCmd
	SUnion(ctx context.Context, keys ...string) *StrSliceCmd
	SUnionStore(destination string, ctx context.Context, keys ...string) *IntCmd
	ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd
	ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd
	ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd
	ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd
	ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd
	ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd
	ZIncr(ctx context.Context, key string, member *Z) *FloatCmd
	ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd
	ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd
	ZCard(ctx context.Context, key string) *IntCmd
	ZCount(ctx context.Context, key, min, max string) *IntCmd
	ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd
	ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd
	ZRange(ctx context.Context, key string, start, stop int64) *StrSliceCmd
	ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
	ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StrSliceCmd
	ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
	ZRank(ctx context.Context, key, member string) *IntCmd
	ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd
	ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd
	ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd
	ZRevRange(ctx context.Context, key string, start, stop int64) *StrSliceCmd
	ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd
	ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StrSliceCmd
	ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd
	ZRevRank(ctx context.Context, key, member string) *IntCmd
	ZScore(ctx context.Context, key, member string) *FloatCmd
	ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd
	PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd
	PFCount(ctx context.Context, keys ...string) *IntCmd
	PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd
}

type IntCmd

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

func NewIntCmd

func NewIntCmd(client *Redis, name string, args ...interface{}) *IntCmd

func (*IntCmd) Err

func (c *IntCmd) Err() error

func (*IntCmd) Result

func (c *IntCmd) Result() (int64, error)

func (*IntCmd) Uint64

func (c *IntCmd) Uint64() (uint64, error)

func (*IntCmd) Val

func (c *IntCmd) Val() int64

type Redis

type Redis struct{}

func NewRedis

func NewRedis() *Redis

func (*Redis) Append

func (c *Redis) Append(ctx context.Context, key, value string) *IntCmd

func (*Redis) BitCount

func (c *Redis) BitCount(ctx context.Context, key string, bitCount *BitCountArgs) *IntCmd

func (*Redis) Decr

func (c *Redis) Decr(ctx context.Context, key string) *IntCmd

func (*Redis) DecrBy

func (c *Redis) DecrBy(ctx context.Context, key string, value int64) *IntCmd

func (*Redis) Del

func (c *Redis) Del(ctx context.Context, keys ...string) *IntCmd

func (*Redis) Exists

func (c *Redis) Exists(ctx context.Context, keys ...string) *IntCmd

func (*Redis) Expire

func (c *Redis) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd

func (*Redis) ExpireAt

func (c *Redis) ExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd

func (*Redis) Get

func (c *Redis) Get(ctx context.Context, key string) *StringCmd

func (*Redis) GetBit

func (c *Redis) GetBit(ctx context.Context, key string, offset int64) *IntCmd

func (*Redis) GetRange

func (c *Redis) GetRange(ctx context.Context, key string, start, end int64) *StringCmd

func (*Redis) GetSet

func (c *Redis) GetSet(ctx context.Context, key string, value interface{}) *StringCmd

func (*Redis) HDel

func (c *Redis) HDel(ctx context.Context, key string, fields ...string) *IntCmd

------------------------------------------------------------------------------ Hash

func (*Redis) HExists

func (c *Redis) HExists(ctx context.Context, key, field string) *BoolCmd

func (*Redis) HGet

func (c *Redis) HGet(ctx context.Context, key, field string) *StringCmd

func (*Redis) HGetAll

func (c *Redis) HGetAll(ctx context.Context, key string) *StrStrMapCmd

func (*Redis) HIncrBy

func (c *Redis) HIncrBy(ctx context.Context, key, field string, incrI64 int64) *IntCmd

func (*Redis) HIncrByFloat

func (c *Redis) HIncrByFloat(ctx context.Context, key, field string, incrF64 float64) *FloatCmd

func (*Redis) HKeys

func (c *Redis) HKeys(ctx context.Context, key string) *StrSliceCmd

func (*Redis) HLen

func (c *Redis) HLen(ctx context.Context, key string) *IntCmd

func (*Redis) HMGet

func (c *Redis) HMGet(ctx context.Context, key string, fields ...string) *SliceCmd

func (*Redis) HMSet

func (c *Redis) HMSet(ctx context.Context, key string, pairs ...interface{}) *StatusCmd

HMSet pairs can be map or indefinite parameter eg: 1: map[string]interface{}{"k1":"v1","k2":"v2"} 2: "k1", "v1", "k2", "v2"

func (*Redis) HSet

func (c *Redis) HSet(ctx context.Context, key string, field string, value interface{}) *BoolCmd

func (*Redis) HSetNX

func (c *Redis) HSetNX(ctx context.Context, key, field string, value interface{}) *BoolCmd

func (*Redis) HVals

func (c *Redis) HVals(ctx context.Context, key string) *StrSliceCmd

func (*Redis) Incr

func (c *Redis) Incr(ctx context.Context, key string) *IntCmd

func (*Redis) IncrBy

func (c *Redis) IncrBy(ctx context.Context, key string, value int64) *IntCmd

func (*Redis) IncrByFloat

func (c *Redis) IncrByFloat(ctx context.Context, key string, value float64) *FloatCmd

func (*Redis) LIndex

func (c *Redis) LIndex(ctx context.Context, key string, index int64) *StringCmd

------------------------------------------------------------------------------ List

func (*Redis) LInsert

func (c *Redis) LInsert(ctx context.Context, key, op string, pivot, value interface{}) *IntCmd

func (*Redis) LLen

func (c *Redis) LLen(ctx context.Context, key string) *IntCmd

func (*Redis) LPop

func (c *Redis) LPop(ctx context.Context, key string) *StringCmd

func (*Redis) LPush

func (c *Redis) LPush(ctx context.Context, key string, values ...interface{}) *IntCmd

func (*Redis) LPushX

func (c *Redis) LPushX(ctx context.Context, key string, values ...interface{}) *IntCmd

func (*Redis) LRange

func (c *Redis) LRange(ctx context.Context, key string, start, stop int64) *StrSliceCmd

func (*Redis) LRem

func (c *Redis) LRem(ctx context.Context, key string, count int64, value interface{}) *IntCmd

func (*Redis) LSet

func (c *Redis) LSet(ctx context.Context, key string, index int64, value interface{}) *StatusCmd

func (*Redis) LTrim

func (c *Redis) LTrim(ctx context.Context, key string, start, stop int64) *StatusCmd

func (*Redis) MGet

func (c *Redis) MGet(ctx context.Context, keys ...string) *SliceCmd

func (*Redis) MSet

func (c *Redis) MSet(ctx context.Context, pairs ...interface{}) *StatusCmd

MSet pairs can be map or indefinite parameter eg: 1: map[string]interface{}{"k1":"v1","k2":"v2"} 2: "k1", "v1", "k2", "v2"

func (*Redis) PExpire

func (c *Redis) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd

func (*Redis) PExpireAt

func (c *Redis) PExpireAt(ctx context.Context, key string, tm time.Time) *BoolCmd

func (*Redis) PFAdd

func (c *Redis) PFAdd(ctx context.Context, key string, els ...interface{}) *IntCmd

func (*Redis) PFCount

func (c *Redis) PFCount(ctx context.Context, keys ...string) *IntCmd

func (*Redis) PFMerge

func (c *Redis) PFMerge(ctx context.Context, dest string, keys ...string) *StatusCmd

func (*Redis) PTTL

func (c *Redis) PTTL(ctx context.Context, key string) *DurationCmd

func (*Redis) Persist

func (c *Redis) Persist(ctx context.Context, key string) *BoolCmd

func (*Redis) RPop

func (c *Redis) RPop(ctx context.Context, key string) *StringCmd

func (*Redis) RPush

func (c *Redis) RPush(ctx context.Context, key string, values ...interface{}) *IntCmd

func (*Redis) RPushX

func (c *Redis) RPushX(ctx context.Context, key string, values ...interface{}) *IntCmd

func (*Redis) SAdd

func (c *Redis) SAdd(ctx context.Context, key string, members ...interface{}) *IntCmd

func (*Redis) SCard

func (c *Redis) SCard(ctx context.Context, key string) *IntCmd

func (*Redis) SDiff

func (c *Redis) SDiff(ctx context.Context, keys ...string) *StrSliceCmd

func (*Redis) SDiffStore

func (c *Redis) SDiffStore(destination string, ctx context.Context, keys ...string) *IntCmd

func (*Redis) SInter

func (c *Redis) SInter(ctx context.Context, keys ...string) *StrSliceCmd

func (*Redis) SInterStore

func (c *Redis) SInterStore(destination string, ctx context.Context, keys ...string) *IntCmd

func (*Redis) SIsMember

func (c *Redis) SIsMember(ctx context.Context, key string, member interface{}) *BoolCmd

func (*Redis) SMembers

func (c *Redis) SMembers(ctx context.Context, key string) *StrSliceCmd

SMembers `SMEMBERS key` command output as a slice.

func (*Redis) SMove

func (c *Redis) SMove(ctx context.Context, source, destination string, member interface{}) *BoolCmd

func (*Redis) SPop

func (c *Redis) SPop(ctx context.Context, key string) *StringCmd

SPop `SPOP key` command.

func (*Redis) SPopN

func (c *Redis) SPopN(ctx context.Context, key string, count int64) *StrSliceCmd

SPOP `SPOP ctx context.Context, key count` command.

func (*Redis) SRandMember

func (c *Redis) SRandMember(ctx context.Context, key string) *StringCmd

SRandMember `SRANDMEMBER key` command.

func (*Redis) SRandMemberN

func (c *Redis) SRandMemberN(ctx context.Context, key string, count int64) *StrSliceCmd

SRandMemberN `SRANDMEMBER ctx context.Context, key count` command.

func (*Redis) SRem

func (c *Redis) SRem(ctx context.Context, key string, members ...interface{}) *IntCmd

func (*Redis) SUnion

func (c *Redis) SUnion(ctx context.Context, keys ...string) *StrSliceCmd

func (*Redis) SUnionStore

func (c *Redis) SUnionStore(destination string, ctx context.Context, keys ...string) *IntCmd

func (*Redis) Set

func (c *Redis) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd

func (*Redis) SetBit

func (c *Redis) SetBit(ctx context.Context, key string, offset int64, value int) *IntCmd

func (*Redis) SetNX

func (c *Redis) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd

SetNX is short for "SET If Not Exists".

func (*Redis) SetRange

func (c *Redis) SetRange(ctx context.Context, key string, offset int64, value string) *IntCmd

func (*Redis) SetXX

func (c *Redis) SetXX(ctx context.Context, key string, value interface{}) *BoolCmd

SetXX is short for "SET If Exists".

func (*Redis) StrLen

func (c *Redis) StrLen(ctx context.Context, key string) *IntCmd

func (*Redis) TTL

func (c *Redis) TTL(ctx context.Context, key string) *DurationCmd

func (*Redis) Type

func (c *Redis) Type(ctx context.Context, key string) *StatusCmd

func (*Redis) ZAdd

func (c *Redis) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd

ZAdd `ZADD ctx context.Context, key score member [score member ...]` command.

func (*Redis) ZAddCh

func (c *Redis) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd

ZAddCh `ZADD ctx context.Context, key CH score member [score member ...]` command.

func (*Redis) ZAddNX

func (c *Redis) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd

ZAddNX `ZADD ctx context.Context, key NX score member [score member ...]` command.

func (*Redis) ZAddNXCh

func (c *Redis) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd

ZAddNXCh `ZADD ctx context.Context, key NX CH score member [score member ...]` command.

func (*Redis) ZAddXX

func (c *Redis) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd

ZAddXX `ZADD ctx context.Context, key XX score member [score member ...]` command.

func (*Redis) ZAddXXCh

func (c *Redis) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd

ZAddXXCh `ZADD ctx context.Context, key XX CH score member [score member ...]` command.

func (*Redis) ZCard

func (c *Redis) ZCard(ctx context.Context, key string) *IntCmd

func (*Redis) ZCount

func (c *Redis) ZCount(ctx context.Context, key, min, max string) *IntCmd

func (*Redis) ZIncr

func (c *Redis) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd

ZIncr `ZADD ctx context.Context, key INCR score member` command.

func (*Redis) ZIncrBy

func (c *Redis) ZIncrBy(ctx context.Context, key string, increment float64, member string) *FloatCmd

func (*Redis) ZIncrNX

func (c *Redis) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd

ZIncrNX `ZADD ctx context.Context, key NX INCR score member` command.

func (*Redis) ZIncrXX

func (c *Redis) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd

ZIncrXX `ZADD ctx context.Context, key XX INCR score member` command.

func (*Redis) ZInterStore

func (c *Redis) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd

func (*Redis) ZRange

func (c *Redis) ZRange(ctx context.Context, key string, start, stop int64) *StrSliceCmd

func (*Redis) ZRangeByScore

func (c *Redis) ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StrSliceCmd

func (*Redis) ZRangeByScoreWithScores

func (c *Redis) ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd

func (*Redis) ZRangeWithScores

func (c *Redis) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd

func (*Redis) ZRank

func (c *Redis) ZRank(ctx context.Context, key, member string) *IntCmd

func (*Redis) ZRem

func (c *Redis) ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd

func (*Redis) ZRemRangeByRank

func (c *Redis) ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd

func (*Redis) ZRemRangeByScore

func (c *Redis) ZRemRangeByScore(ctx context.Context, key, min, max string) *IntCmd

func (*Redis) ZRevRange

func (c *Redis) ZRevRange(ctx context.Context, key string, start, stop int64) *StrSliceCmd

func (*Redis) ZRevRangeByScore

func (c *Redis) ZRevRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StrSliceCmd

func (*Redis) ZRevRangeByScoreWithScores

func (c *Redis) ZRevRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd

func (*Redis) ZRevRangeWithScores

func (c *Redis) ZRevRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd

func (*Redis) ZRevRank

func (c *Redis) ZRevRank(ctx context.Context, key, member string) *IntCmd

func (*Redis) ZScore

func (c *Redis) ZScore(ctx context.Context, key, member string) *FloatCmd

func (*Redis) ZUnionStore

func (c *Redis) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd

type SliceCmd

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

func NewSliceCmd

func NewSliceCmd(client *Redis, name string, args ...interface{}) *SliceCmd

func (*SliceCmd) Err

func (c *SliceCmd) Err() error

func (*SliceCmd) Result

func (c *SliceCmd) Result() ([]interface{}, error)

func (*SliceCmd) Val

func (c *SliceCmd) Val() []interface{}

type StatusCmd

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

func NewStatusCmd

func NewStatusCmd(client *Redis, name string, args ...interface{}) *StatusCmd

func (*StatusCmd) Err

func (c *StatusCmd) Err() error

func (*StatusCmd) Result

func (c *StatusCmd) Result() (string, error)

func (*StatusCmd) Val

func (c *StatusCmd) Val() string

type StrSliceCmd

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

func NewStrSliceCmd

func NewStrSliceCmd(client *Redis, name string, args ...interface{}) *StrSliceCmd

func (*StrSliceCmd) Err

func (c *StrSliceCmd) Err() error

func (*StrSliceCmd) Result

func (c *StrSliceCmd) Result() ([]string, error)

func (*StrSliceCmd) Val

func (c *StrSliceCmd) Val() []string

type StrStrMapCmd

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

func NewStrStrMapCmd

func NewStrStrMapCmd(client *Redis, name string, args ...interface{}) *StrStrMapCmd

func (*StrStrMapCmd) Err

func (c *StrStrMapCmd) Err() error

func (*StrStrMapCmd) Result

func (c *StrStrMapCmd) Result() (map[string]string, error)

func (*StrStrMapCmd) Val

func (c *StrStrMapCmd) Val() map[string]string

type StringCmd

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

func NewStringCmd

func NewStringCmd(client *Redis, name string, args ...interface{}) *StringCmd

func (*StringCmd) Err

func (c *StringCmd) Err() error

func (*StringCmd) Float64

func (c *StringCmd) Float64() (float64, error)

func (*StringCmd) Int

func (c *StringCmd) Int() (int, error)

func (*StringCmd) Int64

func (c *StringCmd) Int64() (int64, error)

func (*StringCmd) Result

func (c *StringCmd) Result() (string, error)

func (*StringCmd) Time

func (c *StringCmd) Time() (time.Time, error)

func (*StringCmd) Uint64

func (c *StringCmd) Uint64() (uint64, error)

func (*StringCmd) Val

func (c *StringCmd) Val() string

type Z

type Z struct {
	Score  float64
	Member interface{}
}

type ZRangeBy

type ZRangeBy struct {
	Min, Max      string
	Offset, Count int64
}

type ZSlice

type ZSlice []Z

type ZSliceCmd

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

func NewZSliceCmd

func NewZSliceCmd(client *Redis, name string, args ...interface{}) *ZSliceCmd

func (*ZSliceCmd) Err

func (c *ZSliceCmd) Err() error

func (*ZSliceCmd) Result

func (c *ZSliceCmd) Result() ([]Z, error)

func (*ZSliceCmd) Val

func (c *ZSliceCmd) Val() []Z

type ZStore

type ZStore struct {
	Keys    []string
	Weights []float64
	// Can be SUM, MIN or MAX.
	Aggregate string
}

Jump to

Keyboard shortcuts

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