Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection models an SSH connection
func Connect ¶
func Connect(sshContext Context, address string) Connection
Connect connects to a machine via SSH.
func (*Connection) RunInstallScript ¶
func (c *Connection) RunInstallScript()
RunInstallScript sends the install script to the VM and runs it there.
func (*Connection) SetupUsers ¶
func (c *Connection) SetupUsers()
SetupUsers sets up the users and groups on Flamenco Manager.
func (*Connection) UploadAsFile ¶
func (c *Connection) UploadAsFile(content []byte, filename string)
UploadAsFile sends bytes to the SSH server and stores them in a file. WARNING: the given filename must be a simple name, no spaces, no directory, no need for shell escaping.
func (*Connection) UploadLocalFile ¶
func (c *Connection) UploadLocalFile(filename string)
UploadLocalFile reads a local file and sends it to the server via SSH. WARNING: the given filename must be a simple name, no spaces, no directory, no need for shell escaping.
func (*Connection) UploadStaticFile ¶
func (c *Connection) UploadStaticFile(filename string)
UploadStaticFile reads a local file from 'files-static' and sends it to the server via SSH. WARNING: the given filename must be a simple name, no spaces, no directory, no need for shell escaping.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context provides everything necessary to connect via SSH.
func LoadSSHContext ¶
func LoadSSHContext() Context
LoadSSHContext tries to find a private key to load.