cli

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandCategoryMap = map[string]map[string]*schema.Category{}

CommandCategoryMap are added by tools/gen-cli-commands

ex. CommandCategoryMap["server"]["create"] -> *schema.Category

View Source
var CommandLevelHelpTemplate = `` /* 527-byte string literal not displayed */

CommandLevelHelpTemplate is using with `usacloud [resource] command --help`

View Source
var Commands []*cli.Command

Commands are added by tools/gen-cli-commands

View Source
var FlagCategoryMap = map[string]map[string]map[string]*schema.Category{}

FlagCategoryMap are added by tools/gen-cli-commands

ex. FlagCategoryMap["server"]["build"]["list"] -> *schema.Category

View Source
var ResourceCategoryMap = map[string]*schema.Category{}

ResourceCategoryMap are added by tools/gen-cli-commands

ex. ResourceCategoryMap["server"] -> *schema.Category

View Source
var ResourceLevelHelpTemplate = `` /* 457-byte string literal not displayed */

ResourceLevelHelpTemplate is using with `usacloud [resource] --help`

View Source
var TopLevelHelpTemplate = `` /* 958-byte string literal not displayed */

Functions

func AppendCommandCategoryMap

func AppendCommandCategoryMap(r string, c string, category *schema.Category)

func AppendFlagCategoryMap

func AppendFlagCategoryMap(r string, c string, f string, category *schema.Category)

func AppendResourceCategoryMap

func AppendResourceCategoryMap(r string, category *schema.Category)

Types

type CategoryHelpValue

type CategoryHelpValue struct {
	Name         string
	DisplayText  string
	VisibleFlags []cli.Flag
}

func (*CategoryHelpValue) AppendFlags

func (c *CategoryHelpValue) AppendFlags(f cli.Flag)

type FlagHandler added in v0.1.0

type FlagHandler interface {
	IsSet(name string) bool
	Set(name, value string) error
	String(name string) string
	StringSlice(name string) []string
}

type ResourceHelpValue

type ResourceHelpValue struct {
	Name            string
	DisplayText     string
	VisibleCommands []*cli.Command
}

func (*ResourceHelpValue) AppendCommand

func (r *ResourceHelpValue) AppendCommand(c *cli.Command)

type SortableCommand

type SortableCommand struct {
	Category *schema.Category
}

type SortableResource

type SortableResource struct {
	Category *schema.Category
	Command  *cli.Command
}

type SortableResources

type SortableResources []SortableResource

func (SortableResources) Len

func (s SortableResources) Len() int

func (SortableResources) Less

func (s SortableResources) Less(i, j int) bool

func (SortableResources) Swap

func (s SortableResources) Swap(i, j int)

Jump to

Keyboard shortcuts

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