config.go 707 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package main
  2. type GlobalConf struct {
  3. MongoB MgoConf
  4. Cron CronConf
  5. MongoP 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. Delete int
  24. Columns []string
  25. HotNum int
  26. HotDay int
  27. }
  28. type EsConf struct {
  29. URL string
  30. Username string
  31. Password string
  32. Index string
  33. }
  34. type Log struct {
  35. LogPath string
  36. MaxSize int
  37. Compress bool
  38. MaxAge int
  39. MaxBackups int
  40. LogLevel string
  41. Format string
  42. }
  43. type EmailConf struct {
  44. Api string
  45. To string
  46. }