mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
23 lines
658 B
Go
23 lines
658 B
Go
package config
|
|
|
|
import (
|
|
"github.com/spf13/viper"
|
|
|
|
"github.com/anchore/syft/syft/source"
|
|
)
|
|
|
|
type FileMetadata struct {
|
|
Cataloger catalogerOptions `yaml:"cataloger" json:"cataloger" mapstructure:"cataloger"`
|
|
Digests []string `yaml:"digests" json:"digests" mapstructure:"digests"`
|
|
}
|
|
|
|
func (cfg FileMetadata) loadDefaultValues(v *viper.Viper) {
|
|
v.SetDefault("file-metadata.cataloger.enabled", catalogerEnabledDefault)
|
|
v.SetDefault("file-metadata.cataloger.scope", source.SquashedScope)
|
|
v.SetDefault("file-metadata.digests", []string{"sha256"})
|
|
}
|
|
|
|
func (cfg *FileMetadata) parseConfigValues() error {
|
|
return cfg.Cataloger.parseConfigValues()
|
|
}
|