config.go 983 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package main
  2. type Conf struct {
  3. Mongo MgoConf `json:"mongo"`
  4. Mongoq MgoConf `json:"mongoq"`
  5. Collection Collection `json:"collection"` //需要导出的所有数据表
  6. Field map[string]FieldM `json:"field"` //需要导出的数据表字段信息
  7. Company string `json:"company"` //企业名称的配置文件
  8. Outdir string `json:"outdir"` //导出数据目录
  9. Readfile ReadConf `json:"readfile"`
  10. Env EnvConf
  11. }
  12. type MgoConf struct {
  13. Host string
  14. Username string
  15. Password string
  16. Coll string
  17. DB string
  18. Size int
  19. }
  20. type ReadConf struct {
  21. Path string
  22. }
  23. //Collection 导出的数据表
  24. type Collection struct {
  25. Out []string `json:"out"`
  26. }
  27. type FieldM struct {
  28. Name string
  29. Fields []string
  30. }
  31. type EnvConf struct {
  32. City int
  33. Proportion float64
  34. Subl int
  35. Invesl int
  36. Psubl int
  37. Pinvesl int
  38. Compare int
  39. Savecoll string
  40. }