2022-07-17 01:09:09 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2022-07-17 06:23:42 +00:00
|
|
|
import "users.proto";
|
|
|
|
import "maps.proto";
|
|
|
|
import "bots.proto";
|
2022-07-17 01:09:09 +00:00
|
|
|
|
2022-07-17 08:42:58 +00:00
|
|
|
option go_package = "git.itzana.me/strafesnet/go-grpc/times";
|
2022-07-17 01:09:09 +00:00
|
|
|
|
|
|
|
package times;
|
|
|
|
|
|
|
|
service TimesService {
|
|
|
|
rpc Create(TimeRequest) returns (IdMessage);
|
|
|
|
rpc Update(TimeRequest) returns (NullResponse);
|
|
|
|
rpc Delete(IdMessage) returns (NullResponse);
|
|
|
|
rpc Get(IdMessage) returns (TimeResponse);
|
|
|
|
rpc List(ListRequest) returns (TimeList);
|
|
|
|
rpc Rank(IdMessage) returns (RankResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message TimeRequest {
|
|
|
|
int64 ID = 1;
|
|
|
|
optional int64 Time = 2;
|
|
|
|
optional int64 UserID = 3;
|
|
|
|
optional int64 MapID = 4;
|
|
|
|
optional int64 Date = 5;
|
|
|
|
optional int32 StyleID = 6;
|
|
|
|
optional int32 ModeID = 7;
|
|
|
|
optional int32 GameID = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TimeFilter {
|
|
|
|
optional int64 ID = 1;
|
|
|
|
optional int64 Time = 2;
|
|
|
|
optional int64 UserID = 3;
|
|
|
|
optional int64 MapID = 4;
|
|
|
|
optional int64 Date = 5;
|
|
|
|
optional int32 StyleID = 6;
|
|
|
|
optional int32 ModeID = 7;
|
|
|
|
optional int32 GameID = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TimeResponse {
|
|
|
|
int64 ID = 1;
|
|
|
|
int64 Time = 2;
|
|
|
|
users.UserResponse User = 3;
|
|
|
|
maps.MapResponse Map = 4;
|
|
|
|
optional bots.BotResponse Bot = 5;
|
|
|
|
int64 Date = 6;
|
|
|
|
int32 StyleID = 7;
|
|
|
|
int32 ModeID = 8;
|
|
|
|
int32 GameID = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IdMessage {
|
|
|
|
int64 ID = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TimeList {
|
|
|
|
repeated TimeResponse Times = 1;
|
|
|
|
int64 Total = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RankResponse {
|
|
|
|
int64 Rank = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListRequest {
|
|
|
|
TimeFilter Filter = 1;
|
|
|
|
bool Blacklisted = 2;
|
|
|
|
Pagination Page = 3;
|
2023-03-19 19:06:55 +00:00
|
|
|
uint32 Sort = 4;
|
2022-07-17 01:09:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Pagination {
|
|
|
|
int32 Size = 1;
|
|
|
|
int32 Number = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NullResponse {
|
|
|
|
|
|
|
|
}
|