Documentation ¶
Index ¶
- func NewClientConfig(config SSHConfig) (*ssh.ClientConfig, error)
- func NewKey(key string) (ssh.Signer, error)
- func NewKeyFile(key string) (string, error)
- func NewPublicKeyMethod(key string) (ssh.AuthMethod, error)
- func NewRemoteWriter(host string, w io.Writer) io.Writer
- type Build
- type Default
- type Deploy
- type Env
- type Git
- func (g Git) Branch(name string) ([]byte, error)
- func (g Git) Checkout(name string) ([]byte, error)
- func (g Git) Commit(message string) ([]byte, error)
- func (g Git) Exists() error
- func (g Git) Push(branch string) ([]byte, error)
- func (g Git) RevParse() ([]byte, error)
- func (g Git) UpdateSubmodules() ([]byte, error)
- type Hapfile
- type Host
- type Include
- type Remote
- type RemoteWriter
- type SSHConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientConfig ¶
func NewClientConfig(config SSHConfig) (*ssh.ClientConfig, error)
NewClientConfig constructs a new *ssh.ClientConfig
func NewKeyFile ¶
NewKeyFile takes a key and returns the key file
func NewPublicKeyMethod ¶
func NewPublicKeyMethod(key string) (ssh.AuthMethod, error)
NewPublicKeyMethod creates a new auth method for public keys
Types ¶
type Git ¶
Git struct
func (Git) UpdateSubmodules ¶
UpdateSubmodules updates and initializes submodules
type Hapfile ¶
type Hapfile struct { Default Default Deploys map[string]*Deploy `gcfg:"deploy"` Hosts map[string]*Host `gcfg:"host"` Builds map[string]*Build `gcfg:"build"` Include Include `gcfg:"include"` Env Env `gcfg:"env"` // contains filtered or unexported fields }
Hapfile defines the hosts, builds, and default
func NewHapfile ¶
NewHapfile constructs a new hapfile config
func (Hapfile) DeployHost ¶
DeployHost takes a name and returns the host If the name is empty and default addr exists return default. If no default is set it returns a random host.
func (Hapfile) GetDeployHosts ¶
GetDeployHosts finds a list of hosts matching name string
type Host ¶
type Host struct { Name string Dir string Addr string Username string Identity string Password string Env []string Build []string Cmd []string // contains filtered or unexported fields }
Host describes a remote machine
func (*Host) SetDefaults ¶
SetDefaults fills in missing host specific configs with defaults
type Remote ¶
Remote defines the remote machine to provision
func (*Remote) Build ¶
Build executes the builds and cmds First execute builds specified in Hapfile Then execute any cmds specified in Hapfile
func (*Remote) Initialize ¶
Initialize sets up a git repo on the remote machine
func (*Remote) PushSubmodules ¶
PushSubmodules runs Push() to put submodules into the proper location on the remote machine
type RemoteWriter ¶
type RemoteWriter struct {
// contains filtered or unexported fields
}
RemoteWriter is a Writer with host and io.Writer