Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Secret *katana.Secret Host string User string Key []byte Path string Mode os.FileMode }
Config is configuration for SFTP uploader
type SFTPUploader ¶
type SFTPUploader struct {
// contains filtered or unexported fields
}
SFTPUploader is SFTP uploader instance
func NewUploader ¶
func NewUploader(config *Config) (*SFTPUploader, error)
NewUploader creates new SFTP uploader instance
func (*SFTPUploader) SetDispatcher ¶
func (u *SFTPUploader) SetDispatcher(d *events.Dispatcher)
SetDispatcher sets events dispatcher
func (*SFTPUploader) Upload ¶
func (u *SFTPUploader) Upload(file, fileName string) error
Upload uploads given file to SFTP storage
func (*SFTPUploader) Write ¶ added in v0.0.2
func (u *SFTPUploader) Write(r io.ReadCloser, fileName string, fileSize int64) error
Write writes data from given reader to given file
Click to show internal directories.
Click to hide internal directories.