Documentation ¶
Overview ¶
Package toproto5 contains functions to convert from framework types to protocol version 5 (tfprotov5) types.
Index ¶
- func ApplyResourceChangeResponse(ctx context.Context, fw *fwserver.ApplyResourceChangeResponse) *tfprotov5.ApplyResourceChangeResponse
- func Block(ctx context.Context, name string, path *tftypes.AttributePath, b tfsdk.Block) (*tfprotov5.SchemaNestedBlock, error)
- func Config(ctx context.Context, fw *tfsdk.Config) (*tfprotov5.DynamicValue, diag.Diagnostics)
- func ConfigureProviderResponse(ctx context.Context, fw *tfsdk.ConfigureProviderResponse) *tfprotov5.ConfigureProviderResponse
- func DiagnosticSeverity(s diag.Severity) tfprotov5.DiagnosticSeverity
- func Diagnostics(ctx context.Context, diagnostics diag.Diagnostics) []*tfprotov5.Diagnostic
- func GetProviderSchemaResponse(ctx context.Context, fw *fwserver.GetProviderSchemaResponse) *tfprotov5.GetProviderSchemaResponse
- func ImportResourceStateResponse(ctx context.Context, fw *fwserver.ImportResourceStateResponse) *tfprotov5.ImportResourceStateResponse
- func ImportedResource(ctx context.Context, fw *fwserver.ImportedResource) (*tfprotov5.ImportedResource, diag.Diagnostics)
- func PlanResourceChangeResponse(ctx context.Context, fw *fwserver.PlanResourceChangeResponse) *tfprotov5.PlanResourceChangeResponse
- func PrepareProviderConfigResponse(ctx context.Context, fw *fwserver.ValidateProviderConfigResponse) *tfprotov5.PrepareProviderConfigResponse
- func ReadDataSourceResponse(ctx context.Context, fw *fwserver.ReadDataSourceResponse) *tfprotov5.ReadDataSourceResponse
- func ReadResourceResponse(ctx context.Context, fw *fwserver.ReadResourceResponse) *tfprotov5.ReadResourceResponse
- func Schema(ctx context.Context, s *tfsdk.Schema) (*tfprotov5.Schema, error)
- func SchemaAttribute(ctx context.Context, name string, path *tftypes.AttributePath, ...) (*tfprotov5.SchemaAttribute, error)
- func ServerCapabilities(ctx context.Context, fw *fwserver.ServerCapabilities) *tfprotov5.ServerCapabilities
- func State(ctx context.Context, fw *tfsdk.State) (*tfprotov5.DynamicValue, diag.Diagnostics)
- func UpgradeResourceStateResponse(ctx context.Context, fw *fwserver.UpgradeResourceStateResponse) *tfprotov5.UpgradeResourceStateResponse
- func ValidateDataSourceConfigResponse(ctx context.Context, fw *fwserver.ValidateDataSourceConfigResponse) *tfprotov5.ValidateDataSourceConfigResponse
- func ValidateResourceTypeConfigResponse(ctx context.Context, fw *fwserver.ValidateResourceConfigResponse) *tfprotov5.ValidateResourceTypeConfigResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyResourceChangeResponse ¶
func ApplyResourceChangeResponse(ctx context.Context, fw *fwserver.ApplyResourceChangeResponse) *tfprotov5.ApplyResourceChangeResponse
ApplyResourceChangeResponse returns the *tfprotov5.ApplyResourceChangeResponse equivalent of a *fwserver.ApplyResourceChangeResponse.
func Block ¶
func Block(ctx context.Context, name string, path *tftypes.AttributePath, b tfsdk.Block) (*tfprotov5.SchemaNestedBlock, error)
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 ¶
func Config(ctx context.Context, fw *tfsdk.Config) (*tfprotov5.DynamicValue, diag.Diagnostics)
Config returns the *tfprotov5.DynamicValue for a *tfsdk.Config.
func ConfigureProviderResponse ¶
func ConfigureProviderResponse(ctx context.Context, fw *tfsdk.ConfigureProviderResponse) *tfprotov5.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 ¶
func GetProviderSchemaResponse(ctx context.Context, fw *fwserver.GetProviderSchemaResponse) *tfprotov5.GetProviderSchemaResponse
GetProviderSchemaResponse returns the *tfprotov5.GetProviderSchemaResponse equivalent of a *fwserver.GetProviderSchemaResponse.
func ImportResourceStateResponse ¶
func ImportResourceStateResponse(ctx context.Context, fw *fwserver.ImportResourceStateResponse) *tfprotov5.ImportResourceStateResponse
ImportResourceStateResponse returns the *tfprotov5.ImportResourceStateResponse equivalent of a *fwserver.ImportResourceStateResponse.
func ImportedResource ¶
func ImportedResource(ctx context.Context, fw *fwserver.ImportedResource) (*tfprotov5.ImportedResource, diag.Diagnostics)
ImportedResource returns the *tfprotov5.ImportedResource equivalent of a *fwserver.ImportedResource.
func PlanResourceChangeResponse ¶
func PlanResourceChangeResponse(ctx context.Context, fw *fwserver.PlanResourceChangeResponse) *tfprotov5.PlanResourceChangeResponse
PlanResourceChangeResponse returns the *tfprotov5.PlanResourceChangeResponse equivalent of a *fwserver.PlanResourceChangeResponse.
func PrepareProviderConfigResponse ¶
func PrepareProviderConfigResponse(ctx context.Context, fw *fwserver.ValidateProviderConfigResponse) *tfprotov5.PrepareProviderConfigResponse
PrepareProviderConfigResponse returns the *tfprotov5.PrepareProviderConfigResponse equivalent of a *fwserver.ValidateProviderConfigResponse.
func ReadDataSourceResponse ¶
func ReadDataSourceResponse(ctx context.Context, fw *fwserver.ReadDataSourceResponse) *tfprotov5.ReadDataSourceResponse
ReadDataSourceResponse returns the *tfprotov5.ReadDataSourceResponse equivalent of a *fwserver.ReadDataSourceResponse.
func ReadResourceResponse ¶
func ReadResourceResponse(ctx context.Context, fw *fwserver.ReadResourceResponse) *tfprotov5.ReadResourceResponse
ReadResourceResponse returns the *tfprotov5.ReadResourceResponse equivalent of a *fwserver.ReadResourceResponse.
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
func ServerCapabilities(ctx context.Context, fw *fwserver.ServerCapabilities) *tfprotov5.ServerCapabilities
ServerCapabilities returns the *tfprotov5.ServerCapabilities for a *fwserver.ServerCapabilities.
func State ¶
func State(ctx context.Context, fw *tfsdk.State) (*tfprotov5.DynamicValue, diag.Diagnostics)
State returns the *tfprotov5.DynamicValue for a *tfsdk.State.
func UpgradeResourceStateResponse ¶
func UpgradeResourceStateResponse(ctx context.Context, fw *fwserver.UpgradeResourceStateResponse) *tfprotov5.UpgradeResourceStateResponse
UpgradeResourceStateResponse returns the *tfprotov5.UpgradeResourceStateResponse equivalent of a *fwserver.UpgradeResourceStateResponse.
func ValidateDataSourceConfigResponse ¶
func ValidateDataSourceConfigResponse(ctx context.Context, fw *fwserver.ValidateDataSourceConfigResponse) *tfprotov5.ValidateDataSourceConfigResponse
ValidateDataSourceConfigResponse returns the *tfprotov5.ValidateDataSourceConfigResponse equivalent of a *fwserver.ValidateDataSourceConfigResponse.
func ValidateResourceTypeConfigResponse ¶
func ValidateResourceTypeConfigResponse(ctx context.Context, fw *fwserver.ValidateResourceConfigResponse) *tfprotov5.ValidateResourceTypeConfigResponse
ValidateResourceTypeConfigResponse returns the *tfprotov5.ValidateResourceTypeConfigResponse equivalent of a *fwserver.ValidateResourceConfigResponse.
Types ¶
This section is empty.
Source Files ¶
- applyresourcechange.go
- block.go
- config.go
- configureprovider.go
- diagnostics.go
- doc.go
- getproviderschema.go
- importedresource.go
- importresourcestate.go
- planresourcechange.go
- prepareproviderconfig.go
- readdatasource.go
- readresource.go
- schema.go
- schema_attribute.go
- server_capabilities.go
- state.go
- upgraderesourcestate.go
- validatedatasourceconfig.go
- validateresourcetypeconfig.go