ftp

package
v0.0.0-...-c6fd6ec Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadConfig

type DownloadConfig struct {
	ServerInfo     ServerConfig
	MaxConnection  int // max number of simultaneous connections
	BaseDir        string
	DestDir        string
	Files2Download []string
}

DownloadConfig is a config for files to download from a public FTP server

func NewDownloadConfig

func NewDownloadConfig(ftpURL, baseDir, destDir string, files2Download []string) *DownloadConfig

NewDownloadConfig returns a basic DownloadConfig

func (DownloadConfig) Download

func (fc DownloadConfig) Download() error

Download downloads files based on the config

type ServerConfig

type ServerConfig struct {
	URL                string
	Port               int
	Username, Password string
}

ServerConfig defines the FTP server configuration

Jump to

Keyboard shortcuts

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