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 SourceType ¶
type SourceType string
Source from which PackageDetails will be created such as spdx, cyclone_dx, packagefile
Click to show internal directories.
Click to hide internal directories.