mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
fix(config): make all extension config consistent (#888)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
38b00e3507
commit
763287873e
@@ -6,6 +6,11 @@ import (
|
||||
"zotregistry.io/zot/pkg/extensions/sync"
|
||||
)
|
||||
|
||||
// BaseConfig has params applicable to all extensions.
|
||||
type BaseConfig struct {
|
||||
Enable *bool `mapstructure:",omitempty"`
|
||||
}
|
||||
|
||||
type ExtensionConfig struct {
|
||||
Search *SearchConfig
|
||||
Sync *sync.Config
|
||||
@@ -15,14 +20,14 @@ type ExtensionConfig struct {
|
||||
}
|
||||
|
||||
type LintConfig struct {
|
||||
Enabled *bool
|
||||
BaseConfig `mapstructure:",squash"`
|
||||
MandatoryAnnotations []string
|
||||
}
|
||||
|
||||
type SearchConfig struct {
|
||||
BaseConfig `mapstructure:",squash"`
|
||||
// CVE search
|
||||
CVE *CVEConfig
|
||||
Enable *bool
|
||||
CVE *CVEConfig
|
||||
}
|
||||
|
||||
type CVEConfig struct {
|
||||
@@ -30,7 +35,7 @@ type CVEConfig struct {
|
||||
}
|
||||
|
||||
type MetricsConfig struct {
|
||||
Enable *bool
|
||||
BaseConfig `mapstructure:",squash"`
|
||||
Prometheus *PrometheusConfig
|
||||
}
|
||||
|
||||
@@ -39,6 +44,6 @@ type PrometheusConfig struct {
|
||||
}
|
||||
|
||||
type ScrubConfig struct {
|
||||
Enable *bool
|
||||
Interval time.Duration
|
||||
BaseConfig `mapstructure:",squash"`
|
||||
Interval time.Duration
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user