Documentation
¶
Index ¶
- func Aborted(format string, args ...any) error
- func Conflict(format string, args ...any) error
- func ConnectErrorComparer() cmp.Option
- func Convert(err error) *connect.Error
- func ErrorStringComparer() cmp.Option
- func FailedPrecondition(format string, args ...any) error
- func Internal(format string, args ...any) error
- func InvalidArgument(format string, args ...any) error
- func IsAborted(err error) bool
- func IsConflict(err error) bool
- func IsFailedPrecondition(err error) bool
- func IsInternal(err error) bool
- func IsInvalidArgument(err error) bool
- func IsNotFound(err error) bool
- func IsPermissionDenied(err error) bool
- func IsResourceExhausted(err error) bool
- func IsUnauthenticated(err error) bool
- func NewAborted(err error) error
- func NewConflict(err error) error
- func NewFailedPrecondition(err error) error
- func NewInternal(err error) error
- func NewInvalidArgument(err error) error
- func NewNotFound(err error) error
- func NewPermissionDenied(err error) error
- func NewResourceExhausted(err error) error
- func NewUnauthenticated(err error) error
- func NotFound(format string, args ...any) error
- func PermissionDenied(format string, args ...any) error
- func ResourceExhausted(format string, args ...any) error
- func Unauthenticated(format string, args ...any) error
- func WrapConnectErr(c connect.Code, underlying error) *connect.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aborted ¶
Aborted creates a new Aborted error (Connect Code 10) with a formatted error message.
func Conflict ¶
Conflict creates a new Already Exists error (Connect Code 6) with a formatted error message.
func ConnectErrorComparer ¶
ConnectErrorComparer returns a go-cmp Option for comparing *connect.Error values. Two errors are considered equal if they have the same error string and the same Connect code.
func Convert ¶
Convert compares the error and maps it to an appropriate connect.Error. If there is no backend-specific wrapped error given to this function, it will return an internal error. If there are multiple errors wrapped, this function only cares about the first found error in the error tree.
func ErrorStringComparer ¶
ErrorStringComparer returns a go-cmp Option for comparing error values. Two errors are considered equal if their Error() strings are identical.
func FailedPrecondition ¶
FailedPrecondition creates a new Failed Precondition error (Connect Code 9) with a formatted error message.
func Internal ¶
Internal creates a new Internal error (Connect Code 13) with a formatted error message.
func InvalidArgument ¶
InvalidArgument creates a new Invalid Argument error (Connect Code 3) with a formatted error message.
func IsConflict ¶
IsConflict reports whether the error is an Already Exists error (Connect Code 6).
func IsFailedPrecondition ¶
IsFailedPrecondition reports whether the error is a Failed Precondition error (Connect Code 9).
func IsInternal ¶
IsInternal reports whether the error is an Internal error (Connect Code 13).
func IsInvalidArgument ¶
IsInvalidArgument reports whether the error is an Invalid Argument error (Connect Code 3).
func IsNotFound ¶
IsNotFound reports whether the error is a Not Found error (Connect Code 5).
func IsPermissionDenied ¶
IsPermissionDenied reports whether the error is a Permission Denied error (Connect Code 7).
func IsResourceExhausted ¶
IsResourceExhausted reports whether the error is a Resource Exhausted error (Connect Code 8).
func IsUnauthenticated ¶
IsUnauthenticated reports whether the error is an Unauthenticated error (Connect Code 16).
func NewAborted ¶
NewAborted creates a new Aborted error (Connect Code 10) from an underlying error.
func NewConflict ¶
NewConflict creates a new Already Exists error (Connect Code 6) from an underlying error.
func NewFailedPrecondition ¶
NewFailedPrecondition creates a new Failed Precondition error (Connect Code 9) from an underlying error.
func NewInternal ¶
NewInternal creates a new Internal error (Connect Code 13) from an underlying error.
func NewInvalidArgument ¶
NewInvalidArgument creates a new Invalid Argument error (Connect Code 3) from an underlying error.
func NewNotFound ¶
NewNotFound creates a new Not Found error (Connect Code 5) from an underlying error.
func NewPermissionDenied ¶
NewPermissionDenied creates a new Permission Denied error (Connect Code 7) from an underlying error.
func NewResourceExhausted ¶
NewResourceExhausted creates a new Resource Exhausted error (Connect Code 8) from an underlying error.
func NewUnauthenticated ¶
NewUnauthenticated creates a new Unauthenticated error (Connect Code 16) from an underlying error.
func NotFound ¶
NotFound creates a new Not Found error (Connect Code 5) with a formatted error message.
func PermissionDenied ¶
PermissionDenied creates a new Permission Denied error (Connect Code 7) with a formatted error message.
func ResourceExhausted ¶
ResourceExhausted creates a new Resource Exhausted error (Connect Code 8) with a formatted error message.
func Unauthenticated ¶
Unauthenticated creates a new Unauthenticated error (Connect Code 16) with a formatted error message.
Types ¶
This section is empty.