Documentation
¶
Overview ¶
Package gsutil provides utility helpers for working with Google Cloud Storage. These helpers are meant to simplify some common use cases. To keep these helpers simple authentication credentials are retrieved from the standard credential resolution chain used by the storage SDK 'cloud.google.com/go/storage'.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFile ¶
ReadFile reads the contents of a file located in GCloud Storage returning a byte array with its contents or an error. The url is expected to have the following format "gs://the-bucket-name/path/to/the/file.ext". Users of this func should take care to only load objects of a known size as errors can arise if the requested object is too large.
Types ¶
type InvalidURLError ¶
type InvalidURLError struct { // URL is the Google Cloud Storage url related to the error. URL string // Err is the underlying error detailing how the url is invalid. Err error }
InvalidURLError is an error type that is returned if the provided Google Cloud Storage url is invalid.
func (*InvalidURLError) Error ¶
func (e *InvalidURLError) Error() string
Error returns a human readable error message.