package
0.0.0-20240415083706-86ef13d49059
Repository: https://github.com/chever-john/cas.git
Documentation: pkg.go.dev
# Functions
Context is a middleware that injects common prefix fields to gin.Context.
GetDefaultLogFormatterWithRequestID returns gin.LogFormatter with 'RequestID'.
GetLoggerConfig return gin.LoggerConfig which will write the logs to specified io.Writer with given gin.LogFormatter.
Logger instances a Logger middleware that will write the logs to gin.DefaultWriter.
LoggerWithConfig instance a Logger middleware with config.
RequestID is a middleware that injects a 'X-Request-ID' into the context and request/response header of each request.
# Constants
UsernameKey defines the key in gin context which represents the owner of the secret.
XRequestIDKey defines X-Request-ID key string.
# Variables
Middlewares store registered middlewares.