3 Commits

Author SHA1 Message Date
6497b12c5b Add wr list rpc
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-23 23:22:17 -04:00
a1d08b3ea6 Add application owner info
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-22 10:50:47 -04:00
82ca9f2b0c Add dev service
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-22 10:19:28 -04:00
2 changed files with 40 additions and 0 deletions

34
dev.proto Normal file
View File

@@ -0,0 +1,34 @@
syntax = "proto3";
option go_package = "git.itzana.me/strafesnet/go-grpc/dev";
package dev;
service DevService {
rpc Validate(APIValidationRequest) returns (APIValidationResponse);
}
message APIValidationRequest {
string Service = 1;
string Permission = 2;
string Key = 3;
}
message APIValidationResponse {
// Response
bool Valid = 1;
string ErrorMessage = 2;
int32 StatusCode = 3;
// Remaining limits
uint64 RemainingBurst = 4;
uint64 RemainingDaily = 5;
uint64 RemainingMonthly = 6;
// Quota
uint64 BurstLimit = 7;
uint64 BurstDurationSeconds = 8;
uint64 DailyLimit = 9;
uint64 MonthlyLimit = 10;
// Owner info
uint64 UserID = 11;
string Application = 12;
}

View File

@@ -14,6 +14,7 @@ service TimesService {
rpc Delete(IdMessage) returns (NullResponse);
rpc Get(IdMessage) returns (TimeResponse);
rpc List(ListRequest) returns (TimeList);
rpc ListWr(WrListRequest) returns (TimeList);
rpc Rank(IdMessage) returns (RankResponse);
}
@@ -77,6 +78,11 @@ message ListRequest {
uint32 Sort = 4;
}
message WrListRequest {
TimeFilter Filter = 1;
Pagination Page = 2;
}
message Pagination {
int32 Size = 1;
int32 Number = 2;