kerrors

package
v0.0.0-...-687f649 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(err error, codes ...KErrors) bool

func IsAlreadyExists

func IsAlreadyExists(err error) bool

IsAlreadyExists returns true if the given error is or is caused by a kubernetes AlreadyExistsError,

func IsConflict

func IsConflict(err error) bool

IsConflict returns true if the given error is or is caused by a kubernetes ConflictError,

func IsForbidden

func IsForbidden(err error) bool

IsForbidden returns true if the given error is or is caused by a kubernetes ForbiddenError,

func IsForbiddenC

func IsForbiddenC(err error) bool

func IsForbiddenOrNotFound

func IsForbiddenOrNotFound(err error) bool

IsForbiddenOrNotFound returns true if the given error is or is caused by a kubernetes NotFound or Forbidden,

func IsInvalid

func IsInvalid(err error) bool

IsInvalid returns true if the given error is or is caused by a kubernetes InvalidError,

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the given error is or is caused by a kubernetes NotFoundError,

func NewResourceError

func NewResourceError(cause error, obj interface{}) error

Types

type KErrors

type KErrors int
const (
	AlreadyExists KErrors = iota
	Conflict
	Invalid
	NotFound
	Forbidden
)

func (KErrors) Is

func (k KErrors) Is(err error) bool

type ResourceError

type ResourceError struct {
	GVK schema.GroupVersionKind

	Namespace, Name string
	// contains filtered or unexported fields
}

func (ResourceError) Cause

func (r ResourceError) Cause() error

func (ResourceError) Error

func (r ResourceError) Error() string

func (ResourceError) Unwrap

func (r ResourceError) Unwrap() error

Jump to

Keyboard shortcuts

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