feat(bigquery/storage/managedwriter): improve method parity in managedwriter (#5007)

This PR exposes the raw methods for creating and committing streams to the wrapped managedwriter client.

It allows users to interact with all the methods of the underlying API using the managedwriter client (which itself wraps the raw v1 client).  The disadvantage is that it couples managedwriter directly to v1, as it accepts requests in the v1 namespace. The existing append interactions all use abstractions local to the managedwriter.

PR also gets rid of the utility method for batch committing write streams; there's not a great deal of utility saved here vs the underlying method.

Towards: https://github.com/googleapis/google-cloud-go/issues/4366
2 files changed
tree: 43364f045f04192524dc78616cf19a01e26ab476
  1. .github/
  2. accessapproval/
  3. accesscontextmanager/
  4. aiplatform/
  5. analytics/
  6. apigateway/
  7. apigeeconnect/
  8. appengine/
  9. area120/
  10. artifactregistry/
  11. asset/
  12. assuredworkloads/
  13. automl/
  14. bigquery/
  15. bigtable/
  16. billing/
  17. binaryauthorization/
  18. channel/
  19. civil/
  20. cloudbuild/
  21. clouddms/
  22. cloudtasks/
  23. cmd/
  24. compute/
  25. contactcenterinsights/
  26. container/
  27. containeranalysis/
  28. datacatalog/
  29. dataflow/
  30. datafusion/
  31. datalabeling/
  32. dataproc/
  33. dataqna/
  34. datastore/
  35. datastream/
  36. debugger/
  37. deploy/
  38. dialogflow/
  39. dlp/
  40. documentai/
  41. domains/
  42. errorreporting/
  43. essentialcontacts/
  44. eventarc/
  45. filestore/
  46. firestore/
  47. functions/
  48. gaming/
  49. gkeconnect/
  50. gkehub/
  51. grafeas/
  52. gsuiteaddons/
  53. httpreplay/
  54. iam/
  55. iap/
  56. internal/
  57. iot/
  58. kms/
  59. language/
  60. lifesciences/
  61. logging/
  62. longrunning/
  63. managedidentities/
  64. mediatranslation/
  65. memcache/
  66. metastore/
  67. monitoring/
  68. networkconnectivity/
  69. networkmanagement/
  70. networksecurity/
  71. notebooks/
  72. orchestration/
  73. orgpolicy/
  74. osconfig/
  75. oslogin/
  76. phishingprotection/
  77. policytroubleshooter/
  78. privatecatalog/
  79. profiler/
  80. pubsub/
  81. pubsublite/
  82. recaptchaenterprise/
  83. recommendationengine/
  84. recommender/
  85. redis/
  86. resourcemanager/
  87. resourcesettings/
  88. retail/
  89. rpcreplay/
  90. scheduler/
  91. secretmanager/
  92. security/
  93. securitycenter/
  94. servicecontrol/
  95. servicedirectory/
  96. servicemanagement/
  97. serviceusage/
  98. shell/
  99. spanner/
  100. speech/
  101. storage/
  102. storagetransfer/
  103. talent/
  104. texttospeech/
  105. third_party/
  106. tpu/
  107. trace/
  108. translate/
  109. video/
  110. videointelligence/
  111. vision/
  112. vpcaccess/
  113. webrisk/
  114. websecurityscanner/
  115. workflows/
  116. .gitignore
  117. CHANGES.md
  118. CODE_OF_CONDUCT.md
  119. CONTRIBUTING.md
  120. doc.go
  121. go.mod
  122. go.sum
  123. header_test.go
  124. LICENSE
  125. README.md
  126. RELEASING.md
  127. SECURITY.md
  128. testing.md
README.md

Google Cloud Client Libraries for Go

Go Reference

Go packages for Google Cloud Platform services.

import "cloud.google.com/go"

To install the packages on your system, do not clone the repo. Instead:

  1. Change to your project directory:

    cd /my/cloud/project
    
  2. Get the package you want to use. Some products have their own module, so it's best to go get the package(s) you want to use:

    $ go get cloud.google.com/go/firestore # Replace with the package you want to use.
    

NOTE: Some of these packages are under development, and may occasionally make backwards-incompatible changes.

Supported APIs

For an updated list of all of our released APIs please see our reference docs.

Go Versions Supported

We currently support Go versions 1.11 and newer.

Authorization

By default, each API will use Google Application Default Credentials for authorization credentials used in calling the API endpoints. This will allow your application to run in many environments without requiring explicit configuration.

client, err := storage.NewClient(ctx)

To authorize using a JSON key file, pass option.WithCredentialsFile to the NewClient function of the desired package. For example:

client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))

You can exert more control over authorization by using the golang.org/x/oauth2 package to create an oauth2.TokenSource. Then pass option.WithTokenSource to the NewClient function: snip:# (auth-ts)

tokenSource := ...
client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))

Contributing

Contributions are welcome. Please, see the CONTRIBUTING document for details.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Contributor Code of Conduct for more information.

Links