mysql

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBMaxOpenConn = 10
	DBMaxIdleConn = 5
	DBMaxLifeTime = time.Second * 30
)

Variables

This section is empty.

Functions

func CloseConn

func CloseConn()

func Connect

func Connect() (*gorm.DB, *gorm.DB, error)

Types

type Config

type Config struct {
	MySQLHostRW string `env:"MYSQL_HOST_RW,required=true"`
	MySQLHostRO string `env:"MYSQL_HOST_RO,required=true"`
	MySQLUser   string `env:"MYSQL_USER,required=true"`
	MySQLPass   string `env:"MYSQL_PASS,required=true"`
	MySQLDBName string `env:"MYSQL_DB_NAME,required=true"`
}

func NewConfig

func NewConfig() (*Config, error)

Jump to

Keyboard shortcuts

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