cmd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "unknown"
	Revision  = "unknown"
	Branch    = "unknown"
	BuildUser = "unknown"
	BuildDate = "unknown"
	GoVersion = runtime.Version()
	GoOS      = runtime.GOOS
	GoArch    = runtime.GOARCH
	Platform  = GoOS + "/" + GoArch
)
View Source
var RootCmd = &cobra.Command{
	Use:   "vault-kv-search [flags] [search-path] substring",
	Short: "Search Hashicorp Vault",
	Long: `Recursively search Hashicorp Vault for substring

If only one postional argument is given, it is assumed you want to search all 
available KV stores and the argument specified is the substring you want to search for`,

	PreRunE: func(cmd *cobra.Command, args []string) error {
		return checkInputs(cmd, args)
	},
	Run: func(cmd *cobra.Command, args []string) {
		VaultKvSearch(args, searchObjects, showSecrets, useRegex, crawlingDelay, kvVersion, jsonOutput)
	},
	Args:    cobra.RangeArgs(1, 2),
	Example: "vault-kv-search kv/ foo",
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func VaultKvSearch added in v0.1.0

func VaultKvSearch(args []string, searchObjects []string, showSecrets bool, useRegex bool, crawlingDelay int, kvVersion int, jsonOutput bool)

VaultKvSearch is the main function

Types

This section is empty.

Jump to

Keyboard shortcuts

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