s3

package
v0.0.0-...-1f9b3f3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package s3 provides a client for accessing S3.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(vl func(f string, v ...interface{}))

Configure sets the logger for this package.

func NewS3Client

func NewS3Client(awsAccessKey, awsSecretKey, s3Endpoint, bucket string) (fetchclient.FetchClient, error)

NewS3Client creates a new configured instance of s3Client. You can either pass the AWS credentials as arguments to the function or pass empty strings. In this case environment variables will be used for the credentials. Supported environment variables are AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and S3_ENDPOINT.

Types

type S3Client

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

S3Client is an S3 client configured with a bucket for all requests to use.

func (*S3Client) Get

func (s3c *S3Client) Get(key string) ([]byte, error)

Get fetches the contents of the file described by the key in the S3Client's bucket, and returns them.

Jump to

Keyboard shortcuts

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