folder

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FolderAdapter

type FolderAdapter struct {
	Config  *FolderConfig
	Role    types.AdapterRole // "input" or "output" adapter type
	Fetcher SBOMFetcher
}

FolderAdapter handles fetching SBOMs from folders

func (*FolderAdapter) AddCommandParams

func (f *FolderAdapter) AddCommandParams(cmd *cobra.Command)

AddCommandParams adds Folder-specific CLI flags

func (*FolderAdapter) DryRun

DryRun for Folder Adapter: Displays all fetched SBOMs from folder adapter

func (*FolderAdapter) FetchSBOMs

FetchSBOMs initializes the Folder SBOM iterator using the unified method

func (*FolderAdapter) Monitor added in v0.0.3

func (*FolderAdapter) ParseAndValidateParams

func (f *FolderAdapter) ParseAndValidateParams(cmd *cobra.Command) error

ParseAndValidateParams validates the Folder adapter params

func (*FolderAdapter) UploadSBOMs

func (f *FolderAdapter) UploadSBOMs(ctx tcontext.TransferMetadata, iterator iterator.SBOMIterator) error

OutputSBOMs should return an error since Folder does not support SBOM uploads

type FolderConfig

type FolderConfig struct {
	FolderPath     string
	Recursive      bool
	ProcessingMode types.ProcessingMode
	Daemon         bool
}

func NewFolderConfig

func NewFolderConfig() *FolderConfig

type FolderIterator

type FolderIterator struct {
	// contains filtered or unexported fields
}

FolderIterator iterates over SBOMs found in a folder

func NewFolderIterator

func NewFolderIterator(sboms []*iterator.SBOM) *FolderIterator

NewFolderIterator initializes and returns a new FolderIterator

func (*FolderIterator) Next

Next retrieves the next SBOM in the iteration

type FolderReporter

type FolderReporter struct {
	// contains filtered or unexported fields
}

func NewFolderReporter

func NewFolderReporter(verbose bool, inputDir, folderPath string) *FolderReporter

func (*FolderReporter) DryRun

type ParallelFetcher

type ParallelFetcher struct{}

func (*ParallelFetcher) Fetch

Fetch scans the folder for SBOMs concurrently. It walks through the directory to collect file paths, then spawns a fixed number of worker goroutines to read and process those files concurrently.

type SBOMFetcher

type SBOMFetcher interface {
	Fetch(ctx tcontext.TransferMetadata, config *FolderConfig) (iterator.SBOMIterator, error)
}

type SequentialFetcher

type SequentialFetcher struct{}

func (*SequentialFetcher) Fetch

SequentialFetcher Fetch() scans the folder for SBOMs one-by-one 1. Walks through the folder file-by-file 2. Detects valid SBOMs using source.IsSBOMFile(). 3. Reads the content & adds it to the iterator along with path.

type WatcherFetcher added in v0.0.3

type WatcherFetcher struct{}

func NewWatcherFetcher added in v0.0.3

func NewWatcherFetcher() *WatcherFetcher

func (*WatcherFetcher) Fetch added in v0.0.3

type WatcherIterator added in v0.0.3

type WatcherIterator struct {
	// contains filtered or unexported fields
}

watchiterator collects sbom on the real time via channel

func (*WatcherIterator) Next added in v0.0.3

Jump to

Keyboard shortcuts

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