diff --git a/Gopkg.lock b/Gopkg.lock index 7c99fe017..d99a75605 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -3,9 +3,9 @@ [[projects]] name = "cloud.google.com/go" - packages = ["compute/metadata","internal"] - revision = "2e6a95edb1071d750f6d7db777bf66cd2997af6c" - version = "v0.7.0" + packages = ["compute/metadata"] + revision = "0f0b8420cb699ac4ce059c63bac263f4301fe95b" + version = "v0.12.0" [[projects]] name = "github.com/PuerkitoBio/purell" @@ -17,7 +17,7 @@ branch = "master" name = "github.com/PuerkitoBio/urlesc" packages = ["."] - revision = "bbf7a2afc14f93e1e0a5c06df524fbd75e5031e5" + revision = "de5bf2ad457846296e2031421a34e2568e304e35" [[projects]] name = "github.com/Shopify/sarama" @@ -40,20 +40,26 @@ [[projects]] name = "github.com/blang/semver" packages = ["."] - revision = "b38d23b8782a487059e8fc8773e9a5b228a77cb6" - version = "v3.5.0" + revision = "2ee87856327ba09384cabd113bc6b5d174e9ec0f" + version = "v3.5.1" [[projects]] name = "github.com/coreos/etcd" - packages = ["client","pkg/pathutil","pkg/types"] - revision = "d267ca9c184e953554257d0acdd1dc9c47d38229" - version = "v3.1.8" + packages = ["client","pkg/pathutil","pkg/srv","pkg/types","version"] + revision = "9d43462d174c664f5edf313dec0de31e1ef4ed47" + version = "v3.2.6" [[projects]] branch = "master" name = "github.com/coreos/go-oidc" packages = ["http","jose","key","oauth2","oidc"] - revision = "c797a55f1c1001ec3169f1d0fbb4c5523563bec6" + revision = "a4973d9a4225417aecf5d450a9522f00c1f7130f" + +[[projects]] + name = "github.com/coreos/go-semver" + packages = ["semver"] + revision = "8ab6407b697782a06568d4b7f1db25550ec2e4c6" + version = "v0.2.0" [[projects]] name = "github.com/coreos/pkg" @@ -76,8 +82,8 @@ [[projects]] name = "github.com/docker/distribution" packages = ["digest","reference"] - revision = "a25b9ef0c9fe242ac04bb20d3a028442b7d266b6" - version = "v2.6.1" + revision = "48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89" + version = "v2.6.2" [[projects]] name = "github.com/eapache/go-resiliency" @@ -143,13 +149,13 @@ branch = "master" name = "github.com/go-openapi/spec" packages = ["."] - revision = "e51c28f07047ad90caff03f6450908720d337e0c" + revision = "3faa0055dbbf2110abc1f3b4e3adbb22721e96e7" [[projects]] branch = "master" name = "github.com/go-openapi/swag" packages = ["."] - revision = "e43299b4afa7bc7f22e5e82e3d48607230e4c177" + revision = "f3f9494671f93fcff853e3c6e9e948b3eb71e590" [[projects]] name = "github.com/gogo/protobuf" @@ -167,7 +173,7 @@ branch = "master" name = "github.com/golang/protobuf" packages = ["proto","ptypes/any"] - revision = "5a0f697c9ed9d68fef0116532c6e05cfeae00e55" + revision = "ab9f9a6dab164b7d1246e0e688b0ab7b94d8553e" [[projects]] branch = "master" @@ -179,13 +185,7 @@ branch = "master" name = "github.com/google/gofuzz" packages = ["."] - revision = "44d81051d367757e1c7c6a5a86423ece9afcf63c" - -[[projects]] - branch = "master" - name = "github.com/googleapis/gax-go" - packages = ["."] - revision = "9af46dd5a1713e8b5cd71106287eba3cefdde50b" + revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" [[projects]] branch = "master" @@ -227,7 +227,7 @@ branch = "master" name = "github.com/mailru/easyjson" packages = ["buffer","jlexer","jwriter"] - revision = "44c0351a5bc860bcb2608d54aa03ea686c4e7b25" + revision = "3b3bbef4e2d9a6f24d7ee73a894afbc064f0e057" [[projects]] name = "github.com/matttproud/golang_protobuf_extensions" @@ -244,14 +244,14 @@ [[projects]] name = "github.com/openzipkin/zipkin-go-opentracing" packages = [".","_thrift/gen-go/scribe","_thrift/gen-go/zipkincore","flag","types","wire"] - revision = "6022d4d3ed39632fad842942bda1813a9b4f63c8" - version = "v0.2.3" + revision = "d88c90182f3fb514be54a1c7adc11a04d41c7da9" + version = "v0.2.4" [[projects]] name = "github.com/pborman/uuid" packages = ["."] - revision = "a97ce2ca70fa5a848076093f05e639a89ca34d06" - version = "v1.0" + revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53" + version = "v1.1" [[projects]] name = "github.com/pierrec/lz4" @@ -281,13 +281,13 @@ branch = "master" name = "github.com/prometheus/common" packages = ["expfmt","internal/bitbucket.org/ww/goautoneg","model"] - revision = "13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207" + revision = "61f87aac8082fa8c3c5655c7608d7478d46ac2ad" [[projects]] branch = "master" name = "github.com/prometheus/procfs" packages = [".","xfs"] - revision = "65c1f6f8f0fc1e2185eb9863a3bc751496404259" + revision = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2" [[projects]] branch = "master" @@ -296,40 +296,40 @@ revision = "1f30fe9094a513ce4c700b9a54458bbb0c96996c" [[projects]] - branch = "master" name = "github.com/spf13/pflag" packages = ["."] revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" + version = "v1.0.0" [[projects]] branch = "master" name = "github.com/ugorji/go" packages = ["codec"] - revision = "708a42d246822952f38190a8d8c4e6b16a0e600c" + revision = "8c0409fcbb70099c748d71f714529204975f6c3f" [[projects]] branch = "master" name = "golang.org/x/crypto" packages = ["ssh/terminal"] - revision = "e1a4589e7d3ea14a3352255d04b6f1a418845e5e" + revision = "81e90905daefcd6fd217b62423c0908922eadb30" [[projects]] branch = "master" name = "golang.org/x/oauth2" packages = [".","google","internal","jws","jwt"] - revision = "f047394b6d14284165300fd82dad67edb3a4d7f6" + revision = "9a379c6b3e95a790ffc43293c2a78dee0d7b6e20" [[projects]] branch = "master" name = "golang.org/x/sys" - packages = ["unix"] - revision = "b90f89a1e7a9c1f6b918820b3daa7f08488c8594" + packages = ["unix","windows"] + revision = "2d6f6f883a06fc0d5f4b14a81e4c28705ea64c15" [[projects]] branch = "master" name = "golang.org/x/text" packages = ["internal/gen","internal/triegen","internal/ucd","transform","unicode/cldr","unicode/norm","width"] - revision = "4ee4af566555f5fbe026368b75596286a312663a" + revision = "ac87088df8ef557f1e32cd00ed0b6fbc3f7ddafb" [[projects]] name = "google.golang.org/appengine" @@ -341,13 +341,13 @@ branch = "master" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] - revision = "aa2eb687b4d3e17154372564ad8d6bf11c3cf21f" + revision = "ee236bd376b077c7a89f260c026c4735b195e459" [[projects]] name = "google.golang.org/grpc" - packages = [".","codes","credentials","grpclb/grpc_lb_v1","grpclog","internal","keepalive","metadata","naming","peer","stats","status","tap","transport"] - revision = "d2e1b51f33ff8c5e4a15560ff049d200e83726c5" - version = "v1.3.0" + packages = [".","codes","connectivity","credentials","grpclb/grpc_lb_v1","grpclog","internal","keepalive","metadata","naming","peer","stats","status","tap","transport"] + revision = "b3ddf786825de56a4178401b7e174ee332173b66" + version = "v1.5.2" [[projects]] name = "gopkg.in/inf.v0" @@ -359,7 +359,7 @@ branch = "v2" name = "gopkg.in/yaml.v2" packages = ["."] - revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b" + revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" [[projects]] name = "k8s.io/client-go" diff --git a/vendor/cloud.google.com/go/.travis.yml b/vendor/cloud.google.com/go/.travis.yml index d9be5f73e..8c769d71f 100644 --- a/vendor/cloud.google.com/go/.travis.yml +++ b/vendor/cloud.google.com/go/.travis.yml @@ -7,9 +7,9 @@ go: install: - go get -v cloud.google.com/go/... script: -- openssl aes-256-cbc -K $encrypted_912ff8fa81ad_key -iv $encrypted_912ff8fa81ad_iv -in key.json.enc -out key.json -d +- openssl aes-256-cbc -K $encrypted_a8b3f4fc85f4_key -iv $encrypted_a8b3f4fc85f4_iv -in key.json.enc -out key.json -d - GCLOUD_TESTS_GOLANG_PROJECT_ID="dulcet-port-762" GCLOUD_TESTS_GOLANG_KEY="$(pwd)/key.json" - go test -race -v cloud.google.com/go/... + ./run-tests.sh $TRAVIS_COMMIT env: matrix: # The GCLOUD_TESTS_API_KEY environment variable. diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md index 2b4bac995..aed05dc4f 100644 --- a/vendor/cloud.google.com/go/CONTRIBUTING.md +++ b/vendor/cloud.google.com/go/CONTRIBUTING.md @@ -4,6 +4,12 @@ 1. `go get golang.org/x/review/git-codereview` to install the code reviewing tool. 1. You will need to ensure that your `GOBIN` directory (by default `$GOPATH/bin`) is in your `PATH` so that git can find the command. + 1. If you would like, you may want to set up aliases for git-codereview, + such that `git codereview change` becomes `git change`. See the + [godoc](https://godoc.org/golang.org/x/review/git-codereview) for details. + 1. Should you run into issues with the git-codereview tool, please note + that all error messages will assume that you have set up these + aliases. 1. Get the cloud package by running `go get -d cloud.google.com/go`. 1. If you have already checked out the source, make sure that the remote git origin is https://code.googlesource.com/gocloud: diff --git a/vendor/cloud.google.com/go/MIGRATION.md b/vendor/cloud.google.com/go/MIGRATION.md new file mode 100644 index 000000000..791210de1 --- /dev/null +++ b/vendor/cloud.google.com/go/MIGRATION.md @@ -0,0 +1,54 @@ +# Code Changes + +## v0.10.0 + +- pubsub: Replace + + ``` + sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"}) + ``` + + with + + ``` + sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ + PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"}, + }) + ``` + +- trace: traceGRPCServerInterceptor will be provided from *trace.Client. +Given an initialized `*trace.Client` named `tc`, instead of + + ``` + s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc))) + ``` + + write + + ``` + s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor())) + ``` + +- trace trace.GRPCClientInterceptor will also provided from *trace.Client. +Instead of + + ``` + conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor())) + ``` + + write + + ``` + conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())) + ``` + +- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC +interceptor as a dial option as shown below when initializing Cloud package +clients: + + ``` + c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))) + if err != nil { + ... + } + ``` diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md index 5c188eb22..937a528b9 100644 --- a/vendor/cloud.google.com/go/README.md +++ b/vendor/cloud.google.com/go/README.md @@ -1,22 +1,21 @@ -# Google Cloud for Go +# Google Cloud Client Libraries for Go -[![Build Status](https://travis-ci.org/GoogleCloudPlatform/google-cloud-go.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/google-cloud-go) [![GoDoc](https://godoc.org/cloud.google.com/go?status.svg)](https://godoc.org/cloud.google.com/go) +Go packages for [Google Cloud Platform](https://cloud.google.com) services. + ``` go import "cloud.google.com/go" ``` -Go packages for Google Cloud Platform services. - To install the packages on your system, ``` $ go get -u cloud.google.com/go/... ``` -**NOTE:** These packages are under development, and may occasionally make -backwards-incompatible changes. +**NOTE:** Some of these packages are under development, and may occasionally +make backwards-incompatible changes. **NOTE:** Github repo is a mirror of [https://code.googlesource.com/gocloud](https://code.googlesource.com/gocloud). @@ -34,154 +33,84 @@ backwards-incompatible changes. ## News -_February 14, 2017_ +_August 22, 2017+ -Release of a client library for Spanner. See -the -[blog post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html). +*v0.12.0* -Note that although the Spanner service is beta, the Go client library is alpha. +- pubsub: Subscription.Receive now uses streaming pull. -_December 12, 2016_ +- pubsub: add Client.TopicInProject to access topics in a different project + than the client. -Beta release of BigQuery, DataStore, Logging and Storage. See the -[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). +- errors: renamed errorreporting. The errors package will be removed shortly. -Also, BigQuery now supports structs. Read a row directly into a struct with -`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`. -You can also use field tags. See the [package documentation][cloud-bigquery-ref] -for details. +- datastore: improved retry behavior. -_December 5, 2016_ +- bigquery: support updates to dataset metadata, with etags. -More changes to BigQuery: +- bigquery: add etag support to Table.Update (BREAKING: etag argument added). -* The `ValueList` type was removed. It is no longer necessary. Instead of - ```go - var v ValueList - ... it.Next(&v) .. - ``` - use +- bigquery: generate all job IDs on the client. - ```go - var v []Value - ... it.Next(&v) ... - ``` +- storage: support bucket lifecycle configurations. -* Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or - `ValueList` would append to the slice. Now each call resets the size to zero first. -* Schema inference will infer the SQL type BYTES for a struct field of - type []byte. Previously it inferred STRING. +_July 31, 2017_ -* The types `uint`, `uint64` and `uintptr` are no longer supported in schema - inference. BigQuery's integer type is INT64, and those types may hold values - that are not correctly represented in a 64-bit signed integer. +*v0.11.0* -* The SQL types DATE, TIME and DATETIME are now supported. They correspond to - the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil` - package. +- Clients for spanner, pubsub and video are now in beta. -_November 17, 2016_ +- New client for DLP. -Change to BigQuery: values from INTEGER columns will now be returned as int64, -not int. This will avoid errors arising from large values on 32-bit systems. +- spanner: performance and testing improvements. -_November 8, 2016_ +- storage: requester-pays buckets are supported. -New datastore feature: datastore now encodes your nested Go structs as Entity values, -instead of a flattened list of the embedded struct's fields. -This means that you may now have twice-nested slices, eg. -```go -type State struct { - Cities []struct{ - Populations []int - } -} -``` +- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements. -See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for -more details. +- pubsub: bug fixes and other minor improvements -_November 8, 2016_ +_June 17, 2017_ -Breaking changes to datastore: contexts no longer hold namespaces; instead you -must set a key's namespace explicitly. Also, key functions have been changed -and renamed. -* The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method: - ```go - q := datastore.NewQuery("Kind").Namespace("ns") - ``` +*v0.10.0* -* All the fields of Key are exported. That means you can construct any Key with a struct literal: - ```go - k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} - ``` +- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update. -* As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed. +- pubsub: Subscription.Receive now runs concurrently for higher throughput. -* `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace - ```go - NewIncompleteKey(ctx, kind, parent) - ``` - with - ```go - IncompleteKey(kind, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. +- vision: cloud.google.com/go/vision is deprecated. Use +cloud.google.com/go/vision/apiv1 instead. -* `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace - ```go - NewKey(ctx, kind, name, 0, parent) - NewKey(ctx, kind, "", id, parent) - ``` - with - ```go - NameKey(kind, name, parent) - IDKey(kind, id, parent) - ``` - and if you do use namespaces, make sure you set the namespace on the returned key. +- translation: now stable. -* The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`. +- trace: several changes to the surface. See the link below. -* The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection. - -See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for -more details. - -_October 27, 2016_ - -Breaking change to bigquery: `NewGCSReference` is now a function, -not a method on `Client`. - -New bigquery feature: `Table.LoaderFrom` now accepts a `ReaderSource`, enabling -loading data into a table from a file or any `io.Reader`. - -_October 21, 2016_ - -Breaking change to pubsub: removed `pubsub.Done`. - -Use `iterator.Done` instead, where `iterator` is the package -`google.golang.org/api/iterator`. +[Code changes required from v0.9.0.](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/MIGRATION.md) [Older news](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/old-news.md) ## Supported APIs -Google API | Status | Package --------------------------------|--------------|----------------------------------------------------------- -[Datastore][cloud-datastore] | beta | [`cloud.google.com/go/datastore`][cloud-datastore-ref] -[Storage][cloud-storage] | beta | [`cloud.google.com/go/storage`][cloud-storage-ref] -[Bigtable][cloud-bigtable] | beta | [`cloud.google.com/go/bigtable`][cloud-bigtable-ref] -[BigQuery][cloud-bigquery] | beta | [`cloud.google.com/go/bigquery`][cloud-bigquery-ref] -[Logging][cloud-logging] | beta | [`cloud.google.com/go/logging`][cloud-logging-ref] -[Pub/Sub][cloud-pubsub] | alpha | [`cloud.google.com/go/pubsub`][cloud-pubsub-ref] -[Vision][cloud-vision] | beta | [`cloud.google.com/go/vision`][cloud-vision-ref] -[Language][cloud-language] | alpha | [`cloud.google.com/go/language/apiv1`][cloud-language-ref] -[Speech][cloud-speech] | alpha | [`cloud.google.com/go/speech/apiv1beta`][cloud-speech-ref] -[Spanner][cloud-spanner] | alpha | [`cloud.google.com/go/spanner`][cloud-spanner-ref] +Google API | Status | Package +---------------------------------|--------------|----------------------------------------------------------- +[Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`][cloud-datastore-ref] +[Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`][cloud-storage-ref] +[Bigtable][cloud-bigtable] | beta | [`cloud.google.com/go/bigtable`][cloud-bigtable-ref] +[BigQuery][cloud-bigquery] | beta | [`cloud.google.com/go/bigquery`][cloud-bigquery-ref] +[Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`][cloud-logging-ref] +[Monitoring][cloud-monitoring] | alpha | [`cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref] +[Pub/Sub][cloud-pubsub] | beta | [`cloud.google.com/go/pubsub`][cloud-pubsub-ref] +[Vision][cloud-vision] | beta | [`cloud.google.com/go/vision/apiv1`][cloud-vision-ref] +[Language][cloud-language] | beta | [`cloud.google.com/go/language/apiv1`][cloud-language-ref] +[Speech][cloud-speech] | beta | [`cloud.google.com/go/speech/apiv1`][cloud-speech-ref] +[Spanner][cloud-spanner] | beta | [`cloud.google.com/go/spanner`][cloud-spanner-ref] +[Translation][cloud-translation] | stable | [`cloud.google.com/go/translate`][cloud-translation-ref] +[Trace][cloud-trace] | alpha | [`cloud.google.com/go/trace`][cloud-trace-ref] +[Video Intelligence][cloud-video]| beta | [`cloud.google.com/go/videointelligence/apiv1beta1`][cloud-video-ref] +[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`][cloud-errors-ref] > **Alpha status**: the API is still being actively developed. As a @@ -215,6 +144,7 @@ By default, each API will use [Google Application Default Credentials][default-c for authorization credentials used in calling the API endpoints. This will allow your application to run in many environments without requiring explicit configuration. +[snip]:# (auth) ```go client, err := storage.NewClient(ctx) ``` @@ -225,6 +155,7 @@ pass [`option.WithServiceAccountFile`](https://godoc.org/google.golang.org/api/option#WithServiceAccountFile) to the `NewClient` function of the desired package. For example: +[snip]:# (auth-JSON) ```go client, err := storage.NewClient(ctx, option.WithServiceAccountFile("path/to/keyfile.json")) ``` @@ -234,6 +165,7 @@ You can exert more control over authorization by using the create an `oauth2.TokenSource`. Then pass [`option.WithTokenSource`](https://godoc.org/google.golang.org/api/option#WithTokenSource) to the `NewClient` function: +[snip]:# (auth-ts) ```go tokenSource := ... client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource)) @@ -251,6 +183,7 @@ client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource)) First create a `datastore.Client` to use throughout your application: +[snip]:# (datastore-1) ```go client, err := datastore.NewClient(ctx, "my-project-id") if err != nil { @@ -260,6 +193,7 @@ if err != nil { Then use that client to interact with the API: +[snip]:# (datastore-2) ```go type Post struct { Title string @@ -267,8 +201,8 @@ type Post struct { PublishedAt time.Time } keys := []*datastore.Key{ - datastore.NewKey(ctx, "Post", "post1", 0, nil), - datastore.NewKey(ctx, "Post", "post2", 0, nil), + datastore.NameKey("Post", "post1", nil), + datastore.NameKey("Post", "post2", nil), } posts := []*Post{ {Title: "Post 1", Body: "...", PublishedAt: time.Now()}, @@ -290,6 +224,7 @@ if _, err := client.PutMulti(ctx, keys, posts); err != nil { First create a `storage.Client` to use throughout your application: +[snip]:# (storage-1) ```go client, err := storage.NewClient(ctx) if err != nil { @@ -297,6 +232,7 @@ if err != nil { } ``` +[snip]:# (storage-2) ```go // Read the object1 from bucket. rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx) @@ -321,6 +257,7 @@ if err != nil { First create a `pubsub.Client` to use throughout your application: +[snip]:# (pubsub-1) ```go client, err := pubsub.NewClient(ctx, "project-id") if err != nil { @@ -330,36 +267,30 @@ if err != nil { Then use the client to publish and subscribe: +[snip]:# (pubsub-2) ```go // Publish "hello world" on topic1. topic := client.Topic("topic1") -msgIDs, err := topic.Publish(ctx, &pubsub.Message{ +res := topic.Publish(ctx, &pubsub.Message{ Data: []byte("hello world"), }) +// The publish happens asynchronously. +// Later, you can get the result from res: +... +msgID, err := res.Get(ctx) if err != nil { log.Fatal(err) } -// Create an iterator to pull messages via subscription1. -it, err := client.Subscription("subscription1").Pull(ctx) +// Use a callback to receive messages via subscription1. +sub := client.Subscription("subscription1") +err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) { + fmt.Println(m.Data) + m.Ack() // Acknowledge that we've consumed the message. +}) if err != nil { log.Println(err) } -defer it.Stop() - -// Consume N messages from the iterator. -for i := 0; i < N; i++ { - msg, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - log.Fatalf("Failed to retrieve message: %v", err) - } - - fmt.Printf("Message %d: %s\n", i, msg.Data) - msg.Done(true) // Acknowledge that we've consumed the message. -} ``` ## Cloud BigQuery [![GoDoc](https://godoc.org/cloud.google.com/go/bigquery?status.svg)](https://godoc.org/cloud.google.com/go/bigquery) @@ -372,13 +303,16 @@ for i := 0; i < N; i++ { ### Example Usage First create a `bigquery.Client` to use throughout your application: +[snip]:# (bq-1) ```go c, err := bigquery.NewClient(ctx, "my-project-ID") if err != nil { - // TODO: Handle error. + // TODO: Handle error. } ``` + Then use that client to interact with the API: +[snip]:# (bq-2) ```go // Construct a query. q := c.Query(` @@ -391,19 +325,19 @@ q := c.Query(` // Execute the query. it, err := q.Read(ctx) if err != nil { - // TODO: Handle error. + // TODO: Handle error. } // Iterate through the results. for { - var values []bigquery.Value - err := it.Next(&values) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(values) + var values []bigquery.Value + err := it.Next(&values) + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + fmt.Println(values) } ``` @@ -418,29 +352,32 @@ for { ### Example Usage First create a `logging.Client` to use throughout your application: - +[snip]:# (logging-1) ```go ctx := context.Background() client, err := logging.NewClient(ctx, "my-project") if err != nil { - // TODO: Handle error. + // TODO: Handle error. } ``` + Usually, you'll want to add log entries to a buffer to be periodically flushed (automatically and asynchronously) to the Stackdriver Logging service. +[snip]:# (logging-2) ```go logger := client.Logger("my-log") logger.Log(logging.Entry{Payload: "something happened!"}) ``` + Close your client before your program exits, to flush any buffered log entries. +[snip]:# (logging-3) ```go err = client.Close() if err != nil { - // TODO: Handle error. + // TODO: Handle error. } ``` - ## Cloud Spanner [![GoDoc](https://godoc.org/cloud.google.com/go/spanner?status.svg)](https://godoc.org/cloud.google.com/go/spanner) - [About Cloud Spanner][cloud-spanner] @@ -451,26 +388,28 @@ if err != nil { First create a `spanner.Client` to use throughout your application: +[snip]:# (spanner-1) ```go client, err := spanner.NewClient(ctx, "projects/P/instances/I/databases/D") if err != nil { - log.Fatal(err) + log.Fatal(err) } ``` +[snip]:# (spanner-2) ```go // Simple Reads And Writes -_, err := client.Apply(ctx, []*spanner.Mutation{ - spanner.Insert("Users", - []string{"name", "email"}, - []interface{}{"alice", "a@example.com"})}) +_, err = client.Apply(ctx, []*spanner.Mutation{ + spanner.Insert("Users", + []string{"name", "email"}, + []interface{}{"alice", "a@example.com"})}) if err != nil { - log.Fatal(err) + log.Fatal(err) } row, err := client.Single().ReadRow(ctx, "Users", - spanner.Key{"alice"}, []string{"email"}) + spanner.Key{"alice"}, []string{"email"}) if err != nil { - log.Fatal(err) + log.Fatal(err) } ``` @@ -512,17 +451,32 @@ for more information. [cloud-logging-docs]: https://cloud.google.com/logging/docs [cloud-logging-ref]: https://godoc.org/cloud.google.com/go/logging -[cloud-vision]: https://cloud.google.com/vision/ -[cloud-vision-ref]: https://godoc.org/cloud.google.com/go/vision +[cloud-monitoring]: https://cloud.google.com/monitoring/ +[cloud-monitoring-ref]: https://godoc.org/cloud.google.com/go/monitoring/apiv3 + +[cloud-vision]: https://cloud.google.com/vision +[cloud-vision-ref]: https://godoc.org/cloud.google.com/go/vision/apiv1 [cloud-language]: https://cloud.google.com/natural-language [cloud-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1 [cloud-speech]: https://cloud.google.com/speech -[cloud-speech-ref]: https://godoc.org/cloud.google.com/go/speech/apiv1beta1 +[cloud-speech-ref]: https://godoc.org/cloud.google.com/go/speech/apiv1 [cloud-spanner]: https://cloud.google.com/spanner/ [cloud-spanner-ref]: https://godoc.org/cloud.google.com/go/spanner [cloud-spanner-docs]: https://cloud.google.com/spanner/docs +[cloud-translation]: https://cloud.google.com/translation +[cloud-translation-ref]: https://godoc.org/cloud.google.com/go/translation + +[cloud-trace]: https://cloud.google.com/trace/ +[cloud-trace-ref]: https://godoc.org/cloud.google.com/go/trace + +[cloud-video]: https://cloud.google.com/video-intelligence/ +[cloud-video-ref]: https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1 + +[cloud-errors]: https://cloud.google.com/error-reporting/ +[cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errorreporting + [default-creds]: https://developers.google.com/identity/protocols/application-default-credentials diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go index f9d2bef6c..e708c031b 100644 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go @@ -34,8 +34,6 @@ import ( "golang.org/x/net/context" "golang.org/x/net/context/ctxhttp" - - "cloud.google.com/go/internal" ) const ( @@ -48,6 +46,8 @@ const ( // This is variable name is not defined by any spec, as far as // I know; it was made up for the Go package. metadataHostEnv = "GCE_METADATA_HOST" + + userAgent = "gcloud-golang/0.1" ) type cachedValue struct { @@ -65,24 +65,20 @@ var ( var ( metaClient = &http.Client{ - Transport: &internal.Transport{ - Base: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - ResponseHeaderTimeout: 2 * time.Second, - }, + Transport: &http.Transport{ + Dial: (&net.Dialer{ + Timeout: 2 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, + ResponseHeaderTimeout: 2 * time.Second, }, } subscribeClient = &http.Client{ - Transport: &internal.Transport{ - Base: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - }, + Transport: &http.Transport{ + Dial: (&net.Dialer{ + Timeout: 2 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, }, } ) @@ -132,6 +128,7 @@ func getETag(client *http.Client, suffix string) (value, etag string, err error) url := "http://" + host + "/computeMetadata/v1/" + suffix req, _ := http.NewRequest("GET", url, nil) req.Header.Set("Metadata-Flavor", "Google") + req.Header.Set("User-Agent", userAgent) res, err := client.Do(req) if err != nil { return "", "", err @@ -202,7 +199,9 @@ func testOnGCE() bool { // Try two strategies in parallel. // See https://github.com/GoogleCloudPlatform/google-cloud-go/issues/194 go func() { - res, err := ctxhttp.Get(ctx, metaClient, "http://"+metadataIP) + req, _ := http.NewRequest("GET", "http://"+metadataIP, nil) + req.Header.Set("User-Agent", userAgent) + res, err := ctxhttp.Do(ctx, metaClient, req) if err != nil { resc <- false return diff --git a/vendor/cloud.google.com/go/internal/cloud.go b/vendor/cloud.google.com/go/internal/cloud.go deleted file mode 100644 index 8e0c8f8e5..000000000 --- a/vendor/cloud.google.com/go/internal/cloud.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// 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 internal provides support for the cloud packages. -// -// Users should not import this package directly. -package internal - -import ( - "fmt" - "net/http" -) - -const userAgent = "gcloud-golang/0.1" - -// Transport is an http.RoundTripper that appends Google Cloud client's -// user-agent to the original request's user-agent header. -type Transport struct { - // TODO(bradfitz): delete internal.Transport. It's too wrappy for what it does. - // Do User-Agent some other way. - - // Base is the actual http.RoundTripper - // requests will use. It must not be nil. - Base http.RoundTripper -} - -// RoundTrip appends a user-agent to the existing user-agent -// header and delegates the request to the base http.RoundTripper. -func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { - req = cloneRequest(req) - ua := req.Header.Get("User-Agent") - if ua == "" { - ua = userAgent - } else { - ua = fmt.Sprintf("%s %s", ua, userAgent) - } - req.Header.Set("User-Agent", ua) - return t.Base.RoundTrip(req) -} - -// cloneRequest returns a clone of the provided *http.Request. -// The clone is a shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header) - for k, s := range r.Header { - r2.Header[k] = s - } - return r2 -} diff --git a/vendor/cloud.google.com/go/internal/retry.go b/vendor/cloud.google.com/go/internal/retry.go deleted file mode 100644 index 79995be4c..000000000 --- a/vendor/cloud.google.com/go/internal/retry.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// 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 internal - -import ( - "fmt" - "time" - - gax "github.com/googleapis/gax-go" - - "golang.org/x/net/context" -) - -// Retry calls the supplied function f repeatedly according to the provided -// backoff parameters. It returns when one of the following occurs: -// When f's first return value is true, Retry immediately returns with f's second -// return value. -// When the provided context is done, Retry returns with ctx.Err(). -func Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error { - return retry(ctx, bo, f, gax.Sleep) -} - -func retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error), - sleep func(context.Context, time.Duration) error) error { - var lastErr error - for { - stop, err := f() - if stop { - return err - } - // Remember the last "real" error from f. - if err != nil && err != context.Canceled && err != context.DeadlineExceeded { - lastErr = err - } - p := bo.Pause() - if cerr := sleep(ctx, p); cerr != nil { - if lastErr != nil { - return fmt.Errorf("%v; last function err: %v", cerr, lastErr) - } - return cerr - } - } -} diff --git a/vendor/cloud.google.com/go/internal/retry_test.go b/vendor/cloud.google.com/go/internal/retry_test.go deleted file mode 100644 index 590b55508..000000000 --- a/vendor/cloud.google.com/go/internal/retry_test.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// 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 internal - -import ( - "errors" - "testing" - "time" - - "golang.org/x/net/context" - - gax "github.com/googleapis/gax-go" -) - -func TestRetry(t *testing.T) { - ctx := context.Background() - // Without a context deadline, retry will run until the function - // says not to retry any more. - n := 0 - endRetry := errors.New("end retry") - err := retry(ctx, gax.Backoff{}, - func() (bool, error) { - n++ - if n < 10 { - return false, nil - } - return true, endRetry - }, - func(context.Context, time.Duration) error { return nil }) - if got, want := err, endRetry; got != want { - t.Errorf("got %v, want %v", err, endRetry) - } - if n != 10 { - t.Errorf("n: got %d, want %d", n, 10) - } - - // If the context has a deadline, sleep will return an error - // and end the function. - n = 0 - err = retry(ctx, gax.Backoff{}, - func() (bool, error) { return false, nil }, - func(context.Context, time.Duration) error { - n++ - if n < 10 { - return nil - } - return context.DeadlineExceeded - }) - if err == nil { - t.Error("got nil, want error") - } -} diff --git a/vendor/cloud.google.com/go/key.json.enc b/vendor/cloud.google.com/go/key.json.enc index 2f673a84b..a8978a901 100644 Binary files a/vendor/cloud.google.com/go/key.json.enc and b/vendor/cloud.google.com/go/key.json.enc differ diff --git a/vendor/cloud.google.com/go/old-news.md b/vendor/cloud.google.com/go/old-news.md index 718dd00ed..7b3ee4448 100644 --- a/vendor/cloud.google.com/go/old-news.md +++ b/vendor/cloud.google.com/go/old-news.md @@ -1,3 +1,142 @@ +_March 17, 2017_ + +Breaking Pubsub changes. +* Publish is now asynchronous +([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)). +* Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)). +* Message.Done replaced with Message.Ack and Message.Nack. + +_February 14, 2017_ + +Release of a client library for Spanner. See +the +[blog post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html). + +Note that although the Spanner service is beta, the Go client library is alpha. + +_December 12, 2016_ + +Beta release of BigQuery, DataStore, Logging and Storage. See the +[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). + +Also, BigQuery now supports structs. Read a row directly into a struct with +`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`. +You can also use field tags. See the [package documentation][cloud-bigquery-ref] +for details. + +_December 5, 2016_ + +More changes to BigQuery: + +* The `ValueList` type was removed. It is no longer necessary. Instead of + ```go + var v ValueList + ... it.Next(&v) .. + ``` + use + + ```go + var v []Value + ... it.Next(&v) ... + ``` + +* Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or + `ValueList` would append to the slice. Now each call resets the size to zero first. + +* Schema inference will infer the SQL type BYTES for a struct field of + type []byte. Previously it inferred STRING. + +* The types `uint`, `uint64` and `uintptr` are no longer supported in schema + inference. BigQuery's integer type is INT64, and those types may hold values + that are not correctly represented in a 64-bit signed integer. + +* The SQL types DATE, TIME and DATETIME are now supported. They correspond to + the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil` + package. + +_November 17, 2016_ + +Change to BigQuery: values from INTEGER columns will now be returned as int64, +not int. This will avoid errors arising from large values on 32-bit systems. + +_November 8, 2016_ + +New datastore feature: datastore now encodes your nested Go structs as Entity values, +instead of a flattened list of the embedded struct's fields. +This means that you may now have twice-nested slices, eg. +```go +type State struct { + Cities []struct{ + Populations []int + } +} +``` + +See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for +more details. + +_November 8, 2016_ + +Breaking changes to datastore: contexts no longer hold namespaces; instead you +must set a key's namespace explicitly. Also, key functions have been changed +and renamed. + +* The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method: + ```go + q := datastore.NewQuery("Kind").Namespace("ns") + ``` + +* All the fields of Key are exported. That means you can construct any Key with a struct literal: + ```go + k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"} + ``` + +* As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed. + +* `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace + ```go + NewIncompleteKey(ctx, kind, parent) + ``` + with + ```go + IncompleteKey(kind, parent) + ``` + and if you do use namespaces, make sure you set the namespace on the returned key. + +* `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace + ```go + NewKey(ctx, kind, name, 0, parent) + NewKey(ctx, kind, "", id, parent) + ``` + with + ```go + NameKey(kind, name, parent) + IDKey(kind, id, parent) + ``` + and if you do use namespaces, make sure you set the namespace on the returned key. + +* The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`. + +* The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection. + +See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for +more details. + +_October 27, 2016_ + +Breaking change to bigquery: `NewGCSReference` is now a function, +not a method on `Client`. + +New bigquery feature: `Table.LoaderFrom` now accepts a `ReaderSource`, enabling +loading data into a table from a file or any `io.Reader`. + +_October 21, 2016_ + +Breaking change to pubsub: removed `pubsub.Done`. + +Use `iterator.Done` instead, where `iterator` is the package +`google.golang.org/api/iterator`. + _October 19, 2016_ Breaking changes to cloud.google.com/go/bigquery: diff --git a/vendor/cloud.google.com/go/run-tests.sh b/vendor/cloud.google.com/go/run-tests.sh new file mode 100755 index 000000000..ac0b66a7a --- /dev/null +++ b/vendor/cloud.google.com/go/run-tests.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +# Selectively run tests for this repo, based on what has changed +# in a commit. Runs short tests for the whole repo, and full tests +# for changed directories. + +set -e + +prefix=cloud.google.com/go + +dryrun=false +if [[ $1 == "-n" ]]; then + dryrun=true + shift +fi + +if [[ $1 == "" ]]; then + echo >&2 "usage: $0 [-n] COMMIT" + exit 1 +fi + +# Files or directories that cause all tests to run if modified. +declare -A run_all +run_all=([.travis.yml]=1 [run-tests.sh]=1) + +function run { + if $dryrun; then + echo $* + else + (set -x; $*) + fi +} + + +# Find all the packages that have changed in this commit. +declare -A changed_packages + +for f in $(git diff-tree --no-commit-id --name-only -r $1); do + if [[ ${run_all[$f]} == 1 ]]; then + # This change requires a full test. Do it and exit. + run go test -race -v $prefix/... + exit + fi + # Map, e.g., "spanner/client.go" to "$prefix/spanner". + d=$(dirname $f) + if [[ $d == "." ]]; then + pkg=$prefix + else + pkg=$prefix/$d + fi + changed_packages[$pkg]=1 +done + +echo "changed packages: ${!changed_packages[*]}" + + +# Reports whether its argument, a package name, depends (recursively) +# on a changed package. +function depends_on_changed_package { + # According to go list, a package does not depend on itself, so + # we test that separately. + if [[ ${changed_packages[$1]} == 1 ]]; then + return 0 + fi + for dep in $(go list -f '{{range .Deps}}{{.}} {{end}}' $1); do + if [[ ${changed_packages[$dep]} == 1 ]]; then + return 0 + fi + done + return 1 +} + +# Collect the packages into two separate lists. (It is faster go test a list of +# packages than to individually go test each one.) + +shorts= +fulls= +for pkg in $(go list $prefix/...); do # for each package in the repo + if depends_on_changed_package $pkg; then # if it depends on a changed package + fulls="$fulls $pkg" # run the full test + else # otherwise + shorts="$shorts $pkg" # run the short test + fi +done +run go test -race -v -short $shorts +run go test -race -v $fulls diff --git a/vendor/github.com/PuerkitoBio/urlesc/README.md b/vendor/github.com/PuerkitoBio/urlesc/README.md index bebe305e0..57aff0a53 100644 --- a/vendor/github.com/PuerkitoBio/urlesc/README.md +++ b/vendor/github.com/PuerkitoBio/urlesc/README.md @@ -1,4 +1,4 @@ -urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.png?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) +urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.svg?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) ====== Package urlesc implements query escaping as per RFC 3986. diff --git a/vendor/github.com/blang/semver/.travis.yml b/vendor/github.com/blang/semver/.travis.yml new file mode 100644 index 000000000..102fb9a69 --- /dev/null +++ b/vendor/github.com/blang/semver/.travis.yml @@ -0,0 +1,21 @@ +language: go +matrix: + include: + - go: 1.4.3 + - go: 1.5.4 + - go: 1.6.3 + - go: 1.7 + - go: tip + allow_failures: + - go: tip +install: +- go get golang.org/x/tools/cmd/cover +- go get github.com/mattn/goveralls +script: +- echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci + -repotoken $COVERALLS_TOKEN +- echo "Build examples" ; cd examples && go build +- echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .) +env: + global: + secure: HroGEAUQpVq9zX1b1VIkraLiywhGbzvNnTZq2TMxgK7JHP8xqNplAeF1izrR2i4QLL9nsY+9WtYss4QuPvEtZcVHUobw6XnL6radF7jS1LgfYZ9Y7oF+zogZ2I5QUMRLGA7rcxQ05s7mKq3XZQfeqaNts4bms/eZRefWuaFZbkw= diff --git a/vendor/github.com/blang/semver/README.md b/vendor/github.com/blang/semver/README.md index 4399639e2..08b2e4a3d 100644 --- a/vendor/github.com/blang/semver/README.md +++ b/vendor/github.com/blang/semver/README.md @@ -1,4 +1,4 @@ -semver for golang [![Build Status](https://drone.io/github.com/blang/semver/status.png)](https://drone.io/github.com/blang/semver/latest) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master) +semver for golang [![Build Status](https://travis-ci.org/blang/semver.svg?branch=master)](https://travis-ci.org/blang/semver) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master) ====== semver is a [Semantic Versioning](http://semver.org/) library written in golang. It fully covers spec version `2.0.0`. @@ -41,6 +41,7 @@ Features - Compare Helper Methods - InPlace manipulation - Ranges `>=1.0.0 <2.0.0 || >=3.0.0 !3.0.1-beta.1` +- Wildcards `>=1.x`, `<=2.5.x` - Sortable (implements sort.Interface) - database/sql compatible (sql.Scanner/Valuer) - encoding/json compatible (json.Marshaler/Unmarshaler) @@ -59,6 +60,8 @@ A condition is composed of an operator and a version. The supported operators ar - `1.0.0`, `=1.0.0`, `==1.0.0` Equal to `1.0.0` - `!1.0.0`, `!=1.0.0` Not equal to `1.0.0`. Excludes version `1.0.0`. +Note that spaces between the operator and the version will be gracefully tolerated. + A `Range` can link multiple `Ranges` separated by space: Ranges can be linked by logical AND: diff --git a/vendor/github.com/blang/semver/package.json b/vendor/github.com/blang/semver/package.json index 568be8d94..1cf8ebdd9 100644 --- a/vendor/github.com/blang/semver/package.json +++ b/vendor/github.com/blang/semver/package.json @@ -12,6 +12,6 @@ "license": "MIT", "name": "semver", "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "3.4.0" + "version": "3.5.1" } diff --git a/vendor/github.com/coreos/etcd/.gitignore b/vendor/github.com/coreos/etcd/.gitignore index 604fd4d27..210be6fe9 100644 --- a/vendor/github.com/coreos/etcd/.gitignore +++ b/vendor/github.com/coreos/etcd/.gitignore @@ -12,3 +12,4 @@ *.test tools/functional-tester/docker/bin hack/tls-setup/certs +.idea diff --git a/vendor/github.com/coreos/etcd/.travis.yml b/vendor/github.com/coreos/etcd/.travis.yml index 0b74c3a72..fb8e9b832 100644 --- a/vendor/github.com/coreos/etcd/.travis.yml +++ b/vendor/github.com/coreos/etcd/.travis.yml @@ -4,7 +4,8 @@ go_import_path: github.com/coreos/etcd sudo: false go: - - 1.7.5 + - 1.8.3 + - tip notifications: on_success: never @@ -13,6 +14,8 @@ notifications: env: matrix: - TARGET=amd64 + - TARGET=darwin-amd64 + - TARGET=windows-amd64 - TARGET=arm64 - TARGET=arm - TARGET=386 @@ -23,6 +26,10 @@ matrix: allow_failures: - go: tip exclude: + - go: tip + env: TARGET=darwin-amd64 + - go: tip + env: TARGET=windows-amd64 - go: tip env: TARGET=arm - go: tip @@ -32,6 +39,24 @@ matrix: - go: tip env: TARGET=ppc64le +addons: + apt: + sources: + - debian-sid + packages: + - libpcap-dev + - libaspell-dev + - libhunspell-dev + - shellcheck + +before_install: + - go get -v -u github.com/chzchzchz/goword + - go get -v -u github.com/coreos/license-bill-of-materials + - go get -v -u honnef.co/go/tools/cmd/gosimple + - go get -v -u honnef.co/go/tools/cmd/unused + - go get -v -u honnef.co/go/tools/cmd/staticcheck + - ./scripts/install-marker.sh amd64 + # disable godep restore override install: - pushd cmd/etcd && go get -t -v ./... && popd @@ -42,6 +67,12 @@ script: amd64) GOARCH=amd64 ./test ;; + darwin-amd64) + GO_BUILD_FLAGS="-a -v" GOPATH="" GOOS=darwin GOARCH=amd64 ./build + ;; + windows-amd64) + GO_BUILD_FLAGS="-a -v" GOPATH="" GOOS=windows GOARCH=amd64 ./build + ;; 386) GOARCH=386 PASSES="build unit" ./test ;; diff --git a/vendor/github.com/coreos/etcd/CONTRIBUTING.md b/vendor/github.com/coreos/etcd/CONTRIBUTING.md index 736f3f2d6..635f73a30 100644 --- a/vendor/github.com/coreos/etcd/CONTRIBUTING.md +++ b/vendor/github.com/coreos/etcd/CONTRIBUTING.md @@ -1,6 +1,6 @@ # How to contribute -etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers and other resources to make getting your contribution into etcd easier. +etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into etcd. # Email and chat @@ -14,24 +14,20 @@ etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. ## Reporting bugs and creating issues -Reporting bugs is one of the best ways to contribute. However, a good bug report -has some very specific qualities, so please read over our short document on -[reporting bugs](https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md) -before you submit your bug report. This document might contain links known -issues, another good reason to take a look there, before reporting your bug. +Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug. ## Contribution flow This is a rough outline of what a contributor's workflow looks like: -- Create a topic branch from where you want to base your work. This is usually master. +- Create a topic branch from where to base the contribution. This is usually master. - Make commits of logical units. -- Make sure your commit messages are in the proper format (see below). -- Push your changes to a topic branch in your fork of the repository. +- Make sure commit messages are in the proper format (see below). +- Push changes in a topic branch to a personal fork of the repository. - Submit a pull request to coreos/etcd. -- Your PR must receive a LGTM from two maintainers found in the MAINTAINERS file. +- The PR must receive a LGTM from two maintainers found in the MAINTAINERS file. -Thanks for your contributions! +Thanks for contributing! ### Code style @@ -48,8 +44,7 @@ the body of the commit should describe the why. ``` scripts: add the test-cluster command -this uses tmux to setup a test cluster that you can easily kill and -start for debugging. +this uses tmux to setup a test cluster that can easily be killed and started for debugging. Fixes #38 ``` @@ -64,7 +59,4 @@ The format can be described more formally as follows: