redis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireLock

func AcquireLock(key string, value interface{}, expiration time.Duration) (bool, error)

func BGSave

func BGSave() error

func Delete

func Delete(key string) error

func ExtendLock

func ExtendLock(key string, expiration time.Duration) error

func Get

func Get(key string) (string, error)

func GetRedis

func GetRedis() *redis.Client

func HGet

func HGet(key, field string) (string, error)

func HGetAll

func HGetAll(key string) (map[string]string, error)

func HSet

func HSet(key string, field string, value interface{}) error

func HSetMap

func HSetMap(key string, fields map[string]interface{}) error

func IsAlive

func IsAlive() bool

func LPush

func LPush(key string, values ...interface{}) error

func LRange

func LRange(key string, start, stop int64) ([]string, error)

func MGet

func MGet(keys ...string) ([]string, error)

func MSet

func MSet(pairs map[string]interface{}) error

func Pipeline

func Pipeline(f func(pipe redis.Pipeliner)) error

func PipelineSet

func PipelineSet(keyValues map[string]interface{}, expiration time.Duration) error

func PublishMessage

func PublishMessage(channel, message string) error

func RPop

func RPop(key string) (string, error)

func ReleaseLock

func ReleaseLock(key string) error

func SAdd

func SAdd(key string, members ...interface{}) error

func SMembers

func SMembers(key string) ([]string, error)

func SRem

func SRem(key string, members ...interface{}) error

func Save

func Save() error

func ScanKeys

func ScanKeys(pattern string, count int64) ([]string, error)

func Set

func Set(key string, value interface{}, expiration time.Duration) error

func Setup

func Setup() error

func SubscribeToChannel

func SubscribeToChannel(channel string, handler func(message string)) error

Types

type Database

type Database struct {
	*gorm.DB
}

Jump to

Keyboard shortcuts

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