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

152 lines
3.0 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
message GetFriendsInfoReq{
CommID CommID = 1;
}
3 years ago
message GetFriendInfoResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
FriendInfo Data = 3;
}
3 years ago
message FriendInfo{
string OwnerUserID = 1;
string Remark = 2;
uint64 CreateTime = 3;
open_im_sdk.UserInfo FriendUser = 4;
int32 IsBlack = 5;
}
3 years ago
message AddFriendReq{
3 years ago
CommID CommID = 1;
string ReqMessage = 2;
}
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 ImportFriendResp{
CommonResp commonResp = 1;
repeated string failedUidList = 2;
}
message GetFriendApplyReq{
3 years ago
CommID CommID = 1;
}
message GetFriendApplyResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
repeated ApplyUserInfo data = 4;
}
message ApplyUserInfo{
3 years ago
open_im_sdk.PublicUserInfo UserInfo = 1;
int64 applyTime = 2;
string reqMessage = 3;
int32 Flag = 4;
}
message getFriendListReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message getFriendListResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
repeated FriendInfo Data = 3;
}
3 years ago
message AddBlacklistReq{
3 years ago
CommID CommID = 1;
}
message RemoveBlacklistReq{
3 years ago
CommID CommID = 1;
}
message GetBlacklistReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message GetBlacklistResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
repeated open_im_sdk.PublicUserInfo data = 3;
}
3 years ago
message IsFriendReq{
3 years ago
CommID CommID = 1;
3 years ago
}
3 years ago
3 years ago
message IsFriendResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
int32 ShipType = 3;
3 years ago
}
3 years ago
message IsInBlackListReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message IsInBlackListResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
bool Response = 3;
}
message DeleteFriendReq{
3 years ago
CommID CommID = 1;
}
3 years ago
message AddFriendResponseReq{
3 years ago
CommID CommID = 1;
int32 flag = 2;
}
message SetFriendCommentReq{
3 years ago
CommID CommID = 1;
string Remark = 2;
}
service friend{
3 years ago
rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp);
rpc addFriend(AddFriendReq) returns(CommonResp);
rpc getFriendApplyList(GetFriendApplyReq) returns(GetFriendApplyResp);
3 years ago
rpc getSelfApplyList(GetFriendApplyReq) returns(GetFriendApplyResp);
rpc getFriendList(getFriendListReq) returns(getFriendListResp);
rpc addBlacklist(AddBlacklistReq) returns(CommonResp);
rpc removeBlacklist(RemoveBlacklistReq) returns(CommonResp);
3 years ago
rpc isFriend(IsFriendReq) returns(IsFriendResp);
rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp);
rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp);
rpc deleteFriend(DeleteFriendReq) returns(CommonResp);
3 years ago
rpc addFriendResponse(AddFriendResponseReq) returns(CommonResp);
rpc setFriendComment(SetFriendCommentReq) returns(CommonResp);
rpc ImportFriend(ImportFriendReq) returns(ImportFriendResp);
}