Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/googleapis/google-cloud-go
Google Cloud Client Libraries for Go.
https://github.com/googleapis/google-cloud-go
cloud-bigquery cloud-datastore cloud-pubsub cloud-storage go golang google-cloud
Last synced: about 2 months ago
JSON representation
Google Cloud Client Libraries for Go.
- Host: GitHub
- URL: https://github.com/googleapis/google-cloud-go
- Owner: googleapis
- License: apache-2.0
- Created: 2014-05-09T11:11:58.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-05-04T05:53:41.000Z (5 months ago)
- Last Synced: 2024-05-04T09:50:24.173Z (5 months ago)
- Topics: cloud-bigquery, cloud-datastore, cloud-pubsub, cloud-storage, go, golang, google-cloud
- Language: Go
- Homepage: https://cloud.google.com/go/docs/reference
- Size: 256 MB
- Stars: 3,610
- Watchers: 263
- Forks: 1,215
- Open Issues: 344
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Support: support/CHANGES.md
Awesome Lists containing this project
- awesome-gcp - GCP SDK repo
- awesome-golang-repositories - google-cloud-go
- awesome-go-extra - google-cloud-go - 05-09T11:11:58Z|2022-08-25T21:08:19Z| (Third-party APIs / Fail injection)
README
# Google Cloud Client Libraries for Go
[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go.svg)](https://pkg.go.dev/cloud.google.com/go)
Go packages for [Google Cloud Platform](https://cloud.google.com) services.
``` go
import "cloud.google.com/go"
```To install the packages on your system, *do not clone the repo*. Instead:
1. Change to your project directory: `cd /my/cloud/project`
1. Get the package you want to use. Some products have their own module, so it's
best to `go get` the package(s) you want to use:```bash
go get cloud.google.com/go/firestore # Replace with the package you want to use.
```**NOTE:** Some of these packages are under development, and may occasionally
make backwards-incompatible changes.## Supported APIs
For an updated list of all of our released APIs please see our
[reference docs](https://cloud.google.com/go/docs/reference).## [Go Versions Supported](#supported-versions)
Our libraries are compatible with at least the three most recent, major Go
releases. They are currently compatible with:- Go 1.22
- Go 1.21
- Go 1.20## Authorization
By default, each API will use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)
for authorization credentials used in calling the API endpoints. This will allow your
application to run in many environments without requiring explicit configuration.```go
client, err := storage.NewClient(ctx)
```To authorize using a
[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
pass
[`option.WithCredentialsFile`](https://pkg.go.dev/google.golang.org/api/option#WithCredentialsFile)
to the `NewClient` function of the desired package. For example:```go
client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json"))
```You can exert more control over authorization by using the
[`golang.org/x/oauth2`](https://pkg.go.dev/golang.org/x/oauth2) package to
create an `oauth2.TokenSource`. Then pass
[`option.WithTokenSource`](https://pkg.go.dev/google.golang.org/api/option#WithTokenSource)
to the `NewClient` function:```go
tokenSource := ...
client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
```## Contributing
Contributions are welcome. Please, see the
[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md)
document for details.Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct)
for more information.## Links
- [Go on Google Cloud](https://cloud.google.com/go/home)
- [Getting started with Go on Google Cloud](https://cloud.google.com/go/getting-started)
- [App Engine Quickstart](https://cloud.google.com/appengine/docs/standard/go/quickstart)
- [Cloud Functions Quickstart](https://cloud.google.com/functions/docs/quickstart-go)
- [Cloud Run Quickstart](https://cloud.google.com/run/docs/quickstarts/build-and-deploy#go)