diff options
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/config.go b/config.go new file mode 100644 index 0000000..7e08e77 --- /dev/null +++ b/config.go @@ -0,0 +1,34 @@ +package dyndns + +// Config stores the server configuration +type Config struct { + Verbose bool `toml:"verbose"` + Port int `toml:"port"` + Strict bool `toml:"strict"` + PublishMethod string `toml:"publish_method"` + MinimumTime int `toml:"minimum_time"` + Domains []Domain `toml:"domain"` + RRs []RR `toml:"record"` + Accounts []Account `toml:"account"` +} + +// Account stores the account details +type Account struct { + Username string `toml:"username"` + Password string `toml:"password"` + Hostnames []string `toml:"hostnames"` +} + +// Domain stores settings for zones +type Domain struct { + FQDN string `toml:"fqdn"` + TTL int `toml:"ttl"` +} + +// RR defines resource records, must contain a Domain +type RR struct { + FQDN string `toml:"fqdn"` + Type string `toml:"type"` + TTL int `toml:"ttl"` + Data string `toml:"data"` +} |
