Documentation
¶
Index ¶
- func BuildValue(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func FromAttributeValue(ctx context.Context, typ attr.Type, val attr.Value, ...) (attr.Value, diag.Diagnostics)
- func FromBigFloat(ctx context.Context, typ attr.Type, val *big.Float, ...) (attr.Value, diag.Diagnostics)
- func FromBigInt(ctx context.Context, typ attr.Type, val *big.Int, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromBool(ctx context.Context, typ attr.Type, val bool, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromFloat(ctx context.Context, typ attr.Type, val float64, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromInt(ctx context.Context, typ attr.Type, val int64, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromMap(ctx context.Context, typ attr.TypeWithElementType, val reflect.Value, ...) (attr.Value, diag.Diagnostics)
- func FromNullable(ctx context.Context, typ attr.Type, val Nullable, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromPointer(ctx context.Context, typ attr.Type, value reflect.Value, ...) (attr.Value, diag.Diagnostics)
- func FromSlice(ctx context.Context, typ attr.Type, val reflect.Value, ...) (attr.Value, diag.Diagnostics)
- func FromString(ctx context.Context, typ attr.Type, val string, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromStruct(ctx context.Context, typ attr.TypeWithAttributeTypes, val reflect.Value, ...) (attr.Value, diag.Diagnostics)
- func FromUint(ctx context.Context, typ attr.Type, val uint64, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
- func FromUnknownable(ctx context.Context, typ attr.Type, val Unknownable, ...) (attr.Value, diag.Diagnostics)
- func FromValue(ctx context.Context, typ attr.Type, val interface{}, ...) (attr.Value, diag.Diagnostics)
- func FromValueCreator(ctx context.Context, typ attr.Type, val tftypes.ValueCreator, ...) (attr.Value, diag.Diagnostics)
- func Into(ctx context.Context, typ attr.Type, val tftypes.Value, target interface{}, ...) diag.Diagnostics
- func Map(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func NewAttributeValue(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func NewNullable(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func NewUnknownable(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func NewValueConverter(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func Number(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func Pointer(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func Primitive(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- func Struct(ctx context.Context, typ attr.Type, object tftypes.Value, target reflect.Value, ...) (reflect.Value, diag.Diagnostics)
- type DiagIntoIncompatibleType
- type DiagNewAttributeValueIntoWrongType
- type Nullable
- type Options
- type Unknownable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildValue ¶
func BuildValue(ctx context.Context, typ attr.Type, val tftypes.Value, target reflect.Value, opts Options, path *tftypes.AttributePath) (reflect.Value, diag.Diagnostics)
BuildValue constructs a reflect.Value of the same type as `target`, populated with the data in `val`. It will defensively instantiate new values to set, making it safe for use with pointer types which may be nil. It tries to give consumers the ability to override its default behaviors wherever possible.
func FromAttributeValue ¶
func FromAttributeValue(ctx context.Context, typ attr.Type, val attr.Value, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
FromAttributeValue creates an attr.Value from an attr.Value. It just returns the attr.Value it is passed, but reserves the right in the future to do some validation on that attr.Value to make sure it matches the type produced by `typ`.
It is meant to be called through FromValue, not directly.
func FromBigFloat ¶
func FromBigFloat(ctx context.Context, typ attr.Type, val *big.Float, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
FromBigFloat creates an attr.Value using `typ` from a *big.Float.
It is meant to be called through FromValue, not directly.
func FromBigInt ¶
func FromBigInt(ctx context.Context, typ attr.Type, val *big.Int, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
FromBigInt creates an attr.Value using `typ` from a *big.Int.
It is meant to be called through FromValue, not directly.
func FromBool ¶
func FromBool(ctx context.Context, typ attr.Type, val bool, path *tftypes.AttributePath) (attr.Value, diag.Diagnostics)
FromBool returns an attr.Value as produced by `typ` from a bool.
It is meant to be called through FromValue, not directly.