Documentation ¶
Overview ¶
Package registry provides facilities for reading/writing v1.Images,Indexes from/to a remote image registry. Also exposes an implementation of the authn.Keychain interface
Copyright 2020 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Index ¶
- func Keychain(keychainOpts auth.KeychainOpts, environFunc func() []string) (regauthn.Keychain, error)
- type Opts
- type Registry
- func (r Registry) Digest(ref regname.Reference) (regv1.Hash, error)
- func (r Registry) FirstImageExists(digests []string) (string, error)
- func (r Registry) Get(ref regname.Reference) (*regremote.Descriptor, error)
- func (r Registry) Image(ref regname.Reference) (regv1.Image, error)
- func (r Registry) Index(ref regname.Reference) (regv1.ImageIndex, error)
- func (r Registry) ListTags(repo regname.Repository) ([]string, error)
- func (r Registry) MultiWrite(imageOrIndexesToUpload map[regname.Reference]regremote.Taggable, ...) error
- func (r Registry) WriteImage(ref regname.Reference, img regv1.Image) error
- func (r Registry) WriteIndex(ref regname.Reference, idx regv1.ImageIndex) error
- func (r Registry) WriteTag(ref regname.Tag, taggagle regremote.Taggable) error
- type WithProgress
- func (w WithProgress) Digest(reference regname.Reference) (regv1.Hash, error)
- func (w WithProgress) FirstImageExists(digests []string) (string, error)
- func (w WithProgress) Get(reference regname.Reference) (*remote.Descriptor, error)
- func (w WithProgress) Image(reference regname.Reference) (regv1.Image, error)
- func (w WithProgress) Index(reference regname.Reference) (regv1.ImageIndex, error)
- func (w *WithProgress) MultiWrite(imageOrIndexesToUpload map[regname.Reference]remote.Taggable, concurrency int, ...) error
- func (w WithProgress) WriteImage(reference regname.Reference, image regv1.Image) error
- func (w WithProgress) WriteIndex(reference regname.Reference, index regv1.ImageIndex) error
- func (w WithProgress) WriteTag(tag regname.Tag, taggable remote.Taggable) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keychain ¶
func Keychain(keychainOpts auth.KeychainOpts, environFunc func() []string) (regauthn.Keychain, error)
Keychain implements an authn.Keychain interface by composing multiple keychains. It enforces an order, where the keychains that contain credentials for a specific target take precedence over keychains that contain credentials for 'any' target. i.e. env keychain takes precedence over the custom keychain. Since env keychain contains credentials per HOSTNAME, and custom keychain doesn't.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (Registry) FirstImageExists ¶
func (Registry) MultiWrite ¶
func (Registry) WriteImage ¶
func (Registry) WriteIndex ¶
type WithProgress ¶
type WithProgress struct {
// contains filtered or unexported fields
}
func NewRegistryWithProgress ¶
func NewRegistryWithProgress(reg Registry, logger util.ProgressLogger) *WithProgress
func (WithProgress) FirstImageExists ¶
func (w WithProgress) FirstImageExists(digests []string) (string, error)
func (WithProgress) Get ¶
func (w WithProgress) Get(reference regname.Reference) (*remote.Descriptor, error)
func (WithProgress) Index ¶
func (w WithProgress) Index(reference regname.Reference) (regv1.ImageIndex, error)
func (*WithProgress) MultiWrite ¶
func (WithProgress) WriteImage ¶
func (WithProgress) WriteIndex ¶
func (w WithProgress) WriteIndex(reference regname.Reference, index regv1.ImageIndex) error
Click to show internal directories.
Click to hide internal directories.