config.go 765 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package main
  2. type GlobalConf struct {
  3. MongoB MgoConf
  4. Log Log
  5. Env EnvConf
  6. ES map[string]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. }
  44. type EmailConf struct {
  45. Api string
  46. To string
  47. }