[proto] update
This commit is contained in:
@@ -9,4 +9,12 @@ message UserProto {
|
||||
|
||||
message GameProto {
|
||||
int32 id = 1;
|
||||
string imageId = 2;
|
||||
string status = 3;
|
||||
repeated UserProto users = 4;
|
||||
}
|
||||
|
||||
message GameEventProto {
|
||||
int32 time = 1;
|
||||
string event = 2;
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package ru.m.puzzlez.proto.game;
|
||||
|
||||
message GameEventProto {
|
||||
int32 time = 1;
|
||||
string event = 2;
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "core.proto";
|
||||
import "game.proto";
|
||||
import "room.proto";
|
||||
|
||||
package ru.m.puzzlez.proto.pack;
|
||||
|
||||
@@ -12,8 +10,7 @@ message ErrorResponse {
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
string uuid = 1;
|
||||
string name = 2;
|
||||
ru.m.puzzlez.proto.core.UserProto user = 1;
|
||||
}
|
||||
|
||||
message LoginResponse {
|
||||
@@ -24,21 +21,48 @@ message LogoutRequest {}
|
||||
|
||||
message LogoutResponse {}
|
||||
|
||||
message GameCreateRequest {
|
||||
string imageId = 1;
|
||||
}
|
||||
|
||||
message GameJoinRequest {
|
||||
int32 gameId = 1;
|
||||
}
|
||||
|
||||
message GameLeaveRequest {}
|
||||
|
||||
message GameResponse {
|
||||
ru.m.puzzlez.proto.core.GameProto game = 1;
|
||||
}
|
||||
|
||||
message GameListRequest {
|
||||
bool subscribe = 1;
|
||||
}
|
||||
|
||||
message GameListResponse {
|
||||
repeated ru.m.puzzlez.proto.core.GameProto games = 1;
|
||||
}
|
||||
|
||||
message GameEventRequest {
|
||||
ru.m.puzzlez.proto.game.GameEventProto event = 1;
|
||||
repeated ru.m.puzzlez.proto.core.GameEventProto events = 1;
|
||||
}
|
||||
|
||||
message GameEventResponse {
|
||||
ru.m.puzzlez.proto.game.GameEventProto event = 1;
|
||||
repeated ru.m.puzzlez.proto.core.GameEventProto events = 1;
|
||||
}
|
||||
|
||||
message Request {
|
||||
oneof content {
|
||||
LoginRequest login = 1;
|
||||
LogoutRequest logout = 2;
|
||||
ru.m.puzzlez.proto.room.RoomRequest room = 3;
|
||||
ru.m.puzzlez.proto.room.RoomListRequest roomList = 4;
|
||||
GameEventRequest gameEvent = 6;
|
||||
|
||||
GameCreateRequest gameCreate = 10;
|
||||
GameLeaveRequest gameJoin = 11;
|
||||
GameLeaveRequest gameLeave = 12;
|
||||
|
||||
GameListRequest gameList = 20;
|
||||
|
||||
GameEventRequest gameEvent = 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,9 +70,12 @@ message Response {
|
||||
oneof content {
|
||||
LoginResponse login = 1;
|
||||
LogoutResponse logout = 2;
|
||||
ru.m.puzzlez.proto.room.RoomResponse room = 3;
|
||||
ru.m.puzzlez.proto.room.RoomListResponse roomList = 4;
|
||||
GameEventResponse gameEvent = 6;
|
||||
|
||||
GameResponse game = 10;
|
||||
|
||||
GameListResponse gameList = 20;
|
||||
|
||||
GameEventResponse gameEvent = 100;
|
||||
|
||||
ErrorResponse error = 999;
|
||||
}
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "core.proto";
|
||||
|
||||
package ru.m.puzzlez.proto.room;
|
||||
|
||||
message SlotProto {
|
||||
string team = 3;
|
||||
int32 index = 4;
|
||||
}
|
||||
|
||||
message RoomSlotProto {
|
||||
SlotProto slot = 1;
|
||||
ru.m.puzzlez.proto.core.UserProto user = 2;
|
||||
}
|
||||
|
||||
message RoomProto {
|
||||
ru.m.puzzlez.proto.core.GameProto game = 1;
|
||||
ru.m.puzzlez.proto.core.UserProto creator = 2;
|
||||
repeated ru.m.puzzlez.proto.core.UserProto users = 3;
|
||||
repeated RoomSlotProto slots = 4;
|
||||
}
|
||||
|
||||
message CreateRequest {
|
||||
string type = 2;
|
||||
int32 level = 3;
|
||||
}
|
||||
|
||||
message JoinRequest {
|
||||
int32 gameId = 1;
|
||||
bool restore = 2;
|
||||
}
|
||||
|
||||
message LeaveRequest {
|
||||
}
|
||||
|
||||
message SlotRequest {
|
||||
SlotProto slot = 3;
|
||||
}
|
||||
|
||||
message StartRequest {
|
||||
}
|
||||
|
||||
message RoomRequest {
|
||||
oneof content {
|
||||
CreateRequest create = 1;
|
||||
JoinRequest join = 2;
|
||||
LeaveRequest leave = 3;
|
||||
SlotRequest slot = 4;
|
||||
StartRequest start = 5;
|
||||
}
|
||||
}
|
||||
|
||||
message RoomResponse {
|
||||
RoomProto room = 1;
|
||||
}
|
||||
|
||||
message RoomListRequest {
|
||||
bool subscribe = 1;
|
||||
}
|
||||
|
||||
message RoomListResponse {
|
||||
repeated RoomProto rooms = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user