From fb5ea3be847205bb6b96b0b4eb215f75aa9e6083 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 10:47:07 +0800 Subject: [PATCH] proto file --- pkg/proto/chat/chat.proto | 47 +++++++++---------------------------- pkg/proto/push/push.proto | 18 ++------------ pkg/proto/relay/relay.proto | 22 ++++------------- 3 files changed, 18 insertions(+), 69 deletions(-) diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 0f5638bd9..7dc88d9c4 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -1,48 +1,23 @@ syntax = "proto3"; import "Open_IM/pkg/proto/sdk_ws/ws.proto"; package pbChat;//The package name to which the proto file belongs -//option go_package = ".;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat +option go_package = "./msg;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat -message WSToMsgSvrChatMsg{ - string SendID = 1; - string RecvID = 2; - string Content = 3; - int64 SendTime = 4; - int32 MsgFrom = 5; - string SenderNickName = 6; - string SenderFaceURL = 7; - int32 ContentType = 8; - int32 SessionType = 9; - string OperationID = 10; - string MsgID = 11; - string Token = 12; - string OfflineInfo =13; - string Options = 14; - int32 PlatformID =15; - repeated string ForceList = 16; - string ClientMsgID = 17; +message MsgDataToMQ{ + string token =1; + string operationID = 2; + open_im_sdk.MsgData msgData = 3; } -message MsgSvrToPushSvrChatMsg { - string SendID = 1; - string RecvID = 2; - string Content = 3; - int64 RecvSeq = 4; - int64 SendTime = 5; - int32 MsgFrom = 6; - string SenderNickName = 7; - string SenderFaceURL = 8; - int32 ContentType = 9; - int32 SessionType = 10; - string OperationID = 11; - string MsgID = 12; - string OfflineInfo = 13; - string Options =14; - int32 PlatformID =15; - string ClientMsgID = 16; +message MsgDataToDB { + open_im_sdk.MsgData msgData = 1; } +message PushMsgDataToMQ{ + string OperationID = 1; + open_im_sdk.MsgData msgData = 2; +} message PullMessageReq { string UserID = 1; diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index 60fddfe3b..1116c3e05 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -3,22 +3,8 @@ option go_package = "./push;pbPush"; package push; message PushMsgReq { - string SendID = 1; - string RecvID = 2; - string Content = 3; - int64 RecvSeq = 4; - int64 SendTime = 5; - int32 MsgFrom = 6; - int32 ContentType = 7; - int32 SessionType = 8; - string OperationID = 9; - string MsgID = 10; - string OfflineInfo = 11; - string Options =12; - int32 PlatformID =13; - string SenderNickName = 14; - string SenderFaceURL = 15; - string ClientMsgID = 16; + string operationID = 1; + open_im_sdk.MsgData msgData = 2; } message PushMsgResp{ int32 ResultCode = 1; diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index 704c323ce..0cbfcd0e1 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -2,23 +2,11 @@ syntax = "proto3"; option go_package = "./relay;pbRelay"; package relay; -message MsgToUserReq { - string SendID = 1; - string RecvID = 2; - string Content = 5; - int64 RecvSeq = 6; - int64 SendTime = 7; - int32 MsgFrom = 8; - int32 ContentType = 9; - int32 SessionType = 10; - string OperationID = 11; - string ServerMsgID = 12; - int32 PlatformID = 13; - string SenderNickName = 14; - string SenderFaceURL = 15; - string ClientMsgID = 16; +message OnlinePushMsgReq { + string OperationID = 1; + open_im_sdk.MsgData msgData = 2; } -message MsgToUserResp{ +message OnlinePushMsgResp{ repeated SingleMsgToUser resp = 1; }//message SendMsgByWSReq{ // string SendID = 1; @@ -63,7 +51,7 @@ message GetUsersOnlineStatusResp{ } } service OnlineMessageRelayService { - rpc MsgToUser(MsgToUserReq) returns(MsgToUserResp); + rpc OnlinePushMsg(OnlinePushMsgReq) returns(OnlinePushMsgResp); rpc GetUsersOnlineStatus(GetUsersOnlineStatusReq)returns(GetUsersOnlineStatusResp); // rpc SendMsgByWS(SendMsgByWSReq) returns(MsgToUserResp); }