config.go 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package main
  2. type GlobalConf struct {
  3. Mongoqy MgoConf
  4. Cron CronConf
  5. Mongop MgoConf
  6. Mysql MysqlConf
  7. Log Log
  8. Mongospider MgoConf
  9. Email EmailConf
  10. Clickhouse CkConf
  11. }
  12. type MgoConf struct {
  13. Host string
  14. DB string
  15. Coll string // 查询表
  16. Username string
  17. Password string
  18. Size int
  19. Direct bool
  20. List string
  21. Detail string
  22. }
  23. // CronConf 定时任务
  24. type CronConf struct {
  25. Spec string
  26. Url string
  27. Start int
  28. End int
  29. Delete int
  30. }
  31. type CkConf struct {
  32. Host string
  33. Username string
  34. Password string
  35. DB string
  36. }
  37. type MysqlConf struct {
  38. Address string
  39. Dbname string
  40. Username string
  41. Password string
  42. Prefix string //数据表前缀
  43. Table string
  44. Stime string
  45. Etime string
  46. Test bool
  47. }
  48. type Log struct {
  49. LogPath string
  50. MaxSize int
  51. Compress bool
  52. MaxAge int
  53. MaxBackups int
  54. LogLevel string
  55. Format string
  56. }
  57. type EmailConf struct {
  58. Api string
  59. To string
  60. }