1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

govendor: Update 6 GCLOUD dependencies (#525)

* govendor: Update github.com/golang/protobuf

* govendor: Update github.com/gobwas/glob github.com/google/go-github

* govendor: Update 3 github.com/robertkrimen/otto

* govendor: Update 4 golang.org/x

golang.org/x/crypto
golang.org/x/net
golang.org/x/sys
golang.org/x/text
golang.org/x/time
golang.org/x/crypto

* govendor: Update 5 github.com/aws/aws-sdk-go

* govendor: Update 6 GCLOUD dependencies
This commit is contained in:
Tom Limoncelli
2019-07-08 10:09:06 -04:00
committed by Craig Peterson
parent 746fe9b3bb
commit 1940ff4ac1
579 changed files with 317540 additions and 288 deletions

10
vendor/google.golang.org/api/AUTHORS generated vendored Normal file
View File

@ -0,0 +1,10 @@
# This is the official list of authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS files.
# See the latter for an explanation.
# Names should be added to this file as
# Name or Organization <email address>
# The email address is not required for organizations.
# Please keep the list sorted.
Google Inc.

75
vendor/google.golang.org/api/CHANGES.md generated vendored Normal file
View File

@ -0,0 +1,75 @@
# v0.7.0
- Various updates to autogenerated clients.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.6.0
- Add support for GCP DirectPath.
- Various updates to autogenerated clients.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.5.0
- Better support for google.api.HttpBody.
- Support for google.api.HttpBody in the healthcare API.
- Various updates to autogenerated clients.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.4.0
- Includes a re-pin of opencensus, greatly reducing the transitive
dependency list.
- Deletes photoslibrary/v1. The photoslibrary team hopes to fully support Go in
the near future, but this autogenerated library is ready to be sunset. If you
rely on this client, please vendor this library at v0.3.2.
- Various updates to autogenerated clients.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.3.2
This patch releases re-builds the go.sum. This was not possible in the
previous release.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.3.1
This patch release removes github.com/golang/lint from the transitive
dependency list, resolving `go get -u` problems.
_Please note_: this release intentionally has a broken go.sum. Please use v0.3.2.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.3.0
go.mod modifications, including removal of go 1.12 statement and update of
opencensus dependency.
_Please note_: the release version is not indicative of an individual client's
stability or version.
# v0.2.0
General improvements.
_Please note:_ the release version is not indicative of an individual client's
stability or version.
# v0.1.0
Initial release along with Go module support.
_Please note:_ the release version is not indicative of an individual client's
stability or version.

484
vendor/google.golang.org/api/CONTRIBUTING.md generated vendored Normal file
View File

@ -0,0 +1,484 @@
# Contributing to the Google API Go Client
## Master git repo
Our master git repo is https://code.googlesource.com/google-api-go-client
## Pull Requests
We do **NOT** use Github pull requests. We use Gerrit instead
with the same workflow as Go. See below.
## The source tree
Most of this project is auto-generated.
The notable directories which are not auto-generated:
```
google-api-go-generator/ -- the generator itself
googleapi/ -- shared common code, used by auto-generated code
examples/ -- sample code
```
# Contribution Guidelines
## Introduction
This document explains how to contribute changes to the google-api-go-client project.
## Testing redux
You've written and tested your code, but
before sending code out for review, run all the tests for the whole
tree to make sure the changes don't break other packages or programs:
```
$ make cached
$ go test ./...
...
ok google.golang.org/api/google-api-go-generator 0.226s
ok google.golang.org/api/googleapi 0.015s
...
```
Ideally, you will add unit tests to one of the above directories to
demonstrate the changes you are making and include the tests with your
code review.
## Code review
Changes to google-api-go-client must be reviewed before they are submitted,
no matter who makes the change.
A custom git command called `git-codereview`,
discussed below, helps manage the code review process through a Google-hosted
[instance](https://code-review.googlesource.com/) of the code review
system called [Gerrit](https://code.google.com/p/gerrit/).
### Set up authentication for code review
The Git code hosting server and Gerrit code review server both use a Google
Account to authenticate. You therefore need a Google Account to proceed.
(If you can use the account to
[sign in at google.com](https://www.google.com/accounts/Login),
you can use it to sign in to the code review server.)
The email address you use with the code review system
needs to be added to the [`CONTRIBUTORS`](/CONTRIBUTORS) file
with your first code review.
You can [create a Google Account](https://www.google.com/accounts/NewAccount)
associated with any address where you receive email.
Visit the site [code.googlesource.com](https://code.googlesource.com)
and log in using your Google Account.
Click on the "Generate Password" link that appears at the top of the page.
Click the radio button that says "Only `code.googlesource.com`"
to use this authentication token only for the google-api-go-client project.
Further down the page is a box containing commands to install
the authentication cookie in file called `.gitcookies` in your home
directory.
Copy the text for the commands into a Unix shell window to execute it.
That will install the authentication token.
(If you are on a Windows computer, you should instead follow the instructions
in the yellow box to run the command.)
### Register with Gerrit
Now that you have a Google account and the authentication token,
you need to register your account with Gerrit, the code review system.
To do this, visit [golang.org/cl](https://golang.org/cl)
and log in using the same Google Account you used above.
That is all that is required.
### Install the git-codereview command
Now install the `git-codereview` command by running,
```
go get -u golang.org/x/review/git-codereview
```
Make sure `git-codereview` is installed in your shell path, so that the
`git` command can find it. Check that
```
$ git codereview help
```
prints help text, not an error.
Note to Git aficionados: The `git-codereview` command is not required to
upload and manage Gerrit code reviews. For those who prefer plain Git, the text
below gives the Git equivalent of each git-codereview command. If you do use plain
Git, note that you still need the commit hooks that the git-codereview command
configures; those hooks add a Gerrit `Change-Id` line to the commit
message and check that all Go source files have been formatted with gofmt. Even
if you intend to use plain Git for daily work, install the hooks in a new Git
checkout by running `git-codereview hooks`.
### Set up git aliases
The `git-codereview` command can be run directly from the shell
by typing, for instance,
```
$ git codereview sync
```
but it is more convenient to set up aliases for `git-codereview`'s own
subcommands, so that the above becomes,
```
$ git sync
```
The `git-codereview` subcommands have been chosen to be distinct from
Git's own, so it's safe to do so.
The aliases are optional, but in the rest of this document we will assume
they are installed.
To install them, copy this text into your Git configuration file
(usually `.gitconfig` in your home directory):
```
[alias]
change = codereview change
gofmt = codereview gofmt
mail = codereview mail
pending = codereview pending
submit = codereview submit
sync = codereview sync
```
### Understanding the git-codereview command
After installing the `git-codereview` command, you can run
```
$ git codereview help
```
to learn more about its commands.
You can also read the [command documentation](https://godoc.org/golang.org/x/review/git-codereview).
### Switch to the master branch
New changes should
only be made based on the master branch.
Before making a change, make sure you start on the master branch:
```
$ git checkout master
$ git sync
````
(In Git terms, `git sync` runs
`git pull -r`.)
### Make a change
The entire checked-out tree is writable.
Once you have edited files, you must tell Git that they have been modified.
You must also tell Git about any files that are added, removed, or renamed files.
These operations are done with the usual Git commands,
`git add`,
`git rm`,
and
`git mv`.
If you wish to checkpoint your work, or are ready to send the code out for review, run
```
$ git change <branch>
```
from any directory in your google-api-go-client repository to commit the changes so far.
The name `<branch>` is an arbitrary one you choose to identify the
local branch containing your changes.
(In Git terms, `git change <branch>`
runs `git checkout -b branch`,
then `git branch --set-upstream-to origin/master`,
then `git commit`.)
Git will open a change description file in your editor.
(It uses the editor named by the `$EDITOR` environment variable,
`vi` by default.)
The file will look like:
```
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch foo
# Changes not staged for commit:
# modified: editedfile.go
#
```
At the beginning of this file is a blank line; replace it
with a thorough description of your change.
The first line of the change description is conventionally a one-line
summary of the change, prefixed by `google-api-go-client:`,
and is used as the subject for code review mail.
The rest of the
description elaborates and should provide context for the
change and explain what it does.
If there is a helpful reference, mention it here.
After editing, the template might now read:
```
math: improved Sin, Cos and Tan precision for very large arguments
The existing implementation has poor numerical properties for
large arguments, so use the McGillicutty algorithm to improve
accuracy above 1e10.
The algorithm is described at http://wikipedia.org/wiki/McGillicutty_Algorithm
Fixes #54
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch foo
# Changes not staged for commit:
# modified: editedfile.go
#
```
The commented section of the file lists all the modified files in your client.
It is best to keep unrelated changes in different change lists,
so if you see a file listed that should not be included, abort
the command and move that file to a different branch.
The special notation "Fixes #54" associates the change with issue 54 in the
[google-api-go-client issue tracker](https://github.com/google/google-api-go-client/issues/54).
When this change is eventually submitted, the issue
tracker will automatically mark the issue as fixed.
(There are several such conventions, described in detail in the
[GitHub Issue Tracker documentation](https://help.github.com/articles/closing-issues-via-commit-messages/).)
Once you have finished writing the commit message,
save the file and exit the editor.
If you wish to do more editing, re-stage your changes using
`git add`, and then run
```
$ git change
```
to update the change description and incorporate the staged changes. The
change description contains a `Change-Id` line near the bottom,
added by a Git commit hook during the initial
`git change`.
That line is used by Gerrit to match successive uploads of the same change.
Do not edit or delete it.
(In Git terms, `git change` with no branch name
runs `git commit --amend`.)
### Mail the change for review
Once the change is ready, mail it out for review:
```
$ git mail
```
You can specify a reviewer or CC interested parties
using the `-r` or `-cc` options.
Both accept a comma-separated list of email addresses:
```
$ git mail -r joe@golang.org -cc mabel@example.com,math-nuts@swtch.com
```
Unless explicitly told otherwise, such as in the discussion leading
up to sending in the change list, please specify
`bradfitz@golang.org`, `gmlewis@google.com`, or
`mcgreevy@golang.org` as a reviewer.
(In Git terms, `git mail` pushes the local committed
changes to Gerrit using `git push origin HEAD:refs/for/master`.)
If your change relates to an open issue, please add a comment to the issue
announcing your proposed fix, including a link to your CL.
The code review server assigns your change an issue number and URL,
which `git mail` will print, something like:
```
remote: New Changes:
remote: https://code-review.googlesource.com/99999 math: improved Sin, Cos and Tan precision for very large arguments
```
### Reviewing code
Running `git mail` will send an email to you and the
reviewers asking them to visit the issue's URL and make comments on the change.
When done, the reviewer adds comments through the Gerrit user interface
and clicks "Reply" to send comments back.
You will receive a mail notification when this happens.
You must reply through the web interface.
### Revise and upload
You must respond to review comments through the web interface.
When you have revised the code and are ready for another round of review,
stage those changes and use `git change` to update the
commit.
To send the update change list for another round of review,
run `git mail` again.
The reviewer can comment on the new copy, and the process repeats.
The reviewer approves the change by giving it a positive score
(+1 or +2) and replying `LGTM`: looks good to me.
You can see a list of your pending changes by running
`git pending`, and switch between change branches with
`git change <branch>`.
### Synchronize your client
While you were working, others might have submitted changes to the repository.
To update your local branch, run
```
$ git sync
```
(In git terms, `git sync` runs
`git pull -r`.)
If files you were editing have changed, Git does its best to merge the
remote changes into your local changes.
It may leave some files to merge by hand.
For example, suppose you have edited `sin.go` but
someone else has committed an independent change.
When you run `git sync`,
you will get the (scary-looking) output:
```
$ git sync
Failed to merge in the changes.
Patch failed at 0023 math: improved Sin, Cos and Tan precision for very large arguments
The copy of the patch that failed is found in:
/home/you/repo/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
```
If this happens, run
```
$ git status
```
to see which files failed to merge.
The output will look something like this:
```
rebase in progress; onto a24c3eb
You are currently rebasing branch 'mcgillicutty' on 'a24c3eb'.
(fix conflicts and then run "git rebase --continue")
(use "git rebase --skip" to skip this patch)
(use "git rebase --abort" to check out the original branch)
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
_both modified: sin.go_
```
The only important part in that transcript is the italicized "both modified"
line: Git failed to merge your changes with the conflicting change.
When this happens, Git leaves both sets of edits in the file,
with conflicts marked by `<<<<<<<` and
`>>>>>>>`.
It is now your job to edit the file to combine them.
Continuing the example, searching for those strings in `sin.go`
might turn up:
```
arg = scale(arg)
<<<<<<< HEAD
if arg > 1e9 {
=======
if arg > 1e10 {
>>>>>>> mcgillicutty
largeReduce(arg)
```
Git doesn't show it, but suppose the original text that both edits
started with was 1e8; you changed it to 1e10 and the other change to 1e9,
so the correct answer might now be 1e10. First, edit the section
to remove the markers and leave the correct code:
```
arg = scale(arg)
if arg > 1e10 {
largeReduce(arg)
```
Then tell Git that the conflict is resolved by running
```
$ git add sin.go
```
If you had been editing the file, say for debugging, but do not
care to preserve your changes, you can run
`git reset HEAD sin.go`
to abandon your changes.
Then run `git rebase --continue` to
restore the change commit.
### Reviewing code by others
You can import a change proposed by someone else into your local Git repository.
On the Gerrit review page, click the "Download ▼" link in the upper right
corner, copy the "Checkout" command and run it from your local Git repo.
It should look something like this:
```
$ git fetch https://code.googlesource.com/review refs/changes/21/1221/1 && git checkout FETCH_HEAD
```
To revert, change back to the branch you were working in.
### Submit the change after the review
After the code has been `LGTM`'ed, an approver may
submit it to the master branch using the Gerrit UI.
There is a "Submit" button on the web page for the change
that appears once the change is approved (marked +2).
This checks the change into the repository.
The change description will include a link to the code review,
and the code review will be updated with a link to the change
in the repository.
Since the method used to integrate the changes is "Cherry Pick",
the commit hashes in the repository will be changed by
the submit operation.
### More information
In addition to the information here, the Go community maintains a [CodeReview](https://golang.org/wiki/CodeReview) wiki page.
Feel free to contribute to this page as you learn the review process.
## Contributors
Files in the google-api-go-client repository don't list author names,
both to avoid clutter and to avoid having to keep the lists up to date.
Instead, please add your name to the [`CONTRIBUTORS`](/CONTRIBUTORS)
file as your first code review, keeping the names in sorted order.

55
vendor/google.golang.org/api/CONTRIBUTORS generated vendored Normal file
View File

@ -0,0 +1,55 @@
# This is the official list of people who can contribute
# (and typically have contributed) code to the repository.
# The AUTHORS file lists the copyright holders; this file
# lists people. For example, Google employees are listed here
# but not in AUTHORS, because Google holds the copyright.
#
# The submission process automatically checks to make sure
# that people submitting code are listed in this file (by email address).
#
# Names should be added to this file only after verifying that
# the individual or the individual's organization has agreed to
# the appropriate Contributor License Agreement, found here:
#
# https://cla.developers.google.com/about/google-individual
# https://cla.developers.google.com/about/google-corporate
#
# The CLA can be filled out on the web:
#
# https://cla.developers.google.com/
#
# When adding J Random Contributor's name to this file,
# either J's name or J's organization's name should be
# added to the AUTHORS file, depending on whether the
# individual or corporate CLA was used.
# Names should be added to this file like so:
# Name <email address>
#
# An entry with two email addresses specifies that the
# first address should be used in the submit logs and
# that the second address should be recognized as the
# same person when interacting with Rietveld.
# Please keep the list sorted.
Alain Vongsouvanhalainv <alainv@google.com>
Andrew Gerrand <adg@golang.org>
Brad Fitzpatrick <bradfitz@golang.org>
Eric Koleda <ekoleda+devrel@googlers.com>
Francesc Campoy <campoy@golang.org>
Garrick Evans <garrick@google.com>
Glenn Lewis <gmlewis@google.com>
Ivan Krasin <krasin@golang.org>
Jason Hall <jasonhall@google.com>
Johan Euphrosine <proppy@google.com>
Kostik Shtoyk <kostik@google.com>
Kunpei Sakai <namusyaka@gmail.com>
Matthew Whisenhunt <matt.whisenhunt@gmail.com>
Michael McGreevy <mcgreevy@golang.org>
Nick Craig-Wood <nickcw@gmail.com>
Robbie Trencheny <me@robbiet.us>
Ross Light <light@google.com>
Sarah Adams <shadams@google.com>
Scott Van Woudenberg <scottvw@google.com>
Takashi Matsuo <tmatsuo@google.com>

146
vendor/google.golang.org/api/GettingStarted.md generated vendored Normal file
View File

@ -0,0 +1,146 @@
# Getting Started with the Google APIs for Go
## Getting Started
This is a quick walk-through of how to get started with the Google APIs for Go.
## Background
The first thing to understand is that the Google API libraries are auto-generated for
each language, including Go, so they may not feel like 100% natural for any language.
The Go versions are pretty natural, but please forgive any small non-idiomatic things.
(Suggestions welcome, though!)
## Installing
Pick an API and a version of that API to install.
You can find the complete list by looking at the
[directories here](https://github.com/google/google-api-go-client/tree/master/).
For example, let's install the
[urlshortener's version 1 API](https://godoc.org/google.golang.org/api/urlshortener/v1):
```
$ go get -u google.golang.org/api/urlshortener/v1
```
Now it's ready for use in your code.
## Using
Once you've installed a library, you import it like this:
```go
package main
import (
"context"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"google.golang.org/api/urlshortener/v1"
)
```
The package name, if you don't override it on your import line, is the name of the
API without the version number. In the case above, just `urlshortener`.
## Instantiating
Each API has a `New` function taking an `*http.Client` and returning an API-specific `*Service`.
You create the service like:
```go
svc, err := urlshortener.New(httpClient)
```
## OAuth HTTP Client
The HTTP client you pass in to the service must be one that automatically adds
Google-supported Authorization information to the requests.
There are several ways to do authentication. They will all involve the package
[golang.org/x/oauth2](https://godoc.org/golang.org/x/oauth2) in some way.
### 3-legged OAuth
For 3-legged OAuth (your application redirecting a user through a website to get a
token giving your application access to that user's resources), you will need to
create an oauth2.Config,
```go
var config = &oauth2.Config{
ClientID: "", // from https://console.developers.google.com/project/<your-project-id>/apiui/credential
ClientSecret: "", // from https://console.developers.google.com/project/<your-project-id>/apiui/credential
Endpoint: google.Endpoint,
Scopes: []string{urlshortener.UrlshortenerScope},
}
```
... and then use the AuthCodeURL, Exchange, and Client methods on it.
For an example, see: https://godoc.org/golang.org/x/oauth2#example-Config
For the redirect URL, see
https://developers.google.com/identity/protocols/OAuth2InstalledApp#choosingredirecturi
### Service Accounts
To use a Google service account, or the GCE metadata service, see
the [golang.org/x/oauth2/google](https://godoc.org/golang.org/x/oauth2/google) package.
In particular, see [google.DefaultClient](https://godoc.org/golang.org/x/oauth2/google#DefaultClient).
### Using API Keys
Some APIs require passing API keys from your application.
To do this, you can use
[transport.APIKey](https://godoc.org/google.golang.org/api/googleapi/transport#APIKey):
```go
ctx := context.WithValue(context.Background(), oauth2.HTTPClient, &http.Client{
Transport: &transport.APIKey{Key: developerKey},
})
oauthConfig := &oauth2.Config{ .... }
var token *oauth2.Token = .... // via cache, or oauthConfig.Exchange
httpClient := oauthConfig.Client(ctx, token)
svc, err := urlshortener.New(httpClient)
...
```
## Using the Service
Each service contains zero or more methods and zero or more sub-services.
The sub-services related to a specific type of "Resource".
Those sub-services then contain their own methods.
For instance, the urlshortener API has just the "Url" sub-service:
```go
url, err := svc.Url.Get(shortURL).Do()
if err != nil {
...
}
fmt.Printf("The URL %s goes to %s\n", shortURL, url.LongUrl)
```
For a more complete example, see
[urlshortener.go](https://github.com/google/google-api-go-client/tree/master/examples/urlshortener.go)
in the [examples directory](https://github.com/google/google-api-go-client/tree/master/examples/).
(the examples use some functions in `main.go` in the same directory)
## Error Handling
Most errors returned by the `Do` methods of these clients will be of type
[`googleapi.Error`](https://godoc.org/google.golang.org/api/googleapi#Error).
Use a type assertion to obtain the HTTP status code and other properties of the
error:
```go
url, err := svc.Url.Get(shortURL).Do()
if err != nil {
if e, ok := err.(*googleapi.Error); ok && e.Code == http.StatusNotFound {
...
}
}
```

13
vendor/google.golang.org/api/NOTES generated vendored Normal file
View File

@ -0,0 +1,13 @@
Discovery Service:
https://developers.google.com/discovery/
https://developers.google.com/discovery/v1/reference/
The "type" key:
http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
The "format" key:
http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23
https://developers.google.com/discovery/v1/type-format
Google JSON format docs:
http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml

104
vendor/google.golang.org/api/README.md generated vendored Normal file
View File

@ -0,0 +1,104 @@
# Google APIs Client Library for Go
## Getting Started
```
$ go get google.golang.org/api/tasks/v1
$ go get google.golang.org/api/moderator/v1
$ go get google.golang.org/api/urlshortener/v1
... etc ...
```
and using:
```go
package main
import (
"net/http"
"google.golang.org/api/urlshortener/v1"
)
func main() {
svc, err := urlshortener.New(http.DefaultClient)
// ...
}
```
* For a longer tutorial, see the [Getting Started guide](https://github.com/google/google-api-go-client/blob/master/GettingStarted.md).
* For examples, see the [examples directory](https://github.com/google/google-api-go-client/tree/master/examples).
* For support, use the [golang-nuts](https://groups.google.com/group/golang-nuts) mailing list.
* The code review instance may be found [here](https://code-review.googlesource.com).
## Status
[![GoDoc](https://godoc.org/google.golang.org/api?status.svg)](https://godoc.org/google.golang.org/api)
These are auto-generated Go libraries from the Google Discovery Service's JSON description files of the available "new style" Google APIs.
Due to the auto-generated nature of this collection of libraries, complete APIs or specific versions can appear or go away without notice.
As a result, you should always locally vendor any API(s) that your code relies upon.
These client libraries are officially supported by Google. However, the libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
If you're working with Google Cloud Platform APIs such as Datastore or Pub/Sub,
consider using the
[Cloud Client Libraries for Go](https://github.com/googleapis/google-cloud-go)
instead. These are the new and
idiomatic Go libraries targeted specifically at Google Cloud Platform Services.
The generator itself and the code it produces are beta. Some APIs are
alpha/beta, and indicated as such in the import path (e.g.,
"google.golang.org/api/someapi/v1alpha").
## Application Default Credentials Example
Application Default Credentials provide a simplified way to obtain credentials
for authenticating with Google APIs.
The Application Default Credentials authenticate as the application itself,
which make them great for working with Google Cloud APIs like Storage or
Datastore. They are the recommended form of authentication when building
applications that run on Google Compute Engine or Google App Engine.
Default credentials are provided by the `golang.org/x/oauth2/google` package. To use them, add the following import:
```go
import "golang.org/x/oauth2/google"
```
Some credentials types require you to specify scopes, and service entry points may not inject them. If you encounter this situation you may need to specify scopes as follows:
```go
import (
"context"
"golang.org/x/oauth2/google"
"google.golang.org/api/compute/v1"
)
func main() {
// Use oauth2.NoContext if there isn't a good context to pass in.
ctx := context.Background()
client, err := google.DefaultClient(ctx, compute.ComputeScope)
if err != nil {
//...
}
computeService, err := compute.New(client)
if err != nil {
//...
}
}
```
If you need a `oauth2.TokenSource`, use the `DefaultTokenSource` function:
```go
ts, err := google.DefaultTokenSource(ctx, scope1, scope2, ...)
if err != nil {
//...
}
client := oauth2.NewClient(ctx, ts)
```
See also: [golang.org/x/oauth2/google](https://godoc.org/golang.org/x/oauth2/google) package documentation.

17
vendor/google.golang.org/api/RELEASING.md generated vendored Normal file
View File

@ -0,0 +1,17 @@
# How to Release this Repo
1. Determine the current release version with `git tag -l`. It should look
something like `vX.Y.Z`. We'll call the current version `$CV` and the new
version `$NV`.
1. On master, run `git log $CV..` to list all the changes since the last
release.
1. Edit `CHANGES.md` to include a summary of the changes.
1. Mail the CL containing the `CHANGES.md` changes. When the CL is approved,
submit it.
1. Without submitting any other CLs:
a. Switch to master.
b. `git pull`
c. Tag the repo with the next version: `git tag $NV`.
d. Push the tag: `git push origin $NV`.
1. Update [the releases page](https://github.com/googleapis/google-api-go-client/releases)
with the new release, copying the contents of the CHANGES.md.

2
vendor/google.golang.org/api/TODO generated vendored Normal file
View File

@ -0,0 +1,2 @@
Moved to:
https://github.com/google/google-api-go-client/issues

3925
vendor/google.golang.org/api/api-list.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

54
vendor/google.golang.org/api/doc.go generated vendored Normal file
View File

@ -0,0 +1,54 @@
// Copyright 2019 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package api is the root of the packages used to access Google Cloud
// Services. See https://godoc.org/google.golang.org/api for a full list of
// sub-packages.
//
// Within api there exist numerous clients which connect to Google APIs,
// and various utility packages.
//
//
// Client Options
//
// All clients in sub-packages are configurable via client options. These
// options are described here: https://godoc.org/google.golang.org/api/option.
//
//
// Authentication and Authorization
//
// All the clients in sub-packages support authentication via Google
// Application Default Credentials (see
// https://cloud.google.com/docs/authentication/production), or by providing a
// JSON key file for a Service Account. See the authentication examples in
// https://godoc.org/google.golang.org/api/transport for more details.
//
//
// Versioning and Stability
//
// Due to the auto-generated nature of this collection of libraries, complete
// APIs or specific versions can appear or go away without notice. As a result,
// you should always locally vendor any API(s) that your code relies upon.
//
// Google APIs follow semver as specified by
// https://cloud.google.com/apis/design/versioning. The code generator and
// the code it produces - the libraries in the google.golang.org/api/...
// subpackages - are beta.
//
// Note that versioning and stability is strictly not communicated through Go
// modules. Go modules are used only for dependency management.
//
//
// Integers
//
// Many parameters are specified using ints. However, underlying APIs might
// operate on a finer granularity, expecting int64, int32, uint64, or uint32,
// all of whom have different maximum values. Subsequently, specifying an int
// parameter in one of these clients may result in an error from the API
// because the value is too large.
//
// To see the exact type of int that the API expects, you can inspect the API's
// discovery doc. A global catalogue pointing to the discovery doc of APIs can
// be found at https://www.googleapis.com/discovery/v1/apis.
package api

20
vendor/google.golang.org/api/go.mod generated vendored Normal file
View File

@ -0,0 +1,20 @@
module google.golang.org/api
require (
cloud.google.com/go v0.38.0 // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/google/go-cmp v0.3.0
github.com/hashicorp/golang-lru v0.5.1 // indirect
go.opencensus.io v0.21.0
golang.org/x/lint v0.0.0-20190409202823-959b441ac422
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b
golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c
google.golang.org/appengine v1.5.0
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873
google.golang.org/grpc v1.20.1
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a
)

85
vendor/google.golang.org/api/go.sum generated vendored Normal file
View File

@ -0,0 +1,85 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 h1:QzoH/1pFpZguR8NrRHLcO6jKqfv2zpuSqZLgdm7ZmjI=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c h1:97SnQk1GYRXJgvwZ8fadnxDOWfKvkNQHH3CtZntPSrM=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a h1:LJwr7TCTghdatWv40WobzlKXc9c4s8oGa7QKJUtHhWA=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

23
vendor/google.golang.org/api/tools.go generated vendored Normal file
View File

@ -0,0 +1,23 @@
// +build tools
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloud
import (
_ "golang.org/x/lint/golint"
_ "golang.org/x/tools/cmd/goimports"
_ "honnef.co/go/tools/cmd/staticcheck"
)