Documentation ¶
Index ¶
- type SftpClient
- func (s *SftpClient) Close()
- func (s *SftpClient) ConnectWithPassword(host, port, username, password string) error
- func (s *SftpClient) ConnectWithPublicKey(host, port, username, privkey string) error
- func (s *SftpClient) FetchFiles(remoteDir, filePattern string)
- func (s *SftpClient) GetPublicKey(privkey string) ssh.AuthMethod
- func (s *SftpClient) MatchPattern(pattern, samplePattern string) (bool, error)
- func (s *SftpClient) ProcessFile(src string) error
- func (s *SftpClient) PutFile(srcFile, filename string) error
- func (s *SftpClient) RetrieveFilesList(dir string) ([]string, error)
- func (s *SftpClient) UploadFile(srcfile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SftpClient ¶
type SftpClient struct { Host string Port string Username string Password string PrivateKey string Conn *ssh.Client Client *sftp.Client Path string UsePrivateKey bool FilesList []string Interval int DelayUnits string CleanFiles bool TargetPath string }
func (*SftpClient) Close ¶
func (s *SftpClient) Close()
func (*SftpClient) ConnectWithPassword ¶
func (s *SftpClient) ConnectWithPassword(host, port, username, password string) error
func (*SftpClient) ConnectWithPublicKey ¶
func (s *SftpClient) ConnectWithPublicKey(host, port, username, privkey string) error
func (*SftpClient) FetchFiles ¶
func (s *SftpClient) FetchFiles(remoteDir, filePattern string)
func (*SftpClient) GetPublicKey ¶
func (s *SftpClient) GetPublicKey(privkey string) ssh.AuthMethod
func (*SftpClient) MatchPattern ¶
func (s *SftpClient) MatchPattern(pattern, samplePattern string) (bool, error)
func (*SftpClient) ProcessFile ¶
func (s *SftpClient) ProcessFile(src string) error
func (*SftpClient) PutFile ¶
func (s *SftpClient) PutFile(srcFile, filename string) error
func (*SftpClient) RetrieveFilesList ¶
func (s *SftpClient) RetrieveFilesList(dir string) ([]string, error)
func (*SftpClient) UploadFile ¶
func (s *SftpClient) UploadFile(srcfile string) error
Click to show internal directories.
Click to hide internal directories.