Documentation ¶
Index ¶
- type AutoRenew
- type Contact
- type Contacts
- type CreateRequest
- type DNSSECKey
- type DNSSECKeyCreateRequest
- type Details
- type Domain
- func (g *Domain) CreateDNSSECKey(domain string, key DNSSECKeyCreateRequest) (err error)
- func (g *Domain) CreateDomain(req CreateRequest) (err error)
- func (g *Domain) CreateGlueRecord(domain string, gluerecord GlueRecordCreateRequest) (err error)
- func (g *Domain) CreateWebRedirection(domain string, webredir WebRedirectionCreateRequest) (err error)
- func (g *Domain) DeleteDNSSECKey(domain string, keyid string) (err error)
- func (g *Domain) DeleteGlueRecord(domain string, name string) (err error)
- func (g *Domain) DeleteTags(domain string) (err error)
- func (g *Domain) DeleteWebRedirection(domain string, host string) (err error)
- func (g *Domain) EnableLiveDNS(domain string) (err error)
- func (g *Domain) GetContacts(domain string) (contacts Contacts, err error)
- func (g *Domain) GetDomain(domain string) (domainResponse Details, err error)
- func (g *Domain) GetGlueRecord(domain string, name string) (gluerecord GlueRecord, err error)
- func (g *Domain) GetLiveDNS(domain string) (livedns LiveDNS, err error)
- func (g *Domain) GetNameServers(domain string) (nameservers []string, err error)
- func (g *Domain) GetTags(domain string) (tags []string, err error)
- func (g *Domain) GetWebRedirection(domain string, host string) (webredir WebRedirection, err error)
- func (g *Domain) ListDNSSECKeys(domain string) (keys []DNSSECKey, err error)
- func (g *Domain) ListDomains() (domains []ListResponse, err error)
- func (g *Domain) ListGlueRecords(domain string) (gluerecords []GlueRecord, err error)
- func (g *Domain) ListWebRedirections(domain string) (webredirs []WebRedirection, err error)
- func (g *Domain) SetAutoRenew(domain string, autorenew bool) (err error)
- func (g *Domain) SetContacts(domain string, contacts Contacts) (err error)
- func (g *Domain) SetTags(domain string, tags []string) (err error)
- func (g *Domain) UpdateGlueRecord(domain string, name string, ips []string) (err error)
- func (g *Domain) UpdateNameServers(domain string, ns []string) (err error)
- type GlueRecord
- type GlueRecordCreateRequest
- type GlueRecordUpdateRequest
- type ListResponse
- type LiveDNS
- type NameServerConfig
- type Nameservers
- type ResponseDates
- type SharingSpace
- type Tags
- type TrusteeRole
- type WebRedirection
- type WebRedirectionCreateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoRenew ¶
type AutoRenew struct { Href string `json:"href,omitempty"` Dates *[]time.Time `json:"dates,omitempty"` Duration int `json:"duration,omitempty"` Enabled *bool `json:"enabled,omitempty"` OrgID string `json:"org_id,omitempty"` }
AutoRenew is the auto renewal information for the domain
type Contact ¶
type Contact struct { Country string `json:"country"` Email string `json:"email"` FamilyName string `json:"family"` GivenName string `json:"given"` StreetAddr string `json:"streetaddr"` ContactType int `json:"type"` BrandNumber string `json:"brand_number,omitempty"` City string `json:"city,omitempty"` DataObfuscated *bool `json:"data_obfuscated,omitempty"` Fax string `json:"fax,omitempty"` Language string `json:"lang,omitempty"` MailObfuscated *bool `json:"mail_obfuscated,omitempty"` Mobile string `json:"mobile,omitempty"` OrgName string `json:"orgname,omitempty"` Phone string `json:"phone,omitempty"` Siren string `json:"siren,omitempty"` State string `json:"state,omitempty"` Validation string `json:"validation,omitempty"` Zip string `json:"zip,omitempty"` ExtraParameters map[string]interface{} `json:"extra_parameters,omitempty"` }
Contact represents a contact associated with a domain
type Contacts ¶
type Contacts struct { Admin *Contact `json:"admin,omitempty"` Billing *Contact `json:"bill,omitempty"` Owner *Contact `json:"owner,omitempty"` Tech *Contact `json:"tech,omitempty"` }
Contacts is the set of contacts associated with a Domain
type CreateRequest ¶
type CreateRequest struct { FQDN string `json:"fqdn"` Owner *Contact `json:"owner"` Admin *Contact `json:"admin,omitempty"` Billing *Contact `json:"bill,omitempty"` Claims string `json:"claims,omitempty"` Currency string `json:"currency,omitempty"` // Duration in years between 1 and 10 Duration int `json:"duration,omitempty"` EnforcePremium bool `json:"enforce_premium,omitempty"` Lang string `json:"lang,omitempty"` // NameserverIPs sets the Glue Records for the domain NameserverIPs map[string]string `json:"nameserver_ips,omitempty"` Nameservers []string `json:"nameservers,omitempty"` Price int `json:"price,omitempty"` ReselleeID string `json:"resellee_id,omitempty"` // SMD is a Signed Mark Data file; if used, `TLDPeriod` must be "sunrise" SMD string `json:"smd,omitempty"` Tech *Contact `json:"tech,omitempty"` TLDPeriod string `json:"tld_period,omitempty"` }
CreateRequest is used to request a new domain
type DNSSECKey ¶
type DNSSECKey struct { Algorithm int `json:"algorithm"` Digest string `json:"digest"` DigestType int `json:"digest_type"` ID int `json:"id"` KeyTag int `json:"keytag"` Type string `json:"type"` PublicKey string `json:"public_key"` }
DNSSECKey represents a DNSSEC key associated with a domain
type DNSSECKeyCreateRequest ¶
type DNSSECKeyCreateRequest struct { Algorithm int `json:"algorithm"` Type string `json:"type"` PublicKey string `json:"public_key"` }
DNSSECKeyCreateRequest represents a request to create a DNSSEC key for a domain
type Details ¶
type Details struct { AutoRenew *AutoRenew `json:"autorenew"` CanTLDLock *bool `json:"can_tld_lock"` Contacts *Contacts `json:"contacts"` Dates *ResponseDates `json:"dates"` FQDN string `json:"fqdn"` FQDNUnicode string `json:"fqdn_unicode"` Href string `json:"href"` Nameservers []string `json:"nameservers,omitempty"` Services []string `json:"services"` SharingSpace *SharingSpace `json:"sharing_space"` Status []string `json:"status"` TLD string `json:"tld"` AuthInfo string `json:"authinfo,omitempty"` ID string `json:"id,omitempty"` SharingID string `json:"sharing_id,omitempty"` Tags []string `json:"tags,omitempty"` TrusteeRoles []TrusteeRole `json:"trustee_roles,omitempty"` }
Details describes a single domain
type Domain ¶
type Domain struct {
// contains filtered or unexported fields
}
Domain is the API client to the Gandi v5 Domain API
func NewFromClient ¶
NewFromClient returns an instance of the Domain API client
func (*Domain) CreateDNSSECKey ¶
func (g *Domain) CreateDNSSECKey(domain string, key DNSSECKeyCreateRequest) (err error)
func (*Domain) CreateDomain ¶
func (g *Domain) CreateDomain(req CreateRequest) (err error)
CreateDomain creates a single Domain
func (*Domain) CreateGlueRecord ¶
func (g *Domain) CreateGlueRecord(domain string, gluerecord GlueRecordCreateRequest) (err error)
func (*Domain) CreateWebRedirection ¶
func (g *Domain) CreateWebRedirection(domain string, webredir WebRedirectionCreateRequest) (err error)
func (*Domain) DeleteDNSSECKey ¶
func (*Domain) DeleteGlueRecord ¶
func (*Domain) DeleteTags ¶ added in v0.5.0
func (*Domain) DeleteWebRedirection ¶
func (*Domain) EnableLiveDNS ¶
func (*Domain) GetContacts ¶
GetContacts returns the contact objects for a domain
func (*Domain) GetDomain ¶
GetDomain requests a single Domain It returns a Details object and any error encountered
func (*Domain) GetGlueRecord ¶
func (g *Domain) GetGlueRecord(domain string, name string) (gluerecord GlueRecord, err error)
func (*Domain) GetLiveDNS ¶ added in v0.4.0
func (*Domain) GetNameServers ¶
GetNameServers returns the configured nameservers for a domain
func (*Domain) GetWebRedirection ¶ added in v0.2.0
func (g *Domain) GetWebRedirection(domain string, host string) (webredir WebRedirection, err error)
func (*Domain) ListDNSSECKeys ¶
func (*Domain) ListDomains ¶
func (g *Domain) ListDomains() (domains []ListResponse, err error)
ListDomains requests the set of Domains It returns a slice of domains and any error encountered
func (*Domain) ListGlueRecords ¶
func (g *Domain) ListGlueRecords(domain string) (gluerecords []GlueRecord, err error)
func (*Domain) ListWebRedirections ¶
func (g *Domain) ListWebRedirections(domain string) (webredirs []WebRedirection, err error)
func (*Domain) SetAutoRenew ¶
SetAutoRenew enables or disables auto renew on the given Domain
func (*Domain) SetContacts ¶
SetContacts sets the contact objects for a domain
func (*Domain) UpdateGlueRecord ¶
type GlueRecord ¶
type GlueRecord struct { Name string `json:"name"` IPs []string `json:"ips"` FQDN string `json:"fqdn"` Href string `json:"href"` FQDNUnicode string `json:"fqdn_unicode"` }
GlueRecord represents the association of a hostname with an IP address at the registry.
type GlueRecordCreateRequest ¶
GlueRecordCreateRequest represents a request to create a GlueRecord for a domain
type GlueRecordUpdateRequest ¶
type GlueRecordUpdateRequest struct {
IPs []string `json:"ips"`
}
GlueRecordUpdateRequest represents a request to update an existing GlueRecords IP addresses
type ListResponse ¶
type ListResponse struct { AutoRenew *bool `json:"autorenew"` Dates *ResponseDates `json:"dates"` DomainOwner string `json:"domain_owner"` FQDN string `json:"fqdn"` FQDNUnicode string `json:"fqdn_unicode"` Href string `json:"href"` ID string `json:"id"` NameServer *NameServerConfig `json:"nameserver"` OrgaOwner string `json:"orga_owner"` Owner string `json:"owner"` Status []string `json:"status"` TLD string `json:"tld"` SharingID string `json:"sharing_id,omitempty"` Tags []string `json:"tags,omitempty"` }
ListResponse is the response object returned by listing domains
type NameServerConfig ¶
type NameServerConfig struct { Current string `json:"current"` Hosts []string `json:"hosts,omitempty"` }
NameServerConfig represents the name server configuration for a domain
type Nameservers ¶
type Nameservers struct {
Nameservers []string `json:"nameservers"`
}
Nameservers represents a list of nameservers
type ResponseDates ¶
type ResponseDates struct { RegistryCreatedAt *time.Time `json:"registry_created_at"` UpdatedAt *time.Time `json:"updated_at"` AuthInfoExpiresAt *time.Time `json:"authinfo_expires_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` DeletesAt *time.Time `json:"deletes_at,omitempty"` HoldBeginsAt *time.Time `json:"hold_begins_at,omitempty"` HoldEndsAt *time.Time `json:"hold_ends_at,omitempty"` PendingDeleteEndsAt *time.Time `json:"pending_delete_ends_at,omitempty"` RegistryEndsAt *time.Time `json:"registry_ends_at,omitempty"` RenewBeginsAt *time.Time `json:"renew_begins_at,omitempty"` RenewEndsAt *time.Time `json:"renew_ends_at,omitempty"` }
ResponseDates represents all the dates associated with a domain
type SharingSpace ¶
SharingSpace defines the Organisation that owns the domain
type Tags ¶ added in v0.5.0
type Tags struct {
Tags []string `json:"tags"`
}
Tags represents a list of tags
type TrusteeRole ¶ added in v0.6.0
type TrusteeRole struct { Name string `json:"name,omitempty"` AllowTransferout *bool `json:"allow_transferout,omitempty"` Editable *bool `json:"editable,omitempty"` }
TrusteeRole defines which actions a role can perform
type WebRedirection ¶
type WebRedirection struct { Host string `json:"host"` Type string `json:"type"` URL string `json:"url"` CertificateStatus string `json:"cert_status,omitempty"` CertificateUUID string `json:"cert_uuid,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` Protocol string `json:"protocol,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
WebRedirection represents a WebRedirections associated with a domain
type WebRedirectionCreateRequest ¶
type WebRedirectionCreateRequest struct { Host string `json:"host"` Override bool `json:"override"` Protocol string `json:"protocol"` Type string `json:"type"` URL string `json:"url"` }
WebRedirectionCreateRequest represents a request to create a WebRedirections for a domain