internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package internal — Hover typed IaC gRPC server.

hoverIaCServer wraps *HoverProvider and satisfies the pb.IaCProvider*Server interface set required by sdk.ServeIaCPlugin. The shape mirrors workflow-plugin-digitalocean/internal/iacserver.go; only the provider- specific dial surface differs.

Hard invariants:

  • NO structpb.Struct on the wire; config / outputs cross as JSON bytes.
  • ComputePlanVersion "v2" (Apply is removed; FinalizeApply returns empty since Hover has no deferred operations).
  • sdk.ServeIaCPlugin auto-registers every typed pb.IaCProvider*Server interface this struct satisfies (see internal/serve.go). hoverIaCServer embeds pb.Unimplemented*Server for the full surface (Required + Finalizer + DriftDetector + Enumerator + Validator + DriftConfigDetector + CredentialRevoker + MigrationRepairer + ResourceDriver + PluginService), so every service registers — but Hover only implements method bodies for Required + Finalizer + DriftDetector. The unimplemented services respond with a typed "Unimplemented" gRPC status rather than "service not registered", which is the right shape for cross-plugin uniformity but means clients must check capabilities before invoking optional methods.

Package internal implements the Hover IaC provider. Hover has no official API; this plugin uses the browser-side session flow (see internal/hover/client.go).

Package internal — Hover plugin entry point.

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set at build time via -ldflags.

Functions

func NewIaCServer

func NewIaCServer() *hoverIaCServer

NewIaCServer is the package entrypoint for cmd/main.go.

func Serve

func Serve()

Serve starts the Hover IaC plugin gRPC server. Called from cmd/workflow-plugin-hover/main.go. The SDK auto-registers every typed pb.IaCProvider*Server interface that *hoverIaCServer satisfies via Go type-assertion at plugin startup.

Types

type HoverProvider

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

HoverProvider implements interfaces.IaCProvider for Hover. It supports a single resource type: infra.dns.

func NewHoverProvider

func NewHoverProvider() *HoverProvider

NewHoverProvider creates an uninitialised HoverProvider.

func (*HoverProvider) BootstrapStateBackend

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

BootstrapStateBackend is a stub: Hover does not manage state backends.

func (*HoverProvider) Capabilities

Capabilities returns the resource types Hover supports.

func (*HoverProvider) Close

func (p *HoverProvider) Close() error

Close is a no-op; the HTTP client has no persistent connections to tear down.

func (*HoverProvider) Destroy

Destroy invokes the per-resource driver Delete for each ref. For infra.dns this is a no-op: Hover exposes no API to delete a DNS zone (only individual records). The resource is marked "destroyed" in IaC state because workflow has nothing further to reconcile, but the upstream records remain in Hover. Operators who want to drop all records must do so manually via the Hover control panel.

func (*HoverProvider) DetectDrift

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

DetectDrift checks for ghost resources (state has entry, cloud says 404).

func (*HoverProvider) Import

Import is a stub: Hover does not support resource import via cloud ID.

func (*HoverProvider) Initialize

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

Initialize parses provider config and eagerly authenticates with Hover. Required keys:

username     — Hover account username / email
password     — Hover account password

Optional keys:

totp_secret  — Base32-encoded TOTP seed (required if the account has MFA
               enabled; safe to omit when MFA is off)

func (*HoverProvider) Name

func (p *HoverProvider) Name() string

func (*HoverProvider) Plan

Plan delegates to platform.ComputePlan which dispatches driver.Diff per-resource.

func (*HoverProvider) ResolveSizing

ResolveSizing is a stub: Hover has no compute sizing.

func (*HoverProvider) ResourceDriver

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

ResourceDriver returns the driver for the given resource type.

func (*HoverProvider) Status

Status returns the live status of the given refs.

func (*HoverProvider) SupportedCanonicalKeys

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

SupportedCanonicalKeys returns the full canonical key set; Hover maps only the dns-relevant subset but there's no harm reporting all to the validator.

func (*HoverProvider) Version

func (p *HoverProvider) Version() string

Directories

Path Synopsis
Package drivers provides IaC ResourceDriver implementations for the Hover DNS provider.
Package drivers provides IaC ResourceDriver implementations for the Hover DNS provider.
Package hover implements the Hover DNS provider client.
Package hover implements the Hover DNS provider client.

Jump to

Keyboard shortcuts

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