errors

package
v0.17.21 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyExists

func IsAlreadyExists(err error) bool

Checks if the error is of type EventError and the ErrorCode is of type AlreadyExists

func IsEventAlreadyInTerminalStateError

func IsEventAlreadyInTerminalStateError(err error) bool

Checks if the error is of type EventError and the ErrorCode is of type EventAlreadyInTerminalStateError

func IsInvalidArguments

func IsInvalidArguments(err error) bool

Checks if the error is of type EventError and the ErrorCode is of type InvalidArgument

func IsNotFound

func IsNotFound(err error) bool

Checks if the error is of type EventError and the ErrorCode is of type ExecutionNotFound

func IsResourceExhausted

func IsResourceExhausted(err error) bool

Checks if the error is of type EventError and the ErrorCode is of type ResourceExhausted

func WrapError

func WrapError(err error) error

Types

type ErrorCode

type ErrorCode string
const (
	AlreadyExists                    ErrorCode = "AlreadyExists"
	ExecutionNotFound                ErrorCode = "ExecutionNotFound"
	ResourceExhausted                ErrorCode = "ResourceExhausted"
	InvalidArgument                  ErrorCode = "InvalidArgument"
	EventSinkError                   ErrorCode = "EventSinkError"
	EventAlreadyInTerminalStateError ErrorCode = "EventAlreadyInTerminalStateError"
)

type EventError

type EventError struct {
	Code    ErrorCode
	Cause   error
	Message string
}

func (EventError) Error

func (r EventError) Error() string

Jump to

Keyboard shortcuts

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