Documentation
¶
Overview ¶
Package imageref resolves an image tag to the digest it points to now, from any registry speaking the Docker Registry HTTP API v2 (Docker Hub, GHCR, ECR, GitLab, Harbor, …), anonymously or with stored credentials.
Index ¶
Constants ¶
const (
DockerHub = "docker.io"
)
DockerHub is Docker Hub's name for credentials; its API is at dockerHubAPI.
Variables ¶
var ErrNotFound = errors.New("image not found in its registry")
ErrNotFound means the registry has no such repository or tag.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
Credentials returns the username and password stored for a registry host.
type Ref ¶
type Ref struct {
Host string // as credentials name it: "docker.io", "ghcr.io", "registry.example.com:5000"
Repo string // "library/nginx", "acme/api"
Tag string // "latest" when none
Digest string // when the reference names one
}
Ref is a parsed image reference.