virtual-kubelet: github.com/virtual-kubelet/virtual-kubelet/errdefs Index | Files

package errdefs

import "github.com/virtual-kubelet/virtual-kubelet/errdefs"

Package errdefs defines the error types that are understood by other packages in this project. Consumers of this project should look here to know how to produce and consume errors for this project.

Index

Package Files

doc.go invalid.go notfound.go wrapped.go

func AsInvalidInput Uses

func AsInvalidInput(err error) error

AsInvalidInput wraps the passed in error to make it of type ErrInvalidInput

Callers should make sure the passed in error has exactly the error message it wants as this function does not decorate the message.

func AsNotFound Uses

func AsNotFound(err error) error

AsNotFound wraps the passed in error to make it of type ErrNotFound

Callers should make sure the passed in error has exactly the error message it wants as this function does not decorate the message.

func InvalidInput Uses

func InvalidInput(msg string) error

InvalidInput makes an ErrInvalidInput from the provided error message

func InvalidInputf Uses

func InvalidInputf(format string, args ...interface{}) error

InvalidInputf makes an ErrInvalidInput from the provided error format and args

func IsInvalidInput Uses

func IsInvalidInput(err error) bool

IsInvalidInput determines if the passed in error is of type ErrInvalidInput

This will traverse the causal chain (`Cause() error`), until it finds an error which implements the `InvalidInput` interface.

func IsNotFound Uses

func IsNotFound(err error) bool

IsNotFound determines if the passed in error is of type ErrNotFound

This will traverse the causal chain (`Cause() error`), until it finds an error which implements the `NotFound` interface.

func NotFound Uses

func NotFound(msg string) error

NotFound makes an ErrNotFound from the provided error message

func NotFoundf Uses

func NotFoundf(format string, args ...interface{}) error

NotFoundf makes an ErrNotFound from the provided error format and args

type ErrInvalidInput Uses

type ErrInvalidInput interface {
    InvalidInput() bool
    error
}

InvalidInput is an error interface which denotes whether the opration failed due to a the resource not being found.

type ErrNotFound Uses

type ErrNotFound interface {
    NotFound() bool
    error
}

NotFound is an error interface which denotes whether the opration failed due to a the resource not being found.

Package errdefs imports 2 packages (graph) and is imported by 17 packages. Updated 2019-08-22. Refresh now. Tools for package owners.