sbom

package
v1.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0 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

View Source
var (
	Providers = []Reader{
		&SPDX{},
		&CycloneDX{},
	}
)

Functions

This section is empty.

Types

type CycloneDX

type CycloneDX struct{}

func (*CycloneDX) GetPackages

func (c *CycloneDX) GetPackages(r io.ReadSeeker, callback func(Identifier) error) error

func (*CycloneDX) MatchesRecognizedFileNames added in v1.3.0

func (c *CycloneDX) MatchesRecognizedFileNames(path string) bool

func (*CycloneDX) Name

func (c *CycloneDX) Name() string

type Identifier

type Identifier struct {
	PURL string
}

Identifier is the identifier extracted from the SBOM.

type InvalidFormatError added in v1.3.2

type InvalidFormatError struct {
	Msg  string
	Errs []error
}

func (InvalidFormatError) Error added in v1.3.2

func (e InvalidFormatError) Error() string

type Reader added in v1.5.0

type Reader interface {
	Name() string
	// MatchesRecognizedFileNames checks if the file path is a standard recognized file name
	MatchesRecognizedFileNames(path string) bool
	GetPackages(r io.ReadSeeker, callback func(Identifier) error) error
}

Reader is an interface for all SBOM providers.

type SPDX

type SPDX struct{}

func (*SPDX) GetPackages

func (s *SPDX) GetPackages(r io.ReadSeeker, callback func(Identifier) error) error

func (*SPDX) MatchesRecognizedFileNames added in v1.3.0

func (s *SPDX) MatchesRecognizedFileNames(path string) bool

func (*SPDX) Name

func (s *SPDX) Name() string

Jump to

Keyboard shortcuts

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