Documentation ¶
Index ¶
- func ErrorHandler(err error, c echo.Context)
- func NewNoopLogger() echo.Logger
- type Option
- type Registerer
- type Server
- func (s *Server) Group(prefix string, middleware ...echo.MiddlewareFunc) *echo.Group
- func (s *Server) RootGroup(prefix string, middleware ...echo.MiddlewareFunc) *echo.Group
- func (s *Server) Routes() []*echo.Route
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Static(prefix string, fs http.FileSystem, middleware ...echo.MiddlewareFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
ErrorHandler is an echo.HTTPErrorHandler.
func NewNoopLogger ¶
NewNoopLogger returns an echo.Logger that discards all log messages.
Types ¶
type Option ¶
type Option func(*options)
Option for the web server
func WithContextFiller ¶
func WithContextFiller(contextFillers ...fillcontext.Filler) Option
WithContextFiller sets context fillers that are executed on every request context.
func WithCookieKeys ¶
WithCookieKeys sets the cookie hash key and block key.
func WithRedirectToHTTPS ¶
WithRedirectToHTTPS redirects HTTP requests to HTTPS.
func WithRedirectToHost ¶
WithRedirectToHost redirects all requests to this host.
func WithStatic ¶
WithStatic sets the mount and search paths for static assets.
type Registerer ¶
type Registerer interface {
RegisterRoutes(s *Server)
}
Registerer allows components to register their services to the web server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the server.
func (*Server) RootGroup ¶
RootGroup creates a new Echo router group with prefix and optional group-level middleware on the root Server.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler.
func (*Server) Static ¶
func (s *Server) Static(prefix string, fs http.FileSystem, middleware ...echo.MiddlewareFunc)
Static adds the http.FileSystem under the defined prefix.