config.go 679 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. }
  17. // CronConf 定时任务
  18. type CronConf struct {
  19. Spec string
  20. Start int
  21. End int
  22. Delete int
  23. Columns []string
  24. HotNum int
  25. }
  26. type EsConf struct {
  27. URL string
  28. Username string
  29. Password string
  30. Index string
  31. }
  32. type Log struct {
  33. LogPath string
  34. MaxSize int
  35. Compress bool
  36. MaxAge int
  37. MaxBackups int
  38. LogLevel string
  39. Format string
  40. }
  41. type EmailConf struct {
  42. Api string
  43. To string
  44. }