cli

package
v0.0.0-...-abe979b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelpWith

func HelpWith(args []string)

func PrintCommandHelp

func PrintCommandHelp(cmd *PreparedCommand)

func PrintInvalidCommand

func PrintInvalidCommand(args []string)

func PrintProgramHelp

func PrintProgramHelp()

func RegisterCommand

func RegisterCommand(path []string, c Command)

func Run

func Run(args []string) int

Types

type Command

type Command interface {
	Run(cl *govmomi.Client, c *config.Config, args []string) error
}

type CommandMap

type CommandMap struct {
	This     Command
	Commands map[string]CommandMap
}

func (*CommandMap) Find

func (cm *CommandMap) Find(args []string, path string) (*PreparedCommand, bool)

func (*CommandMap) Register

func (cm *CommandMap) Register(path []string, c Command)

type HasCommandLine

type HasCommandLine interface {
	CommandLine() string
}

type HasDescription

type HasDescription interface {
	Description() string
}

type HasSummary

type HasSummary interface {
	Summary() string
}

type PreparedCommand

type PreparedCommand struct {
	Source Command
	Name   string
	Run    func(cl *govmomi.Client, co *config.Config) error
}

func FindCommand

func FindCommand(args []string) (*PreparedCommand, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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