codes package - google.golang.org/grpc/codes - Go Packages (original) (raw)
Documentation¶
Package codes defines the canonical error codes used by gRPC. It is consistent across various languages.
This section is empty.
This section is empty.
This section is empty.
A Code is a status code defined according to the gRPC documentation.
Only the codes defined as consts in this package are valid codes. Do not use other code values. Behavior of other codes is implementation-specific and interoperability between implementations is not guaranteed.
const (
OK [Code](#Code) = 0
Canceled [Code](#Code) = 1
Unknown [Code](#Code) = 2
InvalidArgument [Code](#Code) = 3
DeadlineExceeded [Code](#Code) = 4
NotFound [Code](#Code) = 5
AlreadyExists [Code](#Code) = 6
PermissionDenied [Code](#Code) = 7
ResourceExhausted [Code](#Code) = 8
FailedPrecondition [Code](#Code) = 9
Aborted [Code](#Code) = 10
OutOfRange [Code](#Code) = 11
Unimplemented [Code](#Code) = 12
Internal [Code](#Code) = 13
Unavailable [Code](#Code) = 14
DataLoss [Code](#Code) = 15
Unauthenticated [Code](#Code) = 16
)
UnmarshalJSON unmarshals b into the Code.