peridot/vendor/cloud.google.com/go/storage
2023-08-25 20:30:36 +02:00
..
internal govendor 2023-08-25 20:30:36 +02:00
acl.go govendor 2023-08-25 20:30:36 +02:00
bucket.go govendor 2023-08-25 20:30:36 +02:00
BUILD govendor 2023-08-25 20:30:36 +02:00
CHANGES.md govendor 2023-08-25 20:30:36 +02:00
client.go govendor 2023-08-22 18:09:35 +02:00
copy.go govendor 2023-08-22 18:09:35 +02:00
doc.go govendor 2023-08-25 20:30:36 +02:00
emulator_test.sh govendor 2023-08-22 18:09:35 +02:00
grpc_client.go govendor 2023-08-25 20:30:36 +02:00
hmac.go govendor 2023-08-25 20:30:36 +02:00
http_client.go govendor 2023-08-25 20:30:36 +02:00
iam.go govendor 2023-08-22 18:09:35 +02:00
invoke.go govendor 2023-08-25 20:30:36 +02:00
LICENSE govendor 2023-08-22 18:09:35 +02:00
notifications.go govendor 2023-08-25 20:30:36 +02:00
option.go govendor 2023-08-25 20:30:36 +02:00
post_policy_v4.go govendor 2023-08-25 20:30:36 +02:00
reader.go govendor 2023-08-25 20:30:36 +02:00
README.md govendor 2023-08-22 18:09:35 +02:00
storage.go govendor 2023-08-25 20:30:36 +02:00
storage.replay govendor 2023-08-22 18:09:35 +02:00
writer.go govendor 2023-08-25 20:30:36 +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 := io.ReadAll(rc)
if err != nil {
	log.Fatal(err)
}