Documentation ¶
Index ¶
Constants ¶
View Source
const ( OK = codes.OK Canceled = codes.Canceled Unknown = codes.Unknown InvalidArgument = codes.InvalidArgument DeadlineExceeded = codes.DeadlineExceeded NotFound = codes.NotFound AlreadyExists = codes.AlreadyExists PermissionDenied = codes.PermissionDenied ResourceExhausted = codes.ResourceExhausted FailedPrecondition = codes.FailedPrecondition Aborted = codes.Aborted OutOfRange = codes.OutOfRange Unimplemented = codes.Unimplemented Internal = codes.Internal DataLoss = codes.DataLoss Unauthenticated = codes.Unauthenticated )
These constants are all the rpc error codes.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(code StatusCode, msg string) error
Error wraps the message with a status code into an error.
func Errorf ¶
func Errorf(code StatusCode, format string, a ...interface{}) error
Errorf : Error :: fmt.Sprintf : fmt.Sprint
Types ¶
type StatusCode ¶
StatusCode is the type of status codes for grpc.
Click to show internal directories.
Click to hide internal directories.