toproto5

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MPL-2.0 Imports: 8 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 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 Config

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

func ConfigureProviderResponse

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

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 GetProviderSchemaResponse

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

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 PlanResourceChangeResponse

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

func PrepareProviderConfigResponse

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

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 Schema

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

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

func SchemaAttribute

func SchemaAttribute(ctx context.Context, name string, path *tftypes.AttributePath, a tfsdk.Attribute) (*tfprotov5.SchemaAttribute, error)

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 UpgradeResourceStateResponse

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

func ValidateDataSourceConfigResponse

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

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