diff options
author | wppd <[email protected]> | 2019-12-25 10:31:10 +0800 |
---|---|---|
committer | wppd <[email protected]> | 2019-12-25 10:31:10 +0800 |
commit | 081c3708f242a491ddef9733f95f35e70f50c3e7 (patch) | |
tree | e362a8f93f820c95fae91ee7d5f080c870ec83cd /service/gzip/config.go | |
parent | 75a817edcff22e721dcc3a7fa5590b866f630403 (diff) |
add gzip handler
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 +} |