mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 09:01:50 +08:00
add http and websocket
This commit is contained in:
@ -1,30 +1,37 @@
|
||||
/*
|
||||
好友操作服务器的子服务注册信息: /service/friend/instance_id
|
||||
服务名称:/service/friend
|
||||
实例ID: instance_id 每个能够提供用户操作服务的子服务器唯一ID
|
||||
当服务发现的时候,通过 /service/friend 进行服务发现,就可以发现所有的能够提供用户操作的实例信息了
|
||||
*/
|
||||
syntax = "proto3";
|
||||
package bite_im;
|
||||
import "base.proto";
|
||||
|
||||
option cc_generic_services = true;
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
//好友列表获取
|
||||
message GetFriendListReq {
|
||||
string request_id = 1; // 请求标识ID
|
||||
optional string user_id = 2; // 当前请求的发起者用户ID
|
||||
optional string session_id = 3; //登录会话ID--用于网关进行身份识别--其他子服务用不到
|
||||
string request_id = 1;
|
||||
optional string user_id = 2;
|
||||
optional string session_id = 3;
|
||||
}
|
||||
message GetFriendListRsp {
|
||||
string request_id = 1;
|
||||
bool success = 2;
|
||||
string errmsg = 3;
|
||||
repeated UserInfo friend_list = 4; //要返回的用户信息
|
||||
repeated UserInfo friend_list = 4;
|
||||
}
|
||||
|
||||
//--------------------------------------
|
||||
//好友删除
|
||||
message FriendRemoveReq {
|
||||
string request_id = 1;
|
||||
optional string user_id = 2; //当前用户ID
|
||||
optional string user_id = 2;
|
||||
optional string session_id = 3;
|
||||
string peer_id = 4; //要删除的好友ID
|
||||
string peer_id = 4;
|
||||
}
|
||||
message FriendRemoveRsp {
|
||||
string request_id = 1;
|
||||
@ -53,15 +60,14 @@ message FriendAddProcessReq {
|
||||
bool agree = 3;//是否同意好友申请
|
||||
string apply_user_id = 4; //申请人的用户id
|
||||
optional string session_id = 5;
|
||||
optional string user_id = 6; // 被申请人
|
||||
optional string user_id = 6;
|
||||
}
|
||||
// +++++++++++++++++++++++++++++++++
|
||||
message FriendAddProcessRsp {
|
||||
string request_id = 1;
|
||||
bool success = 2;
|
||||
string errmsg = 3;
|
||||
// 同意后会创建会话,向网关返回会话信息,用于通知双方会话的建立,这个字段客户端不需要关注
|
||||
optional string new_session_id = 4;
|
||||
optional string new_session_id = 4; // 同意后会创建会话,向网关返回会话信息,用于通知双方会话的建立,这个字段客户端不需要关注
|
||||
}
|
||||
//--------------------------------------
|
||||
//获取待处理的,申请自己好友的信息列表
|
||||
@ -72,7 +78,7 @@ message GetPendingFriendEventListReq {
|
||||
}
|
||||
|
||||
message FriendEvent {
|
||||
optional string event_id = 1;
|
||||
string event_id = 1;
|
||||
UserInfo sender = 3;
|
||||
}
|
||||
message GetPendingFriendEventListRsp {
|
||||
|
||||
Reference in New Issue
Block a user