internal

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package internal implements the DigitalOcean workflow engine plugin.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set at build time via -ldflags "-X github.com/GoCodeAlone/workflow-plugin-digitalocean/internal.Version=X.Y.Z"

Functions

func NewDOPlugin

func NewDOPlugin() sdk.PluginProvider

NewDOPlugin returns a new DigitalOcean plugin instance.

Types

type DOProvider

type DOProvider struct {
	// contains filtered or unexported fields
}

DOProvider implements interfaces.IaCProvider for DigitalOcean.

func NewDOProvider

func NewDOProvider() *DOProvider

NewDOProvider creates an uninitialised DOProvider.

func (*DOProvider) Apply

Apply executes the plan.

func (*DOProvider) Capabilities

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

Capabilities returns the resource types this provider supports.

func (*DOProvider) Close

func (p *DOProvider) Close() error

Close is a no-op; the godo client has no persistent connection to close.

func (*DOProvider) Destroy

func (p *DOProvider) Destroy(ctx context.Context, resources []interfaces.ResourceRef) (*interfaces.DestroyResult, error)

Destroy deletes the given resources.

func (*DOProvider) DetectDrift

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

DetectDrift checks for drift between declared and actual resource state.

func (*DOProvider) Import

func (p *DOProvider) Import(ctx context.Context, cloudID string, resourceType string) (*interfaces.ResourceState, error)

Import brings an existing cloud resource under management.

func (*DOProvider) Initialize

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

Initialize configures the godo client using the provided config map. Required: "token". Optional: "region" (default "nyc3"), "spaces_access_key", "spaces_secret_key".

func (*DOProvider) Name

func (p *DOProvider) Name() string

func (*DOProvider) Plan

Plan computes the set of actions needed to reach the desired state.

func (*DOProvider) ResolveSizing

func (p *DOProvider) ResolveSizing(resourceType string, size interfaces.Size, hints *interfaces.ResourceHints) (*interfaces.ProviderSizing, error)

ResolveSizing maps abstract size tiers to DigitalOcean SKUs.

func (*DOProvider) ResourceDriver

func (p *DOProvider) ResourceDriver(resourceType string) (interfaces.ResourceDriver, error)

ResourceDriver returns the driver for the given resource type.

func (*DOProvider) Status

Status returns the live status of the given resources.

func (*DOProvider) SupportedCanonicalKeys added in v0.7.0

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

SupportedCanonicalKeys returns the canonical IaC config keys that this DO provider currently maps. Keys in doUnsupportedCanonicalKeys are excluded until their Task implementation lands (see comments there).

func (*DOProvider) Version

func (p *DOProvider) Version() string

Directories

Path Synopsis
Package drivers contains ResourceDriver implementations for each DigitalOcean resource type.
Package drivers contains ResourceDriver implementations for each DigitalOcean resource type.

Jump to

Keyboard shortcuts

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