Documentation
¶
Index ¶
- Constants
- Variables
- 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 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 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 Set(key string, val interface{}, second time.Duration) error
- func SetCtx(ctx context.Context, key, val string, second time.Duration) error
- func SetD(key string, val interface{}) error
- func SetH(key string, val interface{}) error
- func SetM(key string, val interface{}) error
- func SetVerify(device, key, val string, duration time.Duration) error
- func SetW(key string, val interface{}) error
- func SetY(key string, val interface{}) error
- type Conn
Constants ¶
const IsNil = redis.Nil
Variables ¶
var FromId string
Functions ¶
func AllCache ¶
* * AllCache * @params device string * @params key string * @params val string * @return error *
func Count ¶
* * Count * @params key string * @params expiration time.Duration (second) * @return int64 *
func DeleteCtx ¶
* * DeleteCtx * @params ctx context.Context * @params key string * @return int64, error *
func DeleteVerify ¶
* * DeleteVerify * @params device string * @params key string * @return int64, error *
func ExistsCtx ¶ added in v1.1.38
* * ExistsCtx * @params ctx context.Context * @params key string * @return bool *
func GenId ¶ added in v1.1.21
func GenId(args ...interface{}) string
* * GenId * @params args ...interface{} * @return string *
func GenKey ¶ added in v1.1.0
func GenKey(args ...interface{}) string
* * GenKey * @params args ...interface{} * @return string *
func GetCtx ¶
* * GetCtx * @params ctx context.Context * @params key string * @params def string * @return string, error *
func GetVerify ¶
* * GetVerify * @params device string * @params key string * @return string, error *
func HDeleteCtx ¶
* * HDeleteCtx * @params ctx context.Context * @params key string * @params atr string * @return error *
func HGetCtx ¶
* * HGetCtx * @params ctx context.Context * @params key string * @return map[string]string, error *
func HSetAtrib ¶
* * HSetAtrib * @params key string * @params atr string * @params val string * @return error *
func HSetCtx ¶
* * HSetCtx * @params ctx context.Context * @params key string * @params val map[string]string * @return error *
func HandlerAll ¶
func HandlerAll(w http.ResponseWriter, r *http.Request)
* * HandlerAll * @params w http.ResponseWriter * @params r *http.Request *
func HandlerDelete ¶
func HandlerDelete(w http.ResponseWriter, r *http.Request)
* * HandlerDelete * @params w http.ResponseWriter * @params r *http.Request *
func HandlerGet ¶
func HandlerGet(w http.ResponseWriter, r *http.Request)
* * HandlerGet * @params w http.ResponseWriter * @params r *http.Request *
func Set ¶
* * Set * @params key string * @params val interface{} * @params second time.Duration * @return error *
func SetCtx ¶
* * SetCtx * @params ctx context.Context * @params key string * @params val string * @params second time.Duration * @return error *
func SetVerify ¶
* * SetVerify * @params device string * @params key string * @params val string * @params duration time.Duration * @return error *
Types ¶
type Conn ¶
type Conn struct { *redis.Client // contains filtered or unexported fields }
func (*Conn) Pub ¶ added in v1.1.30
* * Pub * @param channel string * @param message interface{} * @return error *