Documentation
¶
Index ¶
- type Domain
- type Gandi
- func (g *Gandi) AddDomainToZone(fqdn, uuid string) (response StandardResponse, err error)
- func (g *Gandi) AddSlaveToDomain(fqdn, host string) (err error)
- func (g *Gandi) AddTsigToDomain(fqdn, uuid string) (err error)
- func (g *Gandi) AttachDomainToZone(uuid, fqdn string) (response StandardResponse, err error)
- func (g *Gandi) ChangeAssociatedZone(fqdn, uuid string) (response StandardResponse, err error)
- func (g *Gandi) ChangeDomainRecordWithNameAndType(fqdn, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
- func (g *Gandi) ChangeDomainRecords(fqdn string, records []ZoneRecord) (response StandardResponse, err error)
- func (g *Gandi) ChangeDomainRecordsWithName(fqdn, name string, records []ZoneRecord) (response StandardResponse, err error)
- func (g *Gandi) ChangeZoneRecordWithNameAndType(uuid, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
- func (g *Gandi) ChangeZoneRecords(uuid string, records []ZoneRecord) (response StandardResponse, err error)
- func (g *Gandi) ChangeZoneRecordsAsText(uuid string, records []byte) (response StandardResponse, err error)
- func (g *Gandi) ChangeZoneRecordsWithName(uuid, name string, records []ZoneRecord) (response StandardResponse, err error)
- func (g *Gandi) CreateDomainRecord(fqdn, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
- func (g *Gandi) CreateSnapshot(uuid string) (response StandardResponse, err error)
- func (g *Gandi) CreateTsig() (tsig Tsig, err error)
- func (g *Gandi) CreateZone(name string) (response StandardResponse, err error)
- func (g *Gandi) CreateZoneRecord(uuid, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
- func (g *Gandi) DelSlaveFromDomain(fqdn, host string) (err error)
- func (g *Gandi) DeleteAllDomainRecords(fqdn string) (err error)
- func (g *Gandi) DeleteAllZoneRecords(uuid string) (err error)
- func (g *Gandi) DeleteDomainKey(fqdn, uuid string) (err error)
- func (g *Gandi) DeleteDomainRecord(fqdn, name, recordtype string) (err error)
- func (g *Gandi) DeleteDomainRecords(fqdn, name string) (err error)
- func (g *Gandi) DeleteZone(uuid string) (err error)
- func (g *Gandi) DeleteZoneRecord(uuid, name, recordtype string) (err error)
- func (g *Gandi) DeleteZoneRecords(uuid, name string) (err error)
- func (g *Gandi) DetachDomain(fqdn string) (err error)
- func (g *Gandi) GetDomain(fqdn string) (domain Domain, err error)
- func (g *Gandi) GetDomainKeys(fqdn string) (keys []SigningKey, err error)
- func (g *Gandi) GetDomainNS(fqdn string) (ns []string, err error)
- func (g *Gandi) GetDomainRecordWithNameAndType(fqdn, name, recordtype string) (record ZoneRecord, err error)
- func (g *Gandi) GetSnapshot(uuid, snapUUID string) (snapshot Snapshot, err error)
- func (g *Gandi) GetTsig(uuid string) (tsig Tsig, err error)
- func (g *Gandi) GetTsigBIND(uuid string) ([]byte, error)
- func (g *Gandi) GetTsigKnot(uuid string) ([]byte, error)
- func (g *Gandi) GetTsigNSD(uuid string) ([]byte, error)
- func (g *Gandi) GetTsigPowerDNS(uuid string) ([]byte, error)
- func (g *Gandi) GetZone(uuid string) (zone Zone, err error)
- func (g *Gandi) GetZoneDomains(uuid string) (domains []Domain, err error)
- func (g *Gandi) GetZoneRecordWithNameAndType(uuid, name, recordtype string) (record ZoneRecord, err error)
- func (g *Gandi) ListDomainRecords(fqdn string) (records []ZoneRecord, err error)
- func (g *Gandi) ListDomainRecordsWithName(fqdn, name string) (records []ZoneRecord, err error)
- func (g *Gandi) ListDomains() (domains []Domain, err error)
- func (g *Gandi) ListSlavesInDomain(fqdn string) (slaves []string, err error)
- func (g *Gandi) ListSnapshots(uuid string) (snapshots []Snapshot, err error)
- func (g *Gandi) ListTsigs() (tsigs []Tsig, err error)
- func (g *Gandi) ListZoneRecords(uuid string) (records []ZoneRecord, err error)
- func (g *Gandi) ListZoneRecordsAsText(uuid string) ([]byte, error)
- func (g *Gandi) ListZoneRecordsWithName(uuid, name string) (records []ZoneRecord, err error)
- func (g *Gandi) ListZones() (zones []Zone, err error)
- func (g *Gandi) SignDomain(fqdn string) (response StandardResponse, err error)
- func (g *Gandi) UpdateDomainKey(fqdn, uuid string, deleted bool) (err error)
- func (g *Gandi) UpdateZone(uuid, name string) (response StandardResponse, err error)
- type SigningKey
- type Snapshot
- type StandardError
- type StandardResponse
- type Tsig
- type Zone
- type ZoneRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct {
FQDN string `json:"fqdn,omitempty"`
DomainHref string `json:"domain_href,omitempty"`
DomainKeysHref string `json:"domain_keys_href,omitempty"`
DomainRecordsHref string `json:"domain_records_href,omitempty"`
ZoneUUID string `json:"zone_uuid,omitempty"`
ZoneHref string `json:"zone_href,omitempty"`
ZoneRecordsHref string `json:"zone_records_href,omitempty"`
}
Domain represents a DNS domain
type Gandi ¶
type Gandi struct {
// contains filtered or unexported fields
}
Gandi makes it easier to interact with Gandi LiveDNS
func (*Gandi) AddDomainToZone ¶
func (g *Gandi) AddDomainToZone(fqdn, uuid string) (response StandardResponse, err error)
AddDomainToZone adds a domain to a zone It is equivalent to AttachDomainToZone, the only difference is the entry point in the LiveDNS API.
func (*Gandi) AddSlaveToDomain ¶
AddSlaveToDomain adds a slave to a domain
func (*Gandi) AddTsigToDomain ¶
AddTsigToDomain adds a tsig to a domain
func (*Gandi) AttachDomainToZone ¶
func (g *Gandi) AttachDomainToZone(uuid, fqdn string) (response StandardResponse, err error)
AttachDomainToZone attaches a domain to a zone
func (*Gandi) ChangeAssociatedZone ¶
func (g *Gandi) ChangeAssociatedZone(fqdn, uuid string) (response StandardResponse, err error)
ChangeAssociatedZone changes the zone associated to a domain
func (*Gandi) ChangeDomainRecordWithNameAndType ¶
func (g *Gandi) ChangeDomainRecordWithNameAndType(fqdn, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
ChangeDomainRecordWithNameAndType changes the record with the given name and the given type in the zone attached to a domain
func (*Gandi) ChangeDomainRecords ¶
func (g *Gandi) ChangeDomainRecords(fqdn string, records []ZoneRecord) (response StandardResponse, err error)
ChangeDomainRecords changes all records in the zone attached to a domain
func (*Gandi) ChangeDomainRecordsWithName ¶
func (g *Gandi) ChangeDomainRecordsWithName(fqdn, name string, records []ZoneRecord) (response StandardResponse, err error)
ChangeDomainRecordsWithName changes all records with the given name in the zone attached to the domain
func (*Gandi) ChangeZoneRecordWithNameAndType ¶
func (g *Gandi) ChangeZoneRecordWithNameAndType(uuid, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
ChangeZoneRecordWithNameAndType changes the zone record with the given name and the given type
func (*Gandi) ChangeZoneRecords ¶
func (g *Gandi) ChangeZoneRecords(uuid string, records []ZoneRecord) (response StandardResponse, err error)
ChangeZoneRecords changes all records in a zone
func (*Gandi) ChangeZoneRecordsAsText ¶
func (g *Gandi) ChangeZoneRecordsAsText(uuid string, records []byte) (response StandardResponse, err error)
ChangeZoneRecordsAsText changes all zone records, taking them as text ... and by text, I mean a slice of bytes
func (*Gandi) ChangeZoneRecordsWithName ¶
func (g *Gandi) ChangeZoneRecordsWithName(uuid, name string, records []ZoneRecord) (response StandardResponse, err error)
ChangeZoneRecordsWithName changes all zone records with the given name
func (*Gandi) CreateDomainRecord ¶
func (g *Gandi) CreateDomainRecord(fqdn, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
CreateDomainRecord creates a record in the zone attached to a domain
func (*Gandi) CreateSnapshot ¶
func (g *Gandi) CreateSnapshot(uuid string) (response StandardResponse, err error)
CreateSnapshot creates a zone
func (*Gandi) CreateTsig ¶
CreateTsig creates a tsig
func (*Gandi) CreateZone ¶
func (g *Gandi) CreateZone(name string) (response StandardResponse, err error)
CreateZone creates a zone
func (*Gandi) CreateZoneRecord ¶
func (g *Gandi) CreateZoneRecord(uuid, name, recordtype string, ttl int, values []string) (response StandardResponse, err error)
CreateZoneRecord creates a record in a zone
func (*Gandi) DelSlaveFromDomain ¶
DelSlaveFromDomain removes a slave from a domain
func (*Gandi) DeleteAllDomainRecords ¶
DeleteAllDomainRecords deletes all records in the zone attached to a domain
func (*Gandi) DeleteAllZoneRecords ¶
DeleteAllZoneRecords deletes all records in a zone
func (*Gandi) DeleteDomainKey ¶
DeleteDomainKey deletes a signing key from a domain
func (*Gandi) DeleteDomainRecord ¶
DeleteDomainRecord deletes the record with the given name and the given type in the zone attached to a domain
func (*Gandi) DeleteDomainRecords ¶
DeleteDomainRecords deletes all records with the given name in the zone attached to a domain
func (*Gandi) DeleteZone ¶
DeleteZone deletes a zone
func (*Gandi) DeleteZoneRecord ¶
DeleteZoneRecord deletes the record with the given name and the given type in a zone
func (*Gandi) DeleteZoneRecords ¶
DeleteZoneRecords deletes all records with the given name in a zone
func (*Gandi) DetachDomain ¶
DetachDomain detaches a domain from the zone it is attached to
func (*Gandi) GetDomainKeys ¶
func (g *Gandi) GetDomainKeys(fqdn string) (keys []SigningKey, err error)
GetDomainKeys returns data about the signing keys created for a domain
func (*Gandi) GetDomainNS ¶
GetDomainNS returns the list of the nameservers for a domain
func (*Gandi) GetDomainRecordWithNameAndType ¶
func (g *Gandi) GetDomainRecordWithNameAndType(fqdn, name, recordtype string) (record ZoneRecord, err error)
GetDomainRecordWithNameAndType gets the record with specific name and type in the zone attached to the domain
func (*Gandi) GetSnapshot ¶
GetSnapshot returns a zone
func (*Gandi) GetTsigBIND ¶
GetTsigBIND shows a BIND nameserver config, and includes the nameservers available for zone transfers
func (*Gandi) GetTsigKnot ¶
GetTsigKnot shows a Knot nameserver config, and includes the nameservers available for zone transfers
func (*Gandi) GetTsigNSD ¶
GetTsigNSD shows a NSD nameserver config, and includes the nameservers available for zone transfers
func (*Gandi) GetTsigPowerDNS ¶
GetTsigPowerDNS shows a PowerDNS nameserver config, and includes the nameservers available for zone transfers
func (*Gandi) GetZoneDomains ¶
GetZoneDomains returns domains attached to a zone
func (*Gandi) GetZoneRecordWithNameAndType ¶
func (g *Gandi) GetZoneRecordWithNameAndType(uuid, name, recordtype string) (record ZoneRecord, err error)
GetZoneRecordWithNameAndType gets the record with specific name and type in a zone
func (*Gandi) ListDomainRecords ¶
func (g *Gandi) ListDomainRecords(fqdn string) (records []ZoneRecord, err error)
ListDomainRecords lists all records in the zone associated with a domain
func (*Gandi) ListDomainRecordsWithName ¶
func (g *Gandi) ListDomainRecordsWithName(fqdn, name string) (records []ZoneRecord, err error)
ListDomainRecordsWithName lists all records with a specific name in a zone
func (*Gandi) ListDomains ¶
ListDomains lists all domains
func (*Gandi) ListSlavesInDomain ¶
ListSlavesInDomain lists slaves in a domain
func (*Gandi) ListSnapshots ¶
ListSnapshots lists all zones
func (*Gandi) ListZoneRecords ¶
func (g *Gandi) ListZoneRecords(uuid string) (records []ZoneRecord, err error)
ListZoneRecords lists all records in a zone
func (*Gandi) ListZoneRecordsAsText ¶
ListZoneRecordsAsText lists all records in a zone and returns them as a text file ... and by text, I mean a slice of bytes
func (*Gandi) ListZoneRecordsWithName ¶
func (g *Gandi) ListZoneRecordsWithName(uuid, name string) (records []ZoneRecord, err error)
ListZoneRecordsWithName lists all records with a specific name in a zone
func (*Gandi) SignDomain ¶
func (g *Gandi) SignDomain(fqdn string) (response StandardResponse, err error)
SignDomain creates a DNSKEY and asks Gandi servers to automatically sign the domain
func (*Gandi) UpdateDomainKey ¶
UpdateDomainKey updates a signing key for a domain (only the deleted status, actually...)
func (*Gandi) UpdateZone ¶
func (g *Gandi) UpdateZone(uuid, name string) (response StandardResponse, err error)
UpdateZone updates a zone (only its name, actually...)
type SigningKey ¶
type SigningKey struct {
Status string `json:"status,omitempty"`
UUID string `json:"uuid,omitempty"`
Algorithm int `json:"algorithm,omitempty"`
Deleted *bool `json:"deleted"`
AlgorithmName string `json:"algorithm_name,omitempty"`
FQDN string `json:"fqdn,omitempty"`
Flags int `json:"flags,omitempty"`
DS string `json:"ds,omitempty"`
KeyHref string `json:"key_href,omitempty"`
}
SigningKey holds data about a DNSSEC signing key
type Snapshot ¶
type Snapshot struct {
UUID string `json:"uuid,omitempty"`
DateCreated string `json:"date_created,omitempty"`
ZoneUUID string `json:"zone_uuid,omitempty"`
ZoneData []ZoneRecord `json:"zone_data,omitempty"`
}
Snapshot represents a zone snapshot
type StandardError ¶
type StandardError struct {
Location string `json:"location"`
Name string `json:"name"`
Description string `json:"description"`
}
StandardError is embedded in a standard error
type StandardResponse ¶
type StandardResponse struct {
Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"`
UUID string `json:"uuid,omitempty"`
Object string `json:"object,omitempty"`
Cause string `json:"cause,omitempty"`
Status string `json:"status,omitempty"`
Errors []StandardError `json:"errors,omitempty"`
}
StandardResponse is a standard response
type Tsig ¶
type Tsig struct {
KeyName string `json:"key_name, omitempty"`
Secret string `json:"secret,omitempty"`
UUID string `json:"uuid,omitempty"`
AxfrTsigURL string `json:"axfr_tsig_url,omitempty"`
ConfigSamples interface{} `json:"config_samples,omitempty"`
}
Tsig contains tsig data (no kidding!)
type Zone ¶
type Zone struct {
Retry int `json:"retry,omitempty"`
UUID string `json:"uuid,omitempty"`
ZoneHref string `json:"zone_href,omitempty"`
Minimum int `json:"minimum,omitempty"`
DomainsHref string `json:"domains_href,omitempty"`
Refresh int `json:"refresh,omitempty"`
ZoneRecordsHref string `json:"zone_records_href,omitempty"`
Expire int `json:"expire,omitempty"`
SharingID string `json:"sharing_id,omitempty"`
Serial int `json:"serial,omitempty"`
Email string `json:"email,omitempty"`
PrimaryNS string `json:"primary_ns,omitempty"`
Name string `json:"name,omitempty"`
}
Zone represents a DNS Zone
type ZoneRecord ¶
type ZoneRecord struct {
RrsetType string `json:"rrset_type,omitempty"`
RrsetTTL int `json:"rrset_ttl,omitempty"`
RrsetName string `json:"rrset_name,omitempty"`
RrsetHref string `json:"rrset_href,omitempty"`
RrsetValues []string `json:"rrset_values,omitempty"`
}
ZoneRecord represents a DNS Record