sacrebleu-dns/utils/structs.go

44 lines
871 B
Go
Raw Normal View History

2020-12-13 03:01:04 +00:00
package utils
//App : Struct for App (dns server) configuration in the config.ini file
2020-12-13 03:01:04 +00:00
type App struct {
Port int
IP string `ini:"IP"`
2020-12-13 03:01:04 +00:00
Logdir string
Logfile bool
}
//Database : Struct for SQL Database configuration in the config.ini file
2020-12-13 03:01:04 +00:00
type Database struct {
Host string `ini:"Host"`
2020-12-13 03:01:04 +00:00
Port string
Username string
Password string
Db string `ini:"DB"`
Type string
2020-12-13 03:01:04 +00:00
}
//Redis : Struct for Redis Database configuration in the config.ini file
2020-12-13 03:01:04 +00:00
type Redis struct {
IP string `ini:"IP"`
2020-12-13 03:01:04 +00:00
Port int
Password string
Db int `ini:"DB"`
TTL int `ini:"TTL"`
2020-12-13 03:01:04 +00:00
}
2021-01-03 19:17:01 +00:00
//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
2020-12-13 03:01:04 +00:00
type Conf struct {
AppMode string `ini:"app_mode"`
2020-12-13 03:01:04 +00:00
App
Database
Redis
DNS DNS
2020-12-13 03:01:04 +00:00
}