transfer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	Download(remoteFile, localFile string) error
}

type FTPTransfer

type FTPTransfer struct {
	// contains filtered or unexported fields
}

func (*FTPTransfer) Download

func (t *FTPTransfer) Download(remoteFile, localFile string) error

func (*FTPTransfer) ListFile

func (t *FTPTransfer) ListFile(dir string) chan string

func (*FTPTransfer) Upload

func (t *FTPTransfer) Upload(localFile, remoteFile string) error

type S3Transfer

type S3Transfer struct {
	// contains filtered or unexported fields
}

func (*S3Transfer) Download

func (t *S3Transfer) Download(remoteFile, localFile string) error

func (*S3Transfer) ListFile

func (t *S3Transfer) ListFile(dir string) chan string

func (*S3Transfer) Rename

func (t *S3Transfer) Rename(src, dst string) error

func (*S3Transfer) Upload

func (t *S3Transfer) Upload(localFile, remoteFile string) error

type Transfer

type Transfer interface {
	Uploader
	Downloader
	ListFile(dir string) chan string
}

func NewFTPTransfer

func NewFTPTransfer(addr, user, password, subDir string) (Transfer, error)

func NewS3Transfer

func NewS3Transfer(endpoint, bucketName, accessKeyID, secretAccessKey string) (Transfer, error)

type Uploader

type Uploader interface {
	Upload(localFile, remoteFile string) error
}

Jump to

Keyboard shortcuts

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