Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGodaddyARecordIP ¶ added in v1.0.3
func GetGodaddyARecordIP(client *http.Client, domainName string, apiKey, secretKey string) (net.IP, error)
GetGodaddyARecordIP gets the A record associated with the domainName. The domainName param needs to look like : subdomain.domain.com . Upon successful retrieval, it returns the IP address associated with that domain
func GetPublicIP ¶ added in v1.0.3
GetPublicIP Gets the public ip of the current host, assuming that it can reach the internet it accepts an *http.Client as a param mainly for testing purposes
func UpdateGoDaddyARecord ¶
func UpdateGoDaddyARecord(client *http.Client, domainName string, publicIP net.IP, apiKey, secretKey string) error
UpdateGoDaddyARecord updates the A record of a given GoDaddy domain if the public IP that it points to is different compared to the publicIP parameter. The domainName param needs to look like : subdomain.domain.com. The function will then make a REST api call on the domain.com and will update the domain with the publicIP
Types ¶
This section is empty.