db.go 941 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package entity
  2. import (
  3. elastic "app.yhyue.com/moapp/jybase/es"
  4. "app.yhyue.com/moapp/jybase/mysql"
  5. )
  6. var (
  7. Mysql *mysql.Mysql
  8. ESV7 elastic.Es // 知识库使用新
  9. ESV7Index string
  10. ESV7Type string
  11. )
  12. // MysqlMainStruct msyql
  13. type MysqlMainStruct struct {
  14. DbName string `json:"dbName"`
  15. Address string `json:"address"`
  16. UserName string `json:"userName"`
  17. PassWord string `json:"passWord"`
  18. MaxOpenConns int `json:"maxOpenConns"`
  19. MaxIdleConns int `json:"maxIdleConns"`
  20. }
  21. // Mgo mgo
  22. type Mgo struct {
  23. DbName string `json:"dbName"`
  24. Address string `json:"address"`
  25. Size int `json:"size"`
  26. ReplSet string `json:"replSet"`
  27. }
  28. // RedisStruct redis
  29. type RedisStruct struct {
  30. Addr string `json:"addr"`
  31. Modules string `json:"modules"`
  32. }
  33. // EsStruct es
  34. type EsStruct struct {
  35. Addr string `json:"addr"`
  36. Size int `json:"size"`
  37. Index string `json:"index"`
  38. Type string `json:"type"`
  39. }