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

169 lines
3.5 KiB

syntax = "proto3";
3 years ago
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./friend;friend";
package friend;
message CommonResp{
3 years ago
int32 errCode = 1;
string errMsg = 2;
}
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{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.FriendInfo FriendInfoList = 3;
3 years ago
// int32 IsBlack = 4;
}
3 years ago
message AddFriendReq{
3 years ago
CommID CommID = 1;
3 years ago
string ReqMsg = 2;
}
message AddFriendResp{
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{
3 years ago
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{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.FriendRequest FriendRequestList = 3;
}
3 years ago
message GetFriendListReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message GetFriendListResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.FriendInfo FriendInfoList = 3;
}
3 years ago
message AddBlacklistReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message AddBlacklistResp{
CommonResp CommonResp = 1;
}
message RemoveBlacklistReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message RemoveBlacklistResp{
CommonResp CommonResp = 1;
}
message GetBlacklistReq{
3 years ago
CommID CommID = 1;
}
message GetBlacklistResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.PublicUserInfo BlackUserInfoList = 3;
}
3 years ago
3 years ago
message IsFriendReq{
3 years ago
CommID CommID = 1;
3 years ago
}
message IsFriendResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
bool Response = 3;
3 years ago
}
3 years ago
3 years ago
message IsInBlackListReq{
3 years ago
CommID CommID = 1;
}
message IsInBlackListResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
bool Response = 3;
}
3 years ago
message DeleteFriendReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message DeleteFriendResp{
CommonResp CommonResp = 1;
}
3 years ago
//process
3 years ago
message AddFriendResponseReq{
3 years ago
CommID CommID = 1;
int32 flag = 2;
3 years ago
string handleMsg = 3;
}
message AddFriendResponseResp{
CommonResp CommonResp = 1;
}
3 years ago
message SetFriendRemarkReq{
3 years ago
CommID CommID = 1;
string Remark = 2;
}
3 years ago
message SetFriendRemarkResp{
3 years ago
CommonResp CommonResp = 1;
}
message GetSelfApplyListReq{
CommID CommID = 1;
}
message GetSelfApplyListResp{
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.FriendRequest FriendRequestList = 3;
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);
}