list

package
v1.199.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 28 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"
	// VendorTypeComponent is the type for components with component manifests.
	VendorTypeComponent = "Component Manifest"
	// VendorTypeVendor is the type for vendor manifests.
	VendorTypeVendor = "Vendor Manifest"
	// 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(info *schema.ConfigAndStacksInfo, cmd *cobra.Command, args []string) error

ExecuteListInstancesCmd executes the list instances command.

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 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 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.

type VendorInfo added in v1.176.0

type VendorInfo struct {
	Component string // Component name
	Type      string // "Component Manifest" or "Vendor Manifest"
	Manifest  string // Path to manifest file
	Folder    string // Target folder
}

VendorInfo contains information about a vendor configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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