cyclonedxutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 6 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(r io.Reader) (*cyclonedx.BOM, error)

type Encoder

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

func NewEncoder

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

func (Encoder) Encode

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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