middleware

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyMiddleware

func APIKeyMiddleware(config APIKeyConfig) gin.HandlerFunc

APIKeyMiddleware creates a middleware function to validate API keys

func CustomContextMiddleware added in v0.0.3

func CustomContextMiddleware() gin.HandlerFunc

CustomContextMiddleware adds custom context to all requests

func TenantValidationMiddleware added in v0.0.3

func TenantValidationMiddleware() gin.HandlerFunc

func TracingMiddleware added in v0.0.3

func TracingMiddleware() gin.HandlerFunc

TracingMiddleware creates a new span for each request and adds common tags

func UserIdMiddleware added in v0.1.3

func UserIdMiddleware() gin.HandlerFunc

Types

type APIKeyConfig

type APIKeyConfig struct {
	HeaderName  string
	ValidAPIKey string
}

APIKeyConfig holds the configuration for API key authentication

Jump to

Keyboard shortcuts

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