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

testprovider

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: 9 Imported by: 0

Documentation

Overview

Package testprovider contains a fully declarative provider for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v1.16.0

type Action struct {
	// Action interface methods
	MetadataMethod func(context.Context, action.MetadataRequest, *action.MetadataResponse)
	SchemaMethod   func(context.Context, action.SchemaRequest, *action.SchemaResponse)
	InvokeMethod   func(context.Context, action.InvokeRequest, *action.InvokeResponse)
}

Declarative action.Action for unit testing.

func (*Action) Invoke added in v1.16.0

func (d *Action) Invoke(ctx context.Context, req action.InvokeRequest, resp *action.InvokeResponse)

Invoke satisfies the action.Action interface.

func (*Action) Metadata added in v1.16.0

func (d *Action) Metadata(ctx context.Context, req action.MetadataRequest, resp *action.MetadataResponse)

Metadata satisfies the action.Action interface.

func (*Action) Schema added in v1.16.0

func (d *Action) Schema(ctx context.Context, req action.SchemaRequest, resp *action.SchemaResponse)

Schema satisfies the action.Action interface.

type ActionConfigValidator added in v1.16.0

type ActionConfigValidator struct {
	// ActionConfigValidator interface methods
	DescriptionMethod         func(context.Context) string
	MarkdownDescriptionMethod func(context.Context) string
	ValidateActionMethod      func(context.Context, action.ValidateConfigRequest, *action.ValidateConfigResponse)
}

Declarative action.ConfigValidator for unit testing.

func (*ActionConfigValidator) Description added in v1.16.0

func (v *ActionConfigValidator) Description(ctx context.Context) string

Description satisfies the action.ConfigValidator interface.

func (*ActionConfigValidator) MarkdownDescription added in v1.16.0

func (v *ActionConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the action.ConfigValidator interface.

func (*ActionConfigValidator) ValidateAction added in v1.16.0

Validate satisfies the action.ConfigValidator interface.

type ActionWithConfigValidators added in v1.16.0

type ActionWithConfigValidators struct {
	*Action

	// ActionWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []action.ConfigValidator
}

Declarative action.ActionWithConfigValidators for unit testing.

func (*ActionWithConfigValidators) ConfigValidators added in v1.16.0

ConfigValidators satisfies the action.ActionWithConfigValidators interface.

type ActionWithConfigure added in v1.16.0

type ActionWithConfigure struct {
	*Action

	// ActionWithConfigure interface methods
	ConfigureMethod func(context.Context, action.ConfigureRequest, *action.ConfigureResponse)
}

Declarative action.ActionWithConfigure for unit testing.

func (*ActionWithConfigure) Configure added in v1.16.0

Configure satisfies the action.ActionWithConfigure interface.

type ActionWithConfigureAndModifyPlan added in v1.16.0

type ActionWithConfigureAndModifyPlan struct {
	*Action

	// ActionWithConfigureAndModifyPlan interface methods
	ConfigureMethod func(context.Context, action.ConfigureRequest, *action.ConfigureResponse)

	// ActionWithModifyPlan interface methods
	ModifyPlanMethod func(context.Context, action.ModifyPlanRequest, *action.ModifyPlanResponse)
}

Declarative action.ActionWithConfigureAndModifyPlan for unit testing.

func (*ActionWithConfigureAndModifyPlan) Configure added in v1.16.0

Configure satisfies the action.ActionWithConfigureAndModifyPlan interface.

func (*ActionWithConfigureAndModifyPlan) ModifyPlan added in v1.16.0

ModifyPlan satisfies the action.ActionWithModifyPlan interface.

type ActionWithModifyPlan added in v1.16.0

type ActionWithModifyPlan struct {
	*Action

	// ActionWithModifyPlan interface methods
	ModifyPlanMethod func(context.Context, action.ModifyPlanRequest, *action.ModifyPlanResponse)
}

Declarative action.ActionWithModifyPlan for unit testing.

func (*ActionWithModifyPlan) ModifyPlan added in v1.16.0

ModifyPlan satisfies the action.ActionWithModifyPlan interface.

type ActionWithValidateConfig added in v1.16.0

type ActionWithValidateConfig struct {
	*Action

	// ActionWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, action.ValidateConfigRequest, *action.ValidateConfigResponse)
}

Declarative action.ActionWithValidateConfig for unit testing.

func (*ActionWithValidateConfig) ValidateConfig added in v1.16.0

ValidateConfig satisfies the action.ActionWithValidateConfig interface.

type DataSource

type DataSource struct {
	// DataSource interface methods
	MetadataMethod func(context.Context, datasource.MetadataRequest, *datasource.MetadataResponse)
	ReadMethod     func(context.Context, datasource.ReadRequest, *datasource.ReadResponse)
	SchemaMethod   func(context.Context, datasource.SchemaRequest, *datasource.SchemaResponse)
}

Declarative datasource.DataSource for unit testing.

func (*DataSource) Metadata added in v0.13.0

Metadata satisfies the datasource.DataSource interface.

func (*DataSource) Read

Read satisfies the datasource.DataSource interface.

func (*DataSource) Schema added in v0.17.0

Schema satisfies the datasource.DataSource interface.

type DataSourceConfigValidator

type DataSourceConfigValidator struct {
	// DataSourceConfigValidator interface methods
	DescriptionMethod         func(context.Context) string
	MarkdownDescriptionMethod func(context.Context) string
	ValidateDataSourceMethod  func(context.Context, datasource.ValidateConfigRequest, *datasource.ValidateConfigResponse)
}

Declarative datasource.ConfigValidator for unit testing.

func (*DataSourceConfigValidator) Description

func (v *DataSourceConfigValidator) Description(ctx context.Context) string

Description satisfies the datasource.ConfigValidator interface.

func (*DataSourceConfigValidator) MarkdownDescription

func (v *DataSourceConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the datasource.ConfigValidator interface.

func (*DataSourceConfigValidator) ValidateDataSource added in v0.10.0

Validate satisfies the datasource.ConfigValidator interface.

type DataSourceWithConfigValidators

type DataSourceWithConfigValidators struct {
	*DataSource

	// DataSourceWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []datasource.ConfigValidator
}

Declarative datasource.DataSourceWithConfigValidators for unit testing.

func (*DataSourceWithConfigValidators) ConfigValidators

ConfigValidators satisfies the datasource.DataSourceWithConfigValidators interface.

type DataSourceWithConfigure added in v0.12.0

type DataSourceWithConfigure struct {
	*DataSource

	// DataSourceWithConfigure interface methods
	ConfigureMethod func(context.Context, datasource.ConfigureRequest, *datasource.ConfigureResponse)
}

Declarative datasource.DataSourceWithConfigure for unit testing.

func (*DataSourceWithConfigure) Configure added in v0.12.0

Configure satisfies the datasource.DataSourceWithConfigure interface.

type DataSourceWithValidateConfig

type DataSourceWithValidateConfig struct {
	*DataSource

	// DataSourceWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, datasource.ValidateConfigRequest, *datasource.ValidateConfigResponse)
}

Declarative datasource.DataSourceWithValidateConfig for unit testing.

func (*DataSourceWithValidateConfig) ValidateConfig

ValidateConfig satisfies the datasource.DataSourceWithValidateConfig interface.

type EphemeralResource added in v1.13.0

type EphemeralResource struct {
	// EphemeralResource interface methods
	MetadataMethod func(context.Context, ephemeral.MetadataRequest, *ephemeral.MetadataResponse)
	SchemaMethod   func(context.Context, ephemeral.SchemaRequest, *ephemeral.SchemaResponse)
	OpenMethod     func(context.Context, ephemeral.OpenRequest, *ephemeral.OpenResponse)
}

Declarative ephemeral.EphemeralResource for unit testing.

func (*EphemeralResource) Metadata added in v1.13.0

Metadata satisfies the ephemeral.EphemeralResource interface.

func (*EphemeralResource) Open added in v1.13.0

Open satisfies the ephemeral.EphemeralResource interface.

func (*EphemeralResource) Schema added in v1.13.0

Schema satisfies the ephemeral.EphemeralResource interface.

type EphemeralResourceConfigValidator added in v1.13.0

type EphemeralResourceConfigValidator struct {
	// EphemeralResourceConfigValidator interface methods
	DescriptionMethod               func(context.Context) string
	MarkdownDescriptionMethod       func(context.Context) string
	ValidateEphemeralResourceMethod func(context.Context, ephemeral.ValidateConfigRequest, *ephemeral.ValidateConfigResponse)
}

Declarative ephemeral.ConfigValidator for unit testing.

func (*EphemeralResourceConfigValidator) Description added in v1.13.0

Description satisfies the ephemeral.ConfigValidator interface.

func (*EphemeralResourceConfigValidator) MarkdownDescription added in v1.13.0

func (v *EphemeralResourceConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the ephemeral.ConfigValidator interface.

func (*EphemeralResourceConfigValidator) ValidateEphemeralResource added in v1.13.0

Validate satisfies the ephemeral.ConfigValidator interface.

type EphemeralResourceWithClose added in v1.13.0

type EphemeralResourceWithClose struct {
	*EphemeralResource

	// EphemeralResourceWithClose interface methods
	CloseMethod func(context.Context, ephemeral.CloseRequest, *ephemeral.CloseResponse)
}

Declarative ephemeral.EphemeralResourceWithClose for unit testing.

func (*EphemeralResourceWithClose) Close added in v1.13.0

Close satisfies the ephemeral.EphemeralResourceWithClose interface.

type EphemeralResourceWithConfigValidators added in v1.13.0

type EphemeralResourceWithConfigValidators struct {
	*EphemeralResource

	// EphemeralResourceWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []ephemeral.ConfigValidator
}

Declarative ephemeral.EphemeralResourceWithConfigValidators for unit testing.

func (*EphemeralResourceWithConfigValidators) ConfigValidators added in v1.13.0

ConfigValidators satisfies the ephemeral.EphemeralResourceWithConfigValidators interface.

type EphemeralResourceWithConfigure added in v1.13.0

type EphemeralResourceWithConfigure struct {
	*EphemeralResource

	// EphemeralResourceWithConfigure interface methods
	ConfigureMethod func(context.Context, ephemeral.ConfigureRequest, *ephemeral.ConfigureResponse)
}

Declarative ephemeral.EphemeralResourceWithConfigure for unit testing.

func (*EphemeralResourceWithConfigure) Configure added in v1.13.0

Configure satisfies the ephemeral.EphemeralResourceWithConfigure interface.

type EphemeralResourceWithConfigureAndClose added in v1.13.0

type EphemeralResourceWithConfigureAndClose struct {
	*EphemeralResource

	// EphemeralResourceWithConfigure interface methods
	ConfigureMethod func(context.Context, ephemeral.ConfigureRequest, *ephemeral.ConfigureResponse)

	// EphemeralResourceWithClose interface methods
	CloseMethod func(context.Context, ephemeral.CloseRequest, *ephemeral.CloseResponse)
}

Declarative ephemeral.EphemeralResourceWithConfigureAndClose for unit testing.

func (*EphemeralResourceWithConfigureAndClose) Close added in v1.13.0

Close satisfies the ephemeral.EphemeralResourceWithClose interface.

func (*EphemeralResourceWithConfigureAndClose) Configure added in v1.13.0

Configure satisfies the ephemeral.EphemeralResourceWithConfigure interface.

type EphemeralResourceWithConfigureAndRenew added in v1.13.0

type EphemeralResourceWithConfigureAndRenew struct {
	*EphemeralResource

	// EphemeralResourceWithConfigure interface methods
	ConfigureMethod func(context.Context, ephemeral.ConfigureRequest, *ephemeral.ConfigureResponse)

	// EphemeralResourceWithRenew interface methods
	RenewMethod func(context.Context, ephemeral.RenewRequest, *ephemeral.RenewResponse)
}

Declarative ephemeral.EphemeralResourceWithConfigureAndRenew for unit testing.

func (*EphemeralResourceWithConfigureAndRenew) Configure added in v1.13.0

Configure satisfies the ephemeral.EphemeralResourceWithConfigure interface.

func (*EphemeralResourceWithConfigureAndRenew) Renew added in v1.13.0

Renew satisfies the ephemeral.EphemeralResourceWithRenew interface.

type EphemeralResourceWithRenew added in v1.13.0

type EphemeralResourceWithRenew struct {
	*EphemeralResource

	// EphemeralResourceWithRenew interface methods
	RenewMethod func(context.Context, ephemeral.RenewRequest, *ephemeral.RenewResponse)
}

Declarative ephemeral.EphemeralResourceWithRenew for unit testing.

func (*EphemeralResourceWithRenew) Renew added in v1.13.0

Renew satisfies the ephemeral.EphemeralResourceWithRenew interface.

type EphemeralResourceWithValidateConfig added in v1.13.0

type EphemeralResourceWithValidateConfig struct {
	*EphemeralResource

	// EphemeralResourceWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, ephemeral.ValidateConfigRequest, *ephemeral.ValidateConfigResponse)
}

Declarative ephemeral.EphemeralResourceWithValidateConfig for unit testing.

func (*EphemeralResourceWithValidateConfig) ValidateConfig added in v1.13.0

ValidateConfig satisfies the ephemeral.EphemeralResourceWithValidateConfig interface.

type Function added in v1.5.0

type Function struct {
	// Function interface methods
	DefinitionMethod func(context.Context, function.DefinitionRequest, *function.DefinitionResponse)
	MetadataMethod   func(context.Context, function.MetadataRequest, *function.MetadataResponse)
	RunMethod        func(context.Context, function.RunRequest, *function.RunResponse)
}

Declarative function.Function for unit testing.

func (*Function) Definition added in v1.5.0

Definition satisfies the function.Function interface.

func (*Function) Metadata added in v1.5.0

Metadata satisfies the function.Function interface.

func (*Function) Run added in v1.5.0

Run satisfies the function.Function interface.

type ListResource added in v1.16.0

type ListResource struct {
	// ListResource interface methods
	MetadataMethod                 func(context.Context, resource.MetadataRequest, *resource.MetadataResponse)
	ListResourceConfigSchemaMethod func(context.Context, list.ListResourceSchemaRequest, *list.ListResourceSchemaResponse)
	ListMethod                     func(context.Context, list.ListRequest, *list.ListResultsStream)
}

Declarative list.ListResource for unit testing.

func (*ListResource) List added in v1.16.0

ListResource satisfies the list.ListResource interface.

func (*ListResource) ListResourceConfigSchema added in v1.16.0

func (r *ListResource) ListResourceConfigSchema(ctx context.Context, req list.ListResourceSchemaRequest, resp *list.ListResourceSchemaResponse)

ListResourceConfigSchema satisfies the list.ListResource interface.

func (*ListResource) Metadata added in v1.16.0

Metadata satisfies the list.ListResource interface.

type ListResourceConfigValidator added in v1.16.0

type ListResourceConfigValidator struct {
	// ListResourceConfigValidator interface methods
	DescriptionMethod          func(context.Context) string
	MarkdownDescriptionMethod  func(context.Context) string
	ValidateListResourceMethod func(context.Context, list.ValidateConfigRequest, *list.ValidateConfigResponse)
}

Declarative list.ConfigValidator for unit testing.

func (*ListResourceConfigValidator) Description added in v1.16.0

func (v *ListResourceConfigValidator) Description(ctx context.Context) string

Description satisfies the list.ConfigValidator interface.

func (*ListResourceConfigValidator) MarkdownDescription added in v1.16.0

func (v *ListResourceConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the list.ConfigValidator interface.

func (*ListResourceConfigValidator) ValidateListResourceConfig added in v1.16.0

func (v *ListResourceConfigValidator) ValidateListResourceConfig(ctx context.Context, req list.ValidateConfigRequest, resp *list.ValidateConfigResponse)

Validate satisfies the list.ConfigValidator interface.

type ListResourceWithConfigValidators added in v1.16.0

type ListResourceWithConfigValidators struct {
	*ListResource

	// ListResourceWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []list.ConfigValidator
}

Declarative list.ListResourceWithConfigValidators for unit testing.

func (*ListResourceWithConfigValidators) ListResourceConfigValidators added in v1.16.0

func (p *ListResourceWithConfigValidators) ListResourceConfigValidators(ctx context.Context) []list.ConfigValidator

ConfigValidators satisfies the list.ListResourceWithConfigValidators interface.

type ListResourceWithConfigure added in v1.16.0

type ListResourceWithConfigure struct {
	*ListResource

	// ListResourceWithConfigure interface methods
	ConfigureMethod func(context.Context, resource.ConfigureRequest, *resource.ConfigureResponse)
}

Declarative list.ListResourceWithConfigure for unit testing.

func (*ListResourceWithConfigure) Configure added in v1.16.0

Configure satisfies the list.ListResourceWithConfigure interface.

type ListResourceWithValidateConfig added in v1.16.0

type ListResourceWithValidateConfig struct {
	*ListResource

	// ListResourceWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, list.ValidateConfigRequest, *list.ValidateConfigResponse)
}

Declarative list.ListResourceWithValidateConfig for unit testing.

func (*ListResourceWithValidateConfig) ValidateListResourceConfig added in v1.16.0

ValidateConfig satisfies the list.ListResourceWithValidateConfig interface.

type Provider

type Provider struct {
	// Provider interface methods
	MetadataMethod           func(context.Context, provider.MetadataRequest, *provider.MetadataResponse)
	ConfigureMethod          func(context.Context, provider.ConfigureRequest, *provider.ConfigureResponse)
	SchemaMethod             func(context.Context, provider.SchemaRequest, *provider.SchemaResponse)
	ActionsMethod            func(context.Context) []func() action.Action
	StateStoresMethod        func(context.Context) []func() statestore.StateStore
	DataSourcesMethod        func(context.Context) []func() datasource.DataSource
	EphemeralResourcesMethod func(context.Context) []func() ephemeral.EphemeralResource
	ListResourcesMethod      func(context.Context) []func() list.ListResource
	ResourcesMethod          func(context.Context) []func() resource.Resource
}

Declarative provider.Provider for unit testing.

func (*Provider) Actions added in v1.16.0

func (p *Provider) Actions(ctx context.Context) []func() action.Action

Actions satisfies the provider.Provider interface.

func (*Provider) Configure

Configure satisfies the provider.Provider interface.

func (*Provider) DataSources added in v0.12.0

func (p *Provider) DataSources(ctx context.Context) []func() datasource.DataSource

DataSources satisfies the provider.Provider interface.

func (*Provider) EphemeralResources added in v1.13.0

func (p *Provider) EphemeralResources(ctx context.Context) []func() ephemeral.EphemeralResource

func (*Provider) ListResources added in v1.16.0

func (p *Provider) ListResources(ctx context.Context) []func() list.ListResource

ListResources satisfies the provider.Provider interface.

func (*Provider) Metadata added in v1.0.0

Metadata satisfies the provider.Provider interface.

func (*Provider) Resources added in v0.12.0

func (p *Provider) Resources(ctx context.Context) []func() resource.Resource

Resources satisfies the provider.Provider interface.

func (*Provider) Schema added in v0.17.0

Schema satisfies the provider.Provider interface.

func (*Provider) StateStores added in v1.18.0

func (p *Provider) StateStores(ctx context.Context) []func() statestore.StateStore

StateStores satisfies the provider.Provider interface.

type ProviderConfigValidator

type ProviderConfigValidator struct {
	// ConfigValidator interface methods
	DescriptionMethod         func(context.Context) string
	MarkdownDescriptionMethod func(context.Context) string
	ValidateProviderMethod    func(context.Context, provider.ValidateConfigRequest, *provider.ValidateConfigResponse)
}

Declarative provider.ConfigValidator for unit testing.

func (*ProviderConfigValidator) Description

func (v *ProviderConfigValidator) Description(ctx context.Context) string

Description satisfies the provider.ConfigValidator interface.

func (*ProviderConfigValidator) MarkdownDescription

func (v *ProviderConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the provider.ConfigValidator interface.

func (*ProviderConfigValidator) ValidateProvider added in v0.10.0

Validate satisfies the provider.ConfigValidator interface.

type ProviderWithConfigValidators

type ProviderWithConfigValidators struct {
	*Provider

	// ProviderWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []provider.ConfigValidator
}

Declarative provider.ProviderWithConfigValidators for unit testing.

func (*ProviderWithConfigValidators) ConfigValidators

GetMetaSchema satisfies the provider.ProviderWithConfigValidators interface.

type ProviderWithFunctions added in v1.5.0

type ProviderWithFunctions struct {
	*Provider

	// ProviderWithFunctions interface methods
	FunctionsMethod func(context.Context) []func() function.Function
}

Declarative provider.ProviderWithFunctions for unit testing.

func (*ProviderWithFunctions) Functions added in v1.5.0

func (p *ProviderWithFunctions) Functions(ctx context.Context) []func() function.Function

Functions satisfies the provider.ProviderWithFunctions interface.

type ProviderWithMetaSchema added in v0.11.0

type ProviderWithMetaSchema struct {
	*Provider

	// ProviderWithMetaSchema interface methods
	MetaSchemaMethod func(context.Context, provider.MetaSchemaRequest, *provider.MetaSchemaResponse)
}

Declarative provider.ProviderWithMetaSchema for unit testing.

func (*ProviderWithMetaSchema) MetaSchema added in v0.17.0

MetaSchema satisfies the provider.ProviderWithMetaSchema interface.

type ProviderWithValidateConfig

type ProviderWithValidateConfig struct {
	*Provider

	// ProviderWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, provider.ValidateConfigRequest, *provider.ValidateConfigResponse)
}

Declarative provider.ProviderWithValidateConfig for unit testing.

func (*ProviderWithValidateConfig) ValidateConfig

GetMetaSchema satisfies the provider.ProviderWithValidateConfig interface.

type Resource

Declarative resource.Resource for unit testing.

func (*Resource) Create

Create satisfies the resource.Resource interface.

func (*Resource) Delete

Delete satisfies the resource.Resource interface.

func (*Resource) Metadata added in v0.13.0

Metadata satisfies the resource.Resource interface.

func (*Resource) Read

Read satisfies the resource.Resource interface.

func (*Resource) Schema added in v0.17.0

Schema satisfies the resource.Resource interface.

func (*Resource) Update

Update satisfies the resource.Resource interface.

type ResourceConfigValidator

type ResourceConfigValidator struct {
	// ResourceConfigValidator interface methods
	DescriptionMethod         func(context.Context) string
	MarkdownDescriptionMethod func(context.Context) string
	ValidateResourceMethod    func(context.Context, resource.ValidateConfigRequest, *resource.ValidateConfigResponse)
}

Declarative resource.ConfigValidator for unit testing.

func (*ResourceConfigValidator) Description

func (v *ResourceConfigValidator) Description(ctx context.Context) string

Description satisfies the resource.ConfigValidator interface.

func (*ResourceConfigValidator) MarkdownDescription

func (v *ResourceConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the resource.ConfigValidator interface.

func (*ResourceConfigValidator) ValidateResource added in v0.10.0

Validate satisfies the resource.ConfigValidator interface.

type ResourceWithConfigValidators

type ResourceWithConfigValidators struct {
	*Resource

	// ResourceWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []resource.ConfigValidator
}

Declarative resource.ResourceWithConfigValidators for unit testing.

func (*ResourceWithConfigValidators) ConfigValidators

ConfigValidators satisfies the resource.ResourceWithConfigValidators interface.

type ResourceWithConfigure added in v0.12.0

type ResourceWithConfigure struct {
	*Resource

	// ResourceWithConfigure interface methods
	ConfigureMethod func(context.Context, resource.ConfigureRequest, *resource.ConfigureResponse)
}

Declarative resource.ResourceWithConfigure for unit testing.

func (*ResourceWithConfigure) Configure added in v0.12.0

Configure satisfies the resource.ResourceWithConfigure interface.

type ResourceWithConfigureAndImportState added in v0.12.0

type ResourceWithConfigureAndImportState struct {
	*Resource

	// ResourceWithConfigureAndImportState interface methods
	ConfigureMethod func(context.Context, resource.ConfigureRequest, *resource.ConfigureResponse)

	// ResourceWithImportState interface methods
	ImportStateMethod func(context.Context, resource.ImportStateRequest, *resource.ImportStateResponse)
}

Declarative resource.ResourceWithConfigureAndImportState for unit testing.

func (*ResourceWithConfigureAndImportState) Configure added in v0.12.0

Configure satisfies the resource.ResourceWithConfigureAndImportState interface.

func (*ResourceWithConfigureAndImportState) ImportState added in v0.12.0

ImportState satisfies the resource.ResourceWithImportState interface.

type ResourceWithConfigureAndModifyPlan added in v0.12.0

type ResourceWithConfigureAndModifyPlan struct {
	*Resource

	// ResourceWithConfigureAndModifyPlan interface methods
	ConfigureMethod func(context.Context, resource.ConfigureRequest, *resource.ConfigureResponse)

	// ResourceWithModifyPlan interface methods
	ModifyPlanMethod func(context.Context, resource.ModifyPlanRequest, *resource.ModifyPlanResponse)
}

Declarative resource.ResourceWithConfigureAndModifyPlan for unit testing.

func (*ResourceWithConfigureAndModifyPlan) Configure added in v0.12.0

Configure satisfies the resource.ResourceWithConfigureAndModifyPlan interface.

func (*ResourceWithConfigureAndModifyPlan) ModifyPlan added in v0.12.0

ModifyPlan satisfies the resource.ResourceWithModifyPlan interface.

type ResourceWithConfigureAndUpgradeResourceIdentity added in v1.15.0

type ResourceWithConfigureAndUpgradeResourceIdentity struct {
	*Resource

	// ResourceWithConfigureAndUpgradeResourceIdentity interface methods
	ConfigureMethod func(context.Context, resource.ConfigureRequest, *resource.ConfigureResponse)

	// ResourceWithUpgradeResourceIdentity interface methods
	UpgradeResourceIdentityMethod func(context.Context) map[int64]resource.IdentityUpgrader
}

Declarative resource.ResourceWithConfigureAndUpgradeResourceIdentity for unit testing.

func (*ResourceWithConfigureAndUpgradeResourceIdentity) Configure added in v1.15.0

Configure satisfies the resource.ResourceWithConfigureAndUpgradeResourceIdentity interface.

func (*ResourceWithConfigureAndUpgradeResourceIdentity) UpgradeIdentity added in v1.15.0

UpgradeResourceIdentity satisfies the resource.ResourceWithUpgradeResourceIdentity interface.

type ResourceWithConfigureAndUpgradeState added in v0.12.0

type ResourceWithConfigureAndUpgradeState struct {
	*Resource

	// ResourceWithConfigureAndUpgradeState interface methods
	ConfigureMethod func(context.Context, resource.ConfigureRequest, *resource.ConfigureResponse)

	// ResourceWithUpgradeState interface methods
	UpgradeStateMethod func(context.Context) map[int64]resource.StateUpgrader
}

Declarative resource.ResourceWithConfigureAndUpgradeState for unit testing.

func (*ResourceWithConfigureAndUpgradeState) Configure added in v0.12.0

Configure satisfies the resource.ResourceWithConfigureAndUpgradeState interface.

func (*ResourceWithConfigureAndUpgradeState) UpgradeState added in v0.12.0

UpgradeState satisfies the resource.ResourceWithUpgradeState interface.

type ResourceWithIdentity added in v1.15.0

type ResourceWithIdentity struct {
	*Resource

	// ResourceWithIdentity interface methods
	IdentitySchemaMethod func(context.Context, resource.IdentitySchemaRequest, *resource.IdentitySchemaResponse)
}

Declarative resource.ResourceWithIdentity for unit testing.

func (*ResourceWithIdentity) IdentitySchema added in v1.15.0

IdentitySchema implements resource.ResourceWithIdentity.

type ResourceWithIdentityAndImportState added in v1.15.0

type ResourceWithIdentityAndImportState struct {
	*Resource

	// ResourceWithIdentity interface methods
	IdentitySchemaMethod func(context.Context, resource.IdentitySchemaRequest, *resource.IdentitySchemaResponse)

	// ResourceWithImportState interface methods
	ImportStateMethod func(context.Context, resource.ImportStateRequest, *resource.ImportStateResponse)
}

Declarative resource.ResourceWithIdentityAndImportState for unit testing.

func (*ResourceWithIdentityAndImportState) IdentitySchema added in v1.15.0

IdentitySchema implements resource.ResourceWithIdentity.

func (*ResourceWithIdentityAndImportState) ImportState added in v1.15.0

ImportState satisfies the resource.ResourceWithImportState interface.

type ResourceWithIdentityAndModifyPlan added in v1.15.0

type ResourceWithIdentityAndModifyPlan struct {
	*Resource

	// ResourceWithIdentity interface methods
	IdentitySchemaMethod func(context.Context, resource.IdentitySchemaRequest, *resource.IdentitySchemaResponse)

	// ResourceWithModifyPlan interface methods
	ModifyPlanMethod func(context.Context, resource.ModifyPlanRequest, *resource.ModifyPlanResponse)
}

Declarative resource.ResourceWithIdentityAndModifyPlan for unit testing.

func (*ResourceWithIdentityAndModifyPlan) IdentitySchema added in v1.15.0

IdentitySchema implements resource.ResourceWithIdentity.

func (*ResourceWithIdentityAndModifyPlan) ModifyPlan added in v1.15.0

ModifyPlan satisfies the resource.ResourceWithModifyPlan interface.

type ResourceWithIdentityAndMoveState added in v1.15.0

type ResourceWithIdentityAndMoveState struct {
	*Resource

	// ResourceWithIdentity interface methods
	IdentitySchemaMethod func(context.Context, resource.IdentitySchemaRequest, *resource.IdentitySchemaResponse)

	// ResourceWithMoveState interface methods
	MoveStateMethod func(context.Context) []resource.StateMover
}

Declarative resource.ResourceWithIdentityAndMoveState for unit testing.

func (*ResourceWithIdentityAndMoveState) IdentitySchema added in v1.15.0

IdentitySchema implements resource.ResourceWithIdentity.

func (*ResourceWithIdentityAndMoveState) MoveState added in v1.15.0

MoveState satisfies the resource.ResourceWithMoveState interface.

type ResourceWithImportState

type ResourceWithImportState struct {
	*Resource

	// ResourceWithImportState interface methods
	ImportStateMethod func(context.Context, resource.ImportStateRequest, *resource.ImportStateResponse)
}

Declarative resource.ResourceWithImportState for unit testing.

func (*ResourceWithImportState) ImportState

ImportState satisfies the resource.ResourceWithImportState interface.

type ResourceWithModifyPlan

type ResourceWithModifyPlan struct {
	*Resource

	// ResourceWithModifyPlan interface methods
	ModifyPlanMethod func(context.Context, resource.ModifyPlanRequest, *resource.ModifyPlanResponse)
}

Declarative resource.ResourceWithModifyPlan for unit testing.

func (*ResourceWithModifyPlan) ModifyPlan

ModifyPlan satisfies the resource.ResourceWithModifyPlan interface.

type ResourceWithMoveState added in v1.6.0

type ResourceWithMoveState struct {
	*Resource

	// ResourceWithMoveState interface methods
	MoveStateMethod func(context.Context) []resource.StateMover
}

Declarative resource.ResourceWithMoveState for unit testing.

func (*ResourceWithMoveState) MoveState added in v1.6.0

MoveState satisfies the resource.ResourceWithMoveState interface.

type ResourceWithUpgradeResourceIdentity added in v1.15.0

type ResourceWithUpgradeResourceIdentity struct {
	*Resource

	// ResourceWithUpgradeResourceIdentity interface methods
	UpgradeResourceIdentityMethod func(context.Context) map[int64]resource.IdentityUpgrader

	// ResourceWithIdentity interface methods
	IdentitySchemaMethod func(context.Context, resource.IdentitySchemaRequest, *resource.IdentitySchemaResponse)
}

Declarative resource.ResourceWithUpgradeResourceIdentity for unit testing.

func (*ResourceWithUpgradeResourceIdentity) IdentitySchema added in v1.15.0

IdentitySchema implements resource.ResourceWithIdentity.

func (*ResourceWithUpgradeResourceIdentity) UpgradeIdentity added in v1.15.0

UpgradeResourceIdentity satisfies the resource.ResourceWithUpgradeResourceIdentity interface.

type ResourceWithUpgradeState

type ResourceWithUpgradeState struct {
	*Resource

	// ResourceWithUpgradeState interface methods
	UpgradeStateMethod func(context.Context) map[int64]resource.StateUpgrader
}

Declarative resource.ResourceWithUpgradeState for unit testing.

func (*ResourceWithUpgradeState) UpgradeState

UpgradeState satisfies the resource.ResourceWithUpgradeState interface.

type ResourceWithValidateConfig

type ResourceWithValidateConfig struct {
	*Resource

	// ResourceWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, resource.ValidateConfigRequest, *resource.ValidateConfigResponse)
}

Declarative resource.ResourceWithValidateConfig for unit testing.

func (*ResourceWithValidateConfig) ValidateConfig

ValidateConfig satisfies the resource.ResourceWithValidateConfig interface.

type StateStore added in v1.18.0

Declarative statestore.StateStore for unit testing.

func (*StateStore) DeleteState added in v1.18.0

DeleteState satisfies the statestore.StateStore interface.

func (*StateStore) GetStates added in v1.18.0

GetStates satisfies the statestore.StateStore interface.

func (*StateStore) Initialize added in v1.18.0

Initialize satisfies the statestore.StateStore interface.

func (*StateStore) Lock added in v1.18.0

Lock satisfies the statestore.StateStore interface.

func (*StateStore) Metadata added in v1.18.0

Metadata satisfies the statestore.StateStore interface.

func (*StateStore) Read added in v1.18.0

Read satisfies the statestore.StateStore interface.

func (*StateStore) Schema added in v1.18.0

Schema satisfies the statestore.StateStore interface.

func (*StateStore) Unlock added in v1.18.0

Unlock satisfies the statestore.StateStore interface.

func (*StateStore) Write added in v1.18.0

Write satisfies the statestore.StateStore interface.

type StateStoreConfigValidator added in v1.18.0

type StateStoreConfigValidator struct {
	// StateStoreConfigValidator interface methods
	DescriptionMethod         func(context.Context) string
	MarkdownDescriptionMethod func(context.Context) string
	ValidateStateStoreMethod  func(context.Context, statestore.ValidateConfigRequest, *statestore.ValidateConfigResponse)
}

Declarative statestore.ConfigValidator for unit testing.

func (*StateStoreConfigValidator) Description added in v1.18.0

func (v *StateStoreConfigValidator) Description(ctx context.Context) string

Description satisfies the statestore.ConfigValidator interface.

func (*StateStoreConfigValidator) MarkdownDescription added in v1.18.0

func (v *StateStoreConfigValidator) MarkdownDescription(ctx context.Context) string

MarkdownDescription satisfies the statestore.ConfigValidator interface.

func (*StateStoreConfigValidator) ValidateStateStore added in v1.18.0

Validate satisfies the statestore.ConfigValidator interface.

type StateStoreWithConfigValidators added in v1.18.0

type StateStoreWithConfigValidators struct {
	*StateStore

	// StateStoreWithConfigValidators interface methods
	ConfigValidatorsMethod func(context.Context) []statestore.ConfigValidator
}

Declarative statestore.StateStoreWithConfigValidators for unit testing.

func (*StateStoreWithConfigValidators) ConfigValidators added in v1.18.0

ConfigValidators satisfies the statestore.StateStoreWithConfigValidators interface.

type StateStoreWithConfigure added in v1.18.0

type StateStoreWithConfigure struct {
	*StateStore

	// StateStoreWithConfigure interface methods
	ConfigureMethod func(context.Context, statestore.ConfigureRequest, *statestore.ConfigureResponse)
}

Declarative statestore.StateStoreWithConfigure for unit testing.

func (*StateStoreWithConfigure) Configure added in v1.18.0

Configure satisfies the statestore.StateStoreWithConfigure interface.

type StateStoreWithValidateConfig added in v1.18.0

type StateStoreWithValidateConfig struct {
	*StateStore

	// StateStoreWithValidateConfig interface methods
	ValidateConfigMethod func(context.Context, statestore.ValidateConfigRequest, *statestore.ValidateConfigResponse)
}

Declarative statestore.StateStoreWithValidateConfig for unit testing.

func (*StateStoreWithValidateConfig) ValidateConfig added in v1.18.0

ValidateConfig satisfies the statestore.StateStoreWithValidateConfig interface.

Source Files

Jump to

Keyboard shortcuts

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