wg-quicker/vendor/cloud.google.com/go/storage
2022-01-07 20:20:48 +01:00
..
internal/apiv2 build: managing tools in go modules 2022-01-07 20:20:48 +01:00
acl.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
bucket.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
CHANGES.md build: managing tools in go modules 2022-01-07 20:20:48 +01:00
copy.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
doc.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
go_mod_tidy_hack.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
go.mod build: managing tools in go modules 2022-01-07 20:20:48 +01:00
go.sum build: managing tools in go modules 2022-01-07 20:20:48 +01:00
hmac.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
iam.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
invoke.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
LICENSE build: managing tools in go modules 2022-01-07 20:20:48 +01:00
notifications.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
post_policy_v4.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
reader.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
README.md build: managing tools in go modules 2022-01-07 20:20:48 +01:00
storage.go build: managing tools in go modules 2022-01-07 20:20:48 +01:00
storage.replay build: managing tools in go modules 2022-01-07 20:20:48 +01:00
writer.go build: managing tools in go modules 2022-01-07 20:20:48 +01: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)
}