Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendErrorWithParams ¶
func SendErrorWithParams(ctx *gin.Context, statusCode int, data interface{}, errorParams map[string]string)
SendErrorWithParams the same as above but for errors that require error parameters
func SendInternalServerError ¶
SendInternalServerError directly sends an internal server error response
Types ¶
type Response ¶
type Response struct { // Response payload // Ok if the response was successful or not Ok bool `json:"ok"` // Message the payload of the response, depending on the endpoint/response status Message interface{} `json:"message"` // ErrorParams parameters defined if the response is not successful to help client's debugging ErrorParams map[string]string `json:"error_params,omitempty"` // contains filtered or unexported fields }
func NewResponse ¶
Click to show internal directories.
Click to hide internal directories.