cyclonedxutil

package
v0.97.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XMLFormatID  sbom.FormatID = "cyclonedx-xml"
	JSONFormatID sbom.FormatID = "cyclonedx-json"
)
View Source
const DefaultVersion = "1.5"

Variables

This section is empty.

Functions

func SpecVersionFromString

func SpecVersionFromString(v string) (cyclonedx.SpecVersion, error)

func SupportedVersions

func SupportedVersions(id sbom.FormatID) []string

func VersionFromSpecVersion

func VersionFromSpecVersion(spec cyclonedx.SpecVersion) string

Types

type Decoder

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

func NewDecoder

func NewDecoder(format cyclonedx.BOMFileFormat) Decoder

func (Decoder) Decode

func (d Decoder) Decode(reader io.ReadSeeker) (*cyclonedx.BOM, error)

type Encoder

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

func NewEncoder

func NewEncoder(version string, format cyclonedx.BOMFileFormat) (Encoder, error)

func (Encoder) Encode

func (e Encoder) Encode(writer io.Writer, s sbom.SBOM) error

Jump to

Keyboard shortcuts

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