package
1.0.4
Repository: https://github.com/hokamsingh/lessgo.git
Documentation: pkg.go.dev

# Functions

GenerateCSRFToken generates a new CSRF token.
GetTemplate returns the template from the context.
No description provided by the author
No description provided by the author
NewCORSMiddleware creates a new instance of CORSMiddleware.
NewCorsOptions creates a new CORSOptions instance.
No description provided by the author
NewFileUploadMiddleware creates a new instance of FileUploadMiddleware.
No description provided by the author
No description provided by the author
No description provided by the author
NewRateLimiter creates and returns a new RateLimiter instance based on the provided configuration.
No description provided by the author
No description provided by the author
No description provided by the author
SetCSRFCookie sets a CSRF token as a secure cookie.
ValidateCSRFToken validates the CSRF token from the request header or form data.

# Constants

No description provided by the author
No description provided by the author

# Structs

BaseMiddleware provides a basic implementation of the Middleware interface.
No description provided by the author
No description provided by the author
CORSMiddleware is the middleware that handles CORS.
CORSOptions defines the configuration for the CORS middleware.
No description provided by the author
No description provided by the author
InMemoryConfig is the configuration for the in-memory rate limiter.
No description provided by the author
MiddlewareWrapper wraps a function to match the Middleware interface.
No description provided by the author
RateLimiter is a middleware that limits the number of requests a client can make to your server within a specified interval.
RedisConfig is the configuration for the Redis-backed rate limiter.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

Middleware defines the interface for HTTP middlewares.

# Type aliases

No description provided by the author
No description provided by the author
RateLimiterType defines the type of rate limiter (InMemory or RedisBacked).