gorm.go 431 B

1234567891011121314151617181920
  1. package config
  2. const (
  3. TypeSqlite = "sqlite"
  4. TypeMysql = "mysql"
  5. )
  6. type Gorm struct {
  7. Type string `mapstructure:"type"`
  8. MaxIdleConns int `mapstructure:"max-idle-conns"`
  9. MaxOpenConns int `mapstructure:"max-open-conns"`
  10. }
  11. type Mysql struct {
  12. Addr string `mapstructure:"addr"`
  13. Username string `mapstructure:"username"`
  14. Password string `mapstructure:"password"`
  15. Dbname string `mapstructure:"dbname"`
  16. }