diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-12-21 20:48:14 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-21 20:48:14 +1100 |
| commit | c7f4d5999d0b0b22594dcc917516257e4fe81747 (patch) | |
| tree | 26b306c4a9ad9aeabfb712f75cb5df653711c722 /internal/configuration/types.go | |
| parent | 566a0d7fc71b450123ad33d350cd3890d311da82 (diff) | |
feat(configuration): file filters (#4515)
This adds experimental file filters which are not guaranteed under our stability policies. These filters take effect after reading the files and before parsing their content.
Diffstat (limited to 'internal/configuration/types.go')
| -rw-r--r-- | internal/configuration/types.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/configuration/types.go b/internal/configuration/types.go index 5946ea7f2..32a15fb5e 100644 --- a/internal/configuration/types.go +++ b/internal/configuration/types.go @@ -7,17 +7,18 @@ import ( "github.com/authelia/authelia/v4/internal/configuration/schema" ) -// Source is an abstract representation of a configuration Source implementation. +// Source is an abstract representation of a configuration configuration.Source implementation. type Source interface { Name() (name string) Merge(ko *koanf.Koanf, val *schema.StructValidator) (err error) Load(val *schema.StructValidator) (err error) } -// YAMLFileSource is a configuration Source with a YAML File. +// YAMLFileSource is a YAML file configuration.Source. type YAMLFileSource struct { - koanf *koanf.Koanf - path string + koanf *koanf.Koanf + path string + filters []FileFilter } // EnvironmentSource is a configuration Source which loads values from the environment. |
