1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-13 01:30:31 +02:00

Changed standard#WrapMiddleware

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-03-09 23:24:45 -08:00
parent f730def2c6
commit fbf37ec2f4
19 changed files with 52 additions and 48 deletions

View File

@ -8,12 +8,14 @@ import (
)
type (
// Engine defines an interface for HTTP server.
Engine interface {
SetHandler(Handler)
SetLogger(*log.Logger)
Start()
}
// Request defines an interface for HTTP request.
Request interface {
TLS() bool
Scheme() string
@ -31,6 +33,7 @@ type (
Object() interface{}
}
// Response defines an interface for HTTP response.
Response interface {
Header() Header
WriteHeader(int)
@ -43,6 +46,7 @@ type (
Object() interface{}
}
// Header defines an interface for HTTP header.
Header interface {
Add(string, string)
Del(string)
@ -51,6 +55,7 @@ type (
Object() interface{}
}
// URL defines an interface for HTTP request url.
URL interface {
SetPath(string)
Path() string
@ -58,6 +63,7 @@ type (
Object() interface{}
}
// Config defines engine configuration.
Config struct {
Address string
TLSCertfile string