add game statuses

This commit is contained in:
2026-08-04 00:46:33 +07:00
parent 2492910e01
commit ae3a8c809f
9 changed files with 1446 additions and 125 deletions
+76
View File
@@ -366,6 +366,50 @@ service EveningDetectiveServer {
};
}
rpc StartGame(StartGameReq) returns (StartGameRsp) {
option (google.api.http) = {
put : "/api/games/{id}/start"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Игры";
summary: "Начать игру";
};
}
rpc PauseGame(PauseGameReq) returns (PauseGameRsp) {
option (google.api.http) = {
put : "/api/games/{id}/pause"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Игры";
summary: "Остановить игру";
};
}
rpc FinishGame(FinishGameReq) returns (FinishGameRsp) {
option (google.api.http) = {
put : "/api/games/{id}/finish"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Игры";
summary: "Закончить игру";
};
}
rpc ResetGame(ResetGameReq) returns (ResetGameRsp) {
option (google.api.http) = {
put : "/api/games/{id}/reset"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags : "Игры";
summary: "Сбросить игру";
};
}
rpc DeleteGame(DeleteGameReq) returns (DeleteGameRsp) {
option (google.api.http) = {
delete: "/api/games/{id}"
@@ -775,6 +819,38 @@ message UpdateGameRsp {
string error = 1;
}
message StartGameReq {
int32 id = 1;
}
message StartGameRsp {
string error = 1;
}
message PauseGameReq {
int32 id = 1;
}
message PauseGameRsp {
string error = 1;
}
message FinishGameReq {
int32 id = 1;
}
message FinishGameRsp {
string error = 1;
}
message ResetGameReq {
int32 id = 1;
}
message ResetGameRsp {
string error = 1;
}
message DeleteGameReq {
int32 id = 1;
}