• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H02-Apr-2021-350318

accessapproval/apiv1/H02-Apr-2021-800529

analytics/H02-Apr-2021-4,0662,976

apigateway/apiv1/H02-Apr-2021-2,0081,379

appengine/apiv1/H02-Apr-2021-4,7373,003

area120/tables/apiv1alpha1/H02-Apr-2021-1,111793

artifactregistry/apiv1beta2/H02-Apr-2021-2,1481,549

asset/H02-Apr-2021-2,9992,097

assuredworkloads/apiv1beta1/H02-Apr-2021-746504

automl/H02-Apr-2021-9,8727,187

bigquery/H02-Apr-2021-60,55552,663

bigtable/H02-Apr-2021-19,34015,555

billing/H02-Apr-2021-2,8971,983

binaryauthorization/apiv1beta1/H02-Apr-2021-808565

channel/apiv1/H02-Apr-2021-4,4972,721

civil/H02-Apr-2021-721544

cloudbuild/apiv1/H02-Apr-2021-3,9272,833

cloudtasks/H02-Apr-2021-8,6476,346

cmd/go-cloud-debug-agent/H02-Apr-2021-23,24219,089

compute/metadata/H02-Apr-2021-697426

container/H02-Apr-2021-5,3234,226

containeranalysis/H02-Apr-2021-4,3823,214

datacatalog/H02-Apr-2021-6,7354,746

datalabeling/apiv1beta1/H02-Apr-2021-3,2962,434

dataproc/H02-Apr-2021-10,6037,718

dataqna/apiv1alpha/H02-Apr-2021-829530

datastore/H03-May-2022-15,12611,955

debugger/apiv2/H02-Apr-2021-1,6861,180

dialogflow/H02-Apr-2021-31,41722,666

dlp/apiv2/H02-Apr-2021-4,8713,743

documentai/H02-Apr-2021-1,326850

domains/apiv1beta1/H02-Apr-2021-1,548988

errorreporting/H02-Apr-2021-2,4131,635

firestore/H02-Apr-2021-32,67427,400

functions/H02-Apr-2021-1,5631,040

gaming/H02-Apr-2021-7,1384,840

gkehub/apiv1beta1/H02-Apr-2021-1,098754

grafeas/apiv1/H02-Apr-2021-2,1581,621

httpreplay/H02-Apr-2021-2,4711,849

iam/H02-Apr-2021-4,3803,221

internal/H02-Apr-2021-17,80814,250

iot/apiv1/H02-Apr-2021-3,0892,374

kms/apiv1/H02-Apr-2021-4,0793,128

language/H02-Apr-2021-2,5141,818

logging/H02-Apr-2021-11,0228,080

longrunning/H02-Apr-2021-1,6291,094

managedidentities/apiv1/H02-Apr-2021-1,449931

mediatranslation/apiv1beta1/H02-Apr-2021-361222

memcache/H02-Apr-2021-2,3881,532

metastore/H02-Apr-2021-4,0402,734

monitoring/H02-Apr-2021-13,5499,834

networkconnectivity/apiv1alpha1/H02-Apr-2021-1,437966

notebooks/apiv1beta1/H02-Apr-2021-2,4491,636

orgpolicy/apiv2/H02-Apr-2021-912627

osconfig/H02-Apr-2021-3,7972,774

oslogin/H02-Apr-2021-2,3621,730

phishingprotection/apiv1beta1/H02-Apr-2021-521323

policytroubleshooter/apiv1/H02-Apr-2021-352212

profiler/H02-Apr-2021-3,6092,797

pubsub/H02-Apr-2021-29,46924,404

pubsublite/H02-Apr-2021-19,62714,056

recaptchaenterprise/H02-Apr-2021-2,0421,468

recommendationengine/apiv1beta1/H02-Apr-2021-2,3241,585

recommender/H02-Apr-2021-2,3551,659

redis/H02-Apr-2021-4,8653,509

resourcemanager/apiv2/H02-Apr-2021-1,176736

resourcesettings/apiv1/H02-Apr-2021-925627

retail/apiv2/H02-Apr-2021-2,0611,373

rpcreplay/H02-Apr-2021-2,6431,994

scheduler/H02-Apr-2021-3,0832,273

secretmanager/H02-Apr-2021-2,6001,798

security/privateca/apiv1beta1/H02-Apr-2021-2,4591,772

securitycenter/H02-Apr-2021-10,1577,718

servicecontrol/apiv1/H02-Apr-2021-660376

servicedirectory/H02-Apr-2021-3,6872,740

servicemanagement/apiv1/H02-Apr-2021-1,8771,229

spanner/H02-Apr-2021-54,26242,264

speech/H02-Apr-2021-2,8962,045

storage/H02-Apr-2021-47,29543,172

talent/H02-Apr-2021-9,4026,820

texttospeech/apiv1/H02-Apr-2021-735490

third_party/H02-Apr-2021-4,4012,894

trace/H02-Apr-2021-1,7561,160

translate/H02-Apr-2021-2,5221,845

video/transcoder/apiv1beta1/H02-Apr-2021-836583

videointelligence/H02-Apr-2021-1,375870

vision/H02-Apr-2021-6,0584,422

webrisk/H02-Apr-2021-1,339908

websecurityscanner/apiv1/H02-Apr-2021-1,332985

workflows/H02-Apr-2021-1,413906

.gitignoreH A D02-Apr-202192 1310

CHANGES.mdH A D02-Apr-202195.6 KiB1,9811,554

CODE_OF_CONDUCT.mdH A D02-Apr-20211.9 KiB4535

CONTRIBUTING.mdH A D02-Apr-202112 KiB304235

LICENSEH A D02-Apr-202111.1 KiB203169

README.mdH A D02-Apr-202113.9 KiB186159

RELEASING.mdH A D02-Apr-20216.5 KiB142121

doc.goH A D02-Apr-20214.7 KiB1241

examples_test.goH A D02-Apr-20214.2 KiB11854

go.modH A D02-Apr-2021734 2421

go.sumH A D02-Apr-202146.1 KiB471470

header_test.goH A D02-Apr-20212.5 KiB9263

testing.mdH A D02-Apr-20218.9 KiB237199

tools.goH A D02-Apr-20211.2 KiB327

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