redis

package
v0.0.0-...-0e811a7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LuaScript

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

func (*LuaScript) GetKeyCount

func (this *LuaScript) GetKeyCount() int

func (*LuaScript) GetScript

func (this *LuaScript) GetScript() string

func (*LuaScript) GetScriptName

func (this *LuaScript) GetScriptName() string

func (*LuaScript) GetScriptSha

func (this *LuaScript) GetScriptSha() string

func (*LuaScript) SetScriptSha

func (this *LuaScript) SetScriptSha(sha string)

type Redis

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

func NewRedis

func NewRedis(address string) (*Redis, error)

func (*Redis) Del

func (d *Redis) Del(key string) (err error)

func (*Redis) EvalSha

func (this *Redis) EvalSha(scriptName string, values ...interface{}) (ret int64, err error)

func (*Redis) Expire

func (d *Redis) Expire(key string, sec int32) (err error)

func (*Redis) GetString

func (d *Redis) GetString(key string) (ret string, err error)

func (*Redis) HDel

func (d *Redis) HDel(hKey string, field ...interface{}) (delNum int, err error)

func (*Redis) HGetAllBytes

func (d *Redis) HGetAllBytes(key string) (bytes [][]byte, err error)

func (*Redis) HGetBytes

func (d *Redis) HGetBytes(key, field string) (value []byte, err error)

func (*Redis) HGetInt64

func (d *Redis) HGetInt64(key, field string) (num int64, err error)

func (*Redis) HGetString

func (d *Redis) HGetString(key, field string) (ret string, err error)

func (*Redis) HIncrby

func (d *Redis) HIncrby(key, field string, num int32) (err error)

func (*Redis) HMGetString

func (d *Redis) HMGetString(key string, field ...interface{}) (ret []string, err error)

注意: 即使都不存在会,ret长度不为0,返回空字符串数组

func (*Redis) HSetBytes

func (d *Redis) HSetBytes(key, field string, value []byte) (err error)

func (*Redis) HSetString

func (d *Redis) HSetString(key, field, value string) (ret int, err error)

func (*Redis) Keys

func (d *Redis) Keys(pattern string) (keys []string, err error)

func (*Redis) LPushInt64

func (d *Redis) LPushInt64(key string, value int64) (err error)

func (*Redis) LRangeAllInt64

func (d *Redis) LRangeAllInt64(key string) (ret []int64, err error)

func (*Redis) Set

func (d *Redis) Set(key, value string) (err error)

func (*Redis) SetNX

func (d *Redis) SetNX(key, value string) (ok bool, err error)

func (*Redis) Wrap

func (d *Redis) Wrap(doSomething func(conn redis.Conn))

func (*Redis) ZAdd

func (d *Redis) ZAdd(key string, pairs ...interface{}) (newAddNum int, err error)

pair = <score, value>

func (*Redis) ZCard

func (d *Redis) ZCard(key string) (num int64, err error)

func (*Redis) ZRank

func (d *Redis) ZRank(key, member string) (rank int, err error)

func (*Redis) ZRem

func (d *Redis) ZRem(key string, members ...interface{}) (remNum int, err error)

func (*Redis) ZScore

func (d *Redis) ZScore(key, member string) (score int64, err error)

Jump to

Keyboard shortcuts

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