Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultZonomiBaseURL = "https://zonomi.com/app/dns/dyndns.jsp" DefaultRimuHostingBaseURL = "https://rimuhosting.com/app/dns/dyndns.jsp" )
Base URL for the RimuHosting DNS services.
View Source
const ( SetAction = "SET" QueryAction = "QUERY" DeleteAction = "DELETE" )
Action names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionParameter ¶
type ActionParameter struct { Action string `url:"action,omitempty"` Name string `url:"name,omitempty"` Type string `url:"type,omitempty"` Value string `url:"value,omitempty"` TTL int `url:"ttl,omitempty"` Priority int `url:"prio,omitempty"` }
func AddRecord ¶
func AddRecord(domain string, content string, ttl int) ActionParameter
AddRecord helper to create an action to add a TXT record.
func DeleteRecord ¶
func DeleteRecord(domain string, content string) ActionParameter
DeleteRecord helper to create an action to delete a TXT record.
type Client ¶
type Client struct { HTTPClient *http.Client BaseURL string // contains filtered or unexported fields }
Client the RimuHosting/Zonomi client.
func (Client) DoActions ¶
func (c Client) DoActions(actions ...ActionParameter) (*DNSAPIResult, error)
DoActions performs actions.
func (Client) FindTXTRecords ¶
FindTXTRecords Finds TXT records. ex: - https://zonomi.com/app/dns/dyndns.jsp?action=QUERY&name=example.com&api_key=apikeyvaluehere - https://zonomi.com/app/dns/dyndns.jsp?action=QUERY&name=**.example.com&api_key=apikeyvaluehere
type DNSAPIResult ¶
type DNSAPIResult struct { XMLName xml.Name `xml:"dnsapi_result"` IsOk string `xml:"is_ok"` ResultCounts ResultCounts `xml:"result_counts"` Actions Actions `xml:"actions"` }
Click to show internal directories.
Click to hide internal directories.