conversion

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 737

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConversions

func GetConversions(tr resource.Terraformed) []conversion.Conversion

GetConversions returns the conversion.Conversions registered for the specified Terraformed resource.

func RegisterConversions

func RegisterConversions(provider *config.Provider, scheme *runtime.Scheme, opts ...RegistryOption) error

RegisterConversions registers the API version conversions from the specified provider configuration. The specified scheme should contain the registrations for the types whose versions are to be converted. If a registration for a Go schema is not found in the specified registry, RoundTrip does not error but only wildcard conversions must be used with the registry.

func RoundTrip

func RoundTrip(dst, src resource.Terraformed) error

RoundTrip round-trips from `src` to `dst` via an unstructured map[string]any representation of the `src` object and applies the registered webhook conversion functions.

Types

type RegistryOption added in v1.10.0

type RegistryOption func(*registry)

RegistryOption sets an option for the conversion registry.

func WithLogger added in v1.10.0

func WithLogger(logger logging.Logger) RegistryOption

WithLogger configures the logger to be used with the conversion registry.

Jump to

Keyboard shortcuts

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