Documentation
¶
Index ¶
- Constants
- func GetArtifactDigest(reference string) (string, error)
- func IsOCI(url string) bool
- func NewAuthClient() *auth.Client
- func ParseReference(raw string) (registry.Reference, error)
- func PushCatalog(ref string, registryHost string, username string, password string, ...) (*ocispec.Descriptor, error)
- func ResolveReferenceDigest(reference string) (string, error)
- type ImageTag
Constants ¶
const ( // OCIScheme is the URL scheme for OCI-based requests OCIScheme = "oci" OCICatalogManifestMediaType = "application/vnd.cidverse.cid.catalog-config.v1+json" OCICatalogFileMediaType = "application/vnd.cidverse.cid.catalog.v1+json" )
Variables ¶
This section is empty.
Functions ¶
func GetArtifactDigest ¶
func NewAuthClient ¶ added in v0.11.12
NewAuthClient returns an auth client that reuses the local container runtime credentials (e.g. ~/.docker/config.json), falling back to anonymous access when no credential store is available.
func ParseReference ¶
ParseReference will replace + with _ in the tag
func PushCatalog ¶
func ResolveReferenceDigest ¶ added in v0.11.12
ResolveReferenceDigest resolves an image reference (tag or digest) to its manifest digest. Unlike GetArtifactDigest it uses a manifest HEAD request instead of downloading the manifest, which makes it cheap enough to resolve every tag of a repository.
Types ¶
type ImageTag ¶
type ImageTag struct {
Repository string `json:"repository"`
Tag string `json:"tag"`
Digest string `json:"digest,omitempty"` // Digest is the manifest digest the tag resolved to, empty if unresolved
}
func FindTagsWithDigest ¶ added in v0.11.12
FindTagsWithDigest returns every tag of a repository together with the manifest digest it currently resolves to. Tags that cannot be resolved are omitted: an unpinned tag must never be used to select an executable, because the tag can be moved to a different image after discovery. The result is sorted by tag, as the registry returns tags in an arbitrary order.