Documentation
¶
Index ¶
- func EscapeArg(arg string) string
- func EscapeArgs(args []string) []string
- type Config
- type Connector
- func (c *Connector) BuildSCPArgs() []string
- func (c *Connector) BuildSSHArgs() []string
- func (c *Connector) CopyFile(localPath, remotePath string) error
- func (c *Connector) CopyFileFromRemote(remotePath, localPath string) error
- func (c *Connector) ExecuteCommand(command string) (string, error)
- func (c *Connector) ExecuteCommandWithExitCode(command string) (string, int, error)
- func (c *Connector) FileExists(remotePath string) (bool, error)
- func (c *Connector) GetTarget() string
- func (c *Connector) MakeExecutable(remotePath string) error
- func (c *Connector) RemoveFile(remotePath string) error
- func (c *Connector) TestConnection() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeArgs ¶
EscapeArgs escapes multiple arguments for shell execution.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector provides SSH connectivity functionality.
func (*Connector) BuildSCPArgs ¶
BuildSCPArgs builds SCP arguments for file transfer.
func (*Connector) BuildSSHArgs ¶
BuildSSHArgs builds common SSH arguments.
func (*Connector) CopyFileFromRemote ¶
CopyFileFromRemote copies a file from the remote host to local.
func (*Connector) ExecuteCommand ¶
ExecuteCommand executes a command on the remote host.
func (*Connector) ExecuteCommandWithExitCode ¶
ExecuteCommandWithExitCode executes a command and returns output with exit code.
func (*Connector) FileExists ¶
FileExists checks if a file exists on the remote host.
func (*Connector) MakeExecutable ¶
MakeExecutable makes a file executable on the remote host.
func (*Connector) RemoveFile ¶
RemoveFile removes a file on the remote host.
func (*Connector) TestConnection ¶
TestConnection tests the SSH connection.
Click to show internal directories.
Click to hide internal directories.