command_registry

package
v6.12.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2015 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = NewRegistry()

Functions

func NewRegistry

func NewRegistry() *registry

func Register

func Register(cmd Command)

Types

type Command

type Command interface {
	MetaData() CommandMetadata
	SetDependency(deps Dependency, pluginCall bool) Command
	Requirements(requirementsFactory requirements.Factory, context flags.FlagContext) (reqs []requirements.Requirement, err error)
	Execute(context flags.FlagContext)
}

type CommandMetadata

type CommandMetadata struct {
	Name            string
	ShortName       string
	Usage           string
	Description     string
	Flags           map[string]flags.FlagSet
	SkipFlagParsing bool
	TotalArgs       int //Optional: number of required arguments to skip for flag verification
}

type Dependency

type Dependency struct {
	Ui             terminal.UI
	Config         core_config.Repository
	RepoLocator    api.RepositoryLocator
	Detector       detection.Detector
	PluginConfig   plugin_config.PluginConfiguration
	ManifestRepo   manifest.ManifestRepository
	AppManifest    manifest.AppManifest
	Gateways       map[string]net.Gateway
	TeePrinter     *terminal.TeePrinter
	PluginModels   *pluginModels
	ServiceBuilder service_builder.ServiceBuilder
}

func NewDependency

func NewDependency() Dependency

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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