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 Configurations(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 GatewayClients(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func GatewayServers(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func Gateways(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func KubeconfigSecretNames(ctx context.Context, f *factory.Factory, argsLimit int, namespace string, ...) 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 PublicKeys(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func ResourceSliceNames(ctx context.Context, f *factory.Factory, argsLimit int, namespace string) FnType
- func ResourceSlices(ctx context.Context, f *factory.Factory, argsLimit int) FnType
- func Tenants(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 Configurations ¶
Configurations returns a function to autocomplete Configurations names.
func Enumeration ¶
Enumeration returns a function to autocomplete enumeration values.
func ForeignClusters ¶
ForeignClusters returns a function to autocomplete ForeignCluster names.
func GatewayClients ¶
GatewayClients returns a function to autocomplete GatewayClients names.
func GatewayServers ¶
GatewayServers returns a function to autocomplete GatewayServers names.
func KubeconfigSecretNames ¶ added in v0.9.4
func KubeconfigSecretNames(ctx context.Context, f *factory.Factory, argsLimit int, namespace string, identityType authv1beta1.IdentityType) FnType
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).
func PublicKeys ¶
PublicKeys returns a function to autocomplete PublicKeys names.
func ResourceSliceNames ¶
func ResourceSliceNames(ctx context.Context, f *factory.Factory, argsLimit int, namespace string) FnType
ResourceSliceNames returns a function to autocomplete ResourceSlice names.
func ResourceSlices ¶
ResourceSlices returns a function to autocomplete ResourceSlice names.