db.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package entity
  2. type Mongo struct {
  3. Main *MongoStruct `json:"main,optional"`
  4. MgoLog *MongoStruct `json:"mgoLog,optional"`
  5. Bidding *MongoStruct `json:"bidding,optional"`
  6. }
  7. //
  8. type MongoStruct struct {
  9. Address string `json:"address"`
  10. Size int `json:"size"`
  11. DbName string `json:"dbName"`
  12. UserName string `json:"userName,optional"`
  13. Password string `json:"password,optional"`
  14. Collection string `json:"collection,optional"`
  15. CollectionBack string `json:"collectionBack,optional"`
  16. MaxOpenConns int `json:"maxOpenConns,optional"`
  17. MaxIdleConns int `json:"maxIdleConns,optional"`
  18. }
  19. //
  20. type Mysql struct {
  21. Main *MysqlStruct `json:"main,omitempty"`
  22. Push *MysqlStruct `json:"push,omitempty"`
  23. MemberPush *MysqlStruct `json:"memberPush,omitempty"`
  24. EntnichePush *MysqlStruct `json:"entnichePush,omitempty"`
  25. }
  26. //mysql
  27. type MysqlStruct struct {
  28. DbName string `json:"dbName"`
  29. Address string `json:"address"`
  30. UserName string `json:"userName"`
  31. Password string `json:"password"`
  32. MaxOpenConns int `json:"maxOpenConns"`
  33. MaxIdleConns int `json:"maxIdleConns"`
  34. }
  35. //redis
  36. type RedisStuct struct {
  37. Addr []string `json:"addr"`
  38. }
  39. //es
  40. type EsStruct struct {
  41. Addr string `json:"addr"`
  42. Size int `json:"size"`
  43. }