Documentation ¶
Index ¶
- Variables
- func AddHeaders(req *http.Request)
- func Download(link string, backend BaseBackend)
- func DownloadFile(config DownConfig) error
- func InitCmd(cmd *cobra.Command)
- func Upload(files []string, backend BaseBackend)
- type Backend
- func (b Backend) DoDownload(link string, config DownConfig) error
- func (b Backend) DoUpload(string, int64, io.Reader) error
- func (b Backend) EndProgress()
- func (b Backend) FinishUpload([]string) (string, error)
- func (b Backend) InitUpload([]string, []int64) error
- func (b Backend) PostUpload(string, int64) (string, error)
- func (b Backend) PreUpload(string, int64) error
- func (b *Backend) StartProgress(stream io.Reader, size int64) io.Reader
- type BaseBackend
- type DownConfig
- type Downloader
- type Uploader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DebugMode bool MuteMode bool )
Functions ¶
func AddHeaders ¶
func Download ¶
func Download(link string, backend BaseBackend)
func DownloadFile ¶
func DownloadFile(config DownConfig) error
func Upload ¶
func Upload(files []string, backend BaseBackend)
Types ¶
type Backend ¶
type Backend struct { BaseBackend Bar *pb.ProgressBar }
func (Backend) DoDownload ¶
func (b Backend) DoDownload(link string, config DownConfig) error
func (Backend) EndProgress ¶
func (b Backend) EndProgress()
type BaseBackend ¶
type DownConfig ¶
type DownConfig struct { methods.DownloaderConfig Ticket string }
var (
DownloadConfig DownConfig
)
type Downloader ¶
type Downloader interface {
DoDownload(string, DownConfig) error
}
Click to show internal directories.
Click to hide internal directories.