|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| .github/ | H | 18-Jun-2020 | - | 102 | 74 |
| asset/ | H | 18-Jun-2020 | - | 2,841 | 1,905 |
| automl/ | H | 18-Jun-2020 | - | 9,326 | 6,657 |
| bigquery/ | H | 18-Jun-2020 | - | 58,096 | 50,487 |
| bigtable/ | H | 18-Jun-2020 | - | 18,190 | 14,614 |
| billing/apiv1/ | H | 18-Jun-2020 | - | 1,367 | 896 |
| civil/ | H | 18-Jun-2020 | - | 721 | 544 |
| cloudbuild/apiv1/ | H | 18-Jun-2020 | - | 3,654 | 2,577 |
| cloudtasks/ | H | 18-Jun-2020 | - | 8,032 | 5,745 |
| cmd/go-cloud-debug-agent/ | H | 18-Jun-2020 | - | 23,235 | 19,089 |
| compute/metadata/ | H | 18-Jun-2020 | - | 660 | 392 |
| container/ | H | 18-Jun-2020 | - | 4,924 | 3,850 |
| containeranalysis/ | H | 18-Jun-2020 | - | 4,169 | 3,008 |
| datacatalog/ | H | 18-Jun-2020 | - | 4,724 | 3,142 |
| dataproc/ | H | 18-Jun-2020 | - | 9,952 | 7,072 |
| datastore/ | H | 03-May-2022 | - | 14,447 | 11,423 |
| debugger/apiv2/ | H | 18-Jun-2020 | - | 1,532 | 1,035 |
| dialogflow/apiv2/ | H | 18-Jun-2020 | - | 7,748 | 5,505 |
| dlp/apiv2/ | H | 18-Jun-2020 | - | 4,546 | 3,424 |
| errorreporting/ | H | 18-Jun-2020 | - | 2,271 | 1,511 |
| expr/apiv1alpha1/ | H | 18-Jun-2020 | - | 1,159 | 750 |
| firestore/ | H | 18-Jun-2020 | - | 32,232 | 27,005 |
| functions/metadata/ | H | 18-Jun-2020 | - | 273 | 168 |
| grafeas/apiv1/ | H | 18-Jun-2020 | - | 2,158 | 1,621 |
| httpreplay/ | H | 18-Jun-2020 | - | 2,422 | 1,804 |
| iam/ | H | 18-Jun-2020 | - | 4,297 | 3,144 |
| internal/ | H | 18-Jun-2020 | - | 9,550 | 7,028 |
| iot/apiv1/ | H | 18-Jun-2020 | - | 2,866 | 2,157 |
| irm/apiv1alpha2/ | H | 18-Jun-2020 | - | 4,874 | 3,741 |
| kms/apiv1/ | H | 18-Jun-2020 | - | 3,847 | 2,902 |
| language/ | H | 18-Jun-2020 | - | 2,310 | 1,624 |
| logging/ | H | 18-Jun-2020 | - | 10,106 | 7,321 |
| longrunning/ | H | 18-Jun-2020 | - | 1,548 | 1,017 |
| memcache/apiv1beta2/ | H | 18-Jun-2020 | - | 1,025 | 622 |
| monitoring/apiv3/ | H | 18-Jun-2020 | - | 12,040 | 8,680 |
| osconfig/ | H | 18-Jun-2020 | - | 3,268 | 2,273 |
| oslogin/ | H | 18-Jun-2020 | - | 2,158 | 1,536 |
| phishingprotection/apiv1beta1/ | H | 18-Jun-2020 | - | 469 | 275 |
| profiler/ | H | 18-Jun-2020 | - | 3,496 | 2,723 |
| pubsub/ | H | 18-Jun-2020 | - | 27,961 | 23,203 |
| recaptchaenterprise/ | H | 18-Jun-2020 | - | 1,828 | 1,262 |
| recommender/ | H | 18-Jun-2020 | - | 1,905 | 1,280 |
| redis/ | H | 18-Jun-2020 | - | 4,495 | 3,191 |
| rpcreplay/ | H | 18-Jun-2020 | - | 2,643 | 1,994 |
| scheduler/ | H | 18-Jun-2020 | - | 2,849 | 2,049 |
| secretmanager/ | H | 18-Jun-2020 | - | 2,236 | 1,444 |
| securitycenter/ | H | 18-Jun-2020 | - | 9,316 | 6,895 |
| servicedirectory/apiv1beta1/ | H | 18-Jun-2020 | - | 1,606 | 1,140 |
| spanner/ | H | 18-Jun-2020 | - | 48,523 | 37,430 |
| speech/ | H | 18-Jun-2020 | - | 1,998 | 1,376 |
| storage/ | H | 18-Jun-2020 | - | 46,772 | 42,788 |
| talent/apiv4beta1/ | H | 18-Jun-2020 | - | 6,242 | 4,539 |
| texttospeech/apiv1/ | H | 18-Jun-2020 | - | 672 | 433 |
| trace/ | H | 18-Jun-2020 | - | 1,620 | 1,036 |
| translate/ | H | 18-Jun-2020 | - | 2,404 | 1,733 |
| videointelligence/ | H | 18-Jun-2020 | - | 1,271 | 776 |
| vision/ | H | 18-Jun-2020 | - | 5,733 | 4,110 |
| webrisk/ | H | 18-Jun-2020 | - | 1,187 | 764 |
| .gitignore | H A D | 18-Jun-2020 | 83 | 12 | 9 |
| CHANGES.md | H A D | 18-Jun-2020 | 46 KiB | 1,517 | 1,240 |
| CODE_OF_CONDUCT.md | H A D | 18-Jun-2020 | 1.9 KiB | 45 | 35 |
| CONTRIBUTING.md | H A D | 18-Jun-2020 | 10 KiB | 251 | 196 |
| LICENSE | H A D | 18-Jun-2020 | 11.1 KiB | 203 | 169 |
| README.md | H A D | 18-Jun-2020 | 12.1 KiB | 179 | 153 |
| RELEASING.md | H A D | 18-Jun-2020 | 5.2 KiB | 129 | 105 |
| doc.go | H A D | 18-Jun-2020 | 3.7 KiB | 101 | 1 |
| examples_test.go | H A D | 18-Jun-2020 | 4.1 KiB | 117 | 53 |
| go.mod | H A D | 18-Jun-2020 | 982 | 29 | 26 |
| go.sum | H A D | 18-Jun-2020 | 44.5 KiB | 463 | 462 |
| license_test.go | H A D | 18-Jun-2020 | 1.8 KiB | 75 | 49 |
| tools.go | H A D | 18-Jun-2020 | 1.2 KiB | 33 | 8 |
README.md
1# Google Cloud Client Libraries for Go
2
3[![GoDoc](https://godoc.org/cloud.google.com/go?status.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**NOTE:** Github repo is a mirror of [https://code.googlesource.com/gocloud](https://code.googlesource.com/gocloud).
29
30## Supported APIs
31
32Google API | Status | Package
33------------------------------------------------|--------------|-----------------------------------------------------------
34[Asset][cloud-asset] | stable | [`cloud.google.com/go/asset/apiv1`](https://pkg.go.dev/cloud.google.com/go/asset/v1beta)
35[Automl][cloud-automl] | stable | [`cloud.google.com/go/automl/apiv1`](https://pkg.go.dev/cloud.google.com/go/automl/apiv1)
36[BigQuery][cloud-bigquery] | stable | [`cloud.google.com/go/bigquery`](https://pkg.go.dev/cloud.google.com/go/bigquery)
37[Bigtable][cloud-bigtable] | stable | [`cloud.google.com/go/bigtable`](https://pkg.go.dev/cloud.google.com/go/bigtable)
38[Cloudbuild][cloud-build] | stable | [`cloud.google.com/go/cloudbuild/apiv1`](https://pkg.go.dev/cloud.google.com/go/cloudbuild/apiv1)
39[Cloudtasks][cloud-tasks] | stable | [`cloud.google.com/go/cloudtasks/apiv2`](https://pkg.go.dev/cloud.google.com/go/cloudtasks/apiv2)
40[Container][cloud-container] | stable | [`cloud.google.com/go/container/apiv1`](https://pkg.go.dev/cloud.google.com/go/container/apiv1)
41[ContainerAnalysis][cloud-containeranalysis] | beta | [`cloud.google.com/go/containeranalysis/apiv1`](https://pkg.go.dev/cloud.google.com/go/containeranalysis/apiv1)
42[Dataproc][cloud-dataproc] | stable | [`cloud.google.com/go/dataproc/apiv1`](https://pkg.go.dev/cloud.google.com/go/dataproc/apiv1)
43[Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`](https://pkg.go.dev/cloud.google.com/go/datastore)
44[Debugger][cloud-debugger] | stable | [`cloud.google.com/go/debugger/apiv2`](https://pkg.go.dev/cloud.google.com/go/debugger/apiv2)
45[Dialogflow][cloud-dialogflow] | stable | [`cloud.google.com/go/dialogflow/apiv2`](https://pkg.go.dev/cloud.google.com/go/dialogflow/apiv2)
46[Data Loss Prevention][cloud-dlp] | stable | [`cloud.google.com/go/dlp/apiv2`](https://pkg.go.dev/cloud.google.com/go/dlp/apiv2)
47[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`](https://pkg.go.dev/cloud.google.com/go/errorreporting)
48[Firestore][cloud-firestore] | stable | [`cloud.google.com/go/firestore`](https://pkg.go.dev/cloud.google.com/go/firestore)
49[IAM][cloud-iam] | stable | [`cloud.google.com/go/iam`](https://pkg.go.dev/cloud.google.com/go/iam)
50[IoT][cloud-iot] | stable | [`cloud.google.com/go/iot/apiv1`](https://pkg.go.dev/cloud.google.com/go/iot/apiv1)
51[IRM][cloud-irm] | alpha | [`cloud.google.com/go/irm/apiv1alpha2`](https://pkg.go.dev/cloud.google.com/go/irm/apiv1alpha2)
52[KMS][cloud-kms] | stable | [`cloud.google.com/go/kms/apiv1`](https://pkg.go.dev/cloud.google.com/go/kms/apiv1)
53[Natural Language][cloud-natural-language] | stable | [`cloud.google.com/go/language/apiv1`](https://pkg.go.dev/cloud.google.com/go/language/apiv1)
54[Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`](https://pkg.go.dev/cloud.google.com/go/logging)
55[Memorystore][cloud-memorystore] | alpha | [`cloud.google.com/go/redis/apiv1`](https://pkg.go.dev/cloud.google.com/go/redis/apiv1)
56[Monitoring][cloud-monitoring] | stable | [`cloud.google.com/go/monitoring/apiv3`](https://pkg.go.dev/cloud.google.com/go/monitoring/apiv3)
57[OS Login][cloud-oslogin] | stable | [`cloud.google.com/go/oslogin/apiv1`](https://pkg.go.dev/cloud.google.com/go/oslogin/apiv1)
58[Pub/Sub][cloud-pubsub] | stable | [`cloud.google.com/go/pubsub`](https://pkg.go.dev/cloud.google.com/go/pubsub)
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
89
90We support the two most recent major versions of Go. If Google App Engine uses
91an older version, we support that as well.
92
93## Authorization
94
95By default, each API will use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)
96for authorization credentials used in calling the API endpoints. This will allow your
97application to run in many environments without requiring explicit configuration.
98
99[snip]:# (auth)
100```go
101client, err := storage.NewClient(ctx)
102```
103
104To authorize using a
105[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
106pass
107[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile)
108to the `NewClient` function of the desired package. For example:
109
110[snip]:# (auth-JSON)
111```go
112client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))
113```
114
115You can exert more control over authorization by using the
116[`golang.org/x/oauth2`](https://pkg.go.dev/golang.org/x/oauth2) package to
117create an `oauth2.TokenSource`. Then pass
118[`option.WithTokenSource`](https://pkg.go.dev/google.golang.org/api/option#WithTokenSource)
119to the `NewClient` function:
120[snip]:# (auth-ts)
121```go
122tokenSource := ...
123client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
124```
125
126## Contributing
127
128Contributions are welcome. Please, see the
129[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md)
130document for details.
131
132Please note that this project is released with a Contributor Code of Conduct.
133By participating in this project you agree to abide by its terms.
134See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct)
135for more information.
136
137[cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory
138[cloud-automl]: https://cloud.google.com/automl
139[cloud-build]: https://cloud.google.com/cloud-build/
140[cloud-bigquery]: https://cloud.google.com/bigquery/
141[cloud-bigtable]: https://cloud.google.com/bigtable/
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-storage]: https://cloud.google.com/storage/
157[cloud-language]: https://cloud.google.com/natural-language
158[cloud-logging]: https://cloud.google.com/logging/
159[cloud-natural-language]: https://cloud.google.com/natural-language/
160[cloud-memorystore]: https://cloud.google.com/memorystore/
161[cloud-monitoring]: https://cloud.google.com/monitoring/
162[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest
163[cloud-phishingprotection]: https://cloud.google.com/phishing-protection/
164[cloud-securitycenter]: https://cloud.google.com/security-command-center/
165[cloud-scheduler]: https://cloud.google.com/scheduler
166[cloud-spanner]: https://cloud.google.com/spanner/
167[cloud-speech]: https://cloud.google.com/speech
168[cloud-talent]: https://cloud.google.com/solutions/talent-solution/
169[cloud-tasks]: https://cloud.google.com/tasks/
170[cloud-texttospeech]: https://cloud.google.com/texttospeech/
171[cloud-talent]: https://cloud.google.com/solutions/talent-solution/
172[cloud-trace]: https://cloud.google.com/trace/
173[cloud-translate]: https://cloud.google.com/translate
174[cloud-recaptcha]: https://cloud.google.com/recaptcha-enterprise/
175[cloud-recommender]: https://cloud.google.com/recommendations/
176[cloud-video]: https://cloud.google.com/video-intelligence/
177[cloud-vision]: https://cloud.google.com/vision
178[cloud-webrisk]: https://cloud.google.com/web-risk/
179