powerdns

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client contains an API client for a PowerDNS server

func NewClient

func NewClient(serverURL, apiKey, runDomain string) *Client

NewClient creates a new bind API client

func (*Client) CreateARecord

func (c *Client) CreateARecord(value, hostname string) error

CreateARecord creates a new A record for the nameserver

func (*Client) CreateCNAMERecord

func (c *Client) CreateCNAMERecord(value, hostname string) error

CreateCNAMERecord creates a new CNAME record for the nameserver

type RR

type RR struct {
	Name       string   `json:"name"`
	Type       string   `json:"type"`
	ChangeType string   `json:"changetype"`
	TTL        uint     `json:"ttl"`
	Records    []Record `json:"records"`
}

type Record

type Record struct {
	Content  string `json:"content"`
	Disabled bool   `json:"disabled"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	Priority uint   `json:"priority"`
}

type RecordData

type RecordData struct {
	RRSets []RR `json:"rrsets"`
}

RecordData represents the data required to create or delete an A/CNAME record for the nameserver

Jump to

Keyboard shortcuts

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