Documentation
¶
Index ¶
- Variables
- func Init(config edgegrid.Config)
- func IsConfigDNSError(e error) bool
- type ARecord
- type AaaaRecord
- type AfsdbRecord
- type CnameRecord
- type ConfigDNSError
- type DNSRecord
- type DnskeyRecord
- type DsRecord
- type HinfoRecord
- type LocRecord
- type MxRecord
- type NaptrRecord
- type NsRecord
- type Nsec3Record
- type Nsec3paramRecord
- type PtrRecord
- type RecordError
- type RpRecord
- type RrsigRecord
- type SoaRecord
- type SpfRecord
- type SrvRecord
- type SshfpRecord
- type TxtRecord
- type Zone
- func (zone *Zone) AddRecord(recordPtr interface{}) error
- func (zone *Zone) Delete() error
- func (zone *Zone) FindRecords(recordType string, options map[string]interface{}) []DNSRecord
- func (zone *Zone) PreMarshalJSON() error
- func (zone *Zone) RemoveRecord(recordPtr interface{}) error
- func (zone *Zone) Save() error
- type ZoneError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config contains the Akamai OPEN Edgegrid API credentials // for automatic signing of requests Config edgegrid.Config )
Functions ¶
func IsConfigDNSError ¶ added in v0.5.0
Types ¶
type ARecord ¶ added in v0.5.0
type ARecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewARecord ¶ added in v0.5.0
func NewARecord() *ARecord
func (*ARecord) GetAllowedFields ¶ added in v0.5.0
type AaaaRecord ¶ added in v0.5.0
type AaaaRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewAaaaRecord ¶ added in v0.5.0
func NewAaaaRecord() *AaaaRecord
func (*AaaaRecord) GetAllowedFields ¶ added in v0.5.0
func (record *AaaaRecord) GetAllowedFields() []string
func (*AaaaRecord) SetField ¶ added in v0.5.0
func (record *AaaaRecord) SetField(name string, value interface{}) error
func (*AaaaRecord) ToMap ¶ added in v0.5.0
func (record *AaaaRecord) ToMap() map[string]interface{}
type AfsdbRecord ¶ added in v0.5.0
type AfsdbRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
Subtype int `json:"subtype,omitempty"`
// contains filtered or unexported fields
}
func NewAfsdbRecord ¶ added in v0.5.0
func NewAfsdbRecord() *AfsdbRecord
func (*AfsdbRecord) GetAllowedFields ¶ added in v0.5.0
func (record *AfsdbRecord) GetAllowedFields() []string
func (*AfsdbRecord) SetField ¶ added in v0.5.0
func (record *AfsdbRecord) SetField(name string, value interface{}) error
func (*AfsdbRecord) ToMap ¶ added in v0.5.0
func (record *AfsdbRecord) ToMap() map[string]interface{}
type CnameRecord ¶ added in v0.5.0
type CnameRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewCnameRecord ¶ added in v0.5.0
func NewCnameRecord() *CnameRecord
func (*CnameRecord) GetAllowedFields ¶ added in v0.5.0
func (record *CnameRecord) GetAllowedFields() []string
func (*CnameRecord) SetField ¶ added in v0.5.0
func (record *CnameRecord) SetField(name string, value interface{}) error
func (*CnameRecord) ToMap ¶ added in v0.5.0
func (record *CnameRecord) ToMap() map[string]interface{}
type ConfigDNSError ¶ added in v0.5.0
type DNSRecord ¶ added in v0.5.0
type DNSRecord interface {
// Get the list of allowed fields for this type
GetAllowedFields() []string
// Set a field on the struct, which check for valid fields
SetField(name string, value interface{}) error
// Translate struct properties to a map
ToMap() map[string]interface{}
}
All record types (below) must implement the DNSRecord interface This allows the record to be used dynamically in slices - see the Zone struct definition in zone.go
The record types implemented and their fields are as defined here https://developer.akamai.com/api/luna/config-dns/data.html
type DnskeyRecord ¶ added in v0.5.0
type DnskeyRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Flags int `json:"flags,omitempty"`
Protocol int `json:"protocol,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
Key string `json:"key,omitempty"`
// contains filtered or unexported fields
}
func NewDnskeyRecord ¶ added in v0.5.0
func NewDnskeyRecord() *DnskeyRecord
func (*DnskeyRecord) GetAllowedFields ¶ added in v0.5.0
func (record *DnskeyRecord) GetAllowedFields() []string
func (*DnskeyRecord) SetField ¶ added in v0.5.0
func (record *DnskeyRecord) SetField(name string, value interface{}) error
func (*DnskeyRecord) ToMap ¶ added in v0.5.0
func (record *DnskeyRecord) ToMap() map[string]interface{}
type DsRecord ¶ added in v0.5.0
type DsRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Keytag int `json:"keytag,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
DigestType int `json:"digest_type,omitempty"`
Digest string `json:"digest,omitempty"`
// contains filtered or unexported fields
}
func NewDsRecord ¶ added in v0.5.0
func NewDsRecord() *DsRecord
func (*DsRecord) GetAllowedFields ¶ added in v0.5.0
type HinfoRecord ¶ added in v0.5.0
type HinfoRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Hardware string `json:"hardware,omitempty"`
Software string `json:"software,omitempty"`
// contains filtered or unexported fields
}
func NewHinfoRecord ¶ added in v0.5.0
func NewHinfoRecord() *HinfoRecord
func (*HinfoRecord) GetAllowedFields ¶ added in v0.5.0
func (record *HinfoRecord) GetAllowedFields() []string
func (*HinfoRecord) SetField ¶ added in v0.5.0
func (record *HinfoRecord) SetField(name string, value interface{}) error
func (*HinfoRecord) ToMap ¶ added in v0.5.0
func (record *HinfoRecord) ToMap() map[string]interface{}
type LocRecord ¶ added in v0.5.0
type LocRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewLocRecord ¶ added in v0.5.0
func NewLocRecord() *LocRecord
func (*LocRecord) GetAllowedFields ¶ added in v0.5.0
type MxRecord ¶ added in v0.5.0
type MxRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
Priority int `json:"priority,omitempty"`
// contains filtered or unexported fields
}
func NewMxRecord ¶ added in v0.5.0
func NewMxRecord() *MxRecord
func (*MxRecord) GetAllowedFields ¶ added in v0.5.0
type NaptrRecord ¶
type NaptrRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Order uint16 `json:"order,omitempty"`
Preference uint16 `json:"preference,omitempty"`
Flags string `json:"flags,omitempty"`
Service string `json:"service,omitempty"`
Regexp string `json:"regexp,omitempty"`
Replacement string `json:"replacement,omitempty"`
// contains filtered or unexported fields
}
func NewNaptrRecord ¶ added in v0.5.0
func NewNaptrRecord() *NaptrRecord
func (*NaptrRecord) GetAllowedFields ¶ added in v0.5.0
func (record *NaptrRecord) GetAllowedFields() []string
func (*NaptrRecord) SetField ¶ added in v0.5.0
func (record *NaptrRecord) SetField(name string, value interface{}) error
func (*NaptrRecord) ToMap ¶ added in v0.5.0
func (record *NaptrRecord) ToMap() map[string]interface{}
type NsRecord ¶
type NsRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewNsRecord ¶ added in v0.5.0
func NewNsRecord() *NsRecord
func (*NsRecord) GetAllowedFields ¶ added in v0.5.0
type Nsec3Record ¶
type Nsec3Record struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
Flags int `json:"flags,omitempty"`
Iterations int `json:"iterations,omitempty"`
Salt string `json:"salt,omitempty"`
NextHashedOwnerName string `json:"next_hashed_owner_name,omitempty"`
TypeBitmaps string `json:"type_bitmaps,omitempty"`
// contains filtered or unexported fields
}
func NewNsec3Record ¶ added in v0.5.0
func NewNsec3Record() *Nsec3Record
func (*Nsec3Record) GetAllowedFields ¶ added in v0.5.0
func (record *Nsec3Record) GetAllowedFields() []string
func (*Nsec3Record) SetField ¶ added in v0.5.0
func (record *Nsec3Record) SetField(name string, value interface{}) error
func (*Nsec3Record) ToMap ¶ added in v0.5.0
func (record *Nsec3Record) ToMap() map[string]interface{}
type Nsec3paramRecord ¶
type Nsec3paramRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
Flags int `json:"flags,omitempty"`
Iterations int `json:"iterations,omitempty"`
Salt string `json:"salt,omitempty"`
// contains filtered or unexported fields
}
func NewNsec3paramRecord ¶ added in v0.5.0
func NewNsec3paramRecord() *Nsec3paramRecord
func (*Nsec3paramRecord) GetAllowedFields ¶ added in v0.5.0
func (record *Nsec3paramRecord) GetAllowedFields() []string
func (*Nsec3paramRecord) SetField ¶ added in v0.5.0
func (record *Nsec3paramRecord) SetField(name string, value interface{}) error
func (*Nsec3paramRecord) ToMap ¶ added in v0.5.0
func (record *Nsec3paramRecord) ToMap() map[string]interface{}
type PtrRecord ¶ added in v0.5.0
type PtrRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewPtrRecord ¶ added in v0.5.0
func NewPtrRecord() *PtrRecord
func (*PtrRecord) GetAllowedFields ¶ added in v0.5.0
type RecordError ¶ added in v0.5.0
type RecordError struct {
// contains filtered or unexported fields
}
func (*RecordError) Error ¶ added in v0.5.0
func (e *RecordError) Error() string
func (*RecordError) FailedToSave ¶ added in v0.5.0
func (e *RecordError) FailedToSave() bool
func (*RecordError) Network ¶ added in v0.5.0
func (e *RecordError) Network() bool
func (*RecordError) NotFound ¶ added in v0.5.0
func (e *RecordError) NotFound() bool
func (*RecordError) ValidationFailed ¶ added in v0.5.0
func (e *RecordError) ValidationFailed() bool
type RpRecord ¶ added in v0.5.0
type RpRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Mailbox string `json:"mailbox,omitempty"`
Txt string `json:"txt,omitempty"`
// contains filtered or unexported fields
}
func NewRpRecord ¶ added in v0.5.0
func NewRpRecord() *RpRecord
func (*RpRecord) GetAllowedFields ¶ added in v0.5.0
type RrsigRecord ¶ added in v0.5.0
type RrsigRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
TypeCovered string `json:"type_covered,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
OriginalTTL int `json:"original_ttl,omitempty"`
Expiration string `json:"expiration,omitempty"`
Inception string `json:"inception,omitempty"`
Keytag int `json:"keytag,omitempty"`
Signer string `json:"signer,omitempty"`
Signature string `json:"signature,omitempty"`
Labels int `json:"labels,omitempty"`
// contains filtered or unexported fields
}
func NewRrsigRecord ¶ added in v0.5.0
func NewRrsigRecord() *RrsigRecord
func (*RrsigRecord) GetAllowedFields ¶ added in v0.5.0
func (record *RrsigRecord) GetAllowedFields() []string
func (*RrsigRecord) SetField ¶ added in v0.5.0
func (record *RrsigRecord) SetField(name string, value interface{}) error
func (*RrsigRecord) ToMap ¶ added in v0.5.0
func (record *RrsigRecord) ToMap() map[string]interface{}
type SoaRecord ¶ added in v0.5.0
type SoaRecord struct {
TTL int `json:"ttl,omitempty"`
Originserver string `json:"originserver,omitempty"`
Contact string `json:"contact,omitempty"`
Serial uint `json:"serial,omitempty"`
Refresh int `json:"refresh,omitempty"`
Retry int `json:"retry,omitempty"`
Expire int `json:"expire,omitempty"`
Minimum uint `json:"minimum,omitempty"`
// contains filtered or unexported fields
}
func NewSoaRecord ¶ added in v0.5.0
func NewSoaRecord() *SoaRecord
func (*SoaRecord) GetAllowedFields ¶ added in v0.5.0
type SpfRecord ¶ added in v0.5.0
type SpfRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewSpfRecord ¶ added in v0.5.0
func NewSpfRecord() *SpfRecord
func (*SpfRecord) GetAllowedFields ¶ added in v0.5.0
type SrvRecord ¶
type SrvRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
Priority int `json:"priority,omitempty"`
Weight uint16 `json:"weight,omitempty"`
Port uint16 `json:"port,omitempty"`
// contains filtered or unexported fields
}
func NewSrvRecord ¶ added in v0.5.0
func NewSrvRecord() *SrvRecord
func (*SrvRecord) GetAllowedFields ¶ added in v0.5.0
type SshfpRecord ¶ added in v0.5.0
type SshfpRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
FingerprintType int `json:"fingerprint_type,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
// contains filtered or unexported fields
}
func NewSshfpRecord ¶ added in v0.5.0
func NewSshfpRecord() *SshfpRecord
func (*SshfpRecord) GetAllowedFields ¶ added in v0.5.0
func (record *SshfpRecord) GetAllowedFields() []string
func (*SshfpRecord) SetField ¶ added in v0.5.0
func (record *SshfpRecord) SetField(name string, value interface{}) error
func (*SshfpRecord) ToMap ¶ added in v0.5.0
func (record *SshfpRecord) ToMap() map[string]interface{}
type TxtRecord ¶ added in v0.5.0
type TxtRecord struct {
Name string `json:"name,omitempty"`
TTL int `json:"ttl,omitempty"`
Active bool `json:"active,omitempty"`
Target string `json:"target,omitempty"`
// contains filtered or unexported fields
}
func NewTxtRecord ¶ added in v0.5.0
func NewTxtRecord() *TxtRecord
func (*TxtRecord) GetAllowedFields ¶ added in v0.5.0
type Zone ¶
type Zone struct {
Token string `json:"token"`
Zone struct {
Name string `json:"name,omitempty"`
A []*ARecord `json:"a,omitempty"`
Aaaa []*AaaaRecord `json:"aaaa,omitempty"`
Afsdb []*AfsdbRecord `json:"afsdb,omitempty"`
Cname []*CnameRecord `json:"cname,omitempty"`
Dnskey []*DnskeyRecord `json:"dnskey,omitempty"`
Ds []*DsRecord `json:"ds,omitempty"`
Hinfo []*HinfoRecord `json:"hinfo,omitempty"`
Loc []*LocRecord `json:"loc,omitempty"`
Mx []*MxRecord `json:"mx,omitempty"`
Naptr []*NaptrRecord `json:"naptr,omitempty"`
Ns []*NsRecord `json:"ns,omitempty"`
Nsec3 []*Nsec3Record `json:"nsec3,omitempty"`
Nsec3param []*Nsec3paramRecord `json:"nsec3param,omitempty"`
Ptr []*PtrRecord `json:"ptr,omitempty"`
Rp []*RpRecord `json:"rp,omitempty"`
Rrsig []*RrsigRecord `json:"rrsig,omitempty"`
Soa *SoaRecord `json:"soa,omitempty"`
Spf []*SpfRecord `json:"spf,omitempty"`
Srv []*SrvRecord `json:"srv,omitempty"`
Sshfp []*SshfpRecord `json:"sshfp,omitempty"`
Txt []*TxtRecord `json:"txt,omitempty"`
} `json:"zone"`
}
Zone represents a DNS zone
func (*Zone) FindRecords ¶ added in v0.5.3
func (*Zone) PreMarshalJSON ¶
func (*Zone) RemoveRecord ¶
type ZoneError ¶ added in v0.5.0
type ZoneError struct {
// contains filtered or unexported fields
}
func (*ZoneError) FailedToSave ¶ added in v0.5.0
func (*ZoneError) ValidationFailed ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.