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.
80 lines
938 B
80 lines
938 B
syntax = "proto3"; |
|
|
|
package api; |
|
|
|
option go_package = "./api;api"; |
|
|
|
/* |
|
* v1.0.0 |
|
* protocol |
|
*/ |
|
message ProtoWrap { |
|
int32 ver = 1; // version |
|
int32 op = 2; // option/action |
|
int32 seq = 3; // sequence |
|
bool success = 4; // 请求是否成功 |
|
bytes body = 7; // proto bytes |
|
} |
|
|
|
message Ping { |
|
|
|
} |
|
|
|
message Pong { |
|
|
|
} |
|
|
|
// 成功消息 |
|
message ResSuccess { |
|
|
|
} |
|
|
|
// 失败响应 |
|
message ResFail { |
|
string msg = 3; // 失败消息 |
|
} |
|
|
|
message ReqIdentity { |
|
string token = 1; |
|
} |
|
|
|
message ResIdentity { |
|
int32 status = 1; |
|
string msg = 2; |
|
} |
|
|
|
message ReqLobbyView { |
|
|
|
} |
|
|
|
message ResLobbyView { |
|
|
|
} |
|
|
|
message LobbyTable { |
|
int32 tableNo = 1; |
|
repeated LobbyPlayer players = 3; |
|
} |
|
|
|
message LobbyPlayer { |
|
bytes type = 1; |
|
string username = 2; |
|
string avatar = 3; |
|
} |
|
|
|
message ReqCreateTable { |
|
int32 players = 1; |
|
int32 robots = 2; |
|
} |
|
|
|
message ResCreateTable { |
|
int32 tableNo = 1; |
|
} |
|
|
|
message ReqJoinTable { |
|
|
|
} |
|
|
|
message ResJoinTable { |
|
|
|
}
|
|
|