Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Port optional, http port to be exposed, 8080 by default. Port int // Name optional, http server name to be exposed. Name string // GracefulDuration optional, graceful duration to shut down the server, 12 seconds by default. GracefulDuration time.Duration }
Config http config server.
type Option ¶
type Option interface {
Apply(o *options)
}
func ErrorHandler ¶
ErrorHandler function to override server error handler.
func RegisterMiddleware ¶
func RegisterMiddleware(fn echo.MiddlewareFunc) Option
RegisterMiddleware function to add middleware to server.
func RegisterMiddlewares ¶
func RegisterMiddlewares(fn []echo.MiddlewareFunc) Option
RegisterMiddlewares function to add middleware to server.
func RegisterRoute ¶
func RegisterRoute(fn func(*echo.Echo)) Option
RegisterRoute function to add route to server.
func RegisterRoutes ¶
func RegisterRoutes(fn []func(*echo.Echo)) Option
RegisterRoutes function to add multi route to server.
Click to show internal directories.
Click to hide internal directories.