packagefile

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPDX_SRC_TYPE        = "spdx"
	CYCLONE_DX_SRC_TYPE  = "cyclone_dx"
	SOURCE_FILE_SRC_TYPE = "source_file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageDetails

type PackageDetails struct {
	Name  string `json:"name"`
	Group string `json:"group"` //Namespace or Group if available
	// Version extracted. It can be min, max or exact. It can be empty or exact version string
	Version string `json:"version"`
	// Specs specific version string with operators
	VersionExpr  string             `json:"version_expression"` // Version expression
	Commit       string             `json:"commit,omitempty"`
	Ecosystem    lockfile.Ecosystem `json:"ecosystem,omitempty"`
	CompareAs    lockfile.Ecosystem `json:"compare_as,omitempty"`
	SpdxRef      *spdx.Package      `json:"spdx_ref,omitempty"`
	CycloneDxRef *cdx.Component     `json:"cylcone_dx_ref,omitempty"`
}

PackageDetails

func ParsePackageFromPurl

func ParsePackageFromPurl(purl string) (*PackageDetails, error)

Parse from Purl if available. It is a reliable parsing technique

func (*PackageDetails) Convert2LockfilePackageDetails

func (pd *PackageDetails) Convert2LockfilePackageDetails() *lockfile.PackageDetails

Convert to osv-scanner/pkg/lockfile PackageDetails

type PackageDetailsDoc

type PackageDetailsDoc struct {
	PackageDetails []*PackageDetails `json:"package_details"`
	SourceType     string            `json:"source_type"`
	SpdxDoc        *spdx.Document    `json:"spdx_doc,omitempty"`
	CycloneDxDoc   *cdx.BOM          `json:"cylcone_dx_doc,omitempty"`
}

type SourceType

type SourceType string

Source from which PackageDetails will be created such as spdx, cyclone_dx, packagefile

Jump to

Keyboard shortcuts

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