Documentation ¶
Index ¶
- Constants
- type Checksum
- type CreationInfo
- type Document
- func (d *Document) GetCreationInfo() document.CreationInfo
- func (d *Document) GetDataLicense() string
- func (d *Document) GetDocumentDescribes() []string
- func (d *Document) GetExternalDocumentRefs() []document.ExternalDocumentRef
- func (d *Document) GetFiles() []document.File
- func (d *Document) GetID() string
- func (d *Document) GetName() string
- func (d *Document) GetNamespace() string
- func (d *Document) GetPackages() []document.Package
- func (d *Document) GetRelationships() []document.Relationship
- func (d *Document) GetVersion() string
- type ExternalDocumentRef
- type ExternalRef
- type File
- type Package
- func (p *Package) GetChecksums() []document.Checksum
- func (p *Package) GetCopyrightText() string
- func (p *Package) GetDownloadLocation() string
- func (p *Package) GetExternalRefs() []document.ExternalRef
- func (p *Package) GetFilesAnalyzed() bool
- func (p *Package) GetID() string
- func (p *Package) GetLicenseConcluded() string
- func (p *Package) GetLicenseDeclared() string
- func (p *Package) GetName() string
- func (p *Package) GetPrimaryPurpose() string
- func (p *Package) GetVerificationCode() document.PackageVerificationCode
- func (p *Package) GetVersion() string
- type PackageVerificationCode
- type Relationship
Constants ¶
View Source
const ( NOASSERTION = "NOASSERTION" Version = "SPDX-2.2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksum ¶
func (*Checksum) GetAlgorithm ¶
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 (*Document) GetDocumentDescribes ¶
func (*Document) GetExternalDocumentRefs ¶
func (d *Document) GetExternalDocumentRefs() []document.ExternalDocumentRef
func (*Document) GetNamespace ¶
func (*Document) GetPackages ¶
func (*Document) GetRelationships ¶
func (d *Document) GetRelationships() []document.Relationship
func (*Document) GetVersion ¶
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 (*File) GetCopyrightText ¶
func (*File) GetLicenseConcluded ¶
func (*File) GetLicenseInfoInFile ¶
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"` 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 (*Package) GetCopyrightText ¶
func (*Package) GetDownloadLocation ¶
func (*Package) GetExternalRefs ¶
func (p *Package) GetExternalRefs() []document.ExternalRef
func (*Package) GetFilesAnalyzed ¶
func (*Package) GetLicenseConcluded ¶
func (*Package) GetLicenseDeclared ¶
func (*Package) GetPrimaryPurpose ¶
func (*Package) GetVerificationCode ¶
func (p *Package) GetVerificationCode() document.PackageVerificationCode
func (*Package) GetVersion ¶
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
Click to show internal directories.
Click to hide internal directories.