Documentation ¶
Index ¶
- Variables
- func AddBoolFlags(cmd *cobra.Command, flags []types.BoolFlag)
- func AddIntFlags(cmd *cobra.Command, flags []types.IntFlag)
- func AddOptionFlags[T any](cmd *cobra.Command, flags []types.OptionFlag[T])
- func AddStringFlags(cmd *cobra.Command, flags []types.StringFlag)
- func CheckIfHasValaccounts(_ *cobra.Command, _ []string) error
- func CheckIfInitialized(_ *cobra.Command, _ []string) error
- func CombineFuncs(funcs ...cobra.PositionalArgs) cobra.PositionalArgs
- func GetAccAddressFromMnemonic(mnemonic string) (sdk.AccAddress, error)
- func GetBoolFromPromptOrFlag(cmd *cobra.Command, flag types.BoolFlag) (bool, error)
- func GetIntFromPromptOrFlag(cmd *cobra.Command, flag types.IntFlag) (int64, error)
- func GetOptionFromPrompt[T any](flag types.OptionFlag[T]) (types.Option[T], error)
- func GetOptionFromPromptOrFlag[T any](cmd *cobra.Command, flag types.OptionFlag[T]) (types.Option[T], error)
- func GetStringFromPromptOrFlag(cmd *cobra.Command, flag types.StringFlag) (string, error)
- func IsInteractive(cmd *cobra.Command) bool
- func PrintlnItalic(text string)
- func PromptCmd(options []types.CmdConfig) (*types.CmdConfig, error)
- func SetupInteractiveMode(cmd *cobra.Command, _ []string) error
- func ValidateInt(input string) error
- func ValidateIntGreaterZero(input string) error
- func ValidateIntOrEmpty(input string) error
- func ValidateKyveAddress(input string) error
- func ValidateNotEmpty(input string) error
- func ValidatePathExists(input string) error
- func ValidatePathExistsOrEmpty(input string) error
- func ValidatePort(input string) error
Constants ¶
This section is empty.
Variables ¶
var NoBellStdout = &noBellStdout{}
Functions ¶
func AddBoolFlags ¶
AddBoolFlags adds the given bool flags to the given command. If a flag is required it will be marked as required.
func AddIntFlags ¶
AddIntFlags adds the given int flags to the given command. If a flag is required it will be marked as required.
func AddOptionFlags ¶
func AddOptionFlags[T any](cmd *cobra.Command, flags []types.OptionFlag[T])
AddOptionFlags adds the given option flags to the given command. If a flag is required it will be marked as required.
func AddStringFlags ¶
func AddStringFlags(cmd *cobra.Command, flags []types.StringFlag)
AddStringFlags adds the given string flags to the given command. If a flag is required it will be marked as required.
func CombineFuncs ¶
func CombineFuncs(funcs ...cobra.PositionalArgs) cobra.PositionalArgs
func GetAccAddressFromMnemonic ¶
func GetAccAddressFromMnemonic(mnemonic string) (sdk.AccAddress, error)
func GetBoolFromPromptOrFlag ¶
GetBoolFromPromptOrFlag returns the bool value from 1. the given flag 2. prompts the user for the value if the flag was not set
func GetIntFromPromptOrFlag ¶
GetIntFromPromptOrFlag returns the int value from 1. the given flag 2. prompts the user for the value if the flag was not set
func GetOptionFromPrompt ¶
GetOptionFromPrompt returns the option value from a select prompt
func GetOptionFromPromptOrFlag ¶
func GetOptionFromPromptOrFlag[T any](cmd *cobra.Command, flag types.OptionFlag[T]) (types.Option[T], error)
GetOptionFromPromptOrFlag returns the option value from 1. the given flag 2. prompts the user for the value if the flag was not set
func GetStringFromPromptOrFlag ¶
GetStringFromPromptOrFlag returns the string value from 1. the given flag 2. prompts the user for the value if the flag was not set
func IsInteractive ¶
IsInteractive returns true if the non-interactive flag was not set.
func PrintlnItalic ¶
func PrintlnItalic(text string)
func SetupInteractiveMode ¶
SetupInteractiveMode sets up the interactive mode for the given command. This means that all flags are not required anymore.
func ValidateInt ¶
func ValidateIntGreaterZero ¶
func ValidateIntOrEmpty ¶
func ValidateKyveAddress ¶
func ValidateNotEmpty ¶
func ValidatePathExists ¶
func ValidatePort ¶
Types ¶
This section is empty.