Documentation ¶
Index ¶
- Variables
- func Provider() terraform.ResourceProvider
- type Client
- func (client *Client) CreateZone(zoneInfo ZoneInfo) (ZoneInfo, error)
- func (client *Client) DeleteRecordSet(zone string, name string, tpe string) error
- func (client *Client) DeleteRecordSetByID(zone string, recID string) error
- func (client *Client) DeleteZone(name string) error
- func (client *Client) GetZone(name string) (ZoneInfo, error)
- func (client *Client) ListRecords(zone string) ([]Record, error)
- func (client *Client) ListRecordsByID(zone string, recID string) ([]Record, error)
- func (client *Client) ListRecordsInRRSet(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)
- func (client *Client) UpdateZone(name string, zoneInfo ZoneInfo) error
- func (client *Client) ZoneExists(name string) (bool, error)
- type Config
- type Record
- type ResourceRecordSet
- type ZoneInfo
Constants ¶
This section is empty.
Variables ¶
var DefaultSchema = "https"
DefaultSchema is the value used for the URL in case no schema is explicitly defined
Functions ¶
func Provider ¶
func Provider() terraform.ResourceProvider
Provider returns a schema.Provider for PowerDNS.
Types ¶
type Client ¶
type Client struct { ServerURL string // Location of PowerDNS server to use ServerVersion string APIKey string // REST API Static authentication key APIVersion int // API version to use HTTP *http.Client }
Client is a PowerDNS client representation
func (*Client) CreateZone ¶ added in v0.2.0
CreateZone creates a zone
func (*Client) DeleteRecordSet ¶
DeleteRecordSet deletes record set from Zone
func (*Client) DeleteRecordSetByID ¶
DeleteRecordSetByID deletes record from Zone by its ID
func (*Client) DeleteZone ¶ added in v0.2.0
DeleteZone deletes a zone
func (*Client) ListRecords ¶
ListRecords returns all records in Zone
func (*Client) ListRecordsByID ¶
ListRecordsByID returns all records by IDs
func (*Client) ListRecordsInRRSet ¶
ListRecordsInRRSet 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
func (*Client) UpdateZone ¶ added in v0.2.0
UpdateZone updates a 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"` SetPtr bool `json:"set-ptr"` }
Record represents a PowerDNS record object
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 represents a PowerDNS RRSet object
func (*ResourceRecordSet) ID ¶ added in v1.1.0
func (rrSet *ResourceRecordSet) ID() string
ID returns a rrSet with the ID format
type ZoneInfo ¶
type ZoneInfo struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` Kind string `json:"kind"` DNSSec bool `json:"dnsssec"` Serial int64 `json:"serial"` Records []Record `json:"records,omitempty"` ResourceRecordSets []ResourceRecordSet `json:"rrsets,omitempty"` Nameservers []string `json:"nameservers,omitempty"` Masters []string `json:"masters,omitempty"` SoaEditAPI string `json:"soa_edit_api"` }
ZoneInfo represents a PowerDNS zone object