{"modulePath":"github.com/GoCodeAlone/workflow-plugin-hover","version":"v0.6.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package internal\n\nPackage internal — Hover typed IaC gRPC server.\n\nhoverIaCServer 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.\n\nHard invariants:\n\n  - NO structpb.Struct on the wire; config / outputs cross as JSON bytes.\n  - ComputePlanVersion \"v2\" (Apply is removed; FinalizeApply returns empty since Hover has no deferred operations).\n  - 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.\n\nPackage internal implements the Hover IaC provider. Hover has no official API; this plugin uses the browser-side session flow (see internal/hover/client.go).\n\nPackage internal — Hover plugin entry point.\n\n## Variables\n\n```go\nvar Version = \"0.0.0\"\n```\nVersion is set at build time via -ldflags.\n\n## Functions\n\n```go\nfunc NewIaCServer() *hoverIaCServer\n```\nNewIaCServer is the package entrypoint for cmd/main.go.\n\n```go\nfunc Serve()\n```\nServe 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.\n\n## Types\n\n```go\ntype HoverProvider struct {\n\t// contains filtered or unexported fields\n}\n```\nHoverProvider implements interfaces.IaCProvider for Hover. Supported resource types:\n\n  - infra.dns           — DNS records within Hover's nameservers.\n  - infra.dns\\_delegation — registrar-level nameserver delegation.\n  - infra.domain        — registrar-level domain settings.\n  - infra.http\\_redirect — Hover root web forwarding.\n\n```go\nfunc NewHoverProvider() *HoverProvider\n```\nNewHoverProvider creates an uninitialised HoverProvider.\n\n```go\nfunc (p *HoverProvider) BootstrapStateBackend(_ context.Context, _ map[string]any) (*interfaces.BootstrapResult, error)\n```\nBootstrapStateBackend is a stub: Hover does not manage state backends.\n\n```go\nfunc (p *HoverProvider) Capabilities() []interfaces.IaCCapabilityDeclaration\n```\nCapabilities returns the resource types Hover supports.\n\n```go\nfunc (p *HoverProvider) Close() error\n```\nClose is a no-op; the HTTP client has no persistent connections to tear down.\n\n```go\nfunc (p *HoverProvider) Destroy(ctx context.Context, resources []interfaces.ResourceRef) (*interfaces.DestroyResult, error)\n```\nDestroy 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.\n\n```go\nfunc (p *HoverProvider) DetectDrift(ctx context.Context, resources []interfaces.ResourceRef) ([]interfaces.DriftResult, error)\n```\nDetectDrift checks for ghost resources (state has entry, cloud says 404).\n\n```go\nfunc (p *HoverProvider) EnumerateAll(ctx context.Context, resourceType string) ([]*interfaces.ResourceOutput, error)\n```\nEnumerateAll implements interfaces.EnumeratorAll for account-level Hover resource discovery. Walks the account's zones via the injected hoverDomainLister (production wraps \\*hoverclient.Client.ListDomains — added in pkg/hoverclient for the cross-repo cascade). Each \\*ResourceOutput carries the zone name + hover-assigned domain\\_id so the downstream IaCProvider.Import path can adopt the zone without re-querying the account list.\n\nDomains with empty Name are dropped rather than emitted with empty ProviderID — guards against bogus state-store entries if the Hover account-page ever returns a malformed row.\n\n```go\nfunc (p *HoverProvider) Import(ctx context.Context, cloudID string, resourceType string) (*interfaces.ResourceState, error)\n```\nImport reads an existing Hover-managed resource and returns IaC adoption state. cloudID is the domain name for both infra.dns and infra.dns\\_delegation.\n\nFor infra.dns\\_delegation, Import uses DelegationDriver.ReadForImport so that the registrar NS (authoritative intent) is captured as the primary value, and the live public NS is recorded as a propagation annotation. This avoids the live-first semantics of DelegationDriver.Read, which would capture stale TTL- cached NS during an in-flight NS switch.\n\n```go\nfunc (p *HoverProvider) Initialize(ctx context.Context, config map[string]any) error\n```\nInitialize parses provider config and constructs a lazy Hover client. Required keys:\n\n\tusername     — Hover account username / email\n\tpassword     — Hover account password\n\nOptional keys:\n\n\ttotp_secret        — Base32-encoded TOTP seed (required if the account has\n\t                     MFA enabled; safe to omit when MFA is off)\n\tbrowser_path       — Absolute path to the Chrome/Chromium binary.\n\t                     Falls back to HOVER_BROWSER_PATH env var, then auto-discovery.\n\tbrowser_download   — Boolean; allow rod to download Chromium if none found.\n\t                     Falls back to HOVER_BROWSER_DOWNLOAD env var (default true).\n\tbrowser_headless   — Boolean; run Chrome in headless mode.\n\t                     Falls back to HOVER_BROWSER_HEADLESS env var (default true).\n\tbrowser_profile_dir — Directory for the persistent Chrome profile (Imperva\n\t                     clearance cookies). Falls back to HOVER_BROWSER_PROFILE_DIR\n\t                     env var, then ${XDG_STATE_HOME:-$HOME/.local/state}/wfctl/plugins/hover/browser-profile.\n\n```go\nfunc (p *HoverProvider) Name() string\n```\n\n```go\nfunc (p *HoverProvider) Plan(ctx context.Context, desired []interfaces.ResourceSpec, current []interfaces.ResourceState) (*interfaces.IaCPlan, error)\n```\nPlan delegates to platform.ComputePlan which dispatches driver.Diff per-resource.\n\n```go\nfunc (p *HoverProvider) ResolveSizing(_ string, _ interfaces.Size, _ *interfaces.ResourceHints) (*interfaces.ProviderSizing, error)\n```\nResolveSizing is a stub: Hover has no compute sizing.\n\n```go\nfunc (p *HoverProvider) ResourceDriver(resourceType string) (interfaces.ResourceDriver, error)\n```\nResourceDriver returns the driver for the given resource type.\n\n```go\nfunc (p *HoverProvider) Status(ctx context.Context, resources []interfaces.ResourceRef) ([]interfaces.ResourceStatus, error)\n```\nStatus returns the live status of the given refs.\n\n```go\nfunc (p *HoverProvider) SupportedCanonicalKeys() []string\n```\nSupportedCanonicalKeys returns the full canonical key set; Hover maps only the dns-relevant subset but there's no harm reporting all to the validator.\n\n```go\nfunc (p *HoverProvider) Version() string\n```\n\n","path":"github.com/GoCodeAlone/workflow-plugin-hover/internal","name":"internal","synopsis":"Package internal — Hover typed IaC gRPC server.","isRedistributable":true}
