db

package
v0.0.0-...-6819526 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(conf Config) logger.Interface

func NewDB

func NewDB(dialector gorm.Dialector, conf Config) (*gorm.DB, error)

Types

type Config

type Config struct {
	Source        string `mapstructure:"source"` // root:root@tcp(127.0.0.1:3306)/test
	DryRun        bool   `mapstructure:"dryRun"`
	SlowThreshold int    `mapstructure:"slowThreshold"`
	MaxLifeTime   int    `mapstructure:"maxLifeTime"`
	MaxOpenConn   int    `mapstructure:"maxOpenConn"`
	MaxIdleConn   int    `mapstructure:"maxIdleConn" `
}

Jump to

Keyboard shortcuts

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