Documentation
¶
Index ¶
- Variables
- func WriteErrorResponse(w http.ResponseWriter, status int, code, message, details string)
- func WriteInvalidFilterResponse(w http.ResponseWriter, details string)
- func WriteInvalidJsonResponse(w http.ResponseWriter, details string)
- func WriteInvalidQueryResponse(w http.ResponseWriter, details string)
- func WriteInvalidUrlResponse(w http.ResponseWriter, details string)
- func WriteNotFoundResponse(w http.ResponseWriter, details string)
- func WriteServerErrorResponse(w http.ResponseWriter, details string)
- type ApiError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERR_INVALID_FILTER_VALUE = "INVALID_FILTER_NAME" ERR_INVALID_FILTER_VALUE_MESSAGE = "The filter value you provided is not valid. Please check the format and try again." ERR_INVALID_URL_VALUE = "INVALID_QUERY_PARAMETER" ERR_INVALID_URL_MESSAGE = "The URL parameter you provided is not valid. Please check the format and try again." ERR_INVALID_QUERY_VALUE = "INVALID_QUERY_PARAMETER" ERR_INVALID_QUERY_MESSAGE = "The query parameter you provided is not valid. Please check the format and try again." ERR_INVALID_JSON_BODY = "INVALID_JSON_BODY" ERR_INVALID_JSON_MESSAGE = "The JSON body you provided is not valid. Please check the format and try again." ERR_SERVER_ERROR = "SERVER_ERROR" ERR_SERVER_MESSAGE = "A server error occurred. This is not your fault. Please try again later and contact the administrator." ERR_NOT_FOUND = "NOT_FOUND" ERR_NOT_FOUND_MESSAGE = "The requested resource was not found." )
Functions ¶
func WriteErrorResponse ¶
func WriteErrorResponse(w http.ResponseWriter, status int, code, message, details string)
func WriteInvalidFilterResponse ¶
func WriteInvalidFilterResponse(w http.ResponseWriter, details string)
func WriteInvalidJsonResponse ¶
func WriteInvalidJsonResponse(w http.ResponseWriter, details string)
func WriteInvalidQueryResponse ¶
func WriteInvalidQueryResponse(w http.ResponseWriter, details string)
func WriteInvalidUrlResponse ¶
func WriteInvalidUrlResponse(w http.ResponseWriter, details string)
func WriteNotFoundResponse ¶
func WriteNotFoundResponse(w http.ResponseWriter, details string)
func WriteServerErrorResponse ¶
func WriteServerErrorResponse(w http.ResponseWriter, details string)
Types ¶
Click to show internal directories.
Click to hide internal directories.