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

..03-May-2022-

.github/H28-Jun-2021-355323

accessapproval/apiv1/H28-Jun-2021-908585

aiplatform/apiv1/H28-Jun-2021-7,8635,324

analytics/H28-Jun-2021-6,0184,650

apigateway/apiv1/H28-Jun-2021-2,1801,513

apigeeconnect/apiv1/H28-Jun-2021-787478

appengine/apiv1/H28-Jun-2021-5,3713,403

area120/tables/apiv1alpha1/H28-Jun-2021-1,219874

artifactregistry/apiv1beta2/H28-Jun-2021-2,3251,693

asset/H28-Jun-2021-3,3652,359

assuredworkloads/apiv1beta1/H28-Jun-2021-828556

automl/H28-Jun-2021-10,4307,589

bigquery/H28-Jun-2021-61,82253,736

bigtable/H28-Jun-2021-20,01416,087

billing/H28-Jun-2021-3,1732,177

binaryauthorization/apiv1beta1/H28-Jun-2021-906621

channel/apiv1/H28-Jun-2021-4,7983,007

civil/H28-Jun-2021-721544

cloudbuild/apiv1/H28-Jun-2021-4,0772,953

clouddms/apiv1/H28-Jun-2021-2,4041,624

cloudtasks/H28-Jun-2021-9,0086,669

cmd/go-cloud-debug-agent/H28-Jun-2021-23,24219,089

compute/metadata/H28-Jun-2021-697426

container/H28-Jun-2021-5,5004,407

containeranalysis/H28-Jun-2021-4,5853,361

datacatalog/H28-Jun-2021-7,3805,297

datalabeling/apiv1beta1/H28-Jun-2021-3,5332,651

dataproc/H28-Jun-2021-11,5808,380

dataqna/apiv1alpha/H28-Jun-2021-975602

datastore/H03-May-2022-15,31712,063

debugger/apiv2/H28-Jun-2021-1,8421,262

dialogflow/H28-Jun-2021-37,35326,736

dlp/apiv2/H28-Jun-2021-5,0703,934

documentai/H28-Jun-2021-2,0981,370

domains/apiv1beta1/H28-Jun-2021-1,7021,104

errorreporting/H28-Jun-2021-2,5761,728

essentialcontacts/apiv1/H28-Jun-2021-835594

firestore/H28-Jun-2021-33,29027,855

functions/H28-Jun-2021-1,6791,130

gaming/H28-Jun-2021-7,9385,390

gkeconnect/gateway/apiv1beta1/H28-Jun-2021-595385

gkehub/apiv1beta1/H28-Jun-2021-1,205829

grafeas/apiv1/H28-Jun-2021-2,1581,621

gsuiteaddons/apiv1/H28-Jun-2021-1,010699

httpreplay/H28-Jun-2021-2,4711,849

iam/H28-Jun-2021-4,4503,262

internal/H28-Jun-2021-125,99259,972

iot/apiv1/H28-Jun-2021-3,2132,490

kms/apiv1/H28-Jun-2021-4,3853,382

language/H28-Jun-2021-2,6581,920

lifesciences/apiv2beta/H28-Jun-2021-532300

logging/H28-Jun-2021-11,6768,610

longrunning/H28-Jun-2021-1,7081,140

managedidentities/apiv1/H28-Jun-2021-1,6271,032

mediatranslation/apiv1beta1/H28-Jun-2021-413248

memcache/H28-Jun-2021-2,6651,697

metastore/H28-Jun-2021-6,0464,077

monitoring/H28-Jun-2021-14,16510,257

networkconnectivity/apiv1alpha1/H28-Jun-2021-1,5741,063

notebooks/apiv1beta1/H28-Jun-2021-2,6751,810

orgpolicy/apiv2/H28-Jun-2021-1,005683

osconfig/H28-Jun-2021-5,8644,256

oslogin/H28-Jun-2021-2,5181,832

phishingprotection/apiv1beta1/H28-Jun-2021-573349

policytroubleshooter/apiv1/H28-Jun-2021-404238

privatecatalog/apiv1beta1/H28-Jun-2021-774484

profiler/H28-Jun-2021-3,6132,800

pubsub/H28-Jun-2021-30,59025,256

pubsublite/H28-Jun-2021-22,01415,817

recaptchaenterprise/H28-Jun-2021-2,1941,580

recommendationengine/apiv1beta1/H28-Jun-2021-2,6071,760

recommender/H28-Jun-2021-2,5151,781

redis/H28-Jun-2021-5,1773,701

resourcemanager/apiv2/H28-Jun-2021-1,286822

resourcesettings/apiv1/H28-Jun-2021-631385

retail/apiv2/H28-Jun-2021-2,3391,542

rpcreplay/H28-Jun-2021-2,8622,166

scheduler/H28-Jun-2021-3,2452,395

secretmanager/H28-Jun-2021-2,8341,996

security/privateca/H28-Jun-2021-6,4414,691

securitycenter/H28-Jun-2021-10,6908,205

servicecontrol/apiv1/H28-Jun-2021-770433

servicedirectory/H28-Jun-2021-4,0603,014

servicemanagement/apiv1/H28-Jun-2021-2,0391,355

serviceusage/apiv1/H28-Jun-2021-1,052674

shell/apiv1/H28-Jun-2021-1,012635

spanner/H28-Jun-2021-54,86842,729

speech/H28-Jun-2021-3,1282,200

storage/H28-Jun-2021-47,62943,424

talent/H28-Jun-2021-10,2367,371

texttospeech/apiv1/H28-Jun-2021-789521

third_party/H28-Jun-2021-4,4012,894

tpu/apiv1/H28-Jun-2021-1,5981,092

trace/H28-Jun-2021-1,8791,227

translate/H28-Jun-2021-2,6261,920

video/transcoder/apiv1beta1/H28-Jun-2021-923644

videointelligence/H28-Jun-2021-1,503934

vision/H28-Jun-2021-6,3574,625

vpcaccess/apiv1/H28-Jun-2021-823523

webrisk/H28-Jun-2021-1,463985

websecurityscanner/apiv1/H28-Jun-2021-1,4301,071

workflows/H28-Jun-2021-1,5731,007

.gitignoreH A D28-Jun-202192 1310

CHANGES.mdH A D28-Jun-2021106.7 KiB2,0621,615

CODE_OF_CONDUCT.mdH A D28-Jun-20211.9 KiB4535

CONTRIBUTING.mdH A D28-Jun-202113 KiB320250

LICENSEH A D28-Jun-202111.1 KiB203169

README.mdH A D28-Jun-202113.9 KiB186159

RELEASING.mdH A D28-Jun-20216.5 KiB142121

SECURITY.mdH A D28-Jun-2021329 84

doc.goH A D28-Jun-20214.7 KiB1241

examples_test.goH A D28-Jun-20214.2 KiB11854

go.modH A D28-Jun-2021717 2421

go.sumH A D28-Jun-202150.1 KiB513512

header_test.goH A D28-Jun-20212.5 KiB9263

testing.mdH A D28-Jun-20218.9 KiB237199

tools.goH A D28-Jun-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