Documentation
¶
Index ¶
- Constants
- func AllCache(search string, page, rows int) (et.List, error)
- func Close()
- func CollectionDelete(name, key string) error
- func CollectionFind(name, key string) (string, error)
- func CollectionGet(name string) (map[string]string, error)
- func CollectionPut(name, key, val string) error
- func CollectionSet(name string, val map[string]string) error
- 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, expiration 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 HDeleteCtx(ctx context.Context, key, atr string) error
- func HGetCtx(ctx context.Context, key string) (map[string]string, error)
- func HSetCtx(ctx context.Context, key string, val map[string]string) error
- func HealthCheck() bool
- func HttpAll(w http.ResponseWriter, r *http.Request)
- func HttpDelete(w http.ResponseWriter, r *http.Request)
- func HttpGet(w http.ResponseWriter, r *http.Request)
- 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 ObjetAll(name string) ([]et.Json, error)
- func ObjetDelete(name, key string) error
- func ObjetGet(name, key string) (et.Json, error)
- func ObjetSet(name string, key string, obj et.Json) 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 CollectionDelete ¶ added in v1.0.11
* * CollectionDelete * @params name string, key string * @return error *
func CollectionFind ¶ added in v1.0.11
* * CollectionFind * @params name string, key string * @return string, error *
func CollectionGet ¶ added in v1.0.11
* * CollectionGet * @params name string * @return map[string]string, error *
func CollectionPut ¶ added in v1.0.11
* * CollectionPut * @params name string, key string, val string * @return error *
func CollectionSet ¶ added in v1.0.11
* * ColectionSet * @params key string, val map[string]string * @return error *
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, expiration 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 HttpAll ¶ added in v1.0.11
func HttpAll(w http.ResponseWriter, r *http.Request)
* * HttpAll * @params w http.ResponseWriter, r *http.Request *
func HttpDelete ¶ added in v1.0.11
func HttpDelete(w http.ResponseWriter, r *http.Request)
* * HttpDelete * @params w http.ResponseWriter, r *http.Request *
func HttpGet ¶ added in v1.0.11
func HttpGet(w http.ResponseWriter, r *http.Request)
* * HttpGet * @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 ObjetDelete ¶ added in v1.0.11
* * ObjetDelete * @params name string, key string * @return error *
func ObjetGet ¶ added in v1.0.11
* * ObjetGet * @params name string, key string, v any * @return error *
func ObjetSet ¶ added in v1.0.11
* * ObjetSet * @params name string, key string, val []byte * @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 *