1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-09 01:15:54 +02:00

v2 is compiling now

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-01-28 23:46:11 -08:00
parent dbd1e8e230
commit 688293b5ed
37 changed files with 832 additions and 1212 deletions

59
engine/engine.go Normal file
View File

@ -0,0 +1,59 @@
package engine
import "io"
type (
Type uint8
HandlerFunc func(Request, Response)
Engine interface {
Start()
}
Request interface {
Header() Header
// Proto() string
// ProtoMajor() int
// ProtoMinor() int
RemoteAddress() string
Method() string
URI() string
URL() URL
Body() io.ReadCloser
FormValue(string) string
}
Response interface {
Header() Header
WriteHeader(int)
Write(b []byte) (int, error)
Status() int
Size() int64
Committed() bool
}
Header interface {
Add(string, string)
Del(string)
Get(string) string
Set(string, string)
}
URL interface {
Scheme() string
SetPath(string)
Path() string
Host() string
QueryValue(string) string
}
Config struct {
Address string
}
)
const (
Standard Type = iota
FastHTTP
)