cmd

package
v1.3.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ResultPrinter is the printer used to print command results and errors.

View Source
var RootCmd = &cobra.Command{
	Use:   "keyvault-cli",
	Short: "KeyVault CLI",
	Long:  `keyvault-cli is a CLI for running KeyVault operations.`,
}

RootCmd represents the base command when called without any sub-commands.

Functions

func AddAccumulateFlag added in v1.3.0

func AddAccumulateFlag(c *cobra.Command)

AddAccumulateFlag adds the accumulate flag to the command

func AddIndexFlag added in v1.3.0

func AddIndexFlag(c *cobra.Command)

AddIndexFlag adds the index flag to the command

func AddNetworkFlag

func AddNetworkFlag(c *cobra.Command)

AddNetworkFlag adds the network flag to the command

func AddResponseTypeFlag added in v1.3.0

func AddResponseTypeFlag(c *cobra.Command)

AddResponseTypeFlag adds the response-type flag to the command

func AddSeedFlag added in v1.3.0

func AddSeedFlag(c *cobra.Command)

AddSeedFlag adds the seed flag to the command

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 GetAccumulateFlagValue added in v1.3.0

func GetAccumulateFlagValue(c *cobra.Command) (bool, error)

GetAccumulateFlagValue gets the accumulate flag from the command

func GetIndexFlagValue added in v1.3.0

func GetIndexFlagValue(c *cobra.Command) (int, error)

GetIndexFlagValue gets the index flag from the command

func GetNetworkFlagValue

func GetNetworkFlagValue(c *cobra.Command) (core.Network, error)

GetNetworkFlagValue gets the network flag from the command

func GetSeedFlagValue added in v1.3.0

func GetSeedFlagValue(c *cobra.Command) (string, error)

GetSeedFlagValue gets the seed flag from the command

Types

type ResponseType added in v1.3.0

type ResponseType string

ResponseType represents the network.

const (
	// StorageResponseType represents the storage response type.
	StorageResponseType ResponseType = "storage"

	// ObjectResponseType represents the storage response type.
	ObjectResponseType ResponseType = "object"
)

Available response types.

func GetResponseTypeFlagValue added in v1.3.0

func GetResponseTypeFlagValue(c *cobra.Command) (ResponseType, error)

GetResponseTypeFlagValue gets the response-type flag from the command

func ResponseTypeFromString added in v1.3.0

func ResponseTypeFromString(n string) ResponseType

ResponseTypeFromString returns response type from the given string value

Jump to

Keyboard shortcuts

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