Compare commits
19 Commits
3476ecaee0
...
sessions
| Author | SHA1 | Date | |
|---|---|---|---|
|
a18a5c423b
|
|||
|
a3a63a8475
|
|||
|
149ee727ca
|
|||
|
8a5f33b1b4
|
|||
|
62ffc6a365
|
|||
|
1969f9e2fe
|
|||
|
55c8dfd379
|
|||
|
889662bc99
|
|||
|
a9bdcbb1d7
|
|||
|
5f38e94770
|
|||
| 2285e79d6b | |||
|
522731d92a
|
|||
|
b820089a93
|
|||
|
d9db4fefb8
|
|||
|
77d88876f6
|
|||
|
d8f3fd54a6
|
|||
|
0c22f1035e
|
|||
|
e4d6e3882f
|
|||
|
7646d55b34
|
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 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 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ option go_package = "git.itzana.me/strafesnet/go-grpc/validator";
|
||||
package validator;
|
||||
|
||||
service ValidatorMapfixService {
|
||||
rpc Create(MapfixCreate) returns (NullResponse);
|
||||
rpc Create(MapfixCreate) returns (MapfixID);
|
||||
rpc CreateAuditError(AuditErrorRequest) returns (NullResponse);
|
||||
rpc CreateAuditChecklist(AuditChecklistRequest) returns (NullResponse);
|
||||
rpc SetValidatedModel(ValidatedModelRequest) returns (NullResponse);
|
||||
@@ -17,7 +17,7 @@ service ValidatorMapfixService {
|
||||
}
|
||||
|
||||
service ValidatorSubmissionService {
|
||||
rpc Create(SubmissionCreate) returns (NullResponse);
|
||||
rpc Create(SubmissionCreate) returns (SubmissionID);
|
||||
rpc CreateAuditError(AuditErrorRequest) returns (NullResponse);
|
||||
rpc CreateAuditChecklist(AuditChecklistRequest) returns (NullResponse);
|
||||
rpc SetValidatedModel(ValidatedModelRequest) returns (NullResponse);
|
||||
@@ -25,7 +25,7 @@ service ValidatorSubmissionService {
|
||||
rpc SetStatusRequestChanges(SubmissionID) returns (NullResponse);
|
||||
rpc SetStatusValidated(SubmissionID) returns (NullResponse);
|
||||
rpc SetStatusFailed(SubmissionID) returns (NullResponse);
|
||||
rpc SetStatusUploaded(SubmissionID) returns (NullResponse);
|
||||
rpc SetStatusUploaded(StatusUploadedRequest) returns (NullResponse);
|
||||
}
|
||||
|
||||
message MapfixID { uint64 ID = 1; }
|
||||
@@ -84,6 +84,11 @@ message SubmittedRequest {
|
||||
uint32 GameID = 5;
|
||||
}
|
||||
|
||||
message StatusUploadedRequest {
|
||||
uint64 ID = 1;
|
||||
uint64 UploadedAssetID = 2;
|
||||
}
|
||||
|
||||
message NullResponse {}
|
||||
|
||||
// Operations
|
||||
@@ -108,18 +113,25 @@ service ValidatorScriptService {
|
||||
rpc List(ScriptListRequest) returns (ScriptListResponse);
|
||||
}
|
||||
|
||||
enum ResourceType {
|
||||
ResourceTypeNone = 0;
|
||||
ResourceTypeMapfix = 1;
|
||||
ResourceTypeSubmission = 2;
|
||||
}
|
||||
|
||||
message ScriptCreate {
|
||||
string Name = 1;
|
||||
string Source = 2;
|
||||
uint32 ResourceType = 3;
|
||||
ResourceType ResourceType = 3;
|
||||
optional uint64 ResourceID = 4;
|
||||
}
|
||||
|
||||
message ScriptFilter {
|
||||
optional string Name = 1;
|
||||
optional string Source = 2;
|
||||
optional uint32 ResourceType = 3;
|
||||
optional ResourceType ResourceType = 3;
|
||||
optional uint64 ResourceID = 4;
|
||||
optional uint64 Hash = 5;
|
||||
}
|
||||
|
||||
message ScriptListRequest {
|
||||
@@ -134,7 +146,7 @@ message Script {
|
||||
uint64 Hash = 2;
|
||||
string Name = 3;
|
||||
string Source = 4;
|
||||
uint32 ResourceType = 5;
|
||||
ResourceType ResourceType = 5;
|
||||
optional uint64 ResourceID = 6;
|
||||
}
|
||||
|
||||
@@ -147,11 +159,11 @@ service ValidatorScriptPolicyService {
|
||||
}
|
||||
|
||||
enum Policy {
|
||||
None = 0;
|
||||
Allowed = 1;
|
||||
Blocked = 2;
|
||||
Delete = 3;
|
||||
Replace = 4;
|
||||
PolicyNone = 0;
|
||||
PolicyAllowed = 1;
|
||||
PolicyBlocked = 2;
|
||||
PolicyDelete = 3;
|
||||
PolicyReplace = 4;
|
||||
}
|
||||
|
||||
message ScriptPolicyCreate {
|
||||
|
||||
Reference in New Issue
Block a user