Documentation ¶
Index ¶
- func CompGetContainers(f util.Factory, cmd *cobra.Command, podName string, toComplete string) []string
- func CompGetFromTemplate(template *string, f util.Factory, cmd *cobra.Command, namespace string, ...) []string
- func CompGetResource(f util.Factory, cmd *cobra.Command, resourceName string, toComplete string) []string
- func ContainerCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func ListClustersInConfig(toComplete string) []string
- func ListContextsInConfig(toComplete string) []string
- func PodResourceNameAndContainerCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func PodResourceNameCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func RegisterCompletionFuncForClusterFlag(cmd *cobra.Command)
- func RegisterCompletionFuncForClustersFlag(cmd *cobra.Command)
- func RegisterCompletionFuncForKarmadaContextFlag(cmd *cobra.Command)
- func RegisterCompletionFuncForNamespaceFlag(cmd *cobra.Command, f util.Factory)
- func RegisterCompletionFuncForOperationScopeFlag(cmd *cobra.Command, supportScope ...options.OperationScope)
- func ResourceNameCompletionFunc(f util.Factory, resourceType string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func ResourceTypeAndNameCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func SetFactoryForCompletion(f util.Factory)
- func SpecifiedResourceTypeAndNameCompletionFunc(f util.Factory, allowedTypes []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompGetContainers ¶
func CompGetContainers(f util.Factory, cmd *cobra.Command, podName string, toComplete string) []string
CompGetContainers gets the list of containers of the specified pod which begin with `toComplete`.
func CompGetFromTemplate ¶
func CompGetFromTemplate(template *string, f util.Factory, cmd *cobra.Command, namespace string, args []string, toComplete string) []string
CompGetFromTemplate executes a Get operation using the specified template and args and returns the results which begin with `toComplete`.
func CompGetResource ¶
func CompGetResource(f util.Factory, cmd *cobra.Command, resourceName string, toComplete string) []string
CompGetResource gets the list of the resource specified which begin with `toComplete`.
func ContainerCompletionFunc ¶
func ContainerCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
ContainerCompletionFunc Returns a completion function that completes the containers within the pod specified by the first argument. The resource containing the pod can be specified in the <type>/<name> form.
func ListClustersInConfig ¶
ListClustersInConfig returns a list of cluster names which begin with `toComplete`
func ListContextsInConfig ¶
ListContextsInConfig returns a list of context names which begin with `toComplete`
func PodResourceNameAndContainerCompletionFunc ¶
func PodResourceNameAndContainerCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
PodResourceNameAndContainerCompletionFunc Returns a completion function that completes, as a first argument: 1- pod names that match the toComplete prefix 2- resource types containing pods which match the toComplete prefix and as a second argument the containers within the specified pod.
func PodResourceNameCompletionFunc ¶
func PodResourceNameCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
PodResourceNameCompletionFunc Returns a completion function that completes: 1- pod names that match the toComplete prefix 2- resource types containing pods which match the toComplete prefix
func RegisterCompletionFuncForClusterFlag ¶
RegisterCompletionFuncForClusterFlag registers CompletionFunc for flag cluster.
func RegisterCompletionFuncForClustersFlag ¶
RegisterCompletionFuncForClustersFlag registers CompletionFunc for flag clusters.
func RegisterCompletionFuncForKarmadaContextFlag ¶
RegisterCompletionFuncForKarmadaContextFlag registers CompletionFunc for flag karmada-context.
func RegisterCompletionFuncForNamespaceFlag ¶
RegisterCompletionFuncForNamespaceFlag registers CompletionFunc for flag namespace.
func RegisterCompletionFuncForOperationScopeFlag ¶
func RegisterCompletionFuncForOperationScopeFlag(cmd *cobra.Command, supportScope ...options.OperationScope)
RegisterCompletionFuncForOperationScopeFlag registers CompletionFunc for flag operation-scope.
func ResourceNameCompletionFunc ¶
func ResourceNameCompletionFunc(f util.Factory, resourceType string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
ResourceNameCompletionFunc Returns a completion function that completes as a first argument the resource names specified by the resourceType parameter, and which match the toComplete prefix. This function does NOT support the <type>/<name> form: it is meant to be used by commands that don't support that form. For commands that apply to pods and that support the <type>/<name> form, please use PodResourceNameCompletionFunc()
func ResourceTypeAndNameCompletionFunc ¶
func ResourceTypeAndNameCompletionFunc(f util.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
ResourceTypeAndNameCompletionFunc Returns a completion function that completes resource types and resource names that match the toComplete prefix. It supports the <type>/<name> form.
func SetFactoryForCompletion ¶
SetFactoryForCompletion Store the factory which is needed by the completion functions. Not all commands have access to the factory, so cannot pass it to the completion functions.
func SpecifiedResourceTypeAndNameCompletionFunc ¶
func SpecifiedResourceTypeAndNameCompletionFunc(f util.Factory, allowedTypes []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
SpecifiedResourceTypeAndNameCompletionFunc Returns a completion function that completes resource types limited to the specified allowedTypes, and resource names that match the toComplete prefix. It allows for multiple resources. It supports the <type>/<name> form.
Types ¶
This section is empty.