Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionEncoder ¶
type CollectionEncoder[T any] interface { // Will be called for each element in the collection. Add(k cty.Value, v T) diagnostics.Diag // Will be called after all elements are added. Encode() (T, diagnostics.Diag) }
CollectionEncoder is an interface for encoding cty collections into a specific type.
type Encoder ¶
type Encoder[T any] struct { // Most general encoder, used when no other encoder is applicable. // This includes primitives, unknown types and nulls. EncodeVal func(val cty.Value) (T, diagnostics.Diag) EncodePluginData func(val plugin.Data) (T, diagnostics.Diag) MapEncoder func(val cty.Value) (CollectionEncoder[T], diagnostics.Diag) ObjectEncoder func(val cty.Value) (CollectionEncoder[T], diagnostics.Diag) ListEncoder func(val cty.Value) (CollectionEncoder[T], diagnostics.Diag) TupleEncoder func(val cty.Value) (CollectionEncoder[T], diagnostics.Diag) SetEncoder func(val cty.Value) (CollectionEncoder[T], diagnostics.Diag) }
Encoder is a generic interface for encoding cty values into a specific type.
Click to show internal directories.
Click to hide internal directories.