middleware

package
v0.0.0-...-93b8502 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorsHandler

func CorsHandler() gin.HandlerFunc

func CustomLogger

func CustomLogger() gin.HandlerFunc

CustomLogger 接收gin框架默认的日志

func CustomRecovery

func CustomRecovery() gin.HandlerFunc

CustomRecovery 自定义错误 (panic) 拦截中间件、对可能发生的错误进行拦截、统一记录

func RequestCostHandler

func RequestCostHandler() gin.HandlerFunc

Types

type PanicExceptionRecord

type PanicExceptionRecord struct{}

PanicExceptionRecord panic等异常记录

func (*PanicExceptionRecord) Write

func (p *PanicExceptionRecord) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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