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

159 lines
3.7 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 CommID{
string OpUserID = 1;
string OperationID = 2;
3 years ago
string ToUserID = 4;
string FromUserID = 5;
}
3 years ago
3 years ago
3 years ago
message GetFriendsInfoReq{
CommID CommID = 1;
}
3 years ago
message GetFriendInfoResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.FriendInfo FriendInfoList = 2;
}
3 years ago
message AddFriendReq{
3 years ago
CommID CommID = 1;
3 years ago
string ReqMsg = 2;
}
message AddFriendResp{
server_api_params.CommonResp commonResp = 1;
}
3 years ago
message ImportFriendReq{
3 years ago
repeated string FriendUserIDList = 1;
string OperationID = 2;
3 years ago
string FromUserID = 3;
string OpUserID = 4;
}
3 years ago
message UserIDResult{
string UserID = 1;
int32 Result = 2;
}
message ImportFriendResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
repeated UserIDResult UserIDResultList = 2;
}
3 years ago
message GetFriendApplyListReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message GetFriendApplyListResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.FriendRequest FriendRequestList = 2;
}
3 years ago
message GetFriendListReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message GetFriendListResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.FriendInfo FriendInfoList = 2;
}
3 years ago
message AddBlacklistReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message AddBlacklistResp{
2 years ago
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message RemoveBlacklistReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message RemoveBlacklistResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message GetBlacklistReq{
3 years ago
CommID CommID = 1;
}
message GetBlacklistResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.PublicUserInfo BlackUserInfoList = 2;
}
3 years ago
3 years ago
message IsFriendReq{
3 years ago
CommID CommID = 1;
3 years ago
}
message IsFriendResp{
server_api_params.CommonResp commonResp = 1;
bool Response = 2;
3 years ago
}
3 years ago
3 years ago
message IsInBlackListReq{
3 years ago
CommID CommID = 1;
}
message IsInBlackListResp{
server_api_params.CommonResp commonResp = 1;
bool Response = 2;
}
3 years ago
message DeleteFriendReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message DeleteFriendResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
3 years ago
//process
3 years ago
message AddFriendResponseReq{
3 years ago
CommID CommID = 1;
3 years ago
int32 handleResult = 2;
3 years ago
string handleMsg = 3;
}
message AddFriendResponseResp{
server_api_params.CommonResp commonResp = 1;
}
3 years ago
message SetFriendRemarkReq{
3 years ago
CommID CommID = 1;
string Remark = 2;
}
3 years ago
message SetFriendRemarkResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message GetSelfApplyListReq{
CommID CommID = 1;
}
message GetSelfApplyListResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.FriendRequest FriendRequestList = 2;
3 years ago
}
service friend{
3 years ago
// rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp);
rpc addFriend(AddFriendReq) returns(AddFriendResp);
rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp);
rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp);
rpc getFriendList(GetFriendListReq) returns(GetFriendListResp);
rpc addBlacklist(AddBlacklistReq) returns(AddBlacklistResp);
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 addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp);
3 years ago
rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp);
3 years ago
rpc importFriend(ImportFriendReq) returns(ImportFriendResp);
3 years ago
2 years ago
// rpc CheckFriendFromCache(IsFriendReq) returns(IsFriendResp);
// rpc CheckBlockFromCache(IsInBlackListReq) returns(IsFriendResp);
}