Documentation ¶
Index ¶
- type Entry
- type FTPClient
- func (c *FTPClient) ChangeDir(remotePath string) error
- func (c *FTPClient) Keepalive() error
- func (c *FTPClient) List() ([]*ftp.Entry, error)
- func (c *FTPClient) MkDir(remotePath string) error
- func (c *FTPClient) MkDirOneByOne(remotePath string) error
- func (c *FTPClient) Put(filepath string, filename string, remotePath string) error
- func (c *FTPClient) Quit()
- func (c *FTPClient) Rename(oldname string, newname string) error
- type FTPRequest
- type FtpsEntryType
- type SFTP
- func (s *SFTP) ChangeWorkingDirectory(path string) (err error)
- func (s *SFTP) Connect(host string, port int) (err error)
- func (s *SFTP) DeleteFile(path string) (err error)
- func (s *SFTP) List() (entries []Entry, err error)
- func (s *SFTP) Login(username, password string) (err error)
- func (s *SFTP) MakeDirectory(path string) (err error)
- func (s *SFTP) MkDirOneByOne(remotePath string) error
- func (s *SFTP) PrintWorkingDirectory() (directory string, err error)
- func (s *SFTP) Quit() (err error)
- func (s *SFTP) RemoveDirectory(path string) (err error)
- func (s *SFTP) RenameFile(from string, to string) (err error)
- func (s *SFTP) RetrieveFile(remoteFilepath, localFilepath string) (err error)
- func (s *SFTP) RetrieveFileData(remoteFilepath string) (data []byte, err error)
- func (s *SFTP) StoreFile(remoteFilepath string, data []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FTPClient ¶
type FTPClient struct {
// contains filtered or unexported fields
}
FTPClient FTP客户端
func NewFTPClient ¶
func NewFTPClient(cfg *FTPRequest) (*FTPClient, error)
func (*FTPClient) MkDirOneByOne ¶
type FTPRequest ¶
type FTPRequest struct { Host string // FTP地址,IP:PORT TLSConfig *tls.Config //ssl连接配置 Username string //FTP用户名 Password string //FTP密码 StartDir string //起始目录 DialTimeout time.Duration //连接超时 Result []byte //请求结果 InnerErr error // The Error Message }
FTPRequest 新的请求结构
type FtpsEntryType ¶
type FtpsEntryType int
const ( FtpsEntryTypeFile FtpsEntryType = iota FtpsEntryTypeFolder FtpsEntryTypeLink )
type SFTP ¶
func (*SFTP) ChangeWorkingDirectory ¶
func (*SFTP) DeleteFile ¶
func (*SFTP) MakeDirectory ¶
func (*SFTP) MkDirOneByOne ¶
func (*SFTP) PrintWorkingDirectory ¶
func (*SFTP) RemoveDirectory ¶
func (*SFTP) RetrieveFile ¶
func (*SFTP) RetrieveFileData ¶
Click to show internal directories.
Click to hide internal directories.