Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Username string //账号 root Password string //密码 Host string //host localhost Port string //端口 3306 Charset string //字符编码 utf8mb4 Database string //默认连接数据库 MaxOpenConns int //连接池最多同时打开的连接数 MaxIdleConns int //连接池里最大空闲连接数。必须要比maxOpenConns小 MaxLifetime time.Duration //连接池里面的连接最大存活时长 MaxIdleTime time.Duration //连接池里面的连接最大空闲时长 DriverName string Trace bool }
Config 数据库配置
Click to show internal directories.
Click to hide internal directories.