flags

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllNamespacesFlag = &Metadata{
	Name:      "all",
	Shorthand: "a",
	Usage:     "List from all namespaces.",
	Default:   false,
	Required:  false,
}
View Source
var CopyFlag = &Metadata{
	Name:     "copy",
	Usage:    "Copy the secret value to the clipboard",
	Default:  false,
	Required: false,
}
View Source
var FilterExecSubstringFlag = &Metadata{
	Name:      "filter",
	Shorthand: "f",
	Usage:     "Filter executable by reference substring.",
	Default:   "",
	Required:  false,
}
View Source
var FilterNamespaceFlag = &Metadata{
	Name:      "namespace",
	Shorthand: "n",
	Usage:     "Filter executables by namespace.",
	Default:   "",
	Required:  false,
}
View Source
var FilterTagFlag = &Metadata{
	Name:      "tag",
	Shorthand: "t",
	Usage:     "Filter by tags.",
	Default:   []string{},
	Required:  false,
}
View Source
var FilterVerbFlag = &Metadata{
	Name:      "verb",
	Shorthand: "v",
	Usage:     "Filter executables by verb.",
	Default:   "",
	Required:  false,
}
View Source
var FilterWorkspaceFlag = &Metadata{
	Name:      "workspace",
	Shorthand: "w",
	Usage:     "Filter executables by workspace.",
	Default:   "",
	Required:  false,
}
View Source
var FixedWsModeFlag = &Metadata{
	Name:      "fixed",
	Shorthand: "f",
	Usage:     "Set the workspace mode to fixed",
	Default:   false,
	Required:  false,
}
View Source
var LastLogEntryFlag = &Metadata{
	Name:     "last",
	Usage:    "Print the last execution's logs",
	Default:  false,
	Required: false,
}
View Source
var ListFlag = &Metadata{
	Name:      "list",
	Shorthand: "l",
	Usage:     "Show a simple list view of executables instead of interactive discovery.",
	Default:   false,
	Required:  false,
}
View Source
var LogLevel = &Metadata{
	Name:      "log-level",
	Usage:     "Log verbosity level (debug, info, fatal)",
	Shorthand: "L",
	Default:   "info",
	Required:  false,
}
View Source
var LogModeFlag = &Metadata{
	Name:      "log-mode",
	Shorthand: "m",
	Usage:     "Log mode (text, logfmt, json, hidden)",
	Default:   "",
	Required:  false,
}
View Source
var OutputFormatFlag = &Metadata{
	Name:      "output",
	Shorthand: "o",
	Usage:     "Output format. One of: yaml, json, or tui.",
	Default:   "tui",
	Required:  false,
}
View Source
var OutputSecretAsPlainTextFlag = &Metadata{
	Name:      "plaintext",
	Shorthand: "p",
	Usage:     "Output the secret value as plain text instead of an obfuscated string",
	Default:   false,
	Required:  false,
}
View Source
var ParameterValueFlag = &Metadata{
	Name:      "param",
	Shorthand: "p",
	Usage: "Set a parameter value by env key. (i.e. KEY=value) Use multiple times to set multiple parameters." +
		"This will override any existing parameter values defined for the executable.",
	Default: []string{},
}
View Source
var SecretFromFile = &Metadata{
	Name:     "file",
	Usage:    "File to read the secret's value from",
	Default:  "",
	Required: false,
}
View Source
var SetAfterCreateFlag = &Metadata{
	Name:      "set",
	Shorthand: "s",
	Usage:     "Set the newly created workspace as the current workspace",
	Default:   false,
	Required:  false,
}
View Source
var SetSoundNotificationFlag = &Metadata{
	Name:    "sound",
	Usage:   "Update completion sound notification setting",
	Default: false,
}
View Source
var StoreAllFlag = &Metadata{
	Name:    "all",
	Usage:   "Force clear all stored data",
	Default: false,
}
View Source
var SyncCacheFlag = &Metadata{
	Name:     "sync",
	Usage:    "Sync flow cache and workspaces",
	Default:  false,
	Required: false,
}
View Source
var TemplateFilePathFlag = &Metadata{
	Name:      "file",
	Shorthand: "f",
	Usage:     "Path to the template file. It must be a valid flow file template.",
	Default:   "",
	Required:  false,
}
View Source
var TemplateFlag = &Metadata{
	Name:      "template",
	Shorthand: "t",
	Usage:     "Registered template name. Templates can be registered in the flow configuration file or with `flow set template`.",
	Default:   "",
	Required:  false,
}
View Source
var TemplateOutputPathFlag = &Metadata{
	Name:      "output",
	Shorthand: "o",
	Usage:     "Output directory (within the workspace) to create the flow file and its artifacts. If the directory does not exist, it will be created.",
	Default:   "",
	Required:  false,
}
View Source
var TemplateWorkspaceFlag = &Metadata{
	Name:      "workspace",
	Shorthand: "w",
	Usage:     "Workspace to create the flow file and its artifacts. Defaults to the current workspace.",
	Default:   "",
	Required:  false,
}
View Source
var VaultIdentityEnvFlag = &Metadata{
	Name:     "identity-env",
	Usage:    "Environment variable name for the Age vault identity. Only used for Age vaults.",
	Default:  "",
	Required: false,
}
View Source
var VaultIdentityFileFlag = &Metadata{
	Name:     "identity-file",
	Usage:    "File path for the Age vault identity. An absolute path is recommended. Only used for Age vaults.",
	Default:  "",
	Required: false,
}
View Source
var VaultKeyEnvFlag = &Metadata{
	Name:     "key-env",
	Usage:    "Environment variable name for the vault encryption key. Only used for AES256 vaults.",
	Default:  "",
	Required: false,
}
View Source
var VaultKeyFileFlag = &Metadata{
	Name:     "key-file",
	Usage:    "File path for the vault encryption key. An absolute path is recommended. Only used for AES256 vaults.",
	Default:  "",
	Required: false,
}
View Source
var VaultPathFlag = &Metadata{
	Name:      "path",
	Shorthand: "p",
	Usage:     "Directory that the vault will use to store its data. If not set, the vault will be stored in the flow cache directory.",
	Default:   "",
	Required:  false,
}
View Source
var VaultRecipientsFlag = &Metadata{
	Name:     "recipients",
	Usage:    "Comma-separated list of recipient keys for the vault. Only used for Age vaults.",
	Default:  "",
	Required: false,
}
View Source
var VaultSetFlag = &Metadata{
	Name:      "set",
	Shorthand: "s",
	Usage:     "Set the newly created vault as the current vault",
	Default:   false,
}
View Source
var VaultTypeFlag = &Metadata{
	Name:      "type",
	Shorthand: "t",
	Usage:     "Vault type. Either age or aes256",
	Default:   "aes256",
	Required:  false,
}

Functions

func HasFlag

func HasFlag(cmd *cobra.Command, metadata Metadata) bool

func ToPflag

func ToPflag(cmd *cobra.Command, metadata Metadata, persistent bool) (*pflag.FlagSet, error)

func ValueFor

func ValueFor[T any](cmd *cobra.Command, metadata Metadata, persistent bool) T

Types

type Metadata

type Metadata struct {
	Name      string
	Shorthand string
	Usage     string
	Default   interface{}
	Required  bool
}

Jump to

Keyboard shortcuts

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