Documentation
¶
Overview ¶
Package gininitiator provides Gin engine initialization with middleware setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HandlePanics gin.RecoveryFunc = func(c *gin.Context, err any) { log.Printf("panic happened!!! err: %+v", err) c.Abort() }
HandlePanics is the default panic recovery handler for Gin that logs the panic and aborts the request.
Functions ¶
func InitGin ¶
func InitGin(basePath string, wsParams libParams.ParamInterface, corsConfig *cors.Config) (*gin.Engine, *gin.RouterGroup)
InitGin creates and configures a new Gin engine with logging, recovery, and CORS middleware.
func InitSlogGin ¶
func InitSlogGin(wsParams libParams.ParamInterface, app *gin.Engine)
InitSlogGin configures slog-based logging middleware for the Gin engine.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.