qsgin

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoServerFound = errors.New("no engine was found, must create a new HTTP server to begin with")
	ErrNoRouterFound = errors.New("no gin.Engine was found, must create a new empty gin.Engine first")
)

Functions

func AddCustomLogs

func AddCustomLogs(logger *zap.Logger, eng *gin.Engine) *gin.Engine

Add logger to gin.Engine

func ProvideEmptyRouter

func ProvideEmptyRouter() fx.Option

Create a new HTTP server that is routed using a Gin engine. Will add zap.Logger as custom log for the engine.

 var Module = fx.Options(
		qshttp.ProvideHttpConfigs(&qshttp.EnvConfigType{}),
		qsgin.ProvideEmptyRouter(),
 )

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL