周玉环 d906a41c2e first commit 3 days ago
..
internal d906a41c2e first commit 3 days ago
CHANGES.md d906a41c2e first commit 3 days ago
LICENSE d906a41c2e first commit 3 days ago
README.md d906a41c2e first commit 3 days ago
acl.go d906a41c2e first commit 3 days ago
bucket.go d906a41c2e first commit 3 days ago
client.go d906a41c2e first commit 3 days ago
copy.go d906a41c2e first commit 3 days ago
doc.go d906a41c2e first commit 3 days ago
emulator_test.sh d906a41c2e first commit 3 days ago
grpc_client.go d906a41c2e first commit 3 days ago
hmac.go d906a41c2e first commit 3 days ago
http_client.go d906a41c2e first commit 3 days ago
iam.go d906a41c2e first commit 3 days ago
invoke.go d906a41c2e first commit 3 days ago
notifications.go d906a41c2e first commit 3 days ago
option.go d906a41c2e first commit 3 days ago
post_policy_v4.go d906a41c2e first commit 3 days ago
reader.go d906a41c2e first commit 3 days ago
storage.go d906a41c2e first commit 3 days ago
storage.replay d906a41c2e first commit 3 days ago
writer.go d906a41c2e first commit 3 days ago

README.md

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)
}