Documentation ¶
Index ¶
- func Canonicalize(name string) string
- func DeCanonicalize(name string) string
- type Comment
- type FlushResult
- type ForwardZone
- type ForwardZones
- type HealthResult
- type InfoResult
- type ObjectType
- type Record
- type RecordSetChangeType
- type ResourceRecordSet
- type SearchResult
- type SearchResults
- type VersionInfo
- type Zone
- type ZoneKind
- type ZoneNameservers
- type ZoneType
- type Zones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeCanonicalize ¶
DeCanonicalize returns not canonicalized string
Types ¶
type Comment ¶
type Comment struct { Content string `json:"content"` Account string `json:"account"` ModifiedAt int `json:"modified_at"` }
Comment a comment about an Resource Record Set
type FlushResult ¶
FlushResult
func (FlushResult) JSON ¶
func (fr FlushResult) JSON() string
JSON returns FlushResult as a JSON string
func (FlushResult) PrettyString ¶
func (fr FlushResult) PrettyString() string
PrettyString returns FlushResult as a pretty formatted string
type ForwardZone ¶
type ForwardZone struct { Name string `json:"name"` Nameservers ZoneNameservers `json:"nameservers"` }
ForwardZone represent forwarding zone for settings in PowerDNS Recursor
func (ForwardZone) JSON ¶
func (fz ForwardZone) JSON() string
JSON returns the JSON representation of the forwarding zone
func (ForwardZone) PrettyString ¶
func (fz ForwardZone) PrettyString() string
PrettyString creates a pretty string of the forwarding zone
type ForwardZones ¶
type ForwardZones []*ForwardZone
ForwardZones represent list of zorwarding zones
func (ForwardZones) JSON ¶
func (fzs ForwardZones) JSON() string
JSON returns the JSON representation of the forwarding zones list
func (ForwardZones) PrettyString ¶
func (fzs ForwardZones) PrettyString() string
PrettyString cretes a pretty string of the forwarding zones list
type HealthResult ¶
HealthResult represents the health info result
func (HealthResult) JSON ¶
func (h HealthResult) JSON() string
JSON returns HealthResult as a JSON string
func (HealthResult) PrettyString ¶
func (h HealthResult) PrettyString() string
PrettyString returns the HealthResult as a pretty formatted string
type InfoResult ¶
type InfoResult struct { Version string `json:"version"` Commit string `json:"commit"` Go string `json:"go"` }
InfoResult represents the info result
func (InfoResult) PrettyString ¶
func (i InfoResult) PrettyString() string
PrettyString returns the InfoResult as a pretty formatted string
type ObjectType ¶
type ObjectType int
ObjectType epresents the object type for which a search should be performed Possible object types; according to the PowerDNS documentation, this list is exhaustive.
const ( ObjectTypeAll ObjectType = iota ObjectTypeZone ObjectTypeRecord ObjectTypeComment )
func (ObjectType) String ¶
func (t ObjectType) String() string
String makes this type implement fmt.Stringer
func (*ObjectType) UnmarshalJSON ¶
func (t *ObjectType) UnmarshalJSON(b []byte) error
UnmarshalJSON makes this type implement json.Unmarshaler
type Record ¶
type Record struct { Content string `json:"content"` Disabled bool `json:"disabled"` SetPTR bool `json:"set-ptr,omitempty"` }
Record represents a single record
type RecordSetChangeType ¶
type RecordSetChangeType int
RecordSetChangeType MUST be added when updating the RRSet. Must be REPLACE or DELETE. With DELETE, all existing RRs matching name and type will be deleted, including all comments. With REPLACE: when records is present, all existing RRs matching name and type will be deleted, and then new records given in records will be created. If no records are left, any existing comments will be deleted as well. When comments is present, all existing comments for the RRs matching name and type will be deleted, and then new comments given in comments will be created.
const ( // ChangeTypeDelete represents DELETE RecordSetChangeType ChangeTypeDelete RecordSetChangeType = iota // ChangeTypeReplace represents REPLACE RecordSetChangeType ChangeTypeReplace )
func (RecordSetChangeType) MarshalJSON ¶
func (k RecordSetChangeType) MarshalJSON() ([]byte, error)
MarshalJSON implements the `json.Marshaler` interface
func (*RecordSetChangeType) UnmarshalJSON ¶
func (k *RecordSetChangeType) UnmarshalJSON(input []byte) error
UnmarshalJSON implements the `json.Unmarshaler` interface
type ResourceRecordSet ¶
type ResourceRecordSet struct { Name string `json:"name"` Type string `json:"type"` TTL int `json:"ttl"` ChangeType RecordSetChangeType `json:"changetype,omitempty"` Records []Record `json:"records"` Comments []Comment `json:"comments"` }
ResourceRecordSet represents a Resource Record Set (all records with the same name and type).
type SearchResult ¶
type SearchResult struct { Content string `json:"content"` Disabled bool `json:"disabled"` Name string `json:"name"` ObjectType ObjectType `json:"object_type"` ZoneID string `json:"zone_id"` Zone string `json:"zone"` Type string `json:"type"` TTL int `json:"ttl"` }
SearchResult represents a single search result.
type SearchResults ¶
type SearchResults []SearchResult
SearchResults represents a list of search results.
func (SearchResults) JSON ¶
func (r SearchResults) JSON() string
JSON returns SearchResults as a JSON string
func (SearchResults) PrettyString ¶
func (searchReults SearchResults) PrettyString() string
PrettyString returns SearchResults as a pretty formatted string
type VersionInfo ¶
VersionInfo represents version info
func (VersionInfo) JSON ¶
func (v VersionInfo) JSON() string
JSON returns VersionInfo as a JSON string
func (VersionInfo) PrettyString ¶
func (v VersionInfo) PrettyString() string
PrettyString returns the VersionInfo as a pretty formatted string
type Zone ¶
type Zone struct { ID string `json:"id,omitempty"` Name string `json:"name"` Type ZoneType `json:"type"` URL string `json:"url,omitempty"` Kind ZoneKind `json:"kind,omitempty"` ResourceRecordSets []ResourceRecordSet `json:"rrsets,omitempty"` Serial int `json:"serial,omitempty"` NotifiedSerial int `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 ZoneNameservers `json:"nameservers"` TSIGMasterKeyIDs []string `json:"tsig_master_key_ids,omitempty"` TSIGSlaveKeyIDs []string `json:"tsig_slave_key_ids,omitempty"` }
Zone represents an authoritative DNS Zone
func (Zone) PrettyString ¶
PrettyString returns zone as a pretty formatted string
type ZoneKind ¶
type ZoneKind int
ZoneKind DNS zone kind, one of `Native`, `Master`, `Slave`
func (ZoneKind) MarshalJSON ¶
MarshalJSON implements the `json.Marshaler` interface
func (*ZoneKind) UnmarshalJSON ¶
UnmarshalJSON implements the `json.Unmarshaler` interface
type ZoneNameservers ¶
type ZoneNameservers []string
ZoneNameservers is a special list type to represent the nameservers of a zone. When nil, this type will still serialize to an empty JSON list. See https://github.com/mittwald/go-powerdns/issues/4 for more information
func (ZoneNameservers) MarshalJSON ¶
func (z ZoneNameservers) MarshalJSON() ([]byte, error)
MarshalJSON implements the `json.Marshaler` interface
type ZoneType ¶
type ZoneType int
ZoneType zone type
func (ZoneType) MarshalJSON ¶
MarshalJSON implements the `json.Marshaler` interface
func (*ZoneType) UnmarshalJSON ¶
UnmarshalJSON implements the `json.Unmarshaler` interface
type Zones ¶
type Zones []*Zone
Zones represents the list of an authoritative DNS Zones
func (Zones) PrettyString ¶
PrettyString returns the list of zones as a pretty formatted string