Documentation ¶
Index ¶
- Variables
- type AddressMailing
- type Contact
- type Contacts
- type ContactsGetter
- type DNSRecord
- type Domain
- type DomainAvailability
- type DomainDetails
- type DomainName
- type DomainPurchaseResponse
- type Gateway
- type Privacy
- type PrivacyGetter
- type Purchase
- type RealName
- type Records
- type RecordsGetter
- type V1
- type V2
- type Verifications
Constants ¶
This section is empty.
Variables ¶
var DNSRecordTypes = map[string]string{
"A": "A",
"AAAA": "AAAA",
"CNAME": "CNAME",
"MX": "MX",
"NS": "NS",
"SOA": "SOA",
"SRV": "SRV",
"TXT": "TXT",
}
DNSRecordTypes to be used as an enum
Functions ¶
This section is empty.
Types ¶
type AddressMailing ¶
type AddressMailing struct { Address string `json:"address1,omitempty"` Address2 string `json:"address2,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` PostalCode string `json:"postalCode,omitempty"` State string `json:"state,omitempty"` }
AddressMailing holds contact address info
type Contact ¶
type Contact struct { AddressMailing AddressMailing `json:"addressMailing,omitempty"` Email string `json:"email,omitempty"` Fax string `json:"fax,omitempty"` JobTitle string `json:"jobTitle,omitempty"` NameFirst string `json:"nameFirst,omitempty"` NameLast string `json:"nameLast,omitempty"` NameMiddle string `json:"nameMiddle,omitempty"` Organization string `json:"organization,omitempty"` Phone string `json:"phone,omitempty"` }
Contact holds contact information
type ContactsGetter ¶
type ContactsGetter interface {
Contacts() Contacts
}
ContactsGetter makes embedding easier
type DNSRecord ¶
type DNSRecord struct { Data string `json:"data,omitempty"` Name string `json:"name,omitempty"` Port int `json:"port,omitempty"` Priority int `json:"priority,omitempty"` Protocol string `json:"protocol,omitempty"` Service string `json:"service,omitempty"` TTL int `json:"ttl,omitempty"` Type string `json:"type,omitempty"` Weight int `json:"weight,omitempty"` }
DNSRecord is a struct that holds data about DNS records
type Domain ¶
type Domain interface { ContactsGetter PrivacyGetter RecordsGetter GetDetails() (*DomainDetails, error) }
Domain implements Domain [interface]
type DomainAvailability ¶ added in v1.1.0
type DomainAvailability struct { Available bool `json:"available,omitempty"` Currency string `json:"currency,omitempty"` Definitive bool `json:"definitive,omitempty"` Domain string `json:"domain,omitempty"` Period int `json:"period,omitempty"` Price int `json:"price,omitempty"` }
DomainAvailability holds data about domain availability
type DomainDetails ¶ added in v1.0.6
type DomainDetails struct { AuthCode string `json:"authCode,omitempty"` ContactAdmin Contact `json:"contactAdmin,omitempty"` ContactBilling Contact `json:"contactBilling,omitempty"` ContactRegistrant Contact `json:"contactRegistrant,omitempty"` ContactTech Contact `json:"contactTech,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` DeletedAt time.Time `json:"deletedAt,omitempty"` TransferAwayEligibleAt time.Time `json:"transferAwayEligibleAt,omitempty"` Domain string `json:"domain,omitempty"` DomainID int `json:"domainId,omitempty"` ExpirationProtected bool `json:"expirationProtected,omitempty"` Expires time.Time `json:"expires,omitempty"` ExposeWhois bool `json:"exposeWhois,omitempty"` HoldRegistrar bool `json:"holdRegistrar,omitempty"` Locked bool `json:"locked,omitempty"` NameServers []string `json:"nameServers,omitempty"` Privacy bool `json:"privacy,omitempty"` RenewAuto bool `json:"renewAuto,omitempty"` RenewDeadline time.Time `json:"renewDeadline,omitempty"` Status string `json:"status,omitempty"` SubAccountID string `json:"subaccountId,omitempty"` TransferProtected bool `json:"transferProtected,omitempty"` Verifications Verifications `json:"verifications,omitempty"` }
DomainDetails holds information about a GoDaddy domain. This is the response when you `GET` info about a domain.
type DomainName ¶
type DomainName struct {
Status string `json:"status,omitempty"`
}
DomainName holds verification domain name info
type DomainPurchaseResponse ¶
type DomainPurchaseResponse struct { Currency string `json:"currency,omitempty"` ItemCount int `json:"itemCount,omitempty"` OrderID int `json:"orderId,omitempty"` Total int `json:"total,omitempty"` }
DomainPurchaseResponse is GoDaddy's response to purchasing a domain
type Gateway ¶
Gateway knows which GoDaddy API version to target
func ConnectDevelopment ¶
ConnectDevelopment is an convenience function returns a new Gateway which targets GoDaddy development API
func ConnectProduction ¶
ConnectProduction is an convenience function returns a new Gateway which targets GoDaddy production API
type PrivacyGetter ¶
type PrivacyGetter interface {
Privacy() Privacy
}
PrivacyGetter makes embedding easier
type Purchase ¶ added in v1.1.5
type Purchase interface { }
Purchase and register the specific domain
type RealName ¶
type RealName struct {
Status string `json:"status,omitempty"`
}
RealName holds verifications real name info
type Records ¶
type Records interface { Add(rec *DNSRecord) error AddMultiple(recordsToAdd *[]DNSRecord) error GetAll() (*[]DNSRecord, error) GetByType(recordType string) (*[]DNSRecord, error) GetByTypeName(recordType, recordName string) (*[]DNSRecord, error) SetValue(recType, recName, newValue string) error }
Records defines `records` behavior
type RecordsGetter ¶
type RecordsGetter interface {
Records() Records
}
RecordsGetter simplifies embedding
type V1 ¶
type V1 interface { Domain(hostname string) Domain GetDomainAvailability(domainname string) (*DomainAvailability, error) PurchaseDomain(d *DomainDetails) (*DomainPurchaseResponse, error) }
V1 targets version 1 of the GoDaddy API
type Verifications ¶
type Verifications struct { DomainName DomainName `json:"domainName,omitempty"` RealName RealName `json:"realName,omitempty"` }
Verifications holds verification info about a domain.