Skip to main content

sca

实例名实例描述
ANALYZER_TYPE_APK(analyzer.TypAnalyzer) "apk-pkg"
ANALYZER_TYPE_CLANG_CONAN(analyzer.TypAnalyzer) "conan-lang"
ANALYZER_TYPE_DPKG(analyzer.TypAnalyzer) "dpkg-pkg"
ANALYZER_TYPE_GO_BINARY(analyzer.TypAnalyzer) "go-binary-lang"
ANALYZER_TYPE_GO_MOD(analyzer.TypAnalyzer) "go-mod-lang"
ANALYZER_TYPE_JAVA_GRADLE(analyzer.TypAnalyzer) "gradle-lang"
ANALYZER_TYPE_JAVA_JAR(analyzer.TypAnalyzer) "jar-lang"
ANALYZER_TYPE_JAVA_POM(analyzer.TypAnalyzer) "pom-lang"
ANALYZER_TYPE_NODE_NPM(analyzer.TypAnalyzer) "npm-lang"
ANALYZER_TYPE_NODE_PNPM(analyzer.TypAnalyzer) "npmp-lang"
ANALYZER_TYPE_NODE_YARN(analyzer.TypAnalyzer) "yarm-lang"
ANALYZER_TYPE_PHP_COMPOSER(analyzer.TypAnalyzer) "composer-lang"
ANALYZER_TYPE_PYTHON_PACKAGING(analyzer.TypAnalyzer) "python-packaging-lang"
ANALYZER_TYPE_PYTHON_PIP(analyzer.TypAnalyzer) "python-pip-lang"
ANALYZER_TYPE_PYTHON_PIPENV(analyzer.TypAnalyzer) "python-pipenv-lang"
ANALYZER_TYPE_PYTHON_POETRY(analyzer.TypAnalyzer) "python-poetry-lang"
ANALYZER_TYPE_RPM(analyzer.TypAnalyzer) "rpm-pkg"
ANALYZER_TYPE_RUBY_BUNDLER(analyzer.TypAnalyzer) "ruby-bundler-lang"
ANALYZER_TYPE_RUBY_GEMSPEC(analyzer.TypAnalyzer) "ruby-gemspec-lang"
ANALYZER_TYPE_RUST_CARGO(analyzer.TypAnalyzer) "cargo-lang"
MODE_ALL(analyzer.ScanMode) 0
MODE_LANGUAGE(int) 4
MODE_PKG(int) 2
函数名函数描述/介绍
sca.NewAnalyzerResult
sca.ScanContainerFromContext
sca.ScanFilesystem
sca.ScanGitRepo
sca.ScanImageFromContext
sca.ScanImageFromFile
sca.ScanLocalFilesystem
sca.analyzers
sca.concurrent
sca.customAnalyzer
sca.endpoint
sca.scanMode

函数定义#

NewAnalyzerResult#

详细描述#

定义#

NewAnalyzerResult(name string, version string) *CustomPackage

参数#

参数名参数类型参数解释
namestring
versionstring

返回值#

返回值(顺序)返回值类型返回值解释
r1*CustomPackage

ScanContainerFromContext#

详细描述#

定义#

ScanContainerFromContext(containerID string, opts ...ScanOption) (pkgs []*dxtypes.Package, err error)

参数#

参数名参数类型参数解释
containerIDstring
opts...ScanOption

返回值#

返回值(顺序)返回值类型返回值解释
pkgs[]*dxtypes.Package
errerror

ScanFilesystem#

详细描述#

定义#

ScanFilesystem(p fi.FileSystem, opts ...ScanOption) ([]*dxtypes.Package, error)

参数#

参数名参数类型参数解释
pfi.FileSystem
opts...ScanOption

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*dxtypes.Package
r2error

ScanGitRepo#

详细描述#

定义#

ScanGitRepo(repoDir string, opts ...ScanOption) ([]*dxtypes.Package, error)

参数#

参数名参数类型参数解释
repoDirstring
opts...ScanOption

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*dxtypes.Package
r2error

ScanImageFromContext#

详细描述#

定义#

ScanImageFromContext(imageID string, opts ...ScanOption) ([]*dxtypes.Package, error)

参数#

参数名参数类型参数解释
imageIDstring
opts...ScanOption

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*dxtypes.Package
r2error

ScanImageFromFile#

详细描述#

定义#

ScanImageFromFile(path string, opts ...ScanOption) ([]*dxtypes.Package, error)

参数#

参数名参数类型参数解释
pathstring
opts...ScanOption

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*dxtypes.Package
r2error

ScanLocalFilesystem#

详细描述#

定义#

ScanLocalFilesystem(p string, opts ...ScanOption) ([]*dxtypes.Package, error)

参数#

参数名参数类型参数解释
pstring
opts...ScanOption

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*dxtypes.Package
r2error

analyzers#

详细描述#

定义#

analyzers(a ...analyzer.TypAnalyzer) ScanOption

参数#

参数名参数类型参数解释
a...analyzer.TypAnalyzer

返回值#

返回值(顺序)返回值类型返回值解释
r1ScanOption

concurrent#

详细描述#

定义#

concurrent(n int) ScanOption

参数#

参数名参数类型参数解释
nint

返回值#

返回值(顺序)返回值类型返回值解释
r1ScanOption

customAnalyzer#

详细描述#

定义#

customAnalyzer(matchFunc func(info analyzer.MatchInfo) int, analyzeFunc func(fi *analyzer.FileInfo, otherFi map[string]*analyzer.FileInfo) []*analyzer.CustomPackage) ScanOption

参数#

参数名参数类型参数解释
matchFuncfunc(info analyzer.MatchInfo) int
analyzeFuncfunc(fi *analyzer.FileInfo, otherFi map[string]*analyzer.FileInfo) []*analyzer.CustomPackage

返回值#

返回值(顺序)返回值类型返回值解释
r1ScanOption

endpoint#

详细描述#

定义#

endpoint(endpoint string) ScanOption

参数#

参数名参数类型参数解释
endpointstring

返回值#

返回值(顺序)返回值类型返回值解释
r1ScanOption

scanMode#

详细描述#

定义#

scanMode(mode analyzer.ScanMode) ScanOption

参数#

参数名参数类型参数解释
modeanalyzer.ScanMode

返回值#

返回值(顺序)返回值类型返回值解释
r1ScanOption