middleware

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorLogger

func ErrorLogger() gin.HandlerFunc

ErrorLogger returns a handlerfunc for any error type.

func ErrorLoggerT

func ErrorLoggerT(typ gin.ErrorType) gin.HandlerFunc

ErrorLoggerT returns a handlerfunc for a given error type.

func Logger

func Logger() gin.HandlerFunc

Logger instances a Logger middleware that will write the logs to gin.DefaultWriter. By default gin.DefaultWriter = os.Stdout.

func LoggerWithConfig

func LoggerWithConfig(conf log2.LoggerConfig) gin.HandlerFunc

LoggerWithConfig instance a Logger middleware with config.

func LoggerWithFormatter

func LoggerWithFormatter(f log2.LogFormatter, logger *log.Logger, hasErr bool) gin.HandlerFunc

LoggerWithFormatter instance a Logger middleware with the specified log format function.

func SetLog

func SetLog(app *gin.Engine, logger2 *log.Logger, errHandle bool)

Types

type ModName added in v1.5.11

type ModName string

func (ModName) ApiDocMiddle added in v1.5.11

func (m ModName) ApiDocMiddle(ctx *gin.Context)

Jump to

Keyboard shortcuts

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