Documentation ¶
Index ¶
- type Constructor
- type RequestContext
- func (rc *RequestContext) Address() string
- func (rc *RequestContext) Context() context.Context
- func (rc *RequestContext) DecodeJSON(out interface{}) error
- func (rc *RequestContext) JSON() *response.JSONResponse
- func (rc *RequestContext) Request() *http.Request
- func (rc *RequestContext) RequestHandler() string
- func (rc *RequestContext) RequestHeader() http.Header
- func (rc *RequestContext) ResponseWriter() http.ResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constructor ¶
type Constructor struct { HTTPResponseWriter http.ResponseWriter HTTPRequest *http.Request Address string Path string Method string }
Constructor of context
type RequestContext ¶
type RequestContext struct {
// contains filtered or unexported fields
}
RequestContext struct
func (*RequestContext) Address ¶
func (rc *RequestContext) Address() string
Address return the address where request arrived to
func (*RequestContext) Context ¶
func (rc *RequestContext) Context() context.Context
Context return the http.Request.Context
func (*RequestContext) DecodeJSON ¶
func (rc *RequestContext) DecodeJSON(out interface{}) error
DecodeJSON from request body
func (*RequestContext) JSON ¶
func (rc *RequestContext) JSON() *response.JSONResponse
JSON to create a json response via http response lib
func (*RequestContext) Request ¶
func (rc *RequestContext) Request() *http.Request
Request return http request from request context
func (*RequestContext) RequestHandler ¶
func (rc *RequestContext) RequestHandler() string
RequestHandler return handler name of the request
func (*RequestContext) RequestHeader ¶
func (rc *RequestContext) RequestHeader() http.Header
RequestHeader return http.Request.Header
func (*RequestContext) ResponseWriter ¶
func (rc *RequestContext) ResponseWriter() http.ResponseWriter
ResponseWriter return http response writer from request context
Click to show internal directories.
Click to hide internal directories.