dnsx

package
v0.0.0-...-8dfb9f7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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