workgroups/vendor/cloud.google.com/go/storage
Marvin Preuss 1d4ae27878
All checks were successful
continuous-integration/drone/push Build is passing
ci: drone yaml with reusable anchors
2021-09-24 17:34:17 +02:00
..
internal/apiv2 ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
acl.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
bucket.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
CHANGES.md ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
copy.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
doc.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
go_mod_tidy_hack.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
hmac.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
iam.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
invoke.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
LICENSE ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
notifications.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
post_policy_v4.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
reader.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
README.md ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
storage.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
storage.replay ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00
writer.go ci: drone yaml with reusable anchors 2021-09-24 17:34:17 +02:00

Cloud Storage Go Reference

Example Usage

First create a storage.Client to use throughout your application:

client, err := storage.NewClient(ctx)
if err != nil {
	log.Fatal(err)
}
// Read the object1 from bucket.
rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx)
if err != nil {
	log.Fatal(err)
}
defer rc.Close()
body, err := ioutil.ReadAll(rc)
if err != nil {
	log.Fatal(err)
}