generated from VLADIMIR/template
add games operations
This commit is contained in:
+116
-1
@@ -323,6 +323,58 @@ service EveningDetectiveServer {
|
||||
summary: "Удалить точку сценария";
|
||||
};
|
||||
}
|
||||
|
||||
rpc AddGame(AddGameReq) returns (AddGameRsp) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/games"
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags : "Игры";
|
||||
summary: "Создать игру";
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetGames(GetGamesReq) returns (GetGamesRsp) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/games"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags : "Игры";
|
||||
summary: "Получить игры";
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetGame(GetGameReq) returns (GetGameRsp) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/games/{id}"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags : "Игры";
|
||||
summary: "Получить игру";
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateGame(UpdateGameReq) returns (UpdateGameRsp) {
|
||||
option (google.api.http) = {
|
||||
put : "/api/games/{id}"
|
||||
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}"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags : "Игры";
|
||||
summary: "Удалить игру";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message PingReq {}
|
||||
@@ -582,4 +634,67 @@ message DeleteScenarioPlaceReq {
|
||||
|
||||
message DeleteScenarioPlaceRsp {
|
||||
string error = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message AddGameReq {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
google.protobuf.Timestamp start_at = 3;
|
||||
int32 scenario_id = 4;
|
||||
}
|
||||
|
||||
message AddGameRsp {
|
||||
string error = 1;
|
||||
int32 id = 2;
|
||||
}
|
||||
|
||||
message GetGamesReq {}
|
||||
|
||||
message GetGamesRsp {
|
||||
string error = 1;
|
||||
repeated Game games = 2;
|
||||
}
|
||||
|
||||
message Game {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
google.protobuf.Timestamp start_at = 4;
|
||||
string status = 5;
|
||||
Scenario scenario = 6;
|
||||
repeated Team teams = 7;
|
||||
}
|
||||
|
||||
message Team {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message GetGameReq {
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message GetGameRsp {
|
||||
string error = 1;
|
||||
Game game = 2;
|
||||
}
|
||||
|
||||
message UpdateGameReq {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
google.protobuf.Timestamp start_at = 4;
|
||||
int32 scenario_id = 5;
|
||||
}
|
||||
|
||||
message UpdateGameRsp {
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message DeleteGameReq {
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteGameRsp {
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user