proto file

This commit is contained in:
Gordon 2021-12-22 10:47:07 +08:00
parent 05c15a104f
commit fb5ea3be84
3 changed files with 18 additions and 69 deletions

View File

@ -1,48 +1,23 @@
syntax = "proto3"; syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto"; import "Open_IM/pkg/proto/sdk_ws/ws.proto";
package pbChat;//The package name to which the proto file belongs 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{ message MsgDataToMQ{
string SendID = 1; string token =1;
string RecvID = 2; string operationID = 2;
string Content = 3; open_im_sdk.MsgData msgData = 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 MsgSvrToPushSvrChatMsg { message MsgDataToDB {
string SendID = 1; open_im_sdk.MsgData msgData = 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 PushMsgDataToMQ{
string OperationID = 1;
open_im_sdk.MsgData msgData = 2;
}
message PullMessageReq { message PullMessageReq {
string UserID = 1; string UserID = 1;

View File

@ -3,22 +3,8 @@ option go_package = "./push;pbPush";
package push; package push;
message PushMsgReq { message PushMsgReq {
string SendID = 1; string operationID = 1;
string RecvID = 2; open_im_sdk.MsgData msgData = 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;
} }
message PushMsgResp{ message PushMsgResp{
int32 ResultCode = 1; int32 ResultCode = 1;

View File

@ -2,23 +2,11 @@ syntax = "proto3";
option go_package = "./relay;pbRelay"; option go_package = "./relay;pbRelay";
package relay; package relay;
message MsgToUserReq { message OnlinePushMsgReq {
string SendID = 1; string OperationID = 1;
string RecvID = 2; open_im_sdk.MsgData msgData = 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 MsgToUserResp{ message OnlinePushMsgResp{
repeated SingleMsgToUser resp = 1; repeated SingleMsgToUser resp = 1;
}//message SendMsgByWSReq{ }//message SendMsgByWSReq{
// string SendID = 1; // string SendID = 1;
@ -63,7 +51,7 @@ message GetUsersOnlineStatusResp{
} }
} }
service OnlineMessageRelayService { service OnlineMessageRelayService {
rpc MsgToUser(MsgToUserReq) returns(MsgToUserResp); rpc OnlinePushMsg(OnlinePushMsgReq) returns(OnlinePushMsgResp);
rpc GetUsersOnlineStatus(GetUsersOnlineStatusReq)returns(GetUsersOnlineStatusResp); rpc GetUsersOnlineStatus(GetUsersOnlineStatusReq)returns(GetUsersOnlineStatusResp);
// rpc SendMsgByWS(SendMsgByWSReq) returns(MsgToUserResp); // rpc SendMsgByWS(SendMsgByWSReq) returns(MsgToUserResp);
} }