analyzer

package
v0.0.0-...-d57dde1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 94

Documentation

Index

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 AnalyzeConfig

func AnalyzeConfig(targetOS types.OS, configBlob []byte) []types.Package

func CheckPackage

func CheckPackage(pkg *types.Package) bool

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
	// contains filtered or unexported fields
}

func AnalyzeFile

func AnalyzeFile(filePath string, info os.FileInfo, opener Opener) (*AnalysisResult, error)

func (*AnalysisResult) Merge

func (r *AnalysisResult) Merge(new *AnalysisResult)

type AnalyzeReturn

type AnalyzeReturn struct {
	OS        types.OS
	Packages  []types.Package
	Libraries []godeptypes.Library
}

func (AnalyzeReturn) ConvertToResult

func (r AnalyzeReturn) ConvertToResult(analyzerType, filePath string) *AnalysisResult

type Opener

type Opener func() ([]byte, error)

Directories

Path Synopsis
command
apk
npm
os
pkg
apk
rpm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL