Change the way domains and hostnames are configured

This commit is contained in:
Mike Cheng 2015-05-04 03:07:14 -04:00
parent 338c337736
commit 9faf101631
3 changed files with 21 additions and 16 deletions

View file

@ -7,7 +7,8 @@ import (
type Config struct { type Config struct {
Dev bool `json:"dev"` Dev bool `json:"dev"`
Domains []string `json:"domains"` Domain string `json:"domain"`
Hostnames []string `json:"hostnames"`
Interval int `json:"interval"` Interval int `json:"interval"`
Token string `json:"token"` Token string `json:"token"`
Username string `json:"username"` Username string `json:"username"`

View file

@ -14,13 +14,15 @@ func init() {
Token: "asdasdasdasdasdad", Token: "asdasdasdasdasdad",
Interval: 60, Interval: 60,
Dev: true, Dev: true,
Domains: []string{"test.com", "fake.com"}, Domain: "test.com",
Hostnames: []string{"mail", "chat"},
}, },
Config{ Config{
Username: "production-account", Username: "production-account",
Token: "123123123123", Token: "123123123123",
Interval: 3600, Interval: 3600,
Domains: []string{"live.com", "abc.live.com"}, Domain: "live.com",
Hostnames: []string{"mail", "support"},
}, },
} }
} }

View file

@ -5,13 +5,15 @@
"token": "asdasdasdasdasdad", "token": "asdasdasdasdasdad",
"interval": 60, "interval": 60,
"dev": true, "dev": true,
"domains": [ "test.com", "fake.com" ] "domain": "test.com",
"hostnames": [ "mail", "chat" ]
}, },
{ {
"username": "production-account", "username": "production-account",
"token": "123123123123", "token": "123123123123",
"interval": 3600, "interval": 3600,
"domains": [ "live.com", "abc.live.com" ] "domain": "live.com",
"hostnames": [ "mail", "support" ]
} }
] ]
} }