Documentation
¶
Overview ¶
Package middleware provides HTTP middleware components for the Service Layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
func ErrorHandler() gin.HandlerFunc
ErrorHandler is a middleware that handles errors and standardizes the error response format. It captures errors from gin's error chain, converts them to ServiceError types, adds request IDs, logs errors, and sends standardized error responses to clients.
func RequestLogger ¶
func RequestLogger() gin.HandlerFunc
RequestLogger is a middleware that logs all incoming requests.
func ValidationErrorHandler ¶
func ValidationErrorHandler() gin.HandlerFunc
ValidationErrorHandler is a middleware that handles validation errors. It should be used with validators like go-playground/validator.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.