config.go 723 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. Spec2 string
  22. Start int
  23. End int
  24. Delete int
  25. Columns []string
  26. HotNum int
  27. HotDay int
  28. }
  29. type EsConf struct {
  30. URL string
  31. Username string
  32. Password string
  33. Index string
  34. }
  35. type Log struct {
  36. LogPath string
  37. MaxSize int
  38. Compress bool
  39. MaxAge int
  40. MaxBackups int
  41. LogLevel string
  42. Format string
  43. }
  44. type EmailConf struct {
  45. Api string
  46. To string
  47. }