gredis

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisConn *redis.Pool

Functions

func Delete

func Delete(key string) (bool, error)

删除数据 key 键 [字符串类型]

func Exists

func Exists(key string) bool

是否存在 key 键 [字符串类型]

func Get

func Get(key string) ([]byte, error)

获取数据 key 键 [字符串类型]

func LikeDeletes

func LikeDeletes(key string) error

删除数据 key 键 [字符串类型]

func Set

func Set(key string, data interface{}, time int) error

存储值 key 键 [字符串类型] data 值 [数据不需要处理,方面里面会自动json化] time 时间 [秒 如果为 -1 则永久存储]

func SetDefault

func SetDefault(key string, data interface{}) error

存储值,默认 7200 秒 key 键 [字符串类型] data 值 [数据不需要处理,方面里面会自动json化]

func SetToBytes added in v0.0.6

func SetToBytes(key string, data interface{}, time int) error

存储值 存储二进制 key 键 [字符串类型] data 值 [数据不需要处理,方面里面会自动序列化] time 时间 [秒]

func Setup added in v0.0.5

func Setup(maxIdle, maxActive int, idleTimeout time.Duration, host, password 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