list

package
v1.202.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFmtWrapErr = "%w: %v" // Format for wrapping errors.
)

Error format strings.

Variables

View Source
var (
	ErrGettingCommonFlags    = pkgerrors.New("error getting common flags")
	ErrGettingAbstractFlag   = pkgerrors.New("error getting abstract flag")
	ErrGettingVarsFlag       = pkgerrors.New("error getting vars flag")
	ErrInitializingCLIConfig = pkgerrors.New("error initializing CLI config")
	ErrDescribingStacks      = pkgerrors.New("error describing stacks")
	ErrComponentNameRequired = pkgerrors.New("component name is required")
	ErrInvalidArguments      = pkgerrors.New("invalid arguments: the command requires one argument 'component'")
)

Functions

func NewListParser added in v1.201.0

func NewListParser(builders ...func(*[]flags.Option)) *flags.StandardParser

NewListParser creates a StandardParser with specified flag builders. Each command composes only the flags it needs by passing the appropriate With* functions.

Example:

parser := NewListParser(
    WithFormatFlag,
    WithColumnsFlag,
    WithStackFlag,
)

func WithAbstractFlag added in v1.201.0

func WithAbstractFlag(options *[]flags.Option)

WithAbstractFlag adds abstract component inclusion flag. Used by: values, vars.

func WithComponentFlag added in v1.201.0

func WithComponentFlag(options *[]flags.Option)

WithComponentFlag adds component filter flag for filtering stacks by component. Used by: stacks.

func WithComponentsColumnsFlag added in v1.201.0

func WithComponentsColumnsFlag(options *[]flags.Option)

WithComponentsColumnsFlag adds column selection flag for list components command. Components command uses the same columns as metadata. Tab completion is registered via RegisterFlagCompletionFunc in the command init. Used by: components.

func WithDelimiterFlag added in v1.201.0

func WithDelimiterFlag(options *[]flags.Option)

WithDelimiterFlag adds CSV/TSV delimiter flag. Used by: workflows, vendor, values, vars, metadata, settings, instances.

func WithEnabledFlag added in v1.201.0

func WithEnabledFlag(options *[]flags.Option)

WithEnabledFlag adds enabled filter flag for filtering by enabled status. Nil value = all, true = enabled only, false = disabled only. Used by: components.

func WithFileFlag added in v1.201.0

func WithFileFlag(options *[]flags.Option)

WithFileFlag adds workflow file filter flag. Used by: workflows.

func WithFilterFlag added in v1.201.0

func WithFilterFlag(options *[]flags.Option)

WithFilterFlag adds YQ filter expression flag with environment variable support. Used by: components, vendor, instances.

func WithFormatFlag added in v1.201.0

func WithFormatFlag(options *[]flags.Option)

WithFormatFlag adds output format flag with environment variable support. Used by: components, stacks, workflows, vendor, values, vars, metadata, settings, instances.

func WithInstancesColumnsFlag added in v1.201.0

func WithInstancesColumnsFlag(options *[]flags.Option)

WithInstancesColumnsFlag adds column selection flag for list instances command. Tab completion is registered via RegisterFlagCompletionFunc in the command init. Used by: instances.

func WithLockedFlag added in v1.201.0

func WithLockedFlag(options *[]flags.Option)

WithLockedFlag adds locked filter flag for filtering by locked status. Nil value = all, true = locked only, false = unlocked only. Used by: components.

func WithMaxColumnsFlag added in v1.201.0

func WithMaxColumnsFlag(options *[]flags.Option)

WithMaxColumnsFlag adds max columns limit flag for values/metadata/settings. Used by: values, vars, metadata, settings.

func WithMetadataColumnsFlag added in v1.201.0

func WithMetadataColumnsFlag(options *[]flags.Option)

WithMetadataColumnsFlag adds column selection flag for list metadata and components commands. Tab completion is registered via RegisterFlagCompletionFunc in the command init. Used by: metadata, components.

func WithProcessFunctionsFlag added in v1.201.0

func WithProcessFunctionsFlag(options *[]flags.Option)

WithProcessFunctionsFlag adds template function processing flag. Used by: values, vars, metadata, settings.

func WithProcessTemplatesFlag added in v1.201.0

func WithProcessTemplatesFlag(options *[]flags.Option)

WithProcessTemplatesFlag adds template processing flag. Used by: values, vars, metadata, settings.

func WithProvenanceFlag added in v1.201.0

func WithProvenanceFlag(options *[]flags.Option)

WithProvenanceFlag adds provenance display flag for tree format. Used by: instances, stacks.

func WithQueryFlag added in v1.201.0

func WithQueryFlag(options *[]flags.Option)

WithQueryFlag adds YQ query expression flag for filtering values. Used by: values, vars, metadata, settings.

func WithSortFlag added in v1.201.0

func WithSortFlag(options *[]flags.Option)

WithSortFlag adds sort specification flag with environment variable support. Format: "column1:asc,column2:desc". Used by: components, stacks, workflows, vendor, instances.

func WithStackFlag added in v1.201.0

func WithStackFlag(options *[]flags.Option)

WithStackFlag adds stack filter flag for filtering by stack pattern (glob). Used by: components, vendor, values, vars, metadata, settings, instances.

func WithStacksColumnsFlag added in v1.201.0

func WithStacksColumnsFlag(options *[]flags.Option)

WithStacksColumnsFlag adds column selection flag for list stacks command. Tab completion is registered via RegisterFlagCompletionFunc in the command init. Used by: stacks.

func WithTypeFlag added in v1.201.0

func WithTypeFlag(options *[]flags.Option)

WithTypeFlag adds component type filter flag with environment variable support. Valid values: "real", "abstract", "all". Used by: components.

func WithUploadFlag added in v1.201.0

func WithUploadFlag(options *[]flags.Option)

WithUploadFlag adds upload to Pro API flag. Used by: instances.

func WithVendorColumnsFlag added in v1.201.0

func WithVendorColumnsFlag(options *[]flags.Option)

WithVendorColumnsFlag adds column selection flag for list vendor command. Tab completion is registered via RegisterFlagCompletionFunc in the command init. Used by: vendor.

func WithWorkflowsColumnsFlag added in v1.201.0

func WithWorkflowsColumnsFlag(options *[]flags.Option)

WithWorkflowsColumnsFlag adds column selection flag for list workflows command. Tab completion is registered via RegisterFlagCompletionFunc in the command init. Used by: workflows.

Types

type ComponentsOptions

type ComponentsOptions struct {
	global.Flags
	Stack    string
	Type     string
	Enabled  *bool
	Locked   *bool
	Format   string
	Columns  []string
	Sort     string
	Abstract bool
}

ComponentsOptions contains parsed flags for the components command.

type InstancesOptions

type InstancesOptions struct {
	global.Flags
	Format     string
	Columns    []string
	MaxColumns int
	Delimiter  string
	Stack      string
	Filter     string
	Query      string
	Sort       string
	Upload     bool
	Provenance bool
}

InstancesOptions contains parsed flags for the instances command.

type ListCommandProvider

type ListCommandProvider struct{}

ListCommandProvider implements the CommandProvider interface.

func (*ListCommandProvider) GetAliases

func (l *ListCommandProvider) GetAliases() []internal.CommandAlias

GetAliases returns command aliases (none for list command).

func (*ListCommandProvider) GetCommand

func (l *ListCommandProvider) GetCommand() *cobra.Command

func (*ListCommandProvider) GetCompatibilityFlags added in v1.200.0

func (l *ListCommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag

func (*ListCommandProvider) GetFlagsBuilder added in v1.200.0

func (l *ListCommandProvider) GetFlagsBuilder() flags.Builder

func (*ListCommandProvider) GetGroup

func (l *ListCommandProvider) GetGroup() string

func (*ListCommandProvider) GetName

func (l *ListCommandProvider) GetName() string

func (*ListCommandProvider) GetPositionalArgsBuilder added in v1.200.0

func (l *ListCommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder

type MetadataOptions

type MetadataOptions struct {
	global.Flags
	Format  string
	Stack   string
	Columns []string
	Sort    string
	Filter  string
}

MetadataOptions contains parsed flags for the metadata command.

type SettingsOptions

type SettingsOptions struct {
	global.Flags
	Format           string
	MaxColumns       int
	Delimiter        string
	Stack            string
	Query            string
	ProcessTemplates bool
	ProcessFunctions bool
}

SettingsOptions contains parsed flags for the settings command.

type StacksOptions

type StacksOptions struct {
	global.Flags
	Component  string
	Format     string
	Columns    []string
	Sort       string
	Provenance bool
}

StacksOptions contains parsed flags for the stacks command.

type ThemesOptions

type ThemesOptions struct {
	global.Flags
	All bool
}

ThemesOptions contains parsed flags for the themes command.

type ValuesOptions

type ValuesOptions struct {
	global.Flags
	Format           string
	MaxColumns       int
	Delimiter        string
	Stack            string
	Query            string
	Abstract         bool
	Vars             bool
	ProcessTemplates bool
	ProcessFunctions bool
}

ValuesOptions contains parsed flags for the values command.

type VendorOptions

type VendorOptions struct {
	global.Flags
	Format  string
	Stack   string
	Columns []string
	Sort    string
}

VendorOptions contains parsed flags for the vendor command.

type WorkflowsOptions

type WorkflowsOptions struct {
	global.Flags
	File    string
	Format  string
	Columns []string
	Sort    string
}

WorkflowsOptions contains parsed flags for the workflows command.

Jump to

Keyboard shortcuts

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