middleware

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(handler gin.HandlerFunc, skippers ...Skipper) gin.HandlerFunc

New make a middleware

Types

type Skipper

type Skipper func(*http.Request) bool

Skipper defines a function to skip middleware. Returning true skips processing the middleware.

func MethodAndPathSkipper

func MethodAndPathSkipper(method string, re *regexp.Regexp) Skipper

MethodAndPathSkipper returns skipper which will skip the middleware when r.Method equals the method and r.URL.Path matches the re when method is "*" it equals all http method

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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