aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--calls.go20
-rw-r--r--record.go40
2 files changed, 60 insertions, 0 deletions
diff --git a/calls.go b/calls.go
index 0664d92..a9f7464 100644
--- a/calls.go
+++ b/calls.go
@@ -13,3 +13,23 @@ type logoutCall struct{}
func (c *logoutCall) method() string { return "account.logout" }
func (c *logoutCall) expectedStatus() []Status { return []Status{SuccessClosing} }
+
+// A NSUpdateRecordsCall updates one or more DNS records.
+type NSUpdateRecordsCall struct {
+ IDs []int `json:"id"`
+ Name string `json:"name,omitempty"`
+ Type RecordType `json:"type,omitempty"`
+ Content string `json:"content,omitempty"`
+ Priority int `json:"prio,omitempty"`
+ TTL int `json:"ttl,omitempty"`
+ URLRedirectType RecordURLRedirectType `json:"urlRedirectType,omitempty"`
+ URLRedirectTitle string `json:"urlRedirectTitle,omitempty"`
+ URLRedirectDesc string `json:"urlRedirectDescription,omitempty"`
+ URLRedirectFavIcon string `json:"urlRedirectFavIcon,omitempty"`
+ URLRedirectKeywords string `json:"urlRedirectKeywords,omitempty"`
+ URLAppend bool `json:"urlAppend,omitempty"`
+ TestingMode bool `json:"testing,omitempty"`
+}
+
+func (c *NSUpdateRecordsCall) method() string { return "nameserver.updateRecord" }
+func (c *NSUpdateRecordsCall) expectedStatus() []Status { return []Status{Success} }
diff --git a/record.go b/record.go
new file mode 100644
index 0000000..b2f01ea
--- /dev/null
+++ b/record.go
@@ -0,0 +1,40 @@
+package inwx
+
+// A RecordType specifies the type of a DNS record.
+type RecordType string
+
+const (
+ A = "A"
+ AAAA = "AAAA"
+ AFSDB = "AFSDB"
+ ALIAS = "ALIAS"
+ CAA = "CAA"
+ Cert = "CERT"
+ CNAME = "CNAME"
+ HINFO = "HINFO"
+ KEY = "KEY"
+ LOC = "LOC"
+ MX = "MX"
+ NAPTR = "NAPTR"
+ NS = "NS"
+ OpenPGPKey = "OPENPGPKEY"
+ PTR = "PTR"
+ RP = "RP"
+ SMIMEA = "SMIMEA"
+ SOA = "SOA"
+ SRV = "SRV"
+ SSHFP = "SSHFP"
+ TLSA = "TLSA"
+ TXT = "TXT"
+ URI = "URI"
+ URL = "URL"
+)
+
+// A RecordURLRedirectType specifies which method of HTTP redirection to use.
+type RecordURLRedirectType string
+
+const (
+ Permanent = "HEADER301"
+ Temporary = "HEADER302"
+ Frame = "FRAME"
+)