mysql

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caller

func Caller(name string) *gorm.DB

func Provider added in v0.2.10

func Provider(cfg CallerCfg) (resp *gorm.DB, err error)

func Register

func Register() common.Caller

Types

type CallerCfg

type CallerCfg struct {
	Debug bool

	Network      string
	Dialect      string
	Addr         string
	Username     string
	Password     string
	Db           string
	Charset      string
	ParseTime    string
	Loc          string
	Timeout      common.Duration
	ReadTimeout  common.Duration
	WriteTimeout common.Duration

	Level           string
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime common.Duration
}

type Cfg

type Cfg struct {
	Muses struct {
		Mysql map[string]CallerCfg `toml:"mysql"`
	} `toml:"muses"`
}

Jump to

Keyboard shortcuts

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