Documentation ¶
Index ¶
- Variables
- func DeleteZoneKey(zone string) error
- func FullIPv6(ip net.IP) string
- func GetMasterZoneFile(zone string) (string, error)
- func GetNameServerRecordList(contractId string) ([]string, error)
- func GetRdata(zone string, name string, record_type string) ([]string, error)
- func Init(config edgegrid.Config)
- func IsConfigDNSError(e error) bool
- func PadCoordinates(str string) string
- func ParseRData(rtype string, rdata []string) map[string]interface{}
- func ProcessRdata(rdata []string, rtype string) []string
- type AuthorityResponse
- type ChangeListResponse
- type ConfigDNSError
- type MetadataH
- type RecordBody
- type RecordError
- type RecordSetResponse
- type Recordset
- type RecordsetQueryArgs
- type TSIGKey
- type TSIGKeyBulkPost
- type TSIGKeyResponse
- type TSIGQueryString
- type TSIGReportMeta
- type TSIGReportResponse
- type TSIGZoneAliases
- type TsigError
- type ZoneCreate
- func (zone *ZoneCreate) Delete(zonequerystring ZoneQueryString) error
- func (zone *ZoneCreate) Save(zonequerystring ZoneQueryString) error
- func (zone *ZoneCreate) SaveChangelist() error
- func (zone *ZoneCreate) SubmitChangelist() error
- func (zone *ZoneCreate) Update(zonequerystring ZoneQueryString) error
- type ZoneError
- type ZoneNameListResponse
- type ZoneNameTypesResponse
- type ZoneNamesResponse
- type ZoneQueryString
- type ZoneResponse
Constants ¶
This section is empty.
Variables ¶
var ( // Config contains the Akamai OPEN Edgegrid API credentials // for automatic signing of requests Config edgegrid.Config )
Functions ¶
func DeleteZoneKey ¶ added in v0.9.11
Delete tsig key for zone
func GetMasterZoneFile ¶
GetZone retrieves a DNS Zone for a given hostname
func GetNameServerRecordList ¶
func IsConfigDNSError ¶
func PadCoordinates ¶ added in v0.9.11
Used to pad coordinates to x.xxm format
func ParseRData ¶ added in v0.9.11
Utility method to parse RData in context of type. Return map of fields and values
func ProcessRdata ¶ added in v0.9.11
Types ¶
type AuthorityResponse ¶
type AuthorityResponse struct { Contracts []struct { ContractID string `json:"contractId"` Authorities []string `json:"authorities"` } `json:"contracts"` }
func GetAuthorities ¶
func GetAuthorities(contractId string) (*AuthorityResponse, error)
func NewAuthorityResponse ¶
func NewAuthorityResponse(contract string) *AuthorityResponse
type ChangeListResponse ¶
type ChangeListResponse struct { Zone string `json:"zone,omitempty"` ChangeTag string `json:"changeTag,omitempty"` ZoneVersionId string `json:"zoneVersionId,omitempty"` LastModifiedDate string `json:"lastModifiedDate,omitempty"` Stale bool `json:"stale,omitempty"` }
func GetChangeList ¶
func GetChangeList(zone string) (*ChangeListResponse, error)
GetZone retrieves a DNS Zone for a given hostname
func NewChangeListResponse ¶
func NewChangeListResponse(zone string) *ChangeListResponse
type ConfigDNSError ¶
type RecordBody ¶
type RecordBody struct { Name string `json:"name,omitempty"` RecordType string `json:"type,omitempty"` TTL int `json:"ttl,omitempty"` // Active field no longer used in v2 Active bool `json:"active,omitempty"` Target []string `json:"rdata,omitempty"` // Remaining Fields are not used in the v2 API Subtype int `json:"subtype,omitempty"` //AfsdbRecord Flags int `json:"flags,omitempty"` //DnskeyRecord Nsec3paramRecord Protocol int `json:"protocol,omitempty"` //DnskeyRecord Algorithm int `json:"algorithm,omitempty"` //DnskeyRecord DsRecord Nsec3paramRecord RrsigRecord SshfpRecord Key string `json:"key,omitempty"` //DnskeyRecord Keytag int `json:"keytag,omitempty"` //DsRecord RrsigRecord DigestType int `json:"digest_type,omitempty"` //DsRecord Digest string `json:"digest,omitempty"` //DsRecord Hardware string `json:"hardware,omitempty"` //HinfoRecord Software string `json:"software,omitempty"` //HinfoRecord Priority int `json:"priority,omitempty"` //MxRecord SrvRecord Order uint16 `json:"order,omitempty"` //NaptrRecord Preference uint16 `json:"preference,omitempty"` //NaptrRecord FlagsNaptr string `json:"flags,omitempty"` //NaptrRecord Service string `json:"service,omitempty"` //NaptrRecord Regexp string `json:"regexp,omitempty"` //NaptrRecord Replacement string `json:"replacement,omitempty"` //NaptrRecord Iterations int `json:"iterations,omitempty"` //Nsec3Record Nsec3paramRecord Salt string `json:"salt,omitempty"` //Nsec3Record Nsec3paramRecord NextHashedOwnerName string `json:"next_hashed_owner_name,omitempty"` //Nsec3Record TypeBitmaps string `json:"type_bitmaps,omitempty"` //Nsec3Record Mailbox string `json:"mailbox,omitempty"` //RpRecord Txt string `json:"txt,omitempty"` //RpRecord TypeCovered string `json:"type_covered,omitempty"` //RrsigRecord OriginalTTL int `json:"original_ttl,omitempty"` //RrsigRecord Expiration string `json:"expiration,omitempty"` //RrsigRecord Inception string `json:"inception,omitempty"` //RrsigRecord Signer string `json:"signer,omitempty"` //RrsigRecord Signature string `json:"signature,omitempty"` //RrsigRecord Labels int `json:"labels,omitempty"` //RrsigRecord Weight uint16 `json:"weight,omitempty"` //SrvRecord Port uint16 `json:"port,omitempty"` //SrvRecord FingerprintType int `json:"fingerprint_type,omitempty"` //SshfpRecord Fingerprint string `json:"fingerprint,omitempty"` //SshfpRecord PriorityIncrement int `json:"priority_increment,omitempty"` //MX priority Increment }
func GetRecord ¶ added in v0.9.11
func GetRecord(zone string, name string, record_type string) (*RecordBody, error)
Get single Recordset. Following convention for other single record CRUD operations, return a RecordBody.
func NewRecordBody ¶
func NewRecordBody(params RecordBody) *RecordBody
func (*RecordBody) ToMap ¶
func (record *RecordBody) ToMap() map[string]interface{}
type RecordError ¶
type RecordError struct {
// contains filtered or unexported fields
}
func (*RecordError) BadRequest ¶ added in v0.9.13
func (e *RecordError) BadRequest() bool
func (*RecordError) ConcurrencyConflict ¶ added in v0.9.13
func (e *RecordError) ConcurrencyConflict() bool
func (*RecordError) Error ¶
func (e *RecordError) Error() string
func (*RecordError) FailedToSave ¶
func (e *RecordError) FailedToSave() bool
func (*RecordError) Network ¶
func (e *RecordError) Network() bool
func (*RecordError) NotFound ¶
func (e *RecordError) NotFound() bool
func (*RecordError) ValidationFailed ¶
func (e *RecordError) ValidationFailed() bool
type RecordSetResponse ¶
type RecordSetResponse struct { Metadata MetadataH `json:"metadata"` Recordsets []Recordset `json:"recordsets"` }
func GetRecordList ¶
func GetRecordList(zone string, name string, record_type string) (*RecordSetResponse, error)
func GetRecordsets ¶ added in v0.9.11
func GetRecordsets(zone string, queryArgs ...RecordsetQueryArgs) (*RecordSetResponse, error)
Get RecordSets with Query Args. No formatting of arg values!
func NewRecordSetResponse ¶
func NewRecordSetResponse(name string) *RecordSetResponse
type RecordsetQueryArgs ¶ added in v0.9.11
type RecordsetQueryArgs struct { Page int PageSize int Search string ShowAll bool SortBy string Types string }
Recordset Query args struct
type TSIGKey ¶ added in v0.9.11
type TSIGKey struct { Name string `json:"name"` Algorithm string `json:"algorithm,omitempty"` Secret string `json:"secret,omitempty"` }
func NewTSIGKey ¶ added in v0.9.11
Return bare bones tsig key struct
func (*TSIGKey) GetZones ¶ added in v0.9.11
func (tsigKey *TSIGKey) GetZones() (*ZoneNameListResponse, error)
GetZones retrieves DNS Zones using tsig key
type TSIGKeyBulkPost ¶ added in v0.9.11
func (*TSIGKeyBulkPost) BulkUpdate ¶ added in v0.9.11
func (tsigBulk *TSIGKeyBulkPost) BulkUpdate() error
Bulk Zones tsig key update
type TSIGKeyResponse ¶ added in v0.9.11
func GetZoneKey ¶ added in v0.9.11
func GetZoneKey(zone string) (*TSIGKeyResponse, error)
GetZoneKey retrieves a DNS Zone's key
type TSIGQueryString ¶ added in v0.9.11
type TSIGQueryString struct { ContractIds []string `json:"contractIds,omitempty"` Search string `json:"search,omitempty"` SortBy []string `json:"sortBy,omitempty"` Gid int64 `json:"gid,omitempty"` }
func NewTSIGQueryString ¶ added in v0.9.11
func NewTSIGQueryString() *TSIGQueryString
Return empty query string struct. No elements required.
type TSIGReportMeta ¶ added in v0.9.11
type TSIGReportResponse ¶ added in v0.9.11
type TSIGReportResponse struct { Metadata *TSIGReportMeta `json:"metadata"` Keys []*TSIGKeyResponse `json:"keys,omitempty"` }
func ListTsigKeys ¶ added in v0.9.11
func ListTsigKeys(tsigquerystring *TSIGQueryString) (*TSIGReportResponse, error)
List TSIG Keys
type TSIGZoneAliases ¶ added in v0.9.11
type TSIGZoneAliases struct {
Aliases []string `json:"aliases"`
}
type TsigError ¶ added in v0.9.11
type TsigError struct {
// contains filtered or unexported fields
}
func (*TsigError) FailedToSave ¶ added in v0.9.11
func (*TsigError) ValidationFailed ¶ added in v0.9.11
type ZoneCreate ¶
type ZoneCreate struct { Zone string `json:"zone"` Type string `json:"type"` Masters []string `json:"masters,omitempty"` Comment string `json:"comment,omitempty"` SignAndServe bool `json:"signAndServe"` SignAndServeAlgorithm string `json:"signAndServeAlgorithm,omitempty"` TsigKey *TSIGKey `json:"tsigKey,omitempty"` Target string `json:"target,omitempty"` EndCustomerId string `json:"endCustomerId,omitempty"` ContractId string `json:"contractid,omitempty"` }
func NewZone ¶
func NewZone(params ZoneCreate) *ZoneCreate
NewZone creates a new Zone. Supports subset of fields
func (*ZoneCreate) Delete ¶
func (zone *ZoneCreate) Delete(zonequerystring ZoneQueryString) error
func (*ZoneCreate) Save ¶
func (zone *ZoneCreate) Save(zonequerystring ZoneQueryString) error
Create a Zone
func (*ZoneCreate) SaveChangelist ¶
func (zone *ZoneCreate) SaveChangelist() error
Create changelist for the Zone. Side effect is to create default NS SOA records
func (*ZoneCreate) SubmitChangelist ¶
func (zone *ZoneCreate) SubmitChangelist() error
Save changelist for the Zone to create default NS SOA records
func (*ZoneCreate) Update ¶
func (zone *ZoneCreate) Update(zonequerystring ZoneQueryString) error
Save updates the Zone
type ZoneError ¶
type ZoneError struct {
// contains filtered or unexported fields
}
func (*ZoneError) ConcurrencyConflict ¶ added in v0.9.14
func (*ZoneError) FailedToSave ¶
func (*ZoneError) ValidationFailed ¶
type ZoneNameListResponse ¶ added in v0.9.11
type ZoneNameListResponse struct {
Zones []string `json:"zones"`
}
Zones List Response
func GetZoneKeyAliases ¶ added in v0.9.11
func GetZoneKeyAliases(zone string) (*ZoneNameListResponse, error)
GetZoneKeyAliases retrieves a DNS Zone's aliases func GetZoneKeyAliases(zone string) (*TSIGZoneAliases, error) {
There is a discrepency between the technical doc and API operation. API currently returns a zone name list. TODO: Reconcile
type ZoneNameTypesResponse ¶ added in v0.9.11
type ZoneNameTypesResponse struct {
Types []string `json:"types"`
}
{ "types": [ "A", "MX" ] }
Recordset Types for Zone|Name Response
func GetZoneNameTypes ¶ added in v0.9.11
func GetZoneNameTypes(zname string, zone string) (*ZoneNameTypesResponse, error)
Get Zone Name's record types
type ZoneNamesResponse ¶ added in v0.9.11
type ZoneNamesResponse struct {
Names []string `json:"names"`
}
{ "names": [ "example.com", "bar.example.com" ] }
returned list of Zone Names
func GetZoneNames ¶ added in v0.9.11
func GetZoneNames(zone string) (*ZoneNamesResponse, error)
Get Zone's Names
type ZoneQueryString ¶
type ZoneQueryString struct { Contract string `json:"contractid,omitempty"` Group string `json:"lastactivationdate,omitempty"` }
func NewZoneQueryString ¶
func NewZoneQueryString(Contract string, group string) *ZoneQueryString
type ZoneResponse ¶
type ZoneResponse struct { Zone string `json:"zone,omitempty"` Type string `json:"type,omitempty"` Masters []string `json:"masters,omitempty"` Comment string `json:"comment,omitempty"` SignAndServe bool `json:"signAndServe"` SignAndServeAlgorithm string `json:"signAndServeAlgorithm,omitempty"` TsigKey *TSIGKey `json:"tsigKey,omitempty"` Target string `json:"target,omitempty"` EndCustomerId string `json:"endCustomerId,omitempty"` ContractId string `json:"contractid,omitempty"` AliasCount int64 `json:"aliasCount,omitempty"` ActivationState string `json:"activationstate,omitempty"` LastActivationDate string `json:"lastactivationdate,omitempty"` LastModifiedBy string `json:"lastmodifiedby,omitempty"` LastModifiedDate string `json:"lastmodifieddate,omitempty"` VersionId string `json:"versionid,omitempty"` }
func GetZone ¶
func GetZone(zonename string) (*ZoneResponse, error)
GetZone retrieves a DNS Zone for a given hostname
func NewZoneResponse ¶
func NewZoneResponse(zonename string) *ZoneResponse