pkg

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RecordTypeA    = "A"
	RecordTypeAAAA = "AAAA"
)

Variables

This section is empty.

Functions

func FindPublicAddrs

func FindPublicAddrs(names ...string) ([]netip.Addr, error)

Types

type Config

type Config struct {
	ZoneID      string       `json:"zoneId"`
	Records     []string     `json:"records"`
	RecordTypes []RecordType `json:"recordTypes"`
	TTL         int64        `json:"ttl"`
}

func ParseConfigFile

func ParseConfigFile(reader io.Reader) ([]Config, error)

func (*Config) AAAARecordAllowed

func (c *Config) AAAARecordAllowed() bool

func (*Config) ARecordAllowed

func (c *Config) ARecordAllowed() bool

type RecordType

type RecordType string

type Route53Updater

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

func (*Route53Updater) Update

func (u *Route53Updater) Update(config Config, addrs []netip.Addr, dryRun bool) error

Update upserts a config's record with the requested IPs

type Route53UpdaterOpt

type Route53UpdaterOpt func(*Route53Updater)

func SetDefaultTTL

func SetDefaultTTL(ttl int64) Route53UpdaterOpt

SetDefaultTTL sets the TTL on a Route53Updater

type Updater

type Updater interface {
	Update(config Config, addrs []netip.Addr, dryRun bool) error
}

func NewRoute53Updater

func NewRoute53Updater(defaultZoneId string, opts ...Route53UpdaterOpt) (Updater, error)

NewRoute53Updater initializes a Route53Updater

Jump to

Keyboard shortcuts

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