| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- syntax = "proto3";
- package api.online;
- import "google/api/annotations.proto";
- //import "google/protobuf/struct.proto";
- import "google/protobuf/empty.proto";
- import "api/common/common.proto";
- option go_package = "git.ikuban.com/server/pw-protobuf/api/online;online";
- option java_multiple_files = true;
- option java_package = "api.online";
- service Online {
- // 用户上线
- rpc Receive (ReceiveRequest) returns (ReceiveReply){
- option (google.api.http) = {
- post: "/api/online/receive",
- body:"*"
- };
- };
- // 发送消息
- rpc SendMsg (SendMsgRequest) returns (SendMsgReply){};
- // 检查是否在线
- rpc CheckIsOnline (CheckIsOnlineRequest) returns (CheckIsOnlineReply){};
- // 检查是否在线
- rpc CheckIsOnlineByIDs (CheckIsOnlineByIDsParam) returns (CheckIsOnlineByIDsParam){};
- // 查询在线用户信息列表
- rpc FindOnlinePerson (google.protobuf.Empty) returns (OnlinePersonMessageReply);
- // 查询可以匹配的在线用户信息列表
- rpc FindOnlineCanMatchingPerson (google.protobuf.Empty) returns (OnlinePersonMessageReply);
- // 查询在线多少人
- rpc FindOnlinePersonNum (google.protobuf.Empty) returns (OnlinePersonReply);
- // 更新工作状态
- rpc UpdateWorkingStatus (UpdateWorkingStatusRequest) returns (google.protobuf.Empty){};
- // 更新权重
- rpc UpdateWeight (UpdateWeightRequest) returns (google.protobuf.Empty){};
- // 更新每日被匹配数
- rpc UpdateTodayMatchedNum (UpdateTodayMatchedNumRequest) returns (google.protobuf.Empty){};
- }
- message SendMessageInfo{
- int64 roomId = 1;// 房间ID
- common.Message message = 2;// 消息
- string msgType = 3;// 消息类型
- }
- message ChatIsReadInfo{
- int64 messageId = 1; // 消息的ID
- int64 roomId = 2; // 房间ID
- }
- message GotoRoomInfo{
- int64 roomId = 1; // 房间ID
- }
- message ReceiveRequest{
- string method = 1; // 路由
- bytes data = 2; // 数据
- string websocketTag = 3;
- }
- message ReceiveReply{
- }
- message OnlinePersonMessageReply{
- repeated OnlinePersonMessageInfo list = 1;
- }
- message OnlinePersonMessageInfo{
- int64 todayMatchedNum = 1;// 今日被匹配数
- string personId = 2;
- int64 weight = 3;// 权重
- string workingStatus = 4;// 工作状态
- int64 sex = 5;// 性别
- int64 age = 6;// 年龄
- string province = 7;// 省
- string city = 8;// 市
- }
- message OnlinePersonReply{
- int64 userManNum = 1; // 男用户在线数
- int64 userWomanNum = 2; // 女用户在线数
- int64 userOtherNum = 3; // 未填写性别的用户在线数
- }
- message CheckIsOnlineRequest{
- string userId = 1;// 身份ID
- }
- message CheckIsOnlineByIDsParam{
- repeated string userIds = 1;// 身份ID
- }
- message CheckIsOnlineReply{
- bool isOnline = 1;// 是否在线
- }
- message UpdateWorkingStatusRequest{
- string id = 1;
- string workingStatus = 2;
- }
- message UpdateWeightRequest{
- string id = 1;
- int64 weight = 2;
- }
- message UpdateTodayMatchedNumRequest{
- string id = 1;
- int64 todayMatchedNum = 2;
- }
- message SendMsgRequest{
- string id = 1;
- string method = 2;
- bytes data = 3;
- int32 code = 4;
- string message = 5;
- string websocketTag = 6;
- }
- message SendMsgReply{}
|