63 lines
1.1 KiB
Protocol Buffer
63 lines
1.1 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
|
||
|
option go_package = "pkg/rpc/maps";
|
||
|
|
||
|
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 {
|
||
|
|
||
|
}
|