Documentation
¶
Index ¶
- Variables
- func RenameFile(fName string) string
- type SFTPClient
- func (c SFTPClient) Close() error
- func (c SFTPClient) CreateDirectory(path string) error
- func (c SFTPClient) DeleteDirectory(path string) error
- func (c SFTPClient) DeleteFile(path string) error
- func (c SFTPClient) Exist(path string) (bool, error)
- func (c SFTPClient) Get(remoteFile string) (*bytes.Buffer, error)
- func (c SFTPClient) IsDir(path string) (bool, error)
- func (c SFTPClient) IsFile(path string) (bool, error)
- func (c SFTPClient) List(path string) ([]string, error)
- func (c SFTPClient) Put(data []byte, fpath string) error
- type SFTPConf
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_KEY_EXCHANGE_ALGO = []string{"diffie-hellman-group-exchange-sha256"}
Functions ¶
func RenameFile ¶ added in v0.0.91
RenameFile Example function for rename the file before upload to S3 In this case we remove the first folder from the name Example: first_folder/second_folder/file_name.txt --> second_folder/file_name.txt
Types ¶
type SFTPClient ¶
func (SFTPClient) Close ¶ added in v0.0.68
func (c SFTPClient) Close() error
func (SFTPClient) CreateDirectory ¶
func (c SFTPClient) CreateDirectory(path string) error
func (SFTPClient) DeleteDirectory ¶
func (c SFTPClient) DeleteDirectory(path string) error
func (SFTPClient) DeleteFile ¶ added in v0.0.51
func (c SFTPClient) DeleteFile(path string) error
type SFTPConf ¶
type SFTPConf struct {
Host string `json:"host"`
User string `json:"user"`
Password string `json:"pass"`
Bucket string `json:"bucket"`
Port int `json:"port"`
Timeout int `json:"timeout"`
PrivKey string `json:"priv_key"`
}
Click to show internal directories.
Click to hide internal directories.