driver

package
v0.0.0-...-0fe5c75 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: AGPL-3.0 Imports: 0 Imported by: 1

README

creamy-transcode/files/drivers/driver

Driver interfaces that allow downloading from some source to a local destination, and uploading from some local source to some destination.

If a Driver can Handle a path, it can be used to Upload to it or Download from it, depending if it is a DownloadDriver, and UploadDriver, or both.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadDriver

type DownloadDriver interface {
	PathHandler
	Download(source string, dest string) error
}

A DownloadDriver does the heavy lifting of actually downloading things

type PathHandler

type PathHandler interface {
	Handles(path string) bool
}

A PathHandler determines if it can handle some arbitrary path

type UploadDriver

type UploadDriver interface {
	PathHandler
	Upload(source string, dest string) error
}

An UploadDriver does the heavy lifting of actually uploading things

Jump to

Keyboard shortcuts

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