1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-03 00:56:59 +02:00

enabled validator, updated docs, fixed #298, fixed #438, fixed #305

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-12-12 17:19:41 -08:00
parent 70b5cfbb26
commit 01334bc7b2
4 changed files with 161 additions and 48 deletions

View File

@ -63,6 +63,7 @@ type (
Debug bool
HTTPErrorHandler HTTPErrorHandler
Binder Binder
Validator Validator
Renderer Renderer
AutoTLSManager autocert.Manager
ShutdownTimeout time.Duration
@ -102,7 +103,7 @@ type (
// Validator is the interface that wraps the Validate function.
Validator interface {
Validate() error
Validate(i interface{}) error
}
// Renderer is the interface that wraps the Render function.
@ -217,6 +218,7 @@ var (
ErrUnauthorized = NewHTTPError(http.StatusUnauthorized)
ErrMethodNotAllowed = NewHTTPError(http.StatusMethodNotAllowed)
ErrStatusRequestEntityTooLarge = NewHTTPError(http.StatusRequestEntityTooLarge)
ErrValidatorNotRegistered = errors.New("validator not registered")
ErrRendererNotRegistered = errors.New("renderer not registered")
ErrInvalidRedirectCode = errors.New("invalid redirect status code")
ErrCookieNotFound = errors.New("cookie not found")