status

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 15 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 ...any) error

func Log added in v1.2.1

func Log(code codes.Code, err error)

func WrapWithAborted

func WrapWithAborted(msg string, err error, details ...any) error

func WrapWithAlreadyExists

func WrapWithAlreadyExists(msg string, err error, details ...any) error

func WrapWithCanceled

func WrapWithCanceled(msg string, err error, details ...any) error

func WrapWithDataLoss

func WrapWithDataLoss(msg string, err error, details ...any) error

func WrapWithDeadlineExceeded

func WrapWithDeadlineExceeded(msg string, err error, details ...any) error

func WrapWithFailedPrecondition

func WrapWithFailedPrecondition(msg string, err error, details ...any) error

func WrapWithInternal

func WrapWithInternal(msg string, err error, details ...any) error

func WrapWithInvalidArgument

func WrapWithInvalidArgument(msg string, err error, details ...any) error

func WrapWithNotFound

func WrapWithNotFound(msg string, err error, details ...any) error

func WrapWithOutOfRange

func WrapWithOutOfRange(msg string, err error, details ...any) error

func WrapWithPermissionDenied

func WrapWithPermissionDenied(msg string, err error, details ...any) error

func WrapWithResourceExhausted

func WrapWithResourceExhausted(msg string, err error, details ...any) error

func WrapWithUnauthenticated

func WrapWithUnauthenticated(msg string, err error, details ...any) error

func WrapWithUnavailable

func WrapWithUnavailable(msg string, err error, details ...any) error

func WrapWithUnimplemented

func WrapWithUnimplemented(msg string, err error, details ...any) error

func WrapWithUnknown

func WrapWithUnknown(msg string, err error, details ...any) 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 CreateWithNotFound added in v1.7.7

func CreateWithNotFound(msg string, err error, details ...any) *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 ...any,
) (st *Status, msg string, rerr error)

Jump to

Keyboard shortcuts

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