Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWS ¶
type AWS struct {
// contains filtered or unexported fields
}
func GetClient ¶
GetClient returns the global AWS client. It initializes the AWS client if it hasn't already been initialized.
func (*AWS) DownloadFile ¶
DownloadFile downloads filename from bucket and
func (*AWS) GenerateFullReleaseFeedFromObjects ¶
GenerateFullReleaseFeedFromObjects will download all release artifacts from the tools s3 bucket, caluclate their md5, sha1, and sha256 digests, and create a download.JSONFeed object representing every artifact for every tools version.
func (*AWS) UploadBytes ¶
UploadBytes uploads data from a reader to the bucket, path, and filename specified.
func (*AWS) UploadFile ¶
UploadFile will upload a file from the filesystem to the bucket and path specified. The uploaded file keeps its filename.
type ArtifactMetadata ¶
ArtifactMetadata is a container to easily pass around some metadata extracted from s3 object filenames.
type HashWriterAt ¶
type HashWriterAt struct { MD5 hash.Hash SHA1 hash.Hash SHA256 hash.Hash // contains filtered or unexported fields }
HashWriterAt is used to calculate md5, sha1, and sha256 hashes in parallel. w is a MulitWriter that writes to all the Hash interfaces.
func (HashWriterAt) WriteAt ¶
func (fw HashWriterAt) WriteAt(p []byte, offset int64) (n int, err error)
WriteAt fakes the io.WriterAt interface because s3manager.Downloarder.Download() expects an io.WriterAt. Since we set the concurrency of the downloader to 1, we can safely convert WriteAt calls to Write calls by ignoring the offset.