customfield

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StructToAttributes

func StructToAttributes[T any](ctx context.Context) (map[string]attr.Type, diag.Diagnostics)

Types

type List

type List[T attr.Value] struct {
	basetypes.ListValue
	// contains filtered or unexported fields
}

List represents a basetypes.ListValue that is defined by a struct.

func NewList

func NewList[T attr.Value](ctx context.Context, values any) (List[T], diag.Diagnostics)

func NewListMust

func NewListMust[T attr.Value](ctx context.Context, values []attr.Value) List[T]

func NullList

func NullList[T attr.Value](ctx context.Context) List[T]

func UnknownList

func UnknownList[T attr.Value](ctx context.Context) List[T]

func (List[T]) Equal

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

func (List[T]) KnownValue

func (v List[T]) KnownValue(ctx context.Context, values any) ListLike

func (List[T]) NullValue

func (v List[T]) NullValue(ctx context.Context) ListLike

func (List[T]) Type

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

func (List[T]) UnknownValue

func (v List[T]) UnknownValue(ctx context.Context) ListLike

func (List[T]) Value

func (v List[T]) Value(ctx context.Context) ([]T, diag.Diagnostics)

func (List[T]) ValueAttr

func (v List[T]) ValueAttr(ctx context.Context) (any, diag.Diagnostics)

type ListLike

type ListLike interface {
	ValueAttr(ctx context.Context) (any, diag.Diagnostics)
	NullValue(ctx context.Context) ListLike
	UnknownValue(ctx context.Context) ListLike
	KnownValue(ctx context.Context, T any) ListLike
}

type ListType

type ListType[T attr.Value] struct {
	basetypes.ListType
}

ListType represents a basetypes.ListType that declares the type of the element statically.

func NewListType

func NewListType[T attr.Value](ctx context.Context) ListType[T]

func (ListType[T]) Equal

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

func (ListType[T]) NullValue

func (t ListType[T]) NullValue(ctx context.Context) (attr.Value, diag.Diagnostics)

func (ListType[T]) String

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

func (ListType[T]) ValueFromList

func (ListType[T]) ValueFromTerraform

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

func (ListType[T]) ValueType

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

type Map

type Map[T attr.Value] struct {
	basetypes.MapValue
	// contains filtered or unexported fields
}

Map represents a basetypes.MapValue that is defined by a struct.

func NewMap

func NewMap[T attr.Value](ctx context.Context, values any) (Map[T], diag.Diagnostics)

func NewMapMust

func NewMapMust[T attr.Value](ctx context.Context, values map[string]attr.Value) Map[T]

func NullMap

func NullMap[T attr.Value](ctx context.Context) Map[T]

func UnknownMap

func UnknownMap[T attr.Value](ctx context.Context) Map[T]

func (Map[T]) Equal

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

func (Map[T]) KnownValue

func (v Map[T]) KnownValue(ctx context.Context, values any) MapLike

func (Map[T]) NullValue

func (v Map[T]) NullValue(ctx context.Context) MapLike

func (Map[T]) Type

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

func (Map[T]) UnknownValue

func (v Map[T]) UnknownValue(ctx context.Context) MapLike

func (Map[T]) Value

func (v Map[T]) Value(ctx context.Context) (map[string]T, diag.Diagnostics)

func (Map[T]) ValueAttr

func (v Map[T]) ValueAttr(ctx context.Context) (any, diag.Diagnostics)

type MapLike

type MapLike interface {
	ValueAttr(ctx context.Context) (any, diag.Diagnostics)
	NullValue(ctx context.Context) MapLike
	UnknownValue(ctx context.Context) MapLike
	KnownValue(ctx context.Context, T any) MapLike
}

type MapType

type MapType[T attr.Value] struct {
	basetypes.MapType
}

MapType represents a basetypes.MapType that declares the type of the element statically.

func NewMapType

func NewMapType[T attr.Value](ctx context.Context) MapType[T]

func (MapType[T]) Equal

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

func (MapType[T]) NullValue

func (t MapType[T]) NullValue(ctx context.Context) (attr.Value, diag.Diagnostics)

func (MapType[T]) String

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

func (MapType[T]) ValueFromMap

func (MapType[T]) ValueFromTerraform

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

func (MapType[T]) ValueType

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

type NestedObject

type NestedObject[T any] struct {
	basetypes.ObjectValue
	// contains filtered or unexported fields
}

NestedObject represents a basetypes.ObjectValue that is defined by a struct.

func NewObject

func NewObject[T any](ctx context.Context, t *T) (NestedObject[T], diag.Diagnostics)

func NewObjectMust

func NewObjectMust[T any](ctx context.Context, t *T) NestedObject[T]

func NullObject

func NullObject[T any](ctx context.Context) NestedObject[T]

func UnknownObject

func UnknownObject[T any](ctx context.Context) NestedObject[T]

func (NestedObject[T]) Equal

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

func (NestedObject[T]) KnownValue

func (v NestedObject[T]) KnownValue(ctx context.Context, t any) NestedObjectLike

func (NestedObject[T]) NullValue

func (v NestedObject[T]) NullValue(ctx context.Context) NestedObjectLike

func (NestedObject[T]) Type

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

func (NestedObject[T]) UnknownValue

func (v NestedObject[T]) UnknownValue(ctx context.Context) NestedObjectLike

func (NestedObject[T]) Value

func (v NestedObject[T]) Value(ctx context.Context) (*T, diag.Diagnostics)

func (NestedObject[T]) ValueAny

func (v NestedObject[T]) ValueAny(ctx context.Context) (any, diag.Diagnostics)

type NestedObjectLike

type NestedObjectLike interface {
	basetypes.ObjectValuable
	ValueAny(ctx context.Context) (any, diag.Diagnostics)
	NullValue(ctx context.Context) NestedObjectLike
	UnknownValue(ctx context.Context) NestedObjectLike
	KnownValue(ctx context.Context, t any) NestedObjectLike
}

type NestedObjectList

type NestedObjectList[T any] struct {
	basetypes.ListValue
	// contains filtered or unexported fields
}

NestedObjectList represents a basetypes.ListValue that is defined by a struct.

func NewObjectList

func NewObjectList[T any](ctx context.Context, values []T) (NestedObjectList[T], diag.Diagnostics)

func NewObjectListFromAttributes

func NewObjectListFromAttributes[T any](ctx context.Context, values []attr.Value) (NestedObjectList[T], diag.Diagnostics)

func NewObjectListMust

func NewObjectListMust[T any](ctx context.Context, values []T) NestedObjectList[T]

func NullObjectList

func NullObjectList[T any](ctx context.Context) NestedObjectList[T]

func UnknownObjectList

func UnknownObjectList[T any](ctx context.Context) NestedObjectList[T]

func (NestedObjectList[T]) AsStructSlice

func (v NestedObjectList[T]) AsStructSlice(ctx context.Context) (any, diag.Diagnostics)

func (NestedObjectList[T]) AsStructSliceT

func (v NestedObjectList[T]) AsStructSliceT(ctx context.Context) ([]T, diag.Diagnostics)

func (NestedObjectList[T]) Equal

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

func (NestedObjectList[T]) KnownValue

func (v NestedObjectList[T]) KnownValue(ctx context.Context, anyValues any) NestedObjectListLike

func (NestedObjectList[T]) NullValue

func (NestedObjectList[T]) Type

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

func (NestedObjectList[T]) UnknownValue

func (v NestedObjectList[T]) UnknownValue(ctx context.Context) NestedObjectListLike

func (NestedObjectList[T]) Value

func (v NestedObjectList[T]) Value(ctx context.Context) ([]attr.Value, diag.Diagnostics)

type NestedObjectListLike

type NestedObjectListLike interface {
	AsStructSlice(ctx context.Context) (any, diag.Diagnostics)
	NullValue(ctx context.Context) NestedObjectListLike
	UnknownValue(ctx context.Context) NestedObjectListLike
	KnownValue(ctx context.Context, T any) NestedObjectListLike
}

type NestedObjectListType

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

NestedObjectListType represents a basetypes.ListType that declares the type of the nested data statically.

func NewNestedObjectListType

func NewNestedObjectListType[T any](ctx context.Context) NestedObjectListType[T]

func (NestedObjectListType[T]) Equal

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

func (NestedObjectListType[T]) NullValue

func (NestedObjectListType[T]) String

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

func (NestedObjectListType[T]) ValueFromList

func (NestedObjectListType[T]) ValueFromTerraform

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

func (NestedObjectListType[T]) ValueType

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

type NestedObjectMap

type NestedObjectMap[T any] struct {
	basetypes.MapValue
	// contains filtered or unexported fields
}

NestedObjectMap represents a basetypes.MapValue that is defined by a struct.

func NewObjectMap

func NewObjectMap[T any](ctx context.Context, values map[string]T) (NestedObjectMap[T], diag.Diagnostics)

func NewObjectMapFromAttributes

func NewObjectMapFromAttributes[T any](ctx context.Context, values map[string]attr.Value) (NestedObjectMap[T], diag.Diagnostics)

func NewObjectMapMust

func NewObjectMapMust[T any](ctx context.Context, values map[string]T) NestedObjectMap[T]

func NullObjectMap

func NullObjectMap[T any](ctx context.Context) NestedObjectMap[T]

func UnknownObjectMap

func UnknownObjectMap[T any](ctx context.Context) NestedObjectMap[T]

func (NestedObjectMap[T]) AsStructMap

func (v NestedObjectMap[T]) AsStructMap(ctx context.Context) (any, diag.Diagnostics)

func (NestedObjectMap[T]) AsStructMapT

func (v NestedObjectMap[T]) AsStructMapT(ctx context.Context) (map[string]T, diag.Diagnostics)

func (NestedObjectMap[T]) Equal

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

func (NestedObjectMap[T]) KnownValue

func (v NestedObjectMap[T]) KnownValue(ctx context.Context, anyValues any) NestedObjectMapLike

func (NestedObjectMap[T]) NullValue

func (v NestedObjectMap[T]) NullValue(ctx context.Context) NestedObjectMapLike

func (NestedObjectMap[T]) Type

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

func (NestedObjectMap[T]) UnknownValue

func (v NestedObjectMap[T]) UnknownValue(ctx context.Context) NestedObjectMapLike

func (NestedObjectMap[T]) Value

type NestedObjectMapLike

type NestedObjectMapLike interface {
	AsStructMap(ctx context.Context) (any, diag.Diagnostics)
	NullValue(ctx context.Context) NestedObjectMapLike
	UnknownValue(ctx context.Context) NestedObjectMapLike
	KnownValue(ctx context.Context, T any) NestedObjectMapLike
}

type NestedObjectMapType

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

NestedObjectMapType represents a basetypes.MapType that declares the type of the nested data statically.

func NewNestedObjectMapType

func NewNestedObjectMapType[T any](ctx context.Context) NestedObjectMapType[T]

func (NestedObjectMapType[T]) Equal

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

func (NestedObjectMapType[T]) NullValue

func (t NestedObjectMapType[T]) NullValue(ctx context.Context) (attr.Value, diag.Diagnostics)

func (NestedObjectMapType[T]) String

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

func (NestedObjectMapType[T]) ValueFromMap

func (NestedObjectMapType[T]) ValueFromTerraform

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

func (NestedObjectMapType[T]) ValueType

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

type NestedObjectSet

type NestedObjectSet[T any] struct {
	basetypes.SetValue
	// contains filtered or unexported fields
}

NestedObjectSet represents a basetypes.SetValue that is defined by a struct.

func NewObjectSet

func NewObjectSet[T any](ctx context.Context, values []T) (NestedObjectSet[T], diag.Diagnostics)

func NewObjectSetFromAttributes

func NewObjectSetFromAttributes[T any](ctx context.Context, values []attr.Value) (NestedObjectSet[T], diag.Diagnostics)

func NewObjectSetMust

func NewObjectSetMust[T any](ctx context.Context, values []T) NestedObjectSet[T]

func NullObjectSet

func NullObjectSet[T any](ctx context.Context) NestedObjectSet[T]

func UnknownObjectSet

func UnknownObjectSet[T any](ctx context.Context) NestedObjectSet[T]

func (NestedObjectSet[T]) AsStructSlice

func (v NestedObjectSet[T]) AsStructSlice(ctx context.Context) (any, diag.Diagnostics)

func (NestedObjectSet[T]) AsStructSliceT

func (v NestedObjectSet[T]) AsStructSliceT(ctx context.Context) ([]T, diag.Diagnostics)

func (NestedObjectSet[T]) Equal

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

func (NestedObjectSet[T]) KnownValue

func (v NestedObjectSet[T]) KnownValue(ctx context.Context, anyValues any) NestedObjectListLike

func (NestedObjectSet[T]) NullValue

func (NestedObjectSet[T]) Type

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

func (NestedObjectSet[T]) UnknownValue

func (v NestedObjectSet[T]) UnknownValue(ctx context.Context) NestedObjectListLike

func (NestedObjectSet[T]) Value

func (v NestedObjectSet[T]) Value(ctx context.Context) ([]attr.Value, diag.Diagnostics)

type NestedObjectSetType

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

NestedObjectSetType represents a basetypes.SetType that declares the type of the nested data statically.

func NewNestedObjectSetType

func NewNestedObjectSetType[T any](ctx context.Context) NestedObjectSetType[T]

func (NestedObjectSetType[T]) Equal

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

func (NestedObjectSetType[T]) NullValue

func (t NestedObjectSetType[T]) NullValue(ctx context.Context) (attr.Value, diag.Diagnostics)

func (NestedObjectSetType[T]) String

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

func (NestedObjectSetType[T]) ValueFromSet

func (NestedObjectSetType[T]) ValueFromTerraform

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

func (NestedObjectSetType[T]) ValueType

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

type NestedObjectType

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

NestedObjectType represents a basetypes.ObjectType that is defined by a struct.

func NewNestedObjectType

func NewNestedObjectType[T any](ctx context.Context) NestedObjectType[T]

func (NestedObjectType[T]) Equal

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

func (NestedObjectType[T]) NullValue

func (t NestedObjectType[T]) NullValue(ctx context.Context) (attr.Value, diag.Diagnostics)

func (NestedObjectType[T]) String

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

func (NestedObjectType[T]) ValueFromObject

func (NestedObjectType[T]) ValueFromTerraform

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

func (NestedObjectType[T]) ValueType

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

type Set

type Set[T attr.Value] struct {
	basetypes.SetValue
	// contains filtered or unexported fields
}

Set represents a basetypes.SetValue that is defined by a struct.

func NewSet

func NewSet[T attr.Value](ctx context.Context, values any) (Set[T], diag.Diagnostics)

func NewSetMust

func NewSetMust[T attr.Value](ctx context.Context, values []attr.Value) Set[T]

func NullSet

func NullSet[T attr.Value](ctx context.Context) Set[T]

func UnknownSet

func UnknownSet[T attr.Value](ctx context.Context) Set[T]

func (Set[T]) Equal

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

func (Set[T]) KnownValue

func (v Set[T]) KnownValue(ctx context.Context, values any) ListLike

func (Set[T]) NullValue

func (v Set[T]) NullValue(ctx context.Context) ListLike

func (Set[T]) Type

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

func (Set[T]) UnknownValue

func (v Set[T]) UnknownValue(ctx context.Context) ListLike

func (Set[T]) Value

func (v Set[T]) Value(ctx context.Context) ([]T, diag.Diagnostics)

func (Set[T]) ValueAttr

func (v Set[T]) ValueAttr(ctx context.Context) (any, diag.Diagnostics)

type SetType

type SetType[T attr.Value] struct {
	basetypes.SetType
}

SetType represents a basetypes.SetType that declares the type of the element statically.

func NewSetType

func NewSetType[T attr.Value](ctx context.Context) SetType[T]

func (SetType[T]) Equal

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

func (SetType[T]) NullValue

func (t SetType[T]) NullValue(ctx context.Context) (attr.Value, diag.Diagnostics)

func (SetType[T]) String

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

func (SetType[T]) ValueFromSet

func (SetType[T]) ValueFromTerraform

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

func (SetType[T]) ValueType

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

Jump to

Keyboard shortcuts

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