protobufs/maps.proto

63 lines
1.1 KiB
Protocol Buffer
Raw Permalink Normal View History

2022-07-17 01:09:09 +00:00
syntax = "proto3";
2022-07-17 08:42:58 +00:00
option go_package = "git.itzana.me/strafesnet/go-grpc/maps";
2022-07-17 01:09:09 +00:00
package maps;
service MapsService {
rpc Get(IdMessage) returns (MapResponse);
rpc GetList(IdList) returns (MapList);
rpc Update(MapRequest) returns (NullResponse);
rpc Create(MapRequest) returns (IdMessage);
rpc Delete(IdMessage) returns (NullResponse);
rpc List(ListRequest) returns (MapList);
}
message IdList {
repeated int64 ID = 1;
}
message IdMessage {
int64 ID = 1;
}
message MapResponse {
int64 ID = 1;
string DisplayName = 2;
string Creator = 3;
int32 GameID = 4;
int64 Date = 5;
}
message MapRequest {
int64 ID = 1;
optional string DisplayName = 2;
optional string Creator = 3;
optional int32 GameID = 4;
optional int64 Date = 5;
}
message MapFilter {
int64 ID = 1;
optional string DisplayName = 2;
optional string Creator = 3;
optional int32 GameID = 4;
}
message MapList {
repeated MapResponse Maps = 1;
}
message ListRequest {
MapFilter Filter = 1;
Pagination Page = 2;
}
message Pagination {
int32 Size = 1;
int32 Number = 2;
}
message NullResponse {
}