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.