1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-07 23:12:43 +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

View File

@@ -0,0 +1,40 @@
package fasthttp
import (
"github.com/labstack/echo/engine"
"github.com/valyala/fasthttp"
)
type (
Response struct {
context *fasthttp.RequestCtx
header engine.Header
status int
size int64
committed bool
}
)
func (r *Response) Header() engine.Header {
return r.header
}
func (r *Response) WriteHeader(code int) {
r.context.SetStatusCode(code)
}
func (r *Response) Write(b []byte) (int, error) {
return r.context.Write(b)
}
func (r *Response) Status() int {
return r.status
}
func (r *Response) Size() int64 {
return r.size
}
func (r *Response) Committed() bool {
return r.committed
}