Documentation ¶
Index ¶
- func DeepEquals(a, b resource.PropertyValue) bool
- func IsComputed(v resource.PropertyValue) bool
- func IsSecret(v resource.PropertyValue) bool
- func MakeComputed(v resource.PropertyValue) resource.PropertyValue
- func MakeKnown(v resource.PropertyValue) resource.PropertyValue
- func MakePublic(v resource.PropertyValue) resource.PropertyValue
- func MakeSecret(v resource.PropertyValue) resource.PropertyValue
- type Encoder
- func Decode[T any](m resource.PropertyMap) (Encoder, T, mapper.MappingError)
- func DecodeAny(m resource.PropertyMap, dst any) (Encoder, mapper.MappingError)
- func DecodeConfig[T any](m resource.PropertyMap, dst T) (Encoder, mapper.MappingError)
- func DecodeTolerateMissing[T any](m resource.PropertyMap, dst T) (Encoder, mapper.MappingError)
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
func MakeComputed ¶
func MakeComputed(v resource.PropertyValue) resource.PropertyValue
func MakeKnown ¶
func MakeKnown(v resource.PropertyValue) resource.PropertyValue
func MakePublic ¶
func MakePublic(v resource.PropertyValue) resource.PropertyValue
func MakeSecret ¶
func MakeSecret(v resource.PropertyValue) resource.PropertyValue
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func Decode ¶
func Decode[T any](m resource.PropertyMap) (Encoder, T, mapper.MappingError)
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 ¶
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)