uploader

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(sc *core.ServerConfiguration) error

func UploadWorkers

func UploadWorkers(concurrency uint) chan *UploadWork

Types

type UploadWork

type UploadWork struct {
	Source      string
	Destination string
	Func        func(string, string) error
}

type Uploader

type Uploader struct {
	BaseDir  string
	Uploader core.Uploader
}

func DefaultUploader

func DefaultUploader(sc *core.ServerConfiguration) *Uploader

DefaultUploader returns an uploader that uses an adapter based on the configuration on the server configuration.

func (*Uploader) CreateDirectory

func (u *Uploader) CreateDirectory(path string) error

func (*Uploader) ListDirectory

func (u *Uploader) ListDirectory(directory string) ([]string, error)

func (*Uploader) Upload

func (u *Uploader) Upload(source string, destination string, contType string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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