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