redis

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedisClient added in v1.3.1

func GetRedisClient(db int) *redis.Client

Types

type DbOptions added in v1.3.1

type DbOptions struct {
	Db int
}

type RedisDB

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

func New

func New(options ...DbOptions) (*RedisDB, error)

func (*RedisDB) Delete

func (r *RedisDB) Delete(key string) error

func (*RedisDB) Get

func (r *RedisDB) Get(key string) ([]byte, error)

func (*RedisDB) GetListWithPrefix

func (r *RedisDB) GetListWithPrefix(id string, skPrefix string, limit int64) ([]string, error)

func (*RedisDB) GetString

func (r *RedisDB) GetString(key string) (string, error)

func (*RedisDB) Set

func (r *RedisDB) Set(key string, value any, expiration time.Duration) error

func (*RedisDB) SetWithSortKey

func (r *RedisDB) SetWithSortKey(pk string, sk string, value any, expiration time.Duration) error

Jump to

Keyboard shortcuts

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