Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface { // CreateZone creates the passed zone CreateZone(zone Zone) error // GetZone retrieves the zone information for the zone with the passed name. GetZone(name string) (Zone, error) // ListZones lists all zones from the provider. ListZones() ([]string, error) // UpdateZone updates the zone on the provider. UpdateZone(zone Zone) error // DeleteZone deletes the passed zone from the provider. DeleteZone(name string) error }
Provider represents an abstraction over individual dns providers handling zone management
type Record ¶
type Record struct { Class Class `yaml:"Class"` Name string `yaml:"Name"` TTL int64 `yaml:"TTL"` Type RecordType `yaml:"Type"` Value string `yaml:"Value"` Preference int64 `yaml:"Preference"` }
Record represents a dns zone record
type RecordType ¶
type RecordType string
RecordType represents the differnet dns record types (e.g. A, MX, ...)
const ( // RecordTypeA represents host address RecordTypeA RecordType = "A" // RecordTypeMX represents mail eXchange RecordTypeMX RecordType = "MX" // RecordTypeCNAME represents canonical name for an alias RecordTypeCNAME RecordType = "CNAME" // RecordTypeTXT represents descriptive text RecordTypeTXT RecordType = "TXT" // RecordTypeSRV represents location of service RecordTypeSRV RecordType = "SRV" // RecordTypePTR represents pointer RecordTypePTR RecordType = "PTR" // RecordTypeAAAA represents IPv6 host address RecordTypeAAAA RecordType = "AAAA" // RecordTypeNS represents the nameserver RecordTypeNS RecordType = "NS" // RecordTypeCAA represents certification authority authorization RecordTypeCAA RecordType = "CAA" // RecordTypeTLSA represents transport layer security authentication RecordTypeTLSA RecordType = "TLSA" // RecordTypeNAPTR represents naming authority pointer RecordTypeNAPTR RecordType = "NAPTR" // RecordTypeSSHFP represents secure shell fingerprint record RecordTypeSSHFP RecordType = "SSHFP" // RecordTypeLOC represents location information RecordTypeLOC RecordType = "LOC" // RecordTypeRP represents responsible person RecordTypeRP RecordType = "RP" // RecordTypeHINFO represents host information RecordTypeHINFO RecordType = "HINFO" // RecordTypeALIAS represents auto resolved alias RecordTypeALIAS RecordType = "ALIAS" // RecordTypeDNSKEY represents DNSSEC public key RecordTypeDNSKEY RecordType = "DNSKEY" // RecordTypeNSEC represents Next Secure RecordTypeNSEC RecordType = "NSEC" // RecordTypeDS represents delegation signer RecordTypeDS RecordType = "DS" )
type SOA ¶
type SOA struct { // MName represents the primary master name server for this zone MName string // RName represents the (encoded) email address of the administrator responsible for this zone RName string // Serial is the current serialnumber, should change with every change of the zone. Serial int64 // Refresh is the number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes. Refresh int64 // Retry is the number of seconds after which secondary name servers should retry to request the serial number from the master if the master does not respond. Retry int64 // Expire is the number of seconds after which secondary name servers should stop answering request for this zone if the master does not respond. Expire int64 // TTL is the time to live for purposes of negative caching. TTL int64 }
SOA represents the start of Authority record which contains administrative information about the zone
type Zone ¶
type Zone struct { Name string `yaml:"Name"` Records []Record `yaml:"Records"` SOA SOA `yaml:"SOA"` }
Zone represents a DNS Zone
func (*Zone) RemoveRecordsWithName ¶
func (z *Zone) RemoveRecordsWithName(name string, deleteType RecordType)
RemoveRecordsWithName removes all records from the current zone which matches the passed name, and type
Click to show internal directories.
Click to hide internal directories.