Files
open-im-server/pkg/proto/friend/friend.proto
T

183 lines
3.7 KiB
Protocol Buffer
Raw Normal View History

2021-05-26 19:44:38 +08:00
syntax = "proto3";
option go_package = "friend;friend";
package friend;
message CommonResp{
int32 errorCode = 1;
string errorMsg = 2;
}
2021-06-28 15:33:26 +08:00
message GetFriendsInfoReq{
2021-05-26 19:44:38 +08:00
string uid = 1;
string OperationID = 2;
string Token = 3;
}
2021-06-28 15:33:26 +08:00
message GetFriendInfoResp{
2021-05-26 19:44:38 +08:00
int32 errorCode = 1;
string errorMsg = 2;
2021-06-28 15:33:26 +08:00
GetFriendData Data = 3;
2021-05-26 19:44:38 +08:00
}
2021-06-28 15:33:26 +08:00
message GetFriendData{
2021-05-26 19:44:38 +08:00
string uid = 1;
string icon = 2;
string name = 3;
int32 gender = 4;
string mobile = 5;
string birth = 6;
string email = 7;
string ex = 8;
string comment = 9;
int32 isFriend = 10;
int32 isInBlackList = 11;
}
message AddFriendReq{
string uid = 1;
string OperationID = 2;
string Token = 3;
string ReqMessage = 4;
}
2021-09-22 20:10:38 +08:00
message ImportFriendReq{
2021-09-26 14:26:45 +08:00
repeated string uidList = 1;
2021-09-22 20:10:38 +08:00
string OperationID = 2;
string Token = 3;
string OwnerUid = 4;
}
2021-09-26 14:26:45 +08:00
message ImportFriendResp{
CommonResp commonResp = 1;
repeated string failedUidList = 2;
}
2021-09-22 20:10:38 +08:00
2021-05-26 19:44:38 +08:00
message GetFriendApplyReq{
string OperationID = 1;
string Token = 2;
}
message GetFriendApplyResp{
int32 errorCode = 1;
string errorMsg = 2;
repeated ApplyUserInfo data = 4;
}
message ApplyUserInfo{
string uid = 1;
string name = 2;
string icon = 3;
int32 gender = 4;
string mobile = 5;
string birth = 6;
string email = 7;
string ex = 8;
int32 flag = 9;
string applyTime = 10;
string reqMessage = 11;
}
message getFriendListReq{
string OperationID = 1;
string Token = 2;
}
message getFriendListResp{
int32 errorCode = 1;
string errorMsg = 2;
repeated UserInfo data = 3;
}
message UserInfo{
string uid = 1;
string name = 3;
string icon = 2;
int32 gender = 4;
string mobile = 5;
string birth = 6;
string email = 7;
string ex = 8;
string comment = 9;
int32 isInBlackList = 10;
}
message AddBlacklistReq{
string uid = 1;
string OperationID = 2;
string Token = 3;
2021-09-22 20:10:38 +08:00
string OwnerUid = 4;
2021-05-26 19:44:38 +08:00
}
message RemoveBlacklistReq{
string uid = 1;
string OperationID = 2;
string Token = 3;
}
message GetBlacklistReq{
string OperationID = 1;
string token = 2;
}
message GetBlacklistResp{
int32 errorCode = 1;
string errorMsg = 2;
repeated UserInfo data = 3;
}
2021-06-28 15:33:26 +08:00
message IsFriendReq{
string token = 1;
string receiveUid = 2;
string OperationID = 3;
}
message IsFriendResp{
int32 errorCode = 1;
string errorMsg = 2;
int32 shipType = 3;
}
2021-05-26 19:44:38 +08:00
message IsInBlackListReq{
string sendUid = 1;
string receiveUid = 2;
string OperationID = 3;
}
message IsInBlackListResp{
int32 errorCode = 1;
string errorMsg = 2;
bool response = 3;
}
message DeleteFriendReq{
string uid = 1;
string OperationID = 2;
string Token = 3;
}
2021-06-28 15:33:26 +08:00
message AddFriendResponseReq{
2021-05-26 19:44:38 +08:00
string uid = 1;
int32 flag = 2;
string OperationID = 3;
string Token = 4;
}
message SetFriendCommentReq{
string uid = 1;
string operationID = 2;
string comment = 3;
string token = 4;
}
service friend{
2021-06-28 15:33:26 +08:00
rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp);
2021-05-26 19:44:38 +08:00
rpc addFriend(AddFriendReq) returns(CommonResp);
rpc getFriendApplyList(GetFriendApplyReq) returns(GetFriendApplyResp);
2021-06-28 15:33:26 +08:00
rpc getSelfApplyList(GetFriendApplyReq) returns(GetFriendApplyResp);
2021-05-26 19:44:38 +08:00
rpc getFriendList(getFriendListReq) returns(getFriendListResp);
rpc addBlacklist(AddBlacklistReq) returns(CommonResp);
rpc removeBlacklist(RemoveBlacklistReq) returns(CommonResp);
2021-06-28 15:33:26 +08:00
rpc isFriend(IsFriendReq) returns(IsFriendResp);
2021-05-26 19:44:38 +08:00
rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp);
rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp);
rpc deleteFriend(DeleteFriendReq) returns(CommonResp);
2021-06-28 15:33:26 +08:00
rpc addFriendResponse(AddFriendResponseReq) returns(CommonResp);
2021-05-26 19:44:38 +08:00
rpc setFriendComment(SetFriendCommentReq) returns(CommonResp);
2021-09-26 14:26:45 +08:00
rpc ImportFriend(ImportFriendReq) returns(ImportFriendResp);
2021-05-26 19:44:38 +08:00
}