Version: v0.26.0 Latest Latest

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 114




This section is empty.


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")
	// SecretNotFound is returned if specified kubernetes secret is not found.
	SecretNotFound = fmt.Errorf(
		"kubernetes secret not found")
	// ReadOneFailedAfterCreate is returned if a ReadOne call fails right after
	// a create operation.
	ReadOneFailedAfterCreate = fmt.Errorf("ReadOne call failed after a Create operation")
View Source
var (
	// FieldExportPathDoesNotExist indicates the path specified in the field
	// export spec does not exist on the object
	FieldExportPathDoesNotExist = fmt.Errorf("path does not exist in this object")
	// FieldExportResourceNotSynced indicates the source resource does not have
	// the ResourceSynced condition set to True
	FieldExportResourceNotSynced = fmt.Errorf("the source resource is not synced yet")
	// FieldExportInvalidPath indicates there was an error parsing the path into
	// a JQ query
	FieldExportInvalidPath = TerminalError{/* contains filtered or unexported fields */}
	// FieldExportInvalidPath indicates there was an error when executing the
	// JQ query
	FieldExportQueryFailed = TerminalError{/* contains filtered or unexported fields */}
	// FieldExportMissingConfigMap indicates there was an error when trying
	// to get the target configmap
	FieldExportMissingConfigMap = fmt.Errorf("unable to get existing configmap")
	// FieldExportMissingSecret indicates there was an error when trying
	// to get the target secret
	FieldExportMissingSecret = fmt.Errorf("unable to get existing secret")
View Source
var (
	// ResourceReferenceOrIDRequired indicates that the user failed to specify
	// either the actual referenced identifier or an AWSResourceReferenceWrapper
	ResourceReferenceOrIDRequired = fmt.Errorf(
		"resource reference wrapper or ID required",
	// ResourceReferenceAndIDNotSupported indicates that the user specified
	// both the actual referenced identifier and an AWSResourceReferenceWrapper
	ResourceReferenceAndIDNotSupported = fmt.Errorf(
		"both resource reference wrapper and ID cannot be used together",
	// ResourceReferenceTerminal indicates that the resource referred from
	// AWSResourceReferenceWrapper is in Terminal state and cannot be referred
	ResourceReferenceTerminal = fmt.Errorf(
		"the referenced resource has 'ACK.Terminal' condition 'True'." +
			" Cannot be referenced",
	// ResourceReferenceNotSynced indicates that the resource referred from
	// AWSResourceReferenceWrapper is still being reconciled and cannot be
	// referred
	ResourceReferenceNotSynced = fmt.Errorf(
		"the referenced resource is not synced yet",
	// ResourceReferenceMissingTargetField indicates that the resource referred
	// from AWSResourceReferenceWrapper does not contain the target field which
	// needs to be referred
	ResourceReferenceMissingTargetField = fmt.Errorf(
		"the referenced resource is missing the target field",


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

func NewReadOneFailAfterCreate added in v0.18.4

func NewReadOneFailAfterCreate(numAttempts int) error

NewReadOneFailAfterCreate takes a number of attempts and returns a ReadOneFailedAfterCreate error if multiple ReadOne calls fails.

func ResourceReferenceAndIDNotSupportedFor added in v0.16.0

func ResourceReferenceAndIDNotSupportedFor(fields ...string) error

ResourceReferenceAndIDNotSupportedFor returns a ResourceReferenceAndIDNotSupported error for one or more supplied fields

func ResourceReferenceMissingTargetFieldFor added in v0.16.0

func ResourceReferenceMissingTargetFieldFor(resource string, namespace string,
	name string, targetField string,
) error

ResourceReferenceMissingTargetFieldFor returns a ResourceReferenceMissingTargetField for supplied resource

func ResourceReferenceNotSyncedFor added in v0.16.0

func ResourceReferenceNotSyncedFor(resource string, namespace string,
	name string,
) error

ResourceReferenceNotSyncedFor returns a ResourceReferenceNotSynced for supplied resource

func ResourceReferenceOrIDRequiredFor added in v0.16.0

func ResourceReferenceOrIDRequiredFor(fields ...string) error

ResourceReferenceOrIDRequiredFor returns a ResourceReferenceOrIDRequired error for one or more supplied fields

func ResourceReferenceTerminalFor added in v0.16.0

func ResourceReferenceTerminalFor(resource string, namespace string,
	name string,
) error

ResourceReferenceTerminalFor returns a ResourceReferenceTerminal for supplied resource


type TerminalError added in v0.18.0

type TerminalError struct {
	// contains filtered or unexported fields

TerminalError defines an error that should be considered terminal, and placed onto an ACK.Terminal condition

func NewTerminalError added in v0.18.3

func NewTerminalError(terminalError error) *TerminalError

func (TerminalError) Error added in v0.18.0

func (e TerminalError) Error() string

func (TerminalError) Unwrap added in v0.18.0

func (e TerminalError) Unwrap() error

Jump to

Keyboard shortcuts

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