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

255 lines
5.8 KiB
Protocol Buffer
Raw Normal View History

2021-05-26 20:06:02 +08:00
syntax = "proto3";
2021-12-23 17:22:49 +08:00
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
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
}
2021-12-23 17:22:49 +08:00
message GroupAddMemberInfo{
string UserID = 1;
int32 Role = 2;
2021-06-28 15:33:26 +08:00
}
2021-12-21 21:40:50 +08:00
2021-12-23 17:22:49 +08:00
message CreateGroupReq{
repeated GroupAddMemberInfo InitMemberList = 1; //
string GroupName = 2;
string Introduction = 3;
string Notification = 4;
string FaceUrl = 5;
string Ext = 6;
string OperationID = 7;
2021-12-23 18:29:39 +08:00
string OpUserID = 8; //app manager or group owner
2021-12-23 17:22:49 +08:00
string FromUserID = 9;
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-12-23 17:22:49 +08:00
open_im_sdk.GroupInfo GroupInfo = 3;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupsInfoReq{
2021-12-23 17:22:49 +08:00
repeated string GroupIDList = 1;
string OperationID = 2;
2021-12-23 18:29:39 +08:00
string OpUserID = 3; //No verification permission
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-12-23 17:22:49 +08:00
repeated open_im_sdk.GroupInfo GroupInfoList = 3;
2021-05-26 20:06:02 +08:00
}
2021-12-23 17:22:49 +08:00
2021-06-28 15:33:26 +08:00
message SetGroupInfoReq{
2021-12-23 17:22:49 +08:00
open_im_sdk.GroupInfo GroupInfo = 1;
2021-12-23 18:29:39 +08:00
string OpUserID = 2; //app manager or group owner
string OperationID = 3;
2021-06-28 15:33:26 +08:00
}
2021-12-23 18:29:39 +08:00
2021-06-28 15:33:26 +08:00
message GetGroupApplicationListReq {
2021-12-23 18:29:39 +08:00
string OpUserID = 1; //app manager or group owner(manager)
2021-09-06 17:48:14 +08:00
string OperationID = 2;
2021-12-23 18:29:39 +08:00
string FromUserID = 3; //owner or manager (Received)
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;
2021-12-23 17:22:49 +08:00
string OldOwnerUserID = 2;
string NewOwnerUserID = 3;
2021-09-06 17:48:14 +08:00
string OperationID = 4;
2021-12-23 18:29:39 +08:00
string OpUserID = 5; //app manager or group owner
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message JoinGroupReq{
2021-12-23 17:22:49 +08:00
string GroupID = 1;
string ReqMessage = 2;
2021-12-23 18:29:39 +08:00
string OpUserID = 3;
2021-09-06 17:48:14 +08:00
string OperationID = 4;
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-12-23 18:29:39 +08:00
string ToUserID = 5; //请求加群:0,邀请加群:被邀请人
int64 AddTime = 6;
string HandledMsg = 7;
int32 HandleResult = 8;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-12-23 17:22:49 +08:00
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-12-23 17:22:49 +08:00
string GroupID = 1;
string Nickname = 2;
2021-09-06 17:48:14 +08:00
string OperationID = 3;
2021-12-23 17:22:49 +08:00
string FromUserID = 4;
2021-12-23 18:29:39 +08:00
string OpUserID = 5; //app manger or FromUserID
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message QuitGroupReq{
2021-12-23 17:22:49 +08:00
string GroupID = 1;
string OperationID = 2;
2021-12-23 18:29:39 +08:00
string OpUserID = 3;
2021-05-26 20:06:02 +08:00
}
2021-06-28 15:33:26 +08:00
message GetGroupMemberListReq {
2021-12-23 17:22:49 +08:00
string GroupID = 1;
2021-12-23 18:29:39 +08:00
string OpUserID = 2; //No verification permission
2021-12-23 17:22:49 +08:00
string OperationID = 3;
int32 Filter = 4;
int32 NextSeq = 5;
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-12-23 17:22:49 +08:00
repeated open_im_sdk.GroupMemberFullInfo memberList = 3;
2021-09-06 17:48:14 +08:00
int32 nextSeq = 4;
2021-06-28 15:33:26 +08:00
}
message GetGroupMembersInfoReq {
2021-12-23 17:22:49 +08:00
string GroupID = 1;
2021-09-06 17:48:14 +08:00
repeated string memberList = 2;
2021-12-23 18:29:39 +08:00
string OpUserID = 3; //No verification permission
2021-12-23 17:22:49 +08:00
string OperationID = 4;
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-12-23 17:22:49 +08:00
repeated open_im_sdk.GroupMemberFullInfo memberList = 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 KickGroupMemberReq {
2021-12-23 17:22:49 +08:00
string GroupID = 1;
repeated string KickedUserIDList = 2;
string Reason = 3;
string OperationID = 5;
2021-12-23 18:29:39 +08:00
string OpUserID = 6; //app manger or group manager
2021-06-28 15:33:26 +08:00
}
message Id2Result {
2021-12-23 17:22:49 +08:00
string UserID = 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-12-23 17:22:49 +08:00
repeated Id2Result Id2ResultList = 3;
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-12-23 17:22:49 +08:00
message GetJoinedGroupListReq {
string FromUserID = 1;
2021-09-06 17:48:14 +08:00
string operationID = 2;
2021-12-23 18:29:39 +08:00
string OpUserID = 3; //app manager or FromUserID
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00
2021-12-23 17:22:49 +08:00
message GetJoinedGroupListResp{
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
2021-12-23 17:22:49 +08:00
string ErrMsg = 2;
repeated open_im_sdk.GroupInfo GroupList = 3;
2021-06-28 15:33:26 +08:00
}
2021-12-23 17:22:49 +08:00
message InviteUserToGroupReq {
string OperationID = 2;
string GroupID = 3;
string Reason = 4;
repeated string InvitedUserIDList = 5;
2021-12-23 18:29:39 +08:00
string OpUserID = 6; //group member or app manager
2021-06-28 15:33:26 +08:00
}
2021-12-23 17:22:49 +08:00
message InviteUserToGroupResp {
2021-12-22 15:24:49 +08:00
int32 ErrCode = 1;
string ErrMsg = 2;
2021-12-23 17:22:49 +08:00
repeated Id2Result Id2ResultList = 3; // 0 ok, -1 error
2021-06-28 15:33:26 +08:00
}
2021-12-23 17:22:49 +08:00
2021-06-28 15:33:26 +08:00
message GetGroupAllMemberReq {
2021-12-23 17:22:49 +08:00
string GroupID = 1;
2021-12-23 18:29:39 +08:00
string OpUserID = 2; //No verification permission
2021-12-23 17:22:49 +08:00
string OperationID = 3;
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-12-23 17:22:49 +08:00
repeated open_im_sdk.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);
2021-12-23 17:22:49 +08:00
rpc transferGroupOwner(TransferGroupOwnerReq) returns(CommonResp);
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(CommonResp);
2021-09-06 17:48:14 +08:00
// rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp);
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp);
rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp);
2021-12-23 17:22:49 +08:00
rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp);
rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp);
2021-09-06 17:48:14 +08:00
rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp);
2021-06-28 15:33:26 +08:00
}
2021-05-26 20:06:02 +08:00