builder2v1

package
v0.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0, GPL-2.0, CC-BY-4.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCreationInfoSection2_1

func BuildCreationInfoSection2_1(packageName string, code string, namespacePrefix string, creatorType string, creator string, testValues map[string]string) (*spdx.CreationInfo2_1, error)

BuildCreationInfoSection2_1 creates an SPDX Package (version 2.1), returning that package or error if any is encountered. Arguments:

  • packageName: name of package / directory
  • code: verification code from Package
  • namespacePrefix: prefix for DocumentNamespace (packageName and code will be added)
  • creatorType: one of Person, Organization or Tool
  • creator: creator string
  • testValues: for testing only; call with nil when using in production

func BuildFileSection2_1

func BuildFileSection2_1(filePath string, prefix string, fileNumber int) (*spdx.File2_1, error)

BuildFileSection2_1 creates an SPDX File (version 2.1), returning that file or error if any is encountered. Arguments:

  • filePath: path to file, relative to prefix
  • prefix: relative directory for filePath
  • fileNumber: integer index (unique within package) to use in identifier

func BuildPackageSection2_1

func BuildPackageSection2_1(packageName string, dirRoot string, pathsIgnore []string) (*spdx.Package2_1, error)

BuildPackageSection2_1 creates an SPDX Package (version 2.1), returning that package or error if any is encountered. Arguments:

  • packageName: name of package / directory
  • dirRoot: path to directory to be analyzed
  • pathsIgnore: slice of strings for filepaths to ignore

func BuildRelationshipSection2_1

func BuildRelationshipSection2_1(packageName string) (*spdx.Relationship2_1, error)

BuildRelationshipSection2_1 creates an SPDX Relationship (version 2.1) solely for the document "DESCRIBES" package relationship, returning that relationship or error if any is encountered. Arguments:

  • packageName: name of package / directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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