You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 21 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. # Google Cloud Client Libraries for Go
  2. [![GoDoc](https://godoc.org/cloud.google.com/go?status.svg)](https://godoc.org/cloud.google.com/go)
  3. Go packages for [Google Cloud Platform](https://cloud.google.com) services.
  4. ``` go
  5. import "cloud.google.com/go"
  6. ```
  7. To install the packages on your system, *do not clone the repo*. Instead use
  8. ```
  9. $ go get -u cloud.google.com/go/...
  10. ```
  11. **NOTE:** Some of these packages are under development, and may occasionally
  12. make backwards-incompatible changes.
  13. **NOTE:** Github repo is a mirror of [https://code.googlesource.com/gocloud](https://code.googlesource.com/gocloud).
  14. * [News](#news)
  15. * [Supported APIs](#supported-apis)
  16. * [Go Versions Supported](#go-versions-supported)
  17. * [Authorization](#authorization)
  18. * [Cloud Datastore](#cloud-datastore-)
  19. * [Cloud Storage](#cloud-storage-)
  20. * [Cloud Pub/Sub](#cloud-pub-sub-)
  21. * [Cloud BigQuery](#cloud-bigquery-)
  22. * [Stackdriver Logging](#stackdriver-logging-)
  23. * [Cloud Spanner](#cloud-spanner-)
  24. ## News
  25. _May 18, 2018_
  26. *v0.23.0*
  27. - bigquery: Add DDL stats to query statistics.
  28. - bigtable:
  29. - cbt: Add cells-per-column limit for row lookup.
  30. - cbt: Make it possible to combine read filters.
  31. - dlp: v2beta2 client removed. Use the v2 client instead.
  32. - firestore, spanner: Fix compilation errors due to protobuf changes.
  33. _May 8, 2018_
  34. *v0.22.0*
  35. - bigtable:
  36. - cbt: Support cells per column limit for row read.
  37. - bttest: Correctly handle empty RowSet.
  38. - Fix ReadModifyWrite operation in emulator.
  39. - Fix API path in GetCluster.
  40. - bigquery:
  41. - BEHAVIOR CHANGE: Retry on 503 status code.
  42. - Add dataset.DeleteWithContents.
  43. - Add SchemaUpdateOptions for query jobs.
  44. - Add Timeline to QueryStatistics.
  45. - Add more stats to ExplainQueryStage.
  46. - Support Parquet data format.
  47. - datastore:
  48. - Support omitempty for times.
  49. - dlp:
  50. - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client,
  51. which is now out of beta.
  52. - Add v2 client.
  53. - firestore:
  54. - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid.
  55. - iam:
  56. - Support JWT signing via SignJwt callopt.
  57. - profiler:
  58. - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done.
  59. - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute.
  60. - Avoid returning empty serial port output.
  61. - pubsub:
  62. - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy.
  63. - BEHAVIOR CHANGE: Don't backoff on EOF.
  64. - pstest: Support Acknowledge and ModifyAckDeadline RPCs.
  65. - redis:
  66. - Add v1 beta Redis client.
  67. - spanner:
  68. - Support SessionLabels.
  69. - speech:
  70. - Add api v1 beta1 client.
  71. - storage:
  72. - BEHAVIOR CHANGE: Retry reads when retryable error occurs.
  73. - Fix delete of object in requester-pays bucket.
  74. - Support KMS integration.
  75. _April 9, 2018_
  76. *v0.21.0*
  77. - bigquery:
  78. - Add OpenCensus tracing.
  79. - firestore:
  80. - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot
  81. whose Exists method returns false. DocumentRef.Get and Transaction.Get
  82. return the non-nil DocumentSnapshot in addition to a NotFound error.
  83. **DocumentRef.GetAll and Transaction.GetAll return a non-nil
  84. DocumentSnapshot instead of nil.**
  85. - Add DocumentIterator.Stop. **Call Stop whenever you are done with a
  86. DocumentIterator.**
  87. - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime
  88. notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen.
  89. - Canceling an RPC now always returns a grpc.Status with codes.Canceled.
  90. - spanner:
  91. - Add `CommitTimestamp`, which supports inserting the commit timestamp of a
  92. transaction into a column.
  93. _March 22, 2018_
  94. *v0.20.0*
  95. - bigquery: Support SchemaUpdateOptions for load jobs.
  96. - bigtable:
  97. - Add SampleRowKeys.
  98. - cbt: Support union, intersection GCPolicy.
  99. - Retry admin RPCS.
  100. - Add trace spans to retries.
  101. - datastore: Add OpenCensus tracing.
  102. - firestore:
  103. - Fix queries involving Null and NaN.
  104. - Allow Timestamp protobuffers for time values.
  105. - logging: Add a WriteTimeout option.
  106. - spanner: Support Batch API.
  107. - storage: Add OpenCensus tracing.
  108. _February 26, 2018_
  109. *v0.19.0*
  110. - bigquery:
  111. - Support customer-managed encryption keys.
  112. - bigtable:
  113. - Improved emulator support.
  114. - Support GetCluster.
  115. - datastore:
  116. - Add general mutations.
  117. - Support pointer struct fields.
  118. - Support transaction options.
  119. - firestore:
  120. - Add Transaction.GetAll.
  121. - Support document cursors.
  122. - logging:
  123. - Support concurrent RPCs to the service.
  124. - Support per-entry resources.
  125. - profiler:
  126. - Add config options to disable heap and thread profiling.
  127. - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set.
  128. - pubsub:
  129. - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the
  130. callback returns).
  131. - Add SubscriptionInProject.
  132. - Add OpenCensus instrumentation for streaming pull.
  133. - storage:
  134. - Support CORS.
  135. _January 18, 2018_
  136. *v0.18.0*
  137. - bigquery:
  138. - Marked stable.
  139. - Schema inference of nullable fields supported.
  140. - Added TimePartitioning to QueryConfig.
  141. - firestore: Data provided to DocumentRef.Set with a Merge option can contain
  142. Delete sentinels.
  143. - logging: Clients can accept parent resources other than projects.
  144. - pubsub:
  145. - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome.
  146. - Support updating more subscription metadata: AckDeadline,
  147. RetainAckedMessages and RetentionDuration.
  148. - oslogin/apiv1beta: New client for the Cloud OS Login API.
  149. - rpcreplay: A package for recording and replaying gRPC traffic.
  150. - spanner:
  151. - Add a ReadWithOptions that supports a row limit, as well as an index.
  152. - Support query plan and execution statistics.
  153. - Added [OpenCensus](http://opencensus.io) support.
  154. - storage: Clarify checksum validation for gzipped files (it is not validated
  155. when the file is served uncompressed).
  156. _December 11, 2017_
  157. *v0.17.0*
  158. - firestore BREAKING CHANGES:
  159. - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update.
  160. Change
  161. `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})`
  162. to
  163. `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})`
  164. Change
  165. `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)`
  166. to
  167. `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})`
  168. - Rename MergePaths to Merge; require args to be FieldPaths
  169. - A value stored as an integer can be read into a floating-point field, and vice versa.
  170. - bigtable/cmd/cbt:
  171. - Support deleting a column.
  172. - Add regex option for row read.
  173. - spanner: Mark stable.
  174. - storage:
  175. - Add Reader.ContentEncoding method.
  176. - Fix handling of SignedURL headers.
  177. - bigquery:
  178. - If Uploader.Put is called with no rows, it returns nil without making a
  179. call.
  180. - Schema inference supports the "nullable" option in struct tags for
  181. non-required fields.
  182. - TimePartitioning supports "Field".
  183. [Older news](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/old-news.md)
  184. ## Supported APIs
  185. Google API | Status | Package
  186. ---------------------------------|--------------|-----------------------------------------------------------
  187. [BigQuery][cloud-bigquery] | stable | [`cloud.google.com/go/bigquery`][cloud-bigquery-ref]
  188. [Bigtable][cloud-bigtable] | stable | [`cloud.google.com/go/bigtable`][cloud-bigtable-ref]
  189. [Container][cloud-container] | alpha | [`cloud.google.com/go/container/apiv1`][cloud-container-ref]
  190. [Data Loss Prevention][cloud-dlp]| alpha | [`cloud.google.com/go/dlp/apiv2beta1`][cloud-dlp-ref]
  191. [Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`][cloud-datastore-ref]
  192. [Debugger][cloud-debugger] | alpha | [`cloud.google.com/go/debugger/apiv2`][cloud-debugger-ref]
  193. [ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`][cloud-errors-ref]
  194. [Firestore][cloud-firestore] | beta | [`cloud.google.com/go/firestore`][cloud-firestore-ref]
  195. [Language][cloud-language] | stable | [`cloud.google.com/go/language/apiv1`][cloud-language-ref]
  196. [Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`][cloud-logging-ref]
  197. [Monitoring][cloud-monitoring] | beta | [`cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref]
  198. [OS Login][cloud-oslogin] | alpha | [`cloud.google.com/compute/docs/oslogin/rest`][cloud-oslogin-ref]
  199. [Pub/Sub][cloud-pubsub] | stable | [`cloud.google.com/go/pubsub`][cloud-pubsub-ref]
  200. [Spanner][cloud-spanner] | stable | [`cloud.google.com/go/spanner`][cloud-spanner-ref]
  201. [Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`][cloud-speech-ref]
  202. [Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`][cloud-storage-ref]
  203. [Translation][cloud-translation] | stable | [`cloud.google.com/go/translate`][cloud-translation-ref]
  204. [Video Intelligence][cloud-video]| beta | [`cloud.google.com/go/videointelligence/apiv1beta1`][cloud-video-ref]
  205. [Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`][cloud-vision-ref]
  206. > **Alpha status**: the API is still being actively developed. As a
  207. > result, it might change in backward-incompatible ways and is not recommended
  208. > for production use.
  209. >
  210. > **Beta status**: the API is largely complete, but still has outstanding
  211. > features and bugs to be addressed. There may be minor backwards-incompatible
  212. > changes where necessary.
  213. >
  214. > **Stable status**: the API is mature and ready for production use. We will
  215. > continue addressing bugs and feature requests.
  216. Documentation and examples are available at
  217. https://godoc.org/cloud.google.com/go
  218. Visit or join the
  219. [google-api-go-announce group](https://groups.google.com/forum/#!forum/google-api-go-announce)
  220. for updates on these packages.
  221. ## Go Versions Supported
  222. We support the two most recent major versions of Go. If Google App Engine uses
  223. an older version, we support that as well. You can see which versions are
  224. currently supported by looking at the lines following `go:` in
  225. [`.travis.yml`](.travis.yml).
  226. ## Authorization
  227. By default, each API will use [Google Application Default Credentials][default-creds]
  228. for authorization credentials used in calling the API endpoints. This will allow your
  229. application to run in many environments without requiring explicit configuration.
  230. [snip]:# (auth)
  231. ```go
  232. client, err := storage.NewClient(ctx)
  233. ```
  234. To authorize using a
  235. [JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
  236. pass
  237. [`option.WithServiceAccountFile`](https://godoc.org/google.golang.org/api/option#WithServiceAccountFile)
  238. to the `NewClient` function of the desired package. For example:
  239. [snip]:# (auth-JSON)
  240. ```go
  241. client, err := storage.NewClient(ctx, option.WithServiceAccountFile("path/to/keyfile.json"))
  242. ```
  243. You can exert more control over authorization by using the
  244. [`golang.org/x/oauth2`](https://godoc.org/golang.org/x/oauth2) package to
  245. create an `oauth2.TokenSource`. Then pass
  246. [`option.WithTokenSource`](https://godoc.org/google.golang.org/api/option#WithTokenSource)
  247. to the `NewClient` function:
  248. [snip]:# (auth-ts)
  249. ```go
  250. tokenSource := ...
  251. client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
  252. ```
  253. ## Cloud Datastore [![GoDoc](https://godoc.org/cloud.google.com/go/datastore?status.svg)](https://godoc.org/cloud.google.com/go/datastore)
  254. - [About Cloud Datastore][cloud-datastore]
  255. - [Activating the API for your project][cloud-datastore-activation]
  256. - [API documentation][cloud-datastore-docs]
  257. - [Go client documentation](https://godoc.org/cloud.google.com/go/datastore)
  258. - [Complete sample program](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/datastore/tasks)
  259. ### Example Usage
  260. First create a `datastore.Client` to use throughout your application:
  261. [snip]:# (datastore-1)
  262. ```go
  263. client, err := datastore.NewClient(ctx, "my-project-id")
  264. if err != nil {
  265. log.Fatal(err)
  266. }
  267. ```
  268. Then use that client to interact with the API:
  269. [snip]:# (datastore-2)
  270. ```go
  271. type Post struct {
  272. Title string
  273. Body string `datastore:",noindex"`
  274. PublishedAt time.Time
  275. }
  276. keys := []*datastore.Key{
  277. datastore.NameKey("Post", "post1", nil),
  278. datastore.NameKey("Post", "post2", nil),
  279. }
  280. posts := []*Post{
  281. {Title: "Post 1", Body: "...", PublishedAt: time.Now()},
  282. {Title: "Post 2", Body: "...", PublishedAt: time.Now()},
  283. }
  284. if _, err := client.PutMulti(ctx, keys, posts); err != nil {
  285. log.Fatal(err)
  286. }
  287. ```
  288. ## Cloud Storage [![GoDoc](https://godoc.org/cloud.google.com/go/storage?status.svg)](https://godoc.org/cloud.google.com/go/storage)
  289. - [About Cloud Storage][cloud-storage]
  290. - [API documentation][cloud-storage-docs]
  291. - [Go client documentation](https://godoc.org/cloud.google.com/go/storage)
  292. - [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/storage)
  293. ### Example Usage
  294. First create a `storage.Client` to use throughout your application:
  295. [snip]:# (storage-1)
  296. ```go
  297. client, err := storage.NewClient(ctx)
  298. if err != nil {
  299. log.Fatal(err)
  300. }
  301. ```
  302. [snip]:# (storage-2)
  303. ```go
  304. // Read the object1 from bucket.
  305. rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx)
  306. if err != nil {
  307. log.Fatal(err)
  308. }
  309. defer rc.Close()
  310. body, err := ioutil.ReadAll(rc)
  311. if err != nil {
  312. log.Fatal(err)
  313. }
  314. ```
  315. ## Cloud Pub/Sub [![GoDoc](https://godoc.org/cloud.google.com/go/pubsub?status.svg)](https://godoc.org/cloud.google.com/go/pubsub)
  316. - [About Cloud Pubsub][cloud-pubsub]
  317. - [API documentation][cloud-pubsub-docs]
  318. - [Go client documentation](https://godoc.org/cloud.google.com/go/pubsub)
  319. - [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/pubsub)
  320. ### Example Usage
  321. First create a `pubsub.Client` to use throughout your application:
  322. [snip]:# (pubsub-1)
  323. ```go
  324. client, err := pubsub.NewClient(ctx, "project-id")
  325. if err != nil {
  326. log.Fatal(err)
  327. }
  328. ```
  329. Then use the client to publish and subscribe:
  330. [snip]:# (pubsub-2)
  331. ```go
  332. // Publish "hello world" on topic1.
  333. topic := client.Topic("topic1")
  334. res := topic.Publish(ctx, &pubsub.Message{
  335. Data: []byte("hello world"),
  336. })
  337. // The publish happens asynchronously.
  338. // Later, you can get the result from res:
  339. ...
  340. msgID, err := res.Get(ctx)
  341. if err != nil {
  342. log.Fatal(err)
  343. }
  344. // Use a callback to receive messages via subscription1.
  345. sub := client.Subscription("subscription1")
  346. err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) {
  347. fmt.Println(m.Data)
  348. m.Ack() // Acknowledge that we've consumed the message.
  349. })
  350. if err != nil {
  351. log.Println(err)
  352. }
  353. ```
  354. ## Cloud BigQuery [![GoDoc](https://godoc.org/cloud.google.com/go/bigquery?status.svg)](https://godoc.org/cloud.google.com/go/bigquery)
  355. - [About Cloud BigQuery][cloud-bigquery]
  356. - [API documentation][cloud-bigquery-docs]
  357. - [Go client documentation][cloud-bigquery-ref]
  358. - [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigquery)
  359. ### Example Usage
  360. First create a `bigquery.Client` to use throughout your application:
  361. [snip]:# (bq-1)
  362. ```go
  363. c, err := bigquery.NewClient(ctx, "my-project-ID")
  364. if err != nil {
  365. // TODO: Handle error.
  366. }
  367. ```
  368. Then use that client to interact with the API:
  369. [snip]:# (bq-2)
  370. ```go
  371. // Construct a query.
  372. q := c.Query(`
  373. SELECT year, SUM(number)
  374. FROM [bigquery-public-data:usa_names.usa_1910_2013]
  375. WHERE name = "William"
  376. GROUP BY year
  377. ORDER BY year
  378. `)
  379. // Execute the query.
  380. it, err := q.Read(ctx)
  381. if err != nil {
  382. // TODO: Handle error.
  383. }
  384. // Iterate through the results.
  385. for {
  386. var values []bigquery.Value
  387. err := it.Next(&values)
  388. if err == iterator.Done {
  389. break
  390. }
  391. if err != nil {
  392. // TODO: Handle error.
  393. }
  394. fmt.Println(values)
  395. }
  396. ```
  397. ## Stackdriver Logging [![GoDoc](https://godoc.org/cloud.google.com/go/logging?status.svg)](https://godoc.org/cloud.google.com/go/logging)
  398. - [About Stackdriver Logging][cloud-logging]
  399. - [API documentation][cloud-logging-docs]
  400. - [Go client documentation][cloud-logging-ref]
  401. - [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/logging)
  402. ### Example Usage
  403. First create a `logging.Client` to use throughout your application:
  404. [snip]:# (logging-1)
  405. ```go
  406. ctx := context.Background()
  407. client, err := logging.NewClient(ctx, "my-project")
  408. if err != nil {
  409. // TODO: Handle error.
  410. }
  411. ```
  412. Usually, you'll want to add log entries to a buffer to be periodically flushed
  413. (automatically and asynchronously) to the Stackdriver Logging service.
  414. [snip]:# (logging-2)
  415. ```go
  416. logger := client.Logger("my-log")
  417. logger.Log(logging.Entry{Payload: "something happened!"})
  418. ```
  419. Close your client before your program exits, to flush any buffered log entries.
  420. [snip]:# (logging-3)
  421. ```go
  422. err = client.Close()
  423. if err != nil {
  424. // TODO: Handle error.
  425. }
  426. ```
  427. ## Cloud Spanner [![GoDoc](https://godoc.org/cloud.google.com/go/spanner?status.svg)](https://godoc.org/cloud.google.com/go/spanner)
  428. - [About Cloud Spanner][cloud-spanner]
  429. - [API documentation][cloud-spanner-docs]
  430. - [Go client documentation](https://godoc.org/cloud.google.com/go/spanner)
  431. ### Example Usage
  432. First create a `spanner.Client` to use throughout your application:
  433. [snip]:# (spanner-1)
  434. ```go
  435. client, err := spanner.NewClient(ctx, "projects/P/instances/I/databases/D")
  436. if err != nil {
  437. log.Fatal(err)
  438. }
  439. ```
  440. [snip]:# (spanner-2)
  441. ```go
  442. // Simple Reads And Writes
  443. _, err = client.Apply(ctx, []*spanner.Mutation{
  444. spanner.Insert("Users",
  445. []string{"name", "email"},
  446. []interface{}{"alice", "a@example.com"})})
  447. if err != nil {
  448. log.Fatal(err)
  449. }
  450. row, err := client.Single().ReadRow(ctx, "Users",
  451. spanner.Key{"alice"}, []string{"email"})
  452. if err != nil {
  453. log.Fatal(err)
  454. }
  455. ```
  456. ## Contributing
  457. Contributions are welcome. Please, see the
  458. [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md)
  459. document for details. We're using Gerrit for our code reviews. Please don't open pull
  460. requests against this repo, new pull requests will be automatically closed.
  461. Please note that this project is released with a Contributor Code of Conduct.
  462. By participating in this project you agree to abide by its terms.
  463. See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct)
  464. for more information.
  465. [cloud-datastore]: https://cloud.google.com/datastore/
  466. [cloud-datastore-ref]: https://godoc.org/cloud.google.com/go/datastore
  467. [cloud-datastore-docs]: https://cloud.google.com/datastore/docs
  468. [cloud-datastore-activation]: https://cloud.google.com/datastore/docs/activate
  469. [cloud-firestore]: https://cloud.google.com/firestore/
  470. [cloud-firestore-ref]: https://godoc.org/cloud.google.com/go/firestore
  471. [cloud-firestore-docs]: https://cloud.google.com/firestore/docs
  472. [cloud-firestore-activation]: https://cloud.google.com/firestore/docs/activate
  473. [cloud-pubsub]: https://cloud.google.com/pubsub/
  474. [cloud-pubsub-ref]: https://godoc.org/cloud.google.com/go/pubsub
  475. [cloud-pubsub-docs]: https://cloud.google.com/pubsub/docs
  476. [cloud-storage]: https://cloud.google.com/storage/
  477. [cloud-storage-ref]: https://godoc.org/cloud.google.com/go/storage
  478. [cloud-storage-docs]: https://cloud.google.com/storage/docs
  479. [cloud-storage-create-bucket]: https://cloud.google.com/storage/docs/cloud-console#_creatingbuckets
  480. [cloud-bigtable]: https://cloud.google.com/bigtable/
  481. [cloud-bigtable-ref]: https://godoc.org/cloud.google.com/go/bigtable
  482. [cloud-bigquery]: https://cloud.google.com/bigquery/
  483. [cloud-bigquery-docs]: https://cloud.google.com/bigquery/docs
  484. [cloud-bigquery-ref]: https://godoc.org/cloud.google.com/go/bigquery
  485. [cloud-logging]: https://cloud.google.com/logging/
  486. [cloud-logging-docs]: https://cloud.google.com/logging/docs
  487. [cloud-logging-ref]: https://godoc.org/cloud.google.com/go/logging
  488. [cloud-monitoring]: https://cloud.google.com/monitoring/
  489. [cloud-monitoring-ref]: https://godoc.org/cloud.google.com/go/monitoring/apiv3
  490. [cloud-vision]: https://cloud.google.com/vision
  491. [cloud-vision-ref]: https://godoc.org/cloud.google.com/go/vision/apiv1
  492. [cloud-language]: https://cloud.google.com/natural-language
  493. [cloud-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1
  494. [cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest
  495. [cloud-oslogin-ref]: https://cloud.google.com/compute/docs/oslogin/rest
  496. [cloud-speech]: https://cloud.google.com/speech
  497. [cloud-speech-ref]: https://godoc.org/cloud.google.com/go/speech/apiv1
  498. [cloud-spanner]: https://cloud.google.com/spanner/
  499. [cloud-spanner-ref]: https://godoc.org/cloud.google.com/go/spanner
  500. [cloud-spanner-docs]: https://cloud.google.com/spanner/docs
  501. [cloud-translation]: https://cloud.google.com/translation
  502. [cloud-translation-ref]: https://godoc.org/cloud.google.com/go/translation
  503. [cloud-video]: https://cloud.google.com/video-intelligence/
  504. [cloud-video-ref]: https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1
  505. [cloud-errors]: https://cloud.google.com/error-reporting/
  506. [cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errorreporting
  507. [cloud-container]: https://cloud.google.com/containers/
  508. [cloud-container-ref]: https://godoc.org/cloud.google.com/go/container/apiv1
  509. [cloud-debugger]: https://cloud.google.com/debugger/
  510. [cloud-debugger-ref]: https://godoc.org/cloud.google.com/go/debugger/apiv2
  511. [cloud-dlp]: https://cloud.google.com/dlp/
  512. [cloud-dlp-ref]: https://godoc.org/cloud.google.com/go/dlp/apiv2beta1
  513. [default-creds]: https://developers.google.com/identity/protocols/application-default-credentials