powerdns

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: Apache-2.0 Imports: 4 Imported by: 4

README

powerdns

Go PowerDNS API Client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIVersion added in v1.1.1

type APIVersion struct {
	URL     string `json:"url"`
	Version int    `json:"version"`
}

APIVersion struct

type Error

type Error struct {
	Message string `json:"error"`
}

Error struct

func (Error) Error

func (e Error) Error() string

Error Returns

type PowerDNS

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

PowerDNS struct

func New

func New(baseURL string, server string, domain string, apikey string) (*PowerDNS, error)

New returns a new PowerDNS

func (*PowerDNS) AddRecord

func (p *PowerDNS) AddRecord(name string, recordType string, ttl int, content []string) error

AddRecord ...

func (*PowerDNS) ChangeRecord

func (p *PowerDNS) ChangeRecord(name string, recordType string, ttl int, contents []string, action string) error

ChangeRecord ...

func (*PowerDNS) DeleteRecord

func (p *PowerDNS) DeleteRecord(name string, recordType string, ttl int, content []string) error

DeleteRecord ...

func (*PowerDNS) GetRecords

func (p *PowerDNS) GetRecords() ([]Record, error)

GetRecords ...

type RRset

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

RRset struct

type RRsets

type RRsets struct {
	Sets []RRset `json:"rrsets"`
}

RRsets struct

type Record

type Record struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Content  string `json:"content"`
	TTL      int    `json:"ttl"`
	Disabled bool   `json:"disabled"`
}

Record struct

type ServerInfo

type ServerInfo struct {
	ConfigURL  string `json:"config_url"`
	DaemonType string `json:"daemon_type"`
	ID         string `json:"id"`
	Type       string `json:"type"`
	URL        string `json:"url"`
	Version    string `json:"version"`
	ZonesURL   string `json:"zones_url"`
}

ServerInfo struct

type Zone

type Zone struct {
	ID             string   `json:"id"`
	URL            string   `json:"url"`
	Name           string   `json:"name"`
	Type           string   `json:"type"`
	DNSsec         bool     `json:"dnssec"`
	Serial         int      `json:"serial"`
	NotifiedSerial int      `json:"notified_serial"`
	LastCheck      int      `json:"last_check"`
	RRsets         []RRset  `json:"rrsets"`
	Records        []Record `json:"records"`
}

Zone struct

Jump to

Keyboard shortcuts

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