Documentation
¶
Index ¶
- func APIHandler[TReq, TResp any](handler func(context.Context, *TReq) (TResp, error)) func(*gin.Context)
- func APIHandlerWithUriParams[TReq, TResp, TUri any](handler func(context.Context, *TReq, *TUri) (TResp, error)) func(*gin.Context)
- func LogHook(logger *logrus.Logger, notLogged ...string) gin.HandlerFunc
- func LogHookWithConfig(logger *logrus.Logger, config LogHookConfig) gin.HandlerFunc
- func RESTHandler[TReq, TResp any](handler func(context.Context, *TReq) (TResp, error)) func(*gin.Context)
- func RESTHandlerWithUriParams[TReq, TResp, TUri any](handler func(context.Context, *TReq, *TUri) (TResp, error)) func(*gin.Context)
- func RequestID() gin.HandlerFunc
- func Serve(app *gin.Engine, addr string) error
- func ServeWithTimeout(app *gin.Engine, addr string, timeout time.Duration) error
- type APIError
- type APIResponse
- type Empty
- type LogHookConfig
- type Normalizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIHandler ¶
func APIHandlerWithUriParams ¶
func LogHook ¶
func LogHook(logger *logrus.Logger, notLogged ...string) gin.HandlerFunc
LogHook creates request logging middleware with exact paths excluded.
func LogHookWithConfig ¶
func LogHookWithConfig(logger *logrus.Logger, config LogHookConfig) gin.HandlerFunc
LogHookWithConfig creates request logging middleware with configurable exclusions. SkipFunc runs after the remaining handlers have completed.
func RESTHandler ¶
func RequestID ¶
func RequestID() gin.HandlerFunc
Types ¶
type APIResponse ¶
type LogHookConfig ¶
LogHookConfig configures request logging exclusions.
type Normalizer ¶
type Normalizer interface {
Normalize() bool
}
Click to show internal directories.
Click to hide internal directories.