From 0ddf5eadb6ed3b73aa9c42c658dd750231457138 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 26 Jul 2022 16:50:54 +0800 Subject: [PATCH 01/10] Push message to client through message queue --- pkg/common/db/batch_insert_chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/batch_insert_chat.go b/pkg/common/db/batch_insert_chat.go index bef5a312c..f2920813d 100644 --- a/pkg/common/db/batch_insert_chat.go +++ b/pkg/common/db/batch_insert_chat.go @@ -101,7 +101,7 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo return utils.Wrap(err, "") } } - log.NewWarn(operationID, "batch mgo cost time ", getCurrentTimestampByMill()-newTime, userID, len(msgList)) + log.Debug(operationID, "batch mgo cost time ", getCurrentTimestampByMill()-newTime, userID, len(msgList)) return nil } From 9730ada80519adca7d9fdfe0d90b7343f80f445a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 27 Jul 2022 11:49:00 +0800 Subject: [PATCH 02/10] debug --- internal/api/user/user.go | 1 + .../msg_gateway/gate/open_im_media/room.go | 38 +------------------ 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 51919fa42..6379a55a8 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -417,6 +417,7 @@ func GetUsersOnlineStatus(c *gin.Context) { flag := false grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName) for _, v := range grpcCons { + log.Debug(params.OperationID, "get node ", v) client := pbRelay.NewRelayClient(v) reply, err := client.GetUsersOnlineStatus(context.Background(), req) if err != nil { diff --git a/internal/msg_gateway/gate/open_im_media/room.go b/internal/msg_gateway/gate/open_im_media/room.go index 83796da29..b840de39a 100644 --- a/internal/msg_gateway/gate/open_im_media/room.go +++ b/internal/msg_gateway/gate/open_im_media/room.go @@ -5,8 +5,6 @@ const ( Address = "127.0.0.1:11300" ) -//var roomClient *lksdk.RoomServiceClient - type Media struct { } @@ -14,45 +12,11 @@ func NewMedia() *Media { return &Media{} } -//func (m *Media) GetJoinToken(room, identity string, operationID string, data *open_im_sdk.ParticipantMetaData) (string, string, error) { -// var newData pbRtc.ParticipantMetaData -// copier.Copy(&newData, data) -// conn, err := grpc.Dial(Address, grpc.WithInsecure()) -// if err != nil { -// return "", "", err -// } -// defer conn.Close() -// c := pbRtc.NewRtcServiceClient(conn) -// req := &pbRtc.GetJoinTokenReq{Room: room, OperationID: operationID, Identity: identity, MetaData: &newData} -// resp, err := c.GetJoinToken(context.Background(), req) -// if err != nil { -// return "", "", err -// } -// if resp.CommonResp.ErrCode != 0 { -// return "", "", errors.New(resp.CommonResp.ErrMsg) -// } -// return resp.Jwt, resp.LiveURL, nil -// //at := auth.NewAccessToken(m.ApiKey, m.ApiSecret) -// //grant := &auth.VideoGrant{ -// // RoomJoin: true, -// // Room: room, -// //} -// //at.AddGrant(grant). -// // SetIdentity(identity). -// // SetValidFor(time.Hour) -// // -// //return at.ToJWT() -//} - func init() { - //roomClient = lksdk.NewRoomServiceClient(MediaAddress, ApiKey, ApiSecret) + } func (m *Media) CreateRoom(roomName string) (error, error) { return nil, nil - //return roomClient.CreateRoom(context.Background(), &livekit.CreateRoomRequest{ - // Name: roomName, - // EmptyTimeout: 60 * 3, - //}) } From 17494b45bd82f2ce34deb48b97cfbf3af2fed854 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 27 Jul 2022 12:01:42 +0800 Subject: [PATCH 03/10] debug --- internal/api/user/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 6379a55a8..167063c54 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -417,7 +417,7 @@ func GetUsersOnlineStatus(c *gin.Context) { flag := false grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName) for _, v := range grpcCons { - log.Debug(params.OperationID, "get node ", v) + log.Debug(params.OperationID, "get node ", *v) client := pbRelay.NewRelayClient(v) reply, err := client.GetUsersOnlineStatus(context.Background(), req) if err != nil { From 4c53023ebc98aea5a435383d92e17d2dacb9e114 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 27 Jul 2022 12:04:15 +0800 Subject: [PATCH 04/10] debug --- internal/api/user/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 167063c54..48171ece0 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -417,7 +417,7 @@ func GetUsersOnlineStatus(c *gin.Context) { flag := false grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName) for _, v := range grpcCons { - log.Debug(params.OperationID, "get node ", *v) + log.Debug(params.OperationID, "get node ", *v, v.Target()) client := pbRelay.NewRelayClient(v) reply, err := client.GetUsersOnlineStatus(context.Background(), req) if err != nil { From bbc62ef907ba6cb88078f741eafa0cf23e7313c5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 27 Jul 2022 12:15:32 +0800 Subject: [PATCH 05/10] remove cache message from redis --- .../logic/online_msg_to_mongo_handler.go | 7 ++++++- pkg/common/db/RedisModel.go | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/internal/msg_transfer/logic/online_msg_to_mongo_handler.go b/internal/msg_transfer/logic/online_msg_to_mongo_handler.go index 42efdc428..58575f849 100644 --- a/internal/msg_transfer/logic/online_msg_to_mongo_handler.go +++ b/internal/msg_transfer/logic/online_msg_to_mongo_handler.go @@ -36,7 +36,12 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo(cMsg *sarama.Con } err = db.DB.BatchInsertChat2DB(msgFromMQ.AggregationID, msgFromMQ.MessageList, msgFromMQ.TriggerID, msgFromMQ.LastSeq) if err != nil { - log.NewError(msgFromMQ.TriggerID, "single data insert to mongo err", err.Error(), msgFromMQ.MessageList) + log.NewError(msgFromMQ.TriggerID, "single data insert to mongo err", err.Error(), msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.TriggerID) + } else { + err = db.DB.DeleteMessageFromCache(msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.GetTriggerID()) + if err != nil { + log.NewError(msgFromMQ.TriggerID, "remove cache msg from redis err", err.Error(), msgFromMQ.MessageList, msgFromMQ.AggregationID, msgFromMQ.TriggerID) + } } for _, v := range msgFromMQ.MessageList { if v.MsgData.ContentType == constant.DeleteMessageNotification { diff --git a/pkg/common/db/RedisModel.go b/pkg/common/db/RedisModel.go index 217c4c5c5..163202270 100644 --- a/pkg/common/db/RedisModel.go +++ b/pkg/common/db/RedisModel.go @@ -221,6 +221,19 @@ func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string, _, err := pipe.Exec(ctx) return err } +func (d *DataBases) DeleteMessageFromCache(msgList []*pbChat.MsgDataToMQ, uid string, operationID string) error { + ctx := context.Background() + var keys []string + for _, msg := range msgList { + key := messageCache + uid + "_" + strconv.Itoa(int(msg.MsgData.Seq)) + keys = append(keys, key) + } + err := d.RDB.Del(ctx, keys...).Err() + if err != nil { + log2.NewWarn(operationID, utils.GetSelfFuncName(), "redis failed", "args:", keys, uid, err.Error(), msgList) + } + return err +} func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID string) error { ctx := context.Background() From 36885b4f9ee8c35cc78ed71b5c692e8daa52ecae Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 28 Jul 2022 15:32:03 +0800 Subject: [PATCH 06/10] test --- internal/push/fcm/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/fcm/push.go b/internal/push/fcm/push.go index a9c7e5b39..767ca7ec6 100644 --- a/internal/push/fcm/push.go +++ b/internal/push/fcm/push.go @@ -23,7 +23,7 @@ var ( ) func init() { - //FcmClient = newFcmClient() + FcmClient = newFcmClient() } func newFcmClient() *Fcm { From 787cef54f53a3deef100b069b95f0295f980cf99 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 28 Jul 2022 18:14:58 +0800 Subject: [PATCH 07/10] manger send msg modify --- internal/api/manage/management_chat.go | 30 ++++++++++---------- internal/push/fcm/push.go | 26 ++++++++---------- internal/rpc/group/group.go | 2 +- pkg/base_info/manage_api_struct.go | 9 +++++- pkg/common/constant/constant.go | 38 +++++++++++++------------- 5 files changed, 55 insertions(+), 50 deletions(-) diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 7a1876c83..98d4ac98b 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -29,10 +29,10 @@ import ( var validate *validator.Validate func SetOptions(options map[string]bool, value bool) { - utils.SetSwitchFromOptions(options, constant.IsOfflinePush, value) utils.SetSwitchFromOptions(options, constant.IsHistory, value) utils.SetSwitchFromOptions(options, constant.IsPersistent, value) utils.SetSwitchFromOptions(options, constant.IsSenderSync, value) + utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, value) } func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq { @@ -59,10 +59,12 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq { if params.IsOnlineOnly { SetOptions(options, false) } - if params.ContentType == constant.CustomMsgOnlineOnly { - SetOptions(options, false) - } else if params.ContentType == constant.CustomMsgNotTriggerConversation { + if params.NotOfflinePush { + utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) + } + if params.ContentType == constant.CustomOnlineOnly { SetOptions(options, false) + } else if params.ContentType == constant.CustomNotTriggerConversation { utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, false) } @@ -146,9 +148,9 @@ func ManagementSendMsg(c *gin.Context) { case constant.OANotification: data = OANotificationElem{} params.SessionType = constant.NotificationChatType - case constant.CustomMsgNotTriggerConversation: + case constant.CustomNotTriggerConversation: data = CustomElem{} - case constant.CustomMsgOnlineOnly: + case constant.CustomOnlineOnly: data = CustomElem{} //case constant.HasReadReceipt: //case constant.Typing: @@ -277,9 +279,9 @@ func ManagementBatchSendMsg(c *gin.Context) { case constant.OANotification: data = OANotificationElem{} params.SessionType = constant.NotificationChatType - case constant.CustomMsgNotTriggerConversation: + case constant.CustomNotTriggerConversation: data = CustomElem{} - case constant.CustomMsgOnlineOnly: + case constant.CustomOnlineOnly: data = CustomElem{} //case constant.HasReadReceipt: //case constant.Typing: @@ -322,12 +324,11 @@ func ManagementBatchSendMsg(c *gin.Context) { return } client := pbChat.NewMsgClient(etcdConn) + req := &api.ManagementSendMsgReq{ + ManagementSendMsg: params.ManagementSendMsg, + } + pbData := newUserSendMsgReq(req) for _, recvID := range params.RecvIDList { - req := &api.ManagementSendMsgReq{ - ManagementSendMsg: params.ManagementSendMsg, - RecvID: recvID, - } - pbData := newUserSendMsgReq(req) pbData.MsgData.RecvID = recvID log.Info(params.OperationID, "", "api ManagementSendMsg call start..., ", pbData.String()) @@ -344,10 +345,11 @@ func ManagementBatchSendMsg(c *gin.Context) { msgSendFailedFlag = true continue } - resp.Data.ResultList = append(resp.Data.ResultList, server_api_params.UserSendMsgResp{ + resp.Data.ResultList = append(resp.Data.ResultList, &api.SingleReturnResult{ ServerMsgID: rpcResp.ServerMsgID, ClientMsgID: rpcResp.ClientMsgID, SendTime: rpcResp.SendTime, + RecvID: recvID, }) } if msgSendFailedFlag { diff --git a/internal/push/fcm/push.go b/internal/push/fcm/push.go index 767ca7ec6..7878f11f3 100644 --- a/internal/push/fcm/push.go +++ b/internal/push/fcm/push.go @@ -4,23 +4,20 @@ import ( "Open_IM/internal/push" "Open_IM/pkg/common/config" "Open_IM/pkg/common/db" + "Open_IM/pkg/common/log" "context" - "log" - "path/filepath" - "strconv" - firebase "firebase.google.com/go" "firebase.google.com/go/messaging" "google.golang.org/api/option" + "path/filepath" + "strconv" ) type Fcm struct { + FcmMsgCli *messaging.Client } -var ( - FcmClient *Fcm - FcmMsgCli *messaging.Client -) +var FcmClient *Fcm func init() { FcmClient = newFcmClient() @@ -30,7 +27,7 @@ func newFcmClient() *Fcm { opt := option.WithCredentialsFile(filepath.Join(config.Root, "config", config.Config.Push.Fcm.ServiceAccount)) fcmApp, err := firebase.NewApp(context.Background(), nil, opt) if err != nil { - log.Println("error initializing app: %v\n", err) + log.Debug("", "error initializing app: ", err.Error()) return nil } //授权 @@ -41,13 +38,12 @@ func newFcmClient() *Fcm { // } // log.Printf("%#v\r\n", fcmClient) ctx := context.Background() - FcmMsgCli, err = fcmApp.Messaging(ctx) + fcmMsgClient, err := fcmApp.Messaging(ctx) if err != nil { - log.Fatalf("error getting Messaging client: %v\n", err) + panic(err.Error()) return nil } - log.Println(FcmMsgCli) - return &Fcm{} + return &Fcm{FcmMsgCli: fcmMsgClient} } func (f *Fcm) Push(accounts []string, alert, detailContent, operationID string, opts push.PushOpts) (string, error) { @@ -87,9 +83,9 @@ func (f *Fcm) Push(accounts []string, alert, detailContent, operationID string, //An error from SendMulticast indicates a total failure -- i.e. //the message could not be sent to any of the recipients. //Partial failures are indicated by a `BatchResponse` return value. - response, err := FcmMsgCli.SendMulticast(ctx, Msg) + response, err := f.FcmMsgCli.SendMulticast(ctx, Msg) if err != nil { - log.Fatalln(err) + return "", err } Success = Success + response.SuccessCount Fail = Fail + response.FailureCount diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 0101ef077..cfe7f4825 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -274,7 +274,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite groupInfo, err := imdb.GetGroupInfoByGroupID(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err) - return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil + return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}, nil } if groupInfo.Status == constant.GroupStatusDismissed { errMsg := " group status is dismissed " diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go index e7db30f77..7d9f43653 100644 --- a/pkg/base_info/manage_api_struct.go +++ b/pkg/base_info/manage_api_struct.go @@ -52,6 +52,7 @@ type ManagementSendMsg struct { ContentType int32 `json:"contentType" binding:"required"` SessionType int32 `json:"sessionType" binding:"required"` IsOnlineOnly bool `json:"isOnlineOnly"` + NotOfflinePush bool `json:"notOfflinePush"` OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` } @@ -73,10 +74,16 @@ type ManagementBatchSendMsgReq struct { type ManagementBatchSendMsgResp struct { CommResp Data struct { - ResultList []server_api_params.UserSendMsgResp `json:"resultList"` + ResultList []*SingleReturnResult `json:"resultList"` FailedIDList []string } `json:"data"` } +type SingleReturnResult struct { + ServerMsgID string `json:"serverMsgID"` + ClientMsgID string `json:"clientMsgID"` + SendTime int64 `json:"sendTime"` + RecvID string `json:"recvID" ` +} type CheckMsgIsSendSuccessReq struct { OperationID string `json:"operationID"` diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 3edcd0f21..58b53d7b7 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -28,25 +28,25 @@ const ( ///ContentType //UserRelated - Text = 101 - Picture = 102 - Voice = 103 - Video = 104 - File = 105 - AtText = 106 - Merger = 107 - Card = 108 - Location = 109 - Custom = 110 - Revoke = 111 - HasReadReceipt = 112 - Typing = 113 - Quote = 114 - GroupHasReadReceipt = 116 - AdvancedText = 117 - AdvancedRevoke = 118 //影响前者消息 - CustomMsgNotTriggerConversation = 119 - CustomMsgOnlineOnly = 120 + Text = 101 + Picture = 102 + Voice = 103 + Video = 104 + File = 105 + AtText = 106 + Merger = 107 + Card = 108 + Location = 109 + Custom = 110 + Revoke = 111 + HasReadReceipt = 112 + Typing = 113 + Quote = 114 + GroupHasReadReceipt = 116 + AdvancedText = 117 + AdvancedRevoke = 118 //影响前者消息 + CustomNotTriggerConversation = 119 + CustomOnlineOnly = 120 Common = 200 GroupMsg = 201 From 1eda0ebea7f1d47febd2634852e4278bfd80b722 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 28 Jul 2022 18:58:57 +0800 Subject: [PATCH 08/10] fcm push modify --- internal/push/fcm/push.go | 9 +++------ internal/push/logic/init.go | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/internal/push/fcm/push.go b/internal/push/fcm/push.go index 7878f11f3..3f0552d62 100644 --- a/internal/push/fcm/push.go +++ b/internal/push/fcm/push.go @@ -1,4 +1,4 @@ -package push +package fcm import ( "Open_IM/internal/push" @@ -17,12 +17,9 @@ type Fcm struct { FcmMsgCli *messaging.Client } -var FcmClient *Fcm - -func init() { - FcmClient = newFcmClient() +func NewFcm() *Fcm { + return newFcmClient() } - func newFcmClient() *Fcm { opt := option.WithCredentialsFile(filepath.Join(config.Root, "config", config.Config.Push.Fcm.ServiceAccount)) fcmApp, err := firebase.NewApp(context.Background(), nil, opt) diff --git a/internal/push/logic/init.go b/internal/push/logic/init.go index 0b540af6a..6d6229dca 100644 --- a/internal/push/logic/init.go +++ b/internal/push/logic/init.go @@ -44,7 +44,7 @@ func init() { } if config.Config.Push.Fcm.Enable { - offlinePusher = fcm.FcmClient + offlinePusher = fcm.NewFcm() } } From 51679b47a6a8fab3be2bfd290aa302fbc7029380 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 29 Jul 2022 12:24:54 +0800 Subject: [PATCH 09/10] delete super group message --- internal/api/msg/del_msg.go | 45 +- internal/rpc/msg/del_msg.go | 27 + pkg/proto/msg/msg.pb.go | 1263 ----------------------------------- pkg/proto/msg/msg.proto | 12 +- 4 files changed, 69 insertions(+), 1278 deletions(-) delete mode 100644 pkg/proto/msg/msg.pb.go diff --git a/internal/api/msg/del_msg.go b/internal/api/msg/del_msg.go index b52990d73..2ae84505f 100644 --- a/internal/api/msg/del_msg.go +++ b/internal/api/msg/del_msg.go @@ -78,15 +78,18 @@ func DelSuperGroupMsg(c *gin.Context) { req api.DelSuperGroupMsgReq resp api.DelSuperGroupMsgResp ) + rpcReq := &rpc.DelSuperGroupMsgReq{} + utils.CopyStructFields(req, &req) if err := c.BindJSON(&req); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req:", req) - - ok, opUserID, errInfo := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) + var ok bool + var errInfo string + ok, rpcReq.OpUserID, errInfo = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) if !ok { - errMsg := req.OperationID + " " + opUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") + errMsg := req.OperationID + " " + rpcReq.OpUserID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token") log.NewError(req.OperationID, errMsg) c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg}) return @@ -137,18 +140,32 @@ func DelSuperGroupMsg(c *gin.Context) { client := rpc.NewMsgClient(etcdConn) log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...") - - RpcResp, err := client.SendMsg(context.Background(), &pbData) - if err != nil { - log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) - return + if req.IsAllDelete { + RpcResp, err := client.DelSuperGroupMsg(context.Background(),rpcReq) + if err != nil { + log.NewError(req.OperationID, "call delete DelSuperGroupMsg rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call DelSuperGroupMsg rpc server failed"}) + return + } + log.Info(req.OperationID, "", "api DelSuperGroupMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String()) + resp.ErrCode = RpcResp.ErrCode + resp.ErrMsg = RpcResp.ErrMsg + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp) + c.JSON(http.StatusOK, resp) + }else{ + RpcResp, err := client.SendMsg(context.Background(), &pbData) + if err != nil { + log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) + return + } + log.Info(req.OperationID, "", "api DelSuperGroupMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String()) + resp.ErrCode = RpcResp.ErrCode + resp.ErrMsg = RpcResp.ErrMsg + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp) + c.JSON(http.StatusOK, resp) } - log.Info(req.OperationID, "", "api DelSuperGroupMsg call end..., [data: %s] [reply: %s]", pbData.String(), RpcResp.String()) - resp.ErrCode = RpcResp.ErrCode - resp.ErrMsg = RpcResp.ErrMsg - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp) - c.JSON(http.StatusOK, resp) + } // @Summary 清空用户消息 diff --git a/internal/rpc/msg/del_msg.go b/internal/rpc/msg/del_msg.go index c6856bb98..06ec06e06 100644 --- a/internal/rpc/msg/del_msg.go +++ b/internal/rpc/msg/del_msg.go @@ -2,8 +2,11 @@ package msg import ( "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" commonPb "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/proto/msg" "Open_IM/pkg/utils" "context" "time" @@ -27,3 +30,27 @@ func (rpc *rpcChat) DelMsgList(_ context.Context, req *commonPb.DelMsgListReq) ( log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) return resp, nil } +func (rpc *rpcChat) DelSuperGroupMsg(_ context.Context, req *msg.DelSuperGroupMsgReq) (*msg.DelSuperGroupMsgResp, error) { + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) + if !token_verify.CheckAccess(req.OpUserID, req.UserID) { + log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.UserID) + return &msg.DelSuperGroupMsgResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + } + resp := &msg.DelSuperGroupMsgResp{} + groupMaxSeq, err := db.DB.GetGroupMaxSeq(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "GetGroupMaxSeq false ", req.OpUserID, req.UserID,req.GroupID) + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = err.Error() + return resp, nil + } + err = db.DB.SetGroupUserMinSeq(req.GroupID,req.UserID, groupMaxSeq) + if err != nil { + log.NewError(req.OperationID, "SetGroupUserMinSeq false ", req.OpUserID, req.UserID,req.GroupID) + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = err.Error() + return resp, nil + } + log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) + return resp, nil +} \ No newline at end of file diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go deleted file mode 100644 index f2002012f..000000000 --- a/pkg/proto/msg/msg.pb.go +++ /dev/null @@ -1,1263 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: msg/msg.proto - -package msg // import "./msg" - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import sdk_ws "Open_IM/pkg/proto/sdk_ws" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type MsgDataToMQ struct { - Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } -func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } -func (*MsgDataToMQ) ProtoMessage() {} -func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{0} -} -func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) -} -func (m *MsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgDataToMQ.Marshal(b, m, deterministic) -} -func (dst *MsgDataToMQ) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDataToMQ.Merge(dst, src) -} -func (m *MsgDataToMQ) XXX_Size() int { - return xxx_messageInfo_MsgDataToMQ.Size(m) -} -func (m *MsgDataToMQ) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDataToMQ.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDataToMQ proto.InternalMessageInfo - -func (m *MsgDataToMQ) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -func (m *MsgDataToMQ) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *MsgDataToMQ) GetMsgData() *sdk_ws.MsgData { - if m != nil { - return m.MsgData - } - return nil -} - -type MsgDataToDB struct { - MsgData *sdk_ws.MsgData `protobuf:"bytes,1,opt,name=msgData" json:"msgData,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } -func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } -func (*MsgDataToDB) ProtoMessage() {} -func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{1} -} -func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) -} -func (m *MsgDataToDB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgDataToDB.Marshal(b, m, deterministic) -} -func (dst *MsgDataToDB) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDataToDB.Merge(dst, src) -} -func (m *MsgDataToDB) XXX_Size() int { - return xxx_messageInfo_MsgDataToDB.Size(m) -} -func (m *MsgDataToDB) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDataToDB.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDataToDB proto.InternalMessageInfo - -func (m *MsgDataToDB) GetMsgData() *sdk_ws.MsgData { - if m != nil { - return m.MsgData - } - return nil -} - -func (m *MsgDataToDB) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type PushMsgDataToMQ struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` - PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID" json:"pushToUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } -func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } -func (*PushMsgDataToMQ) ProtoMessage() {} -func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{2} -} -func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) -} -func (m *PushMsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PushMsgDataToMQ.Marshal(b, m, deterministic) -} -func (dst *PushMsgDataToMQ) XXX_Merge(src proto.Message) { - xxx_messageInfo_PushMsgDataToMQ.Merge(dst, src) -} -func (m *PushMsgDataToMQ) XXX_Size() int { - return xxx_messageInfo_PushMsgDataToMQ.Size(m) -} -func (m *PushMsgDataToMQ) XXX_DiscardUnknown() { - xxx_messageInfo_PushMsgDataToMQ.DiscardUnknown(m) -} - -var xxx_messageInfo_PushMsgDataToMQ proto.InternalMessageInfo - -func (m *PushMsgDataToMQ) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *PushMsgDataToMQ) GetMsgData() *sdk_ws.MsgData { - if m != nil { - return m.MsgData - } - return nil -} - -func (m *PushMsgDataToMQ) GetPushToUserID() string { - if m != nil { - return m.PushToUserID - } - return "" -} - -type MsgDataToMongoByMQ struct { - LastSeq uint64 `protobuf:"varint,1,opt,name=lastSeq" json:"lastSeq,omitempty"` - AggregationID string `protobuf:"bytes,2,opt,name=aggregationID" json:"aggregationID,omitempty"` - MessageList []*MsgDataToMQ `protobuf:"bytes,3,rep,name=messageList" json:"messageList,omitempty"` - TriggerID string `protobuf:"bytes,4,opt,name=triggerID" json:"triggerID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgDataToMongoByMQ) Reset() { *m = MsgDataToMongoByMQ{} } -func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) } -func (*MsgDataToMongoByMQ) ProtoMessage() {} -func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{3} -} -func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b) -} -func (m *MsgDataToMongoByMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgDataToMongoByMQ.Marshal(b, m, deterministic) -} -func (dst *MsgDataToMongoByMQ) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDataToMongoByMQ.Merge(dst, src) -} -func (m *MsgDataToMongoByMQ) XXX_Size() int { - return xxx_messageInfo_MsgDataToMongoByMQ.Size(m) -} -func (m *MsgDataToMongoByMQ) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDataToMongoByMQ.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDataToMongoByMQ proto.InternalMessageInfo - -func (m *MsgDataToMongoByMQ) GetLastSeq() uint64 { - if m != nil { - return m.LastSeq - } - return 0 -} - -func (m *MsgDataToMongoByMQ) GetAggregationID() string { - if m != nil { - return m.AggregationID - } - return "" -} - -func (m *MsgDataToMongoByMQ) GetMessageList() []*MsgDataToMQ { - if m != nil { - return m.MessageList - } - return nil -} - -func (m *MsgDataToMongoByMQ) GetTriggerID() string { - if m != nil { - return m.TriggerID - } - return "" -} - -// message PullMessageReq { -// string UserID = 1; -// int64 SeqBegin = 2; -// int64 SeqEnd = 3; -// string OperationID = 4; -// } -// -// message PullMessageResp { -// int32 ErrCode = 1; -// string ErrMsg = 2; -// int64 MaxSeq = 3; -// int64 MinSeq = 4; -// repeated GatherFormat SingleUserMsg = 5; -// repeated GatherFormat GroupUserMsg = 6; -// } -// message PullMessageBySeqListReq{ -// string UserID = 1; -// string OperationID = 2; -// repeated int64 seqList =3; -// } -type GetMaxAndMinSeqReq struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } -func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } -func (*GetMaxAndMinSeqReq) ProtoMessage() {} -func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{4} -} -func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) -} -func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic) -} -func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src) -} -func (m *GetMaxAndMinSeqReq) XXX_Size() int { - return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m) -} -func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m) -} - -var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo - -func (m *GetMaxAndMinSeqReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *GetMaxAndMinSeqReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type GetMaxAndMinSeqResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MaxSeq uint32 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` - MinSeq uint32 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } -func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } -func (*GetMaxAndMinSeqResp) ProtoMessage() {} -func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{5} -} -func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) -} -func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic) -} -func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src) -} -func (m *GetMaxAndMinSeqResp) XXX_Size() int { - return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m) -} -func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m) -} - -var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo - -func (m *GetMaxAndMinSeqResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *GetMaxAndMinSeqResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { - if m != nil { - return m.MaxSeq - } - return 0 -} - -func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { - if m != nil { - return m.MinSeq - } - return 0 -} - -type SendMsgReq struct { - Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } -func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } -func (*SendMsgReq) ProtoMessage() {} -func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{6} -} -func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) -} -func (m *SendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SendMsgReq.Marshal(b, m, deterministic) -} -func (dst *SendMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendMsgReq.Merge(dst, src) -} -func (m *SendMsgReq) XXX_Size() int { - return xxx_messageInfo_SendMsgReq.Size(m) -} -func (m *SendMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_SendMsgReq.DiscardUnknown(m) -} - -var xxx_messageInfo_SendMsgReq proto.InternalMessageInfo - -func (m *SendMsgReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -func (m *SendMsgReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *SendMsgReq) GetMsgData() *sdk_ws.MsgData { - if m != nil { - return m.MsgData - } - return nil -} - -type SendMsgResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - ServerMsgID string `protobuf:"bytes,4,opt,name=serverMsgID" json:"serverMsgID,omitempty"` - ClientMsgID string `protobuf:"bytes,5,opt,name=clientMsgID" json:"clientMsgID,omitempty"` - SendTime int64 `protobuf:"varint,6,opt,name=sendTime" json:"sendTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } -func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } -func (*SendMsgResp) ProtoMessage() {} -func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{7} -} -func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) -} -func (m *SendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SendMsgResp.Marshal(b, m, deterministic) -} -func (dst *SendMsgResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendMsgResp.Merge(dst, src) -} -func (m *SendMsgResp) XXX_Size() int { - return xxx_messageInfo_SendMsgResp.Size(m) -} -func (m *SendMsgResp) XXX_DiscardUnknown() { - xxx_messageInfo_SendMsgResp.DiscardUnknown(m) -} - -var xxx_messageInfo_SendMsgResp proto.InternalMessageInfo - -func (m *SendMsgResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *SendMsgResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *SendMsgResp) GetServerMsgID() string { - if m != nil { - return m.ServerMsgID - } - return "" -} - -func (m *SendMsgResp) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - -func (m *SendMsgResp) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -type ClearMsgReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClearMsgReq) Reset() { *m = ClearMsgReq{} } -func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) } -func (*ClearMsgReq) ProtoMessage() {} -func (*ClearMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{8} -} -func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b) -} -func (m *ClearMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClearMsgReq.Marshal(b, m, deterministic) -} -func (dst *ClearMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClearMsgReq.Merge(dst, src) -} -func (m *ClearMsgReq) XXX_Size() int { - return xxx_messageInfo_ClearMsgReq.Size(m) -} -func (m *ClearMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_ClearMsgReq.DiscardUnknown(m) -} - -var xxx_messageInfo_ClearMsgReq proto.InternalMessageInfo - -func (m *ClearMsgReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *ClearMsgReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -func (m *ClearMsgReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type ClearMsgResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClearMsgResp) Reset() { *m = ClearMsgResp{} } -func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) } -func (*ClearMsgResp) ProtoMessage() {} -func (*ClearMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{9} -} -func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b) -} -func (m *ClearMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClearMsgResp.Marshal(b, m, deterministic) -} -func (dst *ClearMsgResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClearMsgResp.Merge(dst, src) -} -func (m *ClearMsgResp) XXX_Size() int { - return xxx_messageInfo_ClearMsgResp.Size(m) -} -func (m *ClearMsgResp) XXX_DiscardUnknown() { - xxx_messageInfo_ClearMsgResp.DiscardUnknown(m) -} - -var xxx_messageInfo_ClearMsgResp proto.InternalMessageInfo - -func (m *ClearMsgResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *ClearMsgResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -type SetMsgMinSeqReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` - MinSeq uint32 `protobuf:"varint,3,opt,name=minSeq" json:"minSeq,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,5,opt,name=opUserID" json:"opUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetMsgMinSeqReq) Reset() { *m = SetMsgMinSeqReq{} } -func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) } -func (*SetMsgMinSeqReq) ProtoMessage() {} -func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{10} -} -func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b) -} -func (m *SetMsgMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetMsgMinSeqReq.Marshal(b, m, deterministic) -} -func (dst *SetMsgMinSeqReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetMsgMinSeqReq.Merge(dst, src) -} -func (m *SetMsgMinSeqReq) XXX_Size() int { - return xxx_messageInfo_SetMsgMinSeqReq.Size(m) -} -func (m *SetMsgMinSeqReq) XXX_DiscardUnknown() { - xxx_messageInfo_SetMsgMinSeqReq.DiscardUnknown(m) -} - -var xxx_messageInfo_SetMsgMinSeqReq proto.InternalMessageInfo - -func (m *SetMsgMinSeqReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *SetMsgMinSeqReq) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - -func (m *SetMsgMinSeqReq) GetMinSeq() uint32 { - if m != nil { - return m.MinSeq - } - return 0 -} - -func (m *SetMsgMinSeqReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *SetMsgMinSeqReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - -type SetMsgMinSeqResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetMsgMinSeqResp) Reset() { *m = SetMsgMinSeqResp{} } -func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) } -func (*SetMsgMinSeqResp) ProtoMessage() {} -func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{11} -} -func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b) -} -func (m *SetMsgMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetMsgMinSeqResp.Marshal(b, m, deterministic) -} -func (dst *SetMsgMinSeqResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetMsgMinSeqResp.Merge(dst, src) -} -func (m *SetMsgMinSeqResp) XXX_Size() int { - return xxx_messageInfo_SetMsgMinSeqResp.Size(m) -} -func (m *SetMsgMinSeqResp) XXX_DiscardUnknown() { - xxx_messageInfo_SetMsgMinSeqResp.DiscardUnknown(m) -} - -var xxx_messageInfo_SetMsgMinSeqResp proto.InternalMessageInfo - -func (m *SetMsgMinSeqResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *SetMsgMinSeqResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -type SetSendMsgFailedFlagReq struct { - OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetSendMsgFailedFlagReq) Reset() { *m = SetSendMsgFailedFlagReq{} } -func (m *SetSendMsgFailedFlagReq) String() string { return proto.CompactTextString(m) } -func (*SetSendMsgFailedFlagReq) ProtoMessage() {} -func (*SetSendMsgFailedFlagReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{12} -} -func (m *SetSendMsgFailedFlagReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetSendMsgFailedFlagReq.Unmarshal(m, b) -} -func (m *SetSendMsgFailedFlagReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetSendMsgFailedFlagReq.Marshal(b, m, deterministic) -} -func (dst *SetSendMsgFailedFlagReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetSendMsgFailedFlagReq.Merge(dst, src) -} -func (m *SetSendMsgFailedFlagReq) XXX_Size() int { - return xxx_messageInfo_SetSendMsgFailedFlagReq.Size(m) -} -func (m *SetSendMsgFailedFlagReq) XXX_DiscardUnknown() { - xxx_messageInfo_SetSendMsgFailedFlagReq.DiscardUnknown(m) -} - -var xxx_messageInfo_SetSendMsgFailedFlagReq proto.InternalMessageInfo - -func (m *SetSendMsgFailedFlagReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type SetSendMsgFailedFlagResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetSendMsgFailedFlagResp) Reset() { *m = SetSendMsgFailedFlagResp{} } -func (m *SetSendMsgFailedFlagResp) String() string { return proto.CompactTextString(m) } -func (*SetSendMsgFailedFlagResp) ProtoMessage() {} -func (*SetSendMsgFailedFlagResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{13} -} -func (m *SetSendMsgFailedFlagResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetSendMsgFailedFlagResp.Unmarshal(m, b) -} -func (m *SetSendMsgFailedFlagResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetSendMsgFailedFlagResp.Marshal(b, m, deterministic) -} -func (dst *SetSendMsgFailedFlagResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetSendMsgFailedFlagResp.Merge(dst, src) -} -func (m *SetSendMsgFailedFlagResp) XXX_Size() int { - return xxx_messageInfo_SetSendMsgFailedFlagResp.Size(m) -} -func (m *SetSendMsgFailedFlagResp) XXX_DiscardUnknown() { - xxx_messageInfo_SetSendMsgFailedFlagResp.DiscardUnknown(m) -} - -var xxx_messageInfo_SetSendMsgFailedFlagResp proto.InternalMessageInfo - -func (m *SetSendMsgFailedFlagResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *SetSendMsgFailedFlagResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -type GetSendMsgStatusReq struct { - OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetSendMsgStatusReq) Reset() { *m = GetSendMsgStatusReq{} } -func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } -func (*GetSendMsgStatusReq) ProtoMessage() {} -func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{14} -} -func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b) -} -func (m *GetSendMsgStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSendMsgStatusReq.Marshal(b, m, deterministic) -} -func (dst *GetSendMsgStatusReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSendMsgStatusReq.Merge(dst, src) -} -func (m *GetSendMsgStatusReq) XXX_Size() int { - return xxx_messageInfo_GetSendMsgStatusReq.Size(m) -} -func (m *GetSendMsgStatusReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetSendMsgStatusReq.DiscardUnknown(m) -} - -var xxx_messageInfo_GetSendMsgStatusReq proto.InternalMessageInfo - -func (m *GetSendMsgStatusReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type GetSendMsgStatusResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetSendMsgStatusResp) Reset() { *m = GetSendMsgStatusResp{} } -func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } -func (*GetSendMsgStatusResp) ProtoMessage() {} -func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return fileDescriptor_msg_b3ce531eb8197ddf, []int{15} -} -func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b) -} -func (m *GetSendMsgStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSendMsgStatusResp.Marshal(b, m, deterministic) -} -func (dst *GetSendMsgStatusResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSendMsgStatusResp.Merge(dst, src) -} -func (m *GetSendMsgStatusResp) XXX_Size() int { - return xxx_messageInfo_GetSendMsgStatusResp.Size(m) -} -func (m *GetSendMsgStatusResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetSendMsgStatusResp.DiscardUnknown(m) -} - -var xxx_messageInfo_GetSendMsgStatusResp proto.InternalMessageInfo - -func (m *GetSendMsgStatusResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *GetSendMsgStatusResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *GetSendMsgStatusResp) GetStatus() int32 { - if m != nil { - return m.Status - } - return 0 -} - -func init() { - proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ") - proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB") - proto.RegisterType((*PushMsgDataToMQ)(nil), "msg.PushMsgDataToMQ") - proto.RegisterType((*MsgDataToMongoByMQ)(nil), "msg.MsgDataToMongoByMQ") - proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "msg.GetMaxAndMinSeqReq") - proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "msg.GetMaxAndMinSeqResp") - proto.RegisterType((*SendMsgReq)(nil), "msg.SendMsgReq") - proto.RegisterType((*SendMsgResp)(nil), "msg.SendMsgResp") - proto.RegisterType((*ClearMsgReq)(nil), "msg.ClearMsgReq") - proto.RegisterType((*ClearMsgResp)(nil), "msg.ClearMsgResp") - proto.RegisterType((*SetMsgMinSeqReq)(nil), "msg.SetMsgMinSeqReq") - proto.RegisterType((*SetMsgMinSeqResp)(nil), "msg.SetMsgMinSeqResp") - proto.RegisterType((*SetSendMsgFailedFlagReq)(nil), "msg.SetSendMsgFailedFlagReq") - proto.RegisterType((*SetSendMsgFailedFlagResp)(nil), "msg.SetSendMsgFailedFlagResp") - proto.RegisterType((*GetSendMsgStatusReq)(nil), "msg.GetSendMsgStatusReq") - proto.RegisterType((*GetSendMsgStatusResp)(nil), "msg.GetSendMsgStatusResp") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for Msg service - -type MsgClient interface { - GetMaxAndMinSeq(ctx context.Context, in *sdk_ws.GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*sdk_ws.GetMaxAndMinSeqResp, error) - PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) - SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) - DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) - ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) - SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) - SetSendMsgFailedFlag(ctx context.Context, in *SetSendMsgFailedFlagReq, opts ...grpc.CallOption) (*SetSendMsgFailedFlagResp, error) - GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) -} - -type msgClient struct { - cc *grpc.ClientConn -} - -func NewMsgClient(cc *grpc.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) GetMaxAndMinSeq(ctx context.Context, in *sdk_ws.GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*sdk_ws.GetMaxAndMinSeqResp, error) { - out := new(sdk_ws.GetMaxAndMinSeqResp) - err := grpc.Invoke(ctx, "/msg.msg/GetMaxAndMinSeq", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) { - out := new(sdk_ws.PullMessageBySeqListResp) - err := grpc.Invoke(ctx, "/msg.msg/PullMessageBySeqList", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) { - out := new(SendMsgResp) - err := grpc.Invoke(ctx, "/msg.msg/SendMsg", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) { - out := new(sdk_ws.DelMsgListResp) - err := grpc.Invoke(ctx, "/msg.msg/DelMsgList", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) { - out := new(ClearMsgResp) - err := grpc.Invoke(ctx, "/msg.msg/ClearMsg", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) { - out := new(SetMsgMinSeqResp) - err := grpc.Invoke(ctx, "/msg.msg/SetMsgMinSeq", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetSendMsgFailedFlag(ctx context.Context, in *SetSendMsgFailedFlagReq, opts ...grpc.CallOption) (*SetSendMsgFailedFlagResp, error) { - out := new(SetSendMsgFailedFlagResp) - err := grpc.Invoke(ctx, "/msg.msg/SetSendMsgFailedFlag", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) { - out := new(GetSendMsgStatusResp) - err := grpc.Invoke(ctx, "/msg.msg/GetSendMsgStatus", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Msg service - -type MsgServer interface { - GetMaxAndMinSeq(context.Context, *sdk_ws.GetMaxAndMinSeqReq) (*sdk_ws.GetMaxAndMinSeqResp, error) - PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) - SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) - DelMsgList(context.Context, *sdk_ws.DelMsgListReq) (*sdk_ws.DelMsgListResp, error) - ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error) - SetMsgMinSeq(context.Context, *SetMsgMinSeqReq) (*SetMsgMinSeqResp, error) - SetSendMsgFailedFlag(context.Context, *SetSendMsgFailedFlagReq) (*SetSendMsgFailedFlagResp, error) - GetSendMsgStatus(context.Context, *GetSendMsgStatusReq) (*GetSendMsgStatusResp, error) -} - -func RegisterMsgServer(s *grpc.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdk_ws.GetMaxAndMinSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetMaxAndMinSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/GetMaxAndMinSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetMaxAndMinSeq(ctx, req.(*sdk_ws.GetMaxAndMinSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdk_ws.PullMessageBySeqListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).PullMessageBySeqList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/PullMessageBySeqList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).PullMessageBySeqList(ctx, req.(*sdk_ws.PullMessageBySeqListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SendMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/SendMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SendMsg(ctx, req.(*SendMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DelMsgList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdk_ws.DelMsgListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DelMsgList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/DelMsgList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DelMsgList(ctx, req.(*sdk_ws.DelMsgListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClearMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClearMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/ClearMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClearMsg(ctx, req.(*ClearMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetMsgMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetMsgMinSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetMsgMinSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/SetMsgMinSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetMsgMinSeq(ctx, req.(*SetMsgMinSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetSendMsgFailedFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetSendMsgFailedFlagReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetSendMsgFailedFlag(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/SetSendMsgFailedFlag", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetSendMsgFailedFlag(ctx, req.(*SetSendMsgFailedFlagReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_GetSendMsgStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSendMsgStatusReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetSendMsgStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/msg.msg/GetSendMsgStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetSendMsgStatus(ctx, req.(*GetSendMsgStatusReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "msg.msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetMaxAndMinSeq", - Handler: _Msg_GetMaxAndMinSeq_Handler, - }, - { - MethodName: "PullMessageBySeqList", - Handler: _Msg_PullMessageBySeqList_Handler, - }, - { - MethodName: "SendMsg", - Handler: _Msg_SendMsg_Handler, - }, - { - MethodName: "DelMsgList", - Handler: _Msg_DelMsgList_Handler, - }, - { - MethodName: "ClearMsg", - Handler: _Msg_ClearMsg_Handler, - }, - { - MethodName: "SetMsgMinSeq", - Handler: _Msg_SetMsgMinSeq_Handler, - }, - { - MethodName: "SetSendMsgFailedFlag", - Handler: _Msg_SetSendMsgFailedFlag_Handler, - }, - { - MethodName: "GetSendMsgStatus", - Handler: _Msg_GetSendMsgStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "msg/msg.proto", -} - -func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_b3ce531eb8197ddf) } - -var fileDescriptor_msg_b3ce531eb8197ddf = []byte{ - // 793 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6e, 0xfb, 0x44, - 0x10, 0x96, 0x9b, 0x7f, 0xbf, 0x8c, 0x5b, 0x25, 0x2c, 0xa1, 0x18, 0xab, 0x48, 0xa9, 0x05, 0x28, - 0x02, 0x94, 0x48, 0x01, 0x89, 0x43, 0x2f, 0x90, 0xa6, 0xad, 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 0x54, 0x27, 0x21, 0xb2, 0x5f, 0xea, 0xf2, 0xef, 0xd2, 0x37, 0xff, 0x06, 0x00, 0x00, 0xff, - 0xff, 0x01, 0x7d, 0x7b, 0xe8, 0x67, 0x09, 0x00, 0x00, -} diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index 1557f38b5..b2ea4fbbc 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -120,12 +120,22 @@ message GetSendMsgStatusResp{ string errMsg = 2; int32 status = 3; } - +message DelSuperGroupMsgReq{ + string opUserID = 1; + string userID = 2; + string groupID = 3; + string operationID = 4; +} +message DelSuperGroupMsgResp{ + int32 errCode = 1; + string errMsg = 2; +} service msg { rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp); rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); rpc SendMsg(SendMsgReq) returns(SendMsgResp); rpc DelMsgList(server_api_params.DelMsgListReq) returns(server_api_params.DelMsgListResp); + rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp); rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp); rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp); rpc SetSendMsgFailedFlag(SetSendMsgFailedFlagReq) returns(SetSendMsgFailedFlagResp); From 6d15e5b5a10f28a39d154bd153432b0c6e027fe3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 29 Jul 2022 13:05:51 +0800 Subject: [PATCH 10/10] msg --- internal/rpc/msg/chat.go | 2 +- pkg/common/db/RedisModel.go | 2 +- pkg/proto/msg/msg.pb.go | 1410 +++++++++++++++++++++++++++++++++++ 3 files changed, 1412 insertions(+), 2 deletions(-) create mode 100644 pkg/proto/msg/msg.pb.go diff --git a/internal/rpc/msg/chat.go b/internal/rpc/msg/chat.go index a525dab09..1d403e3a4 100644 --- a/internal/rpc/msg/chat.go +++ b/internal/rpc/msg/chat.go @@ -53,7 +53,7 @@ func (rpc *rpcChat) SetMsgMinSeq(_ context.Context, req *pbChat.SetMsgMinSeqReq) } return &pbChat.SetMsgMinSeqResp{}, nil } - err := db.DB.SetGroupUserMinSeq(req.GroupID, req.UserID, req.MinSeq) + err := db.DB.SetGroupUserMinSeq(req.GroupID, req.UserID, uint64(req.MinSeq)) if err != nil { errMsg := "SetGroupUserMinSeq failed " + err.Error() + req.OperationID + req.GroupID + req.UserID + utils.Uint32ToString(req.MinSeq) log.Error(req.OperationID, errMsg) diff --git a/pkg/common/db/RedisModel.go b/pkg/common/db/RedisModel.go index 163202270..2ef11d59b 100644 --- a/pkg/common/db/RedisModel.go +++ b/pkg/common/db/RedisModel.go @@ -88,7 +88,7 @@ func (d *DataBases) GetUserMinSeq(uid string) (uint64, error) { return uint64(utils.StringToInt(seq)), err } -func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint32) (err error) { +func (d *DataBases) SetGroupUserMinSeq(groupID, userID string, minSeq uint64) (err error) { key := groupUserMinSeq + "g:" + groupID + "u:" + userID return d.RDB.Set(context.Background(), key, minSeq, 0).Err() } diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go new file mode 100644 index 000000000..38616ae68 --- /dev/null +++ b/pkg/proto/msg/msg.pb.go @@ -0,0 +1,1410 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: msg/msg.proto + +package msg // import "./msg" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type MsgDataToMQ struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } +func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToMQ) ProtoMessage() {} +func (*MsgDataToMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{0} +} +func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) +} +func (m *MsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToMQ.Marshal(b, m, deterministic) +} +func (dst *MsgDataToMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToMQ.Merge(dst, src) +} +func (m *MsgDataToMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToMQ.Size(m) +} +func (m *MsgDataToMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToMQ proto.InternalMessageInfo + +func (m *MsgDataToMQ) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *MsgDataToMQ) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *MsgDataToMQ) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type MsgDataToDB struct { + MsgData *sdk_ws.MsgData `protobuf:"bytes,1,opt,name=msgData" json:"msgData,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } +func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } +func (*MsgDataToDB) ProtoMessage() {} +func (*MsgDataToDB) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{1} +} +func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) +} +func (m *MsgDataToDB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToDB.Marshal(b, m, deterministic) +} +func (dst *MsgDataToDB) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToDB.Merge(dst, src) +} +func (m *MsgDataToDB) XXX_Size() int { + return xxx_messageInfo_MsgDataToDB.Size(m) +} +func (m *MsgDataToDB) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToDB.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToDB proto.InternalMessageInfo + +func (m *MsgDataToDB) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +func (m *MsgDataToDB) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type PushMsgDataToMQ struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` + PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID" json:"pushToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } +func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } +func (*PushMsgDataToMQ) ProtoMessage() {} +func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{2} +} +func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) +} +func (m *PushMsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PushMsgDataToMQ.Marshal(b, m, deterministic) +} +func (dst *PushMsgDataToMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushMsgDataToMQ.Merge(dst, src) +} +func (m *PushMsgDataToMQ) XXX_Size() int { + return xxx_messageInfo_PushMsgDataToMQ.Size(m) +} +func (m *PushMsgDataToMQ) XXX_DiscardUnknown() { + xxx_messageInfo_PushMsgDataToMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_PushMsgDataToMQ proto.InternalMessageInfo + +func (m *PushMsgDataToMQ) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *PushMsgDataToMQ) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +func (m *PushMsgDataToMQ) GetPushToUserID() string { + if m != nil { + return m.PushToUserID + } + return "" +} + +type MsgDataToMongoByMQ struct { + LastSeq uint64 `protobuf:"varint,1,opt,name=lastSeq" json:"lastSeq,omitempty"` + AggregationID string `protobuf:"bytes,2,opt,name=aggregationID" json:"aggregationID,omitempty"` + MessageList []*MsgDataToMQ `protobuf:"bytes,3,rep,name=messageList" json:"messageList,omitempty"` + TriggerID string `protobuf:"bytes,4,opt,name=triggerID" json:"triggerID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToMongoByMQ) Reset() { *m = MsgDataToMongoByMQ{} } +func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToMongoByMQ) ProtoMessage() {} +func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{3} +} +func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b) +} +func (m *MsgDataToMongoByMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToMongoByMQ.Marshal(b, m, deterministic) +} +func (dst *MsgDataToMongoByMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToMongoByMQ.Merge(dst, src) +} +func (m *MsgDataToMongoByMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToMongoByMQ.Size(m) +} +func (m *MsgDataToMongoByMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToMongoByMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToMongoByMQ proto.InternalMessageInfo + +func (m *MsgDataToMongoByMQ) GetLastSeq() uint64 { + if m != nil { + return m.LastSeq + } + return 0 +} + +func (m *MsgDataToMongoByMQ) GetAggregationID() string { + if m != nil { + return m.AggregationID + } + return "" +} + +func (m *MsgDataToMongoByMQ) GetMessageList() []*MsgDataToMQ { + if m != nil { + return m.MessageList + } + return nil +} + +func (m *MsgDataToMongoByMQ) GetTriggerID() string { + if m != nil { + return m.TriggerID + } + return "" +} + +// message PullMessageReq { +// string UserID = 1; +// int64 SeqBegin = 2; +// int64 SeqEnd = 3; +// string OperationID = 4; +// } +// +// message PullMessageResp { +// int32 ErrCode = 1; +// string ErrMsg = 2; +// int64 MaxSeq = 3; +// int64 MinSeq = 4; +// repeated GatherFormat SingleUserMsg = 5; +// repeated GatherFormat GroupUserMsg = 6; +// } +// message PullMessageBySeqListReq{ +// string UserID = 1; +// string OperationID = 2; +// repeated int64 seqList =3; +// } +type GetMaxAndMinSeqReq struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } +func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } +func (*GetMaxAndMinSeqReq) ProtoMessage() {} +func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{4} +} +func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src) +} +func (m *GetMaxAndMinSeqReq) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m) +} +func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GetMaxAndMinSeqReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetMaxAndMinSeqResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + MaxSeq uint32 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } +func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } +func (*GetMaxAndMinSeqResp) ProtoMessage() {} +func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{5} +} +func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src) +} +func (m *GetMaxAndMinSeqResp) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m) +} +func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { + if m != nil { + return m.MinSeq + } + return 0 +} + +type SendMsgReq struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } +func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } +func (*SendMsgReq) ProtoMessage() {} +func (*SendMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{6} +} +func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) +} +func (m *SendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendMsgReq.Marshal(b, m, deterministic) +} +func (dst *SendMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendMsgReq.Merge(dst, src) +} +func (m *SendMsgReq) XXX_Size() int { + return xxx_messageInfo_SendMsgReq.Size(m) +} +func (m *SendMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_SendMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SendMsgReq proto.InternalMessageInfo + +func (m *SendMsgReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *SendMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SendMsgReq) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type SendMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ServerMsgID string `protobuf:"bytes,4,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,5,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + SendTime int64 `protobuf:"varint,6,opt,name=sendTime" json:"sendTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } +func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } +func (*SendMsgResp) ProtoMessage() {} +func (*SendMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{7} +} +func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) +} +func (m *SendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendMsgResp.Marshal(b, m, deterministic) +} +func (dst *SendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendMsgResp.Merge(dst, src) +} +func (m *SendMsgResp) XXX_Size() int { + return xxx_messageInfo_SendMsgResp.Size(m) +} +func (m *SendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_SendMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SendMsgResp proto.InternalMessageInfo + +func (m *SendMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SendMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *SendMsgResp) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *SendMsgResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *SendMsgResp) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +type ClearMsgReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClearMsgReq) Reset() { *m = ClearMsgReq{} } +func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) } +func (*ClearMsgReq) ProtoMessage() {} +func (*ClearMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{8} +} +func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b) +} +func (m *ClearMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClearMsgReq.Marshal(b, m, deterministic) +} +func (dst *ClearMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClearMsgReq.Merge(dst, src) +} +func (m *ClearMsgReq) XXX_Size() int { + return xxx_messageInfo_ClearMsgReq.Size(m) +} +func (m *ClearMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_ClearMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_ClearMsgReq proto.InternalMessageInfo + +func (m *ClearMsgReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *ClearMsgReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *ClearMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type ClearMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClearMsgResp) Reset() { *m = ClearMsgResp{} } +func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) } +func (*ClearMsgResp) ProtoMessage() {} +func (*ClearMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{9} +} +func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b) +} +func (m *ClearMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClearMsgResp.Marshal(b, m, deterministic) +} +func (dst *ClearMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClearMsgResp.Merge(dst, src) +} +func (m *ClearMsgResp) XXX_Size() int { + return xxx_messageInfo_ClearMsgResp.Size(m) +} +func (m *ClearMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_ClearMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_ClearMsgResp proto.InternalMessageInfo + +func (m *ClearMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *ClearMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type SetMsgMinSeqReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` + MinSeq uint32 `protobuf:"varint,3,opt,name=minSeq" json:"minSeq,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=opUserID" json:"opUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetMsgMinSeqReq) Reset() { *m = SetMsgMinSeqReq{} } +func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) } +func (*SetMsgMinSeqReq) ProtoMessage() {} +func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{10} +} +func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b) +} +func (m *SetMsgMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetMsgMinSeqReq.Marshal(b, m, deterministic) +} +func (dst *SetMsgMinSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetMsgMinSeqReq.Merge(dst, src) +} +func (m *SetMsgMinSeqReq) XXX_Size() int { + return xxx_messageInfo_SetMsgMinSeqReq.Size(m) +} +func (m *SetMsgMinSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetMsgMinSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetMsgMinSeqReq proto.InternalMessageInfo + +func (m *SetMsgMinSeqReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *SetMsgMinSeqReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *SetMsgMinSeqReq) GetMinSeq() uint32 { + if m != nil { + return m.MinSeq + } + return 0 +} + +func (m *SetMsgMinSeqReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SetMsgMinSeqReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +type SetMsgMinSeqResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetMsgMinSeqResp) Reset() { *m = SetMsgMinSeqResp{} } +func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) } +func (*SetMsgMinSeqResp) ProtoMessage() {} +func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{11} +} +func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b) +} +func (m *SetMsgMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetMsgMinSeqResp.Marshal(b, m, deterministic) +} +func (dst *SetMsgMinSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetMsgMinSeqResp.Merge(dst, src) +} +func (m *SetMsgMinSeqResp) XXX_Size() int { + return xxx_messageInfo_SetMsgMinSeqResp.Size(m) +} +func (m *SetMsgMinSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetMsgMinSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetMsgMinSeqResp proto.InternalMessageInfo + +func (m *SetMsgMinSeqResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetMsgMinSeqResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type SetSendMsgFailedFlagReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetSendMsgFailedFlagReq) Reset() { *m = SetSendMsgFailedFlagReq{} } +func (m *SetSendMsgFailedFlagReq) String() string { return proto.CompactTextString(m) } +func (*SetSendMsgFailedFlagReq) ProtoMessage() {} +func (*SetSendMsgFailedFlagReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{12} +} +func (m *SetSendMsgFailedFlagReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetSendMsgFailedFlagReq.Unmarshal(m, b) +} +func (m *SetSendMsgFailedFlagReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetSendMsgFailedFlagReq.Marshal(b, m, deterministic) +} +func (dst *SetSendMsgFailedFlagReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetSendMsgFailedFlagReq.Merge(dst, src) +} +func (m *SetSendMsgFailedFlagReq) XXX_Size() int { + return xxx_messageInfo_SetSendMsgFailedFlagReq.Size(m) +} +func (m *SetSendMsgFailedFlagReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetSendMsgFailedFlagReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetSendMsgFailedFlagReq proto.InternalMessageInfo + +func (m *SetSendMsgFailedFlagReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type SetSendMsgFailedFlagResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetSendMsgFailedFlagResp) Reset() { *m = SetSendMsgFailedFlagResp{} } +func (m *SetSendMsgFailedFlagResp) String() string { return proto.CompactTextString(m) } +func (*SetSendMsgFailedFlagResp) ProtoMessage() {} +func (*SetSendMsgFailedFlagResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{13} +} +func (m *SetSendMsgFailedFlagResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetSendMsgFailedFlagResp.Unmarshal(m, b) +} +func (m *SetSendMsgFailedFlagResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetSendMsgFailedFlagResp.Marshal(b, m, deterministic) +} +func (dst *SetSendMsgFailedFlagResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetSendMsgFailedFlagResp.Merge(dst, src) +} +func (m *SetSendMsgFailedFlagResp) XXX_Size() int { + return xxx_messageInfo_SetSendMsgFailedFlagResp.Size(m) +} +func (m *SetSendMsgFailedFlagResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetSendMsgFailedFlagResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetSendMsgFailedFlagResp proto.InternalMessageInfo + +func (m *SetSendMsgFailedFlagResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetSendMsgFailedFlagResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type GetSendMsgStatusReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSendMsgStatusReq) Reset() { *m = GetSendMsgStatusReq{} } +func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } +func (*GetSendMsgStatusReq) ProtoMessage() {} +func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{14} +} +func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b) +} +func (m *GetSendMsgStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSendMsgStatusReq.Marshal(b, m, deterministic) +} +func (dst *GetSendMsgStatusReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSendMsgStatusReq.Merge(dst, src) +} +func (m *GetSendMsgStatusReq) XXX_Size() int { + return xxx_messageInfo_GetSendMsgStatusReq.Size(m) +} +func (m *GetSendMsgStatusReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetSendMsgStatusReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSendMsgStatusReq proto.InternalMessageInfo + +func (m *GetSendMsgStatusReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetSendMsgStatusResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSendMsgStatusResp) Reset() { *m = GetSendMsgStatusResp{} } +func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } +func (*GetSendMsgStatusResp) ProtoMessage() {} +func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{15} +} +func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b) +} +func (m *GetSendMsgStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSendMsgStatusResp.Marshal(b, m, deterministic) +} +func (dst *GetSendMsgStatusResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSendMsgStatusResp.Merge(dst, src) +} +func (m *GetSendMsgStatusResp) XXX_Size() int { + return xxx_messageInfo_GetSendMsgStatusResp.Size(m) +} +func (m *GetSendMsgStatusResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetSendMsgStatusResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSendMsgStatusResp proto.InternalMessageInfo + +func (m *GetSendMsgStatusResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetSendMsgStatusResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetSendMsgStatusResp) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +type DelSuperGroupMsgReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelSuperGroupMsgReq) Reset() { *m = DelSuperGroupMsgReq{} } +func (m *DelSuperGroupMsgReq) String() string { return proto.CompactTextString(m) } +func (*DelSuperGroupMsgReq) ProtoMessage() {} +func (*DelSuperGroupMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{16} +} +func (m *DelSuperGroupMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelSuperGroupMsgReq.Unmarshal(m, b) +} +func (m *DelSuperGroupMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelSuperGroupMsgReq.Marshal(b, m, deterministic) +} +func (dst *DelSuperGroupMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelSuperGroupMsgReq.Merge(dst, src) +} +func (m *DelSuperGroupMsgReq) XXX_Size() int { + return xxx_messageInfo_DelSuperGroupMsgReq.Size(m) +} +func (m *DelSuperGroupMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_DelSuperGroupMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DelSuperGroupMsgReq proto.InternalMessageInfo + +func (m *DelSuperGroupMsgReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *DelSuperGroupMsgReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *DelSuperGroupMsgReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *DelSuperGroupMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type DelSuperGroupMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelSuperGroupMsgResp) Reset() { *m = DelSuperGroupMsgResp{} } +func (m *DelSuperGroupMsgResp) String() string { return proto.CompactTextString(m) } +func (*DelSuperGroupMsgResp) ProtoMessage() {} +func (*DelSuperGroupMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_110411abaacf415d, []int{17} +} +func (m *DelSuperGroupMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelSuperGroupMsgResp.Unmarshal(m, b) +} +func (m *DelSuperGroupMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelSuperGroupMsgResp.Marshal(b, m, deterministic) +} +func (dst *DelSuperGroupMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelSuperGroupMsgResp.Merge(dst, src) +} +func (m *DelSuperGroupMsgResp) XXX_Size() int { + return xxx_messageInfo_DelSuperGroupMsgResp.Size(m) +} +func (m *DelSuperGroupMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_DelSuperGroupMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DelSuperGroupMsgResp proto.InternalMessageInfo + +func (m *DelSuperGroupMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *DelSuperGroupMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func init() { + proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ") + proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB") + proto.RegisterType((*PushMsgDataToMQ)(nil), "msg.PushMsgDataToMQ") + proto.RegisterType((*MsgDataToMongoByMQ)(nil), "msg.MsgDataToMongoByMQ") + proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "msg.GetMaxAndMinSeqReq") + proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "msg.GetMaxAndMinSeqResp") + proto.RegisterType((*SendMsgReq)(nil), "msg.SendMsgReq") + proto.RegisterType((*SendMsgResp)(nil), "msg.SendMsgResp") + proto.RegisterType((*ClearMsgReq)(nil), "msg.ClearMsgReq") + proto.RegisterType((*ClearMsgResp)(nil), "msg.ClearMsgResp") + proto.RegisterType((*SetMsgMinSeqReq)(nil), "msg.SetMsgMinSeqReq") + proto.RegisterType((*SetMsgMinSeqResp)(nil), "msg.SetMsgMinSeqResp") + proto.RegisterType((*SetSendMsgFailedFlagReq)(nil), "msg.SetSendMsgFailedFlagReq") + proto.RegisterType((*SetSendMsgFailedFlagResp)(nil), "msg.SetSendMsgFailedFlagResp") + proto.RegisterType((*GetSendMsgStatusReq)(nil), "msg.GetSendMsgStatusReq") + proto.RegisterType((*GetSendMsgStatusResp)(nil), "msg.GetSendMsgStatusResp") + proto.RegisterType((*DelSuperGroupMsgReq)(nil), "msg.DelSuperGroupMsgReq") + proto.RegisterType((*DelSuperGroupMsgResp)(nil), "msg.DelSuperGroupMsgResp") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Msg service + +type MsgClient interface { + GetMaxAndMinSeq(ctx context.Context, in *sdk_ws.GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*sdk_ws.GetMaxAndMinSeqResp, error) + PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) + SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) + DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) + DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) + ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) + SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) + SetSendMsgFailedFlag(ctx context.Context, in *SetSendMsgFailedFlagReq, opts ...grpc.CallOption) (*SetSendMsgFailedFlagResp, error) + GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) +} + +type msgClient struct { + cc *grpc.ClientConn +} + +func NewMsgClient(cc *grpc.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) GetMaxAndMinSeq(ctx context.Context, in *sdk_ws.GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*sdk_ws.GetMaxAndMinSeqResp, error) { + out := new(sdk_ws.GetMaxAndMinSeqResp) + err := grpc.Invoke(ctx, "/msg.msg/GetMaxAndMinSeq", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) { + out := new(sdk_ws.PullMessageBySeqListResp) + err := grpc.Invoke(ctx, "/msg.msg/PullMessageBySeqList", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) { + out := new(SendMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/SendMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) { + out := new(sdk_ws.DelMsgListResp) + err := grpc.Invoke(ctx, "/msg.msg/DelMsgList", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) { + out := new(DelSuperGroupMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/DelSuperGroupMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) { + out := new(ClearMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/ClearMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) { + out := new(SetMsgMinSeqResp) + err := grpc.Invoke(ctx, "/msg.msg/SetMsgMinSeq", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetSendMsgFailedFlag(ctx context.Context, in *SetSendMsgFailedFlagReq, opts ...grpc.CallOption) (*SetSendMsgFailedFlagResp, error) { + out := new(SetSendMsgFailedFlagResp) + err := grpc.Invoke(ctx, "/msg.msg/SetSendMsgFailedFlag", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) { + out := new(GetSendMsgStatusResp) + err := grpc.Invoke(ctx, "/msg.msg/GetSendMsgStatus", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Msg service + +type MsgServer interface { + GetMaxAndMinSeq(context.Context, *sdk_ws.GetMaxAndMinSeqReq) (*sdk_ws.GetMaxAndMinSeqResp, error) + PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) + SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) + DelMsgList(context.Context, *sdk_ws.DelMsgListReq) (*sdk_ws.DelMsgListResp, error) + DelSuperGroupMsg(context.Context, *DelSuperGroupMsgReq) (*DelSuperGroupMsgResp, error) + ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error) + SetMsgMinSeq(context.Context, *SetMsgMinSeqReq) (*SetMsgMinSeqResp, error) + SetSendMsgFailedFlag(context.Context, *SetSendMsgFailedFlagReq) (*SetSendMsgFailedFlagResp, error) + GetSendMsgStatus(context.Context, *GetSendMsgStatusReq) (*GetSendMsgStatusResp, error) +} + +func RegisterMsgServer(s *grpc.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sdk_ws.GetMaxAndMinSeqReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GetMaxAndMinSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/GetMaxAndMinSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GetMaxAndMinSeq(ctx, req.(*sdk_ws.GetMaxAndMinSeqReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sdk_ws.PullMessageBySeqListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PullMessageBySeqList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/PullMessageBySeqList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PullMessageBySeqList(ctx, req.(*sdk_ws.PullMessageBySeqListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SendMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/SendMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SendMsg(ctx, req.(*SendMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelMsgList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sdk_ws.DelMsgListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelMsgList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/DelMsgList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelMsgList(ctx, req.(*sdk_ws.DelMsgListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelSuperGroupMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelSuperGroupMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelSuperGroupMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/DelSuperGroupMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelSuperGroupMsg(ctx, req.(*DelSuperGroupMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ClearMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClearMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClearMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/ClearMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClearMsg(ctx, req.(*ClearMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetMsgMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetMsgMinSeqReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetMsgMinSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/SetMsgMinSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetMsgMinSeq(ctx, req.(*SetMsgMinSeqReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetSendMsgFailedFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetSendMsgFailedFlagReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetSendMsgFailedFlag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/SetSendMsgFailedFlag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetSendMsgFailedFlag(ctx, req.(*SetSendMsgFailedFlagReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GetSendMsgStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSendMsgStatusReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GetSendMsgStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/GetSendMsgStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GetSendMsgStatus(ctx, req.(*GetSendMsgStatusReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "msg.msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMaxAndMinSeq", + Handler: _Msg_GetMaxAndMinSeq_Handler, + }, + { + MethodName: "PullMessageBySeqList", + Handler: _Msg_PullMessageBySeqList_Handler, + }, + { + MethodName: "SendMsg", + Handler: _Msg_SendMsg_Handler, + }, + { + MethodName: "DelMsgList", + Handler: _Msg_DelMsgList_Handler, + }, + { + MethodName: "DelSuperGroupMsg", + Handler: _Msg_DelSuperGroupMsg_Handler, + }, + { + MethodName: "ClearMsg", + Handler: _Msg_ClearMsg_Handler, + }, + { + MethodName: "SetMsgMinSeq", + Handler: _Msg_SetMsgMinSeq_Handler, + }, + { + MethodName: "SetSendMsgFailedFlag", + Handler: _Msg_SetSendMsgFailedFlag_Handler, + }, + { + MethodName: "GetSendMsgStatus", + Handler: _Msg_GetSendMsgStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "msg/msg.proto", +} + +func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_110411abaacf415d) } + +var fileDescriptor_msg_110411abaacf415d = []byte{ + // 850 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x55, + 0x10, 0xd7, 0xc6, 0xb1, 0xd3, 0xcc, 0x26, 0xb2, 0x79, 0x35, 0x61, 0x59, 0x15, 0xc9, 0x5d, 0x01, + 0xb2, 0x00, 0xd9, 0x92, 0x41, 0xe2, 0x90, 0x0b, 0xb8, 0x6e, 0x43, 0xa4, 0x2e, 0x6d, 0x76, 0xc3, + 0x85, 0x8b, 0xbb, 0xd4, 0x4f, 0xaf, 0xab, 0xec, 0xc7, 0xf3, 0xce, 0x9a, 0xb4, 0x70, 0xe6, 0xc8, + 0x1f, 0xc0, 0x89, 0x1b, 0x47, 0xfe, 0x46, 0xf4, 0x3e, 0x6c, 0xef, 0x57, 0x88, 0xe5, 0x43, 0x8f, + 0x33, 0x3b, 0x6f, 0xe6, 0xf7, 0x9b, 0xf9, 0xbd, 0x79, 0x0b, 0xa7, 0x31, 0xb2, 0x71, 0x8c, 0x6c, + 0xc4, 0xb3, 0x34, 0x4f, 0x49, 0x2b, 0x46, 0x66, 0x3f, 0x7e, 0xc1, 0x69, 0x32, 0xbf, 0x74, 0xc7, + 0xfc, 0x86, 0x8d, 0xa5, 0x7f, 0x8c, 0x8b, 0x9b, 0xf9, 0x2d, 0x8e, 0x6f, 0x51, 0xc5, 0x39, 0xbf, + 0x83, 0xe9, 0x22, 0x9b, 0x05, 0x79, 0x70, 0x9d, 0xba, 0x57, 0xa4, 0x0f, 0xed, 0x3c, 0xbd, 0xa1, + 0x89, 0x65, 0x0c, 0x8c, 0xe1, 0xb1, 0xa7, 0x0c, 0x32, 0x00, 0x33, 0xe5, 0x34, 0x0b, 0xf2, 0x30, + 0x4d, 0x2e, 0x67, 0xd6, 0x81, 0xfc, 0x56, 0x74, 0x91, 0x6f, 0xe0, 0x28, 0x56, 0x69, 0xac, 0xd6, + 0xc0, 0x18, 0x9a, 0x13, 0x7b, 0x84, 0x34, 0xfb, 0x95, 0x66, 0xf3, 0x80, 0x87, 0x73, 0x1e, 0x64, + 0x41, 0x8c, 0x23, 0x5d, 0xc8, 0x5b, 0x87, 0x3a, 0xb4, 0x50, 0x7c, 0x36, 0x2d, 0x26, 0x31, 0x76, + 0x4e, 0x72, 0x3f, 0x38, 0xe7, 0x4f, 0x03, 0xba, 0x2f, 0x57, 0xf8, 0xa6, 0x48, 0x74, 0x00, 0xe6, + 0x8b, 0xc2, 0x29, 0x45, 0xb7, 0xe8, 0x2a, 0xa2, 0x39, 0xd8, 0x1d, 0x8d, 0x03, 0x27, 0x7c, 0x85, + 0x6f, 0xae, 0xd3, 0x9f, 0x90, 0x66, 0x97, 0x33, 0xd9, 0x8d, 0x63, 0xaf, 0xe4, 0x73, 0xfe, 0x31, + 0x80, 0x6c, 0xb1, 0xa4, 0x09, 0x4b, 0xa7, 0xef, 0xdc, 0x2b, 0x62, 0xc1, 0x51, 0x14, 0x60, 0xee, + 0xd3, 0xa5, 0x84, 0x73, 0xe8, 0xad, 0x4d, 0xf2, 0x29, 0x9c, 0x06, 0x8c, 0x65, 0x94, 0x95, 0x49, + 0x96, 0x9d, 0x64, 0x02, 0x66, 0x4c, 0x11, 0x03, 0x46, 0x9f, 0x87, 0x98, 0x5b, 0xad, 0x41, 0x6b, + 0x68, 0x4e, 0x7a, 0x23, 0xa1, 0x89, 0x02, 0x73, 0xaf, 0x18, 0x44, 0x1e, 0xc1, 0x71, 0x9e, 0x85, + 0x8c, 0x49, 0xac, 0x87, 0x32, 0xeb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