upload

package
v0.0.0-...-2ce81c6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileUploader

type FileUploader interface {
	// UploadFile uploads the file read by the given Reader and give it a name as specified.
	UploadFile(ctx context.Context, r io.Reader, name string) error
	// Path returns the full path of the file in the storage backend used.
	Path(base string) string
	// Delete deletes the given file.
	Delete(ctx context.Context, name string) error
}

FileUploader uploads files to a storage service.

func NewGCSFileUploader

func NewGCSFileUploader(ctx context.Context, bucket string) (FileUploader, error)

NewGCSFileUploader creates a new FileUploader that uses Google Cloud Storage.

Jump to

Keyboard shortcuts

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