Documentation ¶
Index ¶
- Constants
- Variables
- type Atomic
- type Hash
- func (h *Hash) Consume(field interface{}, value int64) (int64, bool, error)
- func (h *Hash) Delete(fields ...interface{}) error
- func (h *Hash) Get(field, value interface{}) (bool, error)
- func (h *Hash) GetAll(value interface{}) error
- func (h *Hash) Gets(value interface{}, fields ...interface{}) error
- func (h *Hash) Increment(field interface{}, increment int64) (int64, error)
- func (h *Hash) Set(field, value interface{}) error
- type Key
- func (k *Key) Delete(keys ...interface{}) error
- func (k *Key) Exist(key interface{}) (bool, error)
- func (k *Key) Get(key, value interface{}) (bool, error)
- func (k *Key) Incr(key interface{}, value int64) (int64, error)
- func (k *Key) Set(key, value interface{}) error
- func (k *Key) SetEX(key, value interface{}, second int64) error
- func (k *Key) SetNEX(key, value interface{}, second int64) (bool, error)
- func (k *Key) SetNX(key, value interface{}) (bool, error)
- type Option
- type Redis
- func (r *Redis) Atomic(key string) *Atomic
- func (r *Redis) Do(cmd string, args ...interface{}) (interface{}, error)
- func (r *Redis) Hash(key string) *Hash
- func (r *Redis) Key() *Key
- func (r *Redis) Script() *script
- func (r *Redis) Set(key string) *Set
- func (r *Redis) Singleton(key string) *Singleton
- func (r *Redis) ZOrder(key string) *ZOrder
- type Script
- type Set
- type Singleton
- type ZOrder
Constants ¶
View Source
const ( OK = "OK" PING = "PING" PONG = "PONG" // key DEL = "DEL" EXISTS = "EXISTS" INCRBY = "INCRBY" // string SET = "SET" NX = "NX" EX = "EX" GET = "GET" // hash HDEL = "HDEL" HSET = "HSET" HGET = "HGET" HMGET = "HMGET" HGETALL = "HGETALL" HINCRBY = "HINCRBY" // set SADD = "SADD" SREM = "SREM" SMEMBERS = "SMEMBERS" // zorder ZINCRBY = "ZINCRBY" ZREVRANGE = "ZREVRANGE" ZSCORE = "ZSCORE" ZREVRANK = "ZREVRANK" WITHSCORES = "WITHSCORES" )
Variables ¶
View Source
var ( ErrAtomicLockFailed = errors.New("lock failed") // 加锁失败 ErrAtomicUnlockFailed = errors.New("unlock failed") // 解锁失败 )
Functions ¶
This section is empty.
Types ¶
type Hash ¶
type Hash struct {
// contains filtered or unexported fields
}
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.