cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package cmd is where the commands for cargoship

Index

Constants

View Source
const (
	// InstallApplyConfig flag
	InstallApplyConfig = "config"
	// InstallApplyConfirm flag
	InstallApplyConfirm = "confirm"
	// InstallApplyConcurrency flag
	InstallApplyConcurrency = "concurrency"
	// InstallApplyWorkConcurrency flag
	InstallApplyWorkConcurrency = "work-concurrency"
	// InstallApplyUpdateHost flag
	InstallApplyUpdateHost = "update-hosts"
	// InstallApplyUpdateFirewall flag
	InstallApplyUpdateFirewall = "update-firewall"
	// InstallApplyUpdateFAPolicyD flag
	InstallApplyUpdateFAPolicyD = "update-fapolicyd"
)
View Source
const (
	// InstallKubeConfig flag
	InstallKubeConfig = "config"
	// InstallKubeConfirm flag
	InstallKubeConfirm = "confirm"
	// InstallKubeDistro flag
	InstallKubeDistro = "distro"
)
View Source
const (
	// InstallResetConfig flag
	InstallResetConfig = "config"
	// InstallResetConfirm flag
	InstallResetConfirm = "confirm"
	// InstallResetDistro flag
	InstallResetDistro = "distro"
	// InstallResetConcurrency flag
	InstallResetConcurrency = "concurrency"
	// InstallResetWorkConcurrency flag
	InstallResetWorkConcurrency = "work-concurrency"
	// InstallResetUpdateHost flag
	InstallResetUpdateHost = "update-hosts"
	// InstallResetUpdateFirewall flag
	InstallResetUpdateFirewall = "update-firewall"
	// InstallResetUpdateFAPolicyD flag
	InstallResetUpdateFAPolicyD = "update-fapolicyd"
)
View Source
const (
	// RootLoggingLevel command flag log level
	RootLoggingLevel = "log-level"
	// RootLoggingFormat command flag log format
	RootLoggingFormat = "log-format"
	// RootTimeout command flag timeout
	RootTimeout = "timeout"
)

Variables

View Source
var (
	// IsColorDisabled whether to show the colored output
	IsColorDisabled bool
	// LogFormat format of the log output
	LogFormat string
	// LogLevelCLI log level
	LogLevelCLI string
	// Timeout for how long a task runs
	Timeout string
)
View Source
var (
	// OutputWriter provides a default writer to Stdout for user-facing command output
	OutputWriter = os.Stdout
)

Functions

func Distro

func Distro(s string) (distrocfg.Distro, error)

Distro returns the distro config for a given string

func Execute

func Execute(ctx context.Context) error

Execute is the root execute logic

func GetStringSlice added in v0.3.0

func GetStringSlice(v *viper.Viper, key string) []string

GetStringSlice returns a string slice from viper it consistently returns expected results across flags and environment variables https://github.com/spf13/viper/issues/380

func NewCargoshipCommand

func NewCargoshipCommand() *cobra.Command

NewCargoshipCommand is the root command

func PrintFindings added in v0.3.0

func PrintFindings(ctx context.Context, lintErr *lint.LintError)

PrintFindings prints the findings in the LintError as a table.

func PrintViperConfigUsed

func PrintViperConfigUsed(ctx context.Context) error

PrintViperConfigUsed informs users when Zarf has detected a config file.

Types

type InstallCommon

type InstallCommon struct {
	LogFormat string
	// contains filtered or unexported fields
}

InstallCommon common args

Jump to

Keyboard shortcuts

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