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