WIP: Session Statistics Prototype #10
67
sessions.proto
Normal file
67
sessions.proto
Normal file
@@ -0,0 +1,67 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "git.itzana.me/strafesnet/go-grpc/sessions";
|
||||
|
||||
package sessions;
|
||||
|
||||
service SessionsService {
|
||||
rpc Create(SessionCreate) returns (SessionId);
|
||||
rpc List(ListRequest) returns (SessionList);
|
||||
rpc Aggregate(SessionFilter) returns (SessionAggregate);
|
||||
}
|
||||
|
||||
message SessionIdList { repeated int64 ID = 1; }
|
||||
|
||||
message SessionId { int64 ID = 1; }
|
||||
|
||||
message SessionResponse {
|
||||
int64 ID = 1;
|
||||
uint64 UserID = 2;
|
||||
uint64 MapID = 3;
|
||||
int64 Date = 4;
|
||||
uint32 Duration = 5;
|
||||
uint32 Attempts = 6;
|
||||
uint32 GameID = 7;
|
||||
uint32 StyleID = 8;
|
||||
}
|
||||
|
||||
message SessionCreate {
|
||||
uint64 UserID = 1;
|
||||
uint64 MapID = 2;
|
||||
int64 Date = 3;
|
||||
uint32 Duration = 4;
|
||||
uint32 Attempts = 5;
|
||||
uint32 GameID = 6;
|
||||
uint32 StyleID = 7;
|
||||
}
|
||||
|
||||
enum SessionSort {
|
||||
SessionSortDateDescending = 0;
|
||||
}
|
||||
|
||||
message SessionFilter {
|
||||
optional uint64 UserID = 1;
|
||||
optional uint64 MapID = 2;
|
||||
optional uint32 GameID = 3;
|
||||
optional uint32 StyleID = 4;
|
||||
}
|
||||
|
||||
message SessionList { repeated SessionResponse Sessions = 1; }
|
||||
|
||||
message ListRequest {
|
||||
SessionFilter Filter = 1;
|
||||
Pagination Page = 2;
|
||||
Sort SessionSort = 3;
|
||||
}
|
||||
|
||||
message Pagination {
|
||||
uint32 Size = 1;
|
||||
uint32 Number = 2;
|
||||
}
|
||||
|
||||
message SessionAggregate {
|
||||
uint64 Duration = 1;
|
||||
uint64 Attempts = 2;
|
||||
}
|
||||
|
||||
message NullResponse {}
|
||||
@@ -28,6 +28,7 @@ message TimeRequest {
|
||||
optional int32 StyleID = 6;
|
||||
optional int32 ModeID = 7;
|
||||
optional int32 GameID = 8;
|
||||
optional uint32 Attempt = 9;
|
||||
}
|
||||
|
||||
message TimeFilter {
|
||||
@@ -51,6 +52,9 @@ message TimeResponse {
|
||||
int32 StyleID = 7;
|
||||
int32 ModeID = 8;
|
||||
int32 GameID = 9;
|
||||
// How many times did the player leave the start zone
|
||||
// during their full play history of the map
|
||||
uint32 Attempt = 10;
|
||||
}
|
||||
|
||||
message IdMessage {
|
||||
@@ -100,4 +104,4 @@ message Pagination {
|
||||
|
||||
message NullResponse {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user