Resolving code conflicts after project directory changes and Add user subscription to the operation from rpc to db layer (#684)

* Resolving code conflicts after project directory changes and Add subscribe and unsubscribe mongodb operations

* Organize and update module dependencies
This commit is contained in:
pluto
2023-07-27 19:46:44 +08:00
committed by GitHub
parent 0b9ac4bd87
commit 4d816978ec
9 changed files with 295 additions and 39 deletions
+2
View File
@@ -82,10 +82,12 @@ func InitMsgTool() (*MsgTool, error) {
discov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()))
userDB := relation.NewUserGorm(db)
msgDatabase := controller.InitCommonMsgDatabase(rdb, mongo.GetDatabase())
userMongoDB := unrelation.NewUserMongoDriver(mongo.GetDatabase())
userDatabase := controller.NewUserDatabase(
userDB,
cache.NewUserCacheRedis(rdb, relation.NewUserGorm(db), cache.GetDefaultOpt()),
tx.NewGorm(db),
userMongoDB,
)
groupDatabase := controller.InitGroupDatabase(db, rdb, mongo.GetDatabase())
conversationDatabase := controller.NewConversationDatabase(