fasthttp

package
v2.0.0-beta.2+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapHandler

func WrapHandler(h fasthttp.RequestHandler) echo.HandlerFunc

WrapHandler wraps `fasthttp.RequestHandler` into `echo.HandlerFunc`.

func WrapMiddleware

func WrapMiddleware(h fasthttp.RequestHandler) echo.MiddlewareFunc

WrapMiddleware wraps `fasthttp.RequestHandler` into `echo.MiddlewareFunc`

Types

type Request

type Request struct {
	*fasthttp.RequestCtx
	// contains filtered or unexported fields
}

Request implements `engine.Request`.

func (*Request) Body

func (r *Request) Body() io.Reader

Body implements `engine.Request#Body` function.

func (*Request) FormFile

func (r *Request) FormFile(name string) (*multipart.FileHeader, error)

FormFile implements `engine.Request#FormFile` function.

func (*Request) FormValue

func (r *Request) FormValue(name string) string

FormValue implements `engine.Request#FormValue` function.

func (*Request) Header

func (r *Request) Header() engine.Header

Header implements `engine.Request#Header` function.

func (*Request) Host

func (r *Request) Host() string

Host implements `engine.Request#Host` function.

func (*Request) Method

func (r *Request) Method() string

Method implements `engine.Request#Method` function.

func (*Request) MultipartForm

func (r *Request) MultipartForm() (*multipart.Form, error)

MultipartForm implements `engine.Request#MultipartForm` function.

func (*Request) RemoteAddress

func (r *Request) RemoteAddress() string

RemoteAddress implements `engine.Request#RemoteAddress` function.

func (*Request) Scheme

func (r *Request) Scheme() string

Scheme implements `engine.Request#Scheme` function.

func (*Request) SetMethod

func (r *Request) SetMethod(method string)

SetMethod implements `engine.Request#SetMethod` function.

func (*Request) TLS

func (r *Request) TLS() bool

TLS implements `engine.Request#TLS` function.

func (*Request) URI

func (r *Request) URI() string

URI implements `engine.Request#URI` function.

func (*Request) URL

func (r *Request) URL() engine.URL

URL implements `engine.Request#URL` function.

func (*Request) UserAgent

func (r *Request) UserAgent() string

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) 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 (*Response) Committed

func (r *Response) Committed() bool

Committed implements `engine.Response#Committed` function.

func (*Response) Header

func (r *Response) Header() engine.Header

Header implements `engine.Response#Header` function.

func (*Response) SetWriter

func (r *Response) SetWriter(w io.Writer)

SetWriter implements `engine.Response#SetWriter` function.

func (*Response) Size

func (r *Response) Size() int64

Size implements `engine.Response#Size` function.

func (*Response) Status

func (r *Response) Status() int

Status implements `engine.Response#Status` function.

func (*Response) Write

func (r *Response) Write(b []byte) (n int, err error)

Write implements `engine.Response#Write` function.

func (*Response) WriteHeader

func (r *Response) WriteHeader(code int)

WriteHeader implements `engine.Response#WriteHeader` function.

func (*Response) Writer

func (r *Response) Writer() io.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) 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

type Server struct {
	*fasthttp.Server
	// contains filtered or unexported fields
}

Server implements `engine.Server`.

func New

func New(addr string) *Server

New returns an instance of `fasthttp.Server` with provided listen address.

func NewFromConfig

func NewFromConfig(c engine.Config) (s *Server)

NewFromConfig returns an instance of `standard.Server` from config.

func NewFromTLS

func NewFromTLS(addr, certfile, keyfile string) *Server

NewFromTLS returns an instance of `fasthttp.Server` from TLS config.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(c *fasthttp.RequestCtx)

func (*Server) SetHandler

func (s *Server) SetHandler(h engine.Handler)

SetHandler implements `engine.Server#SetHandler` function.

func (*Server) SetLogger

func (s *Server) SetLogger(l *log.Logger)

SetLogger implements `engine.Server#SetLogger` function.

func (*Server) Start

func (s *Server) Start() error

Start implements `engine.Server#Start` function.

type URL

type URL struct {
	*fasthttp.URI
}

URL implements `engine.URL`.

func (*URL) Path

func (u *URL) Path() string

Path implements `engine.URL#Path` function.

func (*URL) QueryParam

func (u *URL) QueryParam(name string) string

QueryParam implements `engine.URL#QueryParam` function.

func (*URL) QueryString

func (u *URL) QueryString() string

QueryString implements `engine.URL#QueryString` function.

func (*URL) SetPath

func (u *URL) SetPath(path string)

SetPath implements `engine.URL#SetPath` function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL