Skip to content

indiependente/s3stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card GoDoc

s3stream

What is it?

Streaming client for Amazon AWS S3

Golang library that allows Get and Put operations from/to Amazon S3 in streaming fashion.

How to install

go get github.com/indiependente/s3stream

Usage

Get:

rc, err := store.Get(prefix, bucketname, filename)

rc is an io.ReadCloser which you can stream from.

Put:

n, err := store.Put(prefix, bucketname, filename, r)

r is an io.Reader and Put will stream its content to the specified file in the desired bucket.

Look at the tests for more info on its usage.

You can run the tests locally by using Minio (https://github.com/minio/minio). Example:

docker run --rm --name minio -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
  -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" -p 9000:9000 \
  -d minio/minio server /data
  
go test ./...