converter

package
v0.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToGetCycloneDXSBOM = errors.New("failed to get CycloneDX SBOM from file")

Functions

func CycloneDxToBytes

func CycloneDxToBytes(sbom *cdx.BOM, format SbomFormat) ([]byte, error)

func GetCycloneDXSBOMFromBytes

func GetCycloneDXSBOMFromBytes(inputSBOMBytes []byte) (*cdx.BOM, error)

func GetCycloneDXSBOMFromFile

func GetCycloneDXSBOMFromFile(inputSBOMFile string) (*cdx.BOM, error)

Types

type SbomFormat

type SbomFormat uint
const (
	Unknown SbomFormat = iota
	CycloneDxJSON
	CycloneDxXML
	SpdxJSON
	SpdxTV
	SyftJSON
)

func StringToSbomFormat

func StringToSbomFormat(input string) (SbomFormat, error)

func (SbomFormat) String

func (c SbomFormat) String() string

Jump to

Keyboard shortcuts

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