middlewares

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type APIRateLimiterMiddleware

type APIRateLimiterMiddleware struct {
	Rate int
}

func (APIRateLimiterMiddleware) RateLimit

func (a APIRateLimiterMiddleware) RateLimit(c *gin.Context)

type APIValidationMiddleware

type APIValidationMiddleware struct {
	HeaderField string
	// contains filtered or unexported fields
}

func (APIValidationMiddleware) Validate

func (a APIValidationMiddleware) Validate(c *gin.Context)

type IRateLimiter

type IRateLimiter interface {
	RateLimit(*gin.Context)
}

func NewAPIRateLimiterMiddleware

func NewAPIRateLimiterMiddleware(env lib.Env) IRateLimiter

type IValidator

type IValidator interface {
	Validate(c *gin.Context)
}

func NewAPIValidationMiddleware

func NewAPIValidationMiddleware(env lib.Env) IValidator

Jump to

Keyboard shortcuts

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