protobufs/events.proto
itzaname f42e9e75c8
All checks were successful
continuous-integration/drone/push Build is passing
Fix go package paths
2022-07-17 04:42:58 -04:00

48 lines
841 B
Protocol Buffer

syntax = "proto3";
option go_package = "git.itzana.me/strafesnet/go-grpc/events";
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 {
}