internal

package
v4.14.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 14 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 {
	Host       *url.URL
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client the PowerDNS API client.

func NewClient

func NewClient(host *url.URL, serverName string, apiKey string) *Client

NewClient creates a new Client.

func (*Client) APIVersion

func (c *Client) APIVersion() int

func (*Client) GetHostedZone

func (c *Client) GetHostedZone(ctx context.Context, authZone string) (*HostedZone, error)

func (*Client) Notify

func (c *Client) Notify(ctx context.Context, zone *HostedZone) error

func (*Client) SetAPIVersion

func (c *Client) SetAPIVersion(ctx context.Context) error

func (*Client) UpdateRecords

func (c *Client) UpdateRecords(ctx context.Context, zone *HostedZone, sets RRSets) error

type HostedZone

type HostedZone struct {
	ID     string  `json:"id"`
	Name   string  `json:"name"`
	URL    string  `json:"url"`
	Kind   string  `json:"kind"`
	RRSets []RRSet `json:"rrsets"`

	// pre-v1 API
	Records []Record `json:"records"`
}

type RRSet

type RRSet struct {
	Name       string   `json:"name"`
	Type       string   `json:"type"`
	Kind       string   `json:"kind"`
	ChangeType string   `json:"changetype"`
	Records    []Record `json:"records,omitempty"`
	TTL        int      `json:"ttl,omitempty"`
}

type RRSets

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

type Record

type Record struct {
	Content  string `json:"content"`
	Disabled bool   `json:"disabled"`

	// pre-v1 API
	Name string `json:"name"`
	Type string `json:"type"`
	TTL  int    `json:"ttl,omitempty"`
}

Jump to

Keyboard shortcuts

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