namedargs

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(provider resolver.ResolutionProvider, exec commands.Executor, arg string) (string, error)

Resolve initializes given resolution provider and uses it to resolve given argument

func ResolveNetwork

func ResolveNetwork(exec commands.Executor, arg string) (string, error)

ResolveNetwork resolves network UUID from values provided to named args (e.g., --network net-name)

func ResolveServer

func ResolveServer(exec commands.Executor, arg string) (string, error)

ResolveServer resolves server UUID from values provided to named args (e.g., --server server-name)

func ZoneDescription

func ZoneDescription(resource string) string

Returns description for --zone argument, e.g. "Zone where to create the resource...".

Types

type CompleteFunc

type CompleteFunc func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func CompletionFunc

func CompletionFunc(provider completion.Provider, cfg *config.Config) CompleteFunc

CompletionFunc creates a flag completion function from given completion provider and config to be passed to Cobra via Command.RegisterFlagCompletionFunc

Jump to

Keyboard shortcuts

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