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

..03-May-2022-

.github/H02-Sep-2021-

accessapproval/H02-Sep-2021-

aiplatform/H02-Sep-2021-

analytics/H02-Sep-2021-

apigateway/H02-Sep-2021-

apigeeconnect/H02-Sep-2021-

appengine/H02-Sep-2021-

area120/H02-Sep-2021-

artifactregistry/H02-Sep-2021-

asset/H02-Sep-2021-

assuredworkloads/H02-Sep-2021-

automl/H02-Sep-2021-

bigquery/H02-Sep-2021-

bigtable/H02-Sep-2021-

billing/H02-Sep-2021-

binaryauthorization/H02-Sep-2021-

channel/H02-Sep-2021-

civil/H02-Sep-2021-

cloudbuild/H02-Sep-2021-

clouddms/H02-Sep-2021-

cloudtasks/H02-Sep-2021-

cmd/go-cloud-debug-agent/H02-Sep-2021-

compute/H02-Sep-2021-

container/H02-Sep-2021-

containeranalysis/H02-Sep-2021-

datacatalog/H02-Sep-2021-

dataflow/H02-Sep-2021-

datafusion/H02-Sep-2021-

datalabeling/H02-Sep-2021-

dataproc/H02-Sep-2021-

dataqna/H02-Sep-2021-

datastore/H03-May-2022-

datastream/H02-Sep-2021-

debugger/apiv2/H02-Sep-2021-

dialogflow/H02-Sep-2021-

dlp/H02-Sep-2021-

documentai/H02-Sep-2021-

domains/H02-Sep-2021-

errorreporting/H02-Sep-2021-

essentialcontacts/H02-Sep-2021-

eventarc/H02-Sep-2021-

firestore/H02-Sep-2021-

functions/H02-Sep-2021-

gaming/H02-Sep-2021-

gkeconnect/H02-Sep-2021-

gkehub/H02-Sep-2021-

grafeas/H02-Sep-2021-

gsuiteaddons/H02-Sep-2021-

httpreplay/H02-Sep-2021-

iam/H02-Sep-2021-

iap/H02-Sep-2021-

internal/H02-Sep-2021-

iot/H02-Sep-2021-

kms/H02-Sep-2021-

language/H02-Sep-2021-

lifesciences/H02-Sep-2021-

logging/H02-Sep-2021-

longrunning/H02-Sep-2021-

managedidentities/H02-Sep-2021-

mediatranslation/H02-Sep-2021-

memcache/H02-Sep-2021-

metastore/H02-Sep-2021-

monitoring/H02-Sep-2021-

networkconnectivity/H02-Sep-2021-

networkmanagement/H02-Sep-2021-

notebooks/H02-Sep-2021-

orgpolicy/H02-Sep-2021-

osconfig/H02-Sep-2021-

oslogin/H02-Sep-2021-

phishingprotection/H02-Sep-2021-

policytroubleshooter/H02-Sep-2021-

privatecatalog/H02-Sep-2021-

profiler/H02-Sep-2021-

pubsub/H02-Sep-2021-

pubsublite/H02-Sep-2021-

recaptchaenterprise/H02-Sep-2021-

recommendationengine/H02-Sep-2021-

recommender/H02-Sep-2021-

redis/H02-Sep-2021-

resourcemanager/H02-Sep-2021-

resourcesettings/H02-Sep-2021-

retail/H02-Sep-2021-

rpcreplay/H02-Sep-2021-

scheduler/H02-Sep-2021-

secretmanager/H02-Sep-2021-

security/H02-Sep-2021-

securitycenter/H02-Sep-2021-

servicecontrol/H02-Sep-2021-

servicedirectory/H02-Sep-2021-

servicemanagement/H02-Sep-2021-

serviceusage/H02-Sep-2021-

shell/H02-Sep-2021-

spanner/H02-Sep-2021-

speech/H02-Sep-2021-

storage/H02-Sep-2021-

storagetransfer/H02-Sep-2021-

talent/H02-Sep-2021-

texttospeech/H02-Sep-2021-

third_party/H02-Sep-2021-

tpu/H02-Sep-2021-

trace/H02-Sep-2021-

translate/H02-Sep-2021-

video/H02-Sep-2021-

videointelligence/H02-Sep-2021-

vision/H02-Sep-2021-

vpcaccess/H02-Sep-2021-

webrisk/H02-Sep-2021-

websecurityscanner/H02-Sep-2021-

workflows/H02-Sep-2021-

.gitignoreH A D02-Sep-202192

CHANGES.mdH A D02-Sep-2021126.6 KiB

CODE_OF_CONDUCT.mdH A D02-Sep-20211.9 KiB

CONTRIBUTING.mdH A D02-Sep-202113.3 KiB

LICENSEH A D02-Sep-202111.1 KiB

README.mdH A D02-Sep-202114.2 KiB

RELEASING.mdH A D02-Sep-20216.5 KiB

SECURITY.mdH A D02-Sep-2021329

doc.goH A D02-Sep-20217.9 KiB

go.modH A D02-Sep-2021475

go.sumH A D02-Sep-202153.3 KiB

header_test.goH A D02-Sep-20212.5 KiB

testing.mdH A D02-Sep-20218.9 KiB

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   ```bash
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| [Compute Engine][cloud-compute]                 | alpha  | [`cloud.google.com/go/compute/apiv1`](https://pkg.go.dev/cloud.google.com/go/compute/apiv1)                                   |
39| [Container][cloud-container]                    | stable | [`cloud.google.com/go/container/apiv1`](https://pkg.go.dev/cloud.google.com/go/container/apiv1)                               |
40| [ContainerAnalysis][cloud-containeranalysis]    | beta   | [`cloud.google.com/go/containeranalysis/apiv1`](https://pkg.go.dev/cloud.google.com/go/containeranalysis/apiv1)               |
41| [Dataproc][cloud-dataproc]                      | stable | [`cloud.google.com/go/dataproc/apiv1`](https://pkg.go.dev/cloud.google.com/go/dataproc/apiv1)                                 |
42| [Datastore][cloud-datastore]                    | stable | [`cloud.google.com/go/datastore`](https://pkg.go.dev/cloud.google.com/go/datastore)                                           |
43| [Debugger][cloud-debugger]                      | stable | [`cloud.google.com/go/debugger/apiv2`](https://pkg.go.dev/cloud.google.com/go/debugger/apiv2)                                 |
44| [Dialogflow][cloud-dialogflow]                  | stable | [`cloud.google.com/go/dialogflow/apiv2`](https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2)                             |
45| [Data Loss Prevention][cloud-dlp]               | stable | [`cloud.google.com/go/dlp/apiv2`](https://pkg.go.dev/cloud.google.com/go/dlp/apiv2)                                           |
46| [ErrorReporting][cloud-errors]                  | alpha  | [`cloud.google.com/go/errorreporting`](https://pkg.go.dev/cloud.google.com/go/errorreporting)                                 |
47| [Firestore][cloud-firestore]                    | stable | [`cloud.google.com/go/firestore`](https://pkg.go.dev/cloud.google.com/go/firestore)                                           |
48| [IAM][cloud-iam]                                | stable | [`cloud.google.com/go/iam`](https://pkg.go.dev/cloud.google.com/go/iam)                                                       |
49| [IoT][cloud-iot]                                | stable | [`cloud.google.com/go/iot/apiv1`](https://pkg.go.dev/cloud.google.com/go/iot/apiv1)                                           |
50| [IRM][cloud-irm]                                | alpha  | [`cloud.google.com/go/irm/apiv1alpha2`](https://pkg.go.dev/cloud.google.com/go/irm/apiv1alpha2)                               |
51| [KMS][cloud-kms]                                | stable | [`cloud.google.com/go/kms/apiv1`](https://pkg.go.dev/cloud.google.com/go/kms/apiv1)                                           |
52| [Natural Language][cloud-natural-language]      | stable | [`cloud.google.com/go/language/apiv1`](https://pkg.go.dev/cloud.google.com/go/language/apiv1)                                 |
53| [Logging][cloud-logging]                        | stable | [`cloud.google.com/go/logging`](https://pkg.go.dev/cloud.google.com/go/logging)                                               |
54| [Memorystore][cloud-memorystore]                | alpha  | [`cloud.google.com/go/redis/apiv1`](https://pkg.go.dev/cloud.google.com/go/redis/apiv1)                                       |
55| [Monitoring][cloud-monitoring]                  | stable | [`cloud.google.com/go/monitoring/apiv3`](https://pkg.go.dev/cloud.google.com/go/monitoring/apiv3)                             |
56| [OS Login][cloud-oslogin]                       | stable | [`cloud.google.com/go/oslogin/apiv1`](https://pkg.go.dev/cloud.google.com/go/oslogin/apiv1)                                   |
57| [Pub/Sub][cloud-pubsub]                         | stable | [`cloud.google.com/go/pubsub`](https://pkg.go.dev/cloud.google.com/go/pubsub)                                                 |
58| [Pub/Sub Lite][cloud-pubsublite]                | stable | [`cloud.google.com/go/pubsublite`](https://pkg.go.dev/cloud.google.com/go/pubsublite)                                         |
59| [Phishing Protection][cloud-phishingprotection] | alpha  | [`cloud.google.com/go/phishingprotection/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/phishingprotection/apiv1beta1)   |
60| [reCAPTCHA Enterprise][cloud-recaptcha]         | alpha  | [`cloud.google.com/go/recaptchaenterprise/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/recaptchaenterprise/apiv1beta1) |
61| [Recommender][cloud-recommender]                | beta   | [`cloud.google.com/go/recommender/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/recommender/apiv1beta1)                 |
62| [Scheduler][cloud-scheduler]                    | stable | [`cloud.google.com/go/scheduler/apiv1`](https://pkg.go.dev/cloud.google.com/go/scheduler/apiv1)                               |
63| [Securitycenter][cloud-securitycenter]          | stable | [`cloud.google.com/go/securitycenter/apiv1`](https://pkg.go.dev/cloud.google.com/go/securitycenter/apiv1)                     |
64| [Spanner][cloud-spanner]                        | stable | [`cloud.google.com/go/spanner`](https://pkg.go.dev/cloud.google.com/go/spanner)                                               |
65| [Speech][cloud-speech]                          | stable | [`cloud.google.com/go/speech/apiv1`](https://pkg.go.dev/cloud.google.com/go/speech/apiv1)                                     |
66| [Storage][cloud-storage]                        | stable | [`cloud.google.com/go/storage`](https://pkg.go.dev/cloud.google.com/go/storage)                                               |
67| [Talent][cloud-talent]                          | alpha  | [`cloud.google.com/go/talent/apiv4beta1`](https://pkg.go.dev/cloud.google.com/go/talent/apiv4beta1)                           |
68| [Text To Speech][cloud-texttospeech]            | stable | [`cloud.google.com/go/texttospeech/apiv1`](https://pkg.go.dev/cloud.google.com/go/texttospeech/apiv1)                         |
69| [Trace][cloud-trace]                            | stable | [`cloud.google.com/go/trace/apiv2`](https://pkg.go.dev/cloud.google.com/go/trace/apiv2)                                       |
70| [Translate][cloud-translate]                    | stable | [`cloud.google.com/go/translate`](https://pkg.go.dev/cloud.google.com/go/translate)                                           |
71| [Video Intelligence][cloud-video]               | beta   | [`cloud.google.com/go/videointelligence/apiv1beta2`](https://pkg.go.dev/cloud.google.com/go/videointelligence/apiv1beta2)     |
72| [Vision][cloud-vision]                          | stable | [`cloud.google.com/go/vision/apiv1`](https://pkg.go.dev/cloud.google.com/go/vision/apiv1)                                     |
73| [Webrisk][cloud-webrisk]                        | alpha  | [`cloud.google.com/go/webrisk/apiv1beta1`](https://pkg.go.dev/cloud.google.com/go/webrisk/apiv1beta1)                         |
74
75> **Alpha status**: the API is still being actively developed. As a
76> result, it might change in backward-incompatible ways and is not recommended
77> for production use.
78>
79> **Beta status**: the API is largely complete, but still has outstanding
80> features and bugs to be addressed. There may be minor backwards-incompatible
81> changes where necessary.
82>
83> **Stable status**: the API is mature and ready for production use. We will
84> continue addressing bugs and feature requests.
85
86Documentation and examples are available at [pkg.go.dev/cloud.google.com/go](https://pkg.go.dev/cloud.google.com/go)
87
88## [Go Versions Supported](#supported-versions)
89
90We currently support Go versions 1.11 and newer.
91
92## Authorization
93
94By default, each API will use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)
95for authorization credentials used in calling the API endpoints. This will allow your
96application to run in many environments without requiring explicit configuration.
97
98[snip]:# (auth)
99```go
100client, err := storage.NewClient(ctx)
101```
102
103To authorize using a
104[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
105pass
106[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile)
107to the `NewClient` function of the desired package. For example:
108
109[snip]:# (auth-JSON)
110```go
111client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))
112```
113
114You can exert more control over authorization by using the
115[`golang.org/x/oauth2`](https://pkg.go.dev/golang.org/x/oauth2) package to
116create an `oauth2.TokenSource`. Then pass
117[`option.WithTokenSource`](https://pkg.go.dev/google.golang.org/api/option#WithTokenSource)
118to the `NewClient` function:
119[snip]:# (auth-ts)
120```go
121tokenSource := ...
122client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
123```
124
125## Contributing
126
127Contributions are welcome. Please, see the
128[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md)
129document for details.
130
131Please note that this project is released with a Contributor Code of Conduct.
132By participating in this project you agree to abide by its terms.
133See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct)
134for more information.
135
136[cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory
137[cloud-automl]: https://cloud.google.com/automl
138[cloud-build]: https://cloud.google.com/cloud-build/
139[cloud-bigquery]: https://cloud.google.com/bigquery/
140[cloud-bigtable]: https://cloud.google.com/bigtable/
141[cloud-compute]: https://cloud.google.com/compute
142[cloud-container]: https://cloud.google.com/containers/
143[cloud-containeranalysis]: https://cloud.google.com/container-registry/docs/container-analysis
144[cloud-dataproc]: https://cloud.google.com/dataproc/
145[cloud-datastore]: https://cloud.google.com/datastore/
146[cloud-dialogflow]: https://cloud.google.com/dialogflow-enterprise/
147[cloud-debugger]: https://cloud.google.com/debugger/
148[cloud-dlp]: https://cloud.google.com/dlp/
149[cloud-errors]: https://cloud.google.com/error-reporting/
150[cloud-firestore]: https://cloud.google.com/firestore/
151[cloud-iam]: https://cloud.google.com/iam/
152[cloud-iot]: https://cloud.google.com/iot-core/
153[cloud-irm]: https://cloud.google.com/incident-response/docs/concepts
154[cloud-kms]: https://cloud.google.com/kms/
155[cloud-pubsub]: https://cloud.google.com/pubsub/
156[cloud-pubsublite]: https://cloud.google.com/pubsub/lite
157[cloud-storage]: https://cloud.google.com/storage/
158[cloud-language]: https://cloud.google.com/natural-language
159[cloud-logging]: https://cloud.google.com/logging/
160[cloud-natural-language]: https://cloud.google.com/natural-language/
161[cloud-memorystore]: https://cloud.google.com/memorystore/
162[cloud-monitoring]: https://cloud.google.com/monitoring/
163[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest
164[cloud-phishingprotection]: https://cloud.google.com/phishing-protection/
165[cloud-securitycenter]: https://cloud.google.com/security-command-center/
166[cloud-scheduler]: https://cloud.google.com/scheduler
167[cloud-spanner]: https://cloud.google.com/spanner/
168[cloud-speech]: https://cloud.google.com/speech
169[cloud-talent]: https://cloud.google.com/solutions/talent-solution/
170[cloud-tasks]: https://cloud.google.com/tasks/
171[cloud-texttospeech]: https://cloud.google.com/texttospeech/
172[cloud-talent]: https://cloud.google.com/solutions/talent-solution/
173[cloud-trace]: https://cloud.google.com/trace/
174[cloud-translate]: https://cloud.google.com/translate
175[cloud-recaptcha]: https://cloud.google.com/recaptcha-enterprise/
176[cloud-recommender]: https://cloud.google.com/recommendations/
177[cloud-video]: https://cloud.google.com/video-intelligence/
178[cloud-vision]: https://cloud.google.com/vision
179[cloud-webrisk]: https://cloud.google.com/web-risk/
180
181## Links
182
183- [Go on Google Cloud](https://cloud.google.com/go/home)
184- [Getting started with Go on Google Cloud](https://cloud.google.com/go/getting-started)
185- [App Engine Quickstart](https://cloud.google.com/appengine/docs/standard/go/quickstart)
186- [Cloud Functions Quickstart](https://cloud.google.com/functions/docs/quickstart-go)
187- [Cloud Run Quickstart](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#go)
188