config.go 620 B

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