sbom

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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