debian-forge-composer/vendor/cloud.google.com/go
Tomas Hozza 07a5745875 internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine
The internal GCP package used `pkg.go.dev/google.golang.org/api` [1] to
interact with Compute Engine API. Modify the package to use the new and
idiomatic `pkg.go.dev/cloud.google.com/go` [2] library for interacting
with the Compute Engine API. The new library have been already used to
interact with the Cloudbuild and Storage APIs. The new library was not
used for Compute Engine since the beginning, because at that time, it
didn't support Compute Engine.

Update go.mod and vendored packages.

[1] https://github.com/googleapis/google-api-go-client
[2] https://github.com/googleapis/google-cloud-go

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-03 15:35:28 +01:00
..
cloudbuild build(deps): bump cloud.google.com/go/cloudbuild from 0.1.0 to 0.2.0 2021-09-15 20:16:34 +02:00
compute internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
iam internal/upload: Add support for upload to GCP and CLI tool using it 2021-02-25 18:44:21 +00:00
internal internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
longrunning internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
storage internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
.gitignore internal/upload: Add support for upload to GCP and CLI tool using it 2021-02-25 18:44:21 +00:00
CHANGES.md internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
CODE_OF_CONDUCT.md internal/upload: Add support for upload to GCP and CLI tool using it 2021-02-25 18:44:21 +00:00
CONTRIBUTING.md build(deps): bump google.golang.org/api from 0.36.0 to 0.56.0 2021-09-05 11:17:29 +02:00
doc.go build(deps): bump google.golang.org/api from 0.36.0 to 0.56.0 2021-09-05 11:17:29 +02:00
go.mod internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
go.sum internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
LICENSE internal/upload: Add support for upload to GCP and CLI tool using it 2021-02-25 18:44:21 +00:00
README.md internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
RELEASING.md internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
SECURITY.md build(deps): bump google.golang.org/api from 0.36.0 to 0.56.0 2021-09-05 11:17:29 +02:00
testing.md internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00

Google Cloud Client Libraries for Go

Go Reference

Go packages for Google Cloud Platform services.

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
    
  2. 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:

    $ 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.

Go Versions Supported

We currently support Go versions 1.11 and newer.

Authorization

By default, each API will use Google 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.

client, err := storage.NewClient(ctx)

To authorize using a JSON key file, pass option.WithCredentialsFile to the NewClient function of the desired package. For example:

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 package to create an oauth2.TokenSource. Then pass option.WithTokenSource to the NewClient function: snip:# (auth-ts)

tokenSource := ...
client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))

Contributing

Contributions are welcome. Please, see the CONTRIBUTING 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 for more information.