Documentation
¶
Index ¶
- Constants
- func AllCache(search string, page, rows int) (et.List, error)
- func Close()
- func Count(key string, expiration time.Duration) int
- func Delete(key string) (int64, error)
- func DeleteCtx(ctx context.Context, key string) (int64, error)
- func DeleteVerify(device string, key string) (int64, error)
- func Empty(match string) error
- func Exists(key string) bool
- func ExistsCtx(ctx context.Context, key string) bool
- func FromId() string
- func GenId(args ...interface{}) string
- func GenKey(args ...interface{}) string
- func Get(key, def string) (string, error)
- func GetCtx(ctx context.Context, key, def string) (string, error)
- func GetItem(key string) (et.Item, error)
- func GetItems(key string) (et.Items, error)
- func GetJson(key string) (et.Json, error)
- func GetRecordId(tag, id string) string
- func GetVerify(device string, key string) (string, error)
- func HDelete(key, atr string) error
- func HDeleteCtx(ctx context.Context, key, atr string) error
- func HGet(key string) (map[string]string, error)
- func HGetAtrib(key, atr string) (string, error)
- func HGetCtx(ctx context.Context, key string) (map[string]string, error)
- func HSet(key string, val map[string]string) error
- func HSetAtrib(key, atr, val string) error
- func HSetCtx(ctx context.Context, key string, val map[string]string) error
- func HandlerAll(w http.ResponseWriter, r *http.Request)
- func HandlerDelete(w http.ResponseWriter, r *http.Request)
- func HandlerGet(w http.ResponseWriter, r *http.Request)
- func More(key string, second time.Duration) int
- func RecordId(tag string) string
- func Set(key string, val interface{}, second time.Duration) interface{}
- func SetCtx(ctx context.Context, key, val string, millisecond time.Duration) string
- func SetD(key string, val interface{}, expiration int64) interface{}
- func SetDuration(key string, val interface{}, millisecond time.Duration) interface{}
- func SetH(key string, val interface{}, expiration int64) interface{}
- func SetM(key string, val interface{}, expiration int64) interface{}
- func SetVerify(device, key, val string, duration time.Duration) interface{}
- func SetW(key string, val interface{}, expiration int64) interface{}
- func SetY(key string, val interface{}, expiration int64) interface{}
- type Conn
- type Message
Constants ¶
const IsNil = redis.Nil
const PackageName = "cache"
Variables ¶
This section is empty.
Functions ¶
func DeleteVerify ¶
* * DeleteVerify * @params device string, key string * @return int64, error *
func GenId ¶
func GenId(args ...interface{}) string
* * GenId * @params args ...interface{} * @return string *
func GenKey ¶
func GenKey(args ...interface{}) string
* * GenKey * @params args ...interface{} * @return string *
func GetCtx ¶
* * GetCtx * @params ctx context.Context, key string, def string * @return string, error *
func GetRecordId ¶
* * GetRecordId * @param tag string, id string * @return string *
func HDeleteCtx ¶
* * HDeleteCtx * @params ctx context.Context, key string, atr string * @return error *
func HGetCtx ¶
* * HGetCtx * @params ctx context.Context, key string * @return map[string]string, error *
func HSetCtx ¶
* * HSetCtx * @params ctx context.Context, key string, val map[string]string * @return error *
func HandlerAll ¶
func HandlerAll(w http.ResponseWriter, r *http.Request)
* * HandlerAll * @params w http.ResponseWriter, r *http.Request *
func HandlerDelete ¶
func HandlerDelete(w http.ResponseWriter, r *http.Request)
* * HandlerDelete * @params w http.ResponseWriter, r *http.Request *
func HandlerGet ¶
func HandlerGet(w http.ResponseWriter, r *http.Request)
* * HandlerGet * @params w http.ResponseWriter, r *http.Request *
func Set ¶
* * Set * @params key string, val interface{}, second time.Duration * @return interface{} *
func SetCtx ¶
* * SetCtx * @params ctx context.Context, key string, val string, millisecond time.Duration * @return string *
func SetD ¶
* * SetD * @params key string, val interface{}, expiration int64 * @return interface{} *
func SetDuration ¶
* * SetDuration * @params key string, val interface{}, millisecond time.Duration * @return interface{} *
func SetH ¶
* * SetH * @params key string, val interface{}, expiration int64 * @return interface{} *
func SetM ¶
* * SetM * @params key string, val interface{}, expiration int64 * @return interface{} *
func SetVerify ¶
* * SetVerify * @params device string, key string, val string, duration time.Duration * @return interface{} *