Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type MySQL ¶
type MySQL struct { Host string `json:"host" toml:"host" env:"MYSQL_HOST"` Port int `json:"port" toml:"port" env:"MYSQL_PORT"` DB string `json:"database" toml:"database" env:"MYSQL_DB"` Username string `json:"username" toml:"username" env:"MYSQL_USERNAME"` Password string `json:"password" toml:"password" env:"MYSQL_PASSWORD"` // contains filtered or unexported fields }
mysql host="localhost" port=3306 database="demo" username="demo" password="demo"
func (*MySQL) DSN ¶
参考 https://github.com/go-sql-driver/mysql#dsn-data-source-name 获取详情 dsn := "user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local"
Click to show internal directories.
Click to hide internal directories.