Help us shape the future of Go! Take the 2026 Go Developer Survey

convert

package
v2.40.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendProtoDiag

func AppendProtoDiag(ctx context.Context, diags []*tfprotov5.Diagnostic, d interface{}) []*tfprotov5.Diagnostic

AppendProtoDiag appends a new diagnostic from a warning string or an error. This panics if d is not a string or error.

func AttributePathToPath

func AttributePathToPath(ap *tftypes.AttributePath) cty.Path

AttributePathToPath takes the proto encoded path and converts it to a cty.Path

func ConfigIdentitySchemaToProto added in v2.37.0

func ConfigIdentitySchemaToProto(ctx context.Context, identitySchema *configschema.Block) []*tfprotov5.ResourceIdentitySchemaAttribute

func ConfigSchemaToProto

func ConfigSchemaToProto(ctx context.Context, b *configschema.Block) *tfprotov5.SchemaBlock

ConfigSchemaToProto takes a *configschema.Block and converts it to a tfprotov5.SchemaBlock for a grpc response.

func DiagsToProto

func DiagsToProto(diags diag.Diagnostics) []*tfprotov5.Diagnostic

func PathToAttributePath

func PathToAttributePath(p cty.Path) *tftypes.AttributePath

PathToAttributePath takes a cty.Path and converts it to a proto-encoded path.

func ProtoToConfigSchema

func ProtoToConfigSchema(ctx context.Context, b *tfprotov5.SchemaBlock) *configschema.Block

ProtoToConfigSchema takes the GetSchema_Block from a grpc response and converts it to a terraform *configschema.Block.

func ProtoToDiags

func ProtoToDiags(ds []*tfprotov5.Diagnostic) diag.Diagnostics

ProtoToDiags converts a list of tfprotov5.Diagnostics to a diag.Diagnostics.

func ToTfValue added in v2.38.0

func ToTfValue(in cty.Value) (*tftypes.Value, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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