package
0.0.0-20241228152709-4101898bb1da
Repository: https://github.com/sasalatart/quizory.git
Documentation: pkg.go.dev

# Functions

GetUserID retrieves a user ID from a context, assuming such context comes from an HTTP request with JWT authentication.
WithCORS sets the necessary headers to enable CORS.
WithJWTAuth validates JWT tokens from HTTP requests and adds the user ID to the request's context.
WithMonitoring instruments HTTP handlers with OpenTelemetry logs, metrics and traces.
WithRecover recovers from panics that occur during the execution of the next http.Handler and handles it gracefully by logging the error and responding with a 500 Internal Server Error.