Documentation
¶
Index ¶
- type Remote
- func (r *Remote) Close() error
- func (r *Remote) DownloadDirectory(remoteDir, localDir string) error
- func (r *Remote) DownloadFile(remotePath, localPath string) error
- func (r *Remote) ExecuteCommand(cmd string) (int, string, string, error)
- func (r *Remote) UploadDirectory(localDir, remoteDir string) error
- func (r *Remote) UploadFile(localPath, remotePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remote ¶
type Remote struct {
Hostname string
Port int
Username string
Password string
Logger *log.Logger
// contains filtered or unexported fields
}
Remote represents a SSH/SFTP client for remote server operations
func (*Remote) DownloadDirectory ¶
DownloadDirectory downloads a remote directory recursively to local path
func (*Remote) DownloadFile ¶
DownloadFile downloads a remote file to local path
func (*Remote) ExecuteCommand ¶
ExecuteCommand executes a command on remote host and returns the output
func (*Remote) UploadDirectory ¶
UploadDirectory uploads a local directory recursively to remote path
func (*Remote) UploadFile ¶
UploadFile uploads a local file to remote path
Click to show internal directories.
Click to hide internal directories.