HaoYueTunnel/ProtobufCore/proto/protobuf_Auth.proto

84 lines
2.3 KiB
Protocol Buffer
Raw Normal View History

2023-05-23 17:57:24 +08:00
syntax = "proto3";
package AxibugProtobuf;
option optimize_for = SPEED;
enum CommandID
{
CMD_DEFAUL = 0;//缺省不使用
2023-05-24 18:31:11 +08:00
2023-05-25 18:30:22 +08:00
CMD_LOGIN = 2000; //登录 上行 | 下行 对应 Protobuf_Login | Protobuf_Login_RESP
2023-05-25 13:24:51 +08:00
2023-05-25 18:30:22 +08:00
CMD_CHATMSG = 4000; //聊天 上行 | 下行 对应 Protobuf_ChatMsg | Protobuf_ChatMsg_RESP
CMD_USER_ONLINELIST = 5000; //获取在线用户列表 上行 | 下行 对应 Protobuf_UserList | Protobuf_UserList_RESP
CMD_USER_JOIN = 5031; //用户上线 下行 对应 Protobuf_UserOnline_RESP
CMD_USER_LEAVE = 5032; //用户下线 下行 对应 Protobuf_UserOffline_RESP
CMD_USER_STATE_UPDATE = 5033; //更新在线用户状态 下行 对应 Protobuf_UserState_RESP
//CMD_TUNNEL_UDPSERVER_INFO = 6000; //UDP服务器信息 上行 | 下行 对应 Protobuf_UDPServer_Info | Protobuf_UDPServer_Info_RESP
//CMD_TUNNEL_2Server_OK = 6001; //和服务器UDP建立连接 下行 对应 Protobuf_MakeTunnel_RESP
//CMD_TUNNEL_MAKE = 6002; //请求打洞 上行 | 下行 对应 Protobuf_MakeTunnel | Protobuf_MakeTunnel_RESP
2023-05-23 17:57:24 +08:00
}
enum ErrorCode
{
2023-05-24 18:31:11 +08:00
ERROR_DEFAUL = 0;//缺省不使用
2023-05-23 17:57:24 +08:00
ERROR_OK = 1; //成功
}
enum LoginType
{
2023-05-24 18:31:11 +08:00
BaseDefault = 0;//缺省不使用
2023-05-23 17:57:24 +08:00
HaoYueAuth = 1;
2023-05-24 18:31:11 +08:00
BF3 = 3;
BF4 = 4;
2023-05-23 17:57:24 +08:00
}
enum DeviceType
{
2023-05-24 18:31:11 +08:00
DeviceType_Default = 0;//缺省不使用
2023-05-23 17:57:24 +08:00
PC = 1;
Android = 2;
IOS = 3;
PSV = 4;
}
enum LoginResultStatus
{
LoginResultStatus_BaseDefault = 0;//缺省不使用
OK = 1;
AccountErr = 2;
}
//登录数据上行
message Protobuf_Login
{
2023-05-24 18:31:11 +08:00
LoginType loginType = 1;//登录操作类型 [0]皓月通行证 [3] 皓月BF3 [4] 皓月BF4
DeviceType deviceType = 2;//设备类型 [0]PC [1]AndroidPad预留 [3]IPad预留
2023-05-23 17:57:24 +08:00
string Account = 3;//用户名
string Password = 4;//密码
}
//登录数据下行
message Protobuf_Login_RESP
{
string Token = 1;//登录凭据 (本次登录之后,所有业务请求凭据,需要存储在内存中)
string LastLoginDate = 2;//上次登录时间(只用于呈现的字符串,若界面需求需要)
string RegDate = 3;//注册时间(只用于呈现的字符串,若界面需求需要)
LoginResultStatus Status = 4;//账号状态 (预留) [1]正常[0]被禁封
2023-05-25 13:24:51 +08:00
}
//聊天 上行
message Protobuf_ChatMsg
{
string ChatMsg = 1;//消息
}
//聊天 下行
message Protobuf_ChatMsg_RESP
{
string NickName = 1;//昵称
string ChatMsg = 2;//消息
int64 Date = 3;//消息
2023-05-23 17:57:24 +08:00
}