powerdns

package
v0.0.0-...-1c396e8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PowerDNS

type PowerDNS struct {
	// BaseURL contains the URL to the PowerDNS API.
	//
	// Example: http://127.0.0.1:8080/
	BaseURL string `mapstructure:"baseURL"`

	// VHost contains the PowerDNS virtual host.
	//
	// Example: localhost
	VHost string `mapstructure:"vhost"`

	// APIKey contains the API key.
	APIKey string `mapstructure:"apiKey"`

	// Zone contains the DNS zone, which contains all maintained resource records.
	//
	// Example: dyn.example.com
	Zone string `mapstructure:"zone"`

	// DefaultTTL sets a default TTL value in seconds.
	//
	// Example: 10
	DefaultTTL uint32 `mapstructure:"defaultTTL"`

	// Dry toggles the simulation mode off and on.
	//
	// If this is enabled, no actual API calls are made.
	Dry bool `mapstructure:"dry"`
}

PowerDNS defines the configuration for the PowerDNS authoritative server.

func (*PowerDNS) AddIPv4ResourceRecord

func (p *PowerDNS) AddIPv4ResourceRecord(hostname string, ipv4 string, ttl uint32) error

AddIPv4ResourceRecord adds a new IPv4 resource record

func (*PowerDNS) AddIPv6ResourceRecord

func (p *PowerDNS) AddIPv6ResourceRecord(hostname string, ipv6 string, ttl uint32) error

AddIPv6ResourceRecord adds a new IPv6 resource record

func (*PowerDNS) DeleteIPv4ResourceRecord

func (p *PowerDNS) DeleteIPv4ResourceRecord(hostname string) error

DeleteIPv4ResourceRecord deletes an IPv4 resource record

func (*PowerDNS) DeleteIPv6ResourceRecord

func (p *PowerDNS) DeleteIPv6ResourceRecord(hostname string) error

DeleteIPv6ResourceRecord deletes an IPv6 resource record

Jump to

Keyboard shortcuts

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