s3utils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

TODO(pedge): the public vs non-public needs to go away, we need to put creds somewhere managed, and consistently call out to s3

Index

Constants

View Source
const (
	Private           = ACL("private")
	PublicRead        = ACL("public-read")
	PublicReadWrite   = ACL("public-read-write")
	AuthenticatedRead = ACL("authenticated-read")
	BucketOwnerRead   = ACL("bucket-owner-read")
	BucketOwnerFull   = ACL("bucket-owner-full-control")
)

Variables

This section is empty.

Functions

func ForEachFile

func ForEachFile(uri string, public bool, marker string, cont func(file string, modtime time.Time) error) error

Files calls `cont` on each file found at `uri` starting at marker. Pass `marker=""` to start from the beginning. Returns the marker that should be passed to pick-up where this call left off.

func GetBucket

func GetBucket(input string) (string, error)

getBucket extracts the bucket from an s3 input

func GetPath

func GetPath(input string) (string, error)

getPath extracts the path from an s3 input

func NewClient added in v0.9.0

func NewClient(public bool) *s3.S3

func PutMulti

func PutMulti(bucketUri string, path string, r io.Reader, contType string, perm ACL) error

PutMulti is like a smart bucket.Put in that it will automatically do a multiput if the input reader has enough data that it makes sense to do so.

Types

type ACL added in v0.9.0

type ACL string

Jump to

Keyboard shortcuts

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