diff options
author | Wolfy-J <[email protected]> | 2018-09-23 15:06:48 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-23 15:06:48 +0300 |
commit | bddab751c0cd3c19f650a1e9ce3b9d03e71f70fe (patch) | |
tree | 815b9c237ff47b3cd8fd9028c94603a486b3c868 /service/http/config.go | |
parent | 54afbfe59e1863f96c2a68764e0bd1fcfef74ade (diff) |
default configs
Diffstat (limited to 'service/http/config.go')
-rw-r--r-- | service/http/config.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/service/http/config.go b/service/http/config.go index 26cede37..b11d807c 100644 --- a/service/http/config.go +++ b/service/http/config.go @@ -50,6 +50,18 @@ func (c *Config) Hydrate(cfg service.Config) error { // Valid validates the configuration. func (c *Config) Valid() error { + if c.Uploads == nil { + return errors.New("mailformed uploads config") + } + + if c.Workers == nil { + return errors.New("mailformed workers config") + } + + if c.Workers.Pool == nil { + return errors.New("mailformed workers config (pool config is missing)") + } + if err := c.Workers.Pool.Valid(); err != nil { return err } |