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

161 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 ownerUserID = 1;
repeated string friendUserIDs = 2;
}
message getFriendsInfoResp{
repeated server_api_params.FriendInfo friendsInfo = 1;
}
message addFriendReq{
string fromUserID = 1;
string toUserID = 2;
string reqMsg = 3;
string ex = 4;
}
message addFriendResp{
}
message importFriendReq{
string ownerUserID = 1;
repeated string friendUserIDs = 2;
}
message importFriendResp{
}
message getToFriendsApplyReq{
string userID = 1;
server_api_params.RequestPagination pagination = 2;
}
message getToFriendsApplyResp{
repeated server_api_params.FriendRequest FriendRequests = 1;
int32 total = 2;
}
message getFriendsReq{
server_api_params.RequestPagination pagination = 1;
string userID = 2;
}
message getFriendsResp{
repeated server_api_params.FriendInfo FriendsInfo = 1;
int32 total = 2;
}
message addBlackReq{
string ownerUserID = 1;
string blackUserID = 2;
}
message addBlackResp{
}
message removeBlackReq{
string ownerUserID = 1;
string blackUserID = 2;
}
message removeBlackResp{
}
message getBlacksReq{
string userID = 1;
server_api_params.RequestPagination pagination = 2;
}
message getBlacksResp{
repeated server_api_params.PublicUserInfo blackUsersInfo= 1;
int32 total = 2;
}
message isFriendReq{
string ownerUserID = 1;
string friendUserID = 2;
}
message isFriendResp{
bool response = 1;
}
message isBlackReq{
string ownerUserID = 1;
string blackUserID = 2;
}
message isBlackResp{
bool response = 1;
}
message deleteFriendReq{
string ownerUserID = 1;
string friendUserID = 2;
}
message deleteFriendResp{
}
//process
message respondFriendApplyReq{
string fromUserID = 1; //主动发起的申请者
string toUserID = 2; //被动添加者
int32 handleResult = 3;
string handleMsg = 4;
}
message respondFriendApplyResp{
}
message setFriendRemarkReq{
string ownerUserID = 1;
string friendUserID = 2;
string remark = 3;
}
message setFriendRemarkResp{
}
message getFromFriendsApplyReq{
string userID = 1;
server_api_params.RequestPagination pagination = 2;
}
message getFromFriendsApplyResp{
repeated server_api_params.FriendRequest friendRequests = 1;
int32 total = 2;
}
service friend{
//申请加好友
rpc addFriend(addFriendReq) returns(addFriendResp);
//获取收到的好友申请列表
rpc getToFriendsApply(getToFriendsApplyReq) returns(getToFriendsApplyResp);
//获取主动发出去的好友申请列表
rpc getFromFriendsApply(getFromFriendsApplyReq) returns(getFromFriendsApplyResp);
//获取好友列表
rpc getFriends(getFriendsReq) returns(getFriendsResp);
//添加黑名单
rpc addBlack(addBlackReq) returns(addBlackResp);
//移除黑名单
rpc removeBlack(removeBlackReq) returns(removeBlackResp);
//判断是否好友关系
rpc isFriend(isFriendReq) returns(isFriendResp);
//判断是否在黑名单中
rpc isBlack(isBlackReq) returns(isBlackResp);
//获取黑名单列表
rpc getBlacks(getBlacksReq) returns(getBlacksResp);
//删除好友
rpc deleteFriend(deleteFriendReq) returns(deleteFriendResp);
//对好友申请响应(同意或拒绝)
rpc respondFriendApply(respondFriendApplyReq) returns(respondFriendApplyResp);
//设置好友备注
rpc setFriendRemark(setFriendRemarkReq) returns(setFriendRemarkResp);
//导入好友关系
rpc importFriends(importFriendReq) returns(importFriendResp);
//获取指定好友信息
rpc getFriendsInfo(getFriendsInfoReq) returns (getFriendsInfoResp);
}