Documentation ¶
Overview ¶
Package fromproto6 contains functions to convert from protocol version 6 (tfprotov6) types to framework types.
Index ¶
- func ApplyResourceChangeRequest(ctx context.Context, proto6 *tfprotov6.ApplyResourceChangeRequest, ...) (*fwserver.ApplyResourceChangeRequest, diag.Diagnostics)
- func ArgumentsData(ctx context.Context, arguments []*tfprotov6.DynamicValue, ...) (function.ArgumentsData, *function.FuncError)
- func CallFunctionRequest(ctx context.Context, proto *tfprotov6.CallFunctionRequest, ...) (*fwserver.CallFunctionRequest, *function.FuncError)
- func CloseEphemeralResourceRequest(ctx context.Context, proto6 *tfprotov6.CloseEphemeralResourceRequest, ...) (*fwserver.CloseEphemeralResourceRequest, diag.Diagnostics)
- func Config(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, ...) (*tfsdk.Config, diag.Diagnostics)
- func ConfigureProviderClientCapabilities(in *tfprotov6.ConfigureProviderClientCapabilities) provider.ConfigureProviderClientCapabilities
- func ConfigureProviderRequest(ctx context.Context, proto6 *tfprotov6.ConfigureProviderRequest, ...) (*provider.ConfigureRequest, diag.Diagnostics)
- func DynamicValue(ctx context.Context, proto6 *tfprotov6.DynamicValue, schema fwschema.Schema, ...) (fwschemadata.Data, diag.Diagnostics)
- func EphemeralResultData(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, ...) (*tfsdk.EphemeralResultData, diag.Diagnostics)
- func GetFunctionsRequest(ctx context.Context, proto *tfprotov6.GetFunctionsRequest) *fwserver.GetFunctionsRequest
- func GetMetadataRequest(ctx context.Context, proto6 *tfprotov6.GetMetadataRequest) *fwserver.GetMetadataRequest
- func GetProviderSchemaRequest(ctx context.Context, proto6 *tfprotov6.GetProviderSchemaRequest) *fwserver.GetProviderSchemaRequest
- func ImportResourceStateRequest(ctx context.Context, proto6 *tfprotov6.ImportResourceStateRequest, ...) (*fwserver.ImportResourceStateRequest, diag.Diagnostics)
- func ImportStateClientCapabilities(in *tfprotov6.ImportResourceStateClientCapabilities) resource.ImportStateClientCapabilities
- func ModifyPlanClientCapabilities(in *tfprotov6.PlanResourceChangeClientCapabilities) resource.ModifyPlanClientCapabilities
- func MoveResourceStateRequest(ctx context.Context, proto6 *tfprotov6.MoveResourceStateRequest, ...) (*fwserver.MoveResourceStateRequest, diag.Diagnostics)
- func OpenEphemeralResourceClientCapabilities(in *tfprotov6.OpenEphemeralResourceClientCapabilities) ephemeral.OpenClientCapabilities
- func OpenEphemeralResourceRequest(ctx context.Context, proto6 *tfprotov6.OpenEphemeralResourceRequest, ...) (*fwserver.OpenEphemeralResourceRequest, diag.Diagnostics)
- func Plan(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, ...) (*tfsdk.Plan, diag.Diagnostics)
- func PlanResourceChangeRequest(ctx context.Context, proto6 *tfprotov6.PlanResourceChangeRequest, ...) (*fwserver.PlanResourceChangeRequest, diag.Diagnostics)
- func ProviderMeta(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, ...) (*tfsdk.Config, diag.Diagnostics)
- func ReadDataSourceClientCapabilities(in *tfprotov6.ReadDataSourceClientCapabilities) datasource.ReadClientCapabilities
- func ReadDataSourceRequest(ctx context.Context, proto6 *tfprotov6.ReadDataSourceRequest, ...) (*fwserver.ReadDataSourceRequest, diag.Diagnostics)
- func ReadResourceClientCapabilities(in *tfprotov6.ReadResourceClientCapabilities) resource.ReadClientCapabilities
- func ReadResourceRequest(ctx context.Context, proto6 *tfprotov6.ReadResourceRequest, ...) (*fwserver.ReadResourceRequest, diag.Diagnostics)
- func RenewEphemeralResourceRequest(ctx context.Context, proto6 *tfprotov6.RenewEphemeralResourceRequest, ...) (*fwserver.RenewEphemeralResourceRequest, diag.Diagnostics)
- func State(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, ...) (*tfsdk.State, diag.Diagnostics)
- func UpgradeResourceStateRequest(ctx context.Context, proto6 *tfprotov6.UpgradeResourceStateRequest, ...) (*fwserver.UpgradeResourceStateRequest, diag.Diagnostics)
- func ValidateDataSourceConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateDataResourceConfigRequest, ...) (*fwserver.ValidateDataSourceConfigRequest, diag.Diagnostics)
- func ValidateEphemeralResourceConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateEphemeralResourceConfigRequest, ...) (*fwserver.ValidateEphemeralResourceConfigRequest, diag.Diagnostics)
- func ValidateProviderConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateProviderConfigRequest, ...) (*fwserver.ValidateProviderConfigRequest, diag.Diagnostics)
- func ValidateResourceConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateResourceConfigRequest, ...) (*fwserver.ValidateResourceConfigRequest, diag.Diagnostics)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyResourceChangeRequest ¶ added in v0.9.0
func ApplyResourceChangeRequest(ctx context.Context, proto6 *tfprotov6.ApplyResourceChangeRequest, resource resource.Resource, resourceSchema fwschema.Schema, providerMetaSchema fwschema.Schema) (*fwserver.ApplyResourceChangeRequest, diag.Diagnostics)
ApplyResourceChangeRequest returns the *fwserver.ApplyResourceChangeRequest equivalent of a *tfprotov6.ApplyResourceChangeRequest.
func ArgumentsData ¶ added in v1.5.0
func ArgumentsData(ctx context.Context, arguments []*tfprotov6.DynamicValue, definition function.Definition) (function.ArgumentsData, *function.FuncError)
ArgumentsData returns the ArgumentsData for a given []*tfprotov6.DynamicValue and function.Definition.
func CallFunctionRequest ¶ added in v1.5.0
func CallFunctionRequest(ctx context.Context, proto *tfprotov6.CallFunctionRequest, function function.Function, functionDefinition function.Definition) (*fwserver.CallFunctionRequest, *function.FuncError)
CallFunctionRequest returns the *fwserver.CallFunctionRequest equivalent of a *tfprotov6.CallFunctionRequest.
func CloseEphemeralResourceRequest ¶ added in v1.13.0
func CloseEphemeralResourceRequest(ctx context.Context, proto6 *tfprotov6.CloseEphemeralResourceRequest, ephemeralResource ephemeral.EphemeralResource, ephemeralResourceSchema fwschema.Schema) (*fwserver.CloseEphemeralResourceRequest, diag.Diagnostics)
CloseEphemeralResourceRequest returns the *fwserver.CloseEphemeralResourceRequest equivalent of a *tfprotov6.CloseEphemeralResourceRequest.
func Config ¶ added in v0.9.0
func Config(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, schema fwschema.Schema) (*tfsdk.Config, diag.Diagnostics)
Config returns the *tfsdk.Config for a *tfprotov6.DynamicValue and fwschema.Schema.
func ConfigureProviderClientCapabilities ¶ added in v1.9.0
func ConfigureProviderClientCapabilities(in *tfprotov6.ConfigureProviderClientCapabilities) provider.ConfigureProviderClientCapabilities
func ConfigureProviderRequest ¶ added in v0.9.0
func ConfigureProviderRequest(ctx context.Context, proto6 *tfprotov6.ConfigureProviderRequest, providerSchema fwschema.Schema) (*provider.ConfigureRequest, diag.Diagnostics)
ConfigureProviderRequest returns the *fwserver.ConfigureProviderRequest equivalent of a *tfprotov6.ConfigureProviderRequest.
func DynamicValue ¶ added in v1.1.0
func DynamicValue(ctx context.Context, proto6 *tfprotov6.DynamicValue, schema fwschema.Schema, description fwschemadata.DataDescription) (fwschemadata.Data, diag.Diagnostics)
DynamicValue returns the fwschemadata.Data for a given *tfprotov6.DynamicValue.
If necessary, the underlying data is modified to convert list and set block values from an empty collection to a null 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 EphemeralResultData ¶ added in v1.13.0
func EphemeralResultData(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, schema fwschema.Schema) (*tfsdk.EphemeralResultData, diag.Diagnostics)
EphemeralResultData returns the *tfsdk.EphemeralResultData for a *tfprotov6.DynamicValue and fwschema.Schema.
func GetFunctionsRequest ¶ added in v1.5.0
func GetFunctionsRequest(ctx context.Context, proto *tfprotov6.GetFunctionsRequest) *fwserver.GetFunctionsRequest
GetFunctionsRequest returns the *fwserver.GetFunctionsRequest equivalent of a *tfprotov6.GetFunctionsRequest.
func GetMetadataRequest ¶ added in v1.4.0
func GetMetadataRequest(ctx context.Context, proto6 *tfprotov6.GetMetadataRequest) *fwserver.GetMetadataRequest
GetMetadataRequest returns the *fwserver.GetMetadataRequest equivalent of a *tfprotov6.GetMetadataRequest.
func GetProviderSchemaRequest ¶
func GetProviderSchemaRequest(ctx context.Context, proto6 *tfprotov6.GetProviderSchemaRequest) *fwserver.GetProviderSchemaRequest
GetProviderSchemaRequest returns the *fwserver.GetProviderSchemaRequest equivalent of a *tfprotov6.GetProviderSchemaRequest.
func ImportResourceStateRequest ¶ added in v0.9.0
func ImportResourceStateRequest(ctx context.Context, proto6 *tfprotov6.ImportResourceStateRequest, reqResource resource.Resource, resourceSchema fwschema.Schema) (*fwserver.ImportResourceStateRequest, diag.Diagnostics)
ImportResourceStateRequest returns the *fwserver.ImportResourceStateRequest equivalent of a *tfprotov6.ImportResourceStateRequest.
func ImportStateClientCapabilities ¶ added in v1.9.0
func ImportStateClientCapabilities(in *tfprotov6.ImportResourceStateClientCapabilities) resource.ImportStateClientCapabilities
func ModifyPlanClientCapabilities ¶ added in v1.9.0
func ModifyPlanClientCapabilities(in *tfprotov6.PlanResourceChangeClientCapabilities) resource.ModifyPlanClientCapabilities
func MoveResourceStateRequest ¶ added in v1.6.0
func MoveResourceStateRequest(ctx context.Context, proto6 *tfprotov6.MoveResourceStateRequest, resource resource.Resource, resourceSchema fwschema.Schema) (*fwserver.MoveResourceStateRequest, diag.Diagnostics)
MoveResourceStateRequest returns the *fwserver.MoveResourceStateRequest equivalent of a *tfprotov6.MoveResourceStateRequest.
func OpenEphemeralResourceClientCapabilities ¶ added in v1.13.0
func OpenEphemeralResourceClientCapabilities(in *tfprotov6.OpenEphemeralResourceClientCapabilities) ephemeral.OpenClientCapabilities
func OpenEphemeralResourceRequest ¶ added in v1.13.0
func OpenEphemeralResourceRequest(ctx context.Context, proto6 *tfprotov6.OpenEphemeralResourceRequest, ephemeralResource ephemeral.EphemeralResource, ephemeralResourceSchema fwschema.Schema) (*fwserver.OpenEphemeralResourceRequest, diag.Diagnostics)
OpenEphemeralResourceRequest returns the *fwserver.OpenEphemeralResourceRequest equivalent of a *tfprotov6.OpenEphemeralResourceRequest.
func Plan ¶ added in v0.9.0
func Plan(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, schema fwschema.Schema) (*tfsdk.Plan, diag.Diagnostics)
Plan returns the *tfsdk.Plan for a *tfprotov6.DynamicValue and fwschema.Schema.
func PlanResourceChangeRequest ¶ added in v0.9.0
func PlanResourceChangeRequest(ctx context.Context, proto6 *tfprotov6.PlanResourceChangeRequest, reqResource resource.Resource, resourceSchema fwschema.Schema, providerMetaSchema fwschema.Schema, resourceBehavior resource.ResourceBehavior) (*fwserver.PlanResourceChangeRequest, diag.Diagnostics)
PlanResourceChangeRequest returns the *fwserver.PlanResourceChangeRequest equivalent of a *tfprotov6.PlanResourceChangeRequest.
func ProviderMeta ¶ added in v0.9.0
func ProviderMeta(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, schema fwschema.Schema) (*tfsdk.Config, diag.Diagnostics)
ProviderMeta returns the *tfsdk.Config for a *tfprotov6.DynamicValue and fwschema.Schema. This data handling is different than Config to simplify implementors, in that:
- Missing Schema will return nil, rather than an error
- Missing DynamicValue will return nil typed Value, rather than an error
func ReadDataSourceClientCapabilities ¶ added in v1.9.0
func ReadDataSourceClientCapabilities(in *tfprotov6.ReadDataSourceClientCapabilities) datasource.ReadClientCapabilities
func ReadDataSourceRequest ¶ added in v0.9.0
func ReadDataSourceRequest(ctx context.Context, proto6 *tfprotov6.ReadDataSourceRequest, dataSource datasource.DataSource, dataSourceSchema fwschema.Schema, providerMetaSchema fwschema.Schema) (*fwserver.ReadDataSourceRequest, diag.Diagnostics)
ReadDataSourceRequest returns the *fwserver.ReadDataSourceRequest equivalent of a *tfprotov6.ReadDataSourceRequest.
func ReadResourceClientCapabilities ¶ added in v1.9.0
func ReadResourceClientCapabilities(in *tfprotov6.ReadResourceClientCapabilities) resource.ReadClientCapabilities
func ReadResourceRequest ¶ added in v0.9.0
func ReadResourceRequest(ctx context.Context, proto6 *tfprotov6.ReadResourceRequest, reqResource resource.Resource, resourceSchema fwschema.Schema, providerMetaSchema fwschema.Schema) (*fwserver.ReadResourceRequest, diag.Diagnostics)
ReadResourceRequest returns the *fwserver.ReadResourceRequest equivalent of a *tfprotov6.ReadResourceRequest.
func RenewEphemeralResourceRequest ¶ added in v1.13.0
func RenewEphemeralResourceRequest(ctx context.Context, proto6 *tfprotov6.RenewEphemeralResourceRequest, ephemeralResource ephemeral.EphemeralResource, ephemeralResourceSchema fwschema.Schema) (*fwserver.RenewEphemeralResourceRequest, diag.Diagnostics)
RenewEphemeralResourceRequest returns the *fwserver.RenewEphemeralResourceRequest equivalent of a *tfprotov6.RenewEphemeralResourceRequest.
func State ¶ added in v0.9.0
func State(ctx context.Context, proto6DynamicValue *tfprotov6.DynamicValue, schema fwschema.Schema) (*tfsdk.State, diag.Diagnostics)
State returns the *tfsdk.State for a *tfprotov6.DynamicValue and fwschema.Schema.
func UpgradeResourceStateRequest ¶ added in v0.9.0
func UpgradeResourceStateRequest(ctx context.Context, proto6 *tfprotov6.UpgradeResourceStateRequest, resource resource.Resource, resourceSchema fwschema.Schema) (*fwserver.UpgradeResourceStateRequest, diag.Diagnostics)
UpgradeResourceStateRequest returns the *fwserver.UpgradeResourceStateRequest equivalent of a *tfprotov6.UpgradeResourceStateRequest.
func ValidateDataSourceConfigRequest ¶ added in v0.9.0
func ValidateDataSourceConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateDataResourceConfigRequest, dataSource datasource.DataSource, dataSourceSchema fwschema.Schema) (*fwserver.ValidateDataSourceConfigRequest, diag.Diagnostics)
ValidateDataSourceConfigRequest returns the *fwserver.ValidateDataSourceConfigRequest equivalent of a *tfprotov6.ValidateDataSourceConfigRequest.
func ValidateEphemeralResourceConfigRequest ¶ added in v1.13.0
func ValidateEphemeralResourceConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateEphemeralResourceConfigRequest, ephemeralResource ephemeral.EphemeralResource, ephemeralResourceSchema fwschema.Schema) (*fwserver.ValidateEphemeralResourceConfigRequest, diag.Diagnostics)
ValidateEphemeralResourceConfigRequest returns the *fwserver.ValidateEphemeralResourceConfigRequest equivalent of a *tfprotov6.ValidateEphemeralResourceConfigRequest.
func ValidateProviderConfigRequest ¶ added in v0.9.0
func ValidateProviderConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateProviderConfigRequest, providerSchema fwschema.Schema) (*fwserver.ValidateProviderConfigRequest, diag.Diagnostics)
ValidateProviderConfigRequest returns the *fwserver.ValidateProviderConfigRequest equivalent of a *tfprotov6.ValidateProviderConfigRequest.
func ValidateResourceConfigRequest ¶ added in v0.9.0
func ValidateResourceConfigRequest(ctx context.Context, proto6 *tfprotov6.ValidateResourceConfigRequest, resource resource.Resource, resourceSchema fwschema.Schema) (*fwserver.ValidateResourceConfigRequest, diag.Diagnostics)
ValidateResourceConfigRequest returns the *fwserver.ValidateResourceConfigRequest equivalent of a *tfprotov6.ValidateResourceConfigRequest.
Types ¶
This section is empty.
Source Files ¶
- applyresourcechange.go
- arguments_data.go
- callfunction.go
- client_capabilities.go
- closeephemeralresource.go
- config.go
- configureprovider.go
- doc.go
- dynamic_value.go
- ephemeral_result_data.go
- getfunctions.go
- getmetadata.go
- getproviderschema.go
- importresourcestate.go
- moveresourcestate.go
- openephemeralresource.go
- plan.go
- planresourcechange.go
- providermeta.go
- readdatasource.go
- readresource.go
- renewephemeralresource.go
- state.go
- upgraderesourcestate.go
- validatedatasourceconfig.go
- validateephemeralresourceconfig.go
- validateproviderconfig.go
- validateresourceconfig.go