Documentation ¶
Overview ¶
Package redis 工具包
Index ¶
- func ConnectRedis(address string, username string, password string, db int)
- type RdsClient
- func (rds *RdsClient) Decrement(params ...interface{}) bool
- func (rds *RdsClient) Del(keys ...string) bool
- func (rds *RdsClient) FlushDB() bool
- func (rds *RdsClient) Get(key string) string
- func (rds *RdsClient) HGet(key string, field string) string
- func (rds *RdsClient) Has(key string) bool
- func (rds *RdsClient) Increment(params ...interface{}) bool
- func (rds *RdsClient) IsExists(key string) bool
- func (rds *RdsClient) LLen(key string) int64
- func (rds *RdsClient) LPush(key string, values ...interface{}) bool
- func (rds *RdsClient) Ping() error
- func (rds *RdsClient) RPeek(key string) string
- func (rds *RdsClient) RPop(key string) string
- func (rds *RdsClient) SAdd(key string, values ...interface{}) bool
- func (rds *RdsClient) SIsMember(key string, member interface{}) bool
- func (rds *RdsClient) SMembers(key string) []string
- func (rds *RdsClient) SRandMember(key string) string
- func (rds *RdsClient) Set(key string, value interface{}, expiration time.Duration) bool
- func (rds *RdsClient) ZAdd(key string, values ...*redis.Z) bool
- func (rds *RdsClient) ZRange(key string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RdsClient ¶
RdsClient Redis服务
func (*RdsClient) Decrement ¶
Decrement 当前参数只有 1 时,为 key 的值自减 1 当参数有 2 个时,第一个参数为key,第二个参数为要减去的值(int64 类型)
func (*RdsClient) Increment ¶
Increment 当前参数只有 1 时,为 key 的值自增 1 当参数有 2 个时,第一个参数为key,第二个参数为要增加的值(int64 类型)
func (*RdsClient) SRandMember ¶
SRandMember 随机获取集合的元素
Click to show internal directories.
Click to hide internal directories.