testconversion

package
v2.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestResource

type TestResource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TestResourceSpec   `json:"spec"`
	Status TestResourceStatus `json:"status,omitempty"`

	// TerraformResourceType allows tests to set the resource type
	// Must be exported for runtime conversion to work
	TerraformResourceType string `json:"-"`
}

TestResource is a minimal Terraformed resource for testing conversions. It mimics the structure of real generated resources with spec.forProvider.

func (*TestResource) DeepCopyObject

func (tr *TestResource) DeepCopyObject() runtime.Object

DeepCopyObject returns a deep copy

func (*TestResource) GetCondition

func (tr *TestResource) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this TestResource.

func (*TestResource) GetConnectionDetailsMapping

func (tr *TestResource) GetConnectionDetailsMapping() map[string]string

GetConnectionDetailsMapping returns the connection details mapping

func (*TestResource) GetDeletionPolicy

func (tr *TestResource) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this TestResource.

func (*TestResource) GetID

func (tr *TestResource) GetID() string

GetID returns the ID of this TestResource.

func (*TestResource) GetInitParameters

func (tr *TestResource) GetInitParameters() (map[string]any, error)

GetInitParameters of this TestResource

func (*TestResource) GetManagementPolicies

func (tr *TestResource) GetManagementPolicies() xpv1.ManagementPolicies

GetManagementPolicies of this TestResource.

func (*TestResource) GetMergedParameters

func (tr *TestResource) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error)

GetMergedParameters of this TestResource

func (*TestResource) GetObjectKind

func (tr *TestResource) GetObjectKind() schema.ObjectKind

GetObjectKind returns the ObjectKind schema

func (*TestResource) GetObservation

func (tr *TestResource) GetObservation() (map[string]any, error)

GetObservation of this TestResource

func (*TestResource) GetParameters

func (tr *TestResource) GetParameters() (map[string]any, error)

GetParameters of this TestResource

func (*TestResource) GetProviderConfigReference

func (tr *TestResource) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this TestResource.

func (*TestResource) GetTerraformResourceType

func (tr *TestResource) GetTerraformResourceType() string

GetTerraformResourceType returns the Terraform resource type

func (*TestResource) GetTerraformSchemaVersion

func (tr *TestResource) GetTerraformSchemaVersion() int

GetTerraformSchemaVersion returns the schema version

func (*TestResource) GetWriteConnectionSecretToReference

func (tr *TestResource) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this TestResource.

func (*TestResource) LateInitialize

func (tr *TestResource) LateInitialize(attrs []byte) (bool, error)

LateInitialize this TestResource

func (*TestResource) SetConditions

func (tr *TestResource) SetConditions(c ...xpv1.Condition)

SetConditions of this TestResource.

func (*TestResource) SetDeletionPolicy

func (tr *TestResource) SetDeletionPolicy(r xpv1.DeletionPolicy)

SetDeletionPolicy of this TestResource.

func (*TestResource) SetManagementPolicies

func (tr *TestResource) SetManagementPolicies(r xpv1.ManagementPolicies)

SetManagementPolicies of this TestResource.

func (*TestResource) SetObservation

func (tr *TestResource) SetObservation(data map[string]any) error

SetObservation of this TestResource

func (*TestResource) SetParameters

func (tr *TestResource) SetParameters(params map[string]any) error

SetParameters of this TestResource

func (*TestResource) SetProviderConfigReference

func (tr *TestResource) SetProviderConfigReference(r *xpv1.Reference)

SetProviderConfigReference of this TestResource.

func (*TestResource) SetWriteConnectionSecretToReference

func (tr *TestResource) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this TestResource.

type TestResourceObservation

type TestResourceObservation map[string]interface{}

TestResourceObservation are the observable fields of a TestResource.

type TestResourceParameters

type TestResourceParameters map[string]interface{}

TestResourceParameters are the configurable fields of a TestResource.

type TestResourceSpec

type TestResourceSpec struct {
	xpv1.ResourceSpec `json:",inline"`
	ForProvider       TestResourceParameters `json:"forProvider"`
}

TestResourceSpec defines the desired state of TestResource

type TestResourceStatus

type TestResourceStatus struct {
	xpv1.ResourceStatus `json:",inline"`
	AtProvider          TestResourceObservation `json:"atProvider,omitempty"`
}

TestResourceStatus defines the observed state of TestResource.

Jump to

Keyboard shortcuts

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