redis

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRedis

func InitRedis(addr string) (redis.Conn, error)

func RedisDelV

func RedisDelV(Redis redis.Conn, key string) bool

RedisDelV 删除value

func RedisFlush

func RedisFlush(Redis redis.Conn) bool

RedisFlush 清除缓存

func RedisGetV

func RedisGetV(Redis redis.Conn, key string) (string, error)

RedisGetV 获取value

func RedisGetVBytes

func RedisGetVBytes(Redis redis.Conn, key string) ([]byte, error)

RedisGetV 获取value

func RedisIsExist

func RedisIsExist(Redis redis.Conn, key string) bool

RedisIsExist 判断是否存在

func RedisListGetWithRange

func RedisListGetWithRange(Redis redis.Conn, key, range1, range2 string) (interface{}, bool)

RedisListGetWithRange 从列表里获取指定范围的数据

func RedisListPush

func RedisListPush(Redis redis.Conn, key string, value interface{}) bool

RedisListPush 往列表里插入数据

func RedisSetKeyTime

func RedisSetKeyTime(Redis redis.Conn, key, seconds string) bool

RedisSetKeyTime 设置过期时间

func RedisSetV

func RedisSetV(Redis redis.Conn, key string, value interface{}) bool

RedisSetV 设置value

func RedisSetVNX

func RedisSetVNX(Redis redis.Conn, key string, value interface{}) bool

RedisSetVNX 如果不存在则设置value

func RedisSetVWithTime

func RedisSetVWithTime(Redis redis.Conn, key string, value interface{}, seconds string) bool

RedisSetVWithTime 设置value和过期时间

func RedisSetVWithTimeNX

func RedisSetVWithTimeNX(Redis redis.Conn, key string, value interface{}, seconds string) bool

RedisSetVWithTimeNX 如果不存在则设置value和过期时间

Types

This section is empty.

Jump to

Keyboard shortcuts

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