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

370 lines
8.1 KiB

syntax = "proto3";
2 years ago
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
2 years ago
import "Open-IM-Server/pkg/proto/wrapperspb/wrapperspb.proto";
2 years ago
option go_package = "OpenIM/pkg/proto/group;group";
package OpenIMServer.group;
3 years ago
3 years ago
message CreateGroupReq{
2 years ago
repeated string initMembers = 1;
2 years ago
sdkws.GroupInfo groupInfo = 2;
repeated string adminUserIDs = 3;
2 years ago
string ownerUserID = 4; //owner
}
message CreateGroupResp{
2 years ago
sdkws.GroupInfo groupInfo = 1;
}
3 years ago
3 years ago
message GetGroupsInfoReq{
repeated string groupIDs = 1;
}
3 years ago
message GetGroupsInfoResp{
2 years ago
repeated sdkws.GroupInfo groupInfos = 1;
}
3 years ago
3 years ago
message SetGroupInfoReq{
2 years ago
sdkws.GroupInfoForSet groupInfoForSet = 1;
3 years ago
}
3 years ago
message SetGroupInfoResp{
}
3 years ago
3 years ago
3 years ago
message GetGroupApplicationListReq {
2 years ago
sdkws.RequestPagination pagination = 1;
2 years ago
string fromUserID = 2; //owner or admin
}
3 years ago
message GetGroupApplicationListResp {
2 years ago
uint32 total = 1;
2 years ago
repeated sdkws.GroupRequest groupRequests = 2;
3 years ago
}
3 years ago
message GetUserReqApplicationListReq{
2 years ago
sdkws.RequestPagination pagination = 1;
2 years ago
string userID = 2;
3 years ago
}
message GetUserReqApplicationListResp{
2 years ago
uint32 total = 1;
2 years ago
repeated sdkws.GroupRequest groupRequests = 2;
3 years ago
}
3 years ago
3 years ago
message TransferGroupOwnerReq {
string groupID = 1;
string oldOwnerUserID = 2;
string newOwnerUserID = 3;
}
3 years ago
message TransferGroupOwnerResp{
3 years ago
}
3 years ago
message JoinGroupReq{
string groupID = 1;
string reqMessage = 2;
2 years ago
int32 joinSource = 3;
string inviterUserID = 4;
}
3 years ago
message JoinGroupResp{
}
3 years ago
message GroupApplicationResponseReq{
2 years ago
string groupID = 1;
string fromUserID = 2; //
string handledMsg = 3;
int32 handleResult = 4;
3 years ago
}
3 years ago
message GroupApplicationResponseResp{
}
3 years ago
3 years ago
message QuitGroupReq{
string groupID = 1;
}
3 years ago
message QuitGroupResp{
}
3 years ago
message GetGroupMemberListReq {
2 years ago
sdkws.RequestPagination pagination = 1;
2 years ago
string groupID = 2;
int32 filter = 3;
3 years ago
}
message GetGroupMemberListResp {
2 years ago
uint32 total = 1;
2 years ago
repeated sdkws.GroupMemberFullInfo members = 2;
3 years ago
}
message GetGroupMembersInfoReq {
string groupID = 1;
2 years ago
repeated string members = 2;
}
3 years ago
message GetGroupMembersInfoResp {
2 years ago
repeated sdkws.GroupMemberFullInfo members = 1;
3 years ago
}
3 years ago
message KickGroupMemberReq {
string groupID = 1;
2 years ago
repeated string kickedUserIDs = 2;
string reason = 3;
3 years ago
}
message KickGroupMemberResp {
2 years ago
3 years ago
}
3 years ago
message GetJoinedGroupListReq {
2 years ago
sdkws.RequestPagination pagination = 1;
2 years ago
string fromUserID = 2;
3 years ago
}
3 years ago
message GetJoinedGroupListResp{
2 years ago
uint32 total = 1;
2 years ago
repeated sdkws.GroupInfo groups = 2;
3 years ago
}
3 years ago
message InviteUserToGroupReq {
2 years ago
string groupID = 1;
string reason = 2;
repeated string invitedUserIDs = 3;
3 years ago
}
3 years ago
message InviteUserToGroupResp {
2 years ago
3 years ago
}
3 years ago
3 years ago
message GetGroupAllMemberReq {
2 years ago
sdkws.RequestPagination pagination = 1;
2 years ago
string groupID = 2;
3 years ago
}
message GetGroupAllMemberResp {
2 years ago
repeated sdkws.GroupMemberFullInfo members = 1;
3 years ago
}
3 years ago
message CMSGroup {
2 years ago
sdkws.GroupInfo groupInfo = 1;
2 years ago
string groupOwnerUserName = 2;
string groupOwnerUserID = 3;
3 years ago
}
3 years ago
message GetGroupsReq {
2 years ago
sdkws.RequestPagination pagination = 1;
string groupName = 2;
string groupID = 3;
3 years ago
}
message GetGroupsResp {
2 years ago
uint32 total = 1;
repeated CMSGroup groups = 2;
3 years ago
}
message GetGroupMemberReq {
2 years ago
string groupID = 1;
3 years ago
}
3 years ago
3 years ago
message GetGroupMembersCMSReq {
2 years ago
sdkws.RequestPagination pagination = 1;
2 years ago
string groupID = 2;
string userName = 3;
3 years ago
}
message GetGroupMembersCMSResp {
2 years ago
uint32 total = 1;
2 years ago
repeated sdkws.GroupMemberFullInfo members = 2;
3 years ago
}
3 years ago
message DismissGroupReq{
2 years ago
string groupID = 1;
3 years ago
}
message DismissGroupResp{
}
3 years ago
3 years ago
message MuteGroupMemberReq{
2 years ago
string groupID = 1;
string userID = 2;
uint32 mutedSeconds = 3;
3 years ago
}
message MuteGroupMemberResp{
}
message CancelMuteGroupMemberReq{
2 years ago
string groupID = 1;
string userID = 2;
3 years ago
}
message CancelMuteGroupMemberResp{
}
message MuteGroupReq{
2 years ago
string groupID = 1;
3 years ago
}
message MuteGroupResp{
}
message CancelMuteGroupReq{
2 years ago
string groupID = 1;
3 years ago
}
message CancelMuteGroupResp{
}
3 years ago
message GetJoinedSuperGroupListReq {
2 years ago
string userID = 1;
3 years ago
}
3 years ago
message GetJoinedSuperGroupListResp {
2 years ago
repeated sdkws.GroupInfo groups = 1;
3 years ago
}
3 years ago
message GetSuperGroupsInfoReq {
repeated string groupIDs = 1;
3 years ago
}
message GetSuperGroupsInfoResp {
2 years ago
repeated sdkws.GroupInfo groupInfos = 1;
3 years ago
}
3 years ago
message SetGroupMemberInfo{
string groupID = 1;
string userID = 2;
2 years ago
OpenIMServer.protobuf.StringValue nickname = 3;
OpenIMServer.protobuf.StringValue faceURL = 4;
OpenIMServer.protobuf.Int32Value roleLevel = 5;
OpenIMServer.protobuf.StringValue ex = 6;
}
message SetGroupMemberInfoReq{
repeated SetGroupMemberInfo members = 1;
}
message SetGroupMemberInfoResp{
}
3 years ago
message GetGroupAbstractInfoReq{
2 years ago
repeated string groupIDs = 1;
}
message GroupAbstractInfo{
string groupID = 1;
2 years ago
uint32 groupMemberNumber = 2;
uint64 groupMemberListHash = 3;
}
message GetGroupAbstractInfoResp{
repeated GroupAbstractInfo groupAbstractInfos = 1;
}
2 years ago
message GetUserInGroupMembersReq {
string userID = 1;
repeated string groupIDs = 2;
}
message GetUserInGroupMembersResp{
2 years ago
repeated sdkws.GroupMemberFullInfo members = 1;
}
2 years ago
message GetGroupMemberUserIDsReq{
2 years ago
string groupID = 1;
}
2 years ago
message GetGroupMemberUserIDsResp{
2 years ago
repeated string userIDs = 1;
}
message GetGroupMemberRoleLevelReq{
string groupID = 1;
repeated int32 roleLevels = 2;
}
2 years ago
message GetGroupMemberRoleLevelResp {
repeated sdkws.GroupMemberFullInfo members = 1;
}
2 years ago
3 years ago
service group{
//创建群
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
//申请加群
3 years ago
rpc joinGroup(JoinGroupReq) returns(JoinGroupResp);
//退出群
3 years ago
rpc quitGroup(QuitGroupReq) returns(QuitGroupResp);
//获取指定群信息
rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp);
//设置群信息
3 years ago
rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp);
//(以管理员或群主身份)获取群的加群申请
rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp);
//获取用户自己的主动加群申请
3 years ago
rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp);
//转让群主
3 years ago
rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp);
//群主或管理员处理进群申请
3 years ago
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp);
//获取某个群的群成员
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
//获取某个群的指定群成员
rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp);
//踢出群
rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp);
//获取某个人已加入群
3 years ago
rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp);
//邀请某些人进群
3 years ago
rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp);
3 years ago
rpc getGroups(GetGroupsReq) returns(GetGroupsResp);
rpc getGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp);
2 years ago
//解散群
rpc dismissGroup(DismissGroupReq) returns(DismissGroupResp);
//对某个群成员禁言
rpc muteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp);
//对某个群成员取消禁言
rpc cancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp);
//对某个群禁言
rpc muteGroup(MuteGroupReq) returns(MuteGroupResp);
//对某个群取消禁言
rpc cancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp);
//获取某个用户加入的超级群
rpc getJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp);
//获取指定的超级群信息
rpc getSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp);
//设置群成员昵称
//设置群成员信息
rpc setGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp);
//获取群信息hash值
rpc getGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp);
//获取某个用户在指定群中的信息
2 years ago
rpc getUserInGroupMembers(GetUserInGroupMembersReq) returns (GetUserInGroupMembersResp);
//获取群成员用户ID
2 years ago
rpc getGroupMemberUserIDs(GetGroupMemberUserIDsReq) returns (GetGroupMemberUserIDsResp);
//查询群组中对应级别的成员
rpc GetGroupMemberRoleLevel(GetGroupMemberRoleLevelReq)returns (GetGroupMemberRoleLevelResp);
3 years ago
}