Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ForbiddenResponse = ResponseType{false, nil, &ErrorWrap{"Forbidden", http.StatusForbidden, nil}} InternalServerErrorResponse = ResponseType{false, nil, &ErrorWrap{"Internal Server Error", http.StatusInternalServerError, nil}} BadRequestResponse = ResponseType{false, nil, &ErrorWrap{"Bad Request", http.StatusBadRequest, nil}} )
Functions ¶
This section is empty.
Types ¶
type ResponseType ¶
type ResponseType struct { Success bool `json:"success"` Data interface{} `json:"data"` Error *ErrorWrap `json:"error"` }
func ErrorResponse ¶
func ErrorResponse(code int, message string) ResponseType
Click to show internal directories.
Click to hide internal directories.