package fasthttp
import "github.com/labstack/echo/engine/fasthttp"
Index ¶
- func WrapHandler(h fasthttp.RequestHandler) echo.HandlerFunc
- func WrapMiddleware(m func(fasthttp.RequestHandler) fasthttp.RequestHandler) echo.MiddlewareFunc
- type Cookie
- func (c *Cookie) Domain() string
- func (c *Cookie) Expires() time.Time
- func (c *Cookie) HTTPOnly() bool
- func (c *Cookie) Name() string
- func (c *Cookie) Path() string
- func (c *Cookie) Secure() bool
- func (c *Cookie) Value() string
- type Request
- func NewRequest(c *fasthttp.RequestCtx, l log.Logger) *Request
- func (r *Request) Body() io.Reader
- func (r *Request) ContentLength() int64
- func (r *Request) Cookie(name string) (engine.Cookie, error)
- func (r *Request) Cookies() []engine.Cookie
- func (r *Request) FormFile(name string) (*multipart.FileHeader, error)
- func (r *Request) FormParams() (params map[string][]string)
- func (r *Request) FormValue(name string) string
- func (r *Request) Header() engine.Header
- func (r *Request) Host() string
- func (r *Request) IsTLS() bool
- func (r *Request) Method() string
- func (r *Request) MultipartForm() (*multipart.Form, error)
- func (r *Request) Referer() string
- func (r *Request) RemoteAddress() string
- func (r *Request) Scheme() string
- func (r *Request) SetBody(reader io.Reader)
- func (r *Request) SetMethod(method string)
- func (r *Request) SetURI(uri string)
- func (r *Request) URI() string
- func (r *Request) URL() engine.URL
- func (r *Request) UserAgent() string
- type RequestHeader
- func (h *RequestHeader) Add(key, val string)
- func (h *RequestHeader) Contains(key string) bool
- func (h *RequestHeader) Del(key string)
- func (h *RequestHeader) Get(key string) string
- func (h *RequestHeader) Keys() (keys []string)
- func (h *RequestHeader) Set(key, val string)
- type Response
- func NewResponse(c *fasthttp.RequestCtx, l log.Logger) *Response
- func (r *Response) Committed() bool
- func (r *Response) Header() engine.Header
- func (r *Response) SetCookie(c engine.Cookie)
- func (r *Response) SetWriter(w io.Writer)
- func (r *Response) Size() int64
- func (r *Response) Status() int
- func (r *Response) Write(b []byte) (n int, err error)
- func (r *Response) WriteHeader(code int)
- func (r *Response) Writer() io.Writer
- type ResponseHeader
- func (h *ResponseHeader) Add(key, val string)
- func (h *ResponseHeader) Contains(key string) bool
- func (h *ResponseHeader) Del(key string)
- func (h *ResponseHeader) Get(key string) string
- func (h *ResponseHeader) Keys() (keys []string)
- func (h *ResponseHeader) Set(key, val string)
- type Server
- func New(addr string) *Server
- func WithConfig(c engine.Config) (s *Server)
- func WithTLS(addr, certFile, keyFile string) *Server
- func (s *Server) ServeHTTP(c *fasthttp.RequestCtx)
- func (s *Server) SetHandler(h engine.Handler)
- func (s *Server) SetLogger(l log.Logger)
- func (s *Server) Start() error
- type URL
Functions ¶
func WrapHandler ¶
func WrapHandler(h fasthttp.RequestHandler) echo.HandlerFunc
WrapHandler wraps `fasthttp.RequestHandler` into `echo.HandlerFunc`.
func WrapMiddleware ¶
func WrapMiddleware(m func(fasthttp.RequestHandler) fasthttp.RequestHandler) echo.MiddlewareFunc
WrapMiddleware wraps `func(fasthttp.RequestHandler) fasthttp.RequestHandler` into `echo.MiddlewareFunc`
Types ¶
type Cookie ¶
Cookie implements `engine.Cookie`.
func (*Cookie) Domain ¶
Domain implements `engine.Cookie#Domain` function.
func (*Cookie) Expires ¶
Expires implements `engine.Cookie#Expires` function.
func (*Cookie) HTTPOnly ¶
HTTPOnly implements `engine.Cookie#HTTPOnly` function.
func (*Cookie) Name ¶
Name implements `engine.Cookie#Name` function.
func (*Cookie) Path ¶
Path implements `engine.Cookie#Path` function.
func (*Cookie) Secure ¶
Secure implements `engine.Cookie#Secure` function.
func (*Cookie) Value ¶
Value implements `engine.Cookie#Value` function.
type Request ¶
type Request struct { *fasthttp.RequestCtx // contains filtered or unexported fields }
Request implements `engine.Request`.
func NewRequest ¶
func NewRequest(c *fasthttp.RequestCtx, l log.Logger) *Request
NewRequest returns `Request` instance.
func (*Request) Body ¶
Body implements `engine.Request#Body` function.
func (*Request) ContentLength ¶
ContentLength implements `engine.Request#ContentLength` function.
func (*Request) Cookie ¶
Cookie implements `engine.Request#Cookie` function.
func (*Request) Cookies ¶
Cookies implements `engine.Request#Cookies` function.
func (*Request) FormFile ¶
func (r *Request) FormFile(name string) (*multipart.FileHeader, error)
FormFile implements `engine.Request#FormFile` function.
func (*Request) FormParams ¶
FormParams implements `engine.Request#FormParams` function.
func (*Request) FormValue ¶
FormValue implements `engine.Request#FormValue` function.
func (*Request) Header ¶
Header implements `engine.Request#Header` function.
func (*Request) Host ¶
Host implements `engine.Request#Host` function.
func (*Request) IsTLS ¶
IsTLS implements `engine.Request#TLS` function.
func (*Request) Method ¶
Method implements `engine.Request#Method` function.
func (*Request) MultipartForm ¶
MultipartForm implements `engine.Request#MultipartForm` function.
func (*Request) Referer ¶
Referer implements `engine.Request#Referer` function.
func (*Request) RemoteAddress ¶
RemoteAddress implements `engine.Request#RemoteAddress` function.
func (*Request) Scheme ¶
Scheme implements `engine.Request#Scheme` function.
func (*Request) SetBody ¶
SetBody implements `engine.Request#SetBody` function.
func (*Request) SetMethod ¶
SetMethod implements `engine.Request#SetMethod` function.
func (*Request) SetURI ¶
SetURI implements `engine.Request#SetURI` function.
func (*Request) URI ¶
URI implements `engine.Request#URI` function.
func (*Request) URL ¶
URL implements `engine.Request#URL` function.
func (*Request) UserAgent ¶
UserAgent implements `engine.Request#UserAgent` function.
type RequestHeader ¶
type RequestHeader struct { *fasthttp.RequestHeader }
RequestHeader holds `fasthttp.RequestHeader`.
func (*RequestHeader) Add ¶
func (h *RequestHeader) Add(key, val string)
Add implements `engine.Header#Add` function.
func (*RequestHeader) Contains ¶
func (h *RequestHeader) Contains(key string) bool
Contains implements `engine.Header#Contains` function.
func (*RequestHeader) Del ¶
func (h *RequestHeader) Del(key string)
Del implements `engine.Header#Del` function.
func (*RequestHeader) Get ¶
func (h *RequestHeader) Get(key string) string
Get implements `engine.Header#Get` function.
func (*RequestHeader) Keys ¶
func (h *RequestHeader) Keys() (keys []string)
Keys implements `engine.Header#Keys` function.
func (*RequestHeader) Set ¶
func (h *RequestHeader) Set(key, val string)
Set implements `engine.Header#Set` function.
type Response ¶
type Response struct { *fasthttp.RequestCtx // contains filtered or unexported fields }
Response implements `engine.Response`.
func NewResponse ¶
func NewResponse(c *fasthttp.RequestCtx, l log.Logger) *Response
NewResponse returns `Response` instance.
func (*Response) Committed ¶
Committed implements `engine.Response#Committed` function.
func (*Response) Header ¶
Header implements `engine.Response#Header` function.
func (*Response) SetCookie ¶
SetCookie implements `engine.Response#SetCookie` function.
func (*Response) SetWriter ¶
SetWriter implements `engine.Response#SetWriter` function.
func (*Response) Size ¶
Size implements `engine.Response#Size` function.
func (*Response) Status ¶
Status implements `engine.Response#Status` function.
func (*Response) Write ¶
Write implements `engine.Response#Write` function.
func (*Response) WriteHeader ¶
WriteHeader implements `engine.Response#WriteHeader` function.
func (*Response) Writer ¶
Writer implements `engine.Response#Writer` function.
type ResponseHeader ¶
type ResponseHeader struct { *fasthttp.ResponseHeader }
ResponseHeader holds `fasthttp.ResponseHeader`.
func (*ResponseHeader) Add ¶
func (h *ResponseHeader) Add(key, val string)
Add implements `engine.Header#Add` function.
func (*ResponseHeader) Contains ¶
func (h *ResponseHeader) Contains(key string) bool
Contains implements `engine.Header#Contains` function.
func (*ResponseHeader) Del ¶
func (h *ResponseHeader) Del(key string)
Del implements `engine.Header#Del` function.
func (*ResponseHeader) Get ¶
func (h *ResponseHeader) Get(key string) string
Get implements `engine.Header#Get` function.
func (*ResponseHeader) Keys ¶
func (h *ResponseHeader) Keys() (keys []string)
Keys implements `engine.Header#Keys` function.
func (*ResponseHeader) Set ¶
func (h *ResponseHeader) Set(key, val string)
Set implements `engine.Header#Set` function.
type Server ¶
Server implements `engine.Server`.
func New ¶
New returns `Server` with provided listen address.
func WithConfig ¶
WithConfig returns `Server` with provided config.
func WithTLS ¶
WithTLS returns `Server` with provided TLS config.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(c *fasthttp.RequestCtx)
func (*Server) SetHandler ¶
SetHandler implements `engine.Server#SetHandler` function.
func (*Server) SetLogger ¶
SetLogger implements `engine.Server#SetLogger` function.
func (*Server) Start ¶
Start implements `engine.Server#Start` function.
type URL ¶
URL implements `engine.URL`.
func (*URL) Path ¶
Path implements `engine.URL#Path` function.
func (*URL) QueryParam ¶
QueryParam implements `engine.URL#QueryParam` function.
func (*URL) QueryParams ¶
QueryParams implements `engine.URL#QueryParams` function.
func (*URL) QueryString ¶
QueryString implements `engine.URL#QueryString` function.
func (*URL) SetPath ¶
SetPath implements `engine.URL#SetPath` function.
Source Files ¶
cookie.go header.go request.go response.go server.go url.go
- Version
- v2.0.2+incompatible
- Published
- Jun 16, 2016
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 4 hours ago –
Tools for package owners.