iterator

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 2 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 MemoryIterator

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

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

func NewMemoryIterator

func NewMemoryIterator(sboms []*SBOM) *MemoryIterator

NewMemoryIterator creates a new MemoryIterator from a slice of SBOMs.

func (*MemoryIterator) Next

func (it *MemoryIterator) Next(ctx context.Context) (*SBOM, error)

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)
	Repo    string // Repository URL (helps track multi-repo 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 context.Context) (*SBOM, error) // Fetch the next SBOM
}

SBOMIterator provides a way to lazily fetch SBOMs one by one

Jump to

Keyboard shortcuts

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