_redis

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Machine

type Machine struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Database string `json:"database"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type Redis

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

func New

func New() *Redis

func (*Redis) Append

func (this *Redis) Append(key string, value string) int64

func (*Redis) BLPop

func (this *Redis) BLPop(timeout time.Duration, keyList ...string) []string

func (*Redis) BRPop

func (this *Redis) BRPop(timeout time.Duration, keyList ...string) []string

func (*Redis) BRPopLPush

func (this *Redis) BRPopLPush(r string, l string, timeout time.Duration) string

func (*Redis) BgRewriteAOF

func (this *Redis) BgRewriteAOF() string

func (*Redis) BgSave

func (this *Redis) BgSave() string

func (*Redis) BitCount

func (this *Redis) BitCount(key string, bitCount *redis.BitCount) int64

func (*Redis) ClientGetName

func (this *Redis) ClientGetName() string

func (*Redis) ClientKill

func (this *Redis) ClientKill(ipPort string) string

func (*Redis) ClientList

func (this *Redis) ClientList() string

func (*Redis) ConfigGet

func (this *Redis) ConfigGet(label string) map[string]string

func (*Redis) ConfigResetStat

func (this *Redis) ConfigResetStat() string

func (*Redis) ConfigRewrite

func (this *Redis) ConfigRewrite() string

func (*Redis) ConfigSet

func (this *Redis) ConfigSet(label string, value string) string

func (*Redis) Context

func (this *Redis) Context(context context.Context) *Redis

func (*Redis) DBSize

func (this *Redis) DBSize() int64

func (*Redis) Decr

func (this *Redis) Decr(key string) int64

func (*Redis) DecrBy

func (this *Redis) DecrBy(key string, decrement int64) int64

func (*Redis) Del

func (this *Redis) Del(keyList ...string) int64

func (*Redis) Do

func (this *Redis) Do(parameter ...interface{}) *redis.Cmd

func (*Redis) Dsn

func (this *Redis) Dsn(dsn string) *Redis

func (*Redis) Dump

func (this *Redis) Dump(key string) string

func (*Redis) Echo

func (this *Redis) Echo(message interface{}) string

func (*Redis) Eval

func (this *Redis) Eval(script string, keyList []string, parameterList ...interface{}) interface{}

func (*Redis) EvalSha

func (this *Redis) EvalSha(sha1 string, keyList []string, parameterList ...interface{}) interface{}

func (*Redis) Exists

func (this *Redis) Exists(key string) int64

func (*Redis) Expire

func (this *Redis) Expire(key string, expiration time.Duration) bool

func (*Redis) ExpireAt

func (this *Redis) ExpireAt(key string, t time.Time) bool

func (*Redis) FlushAll

func (this *Redis) FlushAll() string

func (*Redis) FlushDb

func (this *Redis) FlushDb() string

func (*Redis) Get

func (this *Redis) Get(key string) string

func (*Redis) GetBit

func (this *Redis) GetBit(key string, offset int64) int64

func (*Redis) GetRange

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

func (*Redis) GetSet

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

func (*Redis) HDel

func (this *Redis) HDel(key string, field string) int64

func (*Redis) HExists

func (this *Redis) HExists(key string, field string) bool

func (*Redis) HGet

func (this *Redis) HGet(key string, field string) string

func (*Redis) HGetAll

func (this *Redis) HGetAll(key string) map[string]string

func (*Redis) HIncrBy

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

func (*Redis) HIncrByFloat

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

func (*Redis) HKeys

func (this *Redis) HKeys(key string) []string

func (*Redis) HLen

func (this *Redis) HLen(key string) int64

func (*Redis) HMGet

func (this *Redis) HMGet(key string, field ...string) []string

func (*Redis) HMSet

func (this *Redis) HMSet(key string, parameter ...interface{}) bool

func (*Redis) HScan

func (this *Redis) HScan(key string, cursor uint64, match string, count int64) ([]string, uint64)

func (*Redis) HSet

func (this *Redis) HSet(key string, parameter ...interface{}) int64

func (*Redis) HSetNX

func (this *Redis) HSetNX(key string, field string, value interface{}) bool

func (*Redis) HVals

func (this *Redis) HVals(key string) []string

func (*Redis) Incr

func (this *Redis) Incr(key string) int64

func (*Redis) IncrBy

func (this *Redis) IncrBy(key string, value int64) int64

func (*Redis) IncrByFloat

func (this *Redis) IncrByFloat(key string, value float64) float64

func (*Redis) Info

func (this *Redis) Info() string

func (*Redis) Keys

func (this *Redis) Keys(pattern string) []string

func (*Redis) LIndex

func (this *Redis) LIndex(key string, index int64) string

func (*Redis) LLen

func (this *Redis) LLen(key string) int64

func (*Redis) LPop

func (this *Redis) LPop(key string) string

func (*Redis) LPush

func (this *Redis) LPush(key string, valueList ...interface{}) int64

func (*Redis) LPushX

func (this *Redis) LPushX(key string, valueList ...interface{}) int64

func (*Redis) LRange

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

func (*Redis) LRem

func (this *Redis) LRem(key string, count int64, value interface{}) int64

func (*Redis) LSet

func (this *Redis) LSet(key string, index int64, value interface{}) string

func (*Redis) LTrim

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

func (*Redis) LastSave

func (this *Redis) LastSave() int64

func (*Redis) MGet

func (this *Redis) MGet(keyList ...string) []string

func (*Redis) MSet

func (this *Redis) MSet(parameterList ...interface{}) string

func (*Redis) MSetNx

func (this *Redis) MSetNx(parameterList ...interface{}) bool

func (*Redis) Machine

func (this *Redis) Machine(machine *Machine) *Redis

func (*Redis) MachineMaster

func (this *Redis) MachineMaster(machineMaster *Machine) *Redis

func (*Redis) MachineSlaver

func (this *Redis) MachineSlaver(machineSlaver *Machine) *Redis

func (*Redis) Master

func (this *Redis) Master(master bool) *Redis

func (*Redis) Migrate

func (this *Redis) Migrate(host string, port string, key string, database int, timeout time.Duration) string

func (*Redis) Move

func (this *Redis) Move(key string, database int) bool

func (*Redis) PExpire

func (this *Redis) PExpire(key string, expiration time.Duration) bool

func (*Redis) PExpireAt

func (this *Redis) PExpireAt(key string, t time.Time) bool

func (*Redis) PTtl

func (this *Redis) PTtl(key string) time.Duration

func (*Redis) Persist

func (this *Redis) Persist(key string) bool

func (*Redis) Ping

func (this *Redis) Ping() string

func (*Redis) RPop

func (this *Redis) RPop(key string) string

func (*Redis) RPopLPush

func (this *Redis) RPopLPush(r string, l string) string

func (*Redis) RPush

func (this *Redis) RPush(key string, valueList ...interface{}) int64

func (*Redis) RPushX

func (this *Redis) RPushX(key string, valueList ...interface{}) int64

func (*Redis) RandomKey

func (this *Redis) RandomKey() string

func (*Redis) Rename

func (this *Redis) Rename(old string, new string) string

func (*Redis) RenameNx

func (this *Redis) RenameNx(old string, new string) bool

func (*Redis) Restore

func (this *Redis) Restore(key string, ttl time.Duration, value string) string

func (*Redis) RestoreReplace

func (this *Redis) RestoreReplace(key string, ttl time.Duration, value string) string

func (*Redis) SAdd

func (this *Redis) SAdd(key string, valueList ...interface{}) int64

func (*Redis) SCard

func (this *Redis) SCard(key string) int64

func (*Redis) SDiff

func (this *Redis) SDiff(keyList ...string) []string

func (*Redis) SDiffStore

func (this *Redis) SDiffStore(store string, keyList ...string) int64

func (*Redis) SInter

func (this *Redis) SInter(keyList ...string) []string

func (*Redis) SInterStore

func (this *Redis) SInterStore(store string, keyList ...string) int64

func (*Redis) SIsMember

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

func (*Redis) SMembers

func (this *Redis) SMembers(key string) []string

func (*Redis) SMove

func (this *Redis) SMove(old string, new string, member interface{}) bool

func (*Redis) SPop

func (this *Redis) SPop(key string) string

func (*Redis) SRandMember

func (this *Redis) SRandMember(key string) string

func (*Redis) SRem

func (this *Redis) SRem(key string, memberList ...interface{}) int64

func (*Redis) SScan

func (this *Redis) SScan(key string, cursor uint64, match string, count int64) ([]string, uint64)

func (*Redis) SUnion

func (this *Redis) SUnion(keyList ...string) []string

func (*Redis) SUnionStore

func (this *Redis) SUnionStore(store string, keyList ...string) int64

func (*Redis) Save

func (this *Redis) Save() string

func (*Redis) Scan

func (this *Redis) Scan(cursor uint64, match string, count int64) ([]string, uint64)

func (*Redis) ScriptExists

func (this *Redis) ScriptExists(sha1List ...string) []bool

func (*Redis) ScriptFlush

func (this *Redis) ScriptFlush() string

func (*Redis) ScriptKill

func (this *Redis) ScriptKill() string

func (*Redis) ScriptLoad

func (this *Redis) ScriptLoad(script string) string

func (*Redis) Set

func (this *Redis) Set(key string, value interface{}, expiration time.Duration) string

func (*Redis) SetBit

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

func (*Redis) SetEx

func (this *Redis) SetEx(key string, seconds int64, value interface{}, expiration time.Duration) string

func (*Redis) SetNx

func (this *Redis) SetNx(key string, value interface{}, expiration time.Duration) bool

func (*Redis) SetRange

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

func (*Redis) SlowLogGet

func (this *Redis) SlowLogGet(num int64) []redis.SlowLog

func (*Redis) StrLen

func (this *Redis) StrLen(key string) int64

func (*Redis) Ttl

func (this *Redis) Ttl(key string) time.Duration

func (*Redis) Type

func (this *Redis) Type(key string) string
func (this *Redis) Unlink(keyList ...string) int64

func (*Redis) ZAdd

func (this *Redis) ZAdd(key string, valueList ...interface{}) int64

func (*Redis) ZCard

func (this *Redis) ZCard(key string) int64

func (*Redis) ZCount

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

func (*Redis) ZIncrBy

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

func (*Redis) ZRange

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

func (*Redis) ZRangeByScore

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

func (*Redis) ZRank

func (this *Redis) ZRank(key string, member string) int64

func (*Redis) ZRem

func (this *Redis) ZRem(key string, memberList ...interface{}) int64

func (*Redis) ZRemRangeByRank

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

func (*Redis) ZRemRangeByScore

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

func (*Redis) ZRevRange

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

func (*Redis) ZRevRangeByScore

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

func (*Redis) ZRevRank

func (this *Redis) ZRevRank(key string, member string) int64

func (*Redis) ZScan

func (this *Redis) ZScan(key string, cursor uint64, match string, count int64) ([]string, uint64)

func (*Redis) ZScore

func (this *Redis) ZScore(key string, member string) float64

Jump to

Keyboard shortcuts

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