middleware

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(conf LogConfig) gin.HandlerFunc

GetLogger retunrn access logger

func GetTracer

func GetTracer() gin.HandlerFunc

GetTracer ...

Types

type LogConfig

type LogConfig struct {
	OutPut io.Writer
}

LogConfig log configure

type ParamData

type ParamData struct {
	Request  *http.Request
	TimeNow  time.Time
	Latency  time.Duration
	HTTPCode int
	// ClientIP equals Context's ClientIP method.
	ClientIP string
	// Method is the HTTP method given to the request.
	Method string
	// Path is a path the client requests.
	Path string
	// ErrorMessage is set if error has occurred in processing the request.
	ErrorMessage string
}

ParamData ...

Jump to

Keyboard shortcuts

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