Files
open-im-server/pkg/proto/chat/chat.proto
T

109 lines
2.6 KiB
Protocol Buffer
Raw Normal View History

2021-05-26 19:19:41 +08:00
syntax = "proto3";
2021-12-21 21:40:50 +08:00
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
2021-08-06 14:56:41 +08:00
package pbChat;//The package name to which the proto file belongs
2021-12-22 10:50:03 +08:00
option go_package = "./chat;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat
2021-05-26 19:19:41 +08:00
2021-12-22 10:47:07 +08:00
message MsgDataToMQ{
string token =1;
string operationID = 2;
open_im_sdk.MsgData msgData = 3;
2021-05-26 19:19:41 +08:00
}
2021-06-28 15:33:26 +08:00
2021-12-22 10:47:07 +08:00
message MsgDataToDB {
open_im_sdk.MsgData msgData = 1;
2021-12-23 17:34:32 +08:00
string operationID = 2;
2021-07-02 14:24:33 +08:00
2021-05-26 19:19:41 +08:00
}
2021-12-22 10:47:07 +08:00
message PushMsgDataToMQ{
string OperationID = 1;
open_im_sdk.MsgData msgData = 2;
}
2021-05-26 19:19:41 +08:00
2021-12-23 17:34:32 +08:00
//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;
//}
message GetMaxAndMinSeqReq {
string UserID = 1;
string OperationID = 2;
}
message GetMaxAndMinSeqResp {
2021-05-26 19:19:41 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
int64 MaxSeq = 3;
int64 MinSeq = 4;
2021-05-26 19:19:41 +08:00
}
2021-12-23 17:34:32 +08:00
//message GatherFormat{
// // @inject_tag: json:"id"
// string ID = 1;
// // @inject_tag: json:"list"
// repeated MsgFormat List = 2;//detail msg
//}
//message MsgFormat{
// // @inject_tag: json:"sendID"
// string SendID = 1;
// // @inject_tag: json:"recvID"
// string RecvID = 2;
// // @inject_tag: json:"msgFrom"
// int32 MsgFrom = 3;
// // @inject_tag: json:"contentType"
// int32 ContentType = 4;
// // @inject_tag: json:"serverMsgID"
// string ServerMsgID = 5;
// // @inject_tag: json:"content"
// string Content = 6;
// // @inject_tag: json:"seq"
// int64 Seq = 7;
// // @inject_tag: json:"sendTime"
// int64 SendTime = 8;
// // @inject_tag: json:"senderPlatformID"
// int32 SenderPlatformID = 9;
// // @inject_tag: json:"senderNickName"
// string SenderNickName = 10;
// // @inject_tag: json:"senderFaceUrl"
// string SenderFaceURL = 11;
// // @inject_tag: json:"clientMsgID"
// string ClientMsgID = 12;
//}
2021-05-26 19:19:41 +08:00
2021-12-21 21:40:50 +08:00
message SendMsgReq {
2021-05-26 19:19:41 +08:00
2021-12-21 21:40:50 +08:00
string token =1;
string operationID = 2;
open_im_sdk.MsgData msgData = 3;
2021-05-26 19:19:41 +08:00
}
2021-12-21 21:40:50 +08:00
message SendMsgResp {
2021-12-23 17:34:32 +08:00
int32 errCode = 1;
string errMsg = 2;
string serverMsgID = 4;
string clientMsgID = 5;
int64 sendTime = 6;
2021-05-26 19:19:41 +08:00
}
service Chat {
rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp);
2021-12-23 17:34:32 +08:00
rpc PullMessage(open_im_sdk.PullMessageReq) returns(open_im_sdk.PullMessageResp);
rpc PullMessageBySeqList(open_im_sdk.PullMessageBySeqListReq) returns(open_im_sdk.PullMessageBySeqListResp);
2021-12-21 21:40:50 +08:00
rpc SendMsg(SendMsgReq) returns(SendMsgResp);
2021-05-26 19:19:41 +08:00
}