summaryrefslogtreecommitdiff
path: root/service/gzip/config.go
blob: 7da48a67e725922c744dd9579de5439eadd4ec1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
}