Documentation ¶
Index ¶
- func New(statusCode int, errorsMap *map[string]string) error
- func NewForBadRequest(err *map[string]string) error
- func NewForBadRequestWithSingleField(field string, message string) error
- func NewForForbiddenWithSingleField(field string, message string) error
- func NewForSingleField(statusCode int, field string, message string) error
- func ResponseError(rw http.ResponseWriter, err error)
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewForBadRequest ¶
NewForBadRequest create a new HTTPError instance pertaining to 403 bad requests with the multi-errors. This is a convinience constructor.
func NewForBadRequestWithSingleField ¶
NewForBadRequestWithSingleField create a new HTTPError instance pertaining to 403 bad requests for a single field. This is a convinience constructor.
func NewForForbiddenWithSingleField ¶
NewForForbiddenWithSingleField create a new HTTPError instance pertaining to 403 bad requests for a single field. This is a convinience constructor.
func NewForSingleField ¶
NewForSingleField create a new HTTPError instance for a single field. This is a convinience constructor.
func ResponseError ¶
func ResponseError(rw http.ResponseWriter, err error)
ResponseError function returns the HTTP error response based on the httpcode used.
Types ¶
Click to show internal directories.
Click to hide internal directories.