Compare commits
15 Commits
d8f3fd54a6
...
sessions
| Author | SHA1 | Date | |
|---|---|---|---|
|
a18a5c423b
|
|||
|
a3a63a8475
|
|||
|
149ee727ca
|
|||
|
8a5f33b1b4
|
|||
|
62ffc6a365
|
|||
|
1969f9e2fe
|
|||
|
55c8dfd379
|
|||
|
889662bc99
|
|||
|
a9bdcbb1d7
|
|||
|
5f38e94770
|
|||
| 2285e79d6b | |||
|
522731d92a
|
|||
|
b820089a93
|
|||
|
d9db4fefb8
|
|||
|
77d88876f6
|
82
maps_extended.proto
Normal file
82
maps_extended.proto
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
option go_package = "git.itzana.me/strafesnet/go-grpc/maps_extended";
|
||||||
|
|
||||||
|
package maps_extended;
|
||||||
|
|
||||||
|
service MapsService {
|
||||||
|
rpc Get(MapId) returns (MapResponse);
|
||||||
|
rpc GetList(MapIdList) returns (MapList);
|
||||||
|
rpc Update(MapUpdate) returns (NullResponse);
|
||||||
|
rpc Create(MapCreate) returns (MapId);
|
||||||
|
rpc Delete(MapId) returns (NullResponse);
|
||||||
|
rpc List(ListRequest) returns (MapList);
|
||||||
|
rpc IncrementLoadCount(MapId) returns (NullResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
message MapIdList { repeated int64 ID = 1; }
|
||||||
|
|
||||||
|
message MapId { int64 ID = 1; }
|
||||||
|
|
||||||
|
message MapResponse {
|
||||||
|
int64 ID = 1;
|
||||||
|
string DisplayName = 2;
|
||||||
|
string Creator = 3;
|
||||||
|
uint32 GameID = 4;
|
||||||
|
int64 Date = 5;
|
||||||
|
int64 CreatedAt = 6;
|
||||||
|
int64 UpdatedAt = 7;
|
||||||
|
uint64 Submitter = 8;
|
||||||
|
uint64 Thumbnail = 9;
|
||||||
|
uint64 AssetVersion = 10;
|
||||||
|
uint32 LoadCount = 11;
|
||||||
|
uint32 Modes = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MapCreate {
|
||||||
|
int64 ID = 1;
|
||||||
|
string DisplayName = 2;
|
||||||
|
string Creator = 3;
|
||||||
|
uint32 GameID = 4;
|
||||||
|
int64 Date = 5;
|
||||||
|
// int64 CreatedAt = 6;
|
||||||
|
// int64 UpdatedAt = 7;
|
||||||
|
uint64 Submitter = 6;
|
||||||
|
uint64 Thumbnail = 7;
|
||||||
|
uint64 AssetVersion = 8;
|
||||||
|
// uint32 LoadCount = 11;
|
||||||
|
uint32 Modes = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MapUpdate {
|
||||||
|
int64 ID = 1;
|
||||||
|
optional string DisplayName = 2;
|
||||||
|
optional string Creator = 3;
|
||||||
|
optional uint32 GameID = 4;
|
||||||
|
optional int64 Date = 5;
|
||||||
|
optional uint64 Submitter = 6;
|
||||||
|
optional uint64 Thumbnail = 7;
|
||||||
|
optional uint64 AssetVersion = 8;
|
||||||
|
optional uint32 Modes = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MapFilter {
|
||||||
|
optional string DisplayName = 2;
|
||||||
|
optional string Creator = 3;
|
||||||
|
optional uint32 GameID = 4;
|
||||||
|
optional uint64 Submitter = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MapList { repeated MapResponse Maps = 1; }
|
||||||
|
|
||||||
|
message ListRequest {
|
||||||
|
MapFilter Filter = 1;
|
||||||
|
Pagination Page = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Pagination {
|
||||||
|
uint32 Size = 1;
|
||||||
|
uint32 Number = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NullResponse {}
|
||||||
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 StyleID = 6;
|
||||||
optional int32 ModeID = 7;
|
optional int32 ModeID = 7;
|
||||||
optional int32 GameID = 8;
|
optional int32 GameID = 8;
|
||||||
|
optional uint32 Attempt = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TimeFilter {
|
message TimeFilter {
|
||||||
@@ -51,6 +52,9 @@ message TimeResponse {
|
|||||||
int32 StyleID = 7;
|
int32 StyleID = 7;
|
||||||
int32 ModeID = 8;
|
int32 ModeID = 8;
|
||||||
int32 GameID = 9;
|
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 {
|
message IdMessage {
|
||||||
@@ -100,4 +104,4 @@ message Pagination {
|
|||||||
|
|
||||||
message NullResponse {
|
message NullResponse {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user