package
2.0.2
Repository: https://github.com/randlabs/go-webserver.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
DefaultCORS creates a default CORS middleware that allows requests from anywhere.
DefaultSafeBrowsing creates a default SafeBrowsing middleware with commonly used options.
DisableClientCache creates a default cache control middleware that disables the client's cache.
NewAuth wraps a middleware that verifies authentication.
NewCacheControl creates a new client cache control middleware based on the specified options.
NewCompression creates a middleware that compress the output.
NewConditional wraps a middleware to conditionally execute or skip it depending on the evaluator's return value.
NewCORS creates a new CORS middleware based on the specified options.
NewETag creates a middleware that adds/checks etags.
NewNoOP creates a no-operation middleware.
NewPanic wraps a middleware that recovers from panics.
NewRateLimiter wraps a middleware that limits the amount of requests from the same source.
NewSafeBrowsing creates a new SafeBrowsing middleware based on the specified options.
NewTrailingSlash creates a new middleware to handle trailing slashes in request's paths.

# Constants

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

# Variables

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

# Structs

AuthOptions defines an authorization check.
CacheControlOptions defines the behavior on how Cache-Control headers are sent.
CORSOptions defines the behavior on how CORS requests should be handled.
PanicOptions defines the behavior on how to deal with panics raised by request handlers.
RateLimiterOptions defines the behavior of the rate limiter middleware.
SafeBrowsingOptions defines how common response headers for safe browsing are added.
TrailingSlashOptions defines a middleware that adds or removes trailing slashes in paths.

# Type aliases

AuthErrorHandler defines a function to call when the authorization fails.
AuthValidatorFunc defines a function that verifies if the given key is valid.
No description provided by the author
ConditionEvaluator defines a function that executes the wrapped middleware if returns true.
KeyGeneratorFunc defines a function to call when the authorization fails.
LimitReachedHandler defines a function to call when the authorization fails.
PanicErrorHandler defines a function to call when a panic occurs.