0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
zot/pkg/extensions/config/config.go
Andrei Aaron ce4924f841
refactor: rename go module from zotregistry.io/zot to zotregistry.dev/zot (#2187)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2024-01-31 20:34:07 -08:00

77 lines
1.5 KiB
Go

package config
import (
"time"
"zotregistry.dev/zot/pkg/extensions/config/sync"
)
// BaseConfig has params applicable to all extensions.
type BaseConfig struct {
Enable *bool `mapstructure:",omitempty"`
}
type ExtensionConfig struct {
Search *SearchConfig
Sync *sync.Config
Metrics *MetricsConfig
Scrub *ScrubConfig
Lint *LintConfig
UI *UIConfig
Mgmt *MgmtConfig
APIKey *APIKeyConfig
Trust *ImageTrustConfig
}
type ImageTrustConfig struct {
BaseConfig `mapstructure:",squash"`
Cosign bool
Notation bool
}
type APIKeyConfig struct {
BaseConfig `mapstructure:",squash"`
}
type MgmtConfig struct {
BaseConfig `mapstructure:",squash"`
}
type LintConfig struct {
BaseConfig `mapstructure:",squash"`
MandatoryAnnotations []string
}
type SearchConfig struct {
BaseConfig `mapstructure:",squash"`
// CVE search
CVE *CVEConfig
}
type CVEConfig struct {
UpdateInterval time.Duration // should be 2 hours or more, if not specified default be kept as 24 hours
Trivy *TrivyConfig
}
type TrivyConfig struct {
DBRepository string // default is "ghcr.io/aquasecurity/trivy-db"
JavaDBRepository string // default is "ghcr.io/aquasecurity/trivy-java-db"
}
type MetricsConfig struct {
BaseConfig `mapstructure:",squash"`
Prometheus *PrometheusConfig
}
type PrometheusConfig struct {
Path string // default is "/metrics"
}
type ScrubConfig struct {
BaseConfig `mapstructure:",squash"`
Interval time.Duration
}
type UIConfig struct {
BaseConfig `mapstructure:",squash"`
}