middlewares

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCORS added in v1.2.0

func DefaultCORS() gin.HandlerFunc

DefaultCORS default cors handler

func Logger

func Logger(config *config.ServerConfig) gin.HandlerFunc

Logger log request details

func Metric

func Metric() gin.HandlerFunc

Metric http request metric middleware

func NewCORS added in v1.2.0

func NewCORS(config CORSConfig) gin.HandlerFunc

NewCORS customer cors handler by config

func Recovery

func Recovery() gin.HandlerFunc

Recovery recover application and log panic details once it panics

func SetMetricNamespace added in v1.3.0

func SetMetricNamespace(header string)

SetHttpMetricNamespace set http metric namespace get from which http header default namespace is get from http header: appkey

func Trace

func Trace(config *config.ServerConfig) gin.HandlerFunc

Trace trace incoming request details

Types

type CORSConfig added in v1.2.0

type CORSConfig cors.Config

CORSConfig is an alias of cors.Config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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