errdefs

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ExitCodeLoginRequired exit code when command cannot execute because it requires cloud login
	// This will be used by VSCode to detect when creating context if the user needs to login first
	ExitCodeLoginRequired = 5
)

Variables

View Source
var (
	// ErrNotFound is returned when an object is not found
	ErrNotFound = errors.New("not found")
	// ErrAlreadyExists is returned when an object already exists
	ErrAlreadyExists = errors.New("already exists")
	// ErrForbidden is returned when an operation is not permitted
	ErrForbidden = errors.New("forbidden")
	// ErrUnknown is returned when the error type is unmapped
	ErrUnknown = errors.New("unknown")
	// ErrLoginFailed is returned when login failed
	ErrLoginFailed = errors.New("login failed")
	// ErrLoginRequired is returned when login is required for a specific action
	ErrLoginRequired = errors.New("login required")
	// ErrNotImplemented is returned when a backend doesn't implement
	// an action
	ErrNotImplemented = errors.New("not implemented")
	// ErrCanceled is returned when the command was canceled by user
	ErrCanceled = errors.New("canceled")
	// ErrParsingFailed is returned when a string cannot be parsed
	ErrParsingFailed = errors.New("parsing failed")
	// ErrWrongContextType is returned when the caller tries to get a context
	// with the wrong type
	ErrWrongContextType = errors.New("wrong context type")
)

Functions

func IsAlreadyExistsError

func IsAlreadyExistsError(err error) bool

IsAlreadyExistsError returns true if the unwrapped error is ErrAlreadyExists

func IsErrCanceled

func IsErrCanceled(err error) bool

IsErrCanceled returns true if the unwrapped error is ErrCanceled

func IsErrNotImplemented

func IsErrNotImplemented(err error) bool

IsErrNotImplemented returns true if the unwrapped error is ErrNotImplemented

func IsErrParsingFailed

func IsErrParsingFailed(err error) bool

IsErrParsingFailed returns true if the unwrapped error is ErrParsingFailed

func IsForbiddenError

func IsForbiddenError(err error) bool

IsForbiddenError returns true if the unwrapped error is ErrForbidden

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError returns true if the unwrapped error is ErrNotFound

func IsUnknownError

func IsUnknownError(err error) bool

IsUnknownError returns true if the unwrapped error is ErrUnknown

Types

This section is empty.

Jump to

Keyboard shortcuts

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