middlewares

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogMiddleware

func AccessLogMiddleware(f func(c *gin.Context, err interface{})) gin.HandlerFunc

func RequestUuidMiddleware

func RequestUuidMiddleware() gin.HandlerFunc

Types

type RequestContext

type RequestContext struct {
	Method string                 `json:"method"`
	Path   string                 `json:"path"`
	Query  string                 `json:"query"`
	Body   map[string]interface{} `json:"body"`
	Header map[string]interface{} `json:"headers"`
}

Define custom request context format for logger

type ResponseContext

type ResponseContext struct {
	Method string                 `json:"method"`
	Path   string                 `json:"path"`
	Query  string                 `json:"query"`
	Body   string                 `json:"body"`
	Header map[string]interface{} `json:"headers"`
}

Jump to

Keyboard shortcuts

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