Documentation ¶
Index ¶
- Variables
- func GrpcCodeToReason(c codes.Code) except.Reason
- func HasReason(err error, r ...except.Reason) bool
- func New(reason except.Reason, msg string) error
- func NewAborted(msg string, args ...any) error
- func NewAlreadyExists(msg string, args ...any) error
- func NewFailed(msg string, args ...any) error
- func NewInternal(msg string, args ...any) error
- func NewInvalid(msg string, args ...any) error
- func NewNotFound(msg string, args ...any) error
- func NewTimeout(msg string, args ...any) error
- func Newf(reason except.Reason, msg string, args ...any) error
- func Reason(err error) except.Reason
- func ReasonToGrpcCode(r except.Reason) codes.Code
- type Err
Constants ¶
This section is empty.
Variables ¶
View Source
var ReasonString = map[except.Reason]string{ except.Reason_UNKNOWN: "unknown", except.Reason_NOT_FOUND: "not found", except.Reason_INVALID: "invalid", except.Reason_INTERNAL: "internal", except.Reason_TIMEOUT: "timeout", except.Reason_ALREADY_EXISTS: "already exists", except.Reason_ABORTED: "aborted", except.Reason_FAILED: "failed", }
Functions ¶
func NewAborted ¶
func NewAlreadyExists ¶
func NewInternal ¶
func NewInvalid ¶
func NewNotFound ¶
func NewTimeout ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.