errors

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(err error, needle string) bool

Contains compares the error message with needle

func IsDeadlineExceeded

func IsDeadlineExceeded(err error) bool

func IsErrorAlreadyExists

func IsErrorAlreadyExists(err error) bool

func IsErrorInvalidArgument

func IsErrorInvalidArgument(err error) bool

func IsInternal

func IsInternal(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsPermissionDenied

func IsPermissionDenied(err error) bool

func IsPreconditionFailed

func IsPreconditionFailed(err error) bool

func IsUnauthenticated

func IsUnauthenticated(err error) bool

func IsUnavailable

func IsUnavailable(err error) bool

func IsUnimplemented

func IsUnimplemented(err error) bool

func IsUnknown

func IsUnknown(err error) bool

func ThrowAlreadyExists

func ThrowAlreadyExists(parent error, id, message string) error

func ThrowAlreadyExistsf

func ThrowAlreadyExistsf(parent error, id, format string, a ...interface{}) error

func ThrowDeadlineExceeded

func ThrowDeadlineExceeded(parent error, id, message string) error

func ThrowDeadlineExceededf

func ThrowDeadlineExceededf(parent error, id, format string, a ...interface{}) error

func ThrowError

func ThrowError(parent error, id, message string) error

func ThrowInternal

func ThrowInternal(parent error, id, message string) error

func ThrowInternalf

func ThrowInternalf(parent error, id, format string, a ...interface{}) error

func ThrowInvalidArgument

func ThrowInvalidArgument(parent error, id, message string) error

func ThrowInvalidArgumentf

func ThrowInvalidArgumentf(parent error, id, format string, a ...interface{}) error

func ThrowNotFound

func ThrowNotFound(parent error, id, message string) error

func ThrowNotFoundf

func ThrowNotFoundf(parent error, id, format string, a ...interface{}) error

func ThrowPermissionDenied

func ThrowPermissionDenied(parent error, id, message string) error

func ThrowPermissionDeniedf

func ThrowPermissionDeniedf(parent error, id, format string, a ...interface{}) error

func ThrowPreconditionFailed

func ThrowPreconditionFailed(parent error, id, message string) error

func ThrowPreconditionFailedf

func ThrowPreconditionFailedf(parent error, id, format string, a ...interface{}) error

func ThrowUnauthenticated

func ThrowUnauthenticated(parent error, id, message string) error

func ThrowUnauthenticatedf

func ThrowUnauthenticatedf(parent error, id, format string, a ...interface{}) error

func ThrowUnavailable

func ThrowUnavailable(parent error, id, message string) error

func ThrowUnavailablef

func ThrowUnavailablef(parent error, id, format string, a ...interface{}) error

func ThrowUnimplemented

func ThrowUnimplemented(parent error, id, message string) error

func ThrowUnimplementedf

func ThrowUnimplementedf(parent error, id, format string, a ...interface{}) error

func ThrowUnknown

func ThrowUnknown(parent error, id, message string) error

func ThrowUnknownf

func ThrowUnknownf(parent error, id, format string, a ...interface{}) error

Types

type AlreadyExists

type AlreadyExists interface {
	error
	IsAlreadyExists()
}

type AlreadyExistsError

type AlreadyExistsError struct {
	*CaosError
}

func (*AlreadyExistsError) IsAlreadyExists

func (err *AlreadyExistsError) IsAlreadyExists()

type CaosError

type CaosError struct {
	Parent  error
	Message string
	ID      string
}

func CreateCaosError

func CreateCaosError(parent error, id, message string) *CaosError

func (*CaosError) As

func (err *CaosError) As(target interface{}) bool

func (*CaosError) Error

func (err *CaosError) Error() string

func (*CaosError) GetID

func (err *CaosError) GetID() string

func (*CaosError) GetMessage

func (err *CaosError) GetMessage() string

func (*CaosError) GetParent

func (err *CaosError) GetParent() error

func (*CaosError) Is

func (err *CaosError) Is(target error) bool

func (*CaosError) SetMessage

func (err *CaosError) SetMessage(msg string)

func (*CaosError) Unwrap

func (err *CaosError) Unwrap() error

type DeadlineExceeded

type DeadlineExceeded interface {
	error
	IsDeadlineExceeded()
}

type DeadlineExceededError

type DeadlineExceededError struct {
	*CaosError
}

func (*DeadlineExceededError) IsDeadlineExceeded

func (err *DeadlineExceededError) IsDeadlineExceeded()

type Error

type Error interface {
	GetParent() error
	GetMessage() string
	SetMessage(string)
	GetID() string
}

Error is a stdlib error extension. It contains parameters to identify errors through all application layers

type Internal

type Internal interface {
	error
	IsInternal()
}

type InternalError

type InternalError struct {
	*CaosError
}

func (*InternalError) IsInternal

func (err *InternalError) IsInternal()

type InvalidArgument

type InvalidArgument interface {
	error
	IsInvalidArgument()
}

type InvalidArgumentError

type InvalidArgumentError struct {
	*CaosError
}

func (*InvalidArgumentError) IsInvalidArgument

func (err *InvalidArgumentError) IsInvalidArgument()

type NotFound

type NotFound interface {
	error
	IsNotFound()
}

type NotFoundError

type NotFoundError struct {
	*CaosError
}

func (*NotFoundError) IsNotFound

func (err *NotFoundError) IsNotFound()

type PermissionDenied

type PermissionDenied interface {
	error
	IsPermissionDenied()
}

type PermissionDeniedError

type PermissionDeniedError struct {
	*CaosError
}

func (*PermissionDeniedError) IsPermissionDenied

func (err *PermissionDeniedError) IsPermissionDenied()

type PreconditionFailed

type PreconditionFailed interface {
	error
	IsPreconditionFailed()
}

type PreconditionFailedError

type PreconditionFailedError struct {
	*CaosError
}

func (*PreconditionFailedError) IsPreconditionFailed

func (err *PreconditionFailedError) IsPreconditionFailed()

type Unauthenticated

type Unauthenticated interface {
	error
	IsUnauthenticated()
}

type UnauthenticatedError

type UnauthenticatedError struct {
	*CaosError
}

func (*UnauthenticatedError) IsUnauthenticated

func (err *UnauthenticatedError) IsUnauthenticated()

type Unavailable

type Unavailable interface {
	error
	IsUnavailable()
}

type UnavailableError

type UnavailableError struct {
	*CaosError
}

func (*UnavailableError) IsUnavailable

func (err *UnavailableError) IsUnavailable()

type Unimplemented

type Unimplemented interface {
	error
	IsUnimplemented()
}

type UnimplementedError

type UnimplementedError struct {
	*CaosError
}

func (*UnimplementedError) IsUnimplemented

func (err *UnimplementedError) IsUnimplemented()

type Unknown

type Unknown interface {
	error
	IsUnknown()
}

type UnknownError

type UnknownError struct {
	*CaosError
}

func (*UnknownError) IsUnknown

func (err *UnknownError) IsUnknown()

Directories

Path Synopsis
go generate
go generate

Jump to

Keyboard shortcuts

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