cli

package
v0.0.0-...-3cbeb6e Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = make(commands)

List of registered commands

Functions

This section is empty.

Types

type ArbitraryCmd

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

ArbitraryCmd is an arbitrary command

func (*ArbitraryCmd) Help

func (cmd *ArbitraryCmd) Help() string

Help returns help on hap c <command>"

func (*ArbitraryCmd) IsRemote

func (cmd *ArbitraryCmd) IsRemote() bool

IsRemote returns whether this command expects a remote

func (*ArbitraryCmd) Run

func (cmd *ArbitraryCmd) Run(remote *hap.Remote) (string, error)

Run takes a remote and runs an arbitrary command on it

type BuildCmd

type BuildCmd struct{}

BuildCmd is the build command

func (*BuildCmd) Help

func (cmd *BuildCmd) Help() string

Help returns help for the build command

func (*BuildCmd) IsRemote

func (cmd *BuildCmd) IsRemote() bool

IsRemote returns whether this command expects a remote

func (*BuildCmd) Run

func (cmd *BuildCmd) Run(remote *hap.Remote) (string, error)

Run the build command on the remote host

type Command

type Command interface {
	IsRemote() bool
	Help() string
	Run(*hap.Remote) (string, error)
}

Command interface

type CreateCmd

type CreateCmd struct{}

CreateCmd inits the command for setting up remote repo

func (*CreateCmd) Help

func (cmd *CreateCmd) Help() string

Help returns the help on hap create <name>

func (*CreateCmd) IsRemote

func (cmd *CreateCmd) IsRemote() bool

IsRemote returns whether the command expects a remote or not

func (*CreateCmd) Run

func (cmd *CreateCmd) Run(remote *hap.Remote) (string, error)

Run the command against the remote

type DeployCmd

type DeployCmd struct{}

DeployCmd is the build command

func (*DeployCmd) Help

func (cmd *DeployCmd) Help() string

Help returns help for the build command

func (*DeployCmd) IsRemote

func (cmd *DeployCmd) IsRemote() bool

IsRemote returns whether this command expects a remote

func (*DeployCmd) Run

func (cmd *DeployCmd) Run(remote *hap.Remote) (string, error)

Run the build command on the remote host

type ExecCmd

type ExecCmd struct{}

ExecCmd is the command

func (*ExecCmd) Help

func (cmd *ExecCmd) Help() string

Help returns help on hap exec <script>

func (*ExecCmd) IsRemote

func (cmd *ExecCmd) IsRemote() bool

IsRemote returns whether the command expects a remote or not

func (*ExecCmd) Run

func (cmd *ExecCmd) Run(remote *hap.Remote) (string, error)

Run takes a remote and executes a script from the repo on it

type PushCmd

type PushCmd struct{}

PushCmd is the push command

func (*PushCmd) Help

func (cmd *PushCmd) Help() string

Help returns help on the hap push command

func (*PushCmd) IsRemote

func (cmd *PushCmd) IsRemote() bool

IsRemote returns whether the command expects a remote

func (*PushCmd) Run

func (cmd *PushCmd) Run(remote *hap.Remote) (string, error)

Run takes a remote and pushes to it

Jump to

Keyboard shortcuts

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