dnsx

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBadIPFormat is returned when registering a hostname with a malformed IP.
	ErrBadIPFormat = errors.New("bad ip format")
)

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Project string
	Zone    string
	Service dnsiface.Service
}

Manager contains state needed for managing DNS recors.

func NewManager

func NewManager(s dnsiface.Service, project, zone string) *Manager

NewManager creates a new Manager instance.

func (*Manager) Delete

func (d *Manager) Delete(ctx context.Context, hostname string) (*dns.Change, error)

Delete removes all resource records associated with the given hostname.

func (*Manager) Register

func (d *Manager) Register(ctx context.Context, hostname, ipv4, ipv6 string) (*dns.Change, error)

Register creates a new resource record for hostname with the given ipv4 and ipv6 adresses.

func (*Manager) RegisterZone added in v0.2.3

func (d *Manager) RegisterZone(ctx context.Context, zone *dns.ManagedZone) (*dns.ManagedZone, error)

RegisterZone guarantees that the provided zone already exists or is created, unless some error occurs.

func (*Manager) RegisterZoneSplit added in v0.2.3

func (d *Manager) RegisterZoneSplit(ctx context.Context, zone *dns.ManagedZone) (*dns.ResourceRecordSet, error)

RegisterZoneSplit guarantees that the zone split for the given zone already exists or is created, unless some error occurs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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