uploaders

package
v0.0.0-...-7980162 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FTPUpload

func FTPUpload(logger lager.Logger, dbInstance db.Storage, jobID string) error

FTPUpload uploades the file using FTP. Job Destination should be in format: ftp://login:password@host/path

func S3Upload

func S3Upload(logger lager.Logger, dbInstance db.Storage, jobID string) error

S3Upload sends the file to S3 bucket. Job Destination should be in format: http://AWSKEY:AWSSECRET@BUCKET.s3.amazonaws.com/OBJECT

Types

type ProgressTracker

type ProgressTracker struct {
	Total int64
	// contains filtered or unexported fields
}

func NewProgressTracker

func NewProgressTracker(total int, job *types.Job, dbInstance db.Storage) *ProgressTracker

func NewProgressTracker64

func NewProgressTracker64(total int64, job *types.Job, dbInstance db.Storage) *ProgressTracker

func (*ProgressTracker) Add

func (pt *ProgressTracker) Add(add int) int

func (*ProgressTracker) Add64

func (pt *ProgressTracker) Add64(add int64) int64

func (*ProgressTracker) Finish

func (pt *ProgressTracker) Finish()

func (*ProgressTracker) Get

func (pt *ProgressTracker) Get() int64

func (*ProgressTracker) Increment

func (pt *ProgressTracker) Increment() int

func (*ProgressTracker) Read

func (pt *ProgressTracker) Read(p []byte) (n int, err error)

func (*ProgressTracker) Set

func (pt *ProgressTracker) Set(current int) *ProgressTracker

func (*ProgressTracker) Set64

func (pt *ProgressTracker) Set64(current int64) *ProgressTracker

func (*ProgressTracker) Start

func (pt *ProgressTracker) Start() *ProgressTracker

func (*ProgressTracker) Update

func (pt *ProgressTracker) Update()

func (*ProgressTracker) Write

func (pt *ProgressTracker) Write(p []byte) (n int, err error)

type UploadFunc

type UploadFunc func(logger lager.Logger, dbInstance db.Storage, jobID string) error

UploadFunc is a function type for the multiple possible ways to upload the source file

func GetUploadFunc

func GetUploadFunc(jobDestination string) UploadFunc

GetUploadFunc returns the upload function based on the job source.

Jump to

Keyboard shortcuts

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