Documentation ¶
Index ¶
- Variables
- func CheckPackage(pkg *types.Package) bool
- func RegisterAnalyzer(analyzer analyzer)
- func RegisterConfigAnalyzer(analyzer configAnalyzer)
- type AnalysisResult
- type AnalysisTarget
- type Analyzer
- func (a Analyzer) AnalyzeFile(wg *sync.WaitGroup, result *AnalysisResult, filePath string, info os.FileInfo, ...) error
- func (a Analyzer) AnalyzeImageConfig(targetOS types.OS, configBlob []byte) []types.Package
- func (a Analyzer) AnalyzerVersions() string
- func (a Analyzer) ImageConfigAnalyzerVersions() string
- type Opener
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnknownOS occurs when unknown OS is analyzed. ErrUnknownOS = xerrors.New("unknown OS") // ErrPkgAnalysis occurs when the analysis of packages is failed. ErrPkgAnalysis = xerrors.New("failed to analyze packages") // ErrNoPkgsDetected occurs when the required files for an OS package manager are not detected ErrNoPkgsDetected = xerrors.New("no packages detected") )
Functions ¶
func CheckPackage ¶
func RegisterAnalyzer ¶
func RegisterAnalyzer(analyzer analyzer)
func RegisterConfigAnalyzer ¶
func RegisterConfigAnalyzer(analyzer configAnalyzer)
Types ¶
type AnalysisResult ¶
type AnalysisResult struct { OS *types.OS PackageInfos []types.PackageInfo Applications []types.Application Configs []types.Config // contains filtered or unexported fields }
func (*AnalysisResult) Merge ¶
func (r *AnalysisResult) Merge(new *AnalysisResult)
func (*AnalysisResult) Sort ¶
func (r *AnalysisResult) Sort()
type AnalysisTarget ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func NewAnalyzer ¶
func (Analyzer) AnalyzeFile ¶
func (Analyzer) AnalyzeImageConfig ¶
func (Analyzer) AnalyzerVersions ¶
AnalyzerVersions returns analyzer version identifier used for cache suffixes. e.g. alpine: 1, amazon: 3, debian: 2 => 132 When the amazon analyzer is disabled => 102
func (Analyzer) ImageConfigAnalyzerVersions ¶
ImageConfigAnalyzerVersions returns analyzer version identifier used for cache suffixes.
type Type ¶
type Type int
const ( // OS TypeAlpine Type = iota + 1 TypeAmazon TypeDebian TypePhoton TypeCentOS TypeFedora TypeOracle TypeRedHatBase TypeSUSE TypeUbuntu // OS Package TypeApk TypeDpkg TypeRpm // Programming Language Package TypeBundler TypeCargo TypeComposer TypeJar TypeNpm TypeNuget TypePipenv TypePoetry TypeYarn // Image Config TypeApkCommand // Structured Config TypeYaml TypeTOML TypeJSON TypeDockerfile TypeHCL )
NOTE: Do not change the order of "Type" unnecessarily, as it will affect the cache.
Click to show internal directories.
Click to hide internal directories.