From 1d5a96d48fb9faaa92d8bab51563e70d731dc6d9 Mon Sep 17 00:00:00 2001 From: itzaname Date: Sun, 16 Oct 2022 19:37:06 -0400 Subject: [PATCH] Add ranks --- ranks.proto | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ranks.proto diff --git a/ranks.proto b/ranks.proto new file mode 100644 index 0000000..5bb2871 --- /dev/null +++ b/ranks.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +import "users.proto"; + +option go_package = "git.itzana.me/strafesnet/go-grpc/ranks"; + +package ranks; + +service RanksService { + rpc Get(GetRequest) returns (RankMessage); + rpc List(ListRequest) returns (RankList); + rpc Delete(IdMessage) returns (IdMessage); +} + +message IdMessage { + int64 ID = 1; +} + +message GetRequest { + int64 UserID = 1; + int64 StyleID = 2; + int64 GameID = 3; + int64 ModeID = 4; +} + +message ListRequest { + int64 StyleID = 1; + int64 GameID = 2; + int64 ModeID = 3; + int64 Sort = 4; + Pagination Page = 5; +} + +message RankList { + repeated RankMessage ranks = 1; +} + +message RankMessage { + int64 ID = 1; + users.UserResponse User = 2; + int64 StyleID = 3; + int64 ModeID = 4; + int64 GameID = 5; + double Rank = 6; + double Skill = 7; + int64 UpdatedAt = 8; +} + +message Pagination { + int32 Size = 1; + int32 Number = 2; +} + +message NullResponse { + +} \ No newline at end of file