Documentation ¶
Index ¶
- func Decode(r io.Reader, data interface{}) (err error)
- func DecodeRequest(r *http.Request, data interface{}) (err error)
- func DecodeResponse(res *http.Response, data interface{}) (err error)
- func Encode(w io.Writer, data interface{}) (err error)
- func EncodeRequest(req *http.Request, data interface{}, contentTypes ...string) error
- func EncodeResponse(w http.ResponseWriter, data interface{}, status int, contentTypes ...string) error
- func ErrorHandler(w http.ResponseWriter, r *http.Request, msg string, code int, err error) error
- func Handler(w http.ResponseWriter, r *http.Request, data interface{}, ...) (code int, err error)
- func MarshalIndent(data interface{}, pref, ind string) ([]byte, error)
- func Request(ctx context.Context, method string, url string, payloyd interface{}, ...) error
- func Unmarshal(data []byte, i interface{}) error
- type RFC7807Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeRequest ¶
DecodeRequest decodes http request body.
func DecodeResponse ¶ added in v0.0.25
DecodeResponse decodes http response body.
func EncodeRequest ¶ added in v0.0.25
EncodeRequest encodes http request.
func EncodeResponse ¶
func EncodeResponse(w http.ResponseWriter, data interface{}, status int, contentTypes ...string) error
func ErrorHandler ¶
func MarshalIndent ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.