templates

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactArgs

func ExactArgs(nameOfCommand string, n int) cobra.PositionalArgs

ExactArgs validate the number of input parameters

func MainUsageTemplate

func MainUsageTemplate() string

MainUsageTemplate returns the usage template for the root command

func OptionsUsageTemplate

func OptionsUsageTemplate() string

OptionsUsageTemplate returns a template which prints all global available commands

func ParseSCPArguments

func ParseSCPArguments(arg1 string, arg2 string) (local LocalSCPArgument, remote RemoteSCPArgument, toRemote bool, err error)

func ParseSSHTarget

func ParseSSHTarget(arg string) (namespace, name, username string, err error)

ParseSSHTarget argument supporting the form of username@name.namespace

func ParseTarget

func ParseTarget(arg string) (namespace, name string, err error)

ParseTarget argument supporting the form of name.namespace

func PrintWarningForPausedVM

func PrintWarningForPausedVM(virtCli kubeclient.Client, vmName, namespace string)

PrintWarningForPausedVM prints warning message if VM is paused

func UsageTemplate

func UsageTemplate() string

UsageTemplate returns the usage template for all subcommands

Types

type LocalSCPArgument

type LocalSCPArgument struct {
	Path string
}

type RemoteSCPArgument

type RemoteSCPArgument struct {
	Namespace string
	Name      string
	Username  string
	Path      string
}

Jump to

Keyboard shortcuts

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