Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decomposer ¶
type Decomposer interface {
Extract(*DecomposerOptions) (*sbom.NodeList, error)
Requirements(*DecomposerOptions) []Requirement
DefaultOptions() any
}
Decomposer is an interface that abstracts the logic of dependency extraction from a codebase.
type DecomposerOptions ¶
type DecomposerOptions struct {
WorkDir string
// Version is the version to use on the resulting root nodes after decomposing
Version string
// CommitHash captures the hash of the last commit when running in a repository
CommitHash string
// contains filtered or unexported fields
}
DecomposerOptions is the options set that goes into an Extract() run in a decomposer. They are meant to be ephimeral, for the invocation only, and derived from the Unpacker configuration whe invoked from there.
func (*DecomposerOptions) GetDriverOptions ¶
func (so *DecomposerOptions) GetDriverOptions(dec Decomposer) any
func (*DecomposerOptions) SetDriverOptions ¶
func (so *DecomposerOptions) SetDriverOptions(dec Decomposer, opts any)
type Requirement ¶
Requirement
type SourceDecomposer ¶
type SourceDecomposer interface {
// FindCodeBases reads a path index and locates any directories that
// contain a codebase that a decomposer understands. Typically this
// will be the root directory, but there may be cases where a directory
// contains many, for example in a monorepo structure.
FindCodeBases(*code.PathIndex) ([]string, error)
}
SourceDecomposer is a decomposer that reads data from a codebase.
Click to show internal directories.
Click to hide internal directories.