command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFactory

func DownloadFactory() func() (cmd cli.Command, err error)

DownloadFactory returns a factory method for the join command

func ErrorCauser

func ErrorCauser(err error) error

func HandleClientError

func HandleClientError(err error, verbose bool) error

HandleClientError handles errors produced by client.NerdAPIClient

func HandleError

func HandleError(err error, verbose bool) error

HandleError handles the way errors are presented to the user.

func LoginFactory

func LoginFactory() func() (cmd cli.Command, err error)

LoginFactory returns a factory method for the join command

func LogsFactory

func LogsFactory() func() (cmd cli.Command, err error)

LogsFactory returns a factory method for the join command

func NewClient

func NewClient(ui cli.Ui) (*client.NerdAPIClient, error)

NewClient creates a new NerdAPIClient with two credential providers.

func RunFactory

func RunFactory() func() (cmd cli.Command, err error)

RunFactory returns a factory method for the join command

func StatusFactory

func StatusFactory() func() (cmd cli.Command, err error)

StatusFactory returns a factory method for the join command

func UploadFactory

func UploadFactory() func() (cmd cli.Command, err error)

UploadFactory returns a factory method for the join command

func WorkFactory

func WorkFactory() func() (cmd cli.Command, err error)

WorkFactory returns a factory method for the join command

Types

type AuthAPIOpts

type AuthAPIOpts struct {
}

type ConfOpts

type ConfOpts struct {
	ConfigFile string `long:"config" default:"" default-mask:"" env:"CONFIG" description:"location of config file"`
}

type Download

type Download struct {
	// contains filtered or unexported fields
}

Download command

func (*Download) DoRun

func (cmd *Download) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (Download) Help

func (c Download) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Download) Run

func (c Download) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Download) Synopsis

func (c Download) Synopsis() string

Short explanation of the command as passed in the struction initialization

type DownloadOpts

type DownloadOpts struct {
	NerdOpts
}

DownloadOpts describes command options

type Login

type Login struct {
	// contains filtered or unexported fields
}

Login command

func (*Login) DoRun

func (cmd *Login) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (Login) Help

func (c Login) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Login) Run

func (c Login) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Login) Synopsis

func (c Login) Synopsis() string

Short explanation of the command as passed in the struction initialization

type LoginOpts

type LoginOpts struct {
	*NerdAPIOpts
	*OutputOpts
}

LoginOpts describes command options

type Logs

type Logs struct {
	// contains filtered or unexported fields
}

Logs command

func (*Logs) DoRun

func (cmd *Logs) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (Logs) Help

func (c Logs) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Logs) Run

func (c Logs) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Logs) Synopsis

func (c Logs) Synopsis() string

Short explanation of the command as passed in the struction initialization

type LogsOpts

type LogsOpts struct {
	*NerdAPIOpts
	*OutputOpts
}

LogsOpts describes command options

type NerdAPIOpts

type NerdAPIOpts struct {
}

NerdAPIOpts configure how the platform endpoint is reached TODO: Change to one flag for URL

type NerdOpts

type NerdOpts struct {
	NerdAPIOpts
	AuthAPIOpts
	OutputOpts
	ConfOpts
}

type OutputOpts

type OutputOpts struct {
	VerboseOutput bool `short:"v" long:"verbose" default-mask:"false" description:"show verbose output"`
}

type Run

type Run struct {
	// contains filtered or unexported fields
}

Run command

func (*Run) DoRun

func (cmd *Run) DoRun(args []string) error

DoRun is called by run and allows an error to be returned

func (Run) Help

func (c Run) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Run) Run

func (c Run) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Run) Synopsis

func (c Run) Synopsis() string

Short explanation of the command as passed in the struction initialization

type RunOpts

type RunOpts struct {
	*NerdOpts

	Environment []string `short:"e" description:"container environment variables"`
}

RunOpts describes command options

type Status

type Status struct {
	// contains filtered or unexported fields
}

Status command

func (*Status) DoRun

func (cmd *Status) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (Status) Help

func (c Status) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Status) Run

func (c Status) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Status) Synopsis

func (c Status) Synopsis() string

Short explanation of the command as passed in the struction initialization

type StatusOpts

type StatusOpts struct {
	NerdOpts
}

StatusOpts describes command options

type TaskStatus

type TaskStatus struct {
	// contains filtered or unexported fields
}

TaskStatus describes the container status of a task

type Upload

type Upload struct {
	// contains filtered or unexported fields
}

Upload command

func (*Upload) DoRun

func (cmd *Upload) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (Upload) Help

func (c Upload) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Upload) Run

func (c Upload) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Upload) Synopsis

func (c Upload) Synopsis() string

Short explanation of the command as passed in the struction initialization

type UploadOpts

type UploadOpts struct {
	*NerdOpts
}

UploadOpts describes command options

type Work

type Work struct {
	// contains filtered or unexported fields
}

Work command

func (*Work) DoRun

func (cmd *Work) DoRun(args []string) (err error)

DoRun is called by run and allows an error to be returned

func (Work) Help

func (c Work) Help() string

Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.

func (Work) Run

func (c Work) Run(args []string) int

Run wraps a signature that allows returning an error type and parses the arguments for the flags package. If flag parsing fails it sets the exit code to 127, if the command implementation returns a non-nil error the exit code is 1

func (Work) Synopsis

func (c Work) Synopsis() string

Short explanation of the command as passed in the struction initialization

type WorkOpts

type WorkOpts struct {
	NerdOpts
}

WorkOpts describes command options

Jump to

Keyboard shortcuts

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