db.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package entity
  2. type Mongo struct {
  3. Main *MongoStruct `json:"main,optional"`
  4. MgoLog *MongoStruct `json:"mgoLog,optional"`
  5. Ent *MongoStruct `json:"ent,optional"`
  6. Bidding *MongoStruct `json:"bidding,optional"`
  7. }
  8. //
  9. type MongoStruct struct {
  10. Address string `json:"address"`
  11. Size int `json:"size"`
  12. DbName string `json:"dbName"`
  13. UserName string `json:"userName,optional"`
  14. Password string `json:"password,optional"`
  15. Collection string `json:"collection,optional"`
  16. CollectionBack string `json:"collectionBack,optional"`
  17. MaxOpenConns int `json:"maxOpenConns,optional"`
  18. MaxIdleConns int `json:"maxIdleConns,optional"`
  19. }
  20. type Mysql struct {
  21. Main *MysqlStruct `json:"main,optional"`
  22. Push *MysqlStruct `json:"push,optional"`
  23. MemberPush *MysqlStruct `json:"memberPush"`
  24. EntnichePush *MysqlStruct `json:"entnichePush"`
  25. }
  26. //mysql
  27. type MysqlStruct struct {
  28. DbName string `json:"dbName,optional"`
  29. Address string `json:"address,optional"`
  30. UserName string `json:"userName,optional"`
  31. Password string `json:"password,optional"`
  32. MaxOpenConns int `json:"maxOpenConns,optional"`
  33. MaxIdleConns int `json:"maxIdleConns,optional"`
  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. }