common

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Overview

Package common handles command configuration across all commands

Package common handles command configuration across all commands

Package common handles command configuration across all commands

Package common handles command configuration across all commands

Index

Constants

View Source
const (
	VLogLevel     = "log_level"
	VArchitecture = "architecture"
	VNoLogFile    = "no_log_file"
	VNoProgress   = "no_progress"
	VNoColor      = "no_color"
	VZarfCache    = "zarf_cache"
	VTmpDir       = "tmp_dir"
	VInsecure     = "insecure"

	VInitComponents   = "init.components"
	VInitStorageClass = "init.storage_class"

	VInitGitURL      = "init.git.url"
	VInitGitPushUser = "init.git.push_username"
	VInitGitPushPass = "init.git.push_password"
	VInitGitPullUser = "init.git.pull_username"
	VInitGitPullPass = "init.git.pull_password"

	VInitRegistryURL      = "init.registry.url"
	VInitRegistryNodeport = "init.registry.nodeport"
	VInitRegistrySecret   = "init.registry.secret"
	VInitRegistryPushUser = "init.registry.push_username"
	VInitRegistryPushPass = "init.registry.push_password"
	VInitRegistryPullUser = "init.registry.pull_username"
	VInitRegistryPullPass = "init.registry.pull_password"

	VInitArtifactURL       = "init.artifact.url"
	VInitArtifactPushUser  = "init.artifact.push_username"
	VInitArtifactPushToken = "init.artifact.push_token"

	VPkgOCIConcurrency = "package.oci_concurrency"
	VPkgPublicKey      = "package.public_key"

	VPkgCreateSet                = "package.create.set"
	VPkgCreateOutput             = "package.create.output"
	VPkgCreateSbom               = "package.create.sbom"
	VPkgCreateSbomOutput         = "package.create.sbom_output"
	VPkgCreateSkipSbom           = "package.create.skip_sbom"
	VPkgCreateMaxPackageSize     = "package.create.max_package_size"
	VPkgCreateSigningKey         = "package.create.signing_key"
	VPkgCreateSigningKeyPassword = "package.create.signing_key_password"
	VPkgCreateDifferential       = "package.create.differential"
	VPkgCreateRegistryOverride   = "package.create.registry_override"
	VPkgCreateFlavor             = "package.create.flavor"

	VPkgDeploySet          = "package.deploy.set"
	VPkgDeployComponents   = "package.deploy.components"
	VPkgDeployShasum       = "package.deploy.shasum"
	VPkgDeploySget         = "package.deploy.sget"
	VPkgDeploySkipWebhooks = "package.deploy.skip_webhooks"
	VPkgDeployTimeout      = "package.deploy.timeout"
	VPkgRetries            = "package.deploy.retries"

	VPkgPublishSigningKey         = "package.publish.signing_key"
	VPkgPublishSigningKeyPassword = "package.publish.signing_key_password"

	VPkgPullOutputDir = "package.pull.output_directory"

	VDevDeployNoYolo = "dev.deploy.no_yolo"
)

Constants for use when loading configurations from viper config files

Variables

View Source
var LogLevelCLI string

LogLevelCLI holds the log level as input from a command

View Source
var SuppressGlobalInterrupt = false

SuppressGlobalInterrupt suppresses the global error on an interrupt

Functions

func CheckVendorOnlyFromArgs

func CheckVendorOnlyFromArgs() bool

CheckVendorOnlyFromArgs checks if the command being run is a vendor-only command

func CheckVendorOnlyFromPath

func CheckVendorOnlyFromPath(cmd *cobra.Command) bool

CheckVendorOnlyFromPath checks if the cobra command is a vendor-only command

func ExitOnInterrupt added in v0.32.6

func ExitOnInterrupt()

ExitOnInterrupt catches an interrupt and exits with fatal error

func GetViper

func GetViper() *viper.Viper

GetViper returns the viper singleton

func InitViper

func InitViper() *viper.Viper

InitViper initializes the viper singleton for the CLI

func IsVendorCmd

func IsVendorCmd(args []string, vendoredCmds []string) bool

IsVendorCmd checks if the command is a vendor command.

func NewClusterOrDie added in v0.34.0

func NewClusterOrDie(ctx context.Context) *cluster.Cluster

NewClusterOrDie creates a new Cluster instance and waits for the cluster to be ready or throws a fatal error.

func SetBaseDirectory added in v0.32.0

func SetBaseDirectory(args []string) string

SetBaseDirectory sets the base directory. This is a directory with a zarf.yaml.

func SetupCLI

func SetupCLI()

SetupCLI sets up the CLI logging, interrupt functions, and more

Types

This section is empty.

Jump to

Keyboard shortcuts

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