From 384ca40434514b7981ef8e35f7ea72880d91afa8 Mon Sep 17 00:00:00 2001 From: Mael GRAMAIN Date: Sun, 3 Jan 2021 15:17:01 -0400 Subject: [PATCH] New parameters in the config file --- extra/config.ini.example | 4 ++++ utils/structs.go | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/extra/config.ini.example b/extra/config.ini.example index 3a1aeee..efc13ce 100644 --- a/extra/config.ini.example +++ b/extra/config.ini.example @@ -22,3 +22,7 @@ Port = 6379 Password = "" DB = 0 TTL = 10 #In seconds + +[Dns] +XfrIPs = ["*"] #Array of slaves IPs +Nameservers = ["ns1.example.org", "ns2.example.org", "ns1.example.com"] #Arry of NS urls. (the first one is the master) \ No newline at end of file diff --git a/utils/structs.go b/utils/structs.go index 18a9ef6..f188909 100644 --- a/utils/structs.go +++ b/utils/structs.go @@ -27,6 +27,12 @@ type Redis struct { TTL int `ini:"TTL"` } +//DNS : Struct for XFR and NS +type DNS struct { + XfrIPs []string + Nameservers []string +} + //Conf : Struct for the whole config.ini file when it will be parsed by go-ini type Conf struct { AppMode string `ini:"app_mode"`