Documentation ¶
Index ¶
- Constants
- type Client
- func (client *Client) CreateRecord(zone string, record Record) (string, error)
- func (client *Client) DeleteRecordSet(zone string, name string, tpe string) error
- func (client *Client) DeleteRecordSetByID(zone string, recID string) error
- func (client *Client) ListRecords(zone string) ([]Record, error)
- func (client *Client) ListRecordsAsRRSet(zone string) ([]ResourceRecordSet, error)
- func (client *Client) ListRecordsByID(zone string, recID string) ([]Record, error)
- func (client *Client) ListRecordsByNameAndType(zone string, name string, tpe string) ([]Record, error)
- func (client *Client) ListZones() ([]ZoneInfo, error)
- func (client *Client) RecordExists(zone string, name string, tpe string) (bool, error)
- func (client *Client) RecordExistsByID(zone string, recID string) (bool, error)
- func (client *Client) ReplaceRecordSet(zone string, rrSet ResourceRecordSet) (string, error)
- type Record
- type ResourceRecordSet
- type ZoneInfo
Constants ¶
const IDSeparator string = ":::"
IDSeparator separator for record identifier.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client Powerdns API client.
func (*Client) CreateRecord ¶
CreateRecord Creates new record with single content entry
func (*Client) DeleteRecordSet ¶
DeleteRecordSet Deletes record set from Zone
func (*Client) DeleteRecordSetByID ¶
DeleteRecordSetByID Deletes record from Zone by it's ID
func (*Client) ListRecords ¶
ListRecords Returns all records in Zone
func (*Client) ListRecordsAsRRSet ¶
func (client *Client) ListRecordsAsRRSet(zone string) ([]ResourceRecordSet, error)
ListRecordsAsRRSet Returns only records of specified name and type
func (*Client) ListRecordsByID ¶
ListRecordsByID returns only records that match the specified record IDentifier.
func (*Client) ListRecordsByNameAndType ¶
func (client *Client) ListRecordsByNameAndType(zone string, name string, tpe string) ([]Record, error)
ListRecordsByNameAndType Returns only records of specified name and type
func (*Client) RecordExists ¶
RecordExists Checks if requested record exists in Zone
func (*Client) RecordExistsByID ¶
RecordExistsByID Checks if requested record exists in Zone by it's ID
func (*Client) ReplaceRecordSet ¶
func (client *Client) ReplaceRecordSet(zone string, rrSet ResourceRecordSet) (string, error)
ReplaceRecordSet Creates new record set in Zone
type Record ¶
type Record struct { Name string `json:"name"` Type string `json:"type"` Content string `json:"content"` TTL int `json:"ttl"` // For API v0 Disabled bool `json:"disabled"` }
Record Data representing Record Information.
type ResourceRecordSet ¶
type ResourceRecordSet struct { Name string `json:"name"` Type string `json:"type"` ChangeType string `json:"changetype"` TTL int `json:"ttl"` // For API v1 Records []Record `json:"records,omitempty"` }
ResourceRecordSet Data representing Resource Record Set Information.
func (*ResourceRecordSet) ID ¶
func (rrSet *ResourceRecordSet) ID() string
ID Returns the resource record identifier.
type ZoneInfo ¶
type ZoneInfo struct { ID string `json:"ID"` Name string `json:"name"` Account string `json:"account"` URL string `json:"url"` LastCheck int64 `json:"last_check"` Kind string `json:"kind"` DNSSec bool `json:"dnsssec"` Serial int64 `json:"serial"` NotifiedSerial int64 `json:"notified_serial"` Masters []string `json:"masters"` Records []Record `json:"records,omitempty"` ResourceRecordSets []ResourceRecordSet `json:"rrsets,omitempty"` }
ZoneInfo Data representing Zone Information.