xspdx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MulanPSL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrArtifactEmpty = errors.New("artifact property is empty")
View Source
var ErrDocumentEmpty = errors.New("document is empty")
View Source
var ErrDocumentInvalid = errors.New("document invalid")
View Source
var ErrSourceEmpty = errors.New("source property is empty")

Functions

func FileSPDXID

func FileSPDXID(file *model.File) spdx.ElementID

FileSPDXID returns the spdx id of the file

func NewSpecification

func NewSpecification() format.Specification

func PackageSPDXID

func PackageSPDXID(pkg *model.Package) spdx.ElementID

PackageSPDXID returns the spdx id of the package

func SPDXID

func SPDXID(content string) string

SPDXID returns the spdx id of the content

Types

type JSONFormat

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

JSONFormat is the json format of xspdx

func (*JSONFormat) Dump

func (f *JSONFormat) Dump(writer io.Writer) error

func (*JSONFormat) Load

func (f *JSONFormat) Load(reader io.Reader) error

func (*JSONFormat) Spec

func (f *JSONFormat) Spec() format.Specification

func (*JSONFormat) Type

func (f *JSONFormat) Type() string

type Spec

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

Spec is the xspdx specification

func (*Spec) Formats

func (s *Spec) Formats() []format.Format

func (*Spec) FromModel

func (s *Spec) FromModel(sbomDoc *model.SBOM)

func (*Spec) Metadata

func (s *Spec) Metadata() model.Metadata

func (*Spec) Name

func (s *Spec) Name() string

func (*Spec) ToModel

func (s *Spec) ToModel() *model.SBOM

func (*Spec) Updaters

func (s *Spec) Updaters() []format.Updater

func (*Spec) Validate

func (s *Spec) Validate() error

func (*Spec) Version

func (s *Spec) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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