Documentation ¶
Index ¶
Constants ¶
View Source
const ( OK int64 = 0 // 10000 - 19999: User & Auth Related Forbidden int64 = 10002 TokenGeneral int64 = 10010 TokenMissing int64 = 10011 TokenMalformed int64 = 10012 TokenExpired int64 = 10013 TokenInvalid int64 = 10014 EmailOrPasswordInvalid int64 = 10021 EmailAlreadyRegistered int64 = 10022 TooManyRequests int64 = 19001 // 30000 - 39999: Resource Related ResourceGeneral int64 = 30000 ResourceForbidden int64 = 30003 ResourceNotFound int64 = 30004 // --> 31000 - 31999: Product related ProductNotFound int64 = 31004 ProductTitleTooShort int64 = 31111 ProductTitleTooLong int64 = 31112 ProductDescriptionTooLong int64 = 31121 ProductCategoryEmpty int64 = 31131 ProductCategoryInvalid int64 = 31132 ProductPriceInvalid int64 = 31141 ProductPriceTooLow int64 = 31142 ProductTagsTooLong int64 = 31151 // 40000 - 49999: Request Validations BadRequest int64 = 40000 PasswordMalformed int64 = 40001 UnparsableBody int64 = 42000 // 90000 - 99999: Server & Unknown Errors ServerError int64 = 90000 UnknownError int64 = 99999 )
Variables ¶
View Source
var HTTPCodeMap = map[int][]int64{ 200: {OK}, 400: {BadRequest, EmailOrPasswordInvalid, EmailAlreadyRegistered, UnknownError}, 401: {Unauthorized, TokenGeneral, TokenMissing, TokenMalformed, TokenExpired, TokenInvalid}, 403: {Forbidden, ResourceForbidden}, 404: {ResourceNotFound}, 422: {UnparsableBody}, 429: {TooManyRequests}, 500: {ServerError}, 503: {ServiceUnavailable}, }
Functions ¶
func ParseGrpcErrMsg ¶
func StandardErrorMessage ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.