verify

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package verify produces a DNS-propagation snapshot for the `dddns verify` command. It isolates the network calls from the CLI layer so cmd/verify.go can stay focused on formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	PublicIP     string
	Route53IP    string
	Route53Error error
	StdlibIP     string
	StdlibError  error
	Resolvers    []ResolverResult
}

Report is the snapshot returned by Run.

func Run

func Run(ctx context.Context, cfg *config.Config) (*Report, error)

Run executes the full verify flow. It is safe to call with a cancelled context — each sub-step honours ctx. A non-nil error is returned only when the initial public-IP lookup fails; per-step failures (Route53, stdlib, named resolvers) are folded into the Report so the caller can display partial results.

type ResolverResult

type ResolverResult struct {
	Name   string // human-readable label (e.g. "Google")
	Server string // resolver address in host:port form
	IP     string // resolved IPv4 address (empty on error or NODATA)
	Error  error  // non-nil when the resolver failed
}

ResolverResult captures the outcome of a single named DNS server lookup.

Jump to

Keyboard shortcuts

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