diff options
Diffstat (limited to 'service/gzip/config.go')
-rw-r--r-- | service/gzip/config.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/service/gzip/config.go b/service/gzip/config.go new file mode 100644 index 00000000..7da48a67 --- /dev/null +++ b/service/gzip/config.go @@ -0,0 +1,23 @@ +package gzip + +import ( + "github.com/spiral/roadrunner/service" +) + +// Config describes file location and controls access to them. +type Config struct { + // Dir contains name of directory to control access to. + Enable bool +} + +// Hydrate must populate Config values using given Config source. Must return error if Config is not valid. +func (c *Config) Hydrate(cfg service.Config) error { + return cfg.Unmarshal(c) +} + +// InitDefaults sets missing values to their default values. +func (c *Config) InitDefaults() error { + c.Enable = true + + return nil +} |