Documentation
¶
Index ¶
- func NewResReqFastHTTP(ctx *fasthttp.RequestCtx) (ResponseFastHTTP, *RequestFastHTTP)
- func NewResReqNetHTTP(res http.ResponseWriter, req *http.Request) (ResponseNetHTTP, *RequestNetHTTP)
- func WriteSimpleJSON(w Response, status int, message string) (int, error)
- type Addr
- type Args
- type ArgsFastHTTP
- type ArgsFastHTTPMulti
- func (args ArgsFastHTTPMulti) GetBytes(key string) []byte
- func (args ArgsFastHTTPMulti) GetBytesSlice(key string) [][]byte
- func (args ArgsFastHTTPMulti) GetString(key string) string
- func (args ArgsFastHTTPMulti) GetStringSlice(key string) []string
- func (args ArgsFastHTTPMulti) GetURLValues() url.Values
- type ArgsMapStringString
- type ArgsURLValues
- type Cookie
- type MapStringString
- type Request
- type RequestFastHTTP
- func (r RequestFastHTTP) AllArgs() Args
- func (r RequestFastHTTP) Header(s string) []byte
- func (r RequestFastHTTP) HeaderString(s string) string
- func (r RequestFastHTTP) Method() []byte
- func (r RequestFastHTTP) MultipartForm() (*multipart.Form, error)
- func (r RequestFastHTTP) ParseForm() error
- func (r RequestFastHTTP) PostArgs() Args
- func (r RequestFastHTTP) PostBody() ([]byte, error)
- func (r RequestFastHTTP) QueryArgs() Args
- func (r RequestFastHTTP) RemoteAddr() net.Addr
- func (r RequestFastHTTP) RemoteAddress() string
- func (r RequestFastHTTP) RequestURI() []byte
- func (r RequestFastHTTP) RequestURIVar(s string) string
- func (r RequestFastHTTP) UserAgent() []byte
- type RequestNetHTTP
- func (r RequestNetHTTP) AllArgs() Args
- func (r RequestNetHTTP) Form() url.Values
- func (r RequestNetHTTP) Header(s string) []byte
- func (r RequestNetHTTP) HeaderString(s string) string
- func (r RequestNetHTTP) Headers() http.Header
- func (r RequestNetHTTP) Method() []byte
- func (r *RequestNetHTTP) MultipartForm() (*multipart.Form, error)
- func (r *RequestNetHTTP) ParseForm() error
- func (r RequestNetHTTP) PostArgs() Args
- func (r RequestNetHTTP) PostBody() ([]byte, error)
- func (r RequestNetHTTP) QueryArgs() Args
- func (r RequestNetHTTP) RemoteAddr() net.Addr
- func (r RequestNetHTTP) RemoteAddress() string
- func (r RequestNetHTTP) RequestURI() []byte
- func (r RequestNetHTTP) RequestURIVar(s string) string
- func (r RequestNetHTTP) UserAgent() []byte
- type Response
- type ResponseFastHTTP
- func (w ResponseFastHTTP) GetHeader(k string) []byte
- func (w ResponseFastHTTP) SetBodyBytes(body []byte) (int, error)
- func (w ResponseFastHTTP) SetBodyStream(bodyStream io.Reader, bodySize int) error
- func (w ResponseFastHTTP) SetContentType(ct string)
- func (w ResponseFastHTTP) SetCookie(cookie *Cookie)
- func (w ResponseFastHTTP) SetHeader(k, v string)
- func (w ResponseFastHTTP) SetStatusCode(code int)
- type ResponseNetHTTP
- func (w ResponseNetHTTP) GetHeader(k string) []byte
- func (w ResponseNetHTTP) SetBodyBytes(body []byte) (int, error)
- func (w ResponseNetHTTP) SetBodyStream(bodyStream io.Reader, bodySize int) error
- func (w ResponseNetHTTP) SetContentType(ct string)
- func (w ResponseNetHTTP) SetCookie(cookie *Cookie)
- func (w ResponseNetHTTP) SetHeader(k, v string)
- func (w ResponseNetHTTP) SetStatusCode(code int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResReqFastHTTP ¶
func NewResReqFastHTTP(ctx *fasthttp.RequestCtx) (ResponseFastHTTP, *RequestFastHTTP)
func NewResReqNetHTTP ¶
func NewResReqNetHTTP(res http.ResponseWriter, req *http.Request) (ResponseNetHTTP, *RequestNetHTTP)
Types ¶
type ArgsFastHTTP ¶
func NewArgsFastHTTP ¶
func NewArgsFastHTTP(args *fasthttp.Args) ArgsFastHTTP
func (ArgsFastHTTP) GetBytes ¶
func (a ArgsFastHTTP) GetBytes(key string) []byte
func (ArgsFastHTTP) GetBytesSlice ¶
func (a ArgsFastHTTP) GetBytesSlice(key string) [][]byte
func (ArgsFastHTTP) GetString ¶
func (a ArgsFastHTTP) GetString(key string) string
func (ArgsFastHTTP) GetStringSlice ¶
func (a ArgsFastHTTP) GetStringSlice(key string) []string
func (ArgsFastHTTP) GetURLValues ¶
func (a ArgsFastHTTP) GetURLValues() url.Values
type ArgsFastHTTPMulti ¶
func NewArgsFastHTTPMulti ¶
func NewArgsFastHTTPMulti(args []*fasthttp.Args) ArgsFastHTTPMulti
func (ArgsFastHTTPMulti) GetBytes ¶
func (args ArgsFastHTTPMulti) GetBytes(key string) []byte
func (ArgsFastHTTPMulti) GetBytesSlice ¶
func (args ArgsFastHTTPMulti) GetBytesSlice(key string) [][]byte
func (ArgsFastHTTPMulti) GetString ¶
func (args ArgsFastHTTPMulti) GetString(key string) string
func (ArgsFastHTTPMulti) GetStringSlice ¶
func (args ArgsFastHTTPMulti) GetStringSlice(key string) []string
func (ArgsFastHTTPMulti) GetURLValues ¶
func (args ArgsFastHTTPMulti) GetURLValues() url.Values
type ArgsMapStringString ¶
type ArgsMapStringString struct{ Raw MapStringString }
func NewArgsMapStringString ¶
func NewArgsMapStringString(args MapStringString) ArgsMapStringString
func (ArgsMapStringString) GetBytes ¶
func (args ArgsMapStringString) GetBytes(key string) []byte
func (ArgsMapStringString) GetBytesSlice ¶
func (args ArgsMapStringString) GetBytesSlice(key string) [][]byte
func (ArgsMapStringString) GetString ¶
func (args ArgsMapStringString) GetString(key string) string
func (ArgsMapStringString) GetStringSlice ¶
func (args ArgsMapStringString) GetStringSlice(key string) []string
type ArgsURLValues ¶
func NewArgsURLValues ¶
func NewArgsURLValues(args url.Values) ArgsURLValues
func (ArgsURLValues) GetBytes ¶
func (args ArgsURLValues) GetBytes(key string) []byte
func (ArgsURLValues) GetBytesSlice ¶
func (args ArgsURLValues) GetBytesSlice(key string) [][]byte
func (ArgsURLValues) GetString ¶
func (args ArgsURLValues) GetString(key string) string
func (ArgsURLValues) GetStringSlice ¶
func (args ArgsURLValues) GetStringSlice(key string) []string
func (ArgsURLValues) GetURLValues ¶
func (args ArgsURLValues) GetURLValues() url.Values
type Cookie ¶
func (*Cookie) ToFastHTTP ¶
type MapStringString ¶
func (MapStringString) Get ¶
func (m MapStringString) Get(key string) string
func (MapStringString) GetSlice ¶
func (m MapStringString) GetSlice(key string) []string
type Request ¶
type Request interface { Header(s string) []byte HeaderString(s string) string RemoteAddr() net.Addr RemoteAddress() string UserAgent() []byte Method() []byte ParseForm() error AllArgs() Args QueryArgs() Args PostArgs() Args MultipartForm() (*multipart.Form, error) RequestURI() []byte RequestURIVar(s string) string PostBody() ([]byte, error) }
type RequestFastHTTP ¶
type RequestFastHTTP struct { Raw *fasthttp.RequestCtx // contains filtered or unexported fields }
func NewRequestFastHTTP ¶
func NewRequestFastHTTP(ctx *fasthttp.RequestCtx) *RequestFastHTTP
func (RequestFastHTTP) AllArgs ¶
func (r RequestFastHTTP) AllArgs() Args
func (RequestFastHTTP) Header ¶
func (r RequestFastHTTP) Header(s string) []byte
func (RequestFastHTTP) HeaderString ¶
func (r RequestFastHTTP) HeaderString(s string) string
func (RequestFastHTTP) Method ¶
func (r RequestFastHTTP) Method() []byte
func (RequestFastHTTP) MultipartForm ¶
func (r RequestFastHTTP) MultipartForm() (*multipart.Form, error)
func (RequestFastHTTP) ParseForm ¶
func (r RequestFastHTTP) ParseForm() error
func (RequestFastHTTP) PostArgs ¶
func (r RequestFastHTTP) PostArgs() Args
func (RequestFastHTTP) PostBody ¶
func (r RequestFastHTTP) PostBody() ([]byte, error)
func (RequestFastHTTP) QueryArgs ¶
func (r RequestFastHTTP) QueryArgs() Args
func (RequestFastHTTP) RemoteAddr ¶
func (r RequestFastHTTP) RemoteAddr() net.Addr
func (RequestFastHTTP) RemoteAddress ¶
func (r RequestFastHTTP) RemoteAddress() string
func (RequestFastHTTP) RequestURI ¶
func (r RequestFastHTTP) RequestURI() []byte
func (RequestFastHTTP) RequestURIVar ¶
func (r RequestFastHTTP) RequestURIVar(s string) string
func (RequestFastHTTP) UserAgent ¶
func (r RequestFastHTTP) UserAgent() []byte
type RequestNetHTTP ¶
func NewRequestNetHTTP ¶
func NewRequestNetHTTP(req *http.Request) *RequestNetHTTP
func (RequestNetHTTP) AllArgs ¶
func (r RequestNetHTTP) AllArgs() Args
func (RequestNetHTTP) Form ¶
func (r RequestNetHTTP) Form() url.Values
func (RequestNetHTTP) Header ¶
func (r RequestNetHTTP) Header(s string) []byte
func (RequestNetHTTP) HeaderString ¶
func (r RequestNetHTTP) HeaderString(s string) string
func (RequestNetHTTP) Headers ¶
func (r RequestNetHTTP) Headers() http.Header
func (RequestNetHTTP) Method ¶
func (r RequestNetHTTP) Method() []byte
func (*RequestNetHTTP) MultipartForm ¶
func (r *RequestNetHTTP) MultipartForm() (*multipart.Form, error)
func (*RequestNetHTTP) ParseForm ¶
func (r *RequestNetHTTP) ParseForm() error
func (RequestNetHTTP) PostArgs ¶
func (r RequestNetHTTP) PostArgs() Args
func (RequestNetHTTP) PostBody ¶
func (r RequestNetHTTP) PostBody() ([]byte, error)
func (RequestNetHTTP) QueryArgs ¶
func (r RequestNetHTTP) QueryArgs() Args
func (RequestNetHTTP) RemoteAddr ¶
func (r RequestNetHTTP) RemoteAddr() net.Addr
func (RequestNetHTTP) RemoteAddress ¶
func (r RequestNetHTTP) RemoteAddress() string
func (RequestNetHTTP) RequestURI ¶
func (r RequestNetHTTP) RequestURI() []byte
func (RequestNetHTTP) RequestURIVar ¶
func (r RequestNetHTTP) RequestURIVar(s string) string
func (RequestNetHTTP) UserAgent ¶
func (r RequestNetHTTP) UserAgent() []byte
type ResponseFastHTTP ¶
type ResponseFastHTTP struct {
Raw *fasthttp.RequestCtx
}
func NewResponseFastHTTP ¶
func NewResponseFastHTTP(ctx *fasthttp.RequestCtx) ResponseFastHTTP
func (ResponseFastHTTP) GetHeader ¶
func (w ResponseFastHTTP) GetHeader(k string) []byte
func (ResponseFastHTTP) SetBodyBytes ¶
func (w ResponseFastHTTP) SetBodyBytes(body []byte) (int, error)
func (ResponseFastHTTP) SetBodyStream ¶
func (w ResponseFastHTTP) SetBodyStream(bodyStream io.Reader, bodySize int) error
SetBodyStream takes an `io.Reader` and an optional `bodySize`. If bodySize is >= 0, then bodySize bytes must be provided by bodyStream before returning io.EOF. If bodySize < 0, then bodyStream is read until io.EOF.
func (ResponseFastHTTP) SetContentType ¶
func (w ResponseFastHTTP) SetContentType(ct string)
func (ResponseFastHTTP) SetCookie ¶
func (w ResponseFastHTTP) SetCookie(cookie *Cookie)
func (ResponseFastHTTP) SetHeader ¶
func (w ResponseFastHTTP) SetHeader(k, v string)
func (ResponseFastHTTP) SetStatusCode ¶
func (w ResponseFastHTTP) SetStatusCode(code int)
type ResponseNetHTTP ¶
type ResponseNetHTTP struct{ Raw http.ResponseWriter }
func NewResponseNetHTTP ¶
func NewResponseNetHTTP(w http.ResponseWriter) ResponseNetHTTP
func (ResponseNetHTTP) GetHeader ¶
func (w ResponseNetHTTP) GetHeader(k string) []byte
func (ResponseNetHTTP) SetBodyBytes ¶
func (w ResponseNetHTTP) SetBodyBytes(body []byte) (int, error)
func (ResponseNetHTTP) SetBodyStream ¶
func (w ResponseNetHTTP) SetBodyStream(bodyStream io.Reader, bodySize int) error
SetBodyStream takes an `io.Reader`. `bodySize` is accepted but ignored to fulfill the `Response` interface requirement.
func (ResponseNetHTTP) SetContentType ¶
func (w ResponseNetHTTP) SetContentType(ct string)
func (ResponseNetHTTP) SetCookie ¶
func (w ResponseNetHTTP) SetCookie(cookie *Cookie)
func (ResponseNetHTTP) SetHeader ¶
func (w ResponseNetHTTP) SetHeader(k, v string)
func (ResponseNetHTTP) SetStatusCode ¶
func (w ResponseNetHTTP) SetStatusCode(code int)
Click to show internal directories.
Click to hide internal directories.