Documentation
¶
Index ¶
Constants ¶
const GzipContentEncoding = "gzip"
const Timeout = 50
Variables ¶
This section is empty.
Functions ¶
func GetKnownHeaders ¶
Types ¶
type UploadInput ¶
func ProcessPath ¶
func ProcessPath(path, prefix, glob string, useIgnoreList, includeParent bool) ([]UploadInput, error)
ProcessPath will convert an input path (file or folder) into a list of UploadInput. Each UploadInput object represents a single file that will need to be uploaded to GCS. The prefix parameter will be the prefix for every GCS ObjectName The glob parameter can be used alongside a folder path to do selective filtering. The useIgnoreList parameter can be used to process a .gcloudignore file for additional filtering. The includeParent parameter can be used to maintain or ignore the folder structure in the objects uploaded to GCS.
type UploadResults ¶
type Uploader ¶
func (Uploader) UploadObjects ¶
func (u Uploader) UploadObjects(inputs []UploadInput, bucket stiface.BucketHandle) []UploadResults
UploadObjects will upload each UploadInput into the provided bucket. It will perform the uploads concurrently up to the Uploader.Concurrency limit. Results are accumulated into a UploadResults array and returned when everything completes. It's possible that individual uploads can have an error, and the caller can check UploadResults.Success and UploadResults.Message for status and any error message