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