Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ElementKey = micro.ElementKey("MysqlComponent")
ElementKey is ElementKey for mysql
Functions ¶
func SetDefaultMysqlConfig ¶
func SetDefaultMysqlConfig()
SetDefaultMysqlConfig set default mysql configuration
Types ¶
type Component ¶
type Component struct {
micro.EmptyComponent
// contains filtered or unexported fields
}
Component is Component for mysql
type Config ¶
type Config struct {
Host string `toml:"host"`
Port int `toml:"port"`
DB string `toml:"db"`
User string `toml:"user"`
Password string `toml:"password"`
TimeZone string `toml:"timeZone"`
LogMode bool `toml:"logmode"`
MaxOpenConns int `toml:"maxOpenConns"`
MaxIdleConns int `toml:"maxIdleConns"`
}
Config mysql configuration
Click to show internal directories.
Click to hide internal directories.