itempath

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package itempath is the one reading of a release bundle item's artifact_path.

The path is a client-supplied hint that names an artifact among the stored artifacts of the item's source repository that hold the item's content digest. Adding an item (internal/database BundleItemStored) and promoting it (internal/promote) both ask a Locator whether a stored artifact is the one the path names, so an item that was accepted is resolved to the same artifact when it is promoted.

The clients send several spellings of the same artifact: the stored path, the stored path behind a leading slash, the listed file name (the web item picker and `oa bundle add --from-build`), the format's native repository URL path (`oa bundle add --path`), which for Ivy and sbt differs from the stored path when the group has several segments (`com/example/lib/1.0/lib-1.0.jar` is stored under `com.example/lib/1.0/lib-1.0.jar`), the URL with a `repos/<repo>/` prefix, a percent-encoded URL path, and for docker the digest, image, tag or distribution name.

A Locator only ever compares spellings; the digest and the repository are selected by the caller's query, so no spelling can resolve to another repository's artifact or to an artifact stored as another digest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	ID       string
	Path     string // package_files.path
	Filename string // package_files.filename
}

File is the identity of a stored package file a path can name.

type Locator

type Locator struct {
	// contains filtered or unexported fields
}

Locator tells which stored artifacts an item's artifact_path names.

func New

func New(format, repo, path string) Locator

New reads the artifact_path of an item of format whose source repository is repo.

func (Locator) Docker

func (l Locator) Docker(m Manifest) bool

Docker reports whether m is the stored manifest the path names.

func (Locator) File

func (l Locator) File(f File) bool

File reports whether f is the stored file the path names.

type Manifest

type Manifest struct {
	ID     string
	Image  string // "" for the repository's default image
	Digest string // with the algorithm, "sha256:..."
	SHA256 string // hex only
	Tags   []string
}

Manifest is the identity of a stored docker manifest a path can name.

Jump to

Keyboard shortcuts

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