Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
func HealthCheck() error
func InitByCfgs ¶
func InitByCfgs(cfgs map[string]DatabaseConfig)
func InitByFile ¶
func InitByFile(fileName string)
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct { Driver string `json:"dbdriver"` Protocol string `json:"protocol"` Address string `json:"address"` Username string `json:"username"` Password string `json:"password"` Database string `json:"database"` Charset string `json:"charset"` MaxIdle int `json:"maxIdle"` MaxConn int `json:"maxConn"` CheckSec int `json:"checkSec"` CurCheckTime int64 }
func (DatabaseConfig) GenDsn ¶
func (this DatabaseConfig) GenDsn() string
Click to show internal directories.
Click to hide internal directories.