completion

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 9 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 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 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.

Jump to

Keyboard shortcuts

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