cache

package
v1.0.82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const IsNil = redis.Nil

Variables

This section is empty.

Functions

func AllCache

func AllCache(search string, page, rows int) (et.List, error)

* * AllCache * @params device string * @params key string * @params val string * @return error *

func Close

func Close()

func Count

func Count(key string, expiration time.Duration) int64

* * Count * @params key string * @params expiration time.Duration * @return int64 *

func Delete

func Delete(key string) (int64, error)

* * Delete * @params key string * @return int64, error *

func DeleteCtx

func DeleteCtx(ctx context.Context, key string) (int64, error)

* * DeleteCtx * @params ctx context.Context * @params key string * @return int64, error *

func DeleteVerify

func DeleteVerify(device string, key string) (int64, error)

* * DeleteVerify * @params device string * @params key string * @return int64, error *

func Empty

func Empty() error

* * Empty * @return error *

func Get

func Get(key, def string) (string, error)

* * Get * @params key string * @params def string * @return string, error *

func GetCtx

func GetCtx(ctx context.Context, key, def string) (string, error)

* * GetCtx * @params ctx context.Context * @params key string * @params def string * @return string, error *

func GetItem

func GetItem(key string) (et.Item, error)

* * GetItem * @params key string * @return Item, error *

func GetItems

func GetItems(key string) (et.Items, error)

* * GetItems * @params key string * @return Items, error *

func GetJson

func GetJson(key string) (et.Json, error)

* * GetJson * @params key string * @return Json, error *

func GetVerify

func GetVerify(device string, key string) (string, error)

* * GetVerify * @params device string * @params key string * @return string, error *

func HDelete

func HDelete(key, atr string) error

* * HDelete * @params key string * @params atr string * @return error *

func HDeleteCtx

func HDeleteCtx(ctx context.Context, key, atr string) error

* * HDeleteCtx * @params ctx context.Context * @params key string * @params atr string * @return error *

func HGet

func HGet(key string) (map[string]string, error)

* * HGet * @params key string * @return map[string]string, error *

func HGetAtrib

func HGetAtrib(key, atr string) (string, error)

* * HGetAtrib * @params key string * @params atr string * @return string, error *

func HGetCtx

func HGetCtx(ctx context.Context, key string) (map[string]string, error)

* * HGetCtx * @params ctx context.Context * @params key string * @return map[string]string, error *

func HSet

func HSet(key string, val map[string]string) error

* * HSet * @params key string * @params val map[string]string * @return error *

func HSetAtrib

func HSetAtrib(key, atr, val string) error

* * HSetAtrib * @params key string * @params atr string * @params val string * @return error *

func HSetCtx

func HSetCtx(ctx context.Context, key string, val map[string]string) error

* * 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 More

func More(key string, second time.Duration) int

* * More * @params key string * @params second time.Duration * @return int *

func Pub

func Pub(channel string, message interface{}) error

func Set

func Set(key string, val interface{}, second time.Duration) error

* * Set * @params key string * @params val interface{} * @params second time.Duration * @return error *

func SetCtx

func SetCtx(ctx context.Context, key, val string, second time.Duration) error

* * SetCtx * @params ctx context.Context * @params key string * @params val string * @params second time.Duration * @return error *

func SetD

func SetD(key string, val interface{}) error

* * SetD * @params key string * @params val interface{} * @return error *

func SetH

func SetH(key string, val interface{}) error

* * SetH * @params key string * @params val interface{} * @return error *

func SetM

func SetM(key string, val interface{}) error

* * SetM * @params key string * @params val interface{} * @return error *

func SetVerify

func SetVerify(device, key, val string, duration time.Duration) error

* * SetVerify * @params device string * @params key string * @params val string * @params duration time.Duration * @return error *

func SetW

func SetW(key string, val interface{}) error

* * SetW * @params key string * @params val interface{} * @return error *

func SetY

func SetY(key string, val interface{}) error

* * SetY * @params key string * @params val interface{} * @return error *

func Sub

func Sub(channel string, f func(interface{}))

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Load

func Load() (*Conn, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL