redis

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	Config *RedisConfig

	Context context.Context
	// contains filtered or unexported fields
}

func NewRedisClient

func NewRedisClient(config *RedisConfig) *RedisClient

func (*RedisClient) Get

func (rc *RedisClient) Get(key string) (string, error)

func (*RedisClient) GetClient

func (rc *RedisClient) GetClient() *redis.Client

func (*RedisClient) Set

func (rc *RedisClient) Set(key string, value string, expiration time.Duration) error

type RedisConfig

type RedisConfig struct {
	Addr     string `json:"addr"`
	Password string `json:"password"`
	DB       int    `json:"db"`
	Md5Key   bool   `json:"md5key" binding:"-"`
}

Jump to

Keyboard shortcuts

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