diff --git a/README.md b/README.md index 35d0eee..9c45b91 100644 --- a/README.md +++ b/README.md @@ -43,13 +43,14 @@ Variables names are case sensitives. |IP|string|``":"``|IP address on which the DNS server must listen. Blank to listen on all IPs |Port|int|``5353``|Port on which the DNS server must listen |Logfile|bool|``true``|Enable or disable file logs. +|Logdir|string|``/var/log``|Log file directory. |Database|Section| |Type|string|``"postgresql"``|SQL Database type. ``"postgresql"`` or ``"mysql"`` (anything different than ``"postgresql"`` will rollback to ``"mysql"``) |Host|string|``"127.0.0.1"`` ``"/var/run/postgres"``|Can be either an IP or a path to a socket for Postgres |Username|string|``"sacrebleu"``|SQL Database Username |Password|string|``"superSecretPassword"``|SQL Database Password (optional) |Port|string|``"5432"``|SQL Database port (``"5432"`` for postgres or ``"3306"`` for MySQL by default) -|Db|string|``"sacrebleudatabase"``|SQL Database Name +|DB|string|``"sacrebleudatabase"``|SQL Database Name |Redis|Section |IP|string|``"127.0.0.1"``|Redis Database IP |Password|string|``""``|Redis Database Password diff --git a/utils/structs.go b/utils/structs.go index 1b1f932..af7a141 100644 --- a/utils/structs.go +++ b/utils/structs.go @@ -2,10 +2,11 @@ package utils //App : Struct for App (dns server) configuration in the config.ini file type App struct { - Port int - IP string `ini:"IP"` - Logdir string - Logfile bool + Port int + IP string `ini:"IP"` + Logdir string + Logfile bool + AllowedOrigins []string //API conf only } //Database : Struct for SQL Database configuration in the config.ini file @@ -29,8 +30,8 @@ type Redis struct { //DNS : Struct for XFR and NS type DNS struct { - XfrIPs []string - Nameservers []string + XfrIPs []string //DNS conf only + Nameservers []string //API conf only } //Conf : Struct for the whole config.ini file when it will be parsed by go-ini @@ -38,6 +39,6 @@ type Conf struct { AppMode string `ini:"app_mode"` App Database - Redis - DNS DNS + Redis //DNS conf only + DNS DNS }