Documentation ¶
Index ¶
Constants ¶
View Source
const ( Name = string(cmd.Images) Usage = "Get information about container images" Alias = "i" )
View Source
const ( FlagFilter = "filter" FlagFilterUsage = "container image filter pattern" // TODO - replace with reference to `master/command.FlagTUI` FlagTUI = "tui" FlagTUIUsage = "terminal user interface" )
Images command flag names and usage descriptions
Variables ¶
View Source
var ( // HeaderStyle is the lipgloss style used for the table headers. HeaderStyle = lipgloss.NewStyle().Foreground(white).Bold(true).Align(lipgloss.Center) // CellStyle is the base lipgloss style used for the table rows. CellStyle = lipgloss.NewStyle().Padding(0, 1).Width(14) // OddRowStyle is the lipgloss style used for odd-numbered table rows. OddRowStyle = CellStyle.Foreground(gray) // EvenRowStyle is the lipgloss style used for even-numbered table rows. EvenRowStyle = CellStyle.Foreground(lightGray) // BorderStyle is the lipgloss style used for the table border. BorderStyle = lipgloss.NewStyle().Foreground(white) )
View Source
var CLI = &cli.Command{ Name: Name, Aliases: []string{Alias}, Usage: Usage, Flags: ImagesFlags, Action: func(ctx *cli.Context) error { gcvalues, ok := command.CLIContextGet(ctx.Context, command.GlobalParams).(*command.GenericParams) if !ok || gcvalues == nil { return command.ErrNoGlobalParams } tuiMode := ctx.Bool(FlagTUI) cparams := &CommandParams{ Runtime: ctx.String(command.FlagRuntime), Filter: ctx.String(FlagFilter), TUI: tuiMode, } quietLogs := tuiMode || gcvalues.QuietCLIMode xc := app.NewExecutionContext( Name, quietLogs, gcvalues.OutputFormat) OnCommand(xc, gcvalues, cparams) return nil }, }
View Source
var CommandFlagSuggestions = &command.FlagSuggestions{ Names: []prompt.Suggest{ {Text: command.FullFlagName(command.FlagRuntime), Description: command.FlagRuntimeUsage}, {Text: command.FullFlagName(FlagFilter), Description: FlagFilterUsage}, }, Values: map[string]command.CompleteValue{ command.FullFlagName(command.FlagRuntime): command.CompleteRuntime, }, }
View Source
var CommandSuggestion = prompt.Suggest{ Text: Name, Description: Usage, }
View Source
var Flags = map[string]cli.Flag{ FlagFilter: &cli.StringFlag{ Name: FlagFilter, Value: "", Usage: FlagFilterUsage, EnvVars: []string{"DSLIM_IMAGES_FILTER"}, }, FlagTUI: &cli.BoolFlag{ Name: FlagTUI, Usage: FlagTUIUsage, }, }
View Source
var ImagesFlags = []cli.Flag{ command.Cflag(command.FlagRuntime), cflag(FlagFilter), cflag(FlagTUI), }
Functions ¶
func OnCommand ¶
func OnCommand( xc *app.ExecutionContext, gparams *command.GenericParams, cparams *CommandParams, )
OnCommand implements the 'images' command
func RegisterCommand ¶
func RegisterCommand()
Types ¶
type CommandParams ¶
type TUI ¶
type TUI struct {
// contains filtered or unexported fields
}
TUI represents the internal state of the terminal user interface.
func InitialTUI ¶
func InitialTUI(images map[string]crt.BasicImageInfo, standalone bool) *TUI
InitialTUI returns the initial state of the TUI.
Click to show internal directories.
Click to hide internal directories.