Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadRequest = errors.New("error bad request")
View Source
var ErrConflict = errors.New("error conflict")
View Source
var ErrForbidden = errors.New("error access forbidden")
View Source
var ErrNotFound = errors.New("error not found")
View Source
var ErrUnknown = errors.New("error unknown")
Functions ¶
func HttpErrorRender ¶
func HttpErrorRender(err error, w http.ResponseWriter, resource string)
func RenderError ¶
func RenderError(err error, w http.ResponseWriter, statusCode int, resource string)
func WriteContentType ¶
func WriteContentType(w http.ResponseWriter)
Types ¶
type ErrorSerializer ¶
type ErrorSerializer interface { RenderError(err error, w http.ResponseWriter, statusCode int) WriteContentType(w http.ResponseWriter) }
Click to show internal directories.
Click to hide internal directories.