Documentation ¶
Overview ¶
Package completion contains the utility functions to autocomplete commands and flags.
Index ¶
- Constants
- type FnType
- func Enumeration(values []string) FnType
- func ForeignClusters(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
Constants ¶
View Source
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 Enumeration ¶
Enumeration returns a function to autocomplete enumeration values.
func ForeignClusters ¶
ForeignClusters returns a function to autocomplete ForeignCluster names.
func Namespaces ¶
Namespaces returns a function to autocomplete namespace names.
func OffloadedNamespaces ¶
OffloadedNamespaces returns a function to autocomplete namespace names (only offloaded ones).
Click to show internal directories.
Click to hide internal directories.