infra

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 4 Imported by: 0

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 NewPingEndpoint

func NewPingEndpoint() *PingEndpoint

NewPingEndpoint creates ping endpoint

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL