package
0.0.9
Repository: https://github.com/telmoandrade/go-library.git
Documentation: pkg.go.dev

# Functions

MiddlewareLogging is a middleware that logs each incoming request along with useful metadata regarding the request.
MiddlewareRecover is a middleware that recovers from panics, logs the panic, and responds with an HTTP status of 500 (Internal Server Error).
MiddlewareTrace is a middleware that adds attributes to spans and metrics for telemetry purposes.
NewServeMux creates and returns a new instance of [ServeMux] with enhanced routing and middleware capabilities.
WithAllowCredentials is an [OptionCors] that allows credentials.
WithAllowedHeaders is an [OptionCors] that defines the list of allowed headers.
WithAllowedOrigins is an [OptionCors] that defines the list of allowed origins.
WithAllowOriginFunc is an [OptionCors] that defines a function to allow origin.
WithCors is an [OptionServeMux] that defines information that will be used in the handlers for CORS processing.
WithCorsMaxAge is an [OptionCors] that defines a maximum age in seconds.
WithExposedHeaders is an [OptionCors] that defines the list of exposed headers.
WithHandlerMethodNotAllowed is an [OptionServeMux] that sets up a handler for not allowed methods routes.
WithHandlerNotFound is an [OptionServeMux] that sets up a handler for not found routes.
TODO refatorar nome WithHandlerOptionsMaxAge is an [OptionServeMux] that defines in seconds the maximum age for the Cache-Control header response in the options method handlers.

# Interfaces

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

# Type aliases

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