Documentation ¶
Index ¶
- Constants
- func IsNotFound(err error) bool
- func NewUserIDContext(userID uint) failure.Context
- func WithTableContext(c failure.Context, table string) failure.Context
- func WithUserIDContext(c failure.Context, userID uint) failure.Context
- type AnnotatedError
- func NewAnnotatedError(code Code, options ...Option) *AnnotatedError
- func NewFailedPreconditionError(options ...Option) *AnnotatedError
- func NewInternalError(options ...Option) *AnnotatedError
- func NewInvalidArgumentError(options ...Option) *AnnotatedError
- func NewNotFoundError(options ...Option) *AnnotatedError
- func (e *AnnotatedError) Code() Code
- func (e *AnnotatedError) Error() string
- func (e *AnnotatedError) IsInternal() bool
- func (e *AnnotatedError) IsInvalidArgument() bool
- func (e *AnnotatedError) IsNotFound() bool
- func (e *AnnotatedError) OutputStackTrace() bool
- func (e *AnnotatedError) Resources() []*Resource
- func (e *AnnotatedError) StackTrace() errors.StackTrace
- type Code
- type Option
- type Resource
- type ResourceEntry
- type StackTracer
Constants ¶
View Source
const ( Internal failure.StringCode = "Internal" InvalidArgument failure.StringCode = "InvalidArgument" NotFound failure.StringCode = "NotFound" Unauthenticated failure.StringCode = "Unauthenticated" )
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
func NewUserIDContext ¶
Types ¶
type AnnotatedError ¶
type AnnotatedError struct {
// contains filtered or unexported fields
}
func NewAnnotatedError ¶
func NewAnnotatedError(code Code, options ...Option) *AnnotatedError
func NewFailedPreconditionError ¶
func NewFailedPreconditionError(options ...Option) *AnnotatedError
func NewInternalError ¶
func NewInternalError(options ...Option) *AnnotatedError
func NewInvalidArgumentError ¶
func NewInvalidArgumentError(options ...Option) *AnnotatedError
func NewNotFoundError ¶
func NewNotFoundError(options ...Option) *AnnotatedError
func (*AnnotatedError) Code ¶
func (e *AnnotatedError) Code() Code
func (*AnnotatedError) Error ¶
func (e *AnnotatedError) Error() string
func (*AnnotatedError) IsInternal ¶
func (e *AnnotatedError) IsInternal() bool
func (*AnnotatedError) IsInvalidArgument ¶
func (e *AnnotatedError) IsInvalidArgument() bool
func (*AnnotatedError) IsNotFound ¶
func (e *AnnotatedError) IsNotFound() bool
func (*AnnotatedError) OutputStackTrace ¶
func (e *AnnotatedError) OutputStackTrace() bool
func (*AnnotatedError) Resources ¶
func (e *AnnotatedError) Resources() []*Resource
func (*AnnotatedError) StackTrace ¶
func (e *AnnotatedError) StackTrace() errors.StackTrace
type Option ¶
type Option func(*AnnotatedError)
func WithMessage ¶
func WithMessagef ¶
func WithOutputStackTrace ¶
func WithResource ¶
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func NewResourceWithEntries ¶
func NewResourceWithEntries(kind string, entries []ResourceEntry) *Resource
type ResourceEntry ¶
type ResourceEntry struct { Key string Value interface{} }
type StackTracer ¶
type StackTracer interface {
StackTrace() errors.StackTrace
}
Click to show internal directories.
Click to hide internal directories.