Documentation ¶
Index ¶
- func NewBucket(cl *storage.Service, project, bucket string) error
- func NewClient(ctx context.Context) (*storage.Service, error)
- func TryDeleteBucket(ctx context.Context, cl *storage.Service, bucket string)
- func TryDeleteObject(ctx context.Context, cl *storage.Service, bucket, object string)
- func UploadFile(cl *storage.Service, bucket, object, filename string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
NewClient returns a new GCS client using Application Default Credentials and with Full scope.
func TryDeleteBucket ¶
TryDeleteBucket tries to delete the given bucket and logs any errors. Intended to deferred cleanup.
func TryDeleteObject ¶
TryDeleteObject tries to delete the given object and logs any errors. Intended to deferred cleanup.
func UploadFile ¶
UploadFile uploads the given file to GCS. It assumes the bucket exists.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.