spdx

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const NOASSERTION = "NOASSERTION"

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum

type Checksum struct {
	Algorithm string `json:"algorithm"`
	Value     string `json:"checksumValue"`
}

type CreationInfo

type CreationInfo struct {
	Created            string   `json:"created"` // Date
	Creators           []string `json:"creators"`
	LicenseListVersion string   `json:"licenseListVersion"`
}

type Document

type Document struct {
	ID                string         `json:"SPDXID"`
	Name              string         `json:"name"`
	Version           string         `json:"spdxVersion"`
	CreationInfo      CreationInfo   `json:"creationInfo"`
	DataLicense       string         `json:"dataLicense"`
	Namespace         string         `json:"documentNamespace"`
	DocumentDescribes []string       `json:"documentDescribes"`
	Packages          []Package      `json:"packages"`
	Relationships     []Relationship `json:"relationships"`
}

type ExternalRef

type ExternalRef struct {
	Category string `json:"referenceCategory"`
	Locator  string `json:"referenceLocator"`
	Type     string `json:"referenceType"`
}

type Package

type Package struct {
	ID               string        `json:"SPDXID"`
	Name             string        `json:"name"`
	Version          string        `json:"versionInfo"`
	FilesAnalyzed    bool          `json:"filesAnalyzed"`
	LicenseConcluded string        `json:"licenseConcluded"`
	LicenseDeclared  string        `json:"licenseDeclared"`
	Description      string        `json:"description"`
	DownloadLocation string        `json:"downloadLocation"`
	Originator       string        `json:"originator"`
	SourceInfo       string        `json:"sourceInfo"`
	CopyrightText    string        `json:"copyrightText"`
	Checksums        []Checksum    `json:"checksums"`
	ExternalRefs     []ExternalRef `json:"externalRefs"`
}

type Relationship

type Relationship struct {
	Element string `json:"spdxElementId"`
	Type    string `json:"relationshipType"`
	Related string `json:"relatedSpdxElement"`
}

type SPDX

type SPDX struct{}

func New

func New() SPDX

func (*SPDX) Ext

func (sx *SPDX) Ext() string

func (*SPDX) Generate

func (sx *SPDX) Generate(opts *options.Options, path string) error

Generate writes a cyclondx sbom in path

func (*SPDX) Key

func (sx *SPDX) Key() string

Jump to

Keyboard shortcuts

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