{"modulePath":"github.com/xmlking/toolkit","version":"v0.5.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package codes\n\n## Types\n\n```go\ntype Code interface {\n\tString() string\n\tInt() uint32\n}\n```\n\n```go\ntype TCode uint32\n```\nA TCode is an unsigned 32-bit error code as defined in the gRPC spec.\n\n```go\nconst (\n\t// OK is returned on success.\n\tOK TCode = 0\n\n\t// Unknown is error that do not have enough error information\n\tUnknown TCode = 2\n\n\t// TemporaryErrors - such as network problems, server unavailability, etc.\n\t// retryable immediately with exponential backoff\n\tTempUnavailable TCode = 50\n\n\t// SystemErrors - such as misconfiguration, unavailable dependencies, etc.\n\t// retryable after fixing system config or restoring failed services.\n\t// SystemErrors fall in between 100 - 149\n\tSystemTokenExpired     TCode = 100\n\tSystemPathDoesNotExist TCode = 101\n\n\t// DataErrors - such as invalid/missing input, insufficient/corrupted payload, etc.\n\t// not-retryable as they are permanent errors. fix the payload and replay.\n\t// DataErrors fall in between 150 - 199\n\tDataSchemaNotFound   TCode = 150\n\tDataInvalidInput     TCode = 151\n\tDataResourceNotFound TCode = 152\n)\n```\n\n```go\nfunc (c TCode) Int() uint32\n```\n\n```go\nfunc (c TCode) String() string\n```\n\n","path":"github.com/xmlking/toolkit/errors/codes","name":"codes","synopsis":"","isRedistributable":true}
