web

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedMediaType        = echo.ErrUnsupportedMediaType
	ErrNotFound                    = echo.ErrNotFound
	ErrUnauthorized                = echo.ErrUnauthorized
	ErrForbidden                   = echo.ErrForbidden
	ErrMethodNotAllowed            = echo.ErrMethodNotAllowed
	ErrStatusRequestEntityTooLarge = echo.ErrStatusRequestEntityTooLarge
	ErrValidatorNotRegistered      = echo.ErrValidatorNotRegistered
	ErrRendererNotRegistered       = echo.ErrRendererNotRegistered
	ErrInvalidRedirectCode         = echo.ErrInvalidRedirectCode
	ErrCookieNotFound              = echo.ErrCookieNotFound
)

Errors

View Source
var (
	// NewHTTPError creates a new HTTPError instance.
	NewHTTPError = echo.NewHTTPError
)

Functions

func StartServer

func StartServer(e *Engine, bind string) error

StartServer HTTP with custom address.

Types

type BasicAuthValidator added in v1.6.6

type BasicAuthValidator = middleware.BasicAuthValidator

BasicAuthValidator defines a function to validate BasicAuth credentials.

type Context added in v1.6.2

type Context = echo.Context

Context from echo.Context (for shadowing)

type DefaultBinder added in v1.9.5

type DefaultBinder struct{}

DefaultBinder is the default implementation of the Binder interface.

func (*DefaultBinder) Bind added in v1.9.5

func (b *DefaultBinder) Bind(i interface{}, c Context) (err error)

Bind implements the `Binder#Bind` function.

type Engine added in v1.6.6

type Engine = echo.Echo

Engine from echo.Echo (for shadowing)

func New

func New(opts Options) *Engine

New creates an instance of Echo.

type Group added in v1.6.6

type Group = echo.Group

Group from echo.Group (for shadowing)

type HandlerFunc added in v1.6.6

type HandlerFunc = echo.HandlerFunc

HandlerFunc from echo.HandlerFunc (for shadowing)

type MiddlewareFunc added in v1.6.6

type MiddlewareFunc = echo.MiddlewareFunc

MiddlewareFunc from echo.MiddlewareFunc (for shadowing)

func AddTrailingSlash added in v1.6.6

func AddTrailingSlash() MiddlewareFunc

AddTrailingSlash returns a root level (before router) middleware which adds a trailing slash to the request `URL#Path`.

Usage `Engine#Pre(AddTrailingSlash())`

func BasicAuth added in v1.6.6

func BasicAuth(fn BasicAuthValidator) MiddlewareFunc

BasicAuth returns an BasicAuth middleware.

For valid credentials it calls the next handler. For missing or invalid credentials, it sends "401 - Unauthorized" response.

func RemoveTrailingSlash added in v1.6.6

func RemoveTrailingSlash() MiddlewareFunc

RemoveTrailingSlash returns a root level (before router) middleware which removes a trailing slash from the request URI.

Usage `Engine#Pre(RemoveTrailingSlash())`

type Options

type Options struct {
	Logger    echo.Logger
	Error     recoverer
	Debug     bool
	Validator echo.Validator
}

Options contains a parameters for new Echo instance.

Jump to

Keyboard shortcuts

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