spdxutils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version : current implemented version (2.2)
	Version = "SPDX-2.2"
	// DataLicense : 6.2 Data license field Table 3 https://spdx.github.io/spdx-spec/v2.2.2/document-creation-information/
	DataLicense = "CC0-1.0"
	// Creator : Carbonetes
	Creator = "Carbonetes"
	// Ref : SPDX Ref Prefix
	Ref = "SPDXRef-"
	// Doc : Document Prefix
	Doc = "DOCUMENT"
	// NoAssertion : NO ASSERTION (For licenses)
	NoAssertion = "NOASSERTION"
	// None : NONE
	None = "NONE"
)
View Source
const LicenseListVersion = "3.20"

LicenseListVersion is the current implemented version for SPDX.

View Source
const (
	// LicenseURL is the reference for the SPDX License List
	LicenseURL = "https://spdx.org/licenses/licenses.json"
)

Variables

View Source
var (
	Tool       = "Tool: " + versionPackage.FromBuild().Version
	CreateInfo = []spdxcommon.Creator{
		{
			Creator:     Creator,
			CreatorType: organization,
		},
		{
			Creator:     versionPackage.FromBuild().Version,
			CreatorType: tool,
		},
	}
)

CreateInfo : Contains creator and tool information.

View Source
var LicenseList = map[string]string{}/* 1105 elements not displayed */

LicenseList contains the referece licenses from the source URL.

Functions

func CheckLicense

func CheckLicense(id string) string

CheckLicense helper

func DownloadLocation

func DownloadLocation(p *model.Package) string

DownloadLocation helper

func ExternalRefs

func ExternalRefs(p *model.Package) (refs []*spdx22.PackageExternalReference)

ExternalRefs helper

func FormatAuthor

func FormatAuthor(authorString string) string

FormatAuthor helper

func FormatName

func FormatName(image *string) string

FormatName helper

func FormatNamespace

func FormatNamespace(imageName string) string

FormatNamespace helper

func FormatPath

func FormatPath(path string) string

FormatPath helper

func FormatTagID

func FormatTagID(p *model.Package) string

FormatTagID helper

func Homepage

func Homepage(p *model.Package) string

Homepage helper

func LicensesDeclared

func LicensesDeclared(p *model.Package) string

LicensesDeclared helper

func Originator

func Originator(p *model.Package) (string, string)

Originator helper

func SourceInfo

func SourceInfo(p *model.Package) string

SourceInfo helper

Types

This section is empty.

Jump to

Keyboard shortcuts

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