mysql_cli

package
v0.0.0-...-6562851 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GormDB *gorm.DB
)

Functions

func Init

func Init(cfg *Cfg, runMode string)

Types

type Cfg

type Cfg struct {
	*LogCfg
	*ConnCfg
}

type ConnCfg

type ConnCfg struct {
	Host         string `json:"host"`
	Port         string `json:"port"`
	DBName       string `json:"db_name"`
	UserName     string `json:"user_name"`
	Password     string `json:"password"`
	MaxLifeTime  int    `json:"max_life_time"`
	MaxIdleTime  int    `json:"max_idle_time"`
	MaxIdleConns int    `json:"max_idle_conns"`
	MaxOpenConns int    `json:"max_open_conns"`
}

type LogCfg

type LogCfg struct {
	MaxAge     int    `json:"max_age"`
	Maxsize    int    `json:"max_size"`
	LogPath    string `json:"log_path"`
	Compress   bool   `json:"compress"`
	MaxBackups int    `json:"max_backups"`
}

Jump to

Keyboard shortcuts

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