convert

package
v2.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendProtoDiag

func AppendProtoDiag(diags []*proto.Diagnostic, d interface{}) []*proto.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 *proto.AttributePath) cty.Path

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

func ConfigSchemaToProto

func ConfigSchemaToProto(b *configschema.Block) *proto.Schema_Block

ConfigSchemaToProto takes a *configschema.Block and converts it to a proto.Schema_Block for a grpc response.

func DiagsToProto

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

func PathToAttributePath

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

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

func ProtoToConfigSchema

func ProtoToConfigSchema(b *proto.Schema_Block) *configschema.Block

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

func ProtoToDiags

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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