v2actions

package
v6.22.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v2actions contains the business logic for the commands/v2 package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct{}

func NewActor

func NewActor() Actor

func (Actor) CommandInfoByName

func (_ Actor) CommandInfoByName(commandList interface{}, commandName string) (CommandInfo, error)

CommandInfoByName returns the help information for a particular commandName in the commandList.

func (Actor) CommandInfos

func (_ Actor) CommandInfos(commandList interface{}) map[string]CommandInfo

CommandInfos returns a slice of CommandInfo that only fills in the Name and Description for all the commands in commandList

type CommandFlag

type CommandFlag struct {
	// Short is the short form of the flag
	Short string

	// Long is the long form of the flag
	Long string

	// Description is the description of the flag
	Description string
}

CommandFlag contains the help details of a command's flag

type CommandInfo

type CommandInfo struct {
	// Name is the command name
	Name string

	// Description is the command description
	Description string

	// Alias is the command alias
	Alias string

	// Usage is the command usage string, may contain examples and flavor text
	Usage string

	// RelatedCommands is a list of commands related to the command
	RelatedCommands []string

	// Flags contains the list of flags for this command
	Flags []CommandFlag

	// Environment is a list of environment variables specific for this command
	Environment []EnvironmentVariable
}

CommandInfo contains the help details of a command

type EnvironmentVariable

type EnvironmentVariable struct {
	Name         string
	Description  string
	DefaultValue string
}

Environment contains env vars specific for this command

type ErrorInvalidCommand

type ErrorInvalidCommand struct {
	CommandName string
}

func (ErrorInvalidCommand) Error

func (err ErrorInvalidCommand) Error() string

Jump to

Keyboard shortcuts

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