errorsv1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginActionProviderGetNamespace            = PluginAction("Provider::GetNamespace")
	PluginActionProviderGetConfigDefinition     = PluginAction("Provider::GetConfigDefinition")
	PluginActionProviderListResourceTypes       = PluginAction("Provider::ListResourceTypes")
	PluginActionProviderListLinkTypes           = PluginAction("Provider::ListLinkTypes")
	PluginActionProviderListDataSourceTypes     = PluginAction("Provider::ListDataSourceTypes")
	PluginActionProviderListCustomVariableTypes = PluginAction("Provider::ListCustomVariableTypes")
	PluginActionProviderListFunctions           = PluginAction("Provider::ListFunctions")
	PluginActionProviderGetRetryPolicy          = PluginAction("Provider::GetRetryPolicy")

	PluginActionProviderCustomValidateResource        = PluginAction("Provider::CustomValidateResource")
	PluginActionProviderGetResourceSpecDefinition     = PluginAction("Provider::GetResourceSpecDefinition")
	PluginActionProviderCheckCanResourceLinkTo        = PluginAction("Provider::CheckCanResourceLinkTo")
	PluginActionProviderGetResourceStabilisedDeps     = PluginAction("Provider::GetResourceStabilisedDeps")
	PluginActionProviderCheckIsResourceCommonTerminal = PluginAction("Provider::CheckIsResourceCommonTerminal")
	PluginActionProviderGetResourceType               = PluginAction("Provider::GetResourceType")
	PluginActionProviderGetResourceExamples           = PluginAction("Provider::GetResourceExamples")
	PluginActionProviderGetResourceTypeDescription    = PluginAction("Provider::GetResourceTypeDescription")
	PluginActionProviderDeployResource                = PluginAction("Provider::DeployResource")
	PluginActionProviderCheckResourceHasStabilised    = PluginAction("Provider::CheckResourceHasStabilised")
	PluginActionProviderGetResourceExternalState      = PluginAction("Provider::GetResourceExternalState")
	PluginActionProviderDestroyResource               = PluginAction("Provider::DestroyResource")

	PluginActionProviderStageLinkChanges                 = PluginAction("Provider::StageLinkChanges")
	PluginActionProviderUpdateLinkResourceA              = PluginAction("Provider::UpdateLinkResourceA")
	PluginActionProviderUpdateLinkResourceB              = PluginAction("Provider::UpdateLinkResourceB")
	PluginActionProviderUpdateLinkIntermediaryResources  = PluginAction("Provider::UpdateLinkIntermediaryResources")
	PluginActionProviderGetLinkPriorityResource          = PluginAction("Provider::GetLinkPriorityResource")
	PluginActionProviderGetLinkTypeDescription           = PluginAction("Provider::GetLinkTypeDescription")
	PluginActionProviderGetLinkAnnotationDefinitions     = PluginAction("Provider::GetLinkAnnotationDefinitions")
	PluginActionProviderGetLinkKind                      = PluginAction("Provider::GetLinkKind")
	PluginActionProviderGetLinkIntermediaryExternalState = PluginAction("Provider::GetLinkIntermediaryExternalState")

	PluginActionProviderGetDataSourceType            = PluginAction("Provider::GetDataSourceType")
	PluginActionProviderGetDataSourceTypeDescription = PluginAction("Provider::GetDataSourceTypeDescription")
	PluginActionProviderGetDataSourceExamples        = PluginAction("Provider::GetDataSourceExamples")
	PluginActionProviderCustomValidateDataSource     = PluginAction("Provider::CustomValidateDataSource")
	PluginActionProviderGetDataSourceSpecDefinition  = PluginAction("Provider::GetDataSourceSpecDefinition")
	PluginActionProviderGetDataSourceFilterFields    = PluginAction("Provider::GetDataSourceFilterFields")
	PluginActionProviderFetchDataSource              = PluginAction("Provider::FetchDataSource")

	PluginActionProviderGetCustomVariableType            = PluginAction("Provider::GetCustomVariableType")
	PluginActionProviderGetCustomVariableTypeDescription = PluginAction("Provider::GetCustomVariableTypeDescription")
	PluginActionProviderGetCustomVariableTypeOptions     = PluginAction("Provider::GetCustomVariableTypeOptions")
	PluginActionProviderGetCustomVariableTypeExamples    = PluginAction("Provider::GetCustomVariableTypeExamples")

	PluginActionProviderGetFunctionDefinition = PluginAction("Provider::GetFunctionDefinition")
	PluginActionProviderCallFunction          = PluginAction("Provider::CallFunction")

	PluginActionTransformerGetTransformName          = PluginAction("Transformer::GetTransformName")
	PluginActionTransformerGetConfigDefinition       = PluginAction("Transformer::GetConfigDefinition")
	PluginActionTransformerTransform                 = PluginAction("Transformer::Transform")
	PluginActionTransformerListAbstractResourceTypes = PluginAction("Transformer::ListAbstractResourceTypes")

	PluginActionTransformerCustomValidateAbstractResource        = PluginAction("Transformer::CustomValidateAbstractResource")
	PluginActionTransformerGetAbstractResourceSpecDefinition     = PluginAction("Transformer::GetAbstractResourceSpecDefinition")
	PluginActionTransformerCheckCanAbstractResourceLinkTo        = PluginAction("Transformer::CheckCanAbstractResourceLinkTo")
	PluginActionTransformerCheckIsAbstractResourceCommonTerminal = PluginAction("Transformer::CheckIsAbstractResourceCommonTerminal")
	PluginActionTransformerGetAbstractResourceType               = PluginAction("Transformer::GetAbstractResourceType")
	PluginActionTransformerGetAbstractResourceExamples           = PluginAction("Transformer::GetAbstractResourceExamples")
	PluginActionTransformerGetAbstractResourceTypeDescription    = PluginAction("Transformer::GetAbstractResourceTypeDescription")

	PluginActionServiceDeployResource        = PluginAction("Service::DeployResource")
	PluginActionServiceDestroyResource       = PluginAction("Service::DestroyResource")
	PluginActionServiceCallFunction          = PluginAction("Service::CallFunction")
	PluginActionServiceGetFunctionDefinition = PluginAction("Service::GetFunctionDefinition")
	PluginActionServiceCheckHasFunction      = PluginAction("Service::CheckHasFunction")
	PluginActionServiceListFunctions         = PluginAction("Service::ListFunctions")
	PluginActionServiceLookupResourceInState = PluginAction("Service::LookupResourceInState")
	PluginActionServiceAcquireResourceLock   = PluginAction("Service::AcquireResourceLock")
)

Variables

This section is empty.

Functions

func CreateErrorFromResponse

func CreateErrorFromResponse(errorResponse *sharedtypesv1.ErrorResponse, action PluginAction) error

CreateErrorFromResponse creates a native error from a protobuf error response. This is to be used client-side (deploy engine host side) to convert error response messages from gRPC to a native error type.

func CreateGeneralError

func CreateGeneralError(
	err error,
	action PluginAction,
) error

CreateGeneralError creates a general error for a plugin response for errors that are not derived from a plugin response. This ensures that errors are wrapped in the correct blueprint framework error type for actions that the blueprint framework provides error types for.

func CreateResponseFromError

func CreateResponseFromError(inputError error) *sharedtypesv1.ErrorResponse

CreateResponseFromError creates a protobuf error response message from an error. This is to be used server-side (plugin side) to convert errors to messages that can be sent over gRPC to the client.

func ErrInvalidHostID

func ErrInvalidHostID(hostID string) error

ErrInvalidHostID is returned when an invalid host ID is provided in a request. An invalid host ID indicates that a host making calls to a plugin is not the one that the plugin was registered with.

func ErrResourceNotDestroyed

func ErrResourceNotDestroyed(resourceType string, action PluginAction) error

ErrResourceNotDestroyed is returned when a resource is not destroyed.

func ErrUnexpectedResponseType

func ErrUnexpectedResponseType(action PluginAction) error

ErrUnexpectedResponseType is returned when an unexpected response type is returned for a plugin action.

Types

type PluginAction

type PluginAction string

PluginAction represents an action that a plugin or the plugin service can perform. This is primarily used in error handling.

type PluginResponseError

type PluginResponseError struct {
	Code    sharedtypesv1.ErrorCode
	Action  PluginAction
	Message string
	Details any
}

PluginResponseError represents a user-defined error that has ben returned by a plugin. This is to be used client-side (deploy engine host side) to convert error response messages from gRPC to a native error type.

func (*PluginResponseError) Error

func (e *PluginResponseError) Error() string

Jump to

Keyboard shortcuts

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