tree: d79440d8fefe0cf3dd2ff5c1025c19df2d8feaff [path history] [tgz]
  1. .devcontainer/
  2. .github/
  3. accessapproval/
  4. accesscontextmanager/
  5. advisorynotifications/
  6. ai/
  7. aiplatform/
  8. alloydb/
  9. analytics/
  10. apigateway/
  11. apigeeconnect/
  12. apigeeregistry/
  13. apikeys/
  14. appengine/
  15. apphub/
  16. apps/
  17. area120/
  18. artifactregistry/
  19. asset/
  20. assuredworkloads/
  21. auth/
  22. automl/
  23. backupdr/
  24. baremetalsolution/
  25. batch/
  26. beyondcorp/
  27. bigquery/
  28. bigtable/
  29. billing/
  30. binaryauthorization/
  31. certificatemanager/
  32. channel/
  33. chat/
  34. civil/
  35. cloudbuild/
  36. cloudcontrolspartner/
  37. clouddms/
  38. cloudprofiler/
  39. cloudquotas/
  40. cloudtasks/
  41. commerce/
  42. compute/
  43. confidentialcomputing/
  44. config/
  45. contactcenterinsights/
  46. container/
  47. containeranalysis/
  48. datacatalog/
  49. dataflow/
  50. dataform/
  51. datafusion/
  52. datalabeling/
  53. dataplex/
  54. dataproc/
  55. dataqna/
  56. datastore/
  57. datastream/
  58. debugger/
  59. deploy/
  60. developerconnect/
  61. dialogflow/
  62. discoveryengine/
  63. dlp/
  64. documentai/
  65. domains/
  66. edgecontainer/
  67. edgenetwork/
  68. errorreporting/
  69. essentialcontacts/
  70. eventarc/
  71. filestore/
  72. firestore/
  73. functions/
  74. gkebackup/
  75. gkeconnect/
  76. gkehub/
  77. gkemulticloud/
  78. grafeas/
  79. gsuiteaddons/
  80. httpreplay/
  81. iam/
  82. iap/
  83. identitytoolkit/
  84. ids/
  85. internal/
  86. iot/
  87. kms/
  88. language/
  89. lifesciences/
  90. logging/
  91. longrunning/
  92. managedidentities/
  93. managedkafka/
  94. maps/
  95. mediatranslation/
  96. memcache/
  97. metastore/
  98. migrationcenter/
  99. monitoring/
  100. netapp/
  101. networkconnectivity/
  102. networkmanagement/
  103. networksecurity/
  104. networkservices/
  105. notebooks/
  106. optimization/
  107. orchestration/
  108. orgpolicy/
  109. osconfig/
  110. oslogin/
  111. parallelstore/
  112. phishingprotection/
  113. policysimulator/
  114. policytroubleshooter/
  115. privatecatalog/
  116. profiler/
  117. pubsub/
  118. pubsublite/
  119. rapidmigrationassessment/
  120. recaptchaenterprise/
  121. recommendationengine/
  122. recommender/
  123. redis/
  124. resourcemanager/
  125. resourcesettings/
  126. retail/
  127. rpcreplay/
  128. run/
  129. scheduler/
  130. secretmanager/
  131. securesourcemanager/
  132. security/
  133. securitycenter/
  134. securitycentermanagement/
  135. securityposture/
  136. servicecontrol/
  137. servicedirectory/
  138. servicehealth/
  139. servicemanagement/
  140. serviceusage/
  141. shell/
  142. shopping/
  143. spanner/
  144. speech/
  145. storage/
  146. storageinsights/
  147. storagetransfer/
  148. streetview/
  149. support/
  150. talent/
  151. telcoautomation/
  152. texttospeech/
  153. third_party/
  154. tpu/
  155. trace/
  156. translate/
  157. vertexai/
  158. video/
  159. videointelligence/
  160. vision/
  161. visionai/
  162. vmmigration/
  163. vmwareengine/
  164. vpcaccess/
  165. webrisk/
  166. websecurityscanner/
  167. workflows/
  168. workstations/
  169. .gitignore
  170. .release-please-manifest-individual.json
  171. .release-please-manifest-submodules.json
  172. .release-please-manifest.json
  173. CHANGES.md
  174. CODE_OF_CONDUCT.md
  175. CONTRIBUTING.md
  176. debug.md
  177. doc.go
  178. go.mod
  179. go.sum
  180. go.work
  181. go.work.sum
  182. LICENSE
  183. migration.md
  184. README.md
  185. release-please-config-individual.json
  186. release-please-config-yoshi-submodules.json
  187. release-please-config.json
  188. RELEASING.md
  189. SECURITY.md
  190. 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

Our libraries are compatible with at least the three most recent, major Go releases. They are currently compatible with:

  • Go 1.22
  • Go 1.21
  • Go 1.20

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:

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