redis

package
v0.0.0-...-bd81c7d Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

func (Error) Error

func (err Error) Error() string

type Redis

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

func New

func New(addrs []string, passwd string, db int,
	poolSize, minIdleConns, maxRetries int, cluster bool) *Redis

func (*Redis) Append

func (p *Redis) Append(key, value string) (res int64, err error)

func (*Redis) BatchHGetAll

func (p *Redis) BatchHGetAll(keys ...string) (res map[string]map[string]string, err error)

func (*Redis) Close

func (p *Redis) Close()

Close 关闭redis

func (*Redis) Del

func (p *Redis) Del(keys ...string) (res int64, err error)

func (*Redis) Exists

func (p *Redis) Exists(keys ...string) (res int64, err error)

func (*Redis) Expire

func (p *Redis) Expire(key string, seconds int64) (res bool, err error)

func (*Redis) Get

func (p *Redis) Get(key string) (res string, err error)

func (*Redis) GetBit

func (p *Redis) GetBit(key string, offset int64) (res int64, err error)

func (*Redis) HGet

func (p *Redis) HGet(key, field string) (res string, err error)

func (*Redis) HGetAll

func (p *Redis) HGetAll(key string) (res map[string]string, err error)

func (*Redis) HIncrBy

func (p *Redis) HIncrBy(key, field string, incr int64) (res int64, err error)

func (*Redis) HMGet

func (p *Redis) HMGet(key string, fields ...string) (res []string, err error)

func (*Redis) HMSet

func (p *Redis) HMSet(key string, fields map[string]interface{}) (res string, err error)

func (*Redis) HSet

func (p *Redis) HSet(key, field string, value interface{}) (res bool, err error)

func (*Redis) IncrBy

func (p *Redis) IncrBy(key string, value int64) (res int64, err error)

func (*Redis) Keys

func (p *Redis) Keys(key string) (res []string, err error)

func (*Redis) LPop

func (p *Redis) LPop(key string) (res string, err error)

func (*Redis) LPush

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

func (*Redis) LRange

func (p *Redis) LRange(key string, start, stop int64) (res []string, err error)

func (*Redis) MGet

func (p *Redis) MGet(keys ...string) (res []string, err error)

func (*Redis) Publish

func (p *Redis) Publish(channel string, message interface{}) (res int64, err error)

func (*Redis) RPop

func (p *Redis) RPop(key string) (res string, err error)

func (*Redis) RPush

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

func (*Redis) Rename

func (p *Redis) Rename(key string, newkey string) (res string, err error)

func (*Redis) SAdd

func (p *Redis) SAdd(key string, members ...interface{}) (res int64, err error)

func (*Redis) SCard

func (p *Redis) SCard(key string) (res int64, err error)

func (*Redis) SInter

func (p *Redis) SInter(keys ...string) (res []string, err error)

func (*Redis) SIsmember

func (p *Redis) SIsmember(key string, member interface{}) (res bool, err error)

func (*Redis) SMembers

func (p *Redis) SMembers(key string) (res []string, err error)

func (*Redis) SPop

func (p *Redis) SPop(key string) (res string, err error)

func (*Redis) SRem

func (p *Redis) SRem(key string, members ...interface{}) (res int64, err error)

func (*Redis) Set

func (p *Redis) Set(key string, value interface{}) (res string, err error)

func (*Redis) SetBit

func (p *Redis) SetBit(key string, offset int64, value int) (res int64, err error)

func (*Redis) SetEx

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

func (*Redis) SetNx

func (p *Redis) SetNx(key string, value interface{}) (res bool, err error)

func (*Redis) SetNxEx

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

func (*Redis) Time

func (p *Redis) Time() (res time.Time, err error)

func (*Redis) ZAdd

func (p *Redis) ZAdd(key string, score float64, member interface{}) (res int64, err error)

func (*Redis) ZCard

func (p *Redis) ZCard(key string) (res int64, err error)

func (*Redis) ZCount

func (p *Redis) ZCount(key, min, max string) (res int64, err error)

func (*Redis) ZIncrBy

func (p *Redis) ZIncrBy(key string, incr float64, member string) (res float64, err error)

func (*Redis) ZRange

func (p *Redis) ZRange(key string, start, stop int64) (res []string, err error)

func (*Redis) ZRem

func (p *Redis) ZRem(key string, members ...interface{}) (res int64, err error)

func (*Redis) ZRemRangeByScore

func (p *Redis) ZRemRangeByScore(key, min, max string) (res int64, err error)

func (*Redis) ZRevRange

func (p *Redis) ZRevRange(key string, start, stop int64) (res []string, err error)

func (*Redis) ZRevRangeByScore

func (p *Redis) ZRevRangeByScore(key string, max, min string, offset, count int64) (res []string, err error)

func (*Redis) ZScore

func (p *Redis) ZScore(key, member string) (res float64, err error)

func (*Redis) ZUnionStore

func (p *Redis) ZUnionStore(dest string, weights []float64, aggregate string, keys ...string) (res int64, err error)

Jump to

Keyboard shortcuts

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