db

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SetDbEngineOnce sync.Once

Functions

func GetDbEngineIns

func GetDbEngineIns() *xorm.Engine

func SetDbEngine

func SetDbEngine()

Types

type Conf

type Conf struct {
	DriverName      string
	ConnMaxLifetime int64
	Prefix          string
	Conn
}
var ConfIns *Conf

func (*Conf) InitDbConf added in v1.0.5

func (d *Conf) InitDbConf()

type Conn

type Conn interface {
	GetDataSourceName() string
}

type MysqlConf

type MysqlConf struct {
	Host     string
	Username string
	Password string
	Database string
}

*

  • mysql

func (MysqlConf) GetDataSourceName

func (c MysqlConf) GetDataSourceName() (dataSourceName string)

Jump to

Keyboard shortcuts

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