Google Git
Sign in
fuchsia / third_party / github.com / googleapis / google-cloud-go / refs/heads/upstream/add-retry-during-stream-test / . / storage
tree: d7dfd11605bd5f89c8724d2ef4d16823ff4b0188 [path history] [tgz]
  1. control/
  2. dataflux/
  3. experimental/
  4. internal/
  5. transfermanager/
  6. acl.go
  7. acl_test.go
  8. bucket.go
  9. bucket_test.go
  10. CHANGES.md
  11. client.go
  12. client_test.go
  13. conformance_test.go
  14. copy.go
  15. copy_test.go
  16. doc.go
  17. dynamic_delay.go
  18. dynamic_delay_test.go
  19. emulator_test.sh
  20. example_test.go
  21. go.mod
  22. go.sum
  23. grpc_client.go
  24. grpc_client_test.go
  25. grpc_dp.go
  26. grpc_metrics.go
  27. grpc_metrics_test.go
  28. headers_test.go
  29. hmac.go
  30. hmac_test.go
  31. http_client.go
  32. http_client_test.go
  33. iam.go
  34. integration_test.go
  35. invoke.go
  36. invoke_test.go
  37. mock_test.go
  38. notifications.go
  39. notifications_test.go
  40. option.go
  41. option_test.go
  42. post_policy_v4.go
  43. post_policy_v4_test.go
  44. reader.go
  45. reader_test.go
  46. README.md
  47. retry_conformance_test.go
  48. retry_test.go
  49. storage.go
  50. storage.replay
  51. storage_test.go
  52. writer.go
  53. writer_test.go
storage/README.md

Cloud Storage Go Reference

  • About Cloud Storage
  • API documentation
  • Go client documentation
  • Complete sample programs

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)
}
Powered by Gitiles| Privacy| Termstxt json