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

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