Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPErr ¶
type HTTPErr struct { Code int // The HTTP error code to use for this error Inner error // The actual error of this HTTPErr struct }
HTTPErr provides a basic struct to pass up which HTTP status code should be used with this error
func MakeBadRequestHTTPErr ¶
MakeBadRequestHTTPErr is a wrapper for MakeHTTPErr that passes in http.StatusBadRequest, since we use that response quite often
func MakeHTTPErr ¶
MakeHTTPErr constructs an HTTPErr instance: this mainly makes it a bit easier to read and pass into return statements
func MakeInternalHTTPErr ¶
MakeInternalHTTPErr is a wrapper for MakeHTTPErr that passes in http.StatusInternalServerError, since we use that response quite often
Click to show internal directories.
Click to hide internal directories.