db.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. BaseService *MysqlStruct `json:"baseService"`
  26. }
  27. //mysql
  28. type MysqlStruct struct {
  29. DbName string `json:"dbName,optional"`
  30. Address string `json:"address,optional"`
  31. UserName string `json:"userName,optional"`
  32. Password string `json:"password,optional"`
  33. MaxOpenConns int `json:"maxOpenConns,optional"`
  34. MaxIdleConns int `json:"maxIdleConns,optional"`
  35. }
  36. //redis
  37. type RedisStuct struct {
  38. Addr []string `json:"addr"`
  39. }
  40. //es
  41. type EsStruct struct {
  42. Addr string `json:"addr"`
  43. Size int `json:"size"`
  44. }