cli

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressInput added in v0.4.0

type AddressInput struct {
	User string
	Host string
	Port string
}

AddressInput holds information about a host

func (AddressInput) Address added in v0.4.0

func (h AddressInput) Address() string

Address returns a string representation of AddressInput to be used to perform network connections.

func (*AddressInput) Set added in v0.4.0

func (h *AddressInput) Set(value string) error

Set parses a string representation of AddressInput into its proper attributes.

func (AddressInput) String added in v0.4.0

func (h AddressInput) String() string

String returns a string representation of a AddressInput

type AddressInputList added in v0.4.0

type AddressInputList []AddressInput

func (AddressInputList) List added in v0.4.0

func (il AddressInputList) List() []string

func (*AddressInputList) Set added in v0.4.0

func (il *AddressInputList) Set(value string) error

func (AddressInputList) String added in v0.4.0

func (il AddressInputList) String() string

type App

type App struct {
	Command           string
	Local             AddressInputList
	Remote            AddressInputList
	Server            AddressInput
	Key               string
	Verbose           bool
	Help              bool
	Version           bool
	Alias             string
	Start             string
	AliasDelete       bool
	Detach            bool
	Stop              string
	AliasList         bool
	Insecure          bool
	KeepAliveInterval time.Duration
	Timeout           time.Duration
	ConnectionRetries int
	WaitAndRetry      time.Duration
	// contains filtered or unexported fields
}

App contains all supported CLI arguments given by the user.

func New

func New(args []string) *App

New creates a new instance of App.

func (*App) Parse

func (c *App) Parse() error

Parse grabs arguments and flags from CLI.

func (*App) PrintUsage

func (c *App) PrintUsage()

PrintUsage prints, to the standard output, the informational text on how to use the tool.

func (App) String

func (c App) String() string

String returns a string representation of an App.

func (App) Validate added in v0.3.0

func (c App) Validate() error

Validate checks parsed params.

Jump to

Keyboard shortcuts

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