packageurl

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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 use an explicit generic PURL until their source repository has been resolved. The result is independent of the configured upstream so cache entries survive an upstream.swift change, matching every other ecosystem.

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 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