iterator

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 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 ConvertedIterator added in v0.0.3

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

func NewConvertedIterator added in v0.0.3

func NewConvertedIterator(inner SBOMIterator, targetFormat sbom.FormatSpec) *ConvertedIterator

func (*ConvertedIterator) Next added in v0.0.3

type MemoryIterator

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

MemoryIterator is an iterator that iterates over a preloaded slice of SBOMs.

func (*MemoryIterator) Next

Next retrieves the next SBOM in memory.

type SBOM

type SBOM struct {
	Path      string // File path (empty if stored in memory)
	Data      []byte // SBOM data stored in memory (nil if using Path)
	Namespace string // It could be Repo, or Dir (helps track multi-repo or multi-folder processing)
	Version   string // Version of the SBOM (e.g., "latest" or "v1.2.3")
	Branch    string // github repo main, master, or any specific branch
}

SBOM represents a single SBOM file

type SBOMIterator

type SBOMIterator interface {
	Next(ctx tcontext.TransferMetadata) (*SBOM, error) // Fetch the next SBOM
}

SBOMIterator provides a way to lazily fetch SBOMs one by one

func NewMemoryIterator

func NewMemoryIterator(sboms []*SBOM) SBOMIterator

NewMemoryIterator creates a new MemoryIterator from a slice of SBOMs.

Jump to

Keyboard shortcuts

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