2021-06-08 23:11:18 +03:00
|
|
|
package config
|
2020-10-14 14:47:20 -07:00
|
|
|
|
2021-06-08 23:11:18 +03:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/anuvu/zot/pkg/extensions/sync"
|
|
|
|
)
|
2020-10-14 14:47:20 -07:00
|
|
|
|
|
|
|
type ExtensionConfig struct {
|
2021-10-15 18:05:00 +03:00
|
|
|
Search *SearchConfig
|
|
|
|
Sync *sync.Config
|
|
|
|
Metrics *MetricsConfig
|
2020-10-14 14:47:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type SearchConfig struct {
|
|
|
|
// CVE search
|
2021-06-08 21:37:31 +03:00
|
|
|
CVE *CVEConfig
|
|
|
|
Enable bool
|
2020-10-14 14:47:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type CVEConfig struct {
|
|
|
|
UpdateInterval time.Duration // should be 2 hours or more, if not specified default be kept as 24 hours
|
|
|
|
}
|
2021-10-15 18:05:00 +03:00
|
|
|
|
|
|
|
type MetricsConfig struct {
|
|
|
|
Enable bool
|
|
|
|
Prometheus *PrometheusConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type PrometheusConfig struct {
|
|
|
|
Path string // default is "/metrics"
|
|
|
|
}
|