v1

package
v0.1.0-pre6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

type Requirement interface {
	Description() string
	Check(context.Context) bool
}

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.

Jump to

Keyboard shortcuts

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