config.go 807 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package main
  2. type GlobalConf struct {
  3. MongoB MgoConf
  4. Log Log
  5. Env EnvConf
  6. ES EsConf
  7. Email EmailConf
  8. }
  9. type EnvConf struct {
  10. FileStart string
  11. NomalStart string
  12. NextAddr string
  13. NextPort string
  14. LocalPort string
  15. Spec string
  16. SwitchSpec string
  17. Alias string
  18. SpecType string
  19. Send bool
  20. }
  21. type MgoConf struct {
  22. Host string
  23. DB string
  24. Coll string // 查询表
  25. Username string
  26. Password string
  27. Size int
  28. Direct bool
  29. }
  30. type Log struct {
  31. LogPath string
  32. MaxSize int
  33. Compress bool
  34. MaxAge int
  35. MaxBackups int
  36. LogLevel string
  37. Format string
  38. }
  39. type EsConf struct {
  40. URL string
  41. Username string
  42. Password string
  43. URL2 string
  44. Username2 string
  45. Password2 string
  46. }
  47. type EmailConf struct {
  48. Api string
  49. To string
  50. }