defaults

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: Apache-2.0 Imports: 3 Imported by: 105

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = echo.New()

Functions

func AddAcceptFormat added in v1.3.0

func AddAcceptFormat(mime, format string) *echo.Echo

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 Binder added in v1.3.0

func Binder() echo.Binder

Binder returns the binder instance.

func Clear added in v1.3.0

func Clear(middleware ...interface{})

Clear middleware

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{}) *echo.Group

Group creates a new sub-router with prefix.

func HTTPErrorHandler added in v1.3.0

func HTTPErrorHandler() echo.HTTPErrorHandler

HTTPErrorHandler returns the HTTPErrorHandler

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 MetaHandler

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

MetaHandler 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 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 Renderer added in v1.3.0

func Renderer() echo.Renderer

Renderer returns the renderer instance.

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 SetAcceptFormats added in v1.3.0

func SetAcceptFormats(acceptFormats map[string]string) *echo.Echo

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