redisclient

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRedisNotFound = errors.New("redis not found")

Functions

func DelFromRedis added in v1.2.2

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

func GetFromRedis added in v1.2.2

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

func GetIntArrayFromRedis added in v1.2.2

func GetIntArrayFromRedis(ctx context.Context, key string) ([]int64, error)

func GetIntFromRedis added in v1.2.2

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

func GetRedis

func GetRedis() *redis.Client

func GetStringFromRedis added in v1.2.2

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

func HgetIntFromRedis added in v1.2.2

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

func HgetStringFromRedis added in v1.2.2

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

func Init

func Init(addr, password string, db int) (r *redis.Client, err error)

func SetToRedis added in v1.2.2

func SetToRedis(ctx context.Context, key string, object interface{}, expire time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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