supertypes

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MPL-2.0 Imports: 14 Imported by: 2

Documentation

Overview

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeTypes added in v0.2.0

func AttributeTypes[T any](ctx context.Context) (map[string]attr.Type, error)

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 AttributeTypesMust added in v0.2.0

func AttributeTypesMust[T any](ctx context.Context) map[string]attr.Type

func DiagnosticString added in v0.2.0

func DiagnosticString(d diag.Diagnostic) string

DiagnosticString formats a Diagnostic If there is no `Detail`, only prints summary, otherwise prints both

func DiagnosticsError added in v0.2.0

func DiagnosticsError(diags diag.Diagnostics) error

DiagnosticsError returns an error containing all Diagnostic with SeverityError

func ElementType added in v0.3.0

func ElementType[T any](_ context.Context) (attr.Type, error)

ElementType returns the element type of the specified type T. T must be a slice or map and reflection is used to find the element type.

func ElementTypeMust added in v0.3.0

func ElementTypeMust[T any](ctx context.Context) attr.Type

func Must added in v0.2.0

func Must[T any](x T, err error) T

Must is a generic implementation of the Go Must idiom [1, 2]. It panics if the provided error is non-nil and returns x otherwise.

func MustDiag added in v0.2.0

func MustDiag[T any](x T, diags diag.Diagnostics) T

MustDiag is a generic implementation of the Go Must idiom [1, 2]. It panics if the provided Diagnostics has errors and returns x otherwise.

Types

type BoolType

type BoolType struct {
	basetypes.BoolType
}

func (BoolType) Equal

func (t BoolType) Equal(o attr.Type) bool

func (BoolType) String

func (t BoolType) String() string

func (BoolType) ValueFromBool

func (BoolType) ValueFromTerraform

func (t BoolType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (BoolType) ValueType

func (t BoolType) ValueType(ctx context.Context) attr.Value

type BoolValue

type BoolValue struct {
	basetypes.BoolValue
}

func NewBoolNull added in v0.0.3

func NewBoolNull() BoolValue

func NewBoolPointerValue added in v0.0.3

func NewBoolPointerValue(s *bool) BoolValue

func NewBoolUnknown added in v0.0.3

func NewBoolUnknown() BoolValue

func NewBoolValue added in v0.0.3

func NewBoolValue(s bool) BoolValue

func (BoolValue) Equal

func (v BoolValue) Equal(o attr.Value) bool

func (*BoolValue) Get

func (v *BoolValue) Get() bool

Get returns the known Bool value. If Bool is null or unknown, returns false.

func (*BoolValue) GetPtr added in v0.0.3

func (v *BoolValue) GetPtr() *bool

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (BoolValue) IsKnown

func (v BoolValue) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*BoolValue) Set

func (v *BoolValue) Set(s bool)

Set sets the Bool value.

func (*BoolValue) SetNull

func (v *BoolValue) SetNull()

SetNull sets the Bool value to null.

func (*BoolValue) SetPtr added in v0.1.0

func (v *BoolValue) SetPtr(s *bool)

SetPtr sets a pointer to the Bool value.

func (*BoolValue) SetUnknown

func (v *BoolValue) SetUnknown()

SetUnknown sets the Bool value to unknown.

func (BoolValue) Type

func (v BoolValue) Type(ctx context.Context) attr.Type

type Float64Type

type Float64Type struct {
	basetypes.Float64Type
}

func (Float64Type) Equal

func (t Float64Type) Equal(o attr.Type) bool

func (Float64Type) String

func (t Float64Type) String() string

func (Float64Type) ValueFromTerraform

func (t Float64Type) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (Float64Type) ValueType

func (t Float64Type) ValueType(ctx context.Context) attr.Value

type Float64Value

type Float64Value struct {
	basetypes.Float64Value
}

func NewFloat64Null added in v0.0.3

func NewFloat64Null() Float64Value

func NewFloat64PointerValue added in v0.0.3

func NewFloat64PointerValue(s *float64) Float64Value

func NewFloat64Unknown added in v0.0.3

func NewFloat64Unknown() Float64Value

func NewFloat64Value added in v0.0.3

func NewFloat64Value(s float64) Float64Value

func (Float64Value) Equal

func (v Float64Value) Equal(o attr.Value) bool

func (*Float64Value) Get

func (v *Float64Value) Get() float64

Get returns the known Float64 value. If Float64 is null or unknown, returns 0.0.

func (*Float64Value) GetFloat32 added in v0.1.0

func (v *Float64Value) GetFloat32() float32

GetFloat32 returns converted float64 to float32 value.

func (Float64Value) GetFloat32Ptr added in v0.1.0

func (v Float64Value) GetFloat32Ptr() *float32

GetFloat32Ptr returns a converted float64 to float32 pointer. If the value is null or unknown, nil is returned.

func (Float64Value) GetFloat64 added in v0.1.0

func (v Float64Value) GetFloat64() float64

GetFloat64 returns the float64 value. This is a same func as Get.

func (Float64Value) GetFloat64Ptr added in v0.1.0

func (v Float64Value) GetFloat64Ptr() *float64

GetFloat64Ptr returns a float64 pointer. This is a same func as GetPtr. If the value is null or unknown, nil is returned.

func (*Float64Value) GetPtr added in v0.0.3

func (v *Float64Value) GetPtr() *float64

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (Float64Value) IsKnown

func (v Float64Value) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*Float64Value) Set

func (v *Float64Value) Set(s float64)

Set sets the Float64 value.

func (*Float64Value) SetFloat32 added in v0.1.0

func (v *Float64Value) SetFloat32(s float32)

SetFloat32 sets a converted float32 to float64 value.

func (*Float64Value) SetFloat32Ptr added in v0.1.0

func (v *Float64Value) SetFloat32Ptr(s *float32)

SetFloat32Ptr sets a converted float32 to float64 pointer. If the pointer is nil, the value is set to null.

func (*Float64Value) SetFloat64 added in v0.1.0

func (v *Float64Value) SetFloat64(s float64)

SetFloat64 sets a float64 value. This is a same func as Set.

func (*Float64Value) SetFloat64Ptr added in v0.1.0

func (v *Float64Value) SetFloat64Ptr(s *float64)

SetFloat64Ptr sets a float64 pointer. This is a same func as SetPtr.

func (*Float64Value) SetNull

func (v *Float64Value) SetNull()

SetNull sets the Float64 value to null.

func (*Float64Value) SetPtr added in v0.1.0

func (v *Float64Value) SetPtr(s *float64)

SetPtr sets a pointer to the Float64 value.

func (*Float64Value) SetUnknown

func (v *Float64Value) SetUnknown()

SetUnknown sets the Float64 value to unknown.

func (Float64Value) Type

func (v Float64Value) Type(ctx context.Context) attr.Type

type Int64Type

type Int64Type struct {
	basetypes.Int64Type
}

func (Int64Type) Equal

func (t Int64Type) Equal(o attr.Type) bool

func (Int64Type) String

func (t Int64Type) String() string

func (Int64Type) ValueFromTerraform

func (t Int64Type) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (Int64Type) ValueType

func (t Int64Type) ValueType(ctx context.Context) attr.Value

type Int64Value

type Int64Value struct {
	basetypes.Int64Value
}

func NewInt64Null added in v0.0.3

func NewInt64Null() Int64Value

func NewInt64PointerValue added in v0.0.3

func NewInt64PointerValue(s *int64) Int64Value

func NewInt64Unknown added in v0.0.3

func NewInt64Unknown() Int64Value

func NewInt64Value added in v0.0.3

func NewInt64Value(s int64) Int64Value

func (Int64Value) Equal

func (v Int64Value) Equal(o attr.Value) bool

func (*Int64Value) Get

func (v *Int64Value) Get() int64

Get returns the known Int64 value. If Int64 is null or unknown, returns 0.

func (Int64Value) GetInt added in v0.1.0

func (v Int64Value) GetInt() int

GetInt returns converted int64 to int value.

func (Int64Value) GetInt16 added in v0.1.0

func (v Int64Value) GetInt16() int16

GetInt16 return converted int64 to int16 value.

func (Int64Value) GetInt16Ptr added in v0.1.0

func (v Int64Value) GetInt16Ptr() *int16

GetInt16Ptr returns a converted int64 to int16 pointer. If the value is null or unknown, nil is returned.

func (Int64Value) GetInt32 added in v0.1.0

func (v Int64Value) GetInt32() int32

GetInt32 returns converted int64 to int32 value.

func (Int64Value) GetInt32Ptr added in v0.1.0

func (v Int64Value) GetInt32Ptr() *int32

GetInt32Ptr returns a converted int64 to int32 pointer. If the value is null or unknown, nil is returned.

func (Int64Value) GetInt64 added in v0.1.0

func (v Int64Value) GetInt64() int64

GetInt64 returns int64 value. This is a same func as Get.

func (Int64Value) GetInt64Ptr added in v0.1.0

func (v Int64Value) GetInt64Ptr() *int64

GetInt64Ptr returns a pointer to the underlying int64 value.

func (Int64Value) GetInt8 added in v0.1.0

func (v Int64Value) GetInt8() int8

GetInt8 return converted int64 to int8 value.

func (Int64Value) GetInt8Ptr added in v0.1.0

func (v Int64Value) GetInt8Ptr() *int8

GetInt8Ptr returns a converted int64 to int8 pointer. If the value is null or unknown, nil is returned.

func (Int64Value) GetIntPtr added in v0.1.0

func (v Int64Value) GetIntPtr() *int

GetIntPtr returns a converted int64 to int pointer. If the value is null or unknown, nil is returned.

func (*Int64Value) GetPtr added in v0.0.3

func (v *Int64Value) GetPtr() *int64

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (Int64Value) IsKnown

func (v Int64Value) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*Int64Value) Set

func (v *Int64Value) Set(s int64)

Set sets the Int64 value.

func (*Int64Value) SetInt added in v0.1.0

func (v *Int64Value) SetInt(s int)

SetInt sets the int64 value to the given int.

func (*Int64Value) SetInt16 added in v0.1.0

func (v *Int64Value) SetInt16(s int16)

SetInt16 sets the int64 value to the given int16.

func (*Int64Value) SetInt16Ptr added in v0.1.0

func (v *Int64Value) SetInt16Ptr(s *int16)

SetInt16Ptr sets the int64 value to the given int16 pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetInt32 added in v0.1.0

func (v *Int64Value) SetInt32(s int32)

SetInt32 Sets the int64 value to the given int32.

func (*Int64Value) SetInt32Ptr added in v0.1.0

func (v *Int64Value) SetInt32Ptr(s *int32)

SetInt32Ptr sets the int64 value to the given int32 pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetInt64 added in v0.1.0

func (v *Int64Value) SetInt64(s int64)

SetInt64 sets the int64 value to the given int64. This is a same func as Set.

func (*Int64Value) SetInt64Ptr added in v0.1.0

func (v *Int64Value) SetInt64Ptr(s *int64)

SetInt64Ptr sets the int64 value to the given int64 pointer.

func (*Int64Value) SetInt8 added in v0.1.0

func (v *Int64Value) SetInt8(s int8)

SetInt8 sets the int64 value to the given int8.

func (*Int64Value) SetInt8Ptr added in v0.1.0

func (v *Int64Value) SetInt8Ptr(s *int8)

SetInt8Ptr sets the int64 value to the given int8 pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetIntPtr added in v0.1.0

func (v *Int64Value) SetIntPtr(s *int)

SetIntPtr sets the int64 value to the given int pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetNull

func (v *Int64Value) SetNull()

SetNull sets the Int64 value to null.

func (*Int64Value) SetPtr added in v0.1.0

func (v *Int64Value) SetPtr(s *int64)

SetPtr sets a pointer to the Int64 value.

func (*Int64Value) SetUnknown

func (v *Int64Value) SetUnknown()

SetUnknown sets the Int64 value to unknown.

func (Int64Value) Type

func (v Int64Value) Type(ctx context.Context) attr.Type

type ListNestedObjectTypeOf added in v0.2.0

type ListNestedObjectTypeOf[T any] struct {
	basetypes.ListType
}

ListNestedObjectTypeOf is the attribute type of a ListNestedObjectValueOf.

func NewListNestedObjectTypeOf added in v0.2.0

func NewListNestedObjectTypeOf[T any](ctx context.Context) ListNestedObjectTypeOf[T]

func (ListNestedObjectTypeOf[T]) Equal added in v0.2.0

func (t ListNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (ListNestedObjectTypeOf[T]) NewObjectPtr added in v0.2.0

func (t ListNestedObjectTypeOf[T]) NewObjectPtr(ctx context.Context) (any, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) NewObjectSlice added in v0.2.0

func (t ListNestedObjectTypeOf[T]) NewObjectSlice(ctx context.Context, len, cap int) (any, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) NullValue added in v0.2.0

func (ListNestedObjectTypeOf[T]) String added in v0.2.0

func (t ListNestedObjectTypeOf[T]) String() string

func (ListNestedObjectTypeOf[T]) ValueFromList added in v0.2.0

func (ListNestedObjectTypeOf[T]) ValueFromObjectPtr added in v0.2.0

func (t ListNestedObjectTypeOf[T]) ValueFromObjectPtr(ctx context.Context, ptr any) (attr.Value, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) ValueFromObjectSlice added in v0.2.0

func (t ListNestedObjectTypeOf[T]) ValueFromObjectSlice(ctx context.Context, slice any) (attr.Value, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) ValueFromTerraform added in v0.2.0

func (t ListNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ListNestedObjectTypeOf[T]) ValueType added in v0.2.0

func (t ListNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type ListNestedObjectValueOf added in v0.2.0

type ListNestedObjectValueOf[T any] struct {
	basetypes.ListValue
}

ListNestedObjectValueOf represents a Terraform Plugin Framework List value whose elements are of type ObjectTypeOf.

func NewListNestedObjectValueOfNull added in v0.2.0

func NewListNestedObjectValueOfNull[T any](ctx context.Context) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfPtr added in v0.2.0

func NewListNestedObjectValueOfPtr[T any](ctx context.Context, t *T) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfSlice added in v0.2.0

func NewListNestedObjectValueOfSlice[T any](ctx context.Context, ts []*T) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfUnknown added in v0.2.0

func NewListNestedObjectValueOfUnknown[T any](ctx context.Context) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfValueSlice added in v0.2.0

func NewListNestedObjectValueOfValueSlice[T any](ctx context.Context, ts []T) ListNestedObjectValueOf[T]

func (ListNestedObjectValueOf[T]) Equal added in v0.2.0

func (v ListNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (ListNestedObjectValueOf[T]) Get added in v0.2.0

func (v ListNestedObjectValueOf[T]) Get(ctx context.Context) ([]*T, diag.Diagnostics)

Get returns a slice of pointers to the elements of a ListNestedObject.

func (ListNestedObjectValueOf[T]) IsKnown added in v0.2.0

func (v ListNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*ListNestedObjectValueOf[T]) Set added in v0.2.0

func (v *ListNestedObjectValueOf[T]) Set(ctx context.Context, slice []*T) diag.Diagnostics

Set returns a ListNestedObjectValueOf from a slice of pointers to the elements of a ListNestedObject.

func (*ListNestedObjectValueOf[T]) SetNull added in v0.2.0

func (v *ListNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*ListNestedObjectValueOf[T]) SetUnknown added in v0.2.0

func (v *ListNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (ListNestedObjectValueOf[T]) Type added in v0.2.0

type ListNestedType

type ListNestedType struct {
	basetypes.ListType
}

ListNestedType is the attribute type of a ListNestedValue.

func (ListNestedType) ElementType

func (t ListNestedType) ElementType() attr.Type

func (ListNestedType) Equal added in v0.2.0

func (t ListNestedType) Equal(o attr.Type) bool

func (ListNestedType) String

func (t ListNestedType) String() string

String returns a string representation of the type.

func (ListNestedType) TerraformType

func (t ListNestedType) TerraformType(ctx context.Context) tftypes.Type

TerraformType returns the tftypes.Type that should be used to represent this type. This constrains what user input will be accepted and what kind of data can be set in state. The framework will use this to translate the AttributeType to something Terraform can understand.

func (ListNestedType) ValueFromList

func (ListNestedType) ValueFromTerraform

func (t ListNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type ListNestedValue

type ListNestedValue struct {
	basetypes.ListValue
}

func NewListNestedNull added in v0.0.5

func NewListNestedNull(elementType attr.Type) ListNestedValue

func NewListNestedUnknown added in v0.0.5

func NewListNestedUnknown(elementType attr.Type) ListNestedValue

func (*ListNestedValue) Get

func (v *ListNestedValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (ListNestedValue) IsKnown

func (v ListNestedValue) IsKnown() bool

func (*ListNestedValue) Set

func (v *ListNestedValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*ListNestedValue) SetNull

func (v *ListNestedValue) SetNull(ctx context.Context)

func (*ListNestedValue) SetUnknown

func (v *ListNestedValue) SetUnknown(ctx context.Context)

func (ListNestedValue) ToListValue

func (ListNestedValue) Type

func (v ListNestedValue) Type(ctx context.Context) attr.Type

type ListType

type ListType struct {
	basetypes.ListType
}

func (ListType) ElementType

func (t ListType) ElementType() attr.Type

func (ListType) Equal

func (t ListType) Equal(o attr.Type) bool

func (ListType) String

func (t ListType) String() string

func (ListType) TerraformType

func (t ListType) TerraformType(ctx context.Context) tftypes.Type

func (ListType) ValueFromList

func (ListType) ValueFromTerraform

func (t ListType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ListType) ValueType

func (t ListType) ValueType(ctx context.Context) attr.Value

type ListTypeOf added in v0.3.0

type ListTypeOf[T any] struct {
	basetypes.ListType
}

func NewListTypeOf added in v0.3.0

func NewListTypeOf[T any](ctx context.Context) ListTypeOf[T]

func (ListTypeOf[T]) ElementType added in v0.3.0

func (t ListTypeOf[T]) ElementType() attr.Type

ElementType returns the element type of this List.

func (ListTypeOf[T]) Equal added in v0.3.0

func (t ListTypeOf[T]) Equal(o attr.Type) bool

Equal returns true if the given type is equal to this type.

func (ListTypeOf[T]) String added in v0.3.0

func (t ListTypeOf[T]) String() string

String returns a string representation of the type.

func (ListTypeOf[T]) ValueFromList added in v0.3.0

ValueFromList converts a basetypes.ListValue to a ListValueOf.

func (ListTypeOf[T]) ValueFromTerraform added in v0.3.0

func (t ListTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

ValueFromTerraform converts a tftypes.Value to a ListValueOf.

func (ListTypeOf[T]) ValueType added in v0.3.0

func (t ListTypeOf[T]) ValueType(ctx context.Context) attr.Value

ValueType returns the value type of this List.

type ListValue

type ListValue struct {
	basetypes.ListValue
}

func NewListNull added in v0.0.3

func NewListNull(elementType attr.Type) ListValue

func NewListUnknown added in v0.0.3

func NewListUnknown(elementType attr.Type) ListValue

func NewListValue added in v0.0.3

func NewListValue(elementType attr.Type, elements []attr.Value) (ListValue, diag.Diagnostics)

func NewListValueFrom added in v0.0.3

func NewListValueFrom(ctx context.Context, elementType attr.Type, elements any) (ListValue, diag.Diagnostics)

func NewListValueMust added in v0.0.3

func NewListValueMust(elementType attr.Type, elements []attr.Value) ListValue

func (ListValue) Equal

func (v ListValue) Equal(o attr.Value) bool

func (*ListValue) Get

func (v *ListValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (ListValue) IsKnown

func (v ListValue) IsKnown() bool

func (*ListValue) Set

func (v *ListValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*ListValue) SetNull

func (v *ListValue) SetNull(ctx context.Context)

func (*ListValue) SetUnknown

func (v *ListValue) SetUnknown(ctx context.Context)

func (ListValue) ToListValue

func (ListValue) Type

func (v ListValue) Type(ctx context.Context) attr.Type

type ListValueOf added in v0.3.0

type ListValueOf[T any] struct {
	basetypes.ListValue
}

func NewListValueOfNull added in v0.3.0

func NewListValueOfNull[T any](ctx context.Context) ListValueOf[T]

NewListValueOfNull returns a new ListValueOf with a null value.

func NewListValueOfSlice added in v0.3.0

func NewListValueOfSlice[T any](ctx context.Context, elements []T) ListValueOf[T]

NewListValueOfSlice returns a new ListValueOf with the given slice value.

func NewListValueOfSlicePtr added in v0.3.0

func NewListValueOfSlicePtr[T any](ctx context.Context, elements []*T) ListValueOf[T]

NewListValueOfSlicePtr returns a new ListValueOf with the given slice value.

func NewListValueOfUnknown added in v0.3.0

func NewListValueOfUnknown[T any](ctx context.Context) ListValueOf[T]

NewListValueOfUnknown returns a new ListValueOf with an unknown value.

func (ListValueOf[T]) Equal added in v0.3.0

func (v ListValueOf[T]) Equal(o attr.Value) bool

Equal returns true if the given value is equal to this value.

func (ListValueOf[T]) Get added in v0.3.0

func (v ListValueOf[T]) Get(ctx context.Context) (values []T, diags diag.Diagnostics)

Get returns a ListValueOf from the given value.

func (ListValueOf[T]) IsKnown added in v0.3.0

func (v ListValueOf[T]) IsKnown() bool

IsKnown returns true if the value is known.

func (*ListValueOf[T]) Set added in v0.3.0

func (v *ListValueOf[T]) Set(ctx context.Context, elements []T) diag.Diagnostics

Set sets the value of this value.

func (*ListValueOf[T]) SetNull added in v0.3.0

func (v *ListValueOf[T]) SetNull(ctx context.Context)

SetNull sets the value to null.

func (*ListValueOf[T]) SetUnknown added in v0.3.0

func (v *ListValueOf[T]) SetUnknown(ctx context.Context)

SetUnknown sets the value to unknown.

func (ListValueOf[T]) ToListValue added in v0.3.0

ToListValue converts the given value to a ListValue.

func (ListValueOf[T]) Type added in v0.3.0

func (v ListValueOf[T]) Type(ctx context.Context) attr.Type

Type returns the type of this value.

type MapNestedObjectTypeOf added in v0.2.0

type MapNestedObjectTypeOf[T any] struct {
	basetypes.MapType
}

MapNestedObjectTypeOf is the attribute type of a MapNestedObjectValueOf.

func NewMapNestedObjectTypeOf added in v0.2.0

func NewMapNestedObjectTypeOf[T any](ctx context.Context) MapNestedObjectTypeOf[T]

func (MapNestedObjectTypeOf[T]) Equal added in v0.2.0

func (t MapNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (MapNestedObjectTypeOf[T]) NewObjectPtr added in v0.2.0

func (t MapNestedObjectTypeOf[T]) NewObjectPtr(ctx context.Context) (any, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) NewObjectSlice added in v0.2.0

func (t MapNestedObjectTypeOf[T]) NewObjectSlice(ctx context.Context, _, _ int) (any, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) NullValue added in v0.2.0

func (MapNestedObjectTypeOf[T]) String added in v0.2.0

func (t MapNestedObjectTypeOf[T]) String() string

func (MapNestedObjectTypeOf[T]) ValueFromMap added in v0.2.0

func (MapNestedObjectTypeOf[T]) ValueFromObjectPtr added in v0.2.0

func (t MapNestedObjectTypeOf[T]) ValueFromObjectPtr(ctx context.Context, ptr any) (attr.Value, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) ValueFromObjectSlice added in v0.2.0

func (t MapNestedObjectTypeOf[T]) ValueFromObjectSlice(ctx context.Context, slice any) (attr.Value, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) ValueFromTerraform added in v0.2.0

func (t MapNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (MapNestedObjectTypeOf[T]) ValueType added in v0.2.0

func (t MapNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type MapNestedObjectValueOf added in v0.2.0

type MapNestedObjectValueOf[T any] struct {
	basetypes.MapValue
}

MapNestedObjectValueOf represents a Terraform Plugin Framework Map value whose elements are of type ObjectTypeOf.

func NewMapNestedObjectValueOfMap added in v0.3.1

func NewMapNestedObjectValueOfMap[T any](ctx context.Context, m map[string]*T) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfNull added in v0.2.0

func NewMapNestedObjectValueOfNull[T any](ctx context.Context) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfPtr added in v0.2.0

func NewMapNestedObjectValueOfPtr[T any](ctx context.Context, m map[string]*T) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfUnknown added in v0.2.0

func NewMapNestedObjectValueOfUnknown[T any](ctx context.Context) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfValueMap added in v0.3.1

func NewMapNestedObjectValueOfValueMap[T any](ctx context.Context, m map[string]T) MapNestedObjectValueOf[T]

func (MapNestedObjectValueOf[T]) Equal added in v0.2.0

func (v MapNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (MapNestedObjectValueOf[T]) Get added in v0.2.0

func (v MapNestedObjectValueOf[T]) Get(ctx context.Context) (map[string]*T, diag.Diagnostics)

Get returns a slice of pointers to the elements of a MapNestedObject.

func (MapNestedObjectValueOf[T]) IsKnown added in v0.2.0

func (v MapNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*MapNestedObjectValueOf[T]) Set added in v0.2.0

func (v *MapNestedObjectValueOf[T]) Set(ctx context.Context, m map[string]*T) diag.Diagnostics

Set returns a MapNestedObjectValueOf from a slice of pointers to the elements of a MapNestedObject.

func (*MapNestedObjectValueOf[T]) SetNull added in v0.2.0

func (v *MapNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*MapNestedObjectValueOf[T]) SetUnknown added in v0.2.0

func (v *MapNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (MapNestedObjectValueOf[T]) Type added in v0.2.0

type MapNestedType

type MapNestedType struct {
	basetypes.MapType
}

MapNestedType is the attribute type of a MapNestedValue.

func (MapNestedType) ElementType

func (t MapNestedType) ElementType() attr.Type

func (MapNestedType) Equal added in v0.2.0

func (t MapNestedType) Equal(o attr.Type) bool

func (MapNestedType) String

func (t MapNestedType) String() string

String returns a string representation of the type.

func (MapNestedType) TerraformType

func (t MapNestedType) TerraformType(ctx context.Context) tftypes.Type

TerraformType returns the tftypes.Type that should be used to represent this type. This constrains what user input will be accepted and what kind of data can be set in state. The framework will use this to translate the AttributeType to something Terraform can understand.

func (MapNestedType) ValueFromMap

func (MapNestedType) ValueFromTerraform

func (t MapNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type MapNestedValue

type MapNestedValue struct {
	basetypes.MapValue
}

func NewMapNestedNull added in v0.0.5

func NewMapNestedNull(elementType attr.Type) MapNestedValue

func NewMapNestedUnknown added in v0.0.5

func NewMapNestedUnknown(elementType attr.Type) MapNestedValue

func (*MapNestedValue) Get

func (v *MapNestedValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (MapNestedValue) IsKnown

func (v MapNestedValue) IsKnown() bool

func (*MapNestedValue) Set

func (v *MapNestedValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*MapNestedValue) SetNull

func (v *MapNestedValue) SetNull(ctx context.Context)

func (*MapNestedValue) SetUnknown

func (v *MapNestedValue) SetUnknown(ctx context.Context)

func (MapNestedValue) ToMapValue

func (MapNestedValue) Type

func (v MapNestedValue) Type(ctx context.Context) attr.Type

type MapType

type MapType struct {
	basetypes.MapType
}

func (MapType) ElementType

func (t MapType) ElementType() attr.Type

func (MapType) Equal

func (t MapType) Equal(o attr.Type) bool

func (MapType) String

func (t MapType) String() string

func (MapType) TerraformType

func (t MapType) TerraformType(ctx context.Context) tftypes.Type

func (MapType) ValueFromMap

func (MapType) ValueFromTerraform

func (t MapType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (MapType) ValueType

func (t MapType) ValueType(ctx context.Context) attr.Value

type MapTypeOf added in v0.3.0

type MapTypeOf[T any] struct {
	basetypes.MapType
}

func NewMapTypeOf added in v0.3.0

func NewMapTypeOf[T any](ctx context.Context) MapTypeOf[T]

func (MapTypeOf[T]) ElementType added in v0.3.0

func (t MapTypeOf[T]) ElementType() attr.Type

ElementType returns the element type of this Map.

func (MapTypeOf[T]) Equal added in v0.3.0

func (t MapTypeOf[T]) Equal(o attr.Type) bool

Equal returns true if the given type is equal to this type.

func (MapTypeOf[T]) String added in v0.3.0

func (t MapTypeOf[T]) String() string

String returns a string representation of the type.

func (MapTypeOf[T]) ValueFromMap added in v0.3.0

ValueFromMap converts a basetypes.MapValue to a MapValueOf.

func (MapTypeOf[T]) ValueFromTerraform added in v0.3.0

func (t MapTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

ValueFromTerraform converts a tftypes.Value to a MapValueOf.

func (MapTypeOf[T]) ValueType added in v0.3.0

func (t MapTypeOf[T]) ValueType(ctx context.Context) attr.Value

ValueType returns the value type of this Map.

type MapValue

type MapValue struct {
	basetypes.MapValue
}

func NewMapNull added in v0.0.3

func NewMapNull(elementType attr.Type) MapValue

func NewMapUnknown added in v0.0.3

func NewMapUnknown(elementType attr.Type) MapValue

func NewMapValue added in v0.0.3

func NewMapValue(elementType attr.Type, elements map[string]attr.Value) (MapValue, diag.Diagnostics)

func NewMapValueFrom added in v0.0.3

func NewMapValueFrom(ctx context.Context, elementType attr.Type, elements any) (MapValue, diag.Diagnostics)

func NewMapValueMust added in v0.0.3

func NewMapValueMust(elementType attr.Type, elements map[string]attr.Value) MapValue

func (MapValue) Equal

func (v MapValue) Equal(o attr.Value) bool

func (*MapValue) Get

func (v *MapValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (MapValue) IsKnown

func (v MapValue) IsKnown() bool

func (*MapValue) Set

func (v *MapValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*MapValue) SetNull

func (v *MapValue) SetNull(ctx context.Context)

func (*MapValue) SetUnknown

func (v *MapValue) SetUnknown(ctx context.Context)

func (MapValue) ToMapValue

func (MapValue) Type

func (v MapValue) Type(ctx context.Context) attr.Type

type MapValueOf added in v0.3.0

type MapValueOf[T any] struct {
	basetypes.MapValue
}

func NewMapValueOfMap added in v0.3.0

func NewMapValueOfMap[T any](ctx context.Context, elements map[string]T) (MapValueOf[T], diag.Diagnostics)

NewMapValueOfMap returns a new MapValueOf with the given map value.

func NewMapValueOfNull added in v0.3.0

func NewMapValueOfNull[T any](ctx context.Context) MapValueOf[T]

NewMapValueOfNull returns a new MapValueOf with a null value.

func NewMapValueOfUnknown added in v0.3.0

func NewMapValueOfUnknown[T any](ctx context.Context) MapValueOf[T]

NewMapValueOfUnknown returns a new MapValueOf with an unknown value.

func (MapValueOf[T]) Equal added in v0.3.0

func (v MapValueOf[T]) Equal(o attr.Value) bool

Equal returns true if the given value is equal to this value.

func (MapValueOf[T]) Get added in v0.3.0

func (v MapValueOf[T]) Get(ctx context.Context) (values map[string]T, diags diag.Diagnostics)

Get returns a MapValueOf from the given value.

func (MapValueOf[T]) IsKnown added in v0.3.0

func (v MapValueOf[T]) IsKnown() bool

IsKnown returns true if the value is known.

func (*MapValueOf[T]) Set added in v0.3.0

func (v *MapValueOf[T]) Set(ctx context.Context, elements map[string]T) diag.Diagnostics

Set sets the value of this value.

func (*MapValueOf[T]) SetNull added in v0.3.0

func (v *MapValueOf[T]) SetNull(ctx context.Context)

SetNull sets the value to null.

func (*MapValueOf[T]) SetUnknown added in v0.3.0

func (v *MapValueOf[T]) SetUnknown(ctx context.Context)

SetUnknown sets the value to unknown.

func (MapValueOf[T]) ToMapValue added in v0.3.0

ToMapValue converts the given value to a MapValue.

func (MapValueOf[T]) Type added in v0.3.0

func (v MapValueOf[T]) Type(ctx context.Context) attr.Type

Type returns the type of this value.

type NestedObjectType added in v0.2.0

type NestedObjectType interface {
	attr.Type

	// NewObjectPtr returns a new, empty value as an object pointer (Go *struct).
	NewObjectPtr(context.Context) (any, diag.Diagnostics)

	// NewObjectSlice returns a new value as an object slice (Go []*struct).
	NewObjectSlice(context.Context, int, int) (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)

	// ValueFromObjectSlice returns a Value given an object pointer (Go []*struct).
	ValueFromObjectSlice(context.Context, any) (attr.Value, diag.Diagnostics)
}

NestedObjectType extends the Type interface for types that represent nested Objects.

type NestedObjectValue added in v0.2.0

type NestedObjectValue interface {
	attr.Value
}

NestedObjectValue extends the Value interface for values that represent nested Objects.

type NumberType

type NumberType struct {
	basetypes.NumberType
}

func (NumberType) Equal

func (t NumberType) Equal(o attr.Type) bool

func (NumberType) String

func (t NumberType) String() string

func (NumberType) ValueFromTerraform

func (t NumberType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (NumberType) ValueType

func (t NumberType) ValueType(ctx context.Context) attr.Value

type NumberValue

type NumberValue struct {
	basetypes.NumberValue
}

func NewNumberNull added in v0.0.3

func NewNumberNull() NumberValue

func NewNumberUnknown added in v0.0.3

func NewNumberUnknown() NumberValue

func NewNumberValue added in v0.0.3

func NewNumberValue(s *big.Float) NumberValue

func (NumberValue) Equal

func (v NumberValue) Equal(o attr.Value) bool

func (*NumberValue) Get

func (v *NumberValue) Get() *big.Float

Get returns the known Number value. If Number is null or unknown, returns 0.0.

func (NumberValue) IsKnown

func (v NumberValue) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*NumberValue) Set

func (v *NumberValue) Set(s *big.Float)

Set sets the Number value.

func (*NumberValue) SetNull

func (v *NumberValue) SetNull()

SetNull sets the Number value to null.

func (*NumberValue) SetUnknown

func (v *NumberValue) SetUnknown()

SetUnknown sets the Number value to unknown.

func (NumberValue) Type

func (v NumberValue) Type(ctx context.Context) attr.Type

type ObjectType

type ObjectType struct {
	basetypes.ObjectType
}

func (ObjectType) Equal

func (t ObjectType) Equal(o attr.Type) bool

func (ObjectType) String

func (t ObjectType) String() string

func (ObjectType) ValueFromTerraform

func (t ObjectType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ObjectType) ValueType

func (t ObjectType) ValueType(_ context.Context) attr.Value

type ObjectTypeOf added in v0.2.0

type ObjectTypeOf[T any] struct {
	basetypes.ObjectType
}

ObjectTypeOf is the attribute type of an ObjectValueOf.

func NewObjectTypeOf added in v0.2.0

func NewObjectTypeOf[T any](ctx context.Context) ObjectTypeOf[T]

func (ObjectTypeOf[T]) Equal added in v0.2.0

func (t ObjectTypeOf[T]) Equal(o attr.Type) bool

func (ObjectTypeOf[T]) String added in v0.2.0

func (t ObjectTypeOf[T]) String() string

func (ObjectTypeOf[T]) ValueFromObject added in v0.2.0

func (ObjectTypeOf[T]) ValueFromTerraform added in v0.2.0

func (t ObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ObjectTypeOf[T]) ValueType added in v0.2.0

func (t ObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type ObjectValue

type ObjectValue struct {
	basetypes.ObjectValue
}

func NewObjectNull added in v0.0.5

func NewObjectNull(attributeTypes map[string]attr.Type) ObjectValue

func NewObjectUnknown added in v0.0.5

func NewObjectUnknown(attributeTypes map[string]attr.Type) ObjectValue

func (ObjectValue) Equal

func (v ObjectValue) Equal(o attr.Value) bool

func (*ObjectValue) Get

func (v *ObjectValue) Get(ctx context.Context, target interface{}, opts basetypes.ObjectAsOptions) diag.Diagnostics

func (ObjectValue) IsKnown

func (v ObjectValue) IsKnown() bool

func (*ObjectValue) Set

func (v *ObjectValue) Set(ctx context.Context, structure any) diag.Diagnostics

func (*ObjectValue) SetNull

func (v *ObjectValue) SetNull(ctx context.Context)

func (*ObjectValue) SetUnknown

func (v *ObjectValue) SetUnknown(ctx context.Context)

func (ObjectValue) Type

func (v ObjectValue) Type(_ context.Context) attr.Type

type ObjectValueOf added in v0.2.0

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 added in v0.2.0

func NewObjectValueOf[T any](ctx context.Context, t *T) ObjectValueOf[T]

func NewObjectValueOfNull added in v0.2.0

func NewObjectValueOfNull[T any](ctx context.Context) ObjectValueOf[T]

func NewObjectValueOfUnknown added in v0.2.0

func NewObjectValueOfUnknown[T any](ctx context.Context) ObjectValueOf[T]

func (ObjectValueOf[T]) Equal added in v0.2.0

func (v ObjectValueOf[T]) Equal(o attr.Value) bool

func (ObjectValueOf[T]) Get added in v0.2.0

func (v ObjectValueOf[T]) Get(ctx context.Context) (*T, diag.Diagnostics)

func (ObjectValueOf[T]) IsKnown added in v0.2.0

func (v ObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*ObjectValueOf[T]) Set added in v0.2.0

func (v *ObjectValueOf[T]) Set(ctx context.Context, t *T) (diags diag.Diagnostics)

func (*ObjectValueOf[T]) SetNull added in v0.2.0

func (v *ObjectValueOf[T]) SetNull(ctx context.Context)

func (*ObjectValueOf[T]) SetUnknown added in v0.2.0

func (v *ObjectValueOf[T]) SetUnknown(ctx context.Context)

func (ObjectValueOf[T]) Type added in v0.2.0

func (v ObjectValueOf[T]) Type(ctx context.Context) attr.Type

type SetNestedObjectTypeOf added in v0.2.0

type SetNestedObjectTypeOf[T any] struct {
	basetypes.SetType
}

SetNestedObjectTypeOf is the attribute type of a SetNestedObjectValueOf.

func NewSetNestedObjectTypeOf added in v0.2.0

func NewSetNestedObjectTypeOf[T any](ctx context.Context) SetNestedObjectTypeOf[T]

func (SetNestedObjectTypeOf[T]) Equal added in v0.2.0

func (t SetNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (SetNestedObjectTypeOf[T]) NewObjectPtr added in v0.2.0

func (t SetNestedObjectTypeOf[T]) NewObjectPtr(ctx context.Context) (any, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) NewObjectSlice added in v0.2.0

func (t SetNestedObjectTypeOf[T]) NewObjectSlice(ctx context.Context, len, cap int) (any, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) NullValue added in v0.2.0

func (SetNestedObjectTypeOf[T]) String added in v0.2.0

func (t SetNestedObjectTypeOf[T]) String() string

func (SetNestedObjectTypeOf[T]) ValueFromObjectPtr added in v0.2.0

func (t SetNestedObjectTypeOf[T]) ValueFromObjectPtr(ctx context.Context, ptr any) (attr.Value, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) ValueFromObjectSlice added in v0.2.0

func (t SetNestedObjectTypeOf[T]) ValueFromObjectSlice(ctx context.Context, slice any) (attr.Value, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) ValueFromSet added in v0.2.0

func (SetNestedObjectTypeOf[T]) ValueFromTerraform added in v0.2.0

func (t SetNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (SetNestedObjectTypeOf[T]) ValueType added in v0.2.0

func (t SetNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type SetNestedObjectValueOf added in v0.2.0

type SetNestedObjectValueOf[T any] struct {
	basetypes.SetValue
}

SetNestedObjectValueOf represents a Terraform Plugin Framework Set value whose elements are of type ObjectTypeOf.

func NewSetNestedObjectValueOfNull added in v0.2.0

func NewSetNestedObjectValueOfNull[T any](ctx context.Context) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfPtr added in v0.2.0

func NewSetNestedObjectValueOfPtr[T any](ctx context.Context, t *T) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfSlice added in v0.2.0

func NewSetNestedObjectValueOfSlice[T any](ctx context.Context, ts []*T) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfUnknown added in v0.2.0

func NewSetNestedObjectValueOfUnknown[T any](ctx context.Context) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfValueSlice added in v0.2.0

func NewSetNestedObjectValueOfValueSlice[T any](ctx context.Context, ts []T) SetNestedObjectValueOf[T]

func (SetNestedObjectValueOf[T]) Equal added in v0.2.0

func (v SetNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (SetNestedObjectValueOf[T]) Get added in v0.2.0

func (v SetNestedObjectValueOf[T]) Get(ctx context.Context) ([]*T, diag.Diagnostics)

Get returns a slice of pointers to the elements of a SetNestedObject.

func (SetNestedObjectValueOf[T]) IsKnown added in v0.2.0

func (v SetNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*SetNestedObjectValueOf[T]) Set added in v0.2.0

func (v *SetNestedObjectValueOf[T]) Set(ctx context.Context, slice []*T) diag.Diagnostics

Set returns a SetNestedObjectValueOf from a slice of pointers to the elements of a SetNestedObject.

func (*SetNestedObjectValueOf[T]) SetNull added in v0.2.0

func (v *SetNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*SetNestedObjectValueOf[T]) SetUnknown added in v0.2.0

func (v *SetNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (SetNestedObjectValueOf[T]) Type added in v0.2.0

type SetNestedType

type SetNestedType struct {
	basetypes.SetType
}

SetNestedType is the attribute type of a SetNestedValue.

func (SetNestedType) ElementType

func (t SetNestedType) ElementType() attr.Type

func (SetNestedType) Equal added in v0.2.0

func (t SetNestedType) Equal(o attr.Type) bool

func (SetNestedType) String

func (t SetNestedType) String() string

String returns a string representation of the type.

func (SetNestedType) TerraformType

func (t SetNestedType) TerraformType(ctx context.Context) tftypes.Type

TerraformType returns the tftypes.Type that should be used to represent this type. This constrains what user input will be accepted and what kind of data can be set in state. The framework will use this to translate the AttributeType to something Terraform can understand.

func (SetNestedType) ValueFromSet

func (SetNestedType) ValueFromTerraform

func (t SetNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type SetNestedValue

type SetNestedValue struct {
	basetypes.SetValue
}

func NewSetNestedNull added in v0.0.5

func NewSetNestedNull(elementType attr.Type) SetNestedValue

func NewSetNestedUnknown added in v0.0.5

func NewSetNestedUnknown(elementType attr.Type) SetNestedValue

func (*SetNestedValue) Get

func (v *SetNestedValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (SetNestedValue) IsKnown

func (v SetNestedValue) IsKnown() bool

func (*SetNestedValue) Set

func (v *SetNestedValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*SetNestedValue) SetNull

func (v *SetNestedValue) SetNull(ctx context.Context)

func (*SetNestedValue) SetUnknown

func (v *SetNestedValue) SetUnknown(ctx context.Context)

func (SetNestedValue) ToSetValue

func (SetNestedValue) Type

func (v SetNestedValue) Type(ctx context.Context) attr.Type

type SetType

type SetType struct {
	basetypes.SetType
}

func (SetType) ElementType

func (t SetType) ElementType() attr.Type

func (SetType) Equal

func (t SetType) Equal(o attr.Type) bool

func (SetType) String

func (t SetType) String() string

func (SetType) TerraformType

func (t SetType) TerraformType(ctx context.Context) tftypes.Type

func (SetType) ValueFromSet

func (SetType) ValueFromTerraform

func (t SetType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (SetType) ValueType

func (t SetType) ValueType(ctx context.Context) attr.Value

type SetTypeOf added in v0.3.0

type SetTypeOf[T any] struct {
	basetypes.SetType
}

func NewSetTypeOf added in v0.3.0

func NewSetTypeOf[T any](ctx context.Context) SetTypeOf[T]

func (SetTypeOf[T]) ElementType added in v0.3.0

func (t SetTypeOf[T]) ElementType() attr.Type

ElementType returns the element type of this Set.

func (SetTypeOf[T]) Equal added in v0.3.0

func (t SetTypeOf[T]) Equal(o attr.Type) bool

Equal returns true if the given type is equal to this type.

func (SetTypeOf[T]) String added in v0.3.0

func (t SetTypeOf[T]) String() string

String returns a string representation of the type.

func (SetTypeOf[T]) ValueFromSet added in v0.3.0

ValueFromSet converts a basetypes.SetValue to a SetValueOf.

func (SetTypeOf[T]) ValueFromTerraform added in v0.3.0

func (t SetTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

ValueFromTerraform converts a tftypes.Value to a SetValueOf.

func (SetTypeOf[T]) ValueType added in v0.3.0

func (t SetTypeOf[T]) ValueType(ctx context.Context) attr.Value

ValueType returns the value type of this Set.

type SetValue

type SetValue struct {
	basetypes.SetValue
}

func NewSetNull added in v0.0.3

func NewSetNull(elementType attr.Type) SetValue

func NewSetUnknown added in v0.0.3

func NewSetUnknown(elementType attr.Type) SetValue

func NewSetValue added in v0.0.3

func NewSetValue(elementType attr.Type, elements []attr.Value) (SetValue, diag.Diagnostics)

func NewSetValueFrom added in v0.0.3

func NewSetValueFrom(ctx context.Context, elementType attr.Type, elements any) (SetValue, diag.Diagnostics)

func NewSetValueMust added in v0.0.3

func NewSetValueMust(elementType attr.Type, elements []attr.Value) SetValue

func (SetValue) Equal

func (v SetValue) Equal(o attr.Value) bool

func (*SetValue) Get

func (v *SetValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (SetValue) IsKnown

func (v SetValue) IsKnown() bool

func (*SetValue) Set

func (v *SetValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*SetValue) SetNull

func (v *SetValue) SetNull(ctx context.Context)

func (*SetValue) SetUnknown

func (v *SetValue) SetUnknown(ctx context.Context)

func (SetValue) ToSetValue

func (SetValue) Type

func (v SetValue) Type(ctx context.Context) attr.Type

type SetValueOf added in v0.3.0

type SetValueOf[T any] struct {
	basetypes.SetValue
}

func NewSetValueOfNull added in v0.3.0

func NewSetValueOfNull[T any](ctx context.Context) SetValueOf[T]

NewSetValueOfNull returns a new SetValueOf with a null value.

func NewSetValueOfSlice added in v0.3.0

func NewSetValueOfSlice[T any](ctx context.Context, elements []T) SetValueOf[T]

NewSetValueOfSlice returns a new SetValueOf with the given slice value.

func NewSetValueOfSlicePtr added in v0.3.0

func NewSetValueOfSlicePtr[T any](ctx context.Context, elements []*T) SetValueOf[T]

NewSetValueOfSlicePtr returns a new SetValueOf with the given slice value.

func NewSetValueOfUnknown added in v0.3.0

func NewSetValueOfUnknown[T any](ctx context.Context) SetValueOf[T]

NewSetValueOfUnknown returns a new SetValueOf with an unknown value.

func (SetValueOf[T]) Equal added in v0.3.0

func (v SetValueOf[T]) Equal(o attr.Value) bool

Equal returns true if the given value is equal to this value.

func (SetValueOf[T]) Get added in v0.3.0

func (v SetValueOf[T]) Get(ctx context.Context) (values []T, diags diag.Diagnostics)

Get returns a SetValueOf from the given value.

func (SetValueOf[T]) IsKnown added in v0.3.0

func (v SetValueOf[T]) IsKnown() bool

IsKnown returns true if the value is known.

func (*SetValueOf[T]) Set added in v0.3.0

func (v *SetValueOf[T]) Set(ctx context.Context, elements []T) diag.Diagnostics

Set sets the value of this value.

func (*SetValueOf[T]) SetNull added in v0.3.0

func (v *SetValueOf[T]) SetNull(ctx context.Context)

SetNull sets the value to null.

func (*SetValueOf[T]) SetUnknown added in v0.3.0

func (v *SetValueOf[T]) SetUnknown(ctx context.Context)

SetUnknown sets the value to unknown.

func (SetValueOf[T]) ToSetValue added in v0.3.0

ToSetValue converts the given value to a SetValue.

func (SetValueOf[T]) Type added in v0.3.0

func (v SetValueOf[T]) Type(ctx context.Context) attr.Type

Type returns the type of this value.

type SingleNestedObjectTypeOf added in v0.2.0

type SingleNestedObjectTypeOf[T any] struct {
	basetypes.ObjectType
}

func NewSingleNestedObjectTypeOf added in v0.2.0

func NewSingleNestedObjectTypeOf[T any](ctx context.Context) SingleNestedObjectTypeOf[T]

func (SingleNestedObjectTypeOf[T]) Equal added in v0.2.0

func (t SingleNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (SingleNestedObjectTypeOf[T]) String added in v0.2.0

func (t SingleNestedObjectTypeOf[T]) String() string

func (SingleNestedObjectTypeOf[T]) ValueFromObject added in v0.2.0

func (SingleNestedObjectTypeOf[T]) ValueFromTerraform added in v0.2.0

func (t SingleNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (SingleNestedObjectTypeOf[T]) ValueType added in v0.2.0

func (t SingleNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type SingleNestedObjectValueOf added in v0.2.0

type SingleNestedObjectValueOf[T any] struct {
	basetypes.ObjectValue
}

SingleNestedObjectValueOf represents a Terraform Plugin Framework Single value whose corresponding Go type is the structure T.

func NewSingleNestedObjectValueOf added in v0.2.0

func NewSingleNestedObjectValueOf[T any](ctx context.Context, t *T) SingleNestedObjectValueOf[T]

func NewSingleNestedObjectValueOfNull added in v0.2.0

func NewSingleNestedObjectValueOfNull[T any](ctx context.Context) SingleNestedObjectValueOf[T]

func NewSingleNestedObjectValueOfUnknown added in v0.2.0

func NewSingleNestedObjectValueOfUnknown[T any](ctx context.Context) SingleNestedObjectValueOf[T]

func (SingleNestedObjectValueOf[T]) Equal added in v0.2.0

func (v SingleNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (SingleNestedObjectValueOf[T]) Get added in v0.2.0

func (SingleNestedObjectValueOf[T]) IsKnown added in v0.2.0

func (v SingleNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*SingleNestedObjectValueOf[T]) Set added in v0.2.0

func (v *SingleNestedObjectValueOf[T]) Set(ctx context.Context, t *T) (diags diag.Diagnostics)

func (*SingleNestedObjectValueOf[T]) SetNull added in v0.2.0

func (v *SingleNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*SingleNestedObjectValueOf[T]) SetUnknown added in v0.2.0

func (v *SingleNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (SingleNestedObjectValueOf[T]) Type added in v0.2.0

type SingleNestedType

type SingleNestedType struct {
	basetypes.ObjectType
}

func (SingleNestedType) Equal

func (t SingleNestedType) Equal(o attr.Type) bool

func (SingleNestedType) String

func (t SingleNestedType) String() string

func (SingleNestedType) ValueFromObject

func (SingleNestedType) ValueFromTerraform

func (t SingleNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type SingleNestedValue

type SingleNestedValue struct {
	basetypes.ObjectValue
}

func NewSingleNestedNull added in v0.0.5

func NewSingleNestedNull(attributeTypes map[string]attr.Type) SingleNestedValue

func NewSingleNestedUnknown added in v0.0.5

func NewSingleNestedUnknown(attributeTypes map[string]attr.Type) SingleNestedValue

func (*SingleNestedValue) Get

func (v *SingleNestedValue) Get(ctx context.Context, target interface{}, opts basetypes.ObjectAsOptions) (diag diag.Diagnostics)

func (SingleNestedValue) IsKnown

func (v SingleNestedValue) IsKnown() bool

func (*SingleNestedValue) Set

func (v *SingleNestedValue) Set(ctx context.Context, structure any) diag.Diagnostics

func (*SingleNestedValue) SetNull

func (v *SingleNestedValue) SetNull(ctx context.Context)

func (*SingleNestedValue) SetUnknown

func (v *SingleNestedValue) SetUnknown(ctx context.Context)

func (SingleNestedValue) ToObjectValue

func (SingleNestedValue) Type

type StringType

type StringType struct {
	basetypes.StringType
}

func (StringType) Equal

func (t StringType) Equal(o attr.Type) bool

func (StringType) String

func (t StringType) String() string

func (StringType) ValueFromTerraform

func (t StringType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (StringType) ValueType

func (t StringType) ValueType(ctx context.Context) attr.Value

type StringValue

type StringValue struct {
	basetypes.StringValue
}

func NewStringNull added in v0.0.3

func NewStringNull() StringValue

func NewStringPointerValue added in v0.0.3

func NewStringPointerValue(s *string) StringValue

func NewStringUnknown added in v0.0.3

func NewStringUnknown() StringValue

func NewStringValue added in v0.0.3

func NewStringValue(s string) StringValue

func (StringValue) Equal

func (v StringValue) Equal(o attr.Value) bool

func (*StringValue) Get

func (v *StringValue) Get() string

Get returns the known String value. If String is null or unknown, returns "".

func (*StringValue) GetPtr added in v0.0.3

func (v *StringValue) GetPtr() *string

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (StringValue) IsKnown

func (v StringValue) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*StringValue) Set

func (v *StringValue) Set(s string)

Set sets the String value.

func (*StringValue) SetNull

func (v *StringValue) SetNull()

SetNull sets the String value to null.

func (*StringValue) SetPtr added in v0.1.0

func (v *StringValue) SetPtr(s *string)

SetPtr sets a pointer to the String value.

func (*StringValue) SetUnknown

func (v *StringValue) SetUnknown()

SetUnknown sets the String value to unknown.

func (StringValue) Type

func (v StringValue) Type(ctx context.Context) attr.Type

Jump to

Keyboard shortcuts

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