Documentation
¶
Index ¶
- type SFTP
- func (s *SFTP) Close()
- func (s *SFTP) Connect() error
- func (s *SFTP) Delete(path string) error
- func (s *SFTP) Download(remote, local string) (int64, error)
- func (s *SFTP) Exist(path string) bool
- func (s *SFTP) ListDirectory(dir string) ([]os.FileInfo, error)
- func (s *SFTP) ListDirectoryRecursive(dir string) ([]string, error)
- func (s *SFTP) Stat(path string) (os.FileInfo, error)
- func (s *SFTP) Upload(local, remote string, overwrite UploadAction) (int64, error)
- type UploadAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SFTP ¶
type SFTP struct {
Username string
Password string
Port string
Host string
HostKeyCallback ssh.HostKeyCallback
AuthMethod []ssh.AuthMethod
Connected bool
Connection *ssh.Client
Client *sftp.Client
Timeout time.Duration
}
SFTP sftp struct
func (*SFTP) ListDirectory ¶
ListDirectory list directory
func (*SFTP) ListDirectoryRecursive ¶
ListDirectoryRecursive list directory info recursive
type UploadAction ¶
type UploadAction int
const ( UPLOAD_DONT_OVERWRITE UploadAction = 0 UPLOAD_OVERWRITE UploadAction = 1 UPLOAD_CONTINUE UploadAction = 2 )
Click to show internal directories.
Click to hide internal directories.