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

toproto5

package
v1.19.0 Latest Latest
Warning

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

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

Documentation

Overview

Package toproto5 contains functions to convert from framework types to protocol version 5 (tfprotov5) types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionDeferred added in v1.16.0

func ActionDeferred(fw *action.Deferred) *tfprotov5.Deferred

func ActionMetadata added in v1.16.0

ActionMetadata returns the tfprotov5.ActionMetadata for a fwserver.ActionMetadata.

func ActionSchema added in v1.16.0

ActionSchema returns the *tfprotov5.ActionSchema equivalent of a ActionSchema.

func ApplyResourceChangeResponse

ApplyResourceChangeResponse returns the *tfprotov5.ApplyResourceChangeResponse equivalent of a *fwserver.ApplyResourceChangeResponse.

func Block

Block returns the *tfprotov5.SchemaNestedBlock equivalent of a Block. Errors will be tftypes.AttributePathErrors based on `path`. `name` is the name of the attribute.

func CallFunctionResponse added in v1.5.0

CallFunctionResponse returns the *tfprotov5.CallFunctionResponse equivalent of a *fwserver.CallFunctionResponse.

func CloseEphemeralResourceResponse added in v1.13.0

CloseEphemeralResourceResponse returns the *tfprotov5.CloseEphemeralResourceResponse equivalent of a *fwserver.CloseEphemeralResourceResponse.

func CompletedInvokeActionEventType added in v1.16.0

func CompletedInvokeActionEventType(ctx context.Context, event *fwserver.InvokeActionResponse) tfprotov5.InvokeActionEvent

func Config

Config returns the *tfprotov5.DynamicValue for a *tfsdk.Config.

func ConfigureProviderResponse

func ConfigureProviderResponse(ctx context.Context, fw *provider.ConfigureResponse) *tfprotov5.ConfigureProviderResponse

ConfigureProviderResponse returns the *tfprotov5.ConfigureProviderResponse equivalent of a *fwserver.ConfigureProviderResponse.

func DataSourceDeferred added in v1.9.0

func DataSourceDeferred(fw *datasource.Deferred) *tfprotov5.Deferred

func DataSourceMetadata added in v1.4.0

DataSourceMetadata returns the tfprotov5.DataSourceMetadata for a fwserver.DataSourceMetadata.

func DiagnosticSeverity

func DiagnosticSeverity(s diag.Severity) tfprotov5.DiagnosticSeverity

DiagnosticSeverity converts diag.Severity into tfprotov5.DiagnosticSeverity.

func Diagnostics

func Diagnostics(ctx context.Context, diagnostics diag.Diagnostics) []*tfprotov5.Diagnostic

Diagnostics converts the diagnostics into the tfprotov5 collection type.

func DynamicValue added in v1.1.0

DynamicValue returns the *tfprotov5.DynamicValue for a given fwschemadata.Data.

If necessary, the underlying data is modified to convert list and set block values from a null collection to an empty collection. This is to prevent developers from needing to understand Terraform's differences between block and attribute values where blocks are technically never null, but from a developer perspective this distinction introduces unnecessary complexity.

func EphemeralResourceDeferred added in v1.13.0

func EphemeralResourceDeferred(fw *ephemeral.Deferred) *tfprotov5.Deferred

func EphemeralResourceMetadata added in v1.13.0

EphemeralResourceMetadata returns the tfprotov5.EphemeralResourceMetadata for a fwserver.EphemeralResourceMetadata.

func EphemeralResultData added in v1.13.0

EphemeralResultData returns the *tfprotov5.DynamicValue for a *tfsdk.EphemeralResultData.

func Function added in v1.5.0

Function returns the *tfprotov5.Function for a function.Definition.

func FunctionError added in v1.6.0

func FunctionError(ctx context.Context, funcErr *function.FuncError) *tfprotov5.FunctionError

FunctionError converts the function error into the tfprotov5 function error.

func FunctionMetadata added in v1.5.0

FunctionMetadata returns the tfprotov5.FunctionMetadata for a fwserver.FunctionMetadata.

func FunctionParameter added in v1.5.0

func FunctionParameter(ctx context.Context, fw function.Parameter) *tfprotov5.FunctionParameter

FunctionParameter returns the *tfprotov5.FunctionParameter for a function.Parameter.

func FunctionResultData added in v1.5.0

func FunctionResultData(ctx context.Context, data function.ResultData) (*tfprotov5.DynamicValue, *function.FuncError)

FunctionResultData returns the *tfprotov5.DynamicValue for a given function.ResultData.

func FunctionReturn added in v1.5.0

func FunctionReturn(ctx context.Context, fw function.Return) *tfprotov5.FunctionReturn

FunctionReturn returns the *tfprotov5.FunctionReturn for a function.Return.

func GenerateResourceConfigResponse added in v1.19.0

GenerateResourceConfigResponse returns the *tfprotov5.GenerateResourceConfigResponse equivalent of a *fwserver.GenerateResourceConfigResponse.

func GetFunctionsResponse added in v1.5.0

GetFunctionsResponse returns the *tfprotov5.GetFunctionsResponse equivalent of a *fwserver.GetFunctionsResponse.

func GetMetadataResponse added in v1.4.0

GetMetadataResponse returns the *tfprotov5.GetMetadataResponse equivalent of a *fwserver.GetMetadataResponse.

func GetProviderSchemaResponse

GetProviderSchemaResponse returns the *tfprotov5.GetProviderSchemaResponse equivalent of a *fwserver.GetProviderSchemaResponse.

func GetResourceIdentitySchemasResponse added in v1.15.0

GetResourceIdentitySchemasResponse returns the *tfprotov5.GetResourceIdentitySchemasResponse equivalent of a *fwserver.GetResourceIdentitySchemasResponse.

func IdentitySchema added in v1.15.0

IdentitySchema returns the *tfprotov5.ResourceIdentitySchema equivalent of a Schema.

func IdentitySchemaAttribute added in v1.15.0

IdentitySchemaAttribute returns the *tfprotov5.ResourceIdentitySchemaAttribute equivalent of an Attribute. Errors will be tftypes.AttributePathErrors based on `path`. `name` is the name of the attribute.

func ImportResourceStateResponse

ImportResourceStateResponse returns the *tfprotov5.ImportResourceStateResponse equivalent of a *fwserver.ImportResourceStateResponse.

func ImportedResource

ImportedResource returns the *tfprotov5.ImportedResource equivalent of a *fwserver.ImportedResource.

func ListResourceMetadata added in v1.16.0

ListResourceMetadata returns the tfprotov5.ListResourceMetadata for a fwserver.ListResourceMetadata.

func ListResourceResult added in v1.16.0

func ListResourceResult(ctx context.Context, result *fwserver.ListResult) tfprotov5.ListResourceResult

func ListResourceResultWithResource added in v1.16.0

func ListResourceResultWithResource(ctx context.Context, result *fwserver.ListResult) tfprotov5.ListResourceResult

func MoveResourceStateResponse added in v1.6.0

MoveResourceStateResponse returns the *tfprotov5.MoveResourceStateResponse equivalent of a *fwserver.MoveResourceStateResponse.

func OpenEphemeralResourceResponse added in v1.13.0

OpenEphemeralResourceResponse returns the *tfprotov5.OpenEphemeralResourceResponse equivalent of a *fwserver.OpenEphemeralResourceResponse.

func PlanActionResponse added in v1.16.0

PlanActionResponse returns the *tfprotov5.PlanActionResponse equivalent of a *fwserver.PlanActionResponse.

func PlanResourceChangeResponse

PlanResourceChangeResponse returns the *tfprotov5.PlanResourceChangeResponse equivalent of a *fwserver.PlanResourceChangeResponse.

func PrepareProviderConfigResponse

PrepareProviderConfigResponse returns the *tfprotov5.PrepareProviderConfigResponse equivalent of a *fwserver.ValidateProviderConfigResponse.

func ProgressInvokeActionEventType added in v1.16.0

func ProgressInvokeActionEventType(ctx context.Context, event fwserver.InvokeProgressEvent) tfprotov5.InvokeActionEvent

func ReadDataSourceResponse

ReadDataSourceResponse returns the *tfprotov5.ReadDataSourceResponse equivalent of a *fwserver.ReadDataSourceResponse.

func ReadResourceResponse

ReadResourceResponse returns the *tfprotov5.ReadResourceResponse equivalent of a *fwserver.ReadResourceResponse.

func RenewEphemeralResourceResponse added in v1.13.0

RenewEphemeralResourceResponse returns the *tfprotov5.RenewEphemeralResourceResponse equivalent of a *fwserver.RenewEphemeralResourceResponse.

func Resource added in v1.16.0

Resource returns the *tfprotov5.DynamicValue for a *tfsdk.Resource.

func ResourceDeferred added in v1.9.0

func ResourceDeferred(fw *resource.Deferred) *tfprotov5.Deferred

func ResourceIdentity added in v1.15.0

ResourceIdentity returns the *tfprotov5.ResourceIdentityData for a *tfsdk.ResourceIdentity.

func ResourceMetadata added in v1.4.0

ResourceMetadata returns the tfprotov5.ResourceMetadata for a fwserver.ResourceMetadata.

func Schema

func Schema(ctx context.Context, s fwschema.Schema) (*tfprotov5.Schema, error)

Schema returns the *tfprotov5.Schema equivalent of a Schema.

func SchemaAttribute

SchemaAttribute returns the *tfprotov5.SchemaAttribute equivalent of an Attribute. Errors will be tftypes.AttributePathErrors based on `path`. `name` is the name of the attribute.

func ServerCapabilities added in v0.10.0

ServerCapabilities returns the *tfprotov5.ServerCapabilities for a *fwserver.ServerCapabilities.

func State

State returns the *tfprotov5.DynamicValue for a *tfsdk.State.

func UpgradeResourceIdentityResponse added in v1.15.0

UpgradeResourceIdentityResponse returns the *tfprotov5.UpgradeResourceIdentityResponse equivalent of a *fwserver.UpgradeResourceIdentityResponse.

func UpgradeResourceStateResponse

UpgradeResourceStateResponse returns the *tfprotov5.UpgradeResourceStateResponse equivalent of a *fwserver.UpgradeResourceStateResponse.

func ValidateActionConfigResponse added in v1.16.0

ValidateActionConfigResponse returns the *tfprotov5.ValidateActionConfigResponse equivalent of a *fwserver.ValidateActionConfigResponse.

func ValidateDataSourceConfigResponse

ValidateDataSourceConfigResponse returns the *tfprotov5.ValidateDataSourceConfigResponse equivalent of a *fwserver.ValidateDataSourceConfigResponse.

func ValidateEphemeralResourceConfigResponse added in v1.13.0

ValidateEphemeralResourceConfigResponse returns the *tfprotov5.ValidateEphemeralResourceConfigResponse equivalent of a *fwserver.ValidateEphemeralResourceConfigResponse.

func ValidateListResourceConfigResponse added in v1.16.0

ValidateListResourceConfigResponse returns the *tfprotov5.ValidateListResourceConfigResponse equivalent of a *fwserver.ValidateListResourceConfigResponse.

func ValidateResourceTypeConfigResponse

ValidateResourceTypeConfigResponse returns the *tfprotov5.ValidateResourceTypeConfigResponse equivalent of a *fwserver.ValidateResourceConfigResponse.

Types

This section is empty.

Jump to

Keyboard shortcuts

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