Documentation
¶
Index ¶
- Constants
- Variables
- func AddStackCompletion(cmd *cobra.Command)
- func CheckForAtmosUpdateAndPrintMessage(atmosConfig schema.AtmosConfiguration)
- func ComponentsArgCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func Contains(slice []string, target string) bool
- func Execute() error
- type AtmosValidateOption
- type ExampleContent
- type MetadataParams
- type ProcessingOptions
- type SettingsParams
- type ValidateConfig
Constants ¶
const (
ErrFmtWrapErr = "%w: %v" // Format for wrapping errors.
)
Error format strings.
Variables ¶
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'") )
var RootCmd = &cobra.Command{ Use: "atmos", Short: "Universal Tool for DevOps and Cloud Automation", Long: `Atmos is a universal tool for DevOps and cloud automation used for provisioning, managing and orchestrating workflows across various toolchains`, FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true}, PersistentPreRun: func(cmd *cobra.Command, args []string) { isHelpCommand := cmd.Name() == "help" helpFlag := cmd.Flags().Changed("help") isHelpRequested := isHelpCommand || helpFlag if isHelpRequested { cmd.SilenceUsage = false cmd.SilenceErrors = false } else { cmd.SilenceUsage = true cmd.SilenceErrors = true } configAndStacksInfo := schema.ConfigAndStacksInfo{} _, err := cfg.InitCliConfig(configAndStacksInfo, false) if err != nil { if errors.Is(err, cfg.NotFound) { if !isHelpRequested { u.LogWarning(err.Error()) } } else { u.LogErrorAndExit(err) } } }, Run: func(cmd *cobra.Command, args []string) { checkAtmosConfig() fmt.Println() err := tuiUtils.PrintStyledText("ATMOS") if err != nil { u.PrintErrorMarkdownAndExit("", err, "") } err = e.ExecuteAtmosCmd() if err != nil { u.LogErrorAndExit(err) } }, }
RootCmd represents the base command when called without any subcommands
var ValidateStacksCmd = &cobra.Command{ Use: "stacks", Short: "Validate stack manifest configurations", Long: "This command validates the configuration of stack manifests in Atmos to ensure proper setup and compliance.", Example: "validate stacks", FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: false}, Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { checkAtmosConfig() err := e.ExecuteValidateStacksCmd(cmd, args) if err != nil { u.PrintErrorMarkdownAndExit("", err, "") } u.PrintMessageInColor("all stacks validated successfully\n", theme.Colors.Success) }, }
ValidateStacksCmd validates stacks
Functions ¶
func AddStackCompletion ¶ added in v1.161.0
func CheckForAtmosUpdateAndPrintMessage ¶ added in v1.127.0
func CheckForAtmosUpdateAndPrintMessage(atmosConfig schema.AtmosConfiguration)
CheckForAtmosUpdateAndPrintMessage checks if a version update is needed and prints a message if a newer version is found. It loads the cache, decides if it's time to check for updates, compares the current version to the latest available release, and if newer, prints the update message. It also updates the cache's timestamp after printing.
func ComponentsArgCompletion ¶ added in v1.161.0
Types ¶
type AtmosValidateOption ¶ added in v1.97.0
type AtmosValidateOption func(*ValidateConfig)
func WithStackValidation ¶ added in v1.97.0
func WithStackValidation(check bool) AtmosValidateOption
type ExampleContent ¶ added in v1.162.0
type MetadataParams ¶ added in v1.170.0
type MetadataParams struct { CommonFlags *fl.CommonFlags ProcessingFlags *fl.ProcessingFlags ComponentFilter string }
MetadataParams contains the parameters needed for listing metadata.
type ProcessingOptions ¶ added in v1.170.0
ProcessingOptions holds flags for processing templates and YAML functions.
type SettingsParams ¶ added in v1.170.0
type SettingsParams struct { CommonFlags *fl.CommonFlags ProcessingFlags *fl.ProcessingFlags ComponentFilter string }
SettingsParams contains all parameters needed for the list settings command.
type ValidateConfig ¶ added in v1.97.0
type ValidateConfig struct {
CheckStack bool
}
ValidateConfig holds configuration options for Atmos validation. CheckStack determines whether stack configuration validation should be performed.
Source Files
¶
- about.go
- atlantis.go
- atlantis_generate.go
- atlantis_generate_repo_config.go
- aws.go
- aws_eks.go
- aws_eks_update_kubeconfig.go
- cmd_utils.go
- completion.go
- describe.go
- describe_affected.go
- describe_component.go
- describe_config.go
- describe_dependents.go
- describe_stacks.go
- describe_workflows.go
- docs.go
- helmfile.go
- helmfile_apply.go
- helmfile_destroy.go
- helmfile_diff.go
- helmfile_generate.go
- helmfile_generate_varfile.go
- helmfile_sync.go
- list.go
- list_components.go
- list_metadata.go
- list_settings.go
- list_stacks.go
- list_values.go
- list_workflows.go
- markdown_help.go
- pro.go
- pro_lock.go
- pro_unlock.go
- root.go
- support.go
- terraform.go
- terraform_commands.go
- terraform_generate.go
- terraform_generate_backend.go
- terraform_generate_backends.go
- terraform_generate_varfile.go
- terraform_generate_varfiles.go
- validate.go
- validate_component.go
- validate_editorconfig.go
- validate_stacks.go
- vendor.go
- vendor_diff.go
- vendor_pull.go
- version.go
- workflow.go