middleware

package
v0.0.0-...-23502e9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func JwtAuthMiddleware

func JwtAuthMiddleware(secret string, cache cache.RedisCache) gin.HandlerFunc

func New

func New(config Config) gin.HandlerFunc

func PrometheusMiddleware

func PrometheusMiddleware() gin.HandlerFunc

func RateLimitMiddleware

func RateLimitMiddleware(env *bootstrap.Env) gin.HandlerFunc

Types

type Config

type Config struct {
	Namespace  string
	Subsystem  string
	Name       string
	Help       string
	InstanceID string
}

func DefaultConfig

func DefaultConfig() Config

Jump to

Keyboard shortcuts

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