Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultZonomiBaseURL = "https://zonomi.com/app/dns/dyndns.jsp" DefaultRimuHostingBaseURL = "https://rimuhosting.com/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 NewAddRecordAction ¶
func NewAddRecordAction(domain, content string, ttl int) ActionParameter
NewAddRecordAction helper to create an action to add a TXT record.
func NewDeleteRecordAction ¶
func NewDeleteRecordAction(domain, content string) ActionParameter
NewDeleteRecordAction 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(ctx context.Context, 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.