middleware

package
v0.0.0-...-5a65518 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoAuthPath = map[string]bool{
	"/api/v1/user/login":  true,
	"/api/v1/user/logout": true,
	"/api/v1/user":        true,
}

Functions

func ApiRequestCounterMetrics

func ApiRequestCounterMetrics() gin.HandlerFunc

func ApiRequestDurationMetrics

func ApiRequestDurationMetrics() gin.HandlerFunc

func ApiRequestTracing

func ApiRequestTracing(c *gin.Context)

func Init

func Init()

func InitUptrace

func InitUptrace(serviceName, version, dsn, env string)

func RequestLimiter

func RequestLimiter(c *gin.Context)

func WrapRequestMiddle

func WrapRequestMiddle(handler GinAction) gin.HandlerFunc

Types

type GinAction

type GinAction func(c *apiContext.ApiContext) model.Response

Jump to

Keyboard shortcuts

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