Documentation ¶
Index ¶
- Constants
- func Init()
- type Config
- type Iterator
- type MResult
- type Operation
- type Operations
- type Redis
- func (r *Redis) Client() *redis.Client
- func (r *Redis) Context() context.Context
- func (r *Redis) Del(key string) *Result
- func (r *Redis) Get(key string) *Result
- func (r *Redis) Inrc(key string) *Result
- func (r *Redis) Keys(arg string) *Result
- func (r *Redis) Lock(key string, acquire, timeout time.Duration) (string, error)
- func (r *Redis) MGet(key string) *MResult
- func (r *Redis) Set(key string, value interface{}, ops ...*Operation) *Result
- func (r *Redis) TTL(key string) *Result
- func (r *Redis) UnLock(key, code string) bool
- type Result
Constants ¶
View Source
const ( EXPIRE = "expire" // 过期时间 NX = "nx" // 如果不存在,则SET XX = "xx" // 如果存在,则SET )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator 迭代器
func NewIterator ¶
func NewIterator(data []interface{}) *Iterator
type MResult ¶
type MResult struct { Value []interface{} Error error }
MResult 列表查询结果
func NewMResult ¶
type Operations ¶
type Operations []*Operation
func (Operations) Find ¶
func (o Operations) Find(name string) *Result
Click to show internal directories.
Click to hide internal directories.