Documentation ¶
Index ¶
- func WriteBadLicense(w http.ResponseWriter)
- func WriteBadRequestError(w http.ResponseWriter, method, message string)
- func WriteDuplicateError(w http.ResponseWriter, method, entity string)
- func WriteForbiddenError(w http.ResponseWriter)
- func WriteGeneralSQLError(w http.ResponseWriter, method string, err error)
- func WriteJSON(w http.ResponseWriter, v interface{})
- func WriteJSONMarshalError(w http.ResponseWriter, method, entity string, err error)
- func WriteMarshalError(w http.ResponseWriter, err error)
- func WriteMissingDataError(w http.ResponseWriter, method, parameter string)
- func WriteNotFoundError(w http.ResponseWriter, method string, id string)
- func WritePayloadError(w http.ResponseWriter, method string, err error)
- func WriteRequestError(w http.ResponseWriter, msg string)
- func WriteServerError(w http.ResponseWriter, method string, err error)
- func WriteSuccessBytes(w http.ResponseWriter, data []byte)
- func WriteSuccessEmptyJSON(w http.ResponseWriter)
- func WriteSuccessString(w http.ResponseWriter, data string)
- func WriteTransactionError(w http.ResponseWriter, method string, err error)
- func WriteUnauthorizedError(w http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteBadLicense ¶ added in v1.48.2
func WriteBadLicense(w http.ResponseWriter)
WriteBadLicense writes 402 when license is invalid
func WriteBadRequestError ¶
func WriteBadRequestError(w http.ResponseWriter, method, message string)
WriteBadRequestError error handling
func WriteDuplicateError ¶
func WriteDuplicateError(w http.ResponseWriter, method, entity string)
WriteDuplicateError error handling
func WriteForbiddenError ¶
func WriteForbiddenError(w http.ResponseWriter)
WriteForbiddenError error handling
func WriteGeneralSQLError ¶
func WriteGeneralSQLError(w http.ResponseWriter, method string, err error)
WriteGeneralSQLError error handling
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, v interface{})
WriteJSON serializes data as JSON to HTTP response.
func WriteJSONMarshalError ¶
func WriteJSONMarshalError(w http.ResponseWriter, method, entity string, err error)
WriteJSONMarshalError error handling
func WriteMarshalError ¶
func WriteMarshalError(w http.ResponseWriter, err error)
WriteMarshalError error handling
func WriteMissingDataError ¶
func WriteMissingDataError(w http.ResponseWriter, method, parameter string)
WriteMissingDataError error handling
func WriteNotFoundError ¶
func WriteNotFoundError(w http.ResponseWriter, method string, id string)
WriteNotFoundError error handling
func WritePayloadError ¶
func WritePayloadError(w http.ResponseWriter, method string, err error)
WritePayloadError error handling
func WriteRequestError ¶ added in v1.48.2
func WriteRequestError(w http.ResponseWriter, msg string)
WriteRequestError sends custom error message.
func WriteServerError ¶
func WriteServerError(w http.ResponseWriter, method string, err error)
WriteServerError error handling
func WriteSuccessBytes ¶
func WriteSuccessBytes(w http.ResponseWriter, data []byte)
WriteSuccessBytes dumps bytes to HTTP response
func WriteSuccessEmptyJSON ¶
func WriteSuccessEmptyJSON(w http.ResponseWriter)
WriteSuccessEmptyJSON writes empty JSON HTTP response
func WriteSuccessString ¶
func WriteSuccessString(w http.ResponseWriter, data string)
WriteSuccessString writes string to HTTP response
func WriteTransactionError ¶
func WriteTransactionError(w http.ResponseWriter, method string, err error)
WriteTransactionError error handling
func WriteUnauthorizedError ¶
func WriteUnauthorizedError(w http.ResponseWriter)
WriteUnauthorizedError error handling
Types ¶
This section is empty.