web

package
v3.0.0-pre.0...-f1e8a59 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(err error, c echo.Context)

ErrorHandler is an echo.HTTPErrorHandler.

Types

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 New

func New(ctx context.Context, config config.HTTP) (*Server, error)

New builds a new server.

func (*Server) Group

func (s *Server) Group(prefix string, middleware ...echo.MiddlewareFunc) *echo.Group

Group creates a sub group.

func (*Server) RootGroup

func (s *Server) RootGroup(prefix string, middleware ...echo.MiddlewareFunc) *echo.Group

RootGroup creates a new Echo router group with prefix and optional group-level middleware on the root Server.

func (*Server) Routes

func (s *Server) Routes() []*echo.Route

Routes returns the defined routes.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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