gdb

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRedisPool = "default" // 默认链接池
)

Functions

func GetDb

func GetDb(pools ...string) *gorm.DB

func Init

func Init()

func InitMysql

func InitMysql()

func InitRedis

func InitRedis()

Types

type RedisCli

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

func GetRedis

func GetRedis(pools ...string) *RedisCli

func (*RedisCli) Del

func (r *RedisCli) Del(key string) (bool, error)

func (*RedisCli) Exists

func (r *RedisCli) Exists(key string) (bool, error)

func (*RedisCli) Get

func (r *RedisCli) Get(key string) (interface{}, error)

func (*RedisCli) GetKeyWithPrefix

func (r *RedisCli) GetKeyWithPrefix(key string) string

func (*RedisCli) GetString

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

func (*RedisCli) Lock

func (r *RedisCli) Lock(key string, ttl int) bool

func (*RedisCli) Set

func (r *RedisCli) Set(key string, value interface{}, timeout ...uint64) error

func (*RedisCli) UnLock

func (r *RedisCli) UnLock(key string)

Jump to

Keyboard shortcuts

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