middlewares

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

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