<commit_before>package blob_store

import (
	"io"

	"github.com/cloudfoundry-incubator/lattice/ltc/config"
	"github.com/goamz/goamz/s3"
)

const (
	DropletContentType = "application/octet-stream"
)

var (
	DefaultPrivilege s3.ACL = s3.PublicReadWrite
)

//go:generate counterfeiter -o fake_blob_store/fake_blob_store.go . BlobStore
type BlobStore interface {
	Bucket(name string) BlobBucket
}

//go:generate counterfeiter -o fake_blob_bucket/fake_blob_bucket.go . BlobBucket
type BlobBucket interface {
	List(prefix, delim, marker string, max int) (result *s3.ListResp, err error)
	PutReader(path string, r io.Reader, length int64, contType string, perm s3.ACL, options s3.Options) error
}

type blobStore struct {
	config     *config.Config
	s3Endpoint *s3.S3
}

func NewBlobStore(config *config.Config, s3S3 *s3.S3) *blobStore {
	return &blobStore{
		config:     config,
		s3Endpoint: s3S3,
	}
}

func (bs *blobStore) Bucket(name string) BlobBucket {
	return bs.s3Endpoint.Bucket(name)
}<commit_msg>Blobs shouldn't be stored with a public ACL<commit_after>package blob_store

import (
	"io"

	"github.com/cloudfoundry-incubator/lattice/ltc/config"
	"github.com/goamz/goamz/s3"
)

const (
	DropletContentType = "application/octet-stream"
)

var (
	DefaultPrivilege s3.ACL = s3.Private
)

//go:generate counterfeiter -o fake_blob_store/fake_blob_store.go . BlobStore
type BlobStore interface {
	Bucket(name string) BlobBucket
}

//go:generate counterfeiter -o fake_blob_bucket/fake_blob_bucket.go . BlobBucket
type BlobBucket interface {
	List(prefix, delim, marker string, max int) (result *s3.ListResp, err error)
	PutReader(path string, r io.Reader, length int64, contType string, perm s3.ACL, options s3.Options) error
}

type blobStore struct {
	config     *config.Config
	s3Endpoint *s3.S3
}

func NewBlobStore(config *config.Config, s3S3 *s3.S3) *blobStore {
	return &blobStore{
		config:     config,
		s3Endpoint: s3S3,
	}
}

func (bs *blobStore) Bucket(name string) BlobBucket {
	return bs.s3Endpoint.Bucket(name)
}
{'fraction_non_alphanumeric': 0.10622529644268774, 'fraction_numerical': 0.018774703557312252, 'mean_word_length': 4.752840909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4494568', 'n_tokens_mistral': 774, 'n_tokens_neox': 756, 'n_words': 171}