status

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package status provides statuses and errors returned by grpc handler functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error added in v1.0.0

func Error(code codes.Code, msg string) error

func Errorf added in v1.0.0

func Errorf(code codes.Code, format string, args ...interface{}) error

func Log added in v1.2.1

func Log(code codes.Code, err error)

func WrapWithAborted

func WrapWithAborted(msg string, err error, details ...interface{}) error

func WrapWithAlreadyExists

func WrapWithAlreadyExists(msg string, err error, details ...interface{}) error

func WrapWithCanceled

func WrapWithCanceled(msg string, err error, details ...interface{}) error

func WrapWithDataLoss

func WrapWithDataLoss(msg string, err error, details ...interface{}) error

func WrapWithDeadlineExceeded

func WrapWithDeadlineExceeded(msg string, err error, details ...interface{}) error

func WrapWithFailedPrecondition

func WrapWithFailedPrecondition(msg string, err error, details ...interface{}) error

func WrapWithInternal

func WrapWithInternal(msg string, err error, details ...interface{}) error

func WrapWithInvalidArgument

func WrapWithInvalidArgument(msg string, err error, details ...interface{}) error

func WrapWithNotFound

func WrapWithNotFound(msg string, err error, details ...interface{}) error

func WrapWithOutOfRange

func WrapWithOutOfRange(msg string, err error, details ...interface{}) error

func WrapWithPermissionDenied

func WrapWithPermissionDenied(msg string, err error, details ...interface{}) error

func WrapWithResourceExhausted

func WrapWithResourceExhausted(msg string, err error, details ...interface{}) error

func WrapWithUnauthenticated

func WrapWithUnauthenticated(msg string, err error, details ...interface{}) error

func WrapWithUnavailable

func WrapWithUnavailable(msg string, err error, details ...interface{}) error

func WrapWithUnimplemented

func WrapWithUnimplemented(msg string, err error, details ...interface{}) error

func WrapWithUnknown

func WrapWithUnknown(msg string, err error, details ...interface{}) error

Types

type Code added in v0.0.26

type Code = codes.Code

type Status added in v1.1.0

type Status = status.Status

func FromError

func FromError(err error) (st *Status, ok bool)

func New added in v1.0.0

func New(c codes.Code, msg string) *Status

func ParseError added in v1.0.5

func ParseError(err error, defaultCode codes.Code, defaultMsg string, details ...interface{}) (st *Status, msg string, rerr error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL