dirver

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DebugMode indicates gin mode is debug.
	DebugMode = "debug"
	DbType    = "mysql"
)

Variables

View Source
var DB *gorm.DB

Functions

func InitializeDB

func InitializeDB(params LinkParams) (*gorm.DB, error)

InitializeDB 初始化管理后台数据库

func InitializeRedis

func InitializeRedis(host string, port int, password string, db int) (*redis.Client, error)

Types

type LinkParams

type LinkParams struct {
	Host        string
	Port        int
	UserName    string
	DbName      string
	Password    string
	MaxOpenConn int
	MaxIdleConn int
	Mode        string
}

Jump to

Keyboard shortcuts

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