package http const ( // 200 JsonOK ResponseMessage = "{\"message\":\"OK\"}" JsonPartialContent = "{\"message\":\"Partial Content\"}" // 300 JsonMovedPermanently ResponseMessage = "{\"message\":\"Moved Permanently\"}" JsonFound = "{\"message\":\"Found\"}" JsonSeeOther = "{\"message\":\"See Other\"}" JsonTemporaryRedirect = "{\"message\":\"Temporary Redirect\"}" JsonPermanentRedirect = "{\"message\":\"Permanent Redirect\"}" JsonUnauthorized = "{\"message\":\"Unauthorized\"}" JsonPaymentRequired = "{\"message\":\"Payment Required\"}" // 400 JsonBadRequest ResponseMessage = "{\"message\":\"Bad Request\"}" JsonForbidden = "{\"message\":\"Forbidden\"}" JsonNotFound = "{\"message\":\"Not Found\"}" JsonMethodNotAllowed = "{\"message\":\"Method Not Allowed\"}" JsonNotAcceptable = "{\"message\":\"Not Acceptable\"}" JsonRequestTimeout = "{\"message\":\"Request Timeout\"}" JsonConflict = "{\"message\":\"Conflict\"}" JsonGone = "{\"message\":\"Gone\"}" JsonPreconditionFailed = "{\"message\":\"Precondition Failed\"}" JsonRequestEntityTooLarge = "{\"message\":\"Request Entity Too Large\"}" JsonRequestURITooLong = "{\"message\":\"Request URI Too Long\"}" JsonUnsupportedMediaType = "{\"message\":\"Unsupported Media Type\"}" JsonUpgradeRequired = "{\"message\":\"Upgrade Required\"}" JsonPreconditionRequired = "{\"message\":\"Precondition Required\"}" JsonTooManyRequests = "{\"message\":\"Too Many Requests\"}" JsonRequestHeaderFieldsTooLarge = "{\"message\":\"Request Header Fields Too Large\"}" JsonUnavailableForLegalReasons = "{\"message\":\"Unavailable For Legal Reasons\"}" // 500 JsonInternalServerError ResponseMessage = "{\"message\":\"Internal Server Error\"}" JsonNotImplemented = "{\"message\":\"Not Implemented\"}" JsonBadGateway = "{\"message\":\"Bad Gateway\"}" JsonServiceUnavailable = "{\"message\":\"Service Unavailable\"}" JsonGatewayTimeout = "{\"message\":\"Gateway Timeout\"}" JsonHTTPVersionNotSupported = "{\"message\":\"HTTP Version Not Supported\"}" JsonInsufficientStorage = "{\"message\":\"Insufficient Storage\"}" JsonLoopDetected = "{\"message\":\"Loop Detected\"}" ) var ( JsonContentType = []string{"application/json; charset=utf-8"} ) type ResponseMessage string func (rm ResponseMessage) MarshalJSON() ([]byte, error) { return []byte(rm), nil }