middleware

package
v0.0.0-...-3363d21 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func CopyBodyMiddleware

func CopyBodyMiddleware(skippers ...SkipperFunc) gin.HandlerFunc

func EmptyMiddleware

func EmptyMiddleware() gin.HandlerFunc

func JoinRouter

func JoinRouter(method, path string) string

func LoggerMiddleware

func LoggerMiddleware(skippers ...SkipperFunc) gin.HandlerFunc

func MaxAllowed

func MaxAllowed(n int) gin.HandlerFunc

func NewTraceID

func NewTraceID() string

func NoMethodHandler

func NoMethodHandler() gin.HandlerFunc

func NoRouteHandler

func NoRouteHandler() gin.HandlerFunc

func RateLimiterMiddleware

func RateLimiterMiddleware(skippers ...SkipperFunc) gin.HandlerFunc

func RecoveryMiddleware

func RecoveryMiddleware() gin.HandlerFunc

func SkipHandler

func SkipHandler(c *gin.Context, skippers ...SkipperFunc) bool

func TraceMiddleware

func TraceMiddleware(skippers ...SkipperFunc) gin.HandlerFunc

Types

type SkipperFunc

type SkipperFunc func(*gin.Context) bool

func AllowMethodAndPathPrefixSkipper

func AllowMethodAndPathPrefixSkipper(prefixes ...string) SkipperFunc

func AllowPathPrefixNoSkipper

func AllowPathPrefixNoSkipper(prefixes ...string) SkipperFunc

func AllowPathPrefixSkipper

func AllowPathPrefixSkipper(prefixes ...string) SkipperFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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