Documentation ¶
Index ¶
- func ClusterCompletionFunc(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func CompGetContainers(f cmdutil.Factory, podName string, toComplete string) []string
- func CompGetFromTemplate(template *string, f cmdutil.Factory, namespace string, args []string, ...) []string
- func CompGetResource(f cmdutil.Factory, resourceName string, toComplete string) []string
- func ContainerCompletionFunc(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func ContextCompletionFunc(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func ListClustersInConfig(toComplete string) []string
- func ListContextsInConfig(toComplete string) []string
- func ListUsersInConfig(toComplete string) []string
- func PodResourceNameAndContainerCompletionFunc(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func PodResourceNameCompletionFunc(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func ResourceNameCompletionFunc(f cmdutil.Factory, resourceType string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func ResourceTypeAndNameCompletionFunc(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func SetFactoryForCompletion(f cmdutil.Factory)
- func SpecifiedResourceTypeAndNameCompletionFunc(f cmdutil.Factory, allowedTypes []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func SpecifiedResourceTypeAndNameNoRepeatCompletionFunc(f cmdutil.Factory, allowedTypes []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func UserCompletionFunc(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterCompletionFunc ¶
func ClusterCompletionFunc(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
ClusterCompletionFunc is a completion function that completes as a first argument the cluster names that match the toComplete prefix
func CompGetContainers ¶
CompGetContainers gets the list of containers of the specified pod which begin with `toComplete`.
func CompGetFromTemplate ¶
func CompGetFromTemplate(template *string, f cmdutil.Factory, 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 ¶
CompGetResource gets the list of the resource specified which begin with `toComplete`.
func ContainerCompletionFunc ¶
func ContainerCompletionFunc(f cmdutil.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 ContextCompletionFunc ¶
func ContextCompletionFunc(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
ContextCompletionFunc is a completion function that completes as a first argument the context names that match the toComplete prefix
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 ListUsersInConfig ¶
ListUsersInConfig returns a list of user names which begin with `toComplete`
func PodResourceNameAndContainerCompletionFunc ¶
func PodResourceNameAndContainerCompletionFunc(f cmdutil.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 cmdutil.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 ResourceNameCompletionFunc ¶
func ResourceNameCompletionFunc(f cmdutil.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 cmdutil.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 cmdutil.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.
func SpecifiedResourceTypeAndNameNoRepeatCompletionFunc ¶
func SpecifiedResourceTypeAndNameNoRepeatCompletionFunc(f cmdutil.Factory, allowedTypes []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
SpecifiedResourceTypeAndNameNoRepeatCompletionFunc Returns a completion function that completes resource types limited to the specified allowedTypes, and resource names that match the toComplete prefix. It only allows for one resource. It supports the <type>/<name> form.
func UserCompletionFunc ¶
func UserCompletionFunc(_ *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
UserCompletionFunc is a completion function that completes as a first argument the user names that match the toComplete prefix
Types ¶
This section is empty.