Documentation
¶
Overview ¶
Package internal implements the DigitalOcean workflow engine plugin.
Index ¶
- func NewDOPlugin() sdk.PluginProvider
- type DOProvider
- func (p *DOProvider) Apply(ctx context.Context, plan *interfaces.IaCPlan) (*interfaces.ApplyResult, error)
- func (p *DOProvider) Capabilities() []interfaces.IaCCapabilityDeclaration
- func (p *DOProvider) Close() error
- func (p *DOProvider) Destroy(ctx context.Context, resources []interfaces.ResourceRef) (*interfaces.DestroyResult, error)
- func (p *DOProvider) DetectDrift(_ context.Context, resources []interfaces.ResourceRef) ([]interfaces.DriftResult, error)
- func (p *DOProvider) Import(ctx context.Context, cloudID string, resourceType string) (*interfaces.ResourceState, error)
- func (p *DOProvider) Initialize(_ context.Context, config map[string]any) error
- func (p *DOProvider) Name() string
- func (p *DOProvider) Plan(_ context.Context, desired []interfaces.ResourceSpec, ...) (*interfaces.IaCPlan, error)
- func (p *DOProvider) ResolveSizing(resourceType string, size interfaces.Size, hints *interfaces.ResourceHints) (*interfaces.ProviderSizing, error)
- func (p *DOProvider) ResourceDriver(resourceType string) (interfaces.ResourceDriver, error)
- func (p *DOProvider) Status(ctx context.Context, resources []interfaces.ResourceRef) ([]interfaces.ResourceStatus, error)
- func (p *DOProvider) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 ¶
func (p *DOProvider) Apply(ctx context.Context, plan *interfaces.IaCPlan) (*interfaces.ApplyResult, error)
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 ¶
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 ¶
func (p *DOProvider) Plan(_ context.Context, desired []interfaces.ResourceSpec, current []interfaces.ResourceState) (*interfaces.IaCPlan, error)
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 ¶
func (p *DOProvider) Status(ctx context.Context, resources []interfaces.ResourceRef) ([]interfaces.ResourceStatus, error)
Status returns the live status of the given resources.
func (*DOProvider) Version ¶
func (p *DOProvider) Version() string