Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct{}
func (*Client) NewClient ¶
func (*Client) NewClient(user, password, host string, port int) *SFTPClient
func (*Client) NewClientWithKey ¶
func (*Client) NewClientWithKey(user, keyPath, passphrase, host string, port int) *SFTPClient
NewClientWithKey creates an SFTP client authenticated with a private key file. keyPath is the path to the PEM-encoded private key. passphrase may be empty for unencrypted keys.
type OperationResult ¶
type SFTPClient ¶
type SFTPClient struct {
// contains filtered or unexported fields
}
func (*SFTPClient) Close ¶
func (s *SFTPClient) Close() *OperationResult
func (*SFTPClient) DeleteFile ¶
func (s *SFTPClient) DeleteFile(remotePath string) *OperationResult
func (*SFTPClient) DownloadFile ¶
func (s *SFTPClient) DownloadFile(remotePath, localPath string) *OperationResult
func (*SFTPClient) UploadFile ¶
func (s *SFTPClient) UploadFile(localPath, remotePath string) *OperationResult
type SFTPClientInterface ¶
type SFTPClientInterface interface {
UploadFile(localPath, remotePath string) *OperationResult
DownloadFile(remotePath, localPath string) *OperationResult
DeleteFile(remotePath string) *OperationResult
Close() *OperationResult
}
Click to show internal directories.
Click to hide internal directories.