aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2022-10-19 22:00:58 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2022-10-19 22:00:58 +0200
commit8ca000cef48893e5c9ca5e5f587fac7ddd8b5469 (patch)
tree2bf3d1cd5fc416f4431e0734d932d9d1d208d029
parent5a824acdb8effa3fba03e7458d7a22a551b4a499 (diff)
add updateRecords helper
-rw-r--r--dyndns.go13
-rw-r--r--go.mod2
-rw-r--r--go.sum2
3 files changed, 17 insertions, 0 deletions
diff --git a/dyndns.go b/dyndns.go
index 9b8a64c..21003dd 100644
--- a/dyndns.go
+++ b/dyndns.go
@@ -4,6 +4,8 @@ package main
import (
"flag"
"net"
+
+ "github.com/HimbeerserverDE/inwx"
)
func main() {
@@ -30,3 +32,14 @@ func main() {
}
}
}
+
+func updateRecords(c *inwx.Client, ids []int, content string) error {
+ _, err := c.Call(&inwx.NSUpdateRecordsCall{
+ IDs: ids,
+ RecordInfo: inwx.RecordInfo{
+ Content: content,
+ },
+ })
+
+ return err
+}
diff --git a/go.mod b/go.mod
index aa95ecc..5188a2d 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,5 @@
module github.com/HimbeerserverDE/dyndns
go 1.19
+
+require github.com/HimbeerserverDE/inwx v0.0.1
diff --git a/go.sum b/go.sum
index e69de29..01e58c2 100644
--- a/go.sum
+++ b/go.sum
@@ -0,0 +1,2 @@
+github.com/HimbeerserverDE/inwx v0.0.1 h1:QWeSrEyOsFkII9S5UOX1oABtUzAGlJZGBRGERT8ohjg=
+github.com/HimbeerserverDE/inwx v0.0.1/go.mod h1:9Jvob+vCE6XhI+G6QbinYX545I1DcveVqvSuX05v0Kg=