mysql

package
v0.0.0-...-2c5f5e2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefConn = "default"
)

Functions

func GetDbByName

func GetDbByName(name string) (*gorm.DB, error)

func GetDefaultDb

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

func InitDb

func InitDb(name string, conf *Config) error

Types

type Config

type Config struct {
	DbUrl           string
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifetime int
	LogMode         bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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