智莺生活mysql模型库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 6 месеци
123456789101112131415161718
  1. package md
  2. type Config struct {
  3. DB DBCfg `yaml:"db"`
  4. }
  5. // 数据库配置结构体
  6. type DBCfg struct {
  7. Host string `yaml:"host"` //ip及端口
  8. Name string `yaml:"name"` //库名
  9. User string `yaml:"user"` //用户
  10. Psw string `yaml:"psw"` //密码
  11. ShowLog bool `yaml:"show_log"` //是否显示SQL语句
  12. MaxLifetime int `yaml:"max_lifetime"`
  13. MaxOpenConns int `yaml:"max_open_conns"`
  14. MaxIdleConns int `yaml:"max_idle_conns"`
  15. Path string `yaml:"path"` //日志文件存放路径
  16. }