protobufs/events.proto

48 lines
847 B
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/events";
2022-07-17 01:09:09 +00:00
package events;
import "google/protobuf/struct.proto";
service EventsService {
rpc Latest(LatestRequest) returns (LatestResponse);
rpc Create(EventCreate) returns (NullResponse);
rpc Clean(NullResponse) returns (NullResponse);
}
message EventCreate {
string Event = 1;
string Server = 2;
int32 GameID = 3;
int64 Date = 4;
google.protobuf.Struct Data = 5;
}
message EventItem {
int64 ID = 1;
string Event = 2;
string Server = 3;
int32 GameID = 4;
int64 Date = 5;
google.protobuf.Struct Data = 6;
}
message LatestRequest {
optional int64 LastID = 1;
Pagination Page = 2;
}
message Pagination {
int32 Size = 1;
int32 Number = 2;
}
message LatestResponse {
repeated EventItem Events = 1;
}
message NullResponse {
}