stubprovider

package
v0.68.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package stubprovider supplies a minimal in-process interfaces.IaCProvider for use in integration tests and the scenario-92 demo stack.

The Provider does NOT make real cloud API calls. Every lifecycle method returns a deterministic, non-error result:

  • Plan: compares desired vs current by name; emits "create" for resources absent from current and "delete" for resources absent from desired.
  • ResourceDriver: returns a stub driver whose Create/Update/Delete all succeed, enabling wfctlhelpers.ApplyPlanWithHooks to run end-to-end without any external plugin subprocess.
  • Destroy: returns all supplied refs as Destroyed names (no-op).
  • DetectDrift: returns Drifted:false for every ref.

This package imports only interfaces — no new import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider is the exported stub IaCProvider. Use New() to obtain an instance.

func New

func New() *Provider

New returns an initialized stub Provider.

func (*Provider) BootstrapStateBackend

func (p *Provider) BootstrapStateBackend(_ context.Context, _ map[string]any) (*interfaces.BootstrapResult, error)

BootstrapStateBackend returns nil — the stub does not manage state backends.

func (*Provider) Capabilities

func (p *Provider) Capabilities() []interfaces.IaCCapabilityDeclaration

Capabilities returns nil — the stub does not declare optional capabilities.

func (*Provider) Close

func (p *Provider) Close() error

Close is a no-op.

func (*Provider) Destroy

Destroy returns all supplied refs as Destroyed names.

func (*Provider) DetectDrift

func (p *Provider) DetectDrift(_ context.Context, refs []interfaces.ResourceRef) ([]interfaces.DriftResult, error)

DetectDrift returns Drifted:false with DriftClassInSync for every ref.

func (*Provider) Import

Import returns nil — the stub does not support resource import.

func (*Provider) Initialize

func (p *Provider) Initialize(_ context.Context, _ map[string]any) error

Initialize is a no-op for the stub.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the stub provider identifier.

func (*Provider) Plan

Plan compares desired specs against current state by name and returns a plan with "create" for each new resource and "delete" for each resource present in current but absent from desired. Resources present in both are returned as "update" actions (no-op at apply time; the stub driver's Update returns success).

func (*Provider) ResolveSizing

ResolveSizing returns nil — the stub does not resolve sizing.

func (*Provider) ResourceDriver

func (p *Provider) ResourceDriver(_ string) (interfaces.ResourceDriver, error)

ResourceDriver returns a stub driver for any resource type.

func (*Provider) Status

Status returns nil — the stub does not probe live cloud status.

func (*Provider) SupportedCanonicalKeys

func (p *Provider) SupportedCanonicalKeys() []string

SupportedCanonicalKeys returns nil.

func (*Provider) Version

func (p *Provider) Version() string

Version returns the stub provider version.

Jump to

Keyboard shortcuts

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