Documentation
¶
Overview ¶
Package remote defines the protocol-agnostic interface for remote file operations and provides a factory that returns the right implementation (SFTP or FTP) based on host.Protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Stat(path string) (os.FileInfo, error)
ReadFile(path string) ([]byte, error)
WriteFile(path string, data []byte) error
UploadFile(local, remote string) error
DownloadFile(remote, local string) error
WalkFiles(root string, fn func(string) error) error
DeleteFile(path string) error
Close() error
}
Client abstracts all remote file operations needed by drift. Both *sftp.Client and *ftp.Client satisfy this interface.
Click to show internal directories.
Click to hide internal directories.