package builder2v2
import "github.com/spdx/tools-golang/builder/builder2v2"
Index ¶
- func BuildCreationInfoSection2_2(packageName string, code string, namespacePrefix string, creatorType string, creator string, testValues map[string]string) (*spdx.CreationInfo2_2, error)
- func BuildFileSection2_2(filePath string, prefix string, fileNumber int) (*spdx.File2_2, error)
- func BuildPackageSection2_2(packageName string, dirRoot string, pathsIgnore []string) (*spdx.Package2_2, error)
- func BuildRelationshipSection2_2(packageName string) (*spdx.Relationship2_2, error)
Functions ¶
func BuildCreationInfoSection2_2 ¶
func BuildCreationInfoSection2_2(packageName string, code string, namespacePrefix string, creatorType string, creator string, testValues map[string]string) (*spdx.CreationInfo2_2, error)
BuildCreationInfoSection2_2 creates an SPDX Package (version 2.2), 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_2 ¶
BuildFileSection2_2 creates an SPDX File (version 2.2), 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_2 ¶
func BuildPackageSection2_2(packageName string, dirRoot string, pathsIgnore []string) (*spdx.Package2_2, error)
BuildPackageSection2_2 creates an SPDX Package (version 2.2), 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_2 ¶
func BuildRelationshipSection2_2(packageName string) (*spdx.Relationship2_2, error)
BuildRelationshipSection2_2 creates an SPDX Relationship (version 2.2) solely for the document "DESCRIBES" package relationship, returning that relationship or error if any is encountered. Arguments:
- packageName: name of package / directory
Source Files ¶
build_creation_info.go build_file.go build_package.go build_relationship.go
- Version
- v0.3.0
- Published
- Apr 3, 2022
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 seconds ago –
Tools for package owners.