Documentation ¶
Index ¶
- Constants
- func AppendIndex(primary, secondary v1.ImageIndex) (v1.ImageIndex, error)
- func GoArch(in string) (string, error)
- func HomeDir() string
- func MArch(in string) (string, error)
- func ReferenceExpand(ref string, options ...ReferenceOption) string
- func SetupLogging(quiet, verbose bool) error
- type ReferenceOption
Constants ¶
const ( AnnotationDockerReferenceDigest = "vnd.docker.reference.digest" AnnotationDockerReferenceType = "vnd.docker.reference.type" AnnotationAttestationManifest = "attestation-manifest" AnnotationInTotoPredicateType = "in-toto.io/predicate-type" AnnotationSPDXDoc = "https://spdx.dev/Document" )
Variables ¶
This section is empty.
Functions ¶
func AppendIndex ¶
func AppendIndex(primary, secondary v1.ImageIndex) (v1.ImageIndex, error)
AppendIndex creates a new ImageIndex composed of the merge of the elements of secondary ImageIndex and primary ImageIndex. In the case of conflicts, the primary ImageIndex wins. For example, if both have a manifest for a specific platform, then use the one from primary. The append is aware of the buildkit-style attestations, and will keep any attestations that point to a valid manifest in the list, discarding any that do not. If either of the two ImageIndexes is nil, the other is returned. If the secondary ImageIndex is a precise superset of primary, then the returned new ImageIndex is an identical copy of the secondary ImageIndex.
func HomeDir ¶
func HomeDir() string
HomeDir get the home directory for the user based on the HOME environment variable.
func ReferenceExpand ¶
func ReferenceExpand(ref string, options ...ReferenceOption) string
ReferenceExpand expands "redis" to "docker.io/library/redis" so all images have a full domain, and similarly foo/bar to docker.io/foo/bar. If the image does not have a tag, ":latest" is added.
func SetupLogging ¶
SetupLogging once the flags have been parsed, setup the logging
Types ¶
type ReferenceOption ¶
type ReferenceOption func(r *refOpts)
func ReferenceWithTag ¶
func ReferenceWithTag() ReferenceOption
ReferenceWithTag returns a ReferenceOption that ensures a tag is filled. If the tag is not provided, the default is added