mysql

package
v0.0.0-...-ea14be2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Provide(func(cfg *conf.Config, logger *log.Logger) *DataBase {
	db = &DataBase{
		Master: getConnect(
			cfg.MySQLConf.Driver,
			cfg.MySQLConf.MasterDsn,
			logger,
		),
		Slave: getConnect(
			cfg.MySQLConf.Driver,
			cfg.MySQLConf.SlaveDsn,
			logger,
		),
	}
	return db
})

Functions

This section is empty.

Types

type DataBase

type DataBase struct {
	Master *gorm.DB
	Slave  *gorm.DB
}

type GormLogger

type GormLogger struct {
	// contains filtered or unexported fields
}

func (*GormLogger) Print

func (gl *GormLogger) Print(v ...interface{})

Jump to

Keyboard shortcuts

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