Documentation ¶
Index ¶
- Constants
- Variables
- type Request
- func (r *Request) BasicAuth() (username, password string, ok bool)
- func (r *Request) Body() io.ReadCloser
- func (r *Request) Context() context.Context
- func (r *Request) Cookie(key string) string
- func (r *Request) Form() engine.URLValuer
- func (r *Request) FormFile(key string) (multipart.File, *multipart.FileHeader, error)
- 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) MaxSize() int
- func (r *Request) Method() string
- func (r *Request) MultipartForm() *multipart.Form
- func (r *Request) Object() interface{}
- func (r *Request) PostForm() engine.URLValuer
- func (r *Request) Proto() string
- func (r *Request) RealIP() string
- 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) SetHost(host string)
- func (r *Request) SetMaxSize(maxSize int)
- func (r *Request) SetMethod(method string)
- func (r *Request) SetURI(uri string)
- func (r *Request) SetValue(key string, value interface{})
- func (r *Request) Size() int64
- func (r *Request) StdRequest() *http.Request
- func (r *Request) URI() string
- func (r *Request) URL() engine.URL
- func (r *Request) UserAgent() string
- func (r *Request) WithContext(ctx context.Context) *http.Request
- type RequestHeader
- func (h *RequestHeader) Add(key, val string)
- func (h *RequestHeader) Del(key string)
- func (h *RequestHeader) Get(key string) string
- func (h *RequestHeader) Object() interface{}
- func (h *RequestHeader) Set(key, val string)
- func (h *RequestHeader) Std() http.Header
- func (h *RequestHeader) Values(key string) []string
- type Response
- func (r *Response) Body() []byte
- func (r *Response) Committed() bool
- func (r *Response) Error(errMsg string, args ...int)
- func (r *Response) Header() engine.Header
- func (r *Response) Hijacker(fn func(net.Conn)) error
- func (r *Response) KeepBody(_ bool)
- func (r *Response) NotFound()
- func (r *Response) Object() interface{}
- func (r *Response) Redirect(url string, code int)
- func (r *Response) ServeContent(content io.ReadSeeker, name string, modtime time.Time)
- func (r *Response) ServeFile(file string)
- func (r *Response) SetCookie(cookie *http.Cookie)
- func (r *Response) SetWriter(w io.Writer)
- func (r *Response) Size() int64
- func (r *Response) Status() int
- func (r *Response) StdResponseWriter() http.ResponseWriter
- func (r *Response) Stream(step func(io.Writer) bool) (err error)
- 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) Del(key string)
- func (h *ResponseHeader) Get(key string) string
- func (h *ResponseHeader) Object() interface{}
- func (h *ResponseHeader) Set(key, val string)
- func (h *ResponseHeader) Std() http.Header
- func (h *ResponseHeader) Values(key string) []string
- type Server
- type URL
- func (u *URL) Object() interface{}
- func (u *URL) Path() string
- func (u *URL) Query() url.Values
- func (u *URL) QueryValue(name string) string
- func (u *URL) QueryValues(name string) []string
- func (u *URL) RawPath() string
- func (u *URL) RawQuery() string
- func (u *URL) SetPath(path string)
- func (u *URL) SetRawQuery(rawQuery string)
- func (u *URL) String() string
- type UrlValue
- func (u *UrlValue) Add(key string, value string)
- func (u *UrlValue) All() map[string][]string
- func (u *UrlValue) Del(key string)
- func (u *UrlValue) Encode() string
- func (u *UrlValue) Get(key string) string
- func (u *UrlValue) Gets(key string) []string
- func (u *UrlValue) Merge(data url.Values)
- func (u *UrlValue) Reset(data url.Values)
- func (u *UrlValue) Set(key string, value string)
- type Value
- func (v *Value) Add(key string, value string)
- func (v *Value) All() map[string][]string
- func (v *Value) Del(key string)
- func (v *Value) Encode() string
- func (v *Value) Get(key string) string
- func (v *Value) Gets(key string) []string
- func (v *Value) Merge(data url.Values)
- func (v *Value) Reset(data url.Values)
- func (v *Value) Set(key string, value string)
Constants ¶
View Source
const Name = `fasthttp`
Variables ¶
View Source
var ErrAlreadyCommitted = errors.New(`response already committed`)
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func NewRequest(c *fasthttp.RequestCtx) *Request
func (*Request) BasicAuth ¶
BasicAuth returns the username and password provided in the request's Authorization header, if the request uses HTTP Basic Authentication. See RFC 2617, Section 2.
func (*Request) Body ¶
func (r *Request) Body() io.ReadCloser
func (*Request) MultipartForm ¶
func (*Request) RemoteAddress ¶
func (*Request) SetMaxSize ¶ added in v1.6.0
func (*Request) StdRequest ¶
type RequestHeader ¶
type RequestHeader struct {
// contains filtered or unexported fields
}
func (*RequestHeader) Add ¶
func (h *RequestHeader) Add(key, val string)
func (*RequestHeader) Del ¶
func (h *RequestHeader) Del(key string)
func (*RequestHeader) Get ¶
func (h *RequestHeader) Get(key string) string
func (*RequestHeader) Object ¶
func (h *RequestHeader) Object() interface{}
func (*RequestHeader) Set ¶
func (h *RequestHeader) Set(key, val string)
func (*RequestHeader) Std ¶
func (h *RequestHeader) Std() http.Header
func (*RequestHeader) Values ¶ added in v1.6.0
func (h *RequestHeader) Values(key string) []string
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewResponse ¶
func (*Response) ServeContent ¶ added in v1.6.0
func (*Response) StdResponseWriter ¶
func (r *Response) StdResponseWriter() http.ResponseWriter
func (*Response) WriteHeader ¶
type ResponseHeader ¶
type ResponseHeader struct {
// contains filtered or unexported fields
}
func (*ResponseHeader) Add ¶
func (h *ResponseHeader) Add(key, val string)
func (*ResponseHeader) Del ¶
func (h *ResponseHeader) Del(key string)
func (*ResponseHeader) Get ¶
func (h *ResponseHeader) Get(key string) string
func (*ResponseHeader) Object ¶
func (h *ResponseHeader) Object() interface{}
func (*ResponseHeader) Set ¶
func (h *ResponseHeader) Set(key, val string)
func (*ResponseHeader) Std ¶
func (h *ResponseHeader) Std() http.Header
func (*ResponseHeader) Values ¶ added in v1.6.0
func (h *ResponseHeader) Values(key string) []string
type Server ¶
func NewWithConfig ¶
func NewWithTLS ¶
func NewWithTLS(addr, certFile, keyFile string, opts ...engine.ConfigSetter) *Server
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(c *fasthttp.RequestCtx)
func (*Server) SetHandler ¶
type URL ¶
type URL struct {
// contains filtered or unexported fields
}
func (*URL) QueryValue ¶
func (*URL) QueryValues ¶
func (*URL) SetRawQuery ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.