packageurl

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package packageurl builds package URLs from ecosystem-native package names.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(ecosystem, name, version string) *purl.PURL

Make constructs a package URL from an ecosystem-native package name.

func MakeCacheStrings

func MakeCacheStrings(ecosystem, name, version string) (packagePURL, versionPURL string)

MakeCacheStrings returns package and version PURLs suitable for artifact cache records. Swift registry identities keep their generic storage PURLs. Cache keys are independent of the configured upstream.

func MakeString

func MakeString(ecosystem, name, version string) string

MakeString constructs a package URL string. It returns an empty string when the package identity cannot be represented as a PURL.

func PolicyPackageKey added in v0.11.0

func PolicyPackageKey(packagePURL string) string

PolicyPackageKey maps a canonical versionless PURL to its policy key. Go policies match module names case-insensitively for compatibility.

func WithVersionString

func WithVersionString(packagePURL, version string) string

WithVersionString returns a package PURL with its version replaced. It returns an empty string when packagePURL is invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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