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

160 lines
3.6 KiB

syntax = "proto3";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/friend;friend";
package friend;
message GetFriendsInfoReq{
string fromUserID = 1;
repeated string toUserIDs = 2;
}
message GetFriendsInfoResp{
repeated server_api_params.FriendInfo FriendInfoList = 1;
}
message AddFriendReq{
string fromUserID = 1;
string toUserID = 2;
string reqMsg = 3;
}
message AddFriendResp{
}
message ImportFriendReq{
repeated string FriendUserIDList = 1;
string FromUserID = 2;
}
message ImportFriendResp{
}
message GetToFriendApplyListReq{
string userID = 1;
server_api_params.RequestPagination pagination = 2;
}
message GetToFriendApplyListResp{
repeated server_api_params.FriendRequest FriendRequestList = 1;
int32 total = 2;
}
message GetFriendListReq{
server_api_params.RequestPagination pagination = 1;
string userID = 2;
}
message GetFriendListResp{
repeated server_api_params.FriendInfo FriendInfoList = 1;
int32 total = 2;
}
message AddBlacklistReq{
string fromUserID = 1;
string toUserID = 2;
}
message AddBlacklistResp{
}
message RemoveBlacklistReq{
string fromUserID = 1;
string toUserID = 2;
}
message RemoveBlacklistResp{
}
message GetBlacklistReq{
string userID = 1;
server_api_params.RequestPagination pagination = 1;
}
message GetBlacklistResp{
repeated server_api_params.PublicUserInfo BlackUserInfoList = 1;
int32 total = 2;
}
message IsFriendReq{
string fromUserID = 1;
string toUserID = 2;
}
message IsFriendResp{
bool Response = 1;
}
message IsInBlackListReq{
string fromUserID = 1;
string toUserID = 2;
}
message IsInBlackListResp{
bool Response = 1;
}
message DeleteFriendReq{
string fromUserID = 1;
string toUserID = 2;
}
message DeleteFriendResp{
}
//process
message FriendApplyResponseReq{
string fromUserID = 1;
string toUserID = 2;
int32 handleResult = 3;
string handleMsg = 4;
}
message FriendApplyResponseResp{
}
message SetFriendRemarkReq{
string fromUserID = 1;
string toUserID = 2;
string remark = 3;
}
message SetFriendRemarkResp{
}
message GetFromFriendApplyListReq{
string userID = 2;
server_api_params.RequestPagination pagination = 2;
}
message GetFromFriendApplyListResp{
repeated server_api_params.FriendRequest friendRequestList = 1;
int32 total = 2;
}
service friend{
//申请加好友
rpc addFriend(AddFriendReq) returns(AddFriendResp);
//获取收到的好友申请列表
rpc getToFriendApplyList(GetToFriendApplyListReq) returns(GetToFriendApplyListResp);
//获取主动发出去的好友申请列表
rpc getFromFriendApplyList(GetFromFriendApplyListReq) returns(GetFromFriendApplyListResp);
//获取好友列表
rpc getFriendList(GetFriendListReq) returns(GetFriendListResp);
//添加黑名单
rpc addBlacklist(AddBlacklistReq) returns(AddBlacklistResp);
//移除黑名单
rpc removeBlacklist(RemoveBlacklistReq) returns(RemoveBlacklistResp);
//判断是否好友关系
rpc isFriend(IsFriendReq) returns(IsFriendResp);
//判断是否在黑名单中
rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp);
//获取黑名单列表
rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp);
//删除好友
rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp);
//对好友申请响应(同意或拒绝)
rpc friendApplyResponse(FriendApplyResponseReq) returns(FriendApplyResponseResp);
//设置好友备注
rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp);
//导入好友关系
rpc importFriend(ImportFriendReq) returns(ImportFriendResp);
//获取指定好友信息
rpc getFriendsInfo(GetFriendsInfoReq) returns (GetFriendsInfoResp);
}