middleware

package
v0.0.0-...-2499e25 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotFoundHandler

func NotFoundHandler() gin.HandlerFunc

func TimeoutHandler

func TimeoutHandler(timeout time.Duration) func(c *gin.Context)

TimeoutHandler server timeout middleware wraps the request context with a timeout 中间件参考go-chi/chi库 https://github.com/go-chi/chi/blob/master/middleware/timeout.go

Types

type LogWare

type LogWare struct{}

func (*LogWare) Access

func (ware *LogWare) Access() gin.HandlerFunc

func (*LogWare) Recover

func (ware *LogWare) Recover() gin.HandlerFunc

请求处理中遇到异常或panic捕获

Jump to

Keyboard shortcuts

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