Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RespondError ¶
func RespondError(w http.ResponseWriter, err error)
RespondError returns a validation error else
func RespondErrorMessage ¶
func RespondErrorMessage(w http.ResponseWriter, code int, message string)
RespondErrorMessage makes the error response with payload as json format
func RespondJSON ¶
func RespondJSON(w http.ResponseWriter, status int, payload interface{})
RespondJSON makes the response with payload as json format
func UnmarshalJSON ¶
UnmarshalJSON checks for empty body and then parses JSON into the target
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.