filesystem

package
v0.1.0-pre5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileProcessors = map[string]FileProcessor{
	"hash": processors.NewHasher(),
}

FileProcessors is the list of available file processors

Functions

This section is empty.

Types

type Decomposer

type Decomposer struct {
	Options    options.Options
	Processors []FileProcessor
}

Decomposer is a filesystem indexer

func New

func New(funcs ...options.Function) (*Decomposer, error)

func (*Decomposer) Extract

Extract reads and hashes the files from the filesystem

func (*Decomposer) IndexFS

func (d *Decomposer) IndexFS(source fs.FS) (*sbom.NodeList, error)

IndexFS takes an fs.FS and returns a nodelist with all the files indexed and enriched by the configured processors.

type FileProcessor

type FileProcessor interface {
	Process(*options.Options, fs.FS, *sbom.Node) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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