list

package
v1.201.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// KeyTerraform is the key for terraform components.
	KeyTerraform = "terraform"
	// KeyHelmfile is the key for helmfile components.
	KeyHelmfile = "helmfile"
	// KeySettings is the key for settings section.
	KeySettings = "settings"
	// KeyMetadata is the key for metadata section.
	KeyMetadata = "metadata"
	// KeyComponents is the key for components section.
	KeyComponents = "components"
	// KeyVars is the key for vars section in components.
	KeyVars = "vars"
	// KeyAbstract is the key for abstract flag in components.
	KeyAbstract = "abstract"
	// KeyStack is the key used in log messages to identify stack contexts.
	KeyStack = "stack"
	// KeyComponent is the key used to identify component in log messages and errors.
	KeyComponent = "component"
	// DotChar is the dot character used in queries.
	DotChar = "."
	// LeftBracketChar is the left bracket character used in array indices.
	LeftBracketChar = "["
	// KeyValue is the key used for scalar values in result maps.
	KeyValue = "value"
	// KeyQuery is the key used for query information in log messages and errors.
	KeyQuery = "query"
	// TypeFormatSpec is the format specifier used to print variable types.
	TypeFormatSpec = "%T"
	// KeyPattern is the key used in log messages for pattern matching contexts.
	KeyPattern = "pattern"
)

Component and section name constants.

View Source
const (
	// ColumnNameComponent is the column name for component.
	ColumnNameComponent = "Component"
	// ColumnNameType is the column name for type.
	ColumnNameType = "Type"
	// ColumnNameManifest is the column name for manifest.
	ColumnNameManifest = "Manifest"
	// ColumnNameFolder is the column name for folder.
	ColumnNameFolder = "Folder"
	// TemplateKeyComponent is the template key for component name.
	TemplateKeyComponent = "atmos_component"
	// TemplateKeyVendorType is the template key for vendor type.
	TemplateKeyVendorType = "atmos_vendor_type"
	// TemplateKeyVendorFile is the template key for vendor file.
	TemplateKeyVendorFile = "atmos_vendor_file"
	// TemplateKeyVendorTarget is the template key for vendor target.
	TemplateKeyVendorTarget = "atmos_vendor_target"
	// MaxManifestSearchDepth is the maximum directory depth to search for component manifests.
	MaxManifestSearchDepth = 10
)
View Source
const (
	// NewLine is the newline character.
	NewLine = "\n"
	// DefaultTerminalWidth is the default terminal width.
	DefaultTerminalWidth = 80
	// MaxColumnWidth is the maximum width for a column.
	MaxColumnWidth = 30
)
View Source
const (
	FormatTable = "table"
	FormatJSON  = "json"
	FormatYAML  = "yaml"
	FormatCSV   = "csv"
	FormatTSV   = "tsv"
)
View Source
const DefaultMaxColumns = 10

DefaultMaxColumns is the default maximum number of columns to display.

Variables

View Source
var (
	ErrInvalidStackPattern         = errors.New("invalid stack pattern")
	ErrEmptyTargetComponentName    = errors.New("target component name cannot be empty")
	ErrComponentsSectionNotFound   = errors.New("components section not found in stack")
	ErrComponentNotFoundInSections = errors.New("component not found in terraform or helmfile sections")
	ErrQueryFailed                 = errors.New("query execution failed")
)

Error variables for list_values package.

View Source
var (
	// ErrNoVendorConfigsFound is returned when no vendor configurations are found.
	ErrNoVendorConfigsFound = errors.New("no vendor configurations found")
	// ErrVendorBasepathNotSet is returned when vendor.base_path is not set in atmos.yaml.
	ErrVendorBasepathNotSet = errors.New("vendor.base_path not set in atmos.yaml")
	// ErrVendorBasepathNotExist is returned when vendor.base_path does not exist.
	ErrVendorBasepathNotExist = errors.New("vendor base path does not exist")
	// ErrComponentManifestInvalid is returned when a component manifest is invalid.
	ErrComponentManifestInvalid = errors.New("invalid component manifest")
	// ErrVendorManifestInvalid is returned when a vendor manifest is invalid.
	ErrVendorManifestInvalid = errors.New("invalid vendor manifest")
	// ErrComponentManifestNotFound is returned when a component manifest is not found.
	ErrComponentManifestNotFound = errors.New("component manifest not found")
)
View Source
var (
	// ErrUnsupportedFormat is returned when an unsupported format is specified.
	ErrUnsupportedFormat = errors.New("unsupported format")
	// ErrInvalidVendorData is returned when vendor data is invalid.
	ErrInvalidVendorData = errors.New("invalid vendor data")
)

Functions

func AddCommonListFlags added in v1.170.0

func AddCommonListFlags(cmd *cobra.Command)

AddCommonListFlags adds the common flags to a command.

func ExecuteListInstancesCmd added in v1.192.0

func ExecuteListInstancesCmd(opts *InstancesCommandOptions) error

ExecuteListInstancesCmd executes the list instances command.

func ExecuteListMetadataCmd added in v1.201.0

func ExecuteListMetadataCmd(info *schema.ConfigAndStacksInfo, cmd *cobra.Command, args []string, opts *MetadataOptions) error

ExecuteListMetadataCmd executes the list metadata command using the renderer pipeline.

func FilterAndListComponents

func FilterAndListComponents(stackFlag string, stacksMap map[string]any) ([]string, error)

FilterAndListComponents filters and lists components based on the given stack.

func FilterAndListStacks

func FilterAndListStacks(stacksMap map[string]any, component string) ([]string, error)

FilterAndListStacks filters stacks by the given component

func FilterAndListValues added in v1.170.0

func FilterAndListValues(stacksMap map[string]interface{}, options *FilterOptions) (string, error)

FilterAndListValues filters and lists component values across stacks.

func FilterAndListVendor added in v1.176.0

func FilterAndListVendor(atmosConfig *schema.AtmosConfiguration, options *FilterOptions) (string, error)

FilterAndListVendor filters and lists vendor configurations using the internal formatter abstraction.

func FilterAndListWorkflows added in v1.155.0

func FilterAndListWorkflows(fileFlag string, listConfig schema.ListConfig, format string, delimiter string) (string, error)

FilterAndListWorkflows filters and lists workflows based on the given file

func GetVendorInfos added in v1.201.0

func GetVendorInfos(atmosConfig *schema.AtmosConfiguration) ([]extract.VendorInfo, error)

getVendorInfos retrieves vendor information, handling test and production modes. GetVendorInfos reads vendor configuration from vendor.yaml files.

func ValidateFormat added in v1.155.0

func ValidateFormat(format string) error

ValidateFormat checks if the given format is supported.

func ValidateValuesFormat added in v1.170.0

func ValidateValuesFormat(formatStr string) error

ValidateFormat validates the output format.

Types

type CommonListFlags added in v1.170.0

type CommonListFlags struct {
	Query      string
	MaxColumns int
	Format     string
	Delimiter  string
	Stack      string
}

CommonListFlags represents the common flags used across list commands.

func GetCommonListFlags added in v1.170.0

func GetCommonListFlags(cmd *cobra.Command) (*CommonListFlags, error)

GetCommonListFlags extracts the common flags from a command.

type FilterOptions added in v1.170.0

type FilterOptions struct {
	Component       string
	ComponentFilter string
	Query           string
	IncludeAbstract bool
	MaxColumns      int
	FormatStr       string
	Delimiter       string
	StackPattern    string
}

FilterOptions contains the options for filtering and listing component values.

type InstancesCommandOptions added in v1.201.0

type InstancesCommandOptions struct {
	Info        *schema.ConfigAndStacksInfo
	Cmd         *cobra.Command
	Args        []string
	ShowImports bool
	ColumnsFlag []string
	FilterSpec  string
	SortSpec    string
	Delimiter   string
	Query       string
	AuthManager auth.AuthManager
}

InstancesCommandOptions contains options for the list instances command.

type MetadataOptions added in v1.201.0

type MetadataOptions struct {
	Format      string
	Columns     []string
	Sort        string
	Filter      string
	Stack       string
	Delimiter   string
	AuthManager auth.AuthManager
}

MetadataOptions contains options for list metadata command.

type QueryParams added in v1.176.0

type QueryParams struct {
	StackName           string
	StackMap            map[string]interface{}
	Component           string
	ComponentFilter     string
	TargetComponentName string
	ComponentType       string
	IncludeAbstract     bool
}

QueryParams holds all parameters needed for executing a query on a stack.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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