dbs

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package dbs 数据库操作类

Index

Constants

This section is empty.

Variables

View Source
var (
	// DBMaps 代表 sqlx 连接的 map
	DBMaps map[string]*sqlx.DB
)
View Source
var RedisDB *redis.Client

RedisDB redis client

Functions

func CheckDBConnExists

func CheckDBConnExists(conn string) bool

CheckDBConnExists 检查连接是否存在

func InitMySQLDB

func InitMySQLDB(c map[string]configs.MySQLDSN)

InitMySQLDB 初始化所有连接

func InitRedisDB

func InitRedisDB(address, password string) error

InitRedisDB 初始化 redis 数据库

func InitRedisDBCluster

func InitRedisDBCluster(address []string, password string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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