redis

package
v0.0.0-...-1f2fd11 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(keys ...string) error

Del deletes keys

func Get

func Get(key string, dest interface{}) error

Get retrieves a string value

func GetClient

func GetClient() *redis.Client

func HGet

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

HGet retrieves a value from a hash field

func HSet

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

HSet sets a hash field to a value

func LPush

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

LPush pushes a value onto the head of a list

func LRange

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

LRange retrieves a range of elements from a list

func NewClient

func NewClient(config *conf.Config) (*redis.Client, error)

func RPush

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

RPush pushes a value onto the tail of a list

func SAdd

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

SAdd adds members to a set

func SMembers

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

SMembers retrieves all members of a set

func Set

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

Set sets a string value with an expiration time

func ZAdd

func ZAdd(key string, members ...redis.Z) error

ZAdd adds a member to a sorted set with a score

func ZRange

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

ZRange retrieves a range of members from a sorted set

Types

This section is empty.

Jump to

Keyboard shortcuts

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