drivers

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: 6 Imported by: 0

Documentation

Overview

Package drivers provides IaC ResourceDriver implementations for the Hover DNS provider.

Hover exposes NO official API. All endpoints below are derived from https://github.com/pjslauta/hover-dyn-dns and browser traffic inspection. Endpoint inventory (all relative to https://www.hover.com):

GET  /api/domains/<domain>/dns       — list records for a zone
POST /api/dns                         — create a record (form: domain_id, name, type, content, ttl)
PUT  /api/dns/<id>                    — update a record (form: content, ttl)
DELETE /api/dns/<id>                  — delete a record

These are undocumented; the Hover site uses them directly from the control panel SPA. They may change without notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSDriver

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

DNSDriver manages Hover DNS zones and records (infra.dns). ProviderID is the apex domain name (e.g. "example.com").

func NewDNSDriver

func NewDNSDriver(c *hover.Client) *DNSDriver

NewDNSDriver creates a DNSDriver backed by a real hover.Client.

func NewDNSDriverWithClient

func NewDNSDriverWithClient(c HoverDNSClient) *DNSDriver

NewDNSDriverWithClient creates a driver with an injected client (for tests).

func (*DNSDriver) Create

Create idempotently reconciles a DNS zone on Hover. It creates missing records and updates existing ones that differ. Hover does not support creating zones via API — the domain must already be registered and in the account.

Config keys:

domain   string      — apex zone name (e.g. "example.com"). Falls back to spec.Name.
records  []any       — each element: {type, name, content, ttl?}

func (*DNSDriver) Delete

func (*DNSDriver) Diff

func (*DNSDriver) HealthCheck

func (*DNSDriver) ProviderIDFormat

func (d *DNSDriver) ProviderIDFormat() interfaces.ProviderIDFormat

func (*DNSDriver) Read

func (*DNSDriver) Scale

func (*DNSDriver) SensitiveKeys

func (d *DNSDriver) SensitiveKeys() []string

type HoverDNSClient

type HoverDNSClient interface {
	GetDomain(ctx context.Context, domain string) (*hover.Domain, error)
	ListRecords(ctx context.Context, domain string) ([]hover.DNSRecord, error)
	CreateRecord(ctx context.Context, domainID string, rec hover.DNSRecord) (*hover.DNSRecord, error)
	UpdateRecord(ctx context.Context, recordID string, rec hover.DNSRecord) error
	DeleteRecord(ctx context.Context, recordID string) error
}

HoverDNSClient is the subset of hover.Client used by DNSDriver (injectable for tests).

Jump to

Keyboard shortcuts

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