Documentation
¶
Index ¶
- type FolderAdapter
- func (f *FolderAdapter) AddCommandParams(cmd *cobra.Command)
- func (f *FolderAdapter) DryRun(ctx *tcontext.TransferMetadata, iter iterator.SBOMIterator) error
- func (f *FolderAdapter) FetchSBOMs(ctx *tcontext.TransferMetadata) (iterator.SBOMIterator, error)
- func (f *FolderAdapter) ParseAndValidateParams(cmd *cobra.Command) error
- func (f *FolderAdapter) UploadSBOMs(ctx *tcontext.TransferMetadata, iterator iterator.SBOMIterator) error
- type FolderConfig
- type FolderIterator
- type FolderReporter
- type ParallelFetcher
- type SBOMFetcher
- type SequentialFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FolderAdapter ¶
type FolderAdapter struct {
Role types.AdapterRole // "input" or "output" adapter type
Fetcher SBOMFetcher
// contains filtered or unexported fields
}
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 ¶
func (f *FolderAdapter) DryRun(ctx *tcontext.TransferMetadata, iter iterator.SBOMIterator) error
DryRun for Folder Adapter: Displays all fetched SBOMs from folder adapter
func (*FolderAdapter) FetchSBOMs ¶
func (f *FolderAdapter) FetchSBOMs(ctx *tcontext.TransferMetadata) (iterator.SBOMIterator, error)
FetchSBOMs initializes the Folder SBOM iterator using the unified method
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
}
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
type FolderReporter ¶
type FolderReporter struct {
// contains filtered or unexported fields
}
func NewFolderReporter ¶
func NewFolderReporter(verbose bool, outputDir string) *FolderReporter
func (*FolderReporter) DryRun ¶
func (r *FolderReporter) DryRun(ctx context.Context, iter iterator.SBOMIterator) error
type ParallelFetcher ¶
type ParallelFetcher struct{}
func (*ParallelFetcher) Fetch ¶
func (f *ParallelFetcher) Fetch(ctx *tcontext.TransferMetadata, config *FolderConfig) (iterator.SBOMIterator, error)
ParallelFetcher Fetch() scans the folder for SBOMs using parallel processing 1. Walks through the folder file-by-file. 2. Launch a goroutine for each file. 3. Detects valid SBOMs using source.IsSBOMFile(). 4. Uses channels to store SBOMs & errors. 5. Reads the content & adds it to the iterator along with path.
type SBOMFetcher ¶
type SBOMFetcher interface {
Fetch(ctx *tcontext.TransferMetadata, config *FolderConfig) (iterator.SBOMIterator, error)
}
type SequentialFetcher ¶
type SequentialFetcher struct{}
func (*SequentialFetcher) Fetch ¶
func (f *SequentialFetcher) Fetch(ctx *tcontext.TransferMetadata, config *FolderConfig) (iterator.SBOMIterator, error)
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.