middleware

package
v0.7.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RateLimitMiddleware added in v0.7.0

func RateLimitMiddleware(conf *config.Configuration) gin.HandlerFunc

RateLimitMiddleware creates a middleware for rate limiting using Tollbooth. It sets up rate limiting based on the configuration parameters and applies it to incoming requests.

Parameters: - conf: The configuration object containing rate limit settings.

Returns: - gin.HandlerFunc: A middleware function that applies rate limiting to requests.

func SecretKeyAuthMiddleware

func SecretKeyAuthMiddleware() gin.HandlerFunc

SecretKeyAuthMiddleware creates a middleware for validating secret keys. It checks the request header for a valid secret key and aborts the request if the key is missing or invalid.

Returns: - gin.HandlerFunc: A middleware function that validates the secret key in the request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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