Documentation ¶
Index ¶
- Constants
- func DrawPackagesDOT(pkgs []*dxtypes.Package)
- func IsExecutable(buf []byte) bool
- func MergePackages(pkgs []*dxtypes.Package) []*dxtypes.Package
- func NewApkAnalyzer() *apkAnalyzer
- func NewConanAnalyzer() *conanAnalyzer
- func NewCustomAnalyzer(matchFunc func(info MatchInfo) int, ...) *customAnalyzer
- func NewDpkgAnalyzer() *dpkgAnalyzer
- func NewGoBinaryAnalyzer() *goBinaryAnalyzer
- func NewGoModAnalyzer() *goModAnalyzer
- func NewJarParser(path string, size int64) types.Parser
- func NewJavaGradleAnalyzer() *gradleAnalyzer
- func NewJavaJarAnalyzer() *jarAnalyzer
- func NewJavaPomAnalyzer() *pomAnalyzer
- func NewNodeNpmAnalyzer() *npmAnalyzer
- func NewNodePnpmAnalyzer() *pnpmAnalyzer
- func NewNodeYarnAnalyzer() *yarnAnalyzer
- func NewPHPComposerAnalyzer() *composerAnalyzer
- func NewPythonPIPAnalyzer() *pythonPIPAnalyzer
- func NewPythonPIPEnvAnalyzer() *pythonPIPEnvAnalyzer
- func NewPythonPackagingAnalyzer() *pythonPackagingAnalyzer
- func NewPythonPoetryAnalyzer() *pythonPoetryAnalyzer
- func NewRPMAnalyzer() *rpmAnalyzer
- func NewRubyBundlerAnalyzer() *rubyBunlderAnalyzer
- func NewRubyGemSpecAnalyzer() *rubyGemSpecAnalyzer
- func NewRustCargoAnalyzer() *cargoAnalyzer
- func ParseLanguageConfiguration(fi *FileInfo, parser types.Parser) ([]*dxtypes.Package, error)
- func ReadBlock(r *bufio.Reader) ([]byte, error)
- func RegisterAnalyzer(typ TypAnalyzer, a Analyzer)
- func SetFileInfoFileSystem(fi *FileInfo, fs fi.FileSystem)
- type AnalyzeFileInfo
- type Analyzer
- type AnalyzerGroup
- func (ag *AnalyzerGroup) AddAnalyzers(analyzers ...Analyzer)
- func (ag *AnalyzerGroup) Analyze() error
- func (ag *AnalyzerGroup) Clear()
- func (ag *AnalyzerGroup) Consume(wg *sync.WaitGroup)
- func (ag *AnalyzerGroup) Match(path string, fi fs.FileInfo, r io.Reader) error
- func (ag *AnalyzerGroup) Packages() []*dxtypes.Package
- type CustomPackage
- type FileInfo
- type JarParser
- type JarProperties
- type MatchInfo
- type ScanMode
- type TypAnalyzer
Constants ¶
View Source
const ( AllMode ScanMode = 0 PkgMode = 1 << (iota - 1) LanguageMode )
View Source
const ( TypPythonPoetry TypAnalyzer = "python-poetry-lang" PoetryLockFile = "poetry.lock" PyProjectFile = "pyproject.toml" )
View Source
const ( TypRustCargo TypAnalyzer = "cargo-lang" CargoLock = "Cargo.lock" CargoToml = "Cargo.toml" )
Variables ¶
This section is empty.
Functions ¶
func DrawPackagesDOT ¶
func IsExecutable ¶
func NewApkAnalyzer ¶
func NewApkAnalyzer() *apkAnalyzer
func NewConanAnalyzer ¶
func NewConanAnalyzer() *conanAnalyzer
func NewCustomAnalyzer ¶
func NewDpkgAnalyzer ¶
func NewDpkgAnalyzer() *dpkgAnalyzer
func NewGoBinaryAnalyzer ¶
func NewGoBinaryAnalyzer() *goBinaryAnalyzer
func NewGoModAnalyzer ¶
func NewGoModAnalyzer() *goModAnalyzer
func NewJavaGradleAnalyzer ¶
func NewJavaGradleAnalyzer() *gradleAnalyzer
func NewJavaJarAnalyzer ¶
func NewJavaJarAnalyzer() *jarAnalyzer
func NewJavaPomAnalyzer ¶
func NewJavaPomAnalyzer() *pomAnalyzer
func NewNodeNpmAnalyzer ¶
func NewNodeNpmAnalyzer() *npmAnalyzer
func NewNodePnpmAnalyzer ¶
func NewNodePnpmAnalyzer() *pnpmAnalyzer
func NewNodeYarnAnalyzer ¶
func NewNodeYarnAnalyzer() *yarnAnalyzer
func NewPHPComposerAnalyzer ¶
func NewPHPComposerAnalyzer() *composerAnalyzer
func NewPythonPIPAnalyzer ¶
func NewPythonPIPAnalyzer() *pythonPIPAnalyzer
func NewPythonPIPEnvAnalyzer ¶
func NewPythonPIPEnvAnalyzer() *pythonPIPEnvAnalyzer
func NewPythonPackagingAnalyzer ¶
func NewPythonPackagingAnalyzer() *pythonPackagingAnalyzer
func NewPythonPoetryAnalyzer ¶
func NewPythonPoetryAnalyzer() *pythonPoetryAnalyzer
func NewRPMAnalyzer ¶
func NewRPMAnalyzer() *rpmAnalyzer
func NewRubyBundlerAnalyzer ¶
func NewRubyBundlerAnalyzer() *rubyBunlderAnalyzer
func NewRubyGemSpecAnalyzer ¶
func NewRubyGemSpecAnalyzer() *rubyGemSpecAnalyzer
func NewRustCargoAnalyzer ¶
func NewRustCargoAnalyzer() *cargoAnalyzer
func ReadBlock ¶
ReadBlock reads Analyzer data block from the underlying reader until Analyzer blank line is encountered.
func RegisterAnalyzer ¶
func RegisterAnalyzer(typ TypAnalyzer, a Analyzer)
func SetFileInfoFileSystem ¶
func SetFileInfoFileSystem(fi *FileInfo, fs fi.FileSystem)
Types ¶
type AnalyzeFileInfo ¶
type Analyzer ¶
type Analyzer interface { Analyze(AnalyzeFileInfo) ([]*dxtypes.Package, error) Match(MatchInfo) int }
func FilterAnalyzer ¶
func FilterAnalyzer(mode ScanMode, usedAnalyzers []TypAnalyzer) []Analyzer
type AnalyzerGroup ¶
type AnalyzerGroup struct {
// contains filtered or unexported fields
}
func NewAnalyzerGroup ¶
func NewAnalyzerGroup(numWorkers int, scanMode ScanMode, usedAnalyzers []TypAnalyzer, customAnalyzers []Analyzer, fis ...fi.FileSystem) *AnalyzerGroup
func (*AnalyzerGroup) AddAnalyzers ¶
func (ag *AnalyzerGroup) AddAnalyzers(analyzers ...Analyzer)
func (*AnalyzerGroup) Analyze ¶
func (ag *AnalyzerGroup) Analyze() error
func (*AnalyzerGroup) Clear ¶
func (ag *AnalyzerGroup) Clear()
func (*AnalyzerGroup) Consume ¶
func (ag *AnalyzerGroup) Consume(wg *sync.WaitGroup)
func (*AnalyzerGroup) Packages ¶
func (ag *AnalyzerGroup) Packages() []*dxtypes.Package
type CustomPackage ¶
func NewAnalyzerResult ¶
func NewAnalyzerResult(name, version string) *CustomPackage
type JarParser ¶
type JarParser struct {
// contains filtered or unexported fields
}
func (*JarParser) Parse ¶
func (p *JarParser) Parse(fs fi.FileSystem, r types.ReadSeekerAt) ([]types.Library, []types.Dependency, error)
type JarProperties ¶
type JarProperties struct { GroupID string ArtifactID string Version string FilePath string // path to file containing these props }
func (JarProperties) Library ¶
func (p JarProperties) Library() types.Library
func (JarProperties) String ¶
func (p JarProperties) String() string
func (JarProperties) Valid ¶
func (p JarProperties) Valid() bool
type TypAnalyzer ¶
type TypAnalyzer string
const ( TypClangConan TypAnalyzer = "conan-lang" ConanLock = "conan.lock" )
const ( TypJavaPom TypAnalyzer = "pom-lang" MavenPom = "pom.xml" )
const ( TypNodeYarn TypAnalyzer = "yarm-lang" YarnLock = "yarn.lock" )
const ( TypRubyBundler TypAnalyzer = "ruby-bundler-lang" GemLock = "Gemfile.lock" )
const (
TypAPK TypAnalyzer = "apk-pkg"
)
const (
TypDPKG TypAnalyzer = "dpkg-pkg"
)
const (
TypGoBinary TypAnalyzer = "go-binary-lang"
)
const (
TypGoMod TypAnalyzer = "go-mod-lang"
)
const (
TypJavaGradle TypAnalyzer = "gradle-lang"
)
const (
TypJavaJar TypAnalyzer = "jar-lang"
)
const (
TypNodeNpm TypAnalyzer = "npm-lang"
)
const (
TypNodePnpm TypAnalyzer = "npmp-lang"
)
const (
TypPHPComposer TypAnalyzer = "composer-lang"
)
const (
TypPythonPIP TypAnalyzer = "python-pip-lang"
)
const (
TypPythonPIPEnv TypAnalyzer = "python-pipenv-lang"
)
const (
TypPythonPackaging TypAnalyzer = "python-packaging-lang"
)
const (
TypRPM TypAnalyzer = "rpm-pkg"
)
const (
TypRubyGemSpec TypAnalyzer = "ruby-gemspec-lang"
)
Source Files ¶
- analyzer.go
- apk.go
- c_conan.go
- custom_analyzer.go
- dpkg.go
- filetype.go
- go_binary.go
- go_mod.go
- java_gradle.go
- java_jar.go
- java_pom.go
- nodejs_npm.go
- nodejs_pnpm.go
- nodejs_yarn.go
- parser_java_jar.go
- php_composer.go
- python_packaging.go
- python_pip.go
- python_pipenv.go
- python_poerty.go
- rpm.go
- ruby_bundler.go
- ruby_gemspec.go
- rust_cargo.go
- utils_dependence.go
- utils_io.go
Click to show internal directories.
Click to hide internal directories.