middleware

package
v0.0.0-...-ecb32a1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 22 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyParser

func KeyParser() gin.HandlerFunc

KeyParser injects an unique key from query parameters

func Metrics

func Metrics(c *gin.Context)

func NewLogger

func NewLogger(logger *slog.Logger) gin.HandlerFunc

func OperationParser

func OperationParser() gin.HandlerFunc

OperationParser extracts the operation and add it to the context

func ParametersParser

func ParametersParser() gin.HandlerFunc

ParametersParser matches parameters to query string

func Recover

func Recover(c *gin.Context)

func RestrictIPAddresses

func RestrictIPAddresses(ipAddresses []string) gin.HandlerFunc

func RestrictSizes

func RestrictSizes(sizes []config.AllowedSize) gin.HandlerFunc

func Route

func Route(route string) gin.HandlerFunc

func Security

func Security(secretKey string) gin.HandlerFunc

Security wraps the request and confront sent parameters with secret key

func URLParser

func URLParser(mimetypeDetectorType string, processor *picfit.Processor) gin.HandlerFunc

URLParser extracts the url query string and add a url.URL to the context

Types

type RouteKey

type RouteKey struct{}

Jump to

Keyboard shortcuts

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