Documentation
¶
Index ¶
- func EnsureJsonMime(next http.Handler) http.Handler
- func EnsureUnmarshal(buffer io.ReadCloser, target interface{}, required []string) error
- func EnsureUnmarshalBuffer(buffer []byte, target interface{}, required []string) error
- func ErrorCode(w http.ResponseWriter, code int)
- func ErrorWrapper(w http.ResponseWriter, err error) bool
- func ShowError(w http.ResponseWriter, err error, code int) bool
- func Unmarshal(buffer io.ReadCloser, target interface{}) error
- type RestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureJsonMime ¶
ensure we get json data in the request
func EnsureUnmarshal ¶
func EnsureUnmarshal(buffer io.ReadCloser, target interface{}, required []string) error
func EnsureUnmarshalBuffer ¶
func ErrorCode ¶
func ErrorCode(w http.ResponseWriter, code int)
func ErrorWrapper ¶
func ErrorWrapper(w http.ResponseWriter, err error) bool
func Unmarshal ¶
func Unmarshal(buffer io.ReadCloser, target interface{}) error
Types ¶
Click to show internal directories.
Click to hide internal directories.