|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| .github/ | H | 02-Apr-2021 | - | 350 | 318 |
| accessapproval/apiv1/ | H | 02-Apr-2021 | - | 800 | 529 |
| analytics/ | H | 02-Apr-2021 | - | 4,066 | 2,976 |
| apigateway/apiv1/ | H | 02-Apr-2021 | - | 2,008 | 1,379 |
| appengine/apiv1/ | H | 02-Apr-2021 | - | 4,737 | 3,003 |
| area120/tables/apiv1alpha1/ | H | 02-Apr-2021 | - | 1,111 | 793 |
| artifactregistry/apiv1beta2/ | H | 02-Apr-2021 | - | 2,148 | 1,549 |
| asset/ | H | 02-Apr-2021 | - | 2,999 | 2,097 |
| assuredworkloads/apiv1beta1/ | H | 02-Apr-2021 | - | 746 | 504 |
| automl/ | H | 02-Apr-2021 | - | 9,872 | 7,187 |
| bigquery/ | H | 02-Apr-2021 | - | 60,555 | 52,663 |
| bigtable/ | H | 02-Apr-2021 | - | 19,340 | 15,555 |
| billing/ | H | 02-Apr-2021 | - | 2,897 | 1,983 |
| binaryauthorization/apiv1beta1/ | H | 02-Apr-2021 | - | 808 | 565 |
| channel/apiv1/ | H | 02-Apr-2021 | - | 4,497 | 2,721 |
| civil/ | H | 02-Apr-2021 | - | 721 | 544 |
| cloudbuild/apiv1/ | H | 02-Apr-2021 | - | 3,927 | 2,833 |
| cloudtasks/ | H | 02-Apr-2021 | - | 8,647 | 6,346 |
| cmd/go-cloud-debug-agent/ | H | 02-Apr-2021 | - | 23,242 | 19,089 |
| compute/metadata/ | H | 02-Apr-2021 | - | 697 | 426 |
| container/ | H | 02-Apr-2021 | - | 5,323 | 4,226 |
| containeranalysis/ | H | 02-Apr-2021 | - | 4,382 | 3,214 |
| datacatalog/ | H | 02-Apr-2021 | - | 6,735 | 4,746 |
| datalabeling/apiv1beta1/ | H | 02-Apr-2021 | - | 3,296 | 2,434 |
| dataproc/ | H | 02-Apr-2021 | - | 10,603 | 7,718 |
| dataqna/apiv1alpha/ | H | 02-Apr-2021 | - | 829 | 530 |
| datastore/ | H | 03-May-2022 | - | 15,126 | 11,955 |
| debugger/apiv2/ | H | 02-Apr-2021 | - | 1,686 | 1,180 |
| dialogflow/ | H | 02-Apr-2021 | - | 31,417 | 22,666 |
| dlp/apiv2/ | H | 02-Apr-2021 | - | 4,871 | 3,743 |
| documentai/ | H | 02-Apr-2021 | - | 1,326 | 850 |
| domains/apiv1beta1/ | H | 02-Apr-2021 | - | 1,548 | 988 |
| errorreporting/ | H | 02-Apr-2021 | - | 2,413 | 1,635 |
| firestore/ | H | 02-Apr-2021 | - | 32,674 | 27,400 |
| functions/ | H | 02-Apr-2021 | - | 1,563 | 1,040 |
| gaming/ | H | 02-Apr-2021 | - | 7,138 | 4,840 |
| gkehub/apiv1beta1/ | H | 02-Apr-2021 | - | 1,098 | 754 |
| grafeas/apiv1/ | H | 02-Apr-2021 | - | 2,158 | 1,621 |
| httpreplay/ | H | 02-Apr-2021 | - | 2,471 | 1,849 |
| iam/ | H | 02-Apr-2021 | - | 4,380 | 3,221 |
| internal/ | H | 02-Apr-2021 | - | 17,808 | 14,250 |
| iot/apiv1/ | H | 02-Apr-2021 | - | 3,089 | 2,374 |
| kms/apiv1/ | H | 02-Apr-2021 | - | 4,079 | 3,128 |
| language/ | H | 02-Apr-2021 | - | 2,514 | 1,818 |
| logging/ | H | 02-Apr-2021 | - | 11,022 | 8,080 |
| longrunning/ | H | 02-Apr-2021 | - | 1,629 | 1,094 |
| managedidentities/apiv1/ | H | 02-Apr-2021 | - | 1,449 | 931 |
| mediatranslation/apiv1beta1/ | H | 02-Apr-2021 | - | 361 | 222 |
| memcache/ | H | 02-Apr-2021 | - | 2,388 | 1,532 |
| metastore/ | H | 02-Apr-2021 | - | 4,040 | 2,734 |
| monitoring/ | H | 02-Apr-2021 | - | 13,549 | 9,834 |
| networkconnectivity/apiv1alpha1/ | H | 02-Apr-2021 | - | 1,437 | 966 |
| notebooks/apiv1beta1/ | H | 02-Apr-2021 | - | 2,449 | 1,636 |
| orgpolicy/apiv2/ | H | 02-Apr-2021 | - | 912 | 627 |
| osconfig/ | H | 02-Apr-2021 | - | 3,797 | 2,774 |
| oslogin/ | H | 02-Apr-2021 | - | 2,362 | 1,730 |
| phishingprotection/apiv1beta1/ | H | 02-Apr-2021 | - | 521 | 323 |
| policytroubleshooter/apiv1/ | H | 02-Apr-2021 | - | 352 | 212 |
| profiler/ | H | 02-Apr-2021 | - | 3,609 | 2,797 |
| pubsub/ | H | 02-Apr-2021 | - | 29,469 | 24,404 |
| pubsublite/ | H | 02-Apr-2021 | - | 19,627 | 14,056 |
| recaptchaenterprise/ | H | 02-Apr-2021 | - | 2,042 | 1,468 |
| recommendationengine/apiv1beta1/ | H | 02-Apr-2021 | - | 2,324 | 1,585 |
| recommender/ | H | 02-Apr-2021 | - | 2,355 | 1,659 |
| redis/ | H | 02-Apr-2021 | - | 4,865 | 3,509 |
| resourcemanager/apiv2/ | H | 02-Apr-2021 | - | 1,176 | 736 |
| resourcesettings/apiv1/ | H | 02-Apr-2021 | - | 925 | 627 |
| retail/apiv2/ | H | 02-Apr-2021 | - | 2,061 | 1,373 |
| rpcreplay/ | H | 02-Apr-2021 | - | 2,643 | 1,994 |
| scheduler/ | H | 02-Apr-2021 | - | 3,083 | 2,273 |
| secretmanager/ | H | 02-Apr-2021 | - | 2,600 | 1,798 |
| security/privateca/apiv1beta1/ | H | 02-Apr-2021 | - | 2,459 | 1,772 |
| securitycenter/ | H | 02-Apr-2021 | - | 10,157 | 7,718 |
| servicecontrol/apiv1/ | H | 02-Apr-2021 | - | 660 | 376 |
| servicedirectory/ | H | 02-Apr-2021 | - | 3,687 | 2,740 |
| servicemanagement/apiv1/ | H | 02-Apr-2021 | - | 1,877 | 1,229 |
| spanner/ | H | 02-Apr-2021 | - | 54,262 | 42,264 |
| speech/ | H | 02-Apr-2021 | - | 2,896 | 2,045 |
| storage/ | H | 02-Apr-2021 | - | 47,295 | 43,172 |
| talent/ | H | 02-Apr-2021 | - | 9,402 | 6,820 |
| texttospeech/apiv1/ | H | 02-Apr-2021 | - | 735 | 490 |
| third_party/ | H | 02-Apr-2021 | - | 4,401 | 2,894 |
| trace/ | H | 02-Apr-2021 | - | 1,756 | 1,160 |
| translate/ | H | 02-Apr-2021 | - | 2,522 | 1,845 |
| video/transcoder/apiv1beta1/ | H | 02-Apr-2021 | - | 836 | 583 |
| videointelligence/ | H | 02-Apr-2021 | - | 1,375 | 870 |
| vision/ | H | 02-Apr-2021 | - | 6,058 | 4,422 |
| webrisk/ | H | 02-Apr-2021 | - | 1,339 | 908 |
| websecurityscanner/apiv1/ | H | 02-Apr-2021 | - | 1,332 | 985 |
| workflows/ | H | 02-Apr-2021 | - | 1,413 | 906 |
| .gitignore | H A D | 02-Apr-2021 | 92 | 13 | 10 |
| CHANGES.md | H A D | 02-Apr-2021 | 95.6 KiB | 1,981 | 1,554 |
| CODE_OF_CONDUCT.md | H A D | 02-Apr-2021 | 1.9 KiB | 45 | 35 |
| CONTRIBUTING.md | H A D | 02-Apr-2021 | 12 KiB | 304 | 235 |
| LICENSE | H A D | 02-Apr-2021 | 11.1 KiB | 203 | 169 |
| README.md | H A D | 02-Apr-2021 | 13.9 KiB | 186 | 159 |
| RELEASING.md | H A D | 02-Apr-2021 | 6.5 KiB | 142 | 121 |
| doc.go | H A D | 02-Apr-2021 | 4.7 KiB | 124 | 1 |
| examples_test.go | H A D | 02-Apr-2021 | 4.2 KiB | 118 | 54 |
| go.mod | H A D | 02-Apr-2021 | 734 | 24 | 21 |
| go.sum | H A D | 02-Apr-2021 | 46.1 KiB | 471 | 470 |
| header_test.go | H A D | 02-Apr-2021 | 2.5 KiB | 92 | 63 |
| testing.md | H A D | 02-Apr-2021 | 8.9 KiB | 237 | 199 |
| tools.go | H A D | 02-Apr-2021 | 1.2 KiB | 32 | 7 |
README.md
1# Google Cloud Client Libraries for Go
2
3[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go.svg)](https://pkg.go.dev/cloud.google.com/go)
4
5Go packages for [Google Cloud Platform](https://cloud.google.com) services.
6
7``` go
8import "cloud.google.com/go"
9```
10
11To install the packages on your system, *do not clone the repo*. Instead:
12
131. Change to your project directory:
14
15 ```
16 cd /my/cloud/project
17 ```
181. Get the package you want to use. Some products have their own module, so it's
19 best to `go get` the package(s) you want to use:
20
21 ```
22 $ go get cloud.google.com/go/firestore # Replace with the package you want to use.
23 ```
24
25**NOTE:** Some of these packages are under development, and may occasionally
26make backwards-incompatible changes.
27
28## Supported APIs
29
30| Google API | Status | Package |
31| ----------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
32| [Asset][cloud-asset] | stable | [`cloud.google.com/go/asset/apiv1`](https://pkg.go.dev/cloud.google.com/go/asset/v1beta) |
33| [Automl][cloud-automl] | stable | [`cloud.google.com/go/automl/apiv1`](https://pkg.go.dev/cloud.google.com/go/automl/apiv1) |
34| [BigQuery][cloud-bigquery] | stable | [`cloud.google.com/go/bigquery`](https://pkg.go.dev/cloud.google.com/go/bigquery) |
35| [Bigtable][cloud-bigtable] | stable | [`cloud.google.com/go/bigtable`](https://pkg.go.dev/cloud.google.com/go/bigtable) |
36| [Cloudbuild][cloud-build] | stable | [`cloud.google.com/go/cloudbuild/apiv1`](https://pkg.go.dev/cloud.google.com/go/cloudbuild/apiv1) |
37| [Cloudtasks][cloud-tasks] | stable | [`cloud.google.com/go/cloudtasks/apiv2`](https://pkg.go.dev/cloud.google.com/go/cloudtasks/apiv2) |
38| [Container][cloud-container] | stable | [`cloud.google.com/go/container/apiv1`](https://pkg.go.dev/cloud.google.com/go/container/apiv1) |
39| [ContainerAnalysis][cloud-containeranalysis] | beta | [`cloud.google.com/go/containeranalysis/apiv1`](https://pkg.go.dev/cloud.google.com/go/containeranalysis/apiv1) |
40| [Dataproc][cloud-dataproc] | stable | [`cloud.google.com/go/dataproc/apiv1`](https://pkg.go.dev/cloud.google.com/go/dataproc/apiv1) |
41| [Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`](https://pkg.go.dev/cloud.google.com/go/datastore) |
42| [Debugger][cloud-debugger] | stable | [`cloud.google.com/go/debugger/apiv2`](https://pkg.go.dev/cloud.google.com/go/debugger/apiv2) |
43| [Dialogflow][cloud-dialogflow] | stable | [`cloud.google.com/go/dialogflow/apiv2`](https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2) |
44| [Data Loss Prevention][cloud-dlp] | stable | [`cloud.google.com/go/dlp/apiv2`](https://pkg.go.dev/cloud.google.com/go/dlp/apiv2) |
45| [ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`](https://pkg.go.dev/cloud.google.com/go/errorreporting) |
46| [Firestore][cloud-firestore] | stable | [`cloud.google.com/go/firestore`](https://pkg.go.dev/cloud.google.com/go/firestore) |
47| [IAM][cloud-iam] | stable | [`cloud.google.com/go/iam`](https://pkg.go.dev/cloud.google.com/go/iam) |
48| [IoT][cloud-iot] | stable | [`cloud.google.com/go/iot/apiv1`](https://pkg.go.dev/cloud.google.com/go/iot/apiv1) |
49| [IRM][cloud-irm] | alpha | [`cloud.google.com/go/irm/apiv1alpha2`](https://pkg.go.dev/cloud.google.com/go/irm/apiv1alpha2) |
50| [KMS][cloud-kms] | stable | [`cloud.google.com/go/kms/apiv1`](https://pkg.go.dev/cloud.google.com/go/kms/apiv1) |
51| [Natural Language][cloud-natural-language] | stable | [`cloud.google.com/go/language/apiv1`](https://pkg.go.dev/cloud.google.com/go/language/apiv1) |
52| [Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`](https://pkg.go.dev/cloud.google.com/go/logging) |
53| [Memorystore][cloud-memorystore] | alpha | [`cloud.google.com/go/redis/apiv1`](https://pkg.go.dev/cloud.google.com/go/redis/apiv1) |
54| [Monitoring][cloud-monitoring] | stable | [`cloud.google.com/go/monitoring/apiv3`](https://pkg.go.dev/cloud.google.com/go/monitoring/apiv3) |
55| [OS Login][cloud-oslogin] | stable | [`cloud.google.com/go/oslogin/apiv1`](https://pkg.go.dev/cloud.google.com/go/oslogin/apiv1) |
56| [Pub/Sub][cloud-pubsub] | stable | [`cloud.google.com/go/pubsub`](https://pkg.go.dev/cloud.google.com/go/pubsub) |
57| [Pub/Sub Lite][cloud-pubsublite] | beta | [`cloud.google.com/go/pubsublite`](https://pkg.go.dev/cloud.google.com/go/pubsublite) |
58| [Phishing Protection][cloud-phishingprotection] | alpha | [`cloud.google.com/go/phishingprotection/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/phishingprotection/apiv1beta1) |
59| [reCAPTCHA Enterprise][cloud-recaptcha] | alpha | [`cloud.google.com/go/recaptchaenterprise/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/recaptchaenterprise/apiv1beta1) |
60| [Recommender][cloud-recommender] | beta | [`cloud.google.com/go/recommender/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/recommender/apiv1beta1) |
61| [Scheduler][cloud-scheduler] | stable | [`cloud.google.com/go/scheduler/apiv1`](https://pkg.go.dev/cloud.google.com/go/scheduler/apiv1) |
62| [Securitycenter][cloud-securitycenter] | stable | [`cloud.google.com/go/securitycenter/apiv1`](https://pkg.go.dev/cloud.google.com/go/securitycenter/apiv1) |
63| [Spanner][cloud-spanner] | stable | [`cloud.google.com/go/spanner`](https://pkg.go.dev/cloud.google.com/go/spanner) |
64| [Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`](https://pkg.go.dev/cloud.google.com/go/speech/apiv1) |
65| [Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`](https://pkg.go.dev/cloud.google.com/go/storage) |
66| [Talent][cloud-talent] | alpha | [`cloud.google.com/go/talent/apiv4beta1`](https://pkg.go.dev/cloud.google.com/go/talent/apiv4beta1) |
67| [Text To Speech][cloud-texttospeech] | stable | [`cloud.google.com/go/texttospeech/apiv1`](https://pkg.go.dev/cloud.google.com/go/texttospeech/apiv1) |
68| [Trace][cloud-trace] | stable | [`cloud.google.com/go/trace/apiv2`](https://pkg.go.dev/cloud.google.com/go/trace/apiv2) |
69| [Translate][cloud-translate] | stable | [`cloud.google.com/go/translate`](https://pkg.go.dev/cloud.google.com/go/translate) |
70| [Video Intelligence][cloud-video] | beta | [`cloud.google.com/go/videointelligence/apiv1beta2`](https://pkg.go.dev/cloud.google.com/go/videointelligence/apiv1beta2) |
71| [Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`](https://pkg.go.dev/cloud.google.com/go/vision/apiv1) |
72| [Webrisk][cloud-webrisk] | alpha | [`cloud.google.com/go/webrisk/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/webrisk/apiv1beta1) |
73
74> **Alpha status**: the API is still being actively developed. As a
75> result, it might change in backward-incompatible ways and is not recommended
76> for production use.
77>
78> **Beta status**: the API is largely complete, but still has outstanding
79> features and bugs to be addressed. There may be minor backwards-incompatible
80> changes where necessary.
81>
82> **Stable status**: the API is mature and ready for production use. We will
83> continue addressing bugs and feature requests.
84
85Documentation and examples are available at [pkg.go.dev/cloud.google.com/go](https://pkg.go.dev/cloud.google.com/go)
86
87## [Go Versions Supported](#supported-versions)
88
89We currently support Go versions 1.11 and newer.
90
91## Authorization
92
93By default, each API will use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)
94for authorization credentials used in calling the API endpoints. This will allow your
95application to run in many environments without requiring explicit configuration.
96
97[snip]:# (auth)
98```go
99client, err := storage.NewClient(ctx)
100```
101
102To authorize using a
103[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
104pass
105[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile)
106to the `NewClient` function of the desired package. For example:
107
108[snip]:# (auth-JSON)
109```go
110client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))
111```
112
113You can exert more control over authorization by using the
114[`golang.org/x/oauth2`](https://pkg.go.dev/golang.org/x/oauth2) package to
115create an `oauth2.TokenSource`. Then pass
116[`option.WithTokenSource`](https://pkg.go.dev/google.golang.org/api/option#WithTokenSource)
117to the `NewClient` function:
118[snip]:# (auth-ts)
119```go
120tokenSource := ...
121client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
122```
123
124## Contributing
125
126Contributions are welcome. Please, see the
127[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md)
128document for details.
129
130Please note that this project is released with a Contributor Code of Conduct.
131By participating in this project you agree to abide by its terms.
132See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct)
133for more information.
134
135[cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory
136[cloud-automl]: https://cloud.google.com/automl
137[cloud-build]: https://cloud.google.com/cloud-build/
138[cloud-bigquery]: https://cloud.google.com/bigquery/
139[cloud-bigtable]: https://cloud.google.com/bigtable/
140[cloud-container]: https://cloud.google.com/containers/
141[cloud-containeranalysis]: https://cloud.google.com/container-registry/docs/container-analysis
142[cloud-dataproc]: https://cloud.google.com/dataproc/
143[cloud-datastore]: https://cloud.google.com/datastore/
144[cloud-dialogflow]: https://cloud.google.com/dialogflow-enterprise/
145[cloud-debugger]: https://cloud.google.com/debugger/
146[cloud-dlp]: https://cloud.google.com/dlp/
147[cloud-errors]: https://cloud.google.com/error-reporting/
148[cloud-firestore]: https://cloud.google.com/firestore/
149[cloud-iam]: https://cloud.google.com/iam/
150[cloud-iot]: https://cloud.google.com/iot-core/
151[cloud-irm]: https://cloud.google.com/incident-response/docs/concepts
152[cloud-kms]: https://cloud.google.com/kms/
153[cloud-pubsub]: https://cloud.google.com/pubsub/
154[cloud-pubsublite]: https://cloud.google.com/pubsub/lite
155[cloud-storage]: https://cloud.google.com/storage/
156[cloud-language]: https://cloud.google.com/natural-language
157[cloud-logging]: https://cloud.google.com/logging/
158[cloud-natural-language]: https://cloud.google.com/natural-language/
159[cloud-memorystore]: https://cloud.google.com/memorystore/
160[cloud-monitoring]: https://cloud.google.com/monitoring/
161[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest
162[cloud-phishingprotection]: https://cloud.google.com/phishing-protection/
163[cloud-securitycenter]: https://cloud.google.com/security-command-center/
164[cloud-scheduler]: https://cloud.google.com/scheduler
165[cloud-spanner]: https://cloud.google.com/spanner/
166[cloud-speech]: https://cloud.google.com/speech
167[cloud-talent]: https://cloud.google.com/solutions/talent-solution/
168[cloud-tasks]: https://cloud.google.com/tasks/
169[cloud-texttospeech]: https://cloud.google.com/texttospeech/
170[cloud-talent]: https://cloud.google.com/solutions/talent-solution/
171[cloud-trace]: https://cloud.google.com/trace/
172[cloud-translate]: https://cloud.google.com/translate
173[cloud-recaptcha]: https://cloud.google.com/recaptcha-enterprise/
174[cloud-recommender]: https://cloud.google.com/recommendations/
175[cloud-video]: https://cloud.google.com/video-intelligence/
176[cloud-vision]: https://cloud.google.com/vision
177[cloud-webrisk]: https://cloud.google.com/web-risk/
178
179## Links
180
181- [Go on Google Cloud](https://cloud.google.com/go/home)
182- [Getting started with Go on Google Cloud](https://cloud.google.com/go/getting-started)
183- [App Engine Quickstart](https://cloud.google.com/appengine/docs/standard/go/quickstart)
184- [Cloud Functions Quickstart](https://cloud.google.com/functions/docs/quickstart-go)
185- [Cloud Run Quickstart](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#go)
186