Documentation ¶
Index ¶
Constants ¶
const ( // APIProdEnv targets the production Gateway APIProdEnv = "prod" // APIDevEnv targets the development Gateway APIDevEnv = "dev" // APIVersion1 specifies version 1 APIVersion1 = "v1" // APIVersion2 specifies version 2 APIVersion2 = "v2" // RecordTypeA defines A record RecordTypeA = "A" // RecordTypeAAAA defines AAAA record RecordTypeAAAA = "AAAA" // RecordTypeCNAME defines CNAME record RecordTypeCNAME = "CNAME" // RecordTypeMX defines MX record RecordTypeMX = "MX" // RecordTypeNS defines NS record RecordTypeNS = "NS" // RecordTypeSOA defines SOA record RecordTypeSOA = "SOA" // RecordTypeSRV defines SRV record RecordTypeSRV = "SRV" // RecordTypeTXT defines TXT record RecordTypeTXT = "TXT" // MethodGet is global shortcut for http.MethodGet MethodGet = http.MethodGet // MethodPost is global shortcut for http.MethodPost MethodPost = http.MethodPost // MethodPut is global shortcut for http.MethodPut MethodPut = http.MethodPut // MethodPatch is global shortcut for http.MethodPatch MethodPatch = http.MethodPatch // MethodDelete is global shortcut for http.MethodDelete MethodDelete = http.MethodDelete )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v1.3.1
API knows which version to target
func NewDevelopment ¶ added in v1.3.6
NewDevelopment targets GoDaddy development API
func NewProduction ¶ added in v1.3.6
NewProduction targets GoDaddy production API
type AddressMailing ¶ added in v1.3.1
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 defines a mailing address
func (*AddressMailing) FullAddress ¶ added in v1.3.8
func (am *AddressMailing) FullAddress() string
FullAddress returns the full address (Address + Address2)
type Config ¶ added in v1.3.2
type Config struct {
// contains filtered or unexported fields
}
Config holds connection options
type Contact ¶ added in v1.3.1
type Contact struct { AddressMailing AddressMailing Email string Fax string JobTitle string NameFirst string NameLast string NameMiddle string Organization string Phone string }
Contact defines the details of a contact
type Domain ¶ added in v1.3.1
type Domain interface { Records() Records GetDetails(ctx context.Context) (*DomainDetails, error) }
Domain knows how to interact with the Domains GoDaddy Gateway endpoint
type DomainAvailability ¶ added in v1.3.8
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.3.1
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 defines the details of a domain
type DomainName ¶ added in v1.3.1
type DomainName struct {
Status string
}
DomainName defines a domain name
type DomainSummary ¶ added in v1.3.8
type DomainSummary struct { CreatedAt time.Time Domain string DomainID int ExpirationProtected bool Expires time.Time ExposeWhois bool HoldRegistrar bool Locked bool NameServers []string Privacy bool RenewAuto bool Renewable bool Status string TransferAwayEligibleAt time.Time TransferProtected bool }
DomainSummary is what gets returned when listing all of your domains
type RealName ¶ added in v1.3.1
type RealName struct {
Status string `json:"status,omitempty"`
}
RealName defines the real name
type Record ¶ added in v1.3.1
type Record 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"` }
Record defines a DNS record
type Records ¶ added in v1.3.1
type Records interface { List(ctx context.Context) ([]Record, error) FindByType(ctx context.Context, t string) ([]Record, error) FindByTypeAndName(ctx context.Context, t string, n string) ([]Record, error) Update(ctx context.Context, rec Record) error Delete(ctx context.Context, rec Record) error }
Records knows how to interact with the Records GoDaddy Gateway endpoint
type V1 ¶ added in v1.3.6
type V1 interface { Domain(name string) Domain ListDomains(ctx context.Context) ([]DomainSummary, error) CheckAvailability(ctx context.Context, name string, forTransfer bool) (DomainAvailability, error) PurchaseDomain(ctx context.Context, dom DomainDetails) error }
V1 knows how to interact with GoDaddy Gateway version 1
type V2 ¶ added in v1.3.6
type V2 interface{}
V2 knows how to interact with GoDaddy Gateway version 2
type Verifications ¶ added in v1.3.1
type Verifications struct { DomainName DomainName `json:"domainName,omitempty"` RealName RealName `json:"realName,omitempty"` }
Verifications defines who verified purchases, etc..