Documentation
¶
Index ¶
- Constants
- func After(routes gin.IRoutes, after ...middleware.Middleware)
- func Before(routes gin.IRoutes, before ...middleware.Middleware)
- func Handle(routes gin.IRoutes, method string, path string, function interface{})
- func Route(routes gin.IRoutes, method string, path string, function interface{})
- type Config
- type Option
- type Router
- type Server
Constants ¶
View Source
const ModeDebug = gin.DebugMode
View Source
const ModeRelease = gin.ReleaseMode
View Source
const ModeTest = gin.TestMode
Variables ¶
This section is empty.
Functions ¶
func After ¶
func After(routes gin.IRoutes, after ...middleware.Middleware)
func Before ¶
func Before(routes gin.IRoutes, before ...middleware.Middleware)
Types ¶
type Option ¶
type Option func(config *Config)
func WithMiddles ¶
func WithMiddles(middlewares ...middleware.Middleware) Option
type Server ¶
type Server interface {
Name() (name string)
AddMiddlewares(middlewares ...middleware.Middleware) Server
GetEngine() (engine *gin.Engine)
Run(ctx context.Context) error
Close(ctx context.Context) error
OnShutdown(shutdownHook hook.ShutdownHook) Server
OnBeforeRun(hook.RunHook) Server
Route(routes Router) Server
}
func NewServerWithConfig ¶
Click to show internal directories.
Click to hide internal directories.