adapter

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (http.Handler, func(h http.Handler) gin.HandlerFunc)

New returns a handler to be passed to middleware which will ensure the next handler in the chain is called correctly, along with a function that wraps the middleware's handler into a gin.HandlerFunc to be passed to Engine.Use.

If the middleware does not call the handler it's wrapping, Abort is called on the Gin context.

func Wrap

func Wrap(f func(h http.Handler) http.Handler) gin.HandlerFunc

Wrap takes the common HTTP middleware function signature, calls it to generate a handler, and wraps it into a Gin middleware handler.

This is just a convenience wrapper around New.

Types

This section is empty.

Jump to

Keyboard shortcuts

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