tree: 28329f2fa0f0071839669e5453c6a5bfc89774d1 [path history] [tgz]
  1. internal/
  2. acl.go
  3. acl_test.go
  4. bucket.go
  5. bucket_test.go
  6. CHANGES.md
  7. client.go
  8. conformance_test.go
  9. copy.go
  10. copy_test.go
  11. doc.go
  12. emulator_test.sh
  13. example_test.go
  14. go.mod
  15. go.sum
  16. go_mod_tidy_hack.go
  17. hmac.go
  18. hmac_test.go
  19. iam.go
  20. integration_test.go
  21. invoke.go
  22. invoke_test.go
  23. mock_test.go
  24. notifications.go
  25. notifications_test.go
  26. oc_test.go
  27. post_policy_v4.go
  28. post_policy_v4_test.go
  29. reader.go
  30. reader_go114_test.go
  31. reader_test.go
  32. README.md
  33. retry_conformance_test.go
  34. retry_test.go
  35. storage.go
  36. storage.replay
  37. storage_test.go
  38. writer.go
  39. writer_test.go
storage/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 := ioutil.ReadAll(rc)
if err != nil {
	log.Fatal(err)
}