errors

package
v0.0.4-0...-cb4b663 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AdoptedResourceNotFound is like NotFound but provides the caller with
	// information that the resource being checked for existence was
	// previously-created out of band from ACK
	AdoptedResourceNotFound = fmt.Errorf("adopted resource not found")
	// MissingNameIdentifier indicates an unexpected nil name identifier pointer
	MissingNameIdentifier = fmt.Errorf("expected name identifier, found nil")
	// NotAdoptable is to indicate the current resource has been explicitly
	// flagged as not able to be adopted
	NotAdoptable = fmt.Errorf("resource not adoptable")
	// NotImplemented is returned when a code path isn't implemented yet
	NotImplemented = fmt.Errorf("not implemented")
	// NotFound is returned when an expected resource was not found
	NotFound = fmt.Errorf("resource not found")
	// NilResourceManagerFactory is returned when a resource manager factory
	// that has not been properly initialized is bound to a controller manager
	NilResourceManagerFactory = fmt.Errorf(
		"error binding controller manager to reconciler before " +
			"setting resource manager factory",
	)
	// ResourceManagerFactoryNotFound is return when a lookup into the resource
	// manager factory mapping fails
	ResourceManagerFactoryNotFound = fmt.Errorf("resource manager factory " +
		"not found",
	)
	// TemporaryOutOfSync is to indicate the error isn't really an error
	// but more of a marker that the status check will be performed
	// after some wait time
	TemporaryOutOfSync = fmt.Errorf(
		"temporary out of sync, reconcile after some time")
	// Terminal is returned with resource is in Terminal Condition
	Terminal = fmt.Errorf(
		"resource is in terminal condition")
	// SecretTypeNotSupported is returned if non opaque secret is used.
	SecretTypeNotSupported = fmt.Errorf(
		"only opaque secrets can be used")
)

Functions

func AWSError

func AWSError(err error) (awserr.Error, bool)

AWSError returns the type conversion for the supplied error to an aws-sdk-go Error interface

func AWSRequestFailure

func AWSRequestFailure(err error) (awserr.RequestFailure, bool)

AWSRequestFailure returns the type conversion for the supplied error to an aws-sdk-go RequestFailure interface

func HTTPStatusCode

func HTTPStatusCode(err error) int

HTTPStatusCode returns the HTTP status code from the supplied error by introspecting the error to see if it's an awserr.RequestFailure interface and if so, calling StatusCode() on that type-converted RequestFailure. If the type conversion fails, returns -1

Types

This section is empty.

Jump to

Keyboard shortcuts

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