Documentation
¶
Index ¶
- func FullyQualifiedReference(registryRef string) (string, error)
- func IsDigestReference(registryRef string) bool
- func NewTransport(ctx context.Context) http.RoundTripper
- func NormalizeReference(registryRef string) (string, error)
- func Pull(ctx context.Context, registryRef string, force bool, opts ...crane.Option) (string, error)
- func Push(ctx context.Context, reference string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullyQualifiedReference ¶ added in v1.94.0
FullyQualifiedReference returns the fully-qualified form of an OCI reference, including the registry host (e.g. "index.docker.io/agentcatalog/review-pr:latest"). Equivalent shorthand forms map to the same value, while references that differ only by registry map to different values — unlike NormalizeReference, which strips the host.
func IsDigestReference ¶ added in v1.36.1
IsDigestReference reports whether the given reference pins a specific image digest (e.g. "repo@sha256:abc...").
func NewTransport ¶ added in v1.36.1
func NewTransport(ctx context.Context) http.RoundTripper
NewTransport returns an HTTP transport that uses Docker Desktop proxy if available. If the proxy becomes unavailable during the session, it automatically falls back to direct connections.
func NormalizeReference ¶ added in v1.36.1
NormalizeReference parses an OCI reference and returns the normalized store key that Pull uses to store artifacts. This ensures that equivalent references (e.g. "agentcatalog/review-pr" and "index.docker.io/agentcatalog/review-pr:latest") map to the same key.
The registry host is deliberately stripped, so references that differ only by registry map to the same key. Callers that need a registry-scoped identity (e.g. cache keys spanning trust boundaries) must use FullyQualifiedReference instead.
func Pull ¶
func Pull(ctx context.Context, registryRef string, force bool, opts ...crane.Option) (string, error)
Pull pulls an artifact from a registry and stores it in the content store.
The digest check, manifest read, and layer downloads all reuse a single authenticated registry session (a remote.Puller) so the token exchange and underlying connection are established only once, rather than re-doing authentication for each step.
Types ¶
This section is empty.