s3

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

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package s3 provides support for AWS S3 as source code storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

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

S3 stores data in an AWS S3 bucket.

func New

func New(cfg aws.Config, bucket string, uploadExpiry time.Duration) *S3

New creates a new S3 storage client.

func (*S3) Get

func (s *S3) Get(ctx context.Context, filename string) (io.ReadCloser, error)

Get returns a reader for a file in the bucket.

func (*S3) Has

func (s *S3) Has(ctx context.Context, filename string) (bool, error)

Has returns true if the given filename exists in the bucket.

func (*S3) NewUpload

func (s *S3) NewUpload(config source.UploadConfig) (*source.UploadURL, error)

NewUpload creates a new upload url that allows a user to upload a file to the bucket.

The uploaded file must match the provided ContentMD5.

Jump to

Keyboard shortcuts

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