Documentation ¶
Index ¶
- Constants
- func AddClusterDefinitionFlag(f cmdutil.Factory, cmd *cobra.Command, p *string)
- func AddComponentFlag(f cmdutil.Factory, cmd *cobra.Command, p *string, usage string)
- func AddComponentsFlag(f cmdutil.Factory, cmd *cobra.Command, p *[]string, usage string)
- func BuildFlagsBySchema(cmd *cobra.Command, schema *spec.Schema) error
- func BuildFlagsWithOpenAPISchema(cmd *cobra.Command, args []string, ...) error
- func CompletedInstanceFlag(cmd *cobra.Command, f cmdutil.Factory, flag string) error
- func CompletedInstanceTemplatesFlag(cmd *cobra.Command, f cmdutil.Factory, flag string) error
- func FlagsToValues(fs *pflag.FlagSet, explicit bool) map[string]pflag.Value
- type TmpFlagSet
Constants ¶
View Source
const ( CobraInt = "int" CobraSting = "string" CobraBool = "bool" CobraFloat64 = "float64" CobraStringArray = "stringArray" CobraIntSlice = "intSlice" CobraFloat64Slice = "float64Slice" CobraBoolSlice = "boolSlice" )
Variables ¶
This section is empty.
Functions ¶
func AddClusterDefinitionFlag ¶
AddClusterDefinitionFlag adds a flag "cluster-definition" for the cmd and stores the value of the flag in string p
func AddComponentFlag ¶
AddComponentFlag add flag "component" for cobra.Command and support auto complete for it
func AddComponentsFlag ¶
AddComponentsFlag add flag "components" for cobra.Command and support auto complete for it
func BuildFlagsBySchema ¶
BuildFlagsBySchema builds a flag.FlagSet by the given schema, convert the schema key to flag name, and convert the schema type to flag type.
func BuildFlagsWithOpenAPISchema ¶ added in v0.7.2
func BuildFlagsWithOpenAPISchema(cmd *cobra.Command, args []string, getOpenAPISchema func() (*apiextensionsv1.JSONSchemaProps, error)) error
BuildFlagsWithOpenAPISchema builds the flag from openAPIV3Schema properties.
func CompletedInstanceFlag ¶
Types ¶
type TmpFlagSet ¶ added in v0.7.2
TmpFlagSet create a tmpFlagSet to handle your custom flags and args.
func NewTmpFlagSet ¶ added in v0.7.2
func NewTmpFlagSet() *TmpFlagSet
Click to show internal directories.
Click to hide internal directories.