Documentation ¶
Index ¶
- type Comment
- type Cryptokey
- type Error
- type Export
- type NotifyResult
- type PowerDNS
- func (p *PowerDNS) AddMasterZone(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, ...) (*Zone, error)
- func (p *PowerDNS) AddNativeZone(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, ...) (*Zone, error)
- func (p *PowerDNS) AddSlaveZone(domain string, masters []string) (*Zone, error)
- func (p *PowerDNS) ChangeZone(zone *Zone) error
- func (p *PowerDNS) DeleteZone(domain string) error
- func (p *PowerDNS) GetServer() (*Server, error)
- func (p *PowerDNS) GetServers() ([]Server, error)
- func (p *PowerDNS) GetStatistics() ([]Statistic, error)
- func (p *PowerDNS) GetZone(domain string) (*Zone, error)
- func (p *PowerDNS) GetZones() ([]Zone, error)
- type RRset
- type RRsets
- type Record
- type Server
- type Statistic
- type Zone
- func (z *Zone) AddRecord(name string, recordType string, ttl uint32, content []string) error
- func (z *Zone) ChangeRecord(name string, recordType string, ttl uint32, content []string) error
- func (z *Zone) DeleteCryptokey(id uint64) error
- func (z *Zone) DeleteRecord(name string, recordType string) error
- func (z *Zone) DeleteZone() error
- func (z *Zone) Export() (Export, error)
- func (z *Zone) GetCryptokey(id uint64) (*Cryptokey, error)
- func (z *Zone) GetCryptokeys() ([]Cryptokey, error)
- func (z *Zone) Notify() (*NotifyResult, error)
- func (z *Zone) ToggleCryptokey(id uint64) error
- type ZoneKind
- type ZoneType
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,omitempty"` Account string `json:"account,omitempty"` ModifiedAt uint64 `json:"modified_at,omitempty"` }
Comment structure with JSON API metadata
type Cryptokey ¶
type Cryptokey struct { Type string `json:"type,omitempty"` ID uint64 `json:"id,omitempty"` KeyType string `json:"keytype,omitempty"` Active bool `json:"active,omitempty"` DNSkey string `json:"dnskey,omitempty"` DS []string `json:"ds,omitempty"` Privatekey string `json:"privatekey,omitempty"` Algorithm string `json:"algorithm,omitempty"` Bits uint64 `json:"bits,omitempty"` ZoneHandle *Zone `json:"-"` }
Cryptokey structure with JSON API metadata
func (*Cryptokey) DeleteCryptokey ¶
DeleteCryptokey removes a given Cryptokey
func (*Cryptokey) ToggleCryptokey ¶
ToggleCryptokey enables/disables a given Cryptokey
type NotifyResult ¶
type NotifyResult struct {
Result string `json:"result,omitempty"`
}
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) AddMasterZone ¶
func (p *PowerDNS) AddMasterZone(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, soaEdit string, soaEditApi string, apiRectify bool, nameservers []string) (*Zone, error)
AddMasterZone creates a new master zone
func (*PowerDNS) AddNativeZone ¶
func (p *PowerDNS) AddNativeZone(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, soaEdit string, soaEditApi string, apiRectify bool, nameservers []string) (*Zone, error)
AddNativeZone creates a new native zone
func (*PowerDNS) AddSlaveZone ¶
AddSlaveZone creates a new slave zone
func (*PowerDNS) ChangeZone ¶
ChangeZone modifies an existing zone
func (*PowerDNS) DeleteZone ¶
DeleteZone removes a certain Zone for a given domain
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,omitempty"` Type string `json:"type,omitempty"` TTL uint32 `json:"ttl,omitempty"` ChangeType string `json:"changetype,omitempty"` Records []Record `json:"records,omitempty"` Comments []Comment `json:"comments,omitempty"` }
RRset structure with JSON API metadata
type RRsets ¶
type RRsets struct {
Sets []RRset `json:"rrsets,omitempty"`
}
RRsets structure with JSON API metadata
type Record ¶
type Record struct { Content string `json:"content,omitempty"` Disabled bool `json:"disabled"` SetPTR bool `json:"set-ptr,omitempty"` }
Record structure with JSON API metadata
type Server ¶
type Server struct { Type string `json:"type,omitempty"` ID string `json:"id,omitempty"` DaemonType string `json:"daemon_type,omitempty"` Version string `json:"version,omitempty"` URL string `json:"url,omitempty"` ConfigURL string `json:"config_url,omitempty"` ZonesURL string `json:"zones_url,omitempty"` }
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,omitempty"` Name string `json:"name,omitempty"` Type ZoneType `json:"type,omitempty"` URL string `json:"url,omitempty"` Kind ZoneKind `json:"kind,omitempty"` RRsets []RRset `json:"rrsets,omitempty"` Serial uint32 `json:"serial,omitempty"` NotifiedSerial uint32 `json:"notified_serial,omitempty"` Masters []string `json:"masters,omitempty"` DNSsec bool `json:"dnssec,omitempty"` Nsec3Param string `json:"nsec3param,omitempty"` Nsec3Narrow bool `json:"nsec3narrow,omitempty"` Presigned bool `json:"presigned,omitempty"` SOAEdit string `json:"soa_edit,omitempty"` SOAEditAPI string `json:"soa_edit_api,omitempty"` APIRectify bool `json:"api_rectify,omitempty"` Zone string `json:"zone,omitempty"` Account string `json:"account,omitempty"` Nameservers []string `json:"nameservers,omitempty"` MasterTSIGKeyIDs []string `json:"master_tsig_key_ids,omitempty"` SlaveTSIGKeyIDs []string `json:"slave_tsig_key_ids,omitempty"` PowerDNSHandle *PowerDNS `json:"-"` }
Zone structure with JSON API metadata
func (*Zone) ChangeRecord ¶
ChangeRecord replaces an existing resource record
func (*Zone) DeleteCryptokey ¶
DeleteCryptokey removes a given Cryptokey
func (*Zone) DeleteRecord ¶
DeleteRecord removes an existing resource record
func (*Zone) DeleteZone ¶
DeleteZone removes a certain Zone for a given domain
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
func (*Zone) ToggleCryptokey ¶
ToggleCryptokey enables/disables a given Cryptokey