db.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package entity
  2. type MongoDB struct {
  3. Main *MainMongoDBStruct
  4. Log *LogMongoDBStruct
  5. Bidding *BiddingMongoDBStruct
  6. }
  7. //
  8. type MainMongoDBStruct struct {
  9. Address string `json:"address"`
  10. Size int `json:"size"`
  11. DbName string `json:"dbName"`
  12. }
  13. //
  14. type LogMongoDBStruct struct {
  15. Address string `json:"address"`
  16. Size int `json:"size"`
  17. DbName string `json:"dbName"`
  18. UserName string `json:"userName"`
  19. PassWord int64 `json:"passWord"`
  20. }
  21. //
  22. type BiddingMongoDBStruct struct {
  23. Address string `json:"address"`
  24. Size int `json:"size"`
  25. DbName string `json:"dbName"`
  26. Collection string `json:"collection"`
  27. CollectionChange string `json:"collectionChange"`
  28. UserName string `json:"userName"`
  29. PassWord string `json:"passWord"`
  30. }
  31. //
  32. type Mysql struct {
  33. Main *MysqlStruct
  34. Push *MysqlStruct
  35. MemberPush *MysqlStruct
  36. EntnichePush *MysqlStruct
  37. }
  38. //mysql
  39. type MysqlStruct struct {
  40. DbName string `json:"dbName"`
  41. Address string `json:"address"`
  42. UserName string `json:"userName"`
  43. PassWord string `json:"passWord"`
  44. MaxOpenConns int `json:"maxOpenConns"`
  45. MaxIdleConns int `json:"maxIdleConns"`
  46. }
  47. //nsq消息队列
  48. type NsqStruct struct {
  49. Ip string `json:"ip"`
  50. Topic string `json:"topic"`
  51. }
  52. //redis
  53. type RedisDBStuct struct {
  54. Addr []string `json:"addr"`
  55. }
  56. //es
  57. type EsStruct struct {
  58. Addr string `json:"addr"`
  59. Size int `json:"size"`
  60. }