sftpclient

package
v0.0.0-...-3752bbf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL