config.go 643 B

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