Documentation ¶
Index ¶
- func IsImagePinned(img string) bool
- func IsImageTagged(img string) bool
- func ReadImageMapping(mappingsPath string) (map[string]string, error)
- func ResolveToPin(ctx context.Context, resolver remotes.Resolver, unresolvedImage string) (string, error)
- type Association
- type AssociationSet
- func (as AssociationSet) Add(key string, value Association)
- func (as AssociationSet) ContainsKey(key string) (found bool)
- func (as *AssociationSet) Decode(r io.Reader) error
- func (as AssociationSet) Encode(w io.Writer) error
- func (as AssociationSet) Keys() []string
- func (as AssociationSet) Merge(in AssociationSet)
- func (as AssociationSet) Search(key string) (values []Association, found bool)
- func (as AssociationSet) SetContainsKey(key, setKey string) (found bool)
- func (as AssociationSet) UpdateKey(oldKey, newKey string) error
- func (as AssociationSet) UpdateValue(key string, value Association) error
- type Associations
- type ErrInvalidComponent
- type ErrNoMapping
- type ImageType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsImagePinned ¶
IsImagePinned returns true if img looks canonical.
func IsImageTagged ¶
isImageTagged returns true if img has a tag.
func ReadImageMapping ¶
ReadImageMapping reads a mapping.txt file and parses each line into a map k/v.
Types ¶
type Association ¶
type Association struct { // Name of the image. Name string `json:"name"` // Path to image data within archive. Path string `json:"path"` // ID of the image. Joining this value with "manifests" and Path // will produce a path to the image's manifest. ID string `json:"id"` // TagSymlink of the blob specified by ID. // This value must be a filename on disk in the "blobs" dir TagSymlink string `json:"tagSymlink"` // Type of the image in the context of this tool. // See the ImageType enum for options. Type ImageType `json:"type"` // ManifestDigests of images if the image is a docker manifest list or OCI index. // These manifests refer to image manifests by content SHA256 digest. // LayerDigests and Manifests are mutually exclusive. ManifestDigests []string `json:"manifestDigests,omitempty"` // LayerDigests of a single manifest if the image is not a docker manifest list // or OCI index. These digests refer to image layer blobs by content SHA256 digest. // LayerDigests and Manifests are mutually exclusive. LayerDigests []string `json:"layerDigests,omitempty"` }
Association between an image and its children, either image layers or child manifests.
type AssociationSet ¶
type AssociationSet map[string]Associations
AssociationSet is a set of image Associations mapped to their images
func AssociateImageLayers ¶
func AssociateImageLayers(rootDir string, imgMappings map[string]string, images []string, typ ImageType) (AssociationSet, utilerrors.Aggregate)
func (AssociationSet) Add ¶
func (as AssociationSet) Add(key string, value Association)
Add stores a key-value pair in this multimap.
func (AssociationSet) ContainsKey ¶
func (as AssociationSet) ContainsKey(key string) (found bool)
ContainsKey checks if the map contain the specified key
func (*AssociationSet) Decode ¶
func (as *AssociationSet) Decode(r io.Reader) error
Decode Associations from an opaque format. Only useable if Associations was encoded with Encode().
func (AssociationSet) Encode ¶
func (as AssociationSet) Encode(w io.Writer) error
Encode Associations in an efficient, opaque format.
func (AssociationSet) Keys ¶
func (as AssociationSet) Keys() []string
Keys returns all unique keys contained in map
func (AssociationSet) Merge ¶
func (as AssociationSet) Merge(in AssociationSet)
Merge Associations into the receiver.
func (AssociationSet) Search ¶
func (as AssociationSet) Search(key string) (values []Association, found bool)
Search will return all Associations for the specificed key
func (AssociationSet) SetContainsKey ¶
func (as AssociationSet) SetContainsKey(key, setKey string) (found bool)
ContainsKey checks if the map contain the specified key
func (AssociationSet) UpdateKey ¶
func (as AssociationSet) UpdateKey(oldKey, newKey string) error
UpdateKey will move values under oldKey to newKey in Assocations. Old entries will be deleted.
func (AssociationSet) UpdateValue ¶
func (as AssociationSet) UpdateValue(key string, value Association) error
UpdateValue will update the Association values for a given key
type Associations ¶
type Associations map[string]Association
Associations is a map for Association searching
type ErrInvalidComponent ¶
type ErrInvalidComponent struct {
// contains filtered or unexported fields
}
func (*ErrInvalidComponent) Error ¶
func (e *ErrInvalidComponent) Error() string
type ErrNoMapping ¶
type ErrNoMapping struct {
// contains filtered or unexported fields
}
func (*ErrNoMapping) Error ¶
func (e *ErrNoMapping) Error() string