17 lines
241 B
Go
17 lines
241 B
Go
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
|
|
}
|