diff options
| author | Clement Michaud <clement.michaud34@gmail.com> | 2020-01-21 21:56:44 +0100 |
|---|---|---|
| committer | Amir Zarrinkafsh <nightah@me.com> | 2020-01-22 10:15:25 +1100 |
| commit | e92d3ced3a68783575e4be61621456eb5935d497 (patch) | |
| tree | 51367dc012781edacf69103edbd978381615ba8f /internal/configuration/schema/access_control.go | |
| parent | ea86b6252718059e120445afc5eacaf784d3608d (diff) | |
Introduce viper in order to read secrets from env variables.
Diffstat (limited to 'internal/configuration/schema/access_control.go')
| -rw-r--r-- | internal/configuration/schema/access_control.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/configuration/schema/access_control.go b/internal/configuration/schema/access_control.go index d493208d2..e497ecefd 100644 --- a/internal/configuration/schema/access_control.go +++ b/internal/configuration/schema/access_control.go @@ -8,11 +8,11 @@ import ( // ACLRule represent one ACL rule type ACLRule struct { - Domain string `yaml:"domain"` - Policy string `yaml:"policy"` - Subject string `yaml:"subject"` - Networks []string `yaml:"networks"` - Resources []string `yaml:"resources"` + Domain string `mapstructure:"domain"` + Policy string `mapstructure:"policy"` + Subject string `mapstructure:"subject"` + Networks []string `mapstructure:"networks"` + Resources []string `mapstructure:"resources"` } // IsPolicyValid check if policy is valid @@ -54,8 +54,8 @@ func (r *ACLRule) Validate(validator *StructValidator) { // AccessControlConfiguration represents the configuration related to ACLs. type AccessControlConfiguration struct { - DefaultPolicy string `yaml:"default_policy"` - Rules []ACLRule `yaml:"rules"` + DefaultPolicy string `mapstructure:"default_policy"` + Rules []ACLRule `mapstructure:"rules"` } // Validate validate the access control configuration |
