images

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImageRef = cmdutil.ResourceRef[types.ImageDetailSummary, types.ImageSummary]{
	EnvironmentScoped: true,
	Singular:          "image",
	Plural:            "images",
	IDHint:            "the image ID",
	ListCmd:           "arcane images list",
	GetPath:           clitypes.Image,
	ListPath:          clitypes.Images,
	SearchCandidates:  searchImageCandidates,
	Matches:           imageMatches,
	Label: func(match types.ImageSummary) string {
		label := match.ID
		switch {
		case len(match.RepoTags) > 0:
			label = match.RepoTags[0]
		case match.Repo != "" && match.Tag != "":
			label = match.Repo + ":" + match.Tag
		}
		return fmt.Sprintf("%s (%s)", label, match.ID)
	},
	Promote: func(match types.ImageSummary) *types.ImageDetailSummary {
		return &types.ImageDetailSummary{
			ID:               match.ID,
			RepoTags:         match.RepoTags,
			RepoDigests:      match.RepoDigests,
			PinnedReferences: match.PinnedReferences,
			Size:             match.Size,
		}
	},
	IDOf:         func(match types.ImageSummary) string { return match.ID },
	IdentifierOf: func(details types.ImageDetailSummary) string { return details.ID },
	Validate: func(details types.ImageDetailSummary, identifier string) error {
		if details.ID == "" {
			return fmt.Errorf("image lookup for %q returned empty ID", identifier)
		}
		return nil
	},
}

Functions

func Command

func Command() *cobra.Command

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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