14 Commits

Author SHA1 Message Date
a18a5c423b sessions: remove SessionsService.Get
I can't think of any scenario where getting a session by ID is required.
2025-07-25 20:22:08 -07:00
a3a63a8475 sessions: track StyleID 2025-07-25 20:19:47 -07:00
149ee727ca sessions: track GameID 2025-07-25 20:09:09 -07:00
8a5f33b1b4 times: record attempt number to time entry 2025-07-25 19:58:51 -07:00
62ffc6a365 sessions: aggregate request 2025-07-25 19:49:31 -07:00
1969f9e2fe sessions: extend with attempts 2025-07-25 19:46:17 -07:00
55c8dfd379 sessions 2025-07-25 19:43:10 -07:00
889662bc99 maps_extended: IncrementLoadCount function
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-23 19:59:31 -07:00
a9bdcbb1d7 maps_extended: include Modes in MapCreate
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-23 18:17:59 -07:00
5f38e94770 refactor maps_extended
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-21 22:40:45 -07:00
2285e79d6b Maps For maps-service (#6)
All checks were successful
continuous-integration/drone/push Build is passing
New service with extended maps fields.

Reviewed-on: #6
Co-authored-by: Quaternions <krakow20@gmail.com>
Co-committed-by: Quaternions <krakow20@gmail.com>
2025-07-22 05:01:15 +00:00
522731d92a Revert "rename maps to maps_embedded"
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit 77d88876f6.
2025-07-21 21:55:13 -07:00
b820089a93 Revert "use maps_embedded in times and servers"
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit d9db4fefb8.
2025-07-21 21:53:53 -07:00
d9db4fefb8 use maps_embedded in times and servers
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-21 21:01:11 -07:00
4 changed files with 163 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
syntax = "proto3";
option go_package = "git.itzana.me/strafesnet/go-grpc/maps_embedded";
option go_package = "git.itzana.me/strafesnet/go-grpc/maps";
package maps_embedded;
package maps;
service MapsService {
rpc Get(IdMessage) returns (MapResponse);
@@ -24,17 +24,22 @@ message IdMessage {
message MapResponse {
int64 ID = 1;
string DisplayName = 2;
string Creator = 3;
int32 GameID = 4;
int64 Date = 5;
}
message MapRequest {
int64 ID = 1;
optional string DisplayName = 2;
optional string Creator = 3;
optional int32 GameID = 4;
optional int64 Date = 5;
}
message MapFilter {
optional string DisplayName = 2;
optional string Creator = 3;
optional int32 GameID = 4;
}
@@ -53,4 +58,5 @@ message Pagination {
}
message NullResponse {
}
}

82
maps_extended.proto Normal file
View 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
View 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 {}

View File

@@ -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 {
}
}