syft/imgbom/analyzer/analyzer.go
2020-05-21 16:53:17 -04:00

17 lines
533 B
Go

package analyzer
import (
"github.com/anchore/imgbom/imgbom/pkg"
"github.com/anchore/stereoscope/pkg/file"
"github.com/anchore/stereoscope/pkg/tree"
)
type Analyzer interface {
Name() string
// TODO: add ID / Name for analyze for uniquely identifying this analyzer type
SelectFiles([]*tree.FileTree) []file.Reference
// NOTE: one of the errors which is returned is "IterationNeeded", which indicates to the driver to
// continue with another Select/Analyze pass
Analyze(map[file.Reference]string) ([]pkg.Package, error)
}