middleware

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger() server.HandlerFn

func NewMiddlewares

func NewMiddlewares() []server.HandlerFn

func Recovery

func Recovery() server.HandlerFn

func Trace

func Trace() server.HandlerFn

Types

type LogFormatterParams

type LogFormatterParams struct {
	StatusCode   int                    `json:"http_code"`
	ClientIP     string                 `json:"ip"`
	Method       string                 `json:"method"`
	Path         string                 `json:"path"`
	ErrorMessage string                 `json:"error_msg"`
	Keys         map[string]interface{} `json:"keys"`
	Params       string                 `json:"params"`
	TimeoutQuota float64                `json:"timeout_quota"`
	BodySize     int                    `json:"body_size"`
	Latency      int64                  `json:"latency"`
}

Jump to

Keyboard shortcuts

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