redis

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Setex(key, value string, seconds int) error
	Get(key string) (string, error)
	SetnxEx(key, value string, seconds int) (bool, error)
	Hset(key, field, value string) error
	Set(key, value string) error
	Hdel(key string, fields ...string) (bool, error)
}

type Redis

type Redis struct {
	RedisConf redis.RedisConf
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis(conf redis.RedisConf) (*Redis, error)

func (*Redis) Get

func (l *Redis) Get(key string) (string, error)

func (*Redis) Hdel

func (l *Redis) Hdel(key string, fields ...string) (bool, error)

func (*Redis) Hset

func (l *Redis) Hset(key, field, value string) error

func (*Redis) Set

func (l *Redis) Set(key, value string) error

func (*Redis) Setex

func (l *Redis) Setex(key, value string, seconds int) error

func (*Redis) SetnxEx

func (l *Redis) SetnxEx(key, value string, seconds int) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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