Documentation ¶
Overview ¶
Package completion contains the utility functions to autocomplete commands and flags.
Index ¶
- Constants
- type FnType
- func ClusterIDs(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func ClusterNames(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func Enumeration(values []string) FnType
- func ForeignClusters(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func KubeconfigSecretNames(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func LabelsSelector(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func Namespaces(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func Nodes(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func OffloadedNamespaces(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func PVCs(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func VirtualNodes(ctx context.Context, f *factory.Factory, argsLimit int) FnType
Constants ¶
const NoLimit = -1
NoLimit is a constant to specify that autocompletion is not limited depending on the number of arguments.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FnType ¶
type FnType func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
FnType represents the type of a cobra autocompletion function.
func ClusterIDs ¶ added in v0.9.4
ClusterIDs returns a function to autocomplete ForeignCluster cluster IDs.
func ClusterNames ¶ added in v0.9.4
ClusterNames returns a function to autocomplete ForeignCluster cluster names.
func Enumeration ¶
Enumeration returns a function to autocomplete enumeration values.
func ForeignClusters ¶
ForeignClusters returns a function to autocomplete ForeignCluster names.
func KubeconfigSecretNames ¶ added in v0.9.4
KubeconfigSecretNames returns a function to autocomplete kubeconfig secret names.
func LabelsSelector ¶ added in v0.9.4
LabelsSelector returns a function to autocomplete selector labels.
func Namespaces ¶
Namespaces returns a function to autocomplete namespace names.
func OffloadedNamespaces ¶
OffloadedNamespaces returns a function to autocomplete namespace names (only offloaded ones).