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