Documentation
¶
Index ¶
- Constants
- func AllCache(search string, page, rows int) (et.List, error)
- func Close()
- func Decr(key string) int64
- func DecrCtx(ctx context.Context, key string) int64
- 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 Expire(key string, expiration time.Duration) error
- func ExpireCtx(ctx context.Context, key string, second time.Duration) error
- func FromId() string
- func Get(key, defaultvalue 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 HealthCheck() bool
- func Incr(key string, expiration time.Duration) int64
- func IncrCtx(ctx context.Context, key string, expiration time.Duration) int64
- func IncrDuration(key string, expiration time.Duration) int64
- func IsLoad() bool
- func LPush(key, val string) error
- func LPushCtx(ctx context.Context, key string, val string) error
- func LRange(key string, start, stop int64) ([]string, error)
- func LRangeCtx(ctx context.Context, key string, start int64, stop int64) ([]string, error)
- func LRem(key, val string) error
- func LRemCtx(ctx context.Context, key string, val string) error
- func LTrim(key string, start, stop int64) error
- func LTrimCtx(ctx context.Context, key string, start int64, stop int64) error
- func Load() error
- func Set(key string, val interface{}, expiration time.Duration) interface{}
- func SetCtx(ctx context.Context, key, val string, expiration time.Duration) string
- func SetD(key string, val interface{}, expiration int) interface{}
- func SetDuration(key string, val interface{}, expiration time.Duration) interface{}
- func SetH(key string, val interface{}, expiration int) interface{}
- func SetM(key string, val interface{}, expiration int) interface{}
- func SetVerify(device, key, val string, expiration time.Duration) interface{}
- func SetW(key string, val interface{}, expiration int) interface{}
- func SetY(key string, val interface{}, expiration int) interface{}
- type Conn
- type Message
Constants ¶
const IsNil = redis.Nil
const PackageName = "cache"
Variables ¶
This section is empty.
Functions ¶
func DecrCtx ¶ added in v0.1.15
* * DecrCtx * @params ctx context.Context, key string * @return int64 *
func DeleteVerify ¶
* * DeleteVerify * @params device string, key string * @return int64, error *
func ExpireCtx ¶ added in v0.1.18
* * ExpireCtx * @params ctx context.Context, key string, second time.Duration * @return error *
func GetCtx ¶
* * GetCtx * @params ctx context.Context, key string, def string * @return string, error *
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 Incr ¶ added in v0.1.15
* * Incr * @params key string, expiration time.Duration * @return int64 *
func IncrCtx ¶ added in v0.1.15
* * IncrCtx * @params ctx context.Context, key string, expiration time.Duration * @return int64 *
func IncrDuration ¶ added in v0.1.15
* * Incr * @params key string, expiration time.Duration * @return int64 *
func LPushCtx ¶ added in v0.1.18
* * LPushCtx * @params ctx context.Context, key string, val string * @return error *
func LRange ¶ added in v0.1.18
* * LRange * @params key string, start int64, stop int64 * @return []string, error *
func LRangeCtx ¶ added in v0.1.18
* * LRangeCtx * @params ctx context.Context, key string, start int64, stop int64 * @return []string, error *
func LRemCtx ¶ added in v0.1.18
* * LRemCtx * @params ctx context.Context, key string, val string * @return error *
func LTrim ¶ added in v0.1.18
* * LTrim * @params key string, start int64, stop int64 * @return error *
func LTrimCtx ¶ added in v0.1.18
* * LTrimCtx * @params ctx context.Context, key string, start int64, stop int64 * @return error *
func Set ¶
* * Set * @params key string, val interface{}, expiration time.Duration * @return interface{} *
func SetCtx ¶
* * SetCtx * @params ctx context.Context, key string, val string, expiration time.Duration * @return string *
func SetD ¶
* * SetD * @params key string, val interface{}, expiration int64 * @return interface{} *
func SetDuration ¶
* * SetDuration * @params key string, val interface{}, expMilisecond 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, expiration time.Duration * @return interface{} *
Types ¶
type Conn ¶
func ConnectTo ¶
* * Connect to a host * @param host, password string, db int * @return *Conn, error *