v22

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NOASSERTION = "NOASSERTION"
	Version     = "SPDX-2.2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum

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

func (*Checksum) GetAlgorithm

func (c *Checksum) GetAlgorithm() string

func (*Checksum) GetValue

func (c *Checksum) GetValue() string

type CreationInfo

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

func (*CreationInfo) GetCreated

func (c *CreationInfo) GetCreated() string

func (*CreationInfo) GetCreators

func (c *CreationInfo) GetCreators() []string

func (*CreationInfo) GetLicenseListVersion

func (c *CreationInfo) GetLicenseListVersion() string

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"`
	Files                []File                `json:"files,omitempty"`
	Packages             []Package             `json:"packages"`
	Relationships        []Relationship        `json:"relationships"`
	ExternalDocumentRefs []ExternalDocumentRef `json:"externalDocumentRefs,omitempty"`
}

func (*Document) GetCreationInfo

func (d *Document) GetCreationInfo() document.CreationInfo

func (*Document) GetDataLicense

func (d *Document) GetDataLicense() string

func (*Document) GetDocumentDescribes

func (d *Document) GetDocumentDescribes() []string

func (*Document) GetExternalDocumentRefs

func (d *Document) GetExternalDocumentRefs() []document.ExternalDocumentRef

func (*Document) GetFiles

func (d *Document) GetFiles() []document.File

func (*Document) GetID

func (d *Document) GetID() string

func (*Document) GetName

func (d *Document) GetName() string

func (*Document) GetNamespace

func (d *Document) GetNamespace() string

func (*Document) GetPackages

func (d *Document) GetPackages() []document.Package

func (*Document) GetRelationships

func (d *Document) GetRelationships() []document.Relationship

func (*Document) GetVersion

func (d *Document) GetVersion() string

type ExternalDocumentRef

type ExternalDocumentRef struct {
	Checksum           Checksum `json:"checksum"`
	ExternalDocumentID string   `json:"externalDocumentId"`
	SPDXDocument       string   `json:"spdxDocument"`
}

func (*ExternalDocumentRef) GetChecksum

func (e *ExternalDocumentRef) GetChecksum() document.Checksum

func (*ExternalDocumentRef) GetExternalDocumentID

func (e *ExternalDocumentRef) GetExternalDocumentID() string

func (*ExternalDocumentRef) GetSPDXDocument

func (e *ExternalDocumentRef) GetSPDXDocument() string

type ExternalRef

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

func (*ExternalRef) GetCategory

func (e *ExternalRef) GetCategory() string

func (*ExternalRef) GetLocator

func (e *ExternalRef) GetLocator() string

func (*ExternalRef) GetType

func (e *ExternalRef) GetType() string

type File

type File struct {
	ID                string     `json:"SPDXID"`
	Name              string     `json:"fileName"`
	CopyrightText     string     `json:"copyrightText"`
	NoticeText        string     `json:"noticeText,omitempty"`
	LicenseConcluded  string     `json:"licenseConcluded"`
	Description       string     `json:"description,omitempty"`
	FileTypes         []string   `json:"fileTypes,omitempty"`
	LicenseInfoInFile []string   `json:"licenseInfoInFiles"` // List of licenses
	Checksums         []Checksum `json:"checksums"`
}

func (*File) GetChecksums

func (f *File) GetChecksums() []document.Checksum

func (*File) GetCopyrightText

func (f *File) GetCopyrightText() string

func (*File) GetID

func (f *File) GetID() string

func (*File) GetLicenseConcluded

func (f *File) GetLicenseConcluded() string

func (*File) GetLicenseInfoInFile

func (f *File) GetLicenseInfoInFile() []string

func (*File) GetName

func (f *File) GetName() string

type Package

type Package struct {
	ID                   string                   `json:"SPDXID"`
	Name                 string                   `json:"name"`
	Version              string                   `json:"versionInfo"`
	FilesAnalyzed        bool                     `json:"filesAnalyzed"`
	LicenseDeclared      string                   `json:"licenseDeclared"`
	LicenseConcluded     string                   `json:"licenseConcluded"`
	Description          string                   `json:"description,omitempty"`
	DownloadLocation     string                   `json:"downloadLocation"`
	Originator           string                   `json:"originator,omitempty"`
	Supplier             string                   `json:"supplier,omitempty"`
	SourceInfo           string                   `json:"sourceInfo,omitempty"`
	CopyrightText        string                   `json:"copyrightText"`
	HasFiles             []string                 `json:"hasFiles,omitempty"`
	LicenseInfoFromFiles []string                 `json:"licenseInfoFromFiles,omitempty"`
	Checksums            []Checksum               `json:"checksums"`
	ExternalRefs         []ExternalRef            `json:"externalRefs,omitempty"`
	VerificationCode     *PackageVerificationCode `json:"packageVerificationCode,omitempty"`
}

func (*Package) GetChecksums

func (p *Package) GetChecksums() []document.Checksum

func (*Package) GetCopyrightText

func (p *Package) GetCopyrightText() string

func (*Package) GetDownloadLocation

func (p *Package) GetDownloadLocation() string

func (*Package) GetExternalRefs

func (p *Package) GetExternalRefs() []document.ExternalRef

func (*Package) GetFilesAnalyzed

func (p *Package) GetFilesAnalyzed() bool

func (*Package) GetID

func (p *Package) GetID() string

func (*Package) GetLicenseConcluded

func (p *Package) GetLicenseConcluded() string

func (*Package) GetLicenseDeclared

func (p *Package) GetLicenseDeclared() string

func (*Package) GetName

func (p *Package) GetName() string

func (*Package) GetOriginator added in v0.6.0

func (p *Package) GetOriginator() string

func (*Package) GetPrimaryPurpose

func (p *Package) GetPrimaryPurpose() string

func (*Package) GetSupplier added in v0.6.0

func (p *Package) GetSupplier() string

func (*Package) GetVerificationCode

func (p *Package) GetVerificationCode() document.PackageVerificationCode

func (*Package) GetVersion

func (p *Package) GetVersion() string

type PackageVerificationCode

type PackageVerificationCode struct {
	Value         string   `json:"packageVerificationCodeValue"`
	ExcludedFiles []string `json:"packageVerificationCodeExcludedFiles,omitempty"`
}

func (*PackageVerificationCode) GetValue

func (p *PackageVerificationCode) GetValue() string

type Relationship

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

func (*Relationship) GetElement

func (r *Relationship) GetElement() string

func (*Relationship) GetRelated

func (r *Relationship) GetRelated() string

func (*Relationship) GetType

func (r *Relationship) GetType() string

Jump to

Keyboard shortcuts

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