package purl

import "github.com/moby/buildkit/util/purl"

Index

Functions

func PURLToRef

func PURLToRef(purl string) (string, *ocispecs.Platform, error)

PURLToRef converts a package URL to an image reference and platform.

func RefToPURL

func RefToPURL(purlType string, ref string, platform *ocispecs.Platform) (string, error)

RefToPURL converts an image reference with optional platform constraint to a package URL. Image references are defined in https://github.com/distribution/distribution/blob/v2.8.1/reference/reference.go#L1 Package URLs are defined in https://github.com/package-url/purl-spec

Source Files

image.go

Version
v0.15.0-rc1
Published
Jul 3, 2024
Platform
js/wasm
Imports
7 packages
Last checked
2 seconds ago

Tools for package owners.