purl

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package purl provides functionality for working with PURLs.

Index

Constants

This section is empty.

Variables

Functions

func FromComposer

func FromComposer(packageInfo models.PackageInfo) (namespace string, name string, err error)

func FromGo

func FromGo(packageInfo models.PackageInfo) (namespace string, name string, err error)

func FromMaven

func FromMaven(packageInfo models.PackageInfo) (namespace string, name string, err error)

func FromPackage

func FromPackage(packageInfo models.PackageInfo) (*packageurl.PackageURL, error)

func Group

func Group(packageSources []models.PackageSource) (map[string]models.PackageVulns, []error)

Group takes a list of packages, and group them in a map using their PURL as key It is a way to have only one instance of each package, even if some has been detected multiple times. If the function fails to create a PURL from a package, it generates an error, continue to group the other packages and reports both grouped packages and all generated errors.

func ToPackage

func ToPackage(purl string) (models.PackageInfo, error)

ToPackage converts a Package URL string to models.PackageInfo

Types

type ParameterExtractor

type ParameterExtractor func(packageInfo models.PackageInfo) (namespace string, name string, err error)

Jump to

Keyboard shortcuts

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