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

309 lines
6.4 KiB
Protocol Buffer
Raw Normal View History

2021-05-26 20:06:02 +08:00
syntax = "proto3";
option go_package = "./group;group";
2021-05-26 20:06:02 +08:00
package group;
message CommonResp{
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-05-26 20:06:02 +08:00
}
message CreateGroupReq{
2021-09-06 17:48:14 +08:00
repeated GroupAddMemberInfo memberList = 1;
string groupName = 2;
string introduction = 3;
string notification = 4;
string faceUrl = 5;
string token = 6;
string operationID = 7;
2021-12-22 15:24:49 +08:00
string OpUserID = 8;
string Ext = 9;
2021-06-28 15:33:26 +08:00
}
2021-12-21 21:40:50 +08:00
2021-06-28 15:33:26 +08:00
message GroupAddMemberInfo{
2021-09-06 17:48:14 +08:00
string uid = 1;
int32 setRole = 2;
2021-05-26 20:06:02 +08:00
}
2021-12-22 15:24:49 +08:00
2021-05-26 20:06:02 +08:00
message CreateGroupResp{
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-09-06 17:48:14 +08:00
string groupID = 3;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupsInfoReq{
2021-09-06 17:48:14 +08:00
repeated string groupIDList = 1;
string token = 2;
string operationID = 3;
2021-12-22 15:24:49 +08:00
string OpUserID = 4;
2021-05-26 20:06:02 +08:00
}
2021-12-22 15:24:49 +08:00
2021-06-28 15:33:26 +08:00
message GetGroupsInfoResp{
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-09-06 17:48:14 +08:00
repeated GroupInfo data = 3;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message SetGroupInfoReq{
2021-09-06 17:48:14 +08:00
string groupID = 1;
string groupName = 2;
string notification = 3;
string introduction = 4;
string faceUrl = 5;
string token = 6;
string operationID = 7;
2021-12-22 15:24:49 +08:00
string OpUserID = 8;
2021-06-28 15:33:26 +08:00
}
message GetGroupApplicationListReq {
2021-12-22 15:24:49 +08:00
string OpUserID = 1;
2021-09-06 17:48:14 +08:00
string OperationID = 2;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupApplicationList_Data_User {
2021-09-06 17:48:14 +08:00
string ID = 1;
string GroupID = 2;
string FromUserID = 3;
string ToUserID = 4;
int32 Flag = 5;
string RequestMsg = 6;
string HandledMsg = 7;
int64 AddTime = 8;
string FromUserNickname = 9;
string ToUserNickname = 10;
string FromUserFaceUrl = 11;
string ToUserFaceUrl = 12;
string HandledUser = 13;
int32 Type = 14;
int32 HandleStatus = 15;
int32 HandleResult = 16;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupApplicationListData {
2021-09-06 17:48:14 +08:00
int32 Count = 1;
repeated GetGroupApplicationList_Data_User User = 2;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupApplicationListResp {
2021-09-06 17:48:14 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
GetGroupApplicationListData Data = 3;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message TransferGroupOwnerReq {
2021-09-06 17:48:14 +08:00
string GroupID = 1;
string OldOwner = 2;
string NewOwner = 3;
string OperationID = 4;
2021-12-22 15:24:49 +08:00
string OpUserID = 5;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message TransferGroupOwnerResp{
2021-09-06 17:48:14 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message JoinGroupReq{
2021-09-06 17:48:14 +08:00
string groupID = 1;
string message = 2;
string token = 3;
string OperationID = 4;
2021-12-22 15:24:49 +08:00
string OpUserID = 5;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GroupApplicationResponseReq{
2021-09-06 17:48:14 +08:00
string OperationID = 1;
2021-12-22 11:14:57 +08:00
string OpUserID = 2;
2021-09-06 17:48:14 +08:00
string GroupID = 3;
2021-12-21 21:40:50 +08:00
string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人
2021-09-06 17:48:14 +08:00
string FromUserNickName = 5;
string FromUserFaceUrl = 6;
2021-12-21 21:40:50 +08:00
string ToUserID = 7; //请求加群:0,邀请加群:被邀请人
2021-09-06 17:48:14 +08:00
string ToUserNickName = 8;
string ToUserFaceUrl = 9;
int64 AddTime = 10;
string RequestMsg = 11;
string HandledMsg = 12;
int32 Type = 13;
int32 HandleStatus = 14;
int32 HandleResult = 15;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message GroupApplicationResponseResp{
2021-09-06 17:48:14 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
2021-05-26 20:06:02 +08:00
message SetOwnerGroupNickNameReq{
2021-09-06 17:48:14 +08:00
string groupID = 1;
string nickName = 2;
string OperationID = 3;
string token = 4;
2021-12-22 15:24:49 +08:00
string OpUserID = 5;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message QuitGroupReq{
2021-09-06 17:48:14 +08:00
string groupID = 1;
string operationID = 2;
string token = 3;
2021-12-22 15:24:49 +08:00
string OpUserID = 4;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GroupApplicationUserInfo{
2021-09-06 17:48:14 +08:00
string groupID = 1;
string uid = 2;
string name = 3;
string icon = 4;
string reqMsg = 5;
int64 applicationTime = 6;
int32 flag = 7;
string operatorID = 8;
string handledMsg = 9;
2021-06-28 15:33:26 +08:00
}
message GroupMemberFullInfo {
2021-09-06 17:48:14 +08:00
string userId = 1;
int32 role = 2;
uint64 joinTime = 3;
string nickName = 4;
string faceUrl = 5;
2021-06-28 15:33:26 +08:00
}
message GetGroupMemberListReq {
2021-09-06 17:48:14 +08:00
string groupID = 1;
string token = 2;
string operationID = 3;
int32 filter = 4;
int32 nextSeq = 5;
2021-12-22 15:24:49 +08:00
string OpUserID = 6;
2021-06-28 15:33:26 +08:00
}
message GetGroupMemberListResp {
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-09-06 17:48:14 +08:00
repeated GroupMemberFullInfo memberList = 3;
int32 nextSeq = 4;
2021-06-28 15:33:26 +08:00
}
message GetGroupMembersInfoReq {
2021-09-06 17:48:14 +08:00
string groupID = 1;
repeated string memberList = 2;
string token = 3;
string operationID = 4;
2021-12-22 15:24:49 +08:00
string OpUserID = 5;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupMembersInfoResp {
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-09-06 17:48:14 +08:00
repeated GroupMemberFullInfo memberList = 3;
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message KickGroupMemberReq {
2021-09-06 17:48:14 +08:00
string groupID = 1;
repeated GroupMemberFullInfo uidListInfo = 2;
string reason = 3;
string token = 4;
string operationID = 5;
2021-12-22 15:24:49 +08:00
string OpUserID = 6;
2021-06-28 15:33:26 +08:00
}
message Id2Result {
2021-09-06 17:48:14 +08:00
string uId = 1;
int32 result = 2; //0 ok; -1 error
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message KickGroupMemberResp {
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-09-06 17:48:14 +08:00
repeated Id2Result id2result = 3;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message getJoinedGroupListReq {
2021-09-06 17:48:14 +08:00
string token = 1;
string operationID = 2;
2021-12-22 15:24:49 +08:00
string OpUserID = 3;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message GroupInfo {
2021-09-06 17:48:14 +08:00
string groupId = 1;
string groupName = 2;
string notification = 3;
string introduction = 4;
string faceUrl = 5;
uint64 createTime = 6;
string ownerId = 7;
uint32 memberCount = 8;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-06-28 15:33:26 +08:00
message getJoinedGroupListResp{
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrorMsg = 2;
repeated GroupInfo GroupList = 3;
2021-06-28 15:33:26 +08:00
}
message inviteUserToGroupReq {
2021-09-06 17:48:14 +08:00
string token = 1;
string operationID = 2;
string groupID = 3;
string reason = 4;
repeated string uidList = 5;
2021-12-22 15:24:49 +08:00
string OpUserID = 6;
2021-06-28 15:33:26 +08:00
}
message inviteUserToGroupResp {
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
repeated Id2Result Id2Result = 3; // 0 ok, -1 error
2021-06-28 15:33:26 +08:00
}
message GetGroupAllMemberReq {
2021-09-06 17:48:14 +08:00
string groupID = 1;
string token = 2;
string operationID = 3;
2021-12-22 15:24:49 +08:00
string OpUserID = 4;
2021-06-28 15:33:26 +08:00
}
message GetGroupAllMemberResp {
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-09-06 17:48:14 +08:00
repeated GroupMemberFullInfo memberList = 3;
2021-06-28 15:33:26 +08:00
}
service group{
2021-09-06 17:48:14 +08:00
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
rpc joinGroup(JoinGroupReq) returns(CommonResp);
rpc quitGroup(QuitGroupReq) returns(CommonResp);
rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp);
rpc setGroupInfo(SetGroupInfoReq) returns(CommonResp);
rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp);
rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp);
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp);
// rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp);
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp);
rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp);
rpc getJoinedGroupList(getJoinedGroupListReq) returns (getJoinedGroupListResp);
rpc inviteUserToGroup(inviteUserToGroupReq) returns (inviteUserToGroupResp);
rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp);
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00