defaults

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2017 License: Apache-2.0 Imports: 3 Imported by: 104

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = echo.New()

Functions

func AddHandlerWrapper

func AddHandlerWrapper(funcs ...func(interface{}) echo.Handler)

func AddMiddlewareWrapper

func AddMiddlewareWrapper(funcs ...func(interface{}) echo.Middleware)

func Any

func Any(path string, h interface{}, m ...interface{})

Any adds a route > handler to the router for all HTTP methods.

func Connect

func Connect(path string, h interface{}, m ...interface{})

Connect adds a CONNECT route > handler to the router.

func Debug

func Debug() bool

Debug returns debug mode (enabled or disabled).

func DefaultHTTPErrorHandler

func DefaultHTTPErrorHandler(err error, c echo.Context)

DefaultHTTPErrorHandler invokes the default HTTP error handler.

func Delete

func Delete(path string, h interface{}, m ...interface{})

Delete adds a DELETE route > handler to the router.

func Engine

func Engine() engine.Engine

func Get

func Get(path string, h interface{}, m ...interface{})

Get adds a GET route > handler to the router.

func Group

func Group(prefix string, m ...interface{}) (g *echo.Group)

Group creates a new sub-router with prefix.

func Head(path string, h interface{}, m ...interface{})

Head adds a HEAD route > handler to the router.

func Logger

func Logger() logger.Logger

Logger returns the logger instance.

func Match

func Match(methods []string, path string, h interface{}, m ...interface{})

Match adds a route > handler to the router for multiple HTTP methods provided.

func Meta added in v1.2.0

func Meta() map[string]echo.H

func MetaHandler

func MetaHandler(m echo.H, handler interface{}) interface{}

MetaHandler Add meta information about endpoint

func MetaMiddleware

func MetaMiddleware(m echo.H, middleware interface{}) interface{}

MetaMiddleware Add meta information about endpoint

func NamedRoutes

func NamedRoutes() map[string][]int

NamedRoutes returns the registered handler name.

func Options

func Options(path string, h interface{}, m ...interface{})

Options adds an OPTIONS route > handler to the router.

func Patch

func Patch(path string, h interface{}, m ...interface{})

Patch adds a PATCH route > handler to the router.

func Post

func Post(path string, h interface{}, m ...interface{})

Post adds a POST route > handler to the router.

func Pre

func Pre(middleware ...interface{})

Pre is alias

func PreUse

func PreUse(middleware ...interface{})

PreUse adds handler to the middleware chain.

func Prefix

func Prefix() string

func Put

func Put(path string, h interface{}, m ...interface{})

Put adds a PUT route > handler to the router.

func RebuildRouter

func RebuildRouter(args ...[]*echo.Route)

RebuildRouter rebuild router

func Route

func Route(methods string, path string, h interface{}, m ...interface{})

func Router

func Router() *echo.Router

Router returns router.

func Routes

func Routes() []*echo.Route

Routes returns the registered routes.

func Run

func Run(eng engine.Engine, handler ...engine.Handler)

Run starts the HTTP engine.

func ServeHTTP

func ServeHTTP(req engine.Request, res engine.Response)

func SetBinder

func SetBinder(b echo.Binder)

SetBinder registers a custom binder. It's invoked by Context.Bind().

func SetDebug

func SetDebug(on bool)

SetDebug enable/disable debug mode.

func SetHTTPErrorHandler

func SetHTTPErrorHandler(h echo.HTTPErrorHandler)

SetHTTPErrorHandler registers a custom Echo.HTTPErrorHandler.

func SetHandlerWrapper

func SetHandlerWrapper(funcs ...func(interface{}) echo.Handler)

func SetLogger

func SetLogger(l logger.Logger)

SetLogger sets the logger instance.

func SetMiddlewareWrapper

func SetMiddlewareWrapper(funcs ...func(interface{}) echo.Middleware)

func SetRenderer

func SetRenderer(r echo.Renderer)

SetRenderer registers an HTML template renderer. It's invoked by Context.Render().

func Stop added in v1.2.0

func Stop() error

Stop stops the HTTP server.

func Trace

func Trace(path string, h interface{}, m ...interface{})

Trace adds a TRACE route > handler to the router.

func URI

func URI(handler interface{}, params ...interface{}) string

URI generates a URI from handler.

func URL

func URL(h interface{}, params ...interface{}) string

URL is an alias for `URI` function.

func Use

func Use(middleware ...interface{})

Use adds handler to the middleware chain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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