|
@@ -0,0 +1,45 @@
|
|
|
+package entity
|
|
|
+
|
|
|
+import (
|
|
|
+ "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
+ "app.yhyue.com/moapp/jybase/mysql"
|
|
|
+)
|
|
|
+
|
|
|
+type MysqlMainStruct struct {
|
|
|
+ DbName string `json:"dbName"`
|
|
|
+ Address string `json:"address"`
|
|
|
+ UserName string `json:"userName"`
|
|
|
+ PassWord string `json:"passWord"`
|
|
|
+ MaxOpenConns int `json:"maxOpenConns"`
|
|
|
+ MaxIdleConns int `json:"maxIdleConns"`
|
|
|
+}
|
|
|
+
|
|
|
+type EsStruct struct {
|
|
|
+ Addr string `json:"addr"`
|
|
|
+ Size int `json:"size"`
|
|
|
+}
|
|
|
+
|
|
|
+var (
|
|
|
+ Mysql *mysql.Mysql
|
|
|
+ BaseMysql *mysql.Mysql
|
|
|
+ GlobalCommonData *mysql.Mysql
|
|
|
+ MgoJy *mongodb.MongodbSim
|
|
|
+)
|
|
|
+
|
|
|
+type Conn struct {
|
|
|
+ Mysql *mysql.Mysql
|
|
|
+ BaseMysql *mysql.Mysql
|
|
|
+ MgoJy *mongodb.MongodbSim
|
|
|
+}
|
|
|
+
|
|
|
+type MongoStruct struct {
|
|
|
+ Address string `json:"address"`
|
|
|
+ Size int `json:"size"`
|
|
|
+ DbName string `json:"dbName"`
|
|
|
+ UserName string `json:"userName,optional"`
|
|
|
+ Password string `json:"password,optional"`
|
|
|
+ Collection string `json:"collection,optional"`
|
|
|
+ CollectionBack string `json:"collectionBack,optional"`
|
|
|
+ MaxOpenConns int `json:"maxOpenConns,optional"`
|
|
|
+ MaxIdleConns int `json:"maxIdleConns,optional"`
|
|
|
+}
|