Documentation ¶
Index ¶
- func AccessLogHandler(logger *slog.Logger, msg string) gin.HandlerFunc
- func CorsHandler(corsHelper *cors.Cors) gin.HandlerFunc
- func MethodAllowHandler() gin.HandlerFunc
- func RecoveryHandler(logger *slog.Logger) gin.HandlerFunc
- func RequestIdHandler() gin.HandlerFunc
- func ResourceNotFoundHandler() gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessLogHandler ¶ added in v1.2.0
func AccessLogHandler(logger *slog.Logger, msg string) gin.HandlerFunc
AccessLogHandler records each http request into log
func CorsHandler ¶
func CorsHandler(corsHelper *cors.Cors) gin.HandlerFunc
CorsHandler deals with case of cors origins
func MethodAllowHandler ¶
func MethodAllowHandler() gin.HandlerFunc
MethodAllowHandler deals with case of method not allowed
func RecoveryHandler ¶ added in v1.2.0
func RecoveryHandler(logger *slog.Logger) gin.HandlerFunc
RecoveryHandler handles the case of panic situation
func RequestIdHandler ¶ added in v1.2.0
func RequestIdHandler() gin.HandlerFunc
RequestIdHandler generates a unique request id for each http request
func ResourceNotFoundHandler ¶
func ResourceNotFoundHandler() gin.HandlerFunc
ResourceNotFoundHandler deals with case of 404
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.