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.

60 lines
1.6 KiB

  1. package config
  2. type Server struct {
  3. Mysql `mapstructure:"mysql"`
  4. Qiniu `mapstructure:"qiniu"`
  5. Casbin `mapstructure:"casbin"`
  6. Redis `mapstructure:"redis"`
  7. System `mapstructure:"system"`
  8. JWT `mapstructure:"jwt"`
  9. Captcha `mapstructure:"captcha"`
  10. Log `mapstructure:"log"`
  11. }
  12. type System struct {
  13. UseMultipoint bool `mapstructure:"use-multipoint"`
  14. Env string `mapstructure:"env"`
  15. Addr int `mapstructure:"addr"`
  16. }
  17. type JWT struct {
  18. SigningKey string `mapstructure:"signing-key"`
  19. }
  20. type Casbin struct {
  21. ModelPath string `mapstructure:"model-path"`
  22. }
  23. type Mysql struct {
  24. Username string `mapstructure:"username"`
  25. Password string `mapstructure:"password"`
  26. Path string `mapstructure:"path"`
  27. Dbname string `mapstructure:"db-name"`
  28. Config string `mapstructure:"config"`
  29. MaxIdleConns int `mapstructure:"max-idle-conns"`
  30. MaxOpenConns int `mapstructure:"max-open-conns"`
  31. LogMode bool `mapstructure:"log-mode"`
  32. }
  33. type Redis struct {
  34. Addr string `mapstructure:"addr"`
  35. Password string `mapstructure:"password"`
  36. DB int `mapstructure:"db"`
  37. }
  38. type Qiniu struct {
  39. AccessKey string `mapstructure:"access-key"`
  40. SecretKey string `mapstructure:"secret-key"`
  41. }
  42. type Captcha struct {
  43. KeyLong int `mapstructure:"key-long"`
  44. ImgWidth int `mapstructure:"img-width"`
  45. ImgHeight int `mapstructure:"img-height"`
  46. }
  47. type Log struct {
  48. Prefix string `mapstructure:"prefix"`
  49. LogFile bool `mapstructure:"log-file"`
  50. Stdout string `mapstructure:"stdout"`
  51. File string `mapstructure:"file"`
  52. }