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.
Click to show internal directories.
Click to hide internal directories.