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";
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;
message getFriendsInfoReq{
string ownerUserID = 1;
repeated string friendUserIDs = 2;
3 years ago
}
message getFriendsInfoResp{
repeated server_api_params.FriendInfo friendsInfo = 1;
}
3 years ago
message addFriendReq{
string fromUserID = 1;
string toUserID = 2;
string reqMsg = 3;
string ex = 4;
3 years ago
}
message addFriendResp{
}
3 years ago
message importFriendReq{
string ownerUserID = 1;
repeated string friendUserIDs = 2;
3 years ago
}
2 years ago
message importFriendResp{
}
3 years ago
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;
}
3 years ago
message addBlackReq{
string ownerUserID = 1;
string blackUserID = 2;
}
message addBlackResp{
3 years ago
}
message removeBlackReq{
string ownerUserID = 1;
string blackUserID = 2;
}
message removeBlackReqResp{
3 years ago
}
message getBlacksReq{
string userID = 1;
server_api_params.RequestPagination pagination = 2;
}
message getBlacksResp{
repeated server_api_params.PublicUserInfo blackUsersInfo= 1;
int32 total = 2;
}
3 years ago
message isFriendReq{
string ownerUserID = 1;
string friendUserID = 2;
3 years ago
}
message isFriendResp{
bool response = 1;
3 years ago
}
3 years ago
3 years ago
message isBlackReq{
string ownerUserID = 1;
string blackUserID = 2;
}
message isBlackResp{
bool response = 1;
}
3 years ago
message deleteFriendReq{
string ownerUserID = 1;
string friendUserID = 2;
}
message deleteFriendResp{
3 years ago
}
3 years ago
//process
message respondFriendApplyReq{
string fromUserID = 1; //主动发起的申请者
string toUserID = 2; //被动添加者
2 years ago
int32 handleResult = 3;
string handleMsg = 4;
3 years ago
}
message respondFriendApplyResp{
}
message setFriendRemarkReq{
string ownerUserID = 1;
string friendUserID = 2;
string remark = 3;
}
message setFriendRemarkResp{
3 years ago
}
message getFromFriendsApplyReq{
string userID = 1;
server_api_params.RequestPagination pagination = 2;
3 years ago
}
message getFromFriendsApplyResp{
repeated server_api_params.FriendRequest friendRequests = 1;
int32 total = 2;
3 years ago
}
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(removeBlackReqResp);
//判断是否好友关系
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);
}