protobufs/servers.proto

80 lines
1.5 KiB
Protocol Buffer
Raw Normal View History

2022-07-17 01:09:09 +00:00
syntax = "proto3";
2022-07-17 01:41:57 +00:00
option go_package = "git.itzana.me/strafesnet/protobufs/rpc/servers";
2022-07-17 01:09:09 +00:00
2022-07-17 06:23:42 +00:00
import "users.proto";
import "maps.proto";
2022-07-17 01:09:09 +00:00
package servers;
service ServerService {
rpc Create(ServerCreate) returns (NullResponse);
rpc Update(ServerUpdate) returns (NullResponse);
rpc Delete(IdMessage) returns (NullResponse);
rpc Get(IdMessage) returns (ServerItem);
rpc List(ServerListRequest) returns (ServerList);
}
message ServerList {
repeated ServerItem Servers = 1;
}
message IdMessage {
string ID = 1;
}
message ServerCreate {
string ID = 1;
int64 PlaceID = 2;
int64 StartTime = 3;
string VipServerID = 4;
int64 UserID = 5;
int32 GameID = 6;
int64 MapID = 7;
int64 MapDate = 8;
repeated int64 PlayerList = 9;
int64 LastUpdate = 10;
}
message ServerItem {
string ID = 1;
int64 PlaceID = 2;
int64 StartTime = 3;
string VipServerID = 4;
users.UserResponse User = 5;
int32 GameID = 6;
maps.MapResponse Map = 7;
int64 MapDate = 8;
repeated int64 PlayerList = 9;
int64 LastUpdate = 10;
}
message ServerUpdate {
string ID = 1;
optional int64 MapID = 2;
optional int64 MapDate = 3;
repeated int64 PlayerList = 4;
}
message ServerFilter {
optional string ID = 1;
optional int64 PlaceID = 2;
optional string VipServerID = 4;
optional int64 UserID = 5;
optional int32 GameID = 6;
optional int64 MapID = 7;
}
message Pagination {
int32 Size = 1;
int32 Number = 2;
}
message ServerListRequest {
ServerFilter Filter = 1;
Pagination Page = 2;
}
message NullResponse {
}