upload

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2014 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultCacheControl is the default value for each artifact's Cache-Control header
	DefaultCacheControl = "private"
	// DefaultConcurrency is the default number of concurrent goroutines used during upload
	DefaultConcurrency = uint64(5)
	// DefaultMaxSize is the default maximum allowed bytes for all artifacts
	DefaultMaxSize = uint64(1024 * 1024 * 1000)
	// DefaultPaths is the default slice of local paths to upload (empty)
	DefaultPaths = []string{}
	// DefaultPerm is the default ACL applied to each artifact
	DefaultPerm = "private"
	// DefaultRetries is the default number of times a given artifact upload will be retried
	DefaultRetries = uint64(2)
	// DefaultTargetPaths is the default upload prefix for each artifact
	DefaultTargetPaths = []string{}
	// DefaultWorkingDir is the default working directory ... wow.
	DefaultWorkingDir, _ = os.Getwd()
)

Functions

func Upload

func Upload(opts *Options, log *logrus.Logger) error

Upload does the deed!

Types

type Options

type Options struct {
	AccessKey    string
	BucketName   string
	CacheControl string
	Concurrency  uint64
	MaxSize      uint64
	Paths        []string
	Perm         s3.ACL
	Retries      uint64
	SecretKey    string
	TargetPaths  []string
	WorkingDir   string
}

Options is used in the call to Upload

func NewOptions

func NewOptions() *Options

NewOptions makes some *Options with defaults!

func (*Options) Validate added in v0.3.0

func (opts *Options) Validate() error

Validate checks for validity!

Jump to

Keyboard shortcuts

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