db

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ctx = context.TODO()
)

Functions

func NewDatabase

func NewDatabase(address string) error

Types

type RedisDatabase

type RedisDatabase struct {
	Client *redis.Client
}
var RedisDb *RedisDatabase

func GetRedisDb

func GetRedisDb() *RedisDatabase

func (RedisDatabase) DelById

func (rdb RedisDatabase) DelById(key string) (int64, error)

func (RedisDatabase) GetByKey

func (rdb RedisDatabase) GetByKey(key string) (string, error)

func (RedisDatabase) SetKey

func (rdb RedisDatabase) SetKey(key string, value string, exp time.Duration) *redis.StatusCmd

Jump to

Keyboard shortcuts

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