midware

package
v0.0.0-...-4156d8f Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REQEUST_ID = "_REQEUST_ID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogHttpUtil

type LogHttpUtil struct {
	Logger      xlog.Logger
	LogRespBody bool
}

func NewLogHttpUtil

func NewLogHttpUtil(conf fig.Properties, logger xlog.Logger) *LogHttpUtil

func (*LogHttpUtil) LogHttp

func (util *LogHttpUtil) LogHttp() gin.HandlerFunc

type RecoveryUtil

type RecoveryUtil struct {
	Logger       xlog.Logger
	PanicHandler func(ctx *gin.Context, err interface{})
}

func (*RecoveryUtil) Recovery

func (u *RecoveryUtil) Recovery() gin.HandlerFunc

type RequestBodyLogWriter

type RequestBodyLogWriter struct {
	Logger xlog.Logger
	V      binding.StructValidator
}

func (*RequestBodyLogWriter) Engine

func (v *RequestBodyLogWriter) Engine() interface{}

func (*RequestBodyLogWriter) ValidateStruct

func (v *RequestBodyLogWriter) ValidateStruct(obj interface{}) error

type ResponseBodyLogWriter

type ResponseBodyLogWriter struct {
	gin.ResponseWriter
	// contains filtered or unexported fields
}

func (*ResponseBodyLogWriter) Write

func (w *ResponseBodyLogWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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