s3util

package
v0.0.0-...-7a50bc8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWS_ACCESS_KEY_ID = "AWS_ACCESS_KEY_ID"
	AWS_SECRET_KEY    = "AWS_SECRET_KEY"
)

These constants correspond to the expected credential-containing environment variable keys.

View Source
const (
	// S3_URL is the URL that S3 is located at.
	S3_URL = "s3.amazonaws.com"
)

Variables

This section is empty.

Functions

func Gzipper

func Gzipper(gzipPath string) (*bytes.Buffer, error)

Gzipper gzips the file at the path. Helper to prepare gzipped data for upload to S3.

func Zipper

func Zipper(zipPath string) (*bytes.Buffer, error)

Zipper zips file contents at a path. Helper to prepare zipped data for upload to S3.

Types

type S3Uploader

type S3Uploader struct {
	// contains filtered or unexported fields
}

An S3Uploader is a helper object for uploading S3 requests.

func NewS3Uploader

func NewS3Uploader(bucket, permission string, quiet bool) (*S3Uploader, error)

NewS3Uploader configures a new S3 uploader from a uri.

func (*S3Uploader) UploadToS3

func (s *S3Uploader) UploadToS3(fPath string, buf *bytes.Buffer) error

UploadToS3 prepares a buffer for upload to S3.

Jump to

Keyboard shortcuts

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