completion

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudProjects

func CloudProjects(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)

func CloudResourceWithChild

func CloudResourceWithChild(parentTemplate, childTemplate string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)

CloudResourceWithChild returns a completion function for a command taking two positional arguments: a parent resource id then one of its sub-resource ids. It completes the first argument from parentTemplate (one %s: project id) and the second from childTemplate (two %s: project id and the parent id given as the first argument). The project id is read from the --cloud-project flag.

func CloudResources

func CloudResources(pathTemplate string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)

CloudResources returns a completion function for a positional argument that is the identifier of a project-scoped cloud resource. pathTemplate must contain a single %s placeholder for the project ID (e.g. "/v1/cloud/project/%s/instance"). The project ID is read from the --cloud-project flag; without it, no suggestion is returned.

func ServiceList

func ServiceList(endpoint string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)

ServiceList returns a completion function suggesting the identifiers listed at the given API endpoint (e.g. "/v1/vps"). It is meant for positional arguments that expect a service/resource identifier.

Types

This section is empty.

Jump to

Keyboard shortcuts

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