Documentation
¶
Index ¶
- Variables
- func AttributeTypes[T any](ctx context.Context) (map[string]attr.Type, error)
- func AttributeTypesMust[T any](ctx context.Context) map[string]attr.Type
- func NewListNestedObjectTypeOf[T any](ctx context.Context) listNestedObjectTypeOf[T]
- func NewObjectTypeOf[T any](ctx context.Context) objectTypeOf[T]
- type ListNestedObjectValueOf
- func NewListNestedObjectValueOfNull[T any](ctx context.Context) ListNestedObjectValueOf[T]
- func NewListNestedObjectValueOfPtr[T any](ctx context.Context, t *T) ListNestedObjectValueOf[T]
- func NewListNestedObjectValueOfSlice[T any](ctx context.Context, ts []*T) ListNestedObjectValueOf[T]
- func NewListNestedObjectValueOfUnknown[T any](ctx context.Context) ListNestedObjectValueOf[T]
- func NewListNestedObjectValueOfValueSlice[T any](ctx context.Context, ts []T) ListNestedObjectValueOf[T]
- func (v ListNestedObjectValueOf[T]) Equal(o attr.Value) bool
- func (v ListNestedObjectValueOf[T]) ToObjectPtr(ctx context.Context) (any, diag.Diagnostics)
- func (v ListNestedObjectValueOf[T]) ToObjectSlice(ctx context.Context) (any, diag.Diagnostics)
- func (v ListNestedObjectValueOf[T]) ToPtr(ctx context.Context) (*T, diag.Diagnostics)
- func (v ListNestedObjectValueOf[T]) ToSlice(ctx context.Context) ([]*T, diag.Diagnostics)
- func (v ListNestedObjectValueOf[T]) Type(ctx context.Context) attr.Type
- type ListValueOf
- func NewListValueOf[T attr.Value](ctx context.Context, elements []attr.Value) (ListValueOf[T], diag.Diagnostics)
- func NewListValueOfMust[T attr.Value](ctx context.Context, elements []attr.Value) ListValueOf[T]
- func NewListValueOfNull[T attr.Value](ctx context.Context) ListValueOf[T]
- func NewListValueOfUnknown[T attr.Value](ctx context.Context) ListValueOf[T]
- type NestedObjectCollectionType
- type NestedObjectCollectionValue
- type NestedObjectType
- type NestedObjectValue
- type ObjectValueOf
Constants ¶
This section is empty.
Variables ¶
var ( // ListOfStringType is a custom type used for defining a List of strings. ListOfStringType = listTypeOf[basetypes.StringValue]{basetypes.ListType{ElemType: basetypes.StringType{}}} )
Functions ¶
func AttributeTypes ¶
AttributeTypes returns a map of attribute types for the specified type T. T must be a struct and reflection is used to find exported fields of T with the `tfsdk` tag.
func NewObjectTypeOf ¶
Types ¶
type ListNestedObjectValueOf ¶
ListNestedObjectValueOf represents a Terraform Plugin Framework List value whose elements are of type `ObjectTypeOf[T]`.
func NewListNestedObjectValueOfNull ¶
func NewListNestedObjectValueOfNull[T any](ctx context.Context) ListNestedObjectValueOf[T]
func NewListNestedObjectValueOfPtr ¶
func NewListNestedObjectValueOfPtr[T any](ctx context.Context, t *T) ListNestedObjectValueOf[T]
func NewListNestedObjectValueOfSlice ¶
func NewListNestedObjectValueOfSlice[T any](ctx context.Context, ts []*T) ListNestedObjectValueOf[T]
func NewListNestedObjectValueOfUnknown ¶
func NewListNestedObjectValueOfUnknown[T any](ctx context.Context) ListNestedObjectValueOf[T]
func NewListNestedObjectValueOfValueSlice ¶
func NewListNestedObjectValueOfValueSlice[T any](ctx context.Context, ts []T) ListNestedObjectValueOf[T]
func (ListNestedObjectValueOf[T]) Equal ¶
func (v ListNestedObjectValueOf[T]) Equal(o attr.Value) bool
func (ListNestedObjectValueOf[T]) ToObjectPtr ¶
func (v ListNestedObjectValueOf[T]) ToObjectPtr(ctx context.Context) (any, diag.Diagnostics)
func (ListNestedObjectValueOf[T]) ToObjectSlice ¶
func (v ListNestedObjectValueOf[T]) ToObjectSlice(ctx context.Context) (any, diag.Diagnostics)
func (ListNestedObjectValueOf[T]) ToPtr ¶
func (v ListNestedObjectValueOf[T]) ToPtr(ctx context.Context) (*T, diag.Diagnostics)
ToPtr returns a pointer to the single element of a ListNestedObject.
func (ListNestedObjectValueOf[T]) ToSlice ¶
func (v ListNestedObjectValueOf[T]) ToSlice(ctx context.Context) ([]*T, diag.Diagnostics)
ToSlice returns a slice of pointers to the elements of a ListNestedObject.
type ListValueOf ¶
func NewListValueOf ¶
func NewListValueOf[T attr.Value](ctx context.Context, elements []attr.Value) (ListValueOf[T], diag.Diagnostics)
func NewListValueOfMust ¶
func NewListValueOfNull ¶
func NewListValueOfNull[T attr.Value](ctx context.Context) ListValueOf[T]
func NewListValueOfUnknown ¶
func NewListValueOfUnknown[T attr.Value](ctx context.Context) ListValueOf[T]
type NestedObjectCollectionType ¶
type NestedObjectCollectionType interface { NestedObjectType // NewObjectSlice returns a new value as an object slice (Go []*struct). NewObjectSlice(context.Context, int, int) (any, diag.Diagnostics) // ValueFromObjectSlice returns a Value given an object pointer (Go []*struct). ValueFromObjectSlice(context.Context, any) (attr.Value, diag.Diagnostics) }
NestedObjectCollectionType extends the NestedObjectType interface for types that represent collections (Lists or Sets) of nested Objects. It isn't generic on the Go struct type as it's referenced within AutoFlEx.
type NestedObjectCollectionValue ¶
type NestedObjectCollectionValue interface { NestedObjectValue // ToObjectSlice returns the value as an object slice (Go []*struct). ToObjectSlice(context.Context) (any, diag.Diagnostics) }
NestedObjectCollectionValue extends the NestedObjectValue interface for values that represent collections of nested Objects. It isn't generic on the Go struct type as it's referenced within AutoFlEx.
type NestedObjectType ¶
type NestedObjectType interface { attr.Type // NewObjectPtr returns a new, empty value as an object pointer (Go *struct). NewObjectPtr(context.Context) (any, diag.Diagnostics) // NullValue returns a Null Value. NullValue(context.Context) (attr.Value, diag.Diagnostics) // ValueFromObjectPtr returns a Value given an object pointer (Go *struct). ValueFromObjectPtr(context.Context, any) (attr.Value, diag.Diagnostics) }
NestedObjectType extends the Type interface for types that represent nested Objects. The nested objects are either a single object or a collection of objects (List or Set). It isn't generic on the Go struct type as it's referenced within AutoFlEx.
type NestedObjectValue ¶
type NestedObjectValue interface { attr.Value // ToObjectPtr returns the value as an object pointer (Go *struct). ToObjectPtr(context.Context) (any, diag.Diagnostics) }
NestedObjectValue extends the Value interface for values that represent nested Objects. The nested objects are either a single object or a collection of objects (List or Set). It isn't generic on the Go struct type as it's referenced within AutoFlEx.
type ObjectValueOf ¶
type ObjectValueOf[T any] struct { basetypes.ObjectValue }
ObjectValueOf represents a Terraform Plugin Framework Object value whose corresponding Go type is the structure T.
func NewObjectValueOf ¶
func NewObjectValueOf[T any](ctx context.Context, t *T) ObjectValueOf[T]
func NewObjectValueOfNull ¶
func NewObjectValueOfNull[T any](ctx context.Context) ObjectValueOf[T]
func NewObjectValueOfUnknown ¶
func NewObjectValueOfUnknown[T any](ctx context.Context) ObjectValueOf[T]
func (ObjectValueOf[T]) ToObjectPtr ¶
func (v ObjectValueOf[T]) ToObjectPtr(ctx context.Context) (any, diag.Diagnostics)
func (ObjectValueOf[T]) ToPtr ¶
func (v ObjectValueOf[T]) ToPtr(ctx context.Context) (*T, diag.Diagnostics)