Documentation ¶
Index ¶
- Variables
- type AddressMailing
- type Consent
- type Contact
- type Contacts
- type ContactsGetter
- type DNSRecord
- type Domain
- type DomainGetter
- type DomainName
- type DomainPurchaseResponse
- type Domains
- type DomainsGetter
- type Gateway
- type GoDaddyDomain
- type GoDaddyDomainAvailability
- type GoDaddyDomainDetails
- type Privacy
- type PrivacyGetter
- 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 Consent ¶
type Consent struct { AgreedAt time.Time AgreedBy string AgreementKeys []string // No idea what this is, need to dig into that }
Consent is required when purhasing domain privacy
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() (*GoDaddyDomainDetails, error) }
Domain knows how to interact with domains you own Domain is used to target a specific domain
- Get DNS record(s)
- Modify DNS record(s)
- Create DNS record(s)
etc...
type DomainGetter ¶
DomainGetter simplifies embedding
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 Domains ¶
type Domains interface { CheckAvailability(domainname string) (*GoDaddyDomainAvailability, error) My() (*[]GoDaddyDomain, error) Purchase(GoDaddyDomainDetails *GoDaddyDomainDetails) (*DomainPurchaseResponse, error) }
Domains knows how to interact with domains you may or may not own but want to perform tasks on.
- Check if a domain is available for purchase
- Purchase a domin
- List all of the domains you own
etc...
type DomainsGetter ¶
type DomainsGetter interface {
Domains() Domains
}
DomainsGetter simplifies embedding
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 GoDaddyDomain ¶
type GoDaddyDomain struct { CreatedAt time.Time Domain string DomainID int ExpirationProtected bool Expires time.Time ExposeWhois bool HoldRegistrar bool Locked bool NameServers interface{} // []string Privacy bool RenewAuto bool Renewable bool Status string TransferAwayEligibleAt time.Time TransferProtected bool }
GoDaddyDomain is what gets returned when listing all of your domains
type GoDaddyDomainAvailability ¶
type GoDaddyDomainAvailability 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"` }
GoDaddyDomainAvailability holds data about domain availability
type GoDaddyDomainDetails ¶
type GoDaddyDomainDetails 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"` }
GoDaddyDomainDetails holds information about a GoDaddy domain. This is the response when you `GET` info about a domain.
type PrivacyGetter ¶
type PrivacyGetter interface {
Privacy() Privacy
}
PrivacyGetter makes embedding easier
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 knows how to interact with domains you own // Domain is used to target a specific domain // - Get DNS record(s) // - Modify DNS record(s) // - Create DNS record(s) // etc... DomainGetter // Domains knows how to interact with domains you may or may not // own but want to perform tasks on. // - Check if a domain is available for purchase // - Purchase a domin // - List all of the domains you own // etc... DomainsGetter }
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.