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.

43 lines
2.5 KiB

  1. package config
  2. type Mysql struct {
  3. Path string `mapstructure:"path" json:"path" yaml:"path"`
  4. Config string `mapstructure:"config" json:"config" yaml:"config"`
  5. Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
  6. Username string `mapstructure:"username" json:"username" yaml:"username"`
  7. Password string `mapstructure:"password" json:"password" yaml:"password"`
  8. MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
  9. MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
  10. LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
  11. }
  12. type Sqlite struct {
  13. Path string `mapstructure:"path" json:"path" yaml:"path"`
  14. MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
  15. MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
  16. Logger bool `mapstructure:"logger" json:"logger" yaml:"logger"`
  17. }
  18. type Sqlserver struct {
  19. Path string `mapstructure:"path" json:"path" yaml:"path"`
  20. Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
  21. Username string `mapstructure:"username" json:"username" yaml:"username"`
  22. Password string `mapstructure:"password" json:"password" yaml:"password"`
  23. MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
  24. MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
  25. Logger bool `mapstructure:"logger" json:"logger" yaml:"logger"`
  26. }
  27. type Postgresql struct {
  28. Host string `mapstructure:"host" json:"host" yaml:"host"`
  29. Port string `mapstructure:"port" json:"port" yaml:"port"`
  30. Config string `mapstructure:"config" json:"config" yaml:"config"`
  31. Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
  32. Username string `mapstructure:"username" json:"username" yaml:"username"`
  33. Password string `mapstructure:"password" json:"password" yaml:"password"`
  34. MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
  35. MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
  36. PreferSimpleProtocol bool `mapstructure:"prefer-simple-protocol" json:"preferSimpleProtocol" yaml:"prefer-simple-protocol"`
  37. Logger bool `mapstructure:"logger" json:"logger" yaml:"logger"`
  38. }