Documentation ¶
Index ¶
- type Comment
- type Cryptokey
- type Error
- type Export
- type NotifyResult
- type PowerDNS
- type RRset
- type RRsets
- type Record
- type Server
- type Statistic
- type Zone
- func (z *Zone) AddRecord(name string, recordType string, ttl int, content []string) error
- func (z *Zone) ChangeRecord(name string, recordType string, ttl int, content []string) error
- func (z *Zone) DeleteRecord(name string, recordType string) error
- func (z *Zone) Export() (Export, error)
- func (z *Zone) GetCryptokey(id string) (*Cryptokey, error)
- func (z *Zone) GetCryptokeys() ([]Cryptokey, error)
- func (z *Zone) Notify() (*NotifyResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Content string `json:"content"` Account string `json:"account"` ModifiedAt int `json:"modified_at"` }
Comment structure with JSON API metadata
type Cryptokey ¶
type Cryptokey struct { Type string `json:"type"` ID string `json:"id"` KeyType string `json:"keytype"` Active bool `json:"active"` DNSkey string `json:"dnskey"` DS []string `json:"ds"` Privatekey string `json:"privatekey"` Algorithm string `json:"algorithm"` Bits int `json:"bits"` ZoneHandle *Zone }
Cryptokey structure with JSON API metadata
func (*Cryptokey) DeleteCryptokey ¶
DeleteCryptokey removes a given Cryptokey
func (*Cryptokey) ToggleCryptokey ¶
ToggleCryptokey enables/disables a given Cryptokey
type Error ¶
type Error struct {
Message string `json:"error"`
}
Error structure with JSON API metadata
type NotifyResult ¶
type NotifyResult struct {
Result string `json:"result"`
}
NotifyResult structure with JSON API metadata
type PowerDNS ¶
type PowerDNS struct { Scheme string Hostname string Port string VHost string Headers map[string]string // contains filtered or unexported fields }
PowerDNS configuration structure
func NewClient ¶
func NewClient(baseURL string, vhost string, headers map[string]string, httpClient *http.Client) *PowerDNS
NewClient initializes a new PowerDNS client configuration
func (*PowerDNS) GetServers ¶
GetServers retrieves a list of Servers
func (*PowerDNS) GetStatistics ¶
GetStatistics retrieves a list of Statistics
type RRset ¶
type RRset struct { Name string `json:"name"` Type string `json:"type"` TTL int `json:"ttl"` ChangeType string `json:"changetype"` Records []Record `json:"records"` Comments []Comment `json:"comments"` }
RRset structure with JSON API metadata
type RRsets ¶
type RRsets struct {
Sets []RRset `json:"rrsets"`
}
RRsets structure with JSON API metadata
type Record ¶
type Record struct { Content string `json:"content"` Disabled bool `json:"disabled"` SetPTR bool `json:"set-ptr"` }
Record structure with JSON API metadata
type Server ¶
type Server struct { Type string `json:"type"` ID string `json:"id"` DaemonType string `json:"daemon_type"` Version string `json:"version"` URL string `json:"url"` ConfigURL string `json:"config_url"` ZonesURL string `json:"zones_url"` }
Server structure with JSON API metadata
type Statistic ¶
type Statistic struct { Name string `json:"name"` Type string `json:"type"` Value string `json:"value"` }
Statistic structure with JSON API metadata
type Zone ¶
type Zone struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` URL string `json:"url"` Kind string `json:"kind"` RRsets []RRset `json:"rrsets"` Serial int `json:"serial"` NotifiedSerial int `json:"notified_serial"` Masters []string `json:"masters"` DNSsec bool `json:"dnssec"` Nsec3Param string `json:"nsec3param"` Nsec3Narrow bool `json:"nsec3narrow"` Presigned bool `json:"presigned"` SOAEdit string `json:"soa_edit"` SOAEditAPI string `json:"soa_edit_api"` APIRectify bool `json:"api_rectify"` Zone string `json:"zone"` Account string `json:"account"` Nameservers []string `json:"nameservers"` PowerDNSHandle *PowerDNS }
Zone structure with JSON API metadata
func (*Zone) ChangeRecord ¶
ChangeRecord replaces an existing resource record
func (*Zone) DeleteRecord ¶
DeleteRecord removes an existing resource record
func (*Zone) GetCryptokey ¶
GetCryptokey returns a certain Cryptokey instance of a given Zone
func (*Zone) GetCryptokeys ¶
GetCryptokeys retrieves a list of Cryptokeys that belong to a Zone
func (*Zone) Notify ¶
func (z *Zone) Notify() (*NotifyResult, error)
Notify sends a DNS notify packet to all slaves