Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentTypeApplicationJSON = "application/json" HeaderContentType = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
func RespondWithBody ¶
func RespondWithBody(w http.ResponseWriter, status int, data interface{})
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, status int, err error)
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Errors []Error `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.