You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/proto/msg/msg.proto

229 lines
5.2 KiB

4 years ago
syntax = "proto3";
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
2 years ago
import "Open-IM-Server/pkg/proto/wrapperspb/wrapperspb.proto";
2 years ago
option go_package = "OpenIM/pkg/proto/msg;msg";
package OpenIMServer.msg;
3 years ago
message MsgDataToMQ{
2 years ago
string token = 1;
sdkws.MsgData msgData = 2;
4 years ago
}
3 years ago
3 years ago
message MsgDataToDB {
2 years ago
sdkws.MsgData msgData = 1;
4 years ago
}
2 years ago
3 years ago
message PushMsgDataToMQ{
2 years ago
sdkws.MsgData msgData = 1;
string sourceID = 2;
3 years ago
}
2 years ago
2 years ago
message MsgDataToMongoByMQ{
2 years ago
int64 lastSeq = 1;
2 years ago
string aggregationID = 2;
2 years ago
repeated MsgDataToMQ messages = 3;
2 years ago
string triggerID = 4;
}
4 years ago
message GetMaxAndMinSeqReq {
string UserID = 1;
}
message GetMaxAndMinSeqResp {
2 years ago
int64 MaxSeq = 1;
int64 MinSeq = 2;
4 years ago
}
3 years ago
message SendMsgReq {
sdkws.MsgData msgData = 3;
4 years ago
}
3 years ago
message SendMsgResp {
2 years ago
string serverMsgID = 1;
string clientMsgID = 2;
int64 sendTime = 3;
}
4 years ago
message ClearMsgReq{
string userID = 1;
4 years ago
}
message ClearMsgResp{
}
2 years ago
message SetMsgMinSeqReq{
string userID = 1;
string groupID = 2;
uint32 minSeq = 3;
}
message SetMsgMinSeqResp{
}
2 years ago
message SetSendMsgStatusReq{
2 years ago
int32 status = 1;
2 years ago
}
2 years ago
message SetSendMsgStatusResp{
2 years ago
}
message GetSendMsgStatusReq{
}
message GetSendMsgStatusResp{
2 years ago
int32 status = 1;
2 years ago
}
2 years ago
message DelSuperGroupMsgReq{
2 years ago
string userID = 1;
string groupID = 2;
}
2 years ago
message DelSuperGroupMsgResp{
}
2 years ago
2 years ago
message GetSuperGroupMsgReq{
int64 Seq = 1;
string groupID = 2;
2 years ago
}
message GetSuperGroupMsgResp{
2 years ago
sdkws.MsgData msgData = 1;
2 years ago
}
2 years ago
message GetWriteDiffMsgReq{
int64 Seq = 1;
}
2 years ago
message GetWriteDiffMsgResp{
2 years ago
sdkws.MsgData msgData = 2;
2 years ago
}
2 years ago
message ModifyMessageReactionExtensionsReq {
2 years ago
string sourceID = 1;
int32 sessionType = 2;
map <string, sdkws.KeyValue>reactionExtensions = 3;
string clientMsgID = 4;
2 years ago
OpenIMServer.protobuf.StringValue ex = 5;
OpenIMServer.protobuf.StringValue attachedInfo = 6;
2 years ago
bool isReact = 7;
bool isExternalExtensions = 8;
int64 msgFirstModifyTime = 9;
2 years ago
}
message SetMessageReactionExtensionsReq {
2 years ago
string sourceID = 1;
int32 sessionType = 2;
map <string, sdkws.KeyValue>reactionExtensions = 3;
string clientMsgID = 4;
2 years ago
OpenIMServer.protobuf.StringValue ex = 5;
OpenIMServer.protobuf.StringValue attachedInfo = 6;
2 years ago
bool isReact = 7;
bool isExternalExtensions = 8;
int64 msgFirstModifyTime = 9;
}
message SetMessageReactionExtensionsResp {
2 years ago
string clientMsgID = 1;
int64 msgFirstModifyTime = 2;
bool isReact = 3;
repeated KeyValueResp result = 4;
}
2 years ago
2 years ago
message GetMessagesReactionExtensionsReq {
string sourceID = 1;
int32 sessionType = 2;
message MessageReactionKey {
string clientMsgID = 1;
int64 msgFirstModifyTime = 2;
}
2 years ago
repeated MessageReactionKey messageReactionKeys = 3;
repeated string TypeKeys = 4;
}
2 years ago
message GetMessagesReactionExtensionsResp{
repeated SingleMessageExtensionResult singleMessageResult = 1;
}
message SingleMessageExtensionResult {
2 years ago
map <string, sdkws.KeyValue>reactionExtensions = 1;
string clientMsgID = 2;
}
2 years ago
message ModifyMessageReactionExtensionsResp {
2 years ago
repeated ExtendMsgResp successList = 1;
repeated ExtendMsgResp failedList = 2;
2 years ago
}
2 years ago
message DeleteMessagesReactionExtensionsReq {
2 years ago
string operationID = 1;
string opUserID = 2;
string sourceID = 3;
2 years ago
int32 sessionType = 4;
string clientMsgID = 5;
2 years ago
bool isExternalExtensions = 6;
int64 msgFirstModifyTime = 7;
2 years ago
repeated sdkws.KeyValue reactionExtensions = 8;
2 years ago
}
2 years ago
message DeleteMessagesReactionExtensionsResp {
repeated KeyValueResp result = 1;
2 years ago
}
message ExtendMsgResp {
2 years ago
ExtendMsg extendMsg = 1;
}
message ExtendMsg {
2 years ago
map <string, KeyValueResp>reactionExtensions = 1;
2 years ago
string clientMsgID = 2;
int64 msgFirstModifyTime = 3;
string attachedInfo = 4;
string ex = 5;
}
message KeyValueResp {
2 years ago
sdkws.KeyValue keyValue = 1;
2 years ago
int32 errCode = 2;
string errMsg = 3;
2 years ago
}
2 years ago
message MsgDataToModifyByMQ{
2 years ago
repeated MsgDataToMQ messages = 1;
string triggerID = 2;
2 years ago
string aggregationID = 3;
2 years ago
}
2 years ago
message DelMsgsReq{
2 years ago
string userID = 2;
2 years ago
repeated int64 seqs = 3;
2 years ago
}
2 years ago
message DelMsgsResp{
2 years ago
}
2 years ago
2 years ago
service msg {
//获取最小最大seq包括用户的以及指定群组的
2 years ago
rpc GetMaxAndMinSeq(sdkws.GetMaxAndMinSeqReq) returns(sdkws.GetMaxAndMinSeqResp);
//拉取历史消息(包括用户的,以及指定群组的)
2 years ago
rpc PullMessageBySeqs(sdkws.PullMessageBySeqsReq) returns(sdkws.PullMessageBySeqsResp);
//发送消息
3 years ago
rpc SendMsg(SendMsgReq) returns(SendMsgResp);
//删除某人消息
2 years ago
rpc DelMsgs(DelMsgsReq) returns(DelMsgsResp);
//删除某个用户某个大群消息
rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp);
//清空某人所有消息
rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp);
//设置消息是否发送成功-针对api发送的消息
2 years ago
rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp);
//获取消息发送状态
2 years ago
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
2 years ago
// 修改消息
rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp);
2 years ago
rpc GetMessagesReactionExtensions(GetMessagesReactionExtensionsReq) returns(GetMessagesReactionExtensionsResp);
2 years ago
rpc AddMessageReactionExtensions(ModifyMessageReactionExtensionsReq) returns(ModifyMessageReactionExtensionsResp);
2 years ago
rpc DeleteMessageReactionExtensions(DeleteMessagesReactionExtensionsReq) returns(DeleteMessagesReactionExtensionsResp);
4 years ago
}