redis

package
v0.0.0-...-7538a8c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collections

type Collections interface {
	Set(key string, value interface{}, expired time.Duration) error
	Get(key string, value interface{}) error
	Del(key string)
	Scan(prefix string) ([]string, error)
}

Collections is redis's collection of function

func GetClient

func GetClient() Collections

type Redis

type Redis struct {
	// contains filtered or unexported fields
}

func InitConnection

func InitConnection(redisDB, redisHost, redisPort, redisPassword string, logger logger.Logger) Redis

func (Redis) Del

func (r Redis) Del(key string)

func (Redis) Get

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

func (Redis) GetRedisClient

func (r Redis) GetRedisClient() *redis.Client

func (Redis) GetRedisLogger

func (r Redis) GetRedisLogger() logger.Logger

func (Redis) Scan

func (r Redis) Scan(prefix string) ([]string, error)

func (Redis) Set

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

Jump to

Keyboard shortcuts

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