|
|
syntax = "proto3";
|
|
|
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
|
|
|
import "Open-IM-Server/pkg/proto/sdkws/wrappers.proto";
|
|
|
option go_package = "Open_IM/pkg/proto/msg;msg";
|
|
|
package msg;
|
|
|
|
|
|
message MsgDataToMQ{
|
|
|
string token =1;
|
|
|
string operationID = 2;
|
|
|
sdkws.MsgData msgData = 3;
|
|
|
}
|
|
|
|
|
|
|
|
|
message MsgDataToDB {
|
|
|
sdkws.MsgData msgData = 1;
|
|
|
string operationID = 2;
|
|
|
|
|
|
}
|
|
|
message PushMsgDataToMQ{
|
|
|
string OperationID = 1;
|
|
|
sdkws.MsgData msgData = 2;
|
|
|
string pushToUserID = 3;
|
|
|
}
|
|
|
message MsgDataToMongoByMQ{
|
|
|
uint64 lastSeq =1;
|
|
|
string aggregationID = 2;
|
|
|
repeated MsgDataToMQ messageList = 3;
|
|
|
string triggerID = 4;
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
message GetMaxAndMinSeqReq {
|
|
|
string UserID = 1;
|
|
|
string OperationID = 2;
|
|
|
}
|
|
|
message GetMaxAndMinSeqResp {
|
|
|
int32 ErrCode = 1;
|
|
|
string ErrMsg = 2;
|
|
|
uint32 MaxSeq = 3;
|
|
|
uint32 MinSeq = 4;
|
|
|
}
|
|
|
|
|
|
message SendMsgReq {
|
|
|
sdkws.MsgData msgData = 3;
|
|
|
}
|
|
|
|
|
|
message SendMsgResp {
|
|
|
string serverMsgID = 4;
|
|
|
string clientMsgID = 5;
|
|
|
int64 sendTime = 6;
|
|
|
}
|
|
|
|
|
|
|
|
|
message ClearMsgReq{
|
|
|
string userID = 1;
|
|
|
}
|
|
|
|
|
|
|
|
|
message ClearMsgResp{
|
|
|
}
|
|
|
|
|
|
message SetMsgMinSeqReq{
|
|
|
string userID = 1;
|
|
|
string groupID = 2;
|
|
|
uint32 minSeq = 3;
|
|
|
}
|
|
|
message SetMsgMinSeqResp{
|
|
|
}
|
|
|
|
|
|
message SetSendMsgStatusReq{
|
|
|
int32 status = 2;
|
|
|
}
|
|
|
|
|
|
message SetSendMsgStatusResp{
|
|
|
}
|
|
|
|
|
|
message GetSendMsgStatusReq{
|
|
|
string operationID = 1;
|
|
|
}
|
|
|
|
|
|
message GetSendMsgStatusResp{
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
int32 status = 3;
|
|
|
}
|
|
|
message DelSuperGroupMsgReq{
|
|
|
string userID = 2;
|
|
|
string groupID = 3;
|
|
|
}
|
|
|
message DelSuperGroupMsgResp{
|
|
|
}
|
|
|
message GetSuperGroupMsgReq{
|
|
|
string operationID = 1;
|
|
|
uint32 Seq = 2;
|
|
|
string groupID = 3;
|
|
|
|
|
|
}
|
|
|
message GetSuperGroupMsgResp{
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
sdkws.MsgData msgData = 3;
|
|
|
}
|
|
|
message GetWriteDiffMsgReq{
|
|
|
string operationID = 1;
|
|
|
uint32 Seq = 2;
|
|
|
|
|
|
}
|
|
|
message GetWriteDiffMsgResp{
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
sdkws.MsgData msgData = 3;
|
|
|
}
|
|
|
|
|
|
message ModifyMessageReactionExtensionsReq {
|
|
|
string operationID = 1;
|
|
|
string sourceID = 2;
|
|
|
string opUserID = 3;
|
|
|
int32 sessionType = 4;
|
|
|
map <string, sdkws.KeyValue>reactionExtensionList = 5;
|
|
|
string clientMsgID = 6;
|
|
|
google.protobuf.StringValue ex = 7;
|
|
|
google.protobuf.StringValue attachedInfo = 8;
|
|
|
bool isReact = 9;
|
|
|
bool isExternalExtensions = 10;
|
|
|
int64 msgFirstModifyTime = 11;
|
|
|
}
|
|
|
message SetMessageReactionExtensionsReq {
|
|
|
string operationID = 1;
|
|
|
string sourceID = 2;
|
|
|
string opUserID = 3;
|
|
|
int32 sessionType = 4;
|
|
|
map <string, sdkws.KeyValue>reactionExtensionList = 5;
|
|
|
string clientMsgID = 6;
|
|
|
google.protobuf.StringValue ex = 7;
|
|
|
google.protobuf.StringValue attachedInfo = 8;
|
|
|
bool isReact = 9;
|
|
|
bool isExternalExtensions = 10;
|
|
|
int64 msgFirstModifyTime = 11;
|
|
|
}
|
|
|
message SetMessageReactionExtensionsResp {
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
string clientMsgID = 3;
|
|
|
int64 msgFirstModifyTime = 4;
|
|
|
bool isReact = 5;
|
|
|
repeated KeyValueResp result = 6;
|
|
|
}
|
|
|
|
|
|
|
|
|
message GetMessageListReactionExtensionsReq {
|
|
|
string operationID = 1;
|
|
|
string opUserID = 2;
|
|
|
string sourceID = 3;
|
|
|
int32 sessionType = 4;
|
|
|
message MessageReactionKey {
|
|
|
string clientMsgID = 1;
|
|
|
int64 msgFirstModifyTime = 2;
|
|
|
}
|
|
|
repeated MessageReactionKey messageReactionKeyList = 5;
|
|
|
}
|
|
|
message GetMessageListReactionExtensionsResp{
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
repeated SingleMessageExtensionResult singleMessageResult =3;
|
|
|
|
|
|
}
|
|
|
message SingleMessageExtensionResult {
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
map <string, sdkws.KeyValue>reactionExtensionList = 3;
|
|
|
string clientMsgID = 4;
|
|
|
}
|
|
|
|
|
|
|
|
|
message ModifyMessageReactionExtensionsResp {
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
repeated ExtendMsgResp successList = 3;
|
|
|
repeated ExtendMsgResp failedList = 4;
|
|
|
}
|
|
|
|
|
|
message DeleteMessageListReactionExtensionsReq {
|
|
|
string operationID = 1;
|
|
|
string opUserID = 2;
|
|
|
string sourceID = 3;
|
|
|
int32 sessionType = 4;
|
|
|
string clientMsgID = 5;
|
|
|
bool isExternalExtensions = 6;
|
|
|
int64 msgFirstModifyTime = 7;
|
|
|
repeated sdkws.KeyValue reactionExtensionList = 8;
|
|
|
}
|
|
|
|
|
|
message DeleteMessageListReactionExtensionsResp {
|
|
|
int32 errCode = 1;
|
|
|
string errMsg = 2;
|
|
|
repeated KeyValueResp result = 6;
|
|
|
}
|
|
|
|
|
|
message ExtendMsgResp {
|
|
|
ExtendMsg extendMsg = 1;
|
|
|
int32 errCode = 2;
|
|
|
string errMsg = 3;
|
|
|
}
|
|
|
|
|
|
message ExtendMsg {
|
|
|
map <string, KeyValueResp>reactionExtensionList = 1;
|
|
|
string clientMsgID = 2;
|
|
|
int64 msgFirstModifyTime = 3;
|
|
|
string attachedInfo = 4;
|
|
|
string ex = 5;
|
|
|
}
|
|
|
|
|
|
message KeyValueResp {
|
|
|
sdkws.KeyValue keyValue = 1;
|
|
|
int32 errCode = 2;
|
|
|
string errMsg = 3;
|
|
|
}
|
|
|
|
|
|
message MsgDataToModifyByMQ{
|
|
|
string aggregationID = 1;
|
|
|
repeated MsgDataToMQ messageList = 2;
|
|
|
string triggerID = 3;
|
|
|
}
|
|
|
|
|
|
|
|
|
service msg {
|
|
|
//获取最小最大seq(包括用户的,以及指定群组的)
|
|
|
rpc GetMaxAndMinSeq(sdkws.GetMaxAndMinSeqReq) returns(sdkws.GetMaxAndMinSeqResp);
|
|
|
//拉取历史消息(包括用户的,以及指定群组的)
|
|
|
rpc PullMessageBySeqList(sdkws.PullMessageBySeqListReq) returns(sdkws.PullMessageBySeqListResp);
|
|
|
//发送消息
|
|
|
rpc SendMsg(SendMsgReq) returns(SendMsgResp);
|
|
|
//删除某人消息
|
|
|
rpc DelMsgList(sdkws.DelMsgListReq) returns(sdkws.DelMsgListResp);
|
|
|
//删除某个用户某个大群消息
|
|
|
rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp);
|
|
|
//清空某人所有消息
|
|
|
rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp);
|
|
|
|
|
|
//设置消息是否发送成功-针对api发送的消息
|
|
|
rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp);
|
|
|
//获取消息发送状态
|
|
|
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
|
|
|
|
|
|
|
|
|
|
|
|
// 修改消息
|
|
|
rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp);
|
|
|
rpc GetMessageListReactionExtensions(GetMessageListReactionExtensionsReq) returns(GetMessageListReactionExtensionsResp);
|
|
|
rpc AddMessageReactionExtensions(ModifyMessageReactionExtensionsReq) returns(ModifyMessageReactionExtensionsResp);
|
|
|
rpc DeleteMessageReactionExtensions(DeleteMessageListReactionExtensionsReq) returns(DeleteMessageListReactionExtensionsResp);
|
|
|
}
|