ende

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepEquals

func DeepEquals(a, b resource.PropertyValue) bool

DeepEquals checks if a and b are equal.

DeepEquals is different from a.DeepEquals(b) in two ways:

1. If does secret/computed/output folding, so secret(computed(v)) == computed(secret(v)).

2. It doesn't panic when computed values are present.

func IsComputed

func IsComputed(v resource.PropertyValue) bool

func IsSecret

func IsSecret(v resource.PropertyValue) bool

Types

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func Decode

Decode a property map to a `pulumi:"x"` annotated struct.

The returned mapper can restore the metadata it removed when translating `dst` back to a property map. If the shape of `T` matches `m`, then this will be a no-op:

encoder, value, _ := Decode(m)
m, _ = encoder.Encode(value)

func DecodeAny added in v0.16.0

func DecodeAny(m resource.PropertyMap, dst any) (Encoder, mapper.MappingError)

func DecodeConfig

func DecodeConfig[T any](m resource.PropertyMap, dst T) (Encoder, mapper.MappingError)

func DecodeTolerateMissing

func DecodeTolerateMissing[T any](m resource.PropertyMap, dst T) (Encoder, mapper.MappingError)

DecodeTolerateMissing is like Decode, but doesn't return an error for a missing value.

func (Encoder) AllowUnknown

func (e Encoder) AllowUnknown(allowUnknowns bool) Encoder

Mark a encoder as generating values only.

This is appropriate when you are encoding a value where all fields must be known, such as a non-preview create or update.

func (Encoder) Encode

func (e Encoder) Encode(src any) (resource.PropertyMap, mapper.MappingError)

Jump to

Keyboard shortcuts

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