Google Git
Sign in
fuchsia / third_party / github.com / googleapis / google-cloud-go / refs/heads/upstream/test-update / . / storage
tree: 91c452c312d71929df7cb5bd7d9bc74f80cbb374 [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. grpc_reader.go
  29. grpc_reader_multi_range.go
  30. grpc_writer.go
  31. headers_test.go
  32. hmac.go
  33. hmac_test.go
  34. http_client.go
  35. http_client_test.go
  36. iam.go
  37. integration_test.go
  38. invoke.go
  39. invoke_test.go
  40. mock_test.go
  41. notifications.go
  42. notifications_test.go
  43. option.go
  44. option_test.go
  45. post_policy_v4.go
  46. post_policy_v4_test.go
  47. reader.go
  48. reader_test.go
  49. README.md
  50. retry_conformance_test.go
  51. retry_test.go
  52. storage.go
  53. storage.replay
  54. storage_test.go
  55. TESTING.md
  56. trace.go
  57. trace_test.go
  58. writer.go
  59. 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