redis

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisNil = redis.Nil

RedisNil is redis nil

Functions

func AnyDo added in v0.1.3

func AnyDo(name string, expiration time.Duration) int

AnyDo

func DayDo added in v0.1.3

func DayDo(name string) int

DayDo 每天可执行次数

func DecrBy added in v0.1.3

func DecrBy(key string, value int64) (int64, error)

DecrBy

func Del added in v0.1.3

func Del(keys ...string) *redis.IntCmd

Del

func Expire added in v0.1.3

func Expire(key string, expiration time.Duration) *redis.BoolCmd

Expire

func Get added in v0.1.3

func Get(key string) *redis.StringCmd

Get

func GetCacheKey added in v0.1.3

func GetCacheKey(key string) string

GetCacheKey is get cache key

func GetPrefix added in v0.1.3

func GetPrefix() string

GetPrefix is get prefix

func GetRedis

func GetRedis() *redis.Ring

创建一个 redis 连接

func Has added in v0.1.3

func Has(key string) bool

Has

func HourDo added in v0.1.3

func HourDo(name string) int

HourDo 每小时可执行次数

func IncrBy added in v0.1.3

func IncrBy(key string, value int64) (int64, error)

IncrBy

func IncrByFloat added in v0.1.3

func IncrByFloat(key string, value float64) (float64, error)

IncrByFloat

func JsonGet added in v0.1.3

func JsonGet(key string, paths ...string) *redis.JSONCmd

JsonSet

func JsonSet added in v0.1.3

func JsonSet(key string, value interface{}, expiration time.Duration) *redis.StatusCmd

JsonSet

func MonthDo added in v0.1.3

func MonthDo(name string) int

MonthDo 每月可执行次数

func Prefix added in v0.1.3

func Prefix(key string)

Prefix is set prefix

func Set added in v0.1.3

func Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd

Set

func TTL added in v0.1.3

func TTL(key string) *redis.DurationCmd

TTL

Types

This section is empty.

Jump to

Keyboard shortcuts

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