config.go 665 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. }
  25. type EsConf struct {
  26. URL string
  27. Username string
  28. Password string
  29. Index string
  30. }
  31. type Log struct {
  32. LogPath string
  33. MaxSize int
  34. Compress bool
  35. MaxAge int
  36. MaxBackups int
  37. LogLevel string
  38. Format string
  39. }
  40. type EmailConf struct {
  41. Api string
  42. To string
  43. }