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/group/group.proto

260 lines
5.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./group;group";
package group;
message CommonResp{
int32 ErrCode = 1;
string ErrMsg = 2;
}
message GroupAddMemberInfo{
string UserID = 1;
int32 Role = 2;
}
message CreateGroupReq{
repeated GroupAddMemberInfo InitMemberList = 1; //
string GroupName = 2;
string Introduction = 3;
string Notification = 4;
string FaceUrl = 5;
string Ext = 6;
string OperationID = 7;
string OpUserID = 8;
string FromUserID = 9;
}
message CreateGroupResp{
int32 ErrCode = 1;
string ErrMsg = 2;
open_im_sdk.GroupInfo GroupInfo = 3;
}
message GetGroupsInfoReq{
repeated string GroupIDList = 1;
string OperationID = 2;
string OpUserID = 3;
}
message GetGroupsInfoResp{
int32 ErrCode = 1;
string ErrMsg = 2;
repeated open_im_sdk.GroupInfo GroupInfoList = 3;
}
message SetGroupInfoReq{
open_im_sdk.GroupInfo GroupInfo = 1;
string OpUserID = 2;
string FromUserID = 3;
string OperationID = 4;
}
//owner or manager
message GetGroupApplicationListReq {
string OpUserID = 1;
string OperationID = 2;
string FromUserID = 3; //owner or manager
}
message GetGroupApplicationList_Data_User {
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;
}
message GetGroupApplicationListData {
int32 Count = 1;
repeated GetGroupApplicationList_Data_User User = 2;
}
message GetGroupApplicationListResp {
int32 ErrCode = 1;
string ErrMsg = 2;
GetGroupApplicationListData Data = 3;
}
message TransferGroupOwnerReq {
string GroupID = 1;
string OldOwnerUserID = 2;
string NewOwnerUserID = 3;
string OperationID = 4;
string OpUserID = 5;
}
message JoinGroupReq{
string GroupID = 1;
string ReqMessage = 2;
string FromUserID = 3;
string OperationID = 4;
string OpUserID = 5;
}
message GroupApplicationResponseReq{
string OperationID = 1;
string OpUserID = 2;
string GroupID = 3;
string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人
string ToUserID = 7; //请求加群:0邀请加群:被邀请人
int64 AddTime = 10;
string HandledMsg = 12;
// int32 Type = 13;
// int32 HandleStatus = 14;
int32 HandleResult = 15;
}
message SetOwnerGroupNickNameReq{
string GroupID = 1;
string Nickname = 2;
string OperationID = 3;
string FromUserID = 4;
string OpUserID = 5;
}
message QuitGroupReq{
string GroupID = 1;
string OperationID = 2;
string FromUserID = 3;
string OpUserID = 4;
}
message GetGroupMemberListReq {
string GroupID = 1;
string OpUserID = 2;
string OperationID = 3;
int32 Filter = 4;
int32 NextSeq = 5;
}
message GetGroupMemberListResp {
int32 ErrCode = 1;
string ErrMsg = 2;
repeated open_im_sdk.GroupMemberFullInfo memberList = 3;
int32 nextSeq = 4;
}
message GetGroupMembersInfoReq {
string GroupID = 1;
repeated string memberList = 2;
string OpUserID = 3;
string OperationID = 4;
}
message GetGroupMembersInfoResp {
int32 ErrCode = 1;
string ErrMsg = 2;
repeated open_im_sdk.GroupMemberFullInfo memberList = 3;
}
message KickGroupMemberReq {
string GroupID = 1;
repeated string KickedUserIDList = 2;
string Reason = 3;
string OperationID = 5;
string OpUserID = 6;
}
message Id2Result {
string UserID = 1;
int32 Result = 2; //0 ok; -1 error
}
message KickGroupMemberResp {
int32 ErrCode = 1;
string ErrMsg = 2;
repeated Id2Result Id2ResultList = 3;
}
message GetJoinedGroupListReq {
string FromUserID = 1;
string operationID = 2;
string OpUserID = 3;
}
message GetJoinedGroupListResp{
int32 ErrCode = 1;
string ErrMsg = 2;
repeated open_im_sdk.GroupInfo GroupList = 3;
}
message InviteUserToGroupReq {
string OperationID = 2;
string GroupID = 3;
string Reason = 4;
repeated string InvitedUserIDList = 5;
string OpUserID = 6;
}
message InviteUserToGroupResp {
int32 ErrCode = 1;
string ErrMsg = 2;
repeated Id2Result Id2ResultList = 3; // 0 ok, -1 error
}
message GetGroupAllMemberReq {
string GroupID = 1;
string OpUserID = 2;
string OperationID = 3;
}
message GetGroupAllMemberResp {
int32 ErrCode = 1;
string ErrMsg = 2;
repeated open_im_sdk.GroupMemberFullInfo memberList = 3;
}
service group{
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(CommonResp);
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(CommonResp);
// 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);
}