Documentation ¶
Index ¶
- func CustomRecovery(handle gin.RecoveryFunc) gin.HandlerFunc
- func DefaultHandleRecovery(c *gin.Context, err interface{})
- func GinHttpServerOpt() fx.Option
- func InitContext() gin.HandlerFunc
- func New() (http.Handler, func(h http.Handler) gin.HandlerFunc)
- func NewGinEngine(in GinEngineIn) *gin.Engine
- func NewHTTPServer(app *golib.App, engine *gin.Engine) *http.Server
- func OnStartHttpServerHook(lc fx.Lifecycle, app *golib.App, httpServer *http.Server)
- func OnStopHttpServerHook(lc fx.Lifecycle, httpServer *http.Server)
- func OnStopHttpServerOpt() fx.Option
- func Recovery() gin.HandlerFunc
- func RegisterHandlers(app *golib.App, engine *gin.Engine)
- func StartOpt() fx.Option
- func Wrap(f func(h http.Handler) http.Handler) gin.HandlerFunc
- func WrapAll(hh []func(h http.Handler) http.Handler) []gin.HandlerFunc
- type GinEngineIn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomRecovery ¶
func CustomRecovery(handle gin.RecoveryFunc) gin.HandlerFunc
CustomRecovery returns a middleware that recovers from any panics and calls the provided handle func to handle it.
func DefaultHandleRecovery ¶
func GinHttpServerOpt ¶
func InitContext ¶
func InitContext() gin.HandlerFunc
func NewGinEngine ¶
func NewGinEngine(in GinEngineIn) *gin.Engine
func OnStartHttpServerHook ¶
func OnStopHttpServerOpt ¶
func Recovery ¶
func Recovery() gin.HandlerFunc
Types ¶
type GinEngineIn ¶
type GinEngineIn struct { fx.In Logging *log.Properties `optional:"true"` }
Click to show internal directories.
Click to hide internal directories.