Documentation ¶
Overview ¶
@Time : 2019-05-28 15:22 @Author : frozenchen @File : Item @Software: studio
@Time : 2019-05-10 09:55 @Author : frozenchen @File : config @Software: studio-library
@Time : 2019-05-28 15:33 @Author : frozenchen @File : error @Software: studio
@Time : 2019-05-10 09:55 @Author : frozenchen @File : redis @Software: studio-library
Index ¶
- Constants
- Variables
- type Config
- type Item
- type Redis
- func (r *Redis) CaCheSet(ctx context.Context, item *Item) (err error)
- func (r *Redis) CacheGet(ctx context.Context, key string) (reply *Reply)
- func (r *Redis) CacheGetMulti(ctx context.Context, keys []string) (res *Replies, err error)
- func (r *Redis) Delete(ctx context.Context, key string) (err error)
- func (r *Redis) Deletes(ctx context.Context, key string) (err error)
- func (r *Redis) Get(ctx context.Context, key string) ([]byte, error)
- func (r *Redis) GetConn() redis.Conn
- func (r *Redis) Set(ctx context.Context, key string, value interface{}, Exp int) (err error)
- type Replies
- type Reply
Constants ¶
View Source
const (
JSONFLAG = "json"
)
Variables ¶
View Source
var ( ErrKey = errors.New("redis: key is empty") ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type Item ¶ added in v0.0.6
type Item struct { // Key is the Item's key (250 bytes maximum). Key string // Value is the Item's value. Value []byte // Object is the Item's object for use codec. Object interface{} // Flags are server-opaque flags whose semantics are entirely // up to the app. Flags uint32 // Expiration is the cache expiration time, in seconds: either a relative // time from now (up to 1 month), or an absolute Unix epoch time. // Zero means the Item has no expiration time. Expiration int32 // contains filtered or unexported fields }
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) CacheGetMulti ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.