Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ping ¶
type Ping struct { // example: pong Message string `json:"message"` }
Ping represents ping response swagger:model
type PingEndpoint ¶
type PingEndpoint struct { }
PingEndpoint responds to ping
func (*PingEndpoint) Ping ¶
func (p *PingEndpoint) Ping(c *gin.Context)
Ping check service health
@Tags health @Summary Check service health @Description Endpoint is meant to check service health and returns pong response for every request @Accept json @Produce json @Success 200 {object} infra.Ping @Router /v1/ping [get]
func (*PingEndpoint) RegisterRoutes ¶
func (p *PingEndpoint) RegisterRoutes(r gin.IRoutes)
RegisterRoutes registers ping route
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter limits requests to certain endpoints
func NewRateLimiter ¶
func NewRateLimiter(requestsPerSecond float64) *RateLimiter
NewRateLimiter creates a new RateLimiter
func (*RateLimiter) Handler ¶
func (r *RateLimiter) Handler() gin.HandlerFunc
Handler returns handler func for gin
Click to show internal directories.
Click to hide internal directories.