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.
330 lines
8.2 KiB
330 lines
8.2 KiB
// Copyright © 2023 OpenIM. All rights reserved.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
syntax = "proto3";
|
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
|
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
|
|
option go_package = "Open_IM/pkg/proto/msg;msg";
|
|
package msg;
|
|
|
|
message MsgDataToMQ{
|
|
string token =1;
|
|
string operationID = 2;
|
|
server_api_params.MsgData msgData = 3;
|
|
}
|
|
|
|
|
|
message MsgDataToDB {
|
|
server_api_params.MsgData msgData = 1;
|
|
string operationID = 2;
|
|
|
|
}
|
|
message PushMsgDataToMQ{
|
|
string OperationID = 1;
|
|
server_api_params.MsgData msgData = 2;
|
|
string pushToUserID = 3;
|
|
}
|
|
message MsgDataToMongoByMQ{
|
|
uint64 lastSeq =1;
|
|
string aggregationID = 2;
|
|
repeated MsgDataToMQ messageList = 3;
|
|
string triggerID = 4;
|
|
|
|
|
|
}
|
|
|
|
//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 {
|
|
int32 ErrCode = 1;
|
|
string ErrMsg = 2;
|
|
uint32 MaxSeq = 3;
|
|
uint32 MinSeq = 4;
|
|
}
|
|
|
|
message SendMsgReq {
|
|
|
|
string token =1;
|
|
string operationID = 2;
|
|
server_api_params.MsgData msgData = 3;
|
|
|
|
|
|
}
|
|
|
|
message SendMsgResp {
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
string serverMsgID = 4;
|
|
string clientMsgID = 5;
|
|
int64 sendTime = 6;
|
|
string ex = 7;
|
|
}
|
|
|
|
|
|
message ClearMsgReq{
|
|
string userID = 1;
|
|
string opUserID = 2;
|
|
string operationID = 3;
|
|
}
|
|
|
|
|
|
message ClearMsgResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
}
|
|
|
|
message SetMsgMinSeqReq{
|
|
string userID = 1;
|
|
string groupID = 2;
|
|
uint32 minSeq = 3;
|
|
string operationID = 4;
|
|
string opUserID = 5;
|
|
}
|
|
message SetMsgMinSeqResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
}
|
|
|
|
message SetSendMsgStatusReq{
|
|
string operationID = 1;
|
|
int32 status = 2;
|
|
}
|
|
|
|
message SetSendMsgStatusResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
}
|
|
|
|
message GetSendMsgStatusReq{
|
|
string operationID = 1;
|
|
}
|
|
|
|
message GetSendMsgStatusResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
int32 status = 3;
|
|
}
|
|
message DelSuperGroupMsgReq{
|
|
string opUserID = 1;
|
|
string userID = 2;
|
|
string groupID = 3;
|
|
string operationID = 4;
|
|
}
|
|
message DelSuperGroupMsgResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
}
|
|
message GetSuperGroupMsgReq{
|
|
string operationID = 1;
|
|
uint32 Seq = 2;
|
|
string groupID = 3;
|
|
|
|
}
|
|
message GetSuperGroupMsgResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
server_api_params.MsgData msgData = 3;
|
|
}
|
|
message GetWriteDiffMsgReq{
|
|
string operationID = 1;
|
|
uint32 Seq = 2;
|
|
|
|
}
|
|
message GetWriteDiffMsgResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
server_api_params.MsgData msgData = 3;
|
|
}
|
|
|
|
message ModifyMessageReactionExtensionsReq {
|
|
string operationID = 1;
|
|
string sourceID = 2;
|
|
string opUserID = 3;
|
|
int32 sessionType = 4;
|
|
map <string, server_api_params.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 opUserIDPlatformID = 4;
|
|
int32 sessionType = 5;
|
|
map <string, server_api_params.KeyValue>reactionExtensionList = 6;
|
|
string clientMsgID = 7;
|
|
google.protobuf.StringValue ex = 8;
|
|
google.protobuf.StringValue attachedInfo = 9;
|
|
bool isReact = 10;
|
|
bool isExternalExtensions = 11;
|
|
int64 msgFirstModifyTime = 12;
|
|
}
|
|
message SetMessageReactionExtensionsResp {
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
string clientMsgID = 3;
|
|
int64 msgFirstModifyTime = 4;
|
|
bool isReact = 5;
|
|
repeated KeyValueResp result = 6;
|
|
}
|
|
message AddMessageReactionExtensionsReq {
|
|
string operationID = 1;
|
|
string sourceID = 2;
|
|
string opUserID = 3;
|
|
int32 opUserIDPlatformID = 4;
|
|
int32 sessionType = 5;
|
|
map <string, server_api_params.KeyValue>reactionExtensionList = 6;
|
|
string clientMsgID = 7;
|
|
google.protobuf.StringValue ex = 8;
|
|
google.protobuf.StringValue attachedInfo = 9;
|
|
bool isReact = 10;
|
|
bool isExternalExtensions = 11;
|
|
int64 msgFirstModifyTime = 12;
|
|
uint32 seq = 13;
|
|
}
|
|
message AddMessageReactionExtensionsResp {
|
|
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;
|
|
bool isExternalExtensions = 5;
|
|
message MessageReactionKey {
|
|
string clientMsgID = 1;
|
|
int64 msgFirstModifyTime = 2;
|
|
}
|
|
repeated string typeKeyList = 6;
|
|
repeated MessageReactionKey messageReactionKeyList = 7;
|
|
}
|
|
message GetMessageListReactionExtensionsResp{
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
repeated SingleMessageExtensionResult singleMessageResult =3;
|
|
|
|
}
|
|
message SingleMessageExtensionResult {
|
|
int32 errCode = 1;
|
|
string errMsg = 2;
|
|
map <string, server_api_params.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 opUserIDPlatformID = 4;
|
|
int32 sessionType = 5;
|
|
string clientMsgID = 6;
|
|
bool isExternalExtensions = 7;
|
|
int64 msgFirstModifyTime = 8;
|
|
repeated server_api_params.KeyValue reactionExtensionList = 9;
|
|
}
|
|
|
|
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 {
|
|
server_api_params.KeyValue keyValue = 1;
|
|
int32 errCode = 2;
|
|
string errMsg = 3;
|
|
}
|
|
|
|
message MsgDataToModifyByMQ{
|
|
string aggregationID = 1;
|
|
repeated MsgDataToMQ messageList = 2;
|
|
string triggerID = 3;
|
|
}
|
|
|
|
|
|
service msg {
|
|
rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp);
|
|
rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp);
|
|
rpc SendMsg(SendMsgReq) returns(SendMsgResp);
|
|
rpc DelMsgList(server_api_params.DelMsgListReq) returns(server_api_params.DelMsgListResp);
|
|
rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp);
|
|
rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp);
|
|
rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp);
|
|
rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp);
|
|
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
|
|
rpc GetSuperGroupMsg(GetSuperGroupMsgReq) returns(GetSuperGroupMsgResp);
|
|
rpc GetWriteDiffMsg(GetWriteDiffMsgReq) returns(GetWriteDiffMsgResp);
|
|
|
|
// modify msg
|
|
rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp);
|
|
rpc GetMessageListReactionExtensions(GetMessageListReactionExtensionsReq) returns(GetMessageListReactionExtensionsResp);
|
|
rpc AddMessageReactionExtensions(AddMessageReactionExtensionsReq) returns(AddMessageReactionExtensionsResp);
|
|
rpc DeleteMessageReactionExtensions(DeleteMessageListReactionExtensionsReq) returns(DeleteMessageListReactionExtensionsResp);
|
|
}
|