list

package
v1.205.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 40 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 WithAffectedColumnsFlag added in v1.203.0

func WithAffectedColumnsFlag(options *[]flags.Option)

WithAffectedColumnsFlag adds column selection flag for list affected command. Used by: affected.

func WithAliasesColumnsFlag added in v1.205.0

func WithAliasesColumnsFlag(options *[]flags.Option)

WithAliasesColumnsFlag adds column selection flag for list aliases command. Used by: aliases.

func WithCloneTargetRefFlag added in v1.203.0

func WithCloneTargetRefFlag(options *[]flags.Option)

WithCloneTargetRefFlag adds clone target ref flag. Used by: affected.

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 WithExcludeLockedFlag added in v1.203.0

func WithExcludeLockedFlag(options *[]flags.Option)

WithExcludeLockedFlag adds exclude locked components flag. Used by: affected.

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 WithIncludeDependentsFlag added in v1.203.0

func WithIncludeDependentsFlag(options *[]flags.Option)

WithIncludeDependentsFlag adds include dependents flag. Used by: affected.

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 WithRefFlag added in v1.203.0

func WithRefFlag(options *[]flags.Option)

WithRefFlag adds git reference flag for comparing branches. Used by: affected.

func WithRepoPathFlag added in v1.203.0

func WithRepoPathFlag(options *[]flags.Option)

WithRepoPathFlag adds repository path flag for comparing with a cloned repo. Used by: affected.

func WithSHAFlag added in v1.203.0

func WithSHAFlag(options *[]flags.Option)

WithSHAFlag adds git commit SHA flag for comparing branches. Used by: affected.

func WithSSHKeyFlag added in v1.203.0

func WithSSHKeyFlag(options *[]flags.Option)

WithSSHKeyFlag adds SSH key path flag for cloning private repos. Used by: affected.

func WithSSHKeyPasswordFlag added in v1.203.0

func WithSSHKeyPasswordFlag(options *[]flags.Option)

WithSSHKeyPasswordFlag adds SSH key password flag. Used by: affected.

func WithSkipFlag added in v1.203.0

func WithSkipFlag(options *[]flags.Option)

WithSkipFlag adds skip YAML functions flag. Used by: affected.

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 AffectedOptions added in v1.203.0

type AffectedOptions struct {
	global.Flags
	// Output format flags.
	Format    string
	Columns   []string
	Delimiter string
	Sort      string

	// Git comparison flags.
	Ref            string
	SHA            string
	RepoPath       string
	SSHKeyPath     string
	SSHKeyPassword string
	CloneTargetRef bool

	// Content flags.
	IncludeDependents bool
	Stack             string
	ExcludeLocked     bool

	// Processing flags.
	ProcessTemplates bool
	ProcessFunctions bool
	Skip             []string
}

AffectedOptions contains parsed flags for the affected command.

type AliasInfo added in v1.205.0

type AliasInfo struct {
	Alias   string
	Command string
	Type    string // "built-in" or "configured".
}

AliasInfo represents a command alias with its source type.

type AliasesOptions added in v1.205.0

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

AliasesOptions contains parsed flags for the aliases command.

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 for list subcommands. Creates "atmos vendor list" as an alias for "atmos list vendor". Creates "atmos workflow list" as an alias for "atmos list workflows".

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

func (*ListCommandProvider) IsExperimental added in v1.205.0

func (l *ListCommandProvider) IsExperimental() bool

IsExperimental returns whether this command is experimental.

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 SourcesOptions added in v1.205.0

type SourcesOptions struct {
	global.Flags
	Format      string
	Stack       string
	Component   string // From positional arg.
	AtmosConfig *schema.AtmosConfiguration
	AuthManager auth.AuthManager
}

SourcesOptions contains parsed flags for the sources 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