Documentation ¶
Overview ¶
Package gcs allows users to run the gsutil command to upload data to Google Cloud storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GCS ¶
type GCS struct {
// contains filtered or unexported fields
}
GCS handles uploading fragments to GCS.
func New ¶
Init initializes 'gcs' with the given path 'gsutilPath' to the "gsutil" program on the client's machine. It returns an error if it cannot find the gsutil command.
func (*GCS) ListTree ¶
ListTree returns all the subdirectories specified in `dirList` that exist as top-level subdirectories under `root`. If none of these exist or if `root` does not exist, it returns an empty list.
func (*GCS) TransferTree ¶
TransferTree initiates a gsutil recursive upload of the contents of the directory tree rooted at the 'src' path to the tree rooted at the 'dst' path, and returns the output of the command. One or both of these paths can begin with the "gs://" prefix to specify a GCS location. Transfers to GCS are marked with content-type "application/json", and are made world-readable iff 'publiclyReadable' is set. Failures cause an error (with the command output embedded) to be returned.