cache

package
v1.0.50 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 14 Imported by: 0

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 added in v0.0.172

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

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

func Delete added in v1.0.11

func Delete(key string) (int64, error)

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

func DeleteCtx added in v1.0.11

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

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

func DeleteVerify added in v1.0.11

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 added in v0.0.95

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

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

func GetItems added in v0.0.95

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

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

func GetJson added in v0.0.118

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 added in v1.0.11

func HDelete(key, atr string) error

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

func HDeleteCtx added in v1.0.11

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 added in v0.0.77

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 added in v0.0.77

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 added in v0.0.172

func HandlerAll(w http.ResponseWriter, r *http.Request)

* * HandlerAll * @params w http.ResponseWriter * @params r *http.Request *

func HandlerDelete added in v1.0.11

func HandlerDelete(w http.ResponseWriter, r *http.Request)

* * HandlerDelete * @params w http.ResponseWriter * @params r *http.Request *

func HandlerGet added in v0.0.172

func HandlerGet(w http.ResponseWriter, r *http.Request)

* * HandlerGet * @params w http.ResponseWriter * @params r *http.Request *

func More added in v0.0.44

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 added in v0.0.120

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

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

func SetH added in v0.0.169

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

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

func SetM added in v0.0.120

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 added in v0.0.120

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

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

func SetY added in v0.0.120

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