completion

package
v0.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package completion contains the utility functions to autocomplete commands and flags.

Index

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 ClusterIDs added in v0.9.4

func ClusterIDs(ctx context.Context, f *factory.Factory, argsLimit int) FnType

ClusterIDs returns a function to autocomplete ForeignCluster cluster IDs.

func ClusterNames added in v0.9.4

func ClusterNames(ctx context.Context, f *factory.Factory, argsLimit int) FnType

ClusterNames returns a function to autocomplete ForeignCluster cluster names.

func Enumeration

func Enumeration(values []string) FnType

Enumeration returns a function to autocomplete enumeration values.

func ForeignClusters

func ForeignClusters(ctx context.Context, f *factory.Factory, argsLimit int) FnType

ForeignClusters returns a function to autocomplete ForeignCluster names.

func KubeconfigSecretNames added in v0.9.4

func KubeconfigSecretNames(ctx context.Context, f *factory.Factory, argsLimit int) FnType

KubeconfigSecretNames returns a function to autocomplete kubeconfig secret names.

func LabelsSelector added in v0.9.4

func LabelsSelector(ctx context.Context, f *factory.Factory, argsLimit int) FnType

LabelsSelector returns a function to autocomplete selector labels.

func Namespaces

func Namespaces(ctx context.Context, f *factory.Factory, argsLimit int) FnType

Namespaces returns a function to autocomplete namespace names.

func Nodes

func Nodes(ctx context.Context, f *factory.Factory, argsLimit int) FnType

Nodes returns a function to autocomplete node names.

func OffloadedNamespaces

func OffloadedNamespaces(ctx context.Context, f *factory.Factory, argsLimit int) FnType

OffloadedNamespaces returns a function to autocomplete namespace names (only offloaded ones).

func PVCs

func PVCs(ctx context.Context, f *factory.Factory, argsLimit int) FnType

PVCs returns a function to autocomplete PVC names.

func VirtualNodes added in v0.9.4

func VirtualNodes(ctx context.Context, f *factory.Factory, argsLimit int) FnType

VirtualNodes returns a function to autocomplete virtual node names.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL