redis

package
v0.0.0-...-4699a84 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(app *iris.Application)

Init 初始化redis

func RedisBLPOP

func RedisBLPOP(ctx context.Context, timeout time.Duration, keys ...string) (value []string, err error)

func RedisBatchDel

func RedisBatchDel(ctx context.Context, key ...string) error

func RedisDel

func RedisDel(ctx context.Context, key string) error

func RedisExpire

func RedisExpire(ctx context.Context, key string, expire int) error

func RedisGet

func RedisGet(ctx context.Context, key string) (string, error)

func RedisGetFloat64

func RedisGetFloat64(ctx context.Context, key string) (float64, error)

func RedisGetInt

func RedisGetInt(ctx context.Context, key string) (int, error)

func RedisGetInt64

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

func RedisGetJson

func RedisGetJson(ctx context.Context, key string) ([]byte, error)

func RedisGetResult

func RedisGetResult(ctx context.Context, key string) (interface{}, error)

func RedisGetUint64

func RedisGetUint64(ctx context.Context, key string) (uint64, error)

func RedisHDel

func RedisHDel(ctx context.Context, key, field string) error

func RedisHGet

func RedisHGet(ctx context.Context, key, field string) (string, error)

func RedisHSet

func RedisHSet(ctx context.Context, key, field, value string) error

func RedisInit

func RedisInit(addrs []string, ctx context.Context)

func RedisKeyExists

func RedisKeyExists(ctx context.Context, key string) (bool, error)

func RedisKeys

func RedisKeys(ctx context.Context, pattern string) (keys []string, err error)

func RedisLLEN

func RedisLLEN(ctx context.Context, key string) (value int64, err error)

func RedisLRange

func RedisLRange(ctx context.Context, key string, start, stop int) (values []string, err error)

func RedisListAllValuesWithPrefix

func RedisListAllValuesWithPrefix(ctx context.Context, prefix string) (map[string]string, error)

RedisListAllValuesWithPrefix will take in a key prefix and return the value of all the keys that contain that prefix

func RedisMset

func RedisMset(ctx context.Context, pairs ...interface{}) error

func RedisPSubscribe

func RedisPSubscribe(ctx context.Context, channelName string) *redis.PubSub

RedisPSubscribe 匹配获取指定通道中的订阅消息

func RedisPTTL

func RedisPTTL(ctx context.Context, key string) (int, error)

func RedisPublish

func RedisPublish(ctx context.Context, channelName string, message interface{}) int64

RedisPublish 消息发布

func RedisRPUSH

func RedisRPUSH(ctx context.Context, key string, member string) (err error)

func RedisSet

func RedisSet(ctx context.Context, key string, value interface{}, expire int) error

func RedisSetJson

func RedisSetJson(ctx context.Context, key string, value interface{}, expire int) error

func RedisTTL

func RedisTTL(ctx context.Context, key string) (int, error)

func RedisZAdd

func RedisZAdd(ctx context.Context, key, member, score string) error

func RedisZRange

func RedisZRange(ctx context.Context, key string, start, stop int) (values []string, err error)

func RedisZRangeWithScores

func RedisZRangeWithScores(ctx context.Context, key string, start, stop int) (values []redis.Z, err error)

func RedisZRank

func RedisZRank(ctx context.Context, key, member string) (int, error)

func RedisZRem

func RedisZRem(ctx context.Context, key, member string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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