This commit is contained in:
田欧 2018-01-05 07:44:29 +08:00 коммит произвёл mmukhi
Родитель e975017b47
Коммит 8a8ac82f1f
1 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -19,6 +19,7 @@
// Package codes defines the canonical error codes used by gRPC. It is
// consistent across various languages.
package codes // import "google.golang.org/grpc/codes"
import (
"fmt"
)
@ -69,10 +70,6 @@ const (
// instead for those errors).
PermissionDenied Code = 7
// Unauthenticated indicates the request does not have valid
// authentication credentials for the operation.
Unauthenticated Code = 16
// ResourceExhausted indicates some resource has been exhausted, perhaps
// a per-user quota, or perhaps the entire file system is out of space.
ResourceExhausted Code = 8
@ -142,6 +139,10 @@ const (
// DataLoss indicates unrecoverable data loss or corruption.
DataLoss Code = 15
// Unauthenticated indicates the request does not have valid
// authentication credentials for the operation.
Unauthenticated Code = 16
)
var strToCode = map[string]Code{