2024-06-03 12:49:17: merge [main:72fad31e37b51d75b8c23bb36393fb2548694cec];

This commit is contained in:
txix committed 2024-06-03 12:49:17 +03:00
1 parent 0a91198eb6
commit bc88a51ec4
28 files changed
+1355

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
package domain
type GrpcError struct {
ErrorMessage string `json:"errorMessage"`
ErrorCode string `json:"errorCode"`
Details []interface{} `json:"details"`
}
+16
View File
@@ -0,0 +1,16 @@
package domain
type LockRequest struct {
Key string `validate:"required"`
TTLInSec int `validate:"required"`
}
type UnLockRequest struct {
Key string `validate:"required"`
LockKey string `validate:"required"`
}
type LockResponse struct {
// nolint: tagliatelle
LockKey string `json:",omitempty"`
}
+16
View File
@@ -0,0 +1,16 @@
package domain
import (
"time"
)
type RateLimiterRequest struct {
Key string `validate:"required"`
MaxRps int `validate:"required"`
}
type RateLimiterResponse struct {
Allow bool
Remaining int
RetryAfter time.Duration
}