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)
- 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) 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) 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)
func WriteSimpleJson ¶
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 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) 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) 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
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
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.