dns

package
v0.2.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: 14 Imported by: 0

Documentation

Overview

Package dns provides a minimal Route53 REST client (no AWS SDK).

This client issues AWS SigV4-signed HTTP requests directly to the Route53 API (version 2013-04-01) for the two operations dddns needs: listing a single A record set and upserting an A record. The public signatures match the prior SDK-backed implementation so callers are unaffected.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route53Client

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

Route53Client issues signed HTTP requests to the Route53 REST API.

func NewFromConfig added in v0.2.0

func NewFromConfig(ctx context.Context, cfg *dddnscfg.Config) (*Route53Client, error)

NewFromConfig constructs a Route53Client from a fully-populated dddns Config.

func NewRoute53Client

func NewRoute53Client(_ context.Context, _, accessKey, secretKey, hostedZoneID, hostname string, ttl int64) (*Route53Client, error)

NewRoute53Client creates a Route53 client with the given static credentials.

The region parameter is retained for API compatibility with earlier callers; Route53 is a global service so SigV4 signing always uses us-east-1 regardless of what the caller passes.

ctx is accepted for API symmetry with the prior SDK-based constructor but is not currently used — construction is purely local (no network calls).

func (*Route53Client) GetCurrentIP

func (r *Route53Client) GetCurrentIP(ctx context.Context) (string, error)

GetCurrentIP retrieves the current A record for the configured hostname.

func (*Route53Client) UpdateIP

func (r *Route53Client) UpdateIP(ctx context.Context, newIP string) error

UpdateIP UPSERTs the A record with a new IP address. Callers are expected to handle dry-run short-circuits before invoking.

Jump to

Keyboard shortcuts

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