Documentation ¶
Overview ¶
Package fromproto5 contains functions to convert from protocol version 5 (tfprotov5) types to framework types.
Index ¶
- func ApplyResourceChangeRequest(ctx context.Context, proto5 *tfprotov5.ApplyResourceChangeRequest, ...) (*fwserver.ApplyResourceChangeRequest, diag.Diagnostics)
- func Config(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, ...) (*tfsdk.Config, diag.Diagnostics)
- func ConfigureProviderRequest(ctx context.Context, proto5 *tfprotov5.ConfigureProviderRequest, ...) (*tfsdk.ConfigureProviderRequest, diag.Diagnostics)
- func GetProviderSchemaRequest(ctx context.Context, proto5 *tfprotov5.GetProviderSchemaRequest) *fwserver.GetProviderSchemaRequest
- func ImportResourceStateRequest(ctx context.Context, proto5 *tfprotov5.ImportResourceStateRequest, ...) (*fwserver.ImportResourceStateRequest, diag.Diagnostics)
- func Plan(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, ...) (*tfsdk.Plan, diag.Diagnostics)
- func PlanResourceChangeRequest(ctx context.Context, proto5 *tfprotov5.PlanResourceChangeRequest, ...) (*fwserver.PlanResourceChangeRequest, diag.Diagnostics)
- func PrepareProviderConfigRequest(ctx context.Context, proto5 *tfprotov5.PrepareProviderConfigRequest, ...) (*fwserver.ValidateProviderConfigRequest, diag.Diagnostics)
- func ProviderMeta(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, ...) (*tfsdk.Config, diag.Diagnostics)
- func ReadDataSourceRequest(ctx context.Context, proto5 *tfprotov5.ReadDataSourceRequest, ...) (*fwserver.ReadDataSourceRequest, diag.Diagnostics)
- func ReadResourceRequest(ctx context.Context, proto5 *tfprotov5.ReadResourceRequest, ...) (*fwserver.ReadResourceRequest, diag.Diagnostics)
- func State(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, ...) (*tfsdk.State, diag.Diagnostics)
- func UpgradeResourceStateRequest(ctx context.Context, proto5 *tfprotov5.UpgradeResourceStateRequest, ...) (*fwserver.UpgradeResourceStateRequest, diag.Diagnostics)
- func ValidateDataSourceConfigRequest(ctx context.Context, proto5 *tfprotov5.ValidateDataSourceConfigRequest, ...) (*fwserver.ValidateDataSourceConfigRequest, diag.Diagnostics)
- func ValidateResourceTypeConfigRequest(ctx context.Context, proto5 *tfprotov5.ValidateResourceTypeConfigRequest, ...) (*fwserver.ValidateResourceConfigRequest, diag.Diagnostics)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyResourceChangeRequest ¶
func ApplyResourceChangeRequest(ctx context.Context, proto5 *tfprotov5.ApplyResourceChangeRequest, resourceType tfsdk.ResourceType, resourceSchema *tfsdk.Schema, providerMetaSchema *tfsdk.Schema) (*fwserver.ApplyResourceChangeRequest, diag.Diagnostics)
ApplyResourceChangeRequest returns the *fwserver.ApplyResourceChangeRequest equivalent of a *tfprotov5.ApplyResourceChangeRequest.
func Config ¶
func Config(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, schema *tfsdk.Schema) (*tfsdk.Config, diag.Diagnostics)
Config returns the *tfsdk.Config for a *tfprotov5.DynamicValue and *tfsdk.Schema.
func ConfigureProviderRequest ¶
func ConfigureProviderRequest(ctx context.Context, proto5 *tfprotov5.ConfigureProviderRequest, providerSchema *tfsdk.Schema) (*tfsdk.ConfigureProviderRequest, diag.Diagnostics)
ConfigureProviderRequest returns the *fwserver.ConfigureProviderRequest equivalent of a *tfprotov5.ConfigureProviderRequest.
func GetProviderSchemaRequest ¶
func GetProviderSchemaRequest(ctx context.Context, proto5 *tfprotov5.GetProviderSchemaRequest) *fwserver.GetProviderSchemaRequest
GetProviderSchemaRequest returns the *fwserver.GetProviderSchemaRequest equivalent of a *tfprotov5.GetProviderSchemaRequest.
func ImportResourceStateRequest ¶
func ImportResourceStateRequest(ctx context.Context, proto5 *tfprotov5.ImportResourceStateRequest, resourceType tfsdk.ResourceType, resourceSchema *tfsdk.Schema) (*fwserver.ImportResourceStateRequest, diag.Diagnostics)
ImportResourceStateRequest returns the *fwserver.ImportResourceStateRequest equivalent of a *tfprotov5.ImportResourceStateRequest.
func Plan ¶
func Plan(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, schema *tfsdk.Schema) (*tfsdk.Plan, diag.Diagnostics)
Plan returns the *tfsdk.Plan for a *tfprotov5.DynamicValue and *tfsdk.Schema.
func PlanResourceChangeRequest ¶
func PlanResourceChangeRequest(ctx context.Context, proto5 *tfprotov5.PlanResourceChangeRequest, resourceType tfsdk.ResourceType, resourceSchema *tfsdk.Schema, providerMetaSchema *tfsdk.Schema) (*fwserver.PlanResourceChangeRequest, diag.Diagnostics)
PlanResourceChangeRequest returns the *fwserver.PlanResourceChangeRequest equivalent of a *tfprotov5.PlanResourceChangeRequest.
func PrepareProviderConfigRequest ¶
func PrepareProviderConfigRequest(ctx context.Context, proto5 *tfprotov5.PrepareProviderConfigRequest, providerSchema *tfsdk.Schema) (*fwserver.ValidateProviderConfigRequest, diag.Diagnostics)
PrepareProviderConfigRequest returns the *fwserver.ValidateProviderConfigRequest equivalent of a *tfprotov5.PrepareProviderConfigRequest.
func ProviderMeta ¶
func ProviderMeta(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, schema *tfsdk.Schema) (*tfsdk.Config, diag.Diagnostics)
ProviderMeta returns the *tfsdk.Config for a *tfprotov5.DynamicValue and *tfsdk.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 ReadDataSourceRequest ¶
func ReadDataSourceRequest(ctx context.Context, proto5 *tfprotov5.ReadDataSourceRequest, dataSourceType tfsdk.DataSourceType, dataSourceSchema *tfsdk.Schema, providerMetaSchema *tfsdk.Schema) (*fwserver.ReadDataSourceRequest, diag.Diagnostics)
ReadDataSourceRequest returns the *fwserver.ReadDataSourceRequest equivalent of a *tfprotov5.ReadDataSourceRequest.
func ReadResourceRequest ¶
func ReadResourceRequest(ctx context.Context, proto5 *tfprotov5.ReadResourceRequest, resourceType tfsdk.ResourceType, resourceSchema *tfsdk.Schema, providerMetaSchema *tfsdk.Schema) (*fwserver.ReadResourceRequest, diag.Diagnostics)
ReadResourceRequest returns the *fwserver.ReadResourceRequest equivalent of a *tfprotov5.ReadResourceRequest.
func State ¶
func State(ctx context.Context, proto5DynamicValue *tfprotov5.DynamicValue, schema *tfsdk.Schema) (*tfsdk.State, diag.Diagnostics)
State returns the *tfsdk.State for a *tfprotov5.DynamicValue and *tfsdk.Schema.
func UpgradeResourceStateRequest ¶
func UpgradeResourceStateRequest(ctx context.Context, proto5 *tfprotov5.UpgradeResourceStateRequest, resourceType tfsdk.ResourceType, resourceSchema *tfsdk.Schema) (*fwserver.UpgradeResourceStateRequest, diag.Diagnostics)
UpgradeResourceStateRequest returns the *fwserver.UpgradeResourceStateRequest equivalent of a *tfprotov5.UpgradeResourceStateRequest.
func ValidateDataSourceConfigRequest ¶
func ValidateDataSourceConfigRequest(ctx context.Context, proto5 *tfprotov5.ValidateDataSourceConfigRequest, dataSourceType tfsdk.DataSourceType, dataSourceSchema *tfsdk.Schema) (*fwserver.ValidateDataSourceConfigRequest, diag.Diagnostics)
ValidateDataSourceConfigRequest returns the *fwserver.ValidateDataSourceConfigRequest equivalent of a *tfprotov5.ValidateDataSourceConfigRequest.
func ValidateResourceTypeConfigRequest ¶
func ValidateResourceTypeConfigRequest(ctx context.Context, proto5 *tfprotov5.ValidateResourceTypeConfigRequest, resourceType tfsdk.ResourceType, resourceSchema *tfsdk.Schema) (*fwserver.ValidateResourceConfigRequest, diag.Diagnostics)
ValidateResourceTypeConfigRequest returns the *fwserver.ValidateResourceConfigRequest equivalent of a *tfprotov5.ValidateResourceTypeConfigRequest.
Types ¶
This section is empty.
Source Files ¶
- applyresourcechange.go
- config.go
- configureprovider.go
- doc.go
- getproviderschema.go
- importresourcestate.go
- plan.go
- planresourcechange.go
- prepareproviderconfig.go
- providermeta.go
- readdatasource.go
- readresource.go
- state.go
- upgraderesourcestate.go
- validatedatasourceconfig.go
- validateresourcetypeconfig.go