manifest

package
v0.1.78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

README

Third Party Code from OpenShift CLI (oc)

This directory contains third party code copied from the OpenShift CLI (oc) repository.

Files and Their Sources

manifest.go

Contains copied function calls from:

dockercredentials/credentials.go

Contains copied credential handling code from the oc repository:

  • Purpose: Provides Docker credential store functionality for registry authentication
  • Functions: NewFromFile, NewFromBytes, BasicFromKeyring, and related types

Rationale

At the time of copying, it was easier to copy and paste the function call contents rather than calling the exported functions from oc directly. Calling the functions directly would have invoked many go.mod changes including several conflicting dependencies between HyperShift, oc, and the library-go repositories.

Maintenance

This code is a point-in-time copy and may become outdated as the upstream oc repository evolves. When updating or maintaining this code:

  1. Consider whether direct imports from oc are feasible with current dependency management
  2. If copying updates, ensure compatibility with HyperShift's usage patterns

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllImagesFiltered = fmt.Errorf("filtered all images from manifest list")

PreferManifestList specifically requests a manifest list first

Functions

func ManifestToImageConfig

ManifestToImageConfig takes an image manifest and converts it into a structured object.

func PlatformSpecString added in v0.1.64

func PlatformSpecString(platform manifestlist.PlatformSpec) string

Types

type FilterFunc added in v0.1.64

type FilterFunc func(*manifestlist.ManifestDescriptor, bool) bool

type FilterOptions added in v0.1.64

type FilterOptions struct {
	FilterByOS      string
	DefaultOSFilter bool
	OSFilter        *regexp.Regexp
}

FilterOptions assist in filtering out unneeded manifests from ManifestList objects.

func (*FilterOptions) Include added in v0.1.64

func (o *FilterOptions) Include(d *manifestlist.ManifestDescriptor, hasMultiple bool) bool

Include returns true if the provided manifest should be included, or the first image if the user didn't alter the default selection and there is only one image.

func (*FilterOptions) IncludeAll added in v0.1.64

func (o *FilterOptions) IncludeAll(d *manifestlist.ManifestDescriptor, hasMultiple bool) bool

IncludeAll returns true if the provided manifest matches the filter, or all if there was no filter.

func (*FilterOptions) IsWildcardFilter added in v0.1.64

func (o *FilterOptions) IsWildcardFilter() bool

IsWildcardFilter returns true if the filter regex is set to a wildcard

type ManifestLocation

type ManifestLocation struct {
	Manifest     digest.Digest
	ManifestList digest.Digest
}

func FirstManifest

FirstManifest returns the first manifest at the request location that matches the filter function.

func (ManifestLocation) IsList

func (m ManifestLocation) IsList() bool

func (ManifestLocation) String

func (m ManifestLocation) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL