redis

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(addr, passwd string, db int) (*redis.Client, error)

Connect connects redis database

Types

type Redis added in v0.0.5

type Redis struct {
	Client *redis.Client
}

func GetRedis added in v0.0.5

func GetRedis(addr, passwd string, db int) (*Redis, error)

GetRedis build redis object

func (*Redis) Get added in v0.0.5

func (r *Redis) Get(key string, destType interface{}) error

Get gets value from redis database

func (*Redis) GetStr added in v0.1.0

func (r *Redis) GetStr(key string) (*string, error)

GetStr gets value (as a string) from redis database

func (*Redis) Set added in v0.0.5

func (r *Redis) Set(key string, value interface{}, exp time.Duration) error

Set sets value to redis database

Jump to

Keyboard shortcuts

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