2024-06-03 12:49:17: merge [main:72fad31e37b51d75b8c23bb36393fb2548694cec];
This commit is contained in:
1 parent
0a91198eb6
commit
bc88a51ec4
28 files changed
+1355
No files matched your search
@@ -0,0 +1,7 @@
|
||||
package domain
|
||||
|
||||
type GrpcError struct {
|
||||
ErrorMessage string `json:"errorMessage"`
|
||||
ErrorCode string `json:"errorCode"`
|
||||
Details []interface{} `json:"details"`
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user