config.go 738 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package main
  2. type GlobalConf struct {
  3. MongoB MgoConf
  4. Cron CronConf
  5. MongoC MgoConf
  6. Log Log
  7. Email EmailConf
  8. }
  9. type MgoConf struct {
  10. Host string
  11. DB string
  12. Coll string // 查询表
  13. Username string
  14. Password string
  15. Size int
  16. Direct bool
  17. }
  18. // CronConf 定时任务
  19. type CronConf struct {
  20. Spec string
  21. Start int
  22. End int
  23. QualityRate string
  24. CollectionRate string
  25. Week bool
  26. }
  27. type EsConf struct {
  28. URL string
  29. Username string
  30. Password string
  31. Index string
  32. }
  33. type Log struct {
  34. LogPath string
  35. MaxSize int
  36. Compress bool
  37. MaxAge int
  38. MaxBackups int
  39. LogLevel string
  40. Format string
  41. }
  42. type EmailConf struct {
  43. Api string
  44. To string
  45. }