diff --git a/.travis.yml b/.travis.yml index a3171ff70616..9c5eae3e17c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,23 +148,24 @@ jobs: stage: test # Generators - - os: linux - env: TARGETS="-C generator/metricbeat test test-package" - go: $TRAVIS_GO_VERSION - stage: test - - os: linux - env: TARGETS="-C generator/beat test test-package" - go: $TRAVIS_GO_VERSION - stage: test + # Temporarily disable generator jobs + #- os: linux + # env: TARGETS="-C generator/_templates/metricbeat test test-package" + # go: $TRAVIS_GO_VERSION + # stage: test + #- os: linux + # env: TARGETS="-C generator/_templates/beat test test-package" + # go: $TRAVIS_GO_VERSION + # stage: test - - os: osx - env: TARGETS="-C generator/metricbeat test" - go: $TRAVIS_GO_VERSION - stage: test - - os: osx - env: TARGETS="-C generator/beat test" - go: $TRAVIS_GO_VERSION - stage: test + #- os: osx + # env: TARGETS="-C generator/_templates/metricbeat test" + # go: $TRAVIS_GO_VERSION + # stage: test + #- os: osx + # env: TARGETS="-C generator/_templates/beat test" + # go: $TRAVIS_GO_VERSION + # stage: test # Kubernetes - os: linux diff --git a/Jenkinsfile b/Jenkinsfile index 161f3f60df50..448c557aa250 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -196,6 +196,19 @@ pipeline { makeTarget("Auditbeat x-pack Linux", "-C x-pack/auditbeat testsuite") } } + stage('Auditbeat x-pack'){ + agent { label 'ubuntu && immutable' } + options { skipDefaultCheckout() } + when { + beforeAgent true + expression { + return env.BUILD_AUDITBEAT_XPACK != "false" + } + } + steps { + makeTarget("Auditbeat x-pack Linux", "-C x-pack/auditbeat testsuite") + } + } stage('Libbeat'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } @@ -459,44 +472,45 @@ pipeline { } } } - stage('Generators'){ - agent { label 'ubuntu && immutable' } - options { skipDefaultCheckout() } - when { - beforeAgent true - expression { - return env.BUILD_GENERATOR != "false" - } - } - stages { - stage('Generators Metricbeat Linux'){ - steps { - makeTarget("Generators Metricbeat Linux", "-C generator/metricbeat test") - makeTarget("Generators Metricbeat Linux", "-C generator/metricbeat test-package") - } - } - stage('Generators Beat Linux'){ - steps { - makeTarget("Generators Beat Linux", "-C generator/beat test") - makeTarget("Generators Beat Linux", "-C generator/beat test-package") - } - } - stage('Generators Metricbeat Mac OS X'){ - agent { label 'macosx' } - options { skipDefaultCheckout() } - steps { - makeTarget("Generators Metricbeat Mac OS X", "-C generator/metricbeat test") - } - } - stage('Generators Beat Mac OS X'){ - agent { label 'macosx' } - options { skipDefaultCheckout() } - steps { - makeTarget("Generators Beat Mac OS X", "-C generator/beat test") - } - } - } - } + // Temporarily disable generator jobs + //stage('Generators'){ + // agent { label 'ubuntu && immutable' } + // options { skipDefaultCheckout() } + // when { + // beforeAgent true + // expression { + // return env.BUILD_GENERATOR != "false" + // } + // } + // stages { + // stage('Generators Metricbeat Linux'){ + // steps { + // makeTarget("Generators Metricbeat Linux", "-C generator/_templates/metricbeat test") + // makeTarget("Generators Metricbeat Linux", "-C generator/_templates/metricbeat test-package") + // } + // } + // stage('Generators Beat Linux'){ + // steps { + // makeTarget("Generators Beat Linux", "-C generator/_templates/beat test") + // makeTarget("Generators Beat Linux", "-C generator/_templates/beat test-package") + // } + // } + // stage('Generators Metricbeat Mac OS X'){ + // agent { label 'macosx' } + // options { skipDefaultCheckout() } + // steps { + // makeTarget("Generators Metricbeat Mac OS X", "-C generator/_templates/metricbeat test") + // } + // } + // stage('Generators Beat Mac OS X'){ + // agent { label 'macosx' } + // options { skipDefaultCheckout() } + // steps { + // makeTarget("Generators Beat Mac OS X", "-C generator/_templates/beat test") + // } + // } + // } + //} stage('Kubernetes'){ agent { label 'ubuntu && immutable' } options { skipDefaultCheckout() } @@ -672,7 +686,7 @@ def loadConfigEnvVars(){ "^x-pack/functionbeat/.*", "^x-pack/libbeat/.*", ]) - env.BUILD_GENERATOR = isChanged(["^generator/.*"]) + //env.BUILD_GENERATOR = isChanged(["^generator/.*"]) env.BUILD_HEARTBEAT = isChanged(["^heartbeat/.*"]) env.BUILD_HEARTBEAT_XPACK = isChanged([ "^heartbeat/.*", diff --git a/Makefile b/Makefile index b10c298e0a58..f7262cc07017 100644 --- a/Makefile +++ b/Makefile @@ -81,12 +81,6 @@ clean: mage @$(MAKE) -C generator clean @-mage -clean -# Cleans up the vendor directory from unnecessary files -# This should always be run after updating the dependencies -.PHONY: clean-vendor -clean-vendor: - @sh script/clean_vendor.sh - .PHONY: check check: python-env @$(foreach var,$(PROJECTS) dev-tools $(PROJECTS_XPACK_MAGE),$(MAKE) -C $(var) check || exit 1;) @@ -95,6 +89,7 @@ check: python-env @# Validate that all updates were committed @$(MAKE) update @$(MAKE) check-headers + go mod tidy @git diff | cat @git update-index --refresh @git diff-index --exit-code HEAD -- diff --git a/NOTICE.txt b/NOTICE.txt index 265bb3d09744..b28dc94889b4 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -9,9 +9,36 @@ Third party libraries used by the Elastic Beats project: ========================================================================== +-------------------------------------------------------------------- +Dependency: 4d63.com/embedfiles +Revision: 995e0740726f +License type (autodetected): MIT +./vendor/4d63.com/embedfiles/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2017, Leigh McCulloch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + -------------------------------------------------------------------- Dependency: 4d63.com/tz -Revision: 6d37baae851b6f07225308b199322f70907aa3dd +Version: v1.1.1 +Revision: 6d37baae851b License type (autodetected): MIT ./vendor/4d63.com/tz/LICENSE: -------------------------------------------------------------------- @@ -71,17 +98,43 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: cloud.google.com/go -Version: v0.40.0 -Revision: 457ea5c15ccf3b87db582c450e80101989da35f7 +Version: v0.51.0 License type (autodetected): Apache-2.0 ./vendor/cloud.google.com/go/LICENSE: -------------------------------------------------------------------- Apache License 2.0 +-------------------------------------------------------------------- +Dependency: cloud.google.com/go/datastore +Version: v1.0.0 +License type (autodetected): Apache-2.0 +./vendor/cloud.google.com/go/datastore/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: cloud.google.com/go/pubsub +Version: v1.0.1 +License type (autodetected): Apache-2.0 +./vendor/cloud.google.com/go/pubsub/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: cloud.google.com/go/storage +Version: v1.0.0 +License type (autodetected): Apache-2.0 +./vendor/cloud.google.com/go/storage/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + -------------------------------------------------------------------- Dependency: code.cloudfoundry.org/go-diodes -Revision: f77fb823c7ee0156ed4cdadaf4f79ac3fd84613f +Revision: f77fb823c7ee License type (autodetected): Apache-2.0 ./vendor/code.cloudfoundry.org/go-diodes/LICENSE: -------------------------------------------------------------------- @@ -109,8 +162,7 @@ as noted in the LICENSE file. -------------------------------------------------------------------- Dependency: code.cloudfoundry.org/go-loggregator -Version: v7.7.0 -Revision: b8d176783c8a6280a34f0e19e0e8f57d722773a1 +Version: v7.4.0 License type (autodetected): Apache-2.0 ./vendor/code.cloudfoundry.org/go-loggregator/LICENSE: -------------------------------------------------------------------- @@ -136,7 +188,7 @@ limitations under the License. -------------------------------------------------------------------- Dependency: code.cloudfoundry.org/gofileutils -Revision: 4d0c80011a0f37da1711c184028bc40137cd45af +Revision: 4d0c80011a0f License type (autodetected): Apache-2.0 ./vendor/code.cloudfoundry.org/gofileutils/LICENSE: -------------------------------------------------------------------- @@ -157,7 +209,7 @@ conditions of the subcomponent's license, as noted in the LICENSE file. -------------------------------------------------------------------- Dependency: code.cloudfoundry.org/rfc5424 -Revision: 236a6d29298aea12f69978f33393d12465abc429 +Revision: 236a6d29298a License type (autodetected): BSD-2-Clause ./vendor/code.cloudfoundry.org/rfc5424/LICENSE: -------------------------------------------------------------------- @@ -187,18 +239,10 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: contrib.go.opencensus.io/exporter/ocagent -Revision: 8110e6c0236bb231b19119275a6be6ec666d05c8 -License type (autodetected): Apache-2.0 -./vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/aerospike/aerospike-client-go -Revision: 0f3b54da6bdc2c31c505f9afbc5f434dd2089658 +Version: v1.27.1 +Revision: 0f3b54da6bdc License type (autodetected): Apache-2.0 ./vendor/github.com/aerospike/aerospike-client-go/LICENSE: -------------------------------------------------------------------- @@ -207,7 +251,6 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/aerospike/aerospike-client-go/pkg/bcrypt -Revision: 0f3b54da6bdc2c31c505f9afbc5f434dd2089658 License type (autodetected): BSD-3-Clause ./vendor/github.com/aerospike/aerospike-client-go/pkg/bcrypt/LICENSE: -------------------------------------------------------------------- @@ -243,7 +286,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/akavel/rsrc -Revision: b9f6b78f792dc3dddaf295854d968f5b6fdcdba1 +Version: v0.8.0 License type (autodetected): MIT ./vendor/github.com/akavel/rsrc/LICENSE.txt: -------------------------------------------------------------------- @@ -271,7 +314,7 @@ THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/andrewkroh/sys -Revision: 287798fe3e430efeb9318b95ff52353aaa2b59b1 +Revision: 287798fe3e43 License type (autodetected): BSD-3-Clause ./vendor/github.com/andrewkroh/sys/LICENSE: -------------------------------------------------------------------- @@ -303,68 +346,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: github.com/antlr/antlr4 -Revision: b627fffdd1e8ef49f2e29c977e828614e8894739 -License type (autodetected): BSD-3-Clause -./vendor/github.com/antlr/antlr4/LICENSE.txt: --------------------------------------------------------------------- -[The "BSD 3-clause license"] -Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -===== - -MIT License for codepointat.js from https://git.io/codepointat -MIT License for fromcodepoint.js from https://git.io/vDW1m - -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------- Dependency: github.com/armon/go-socks5 -Revision: e75332964ef517daa070d7c38a9466a0d687e0a5 +Revision: e75332964ef5 License type (autodetected): MIT ./vendor/github.com/armon/go-socks5/LICENSE: -------------------------------------------------------------------- @@ -391,8 +375,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/aws/aws-lambda-go -Version: =v1.6.0 -Revision: 2d482ef09017ae953b1e8d5a6ddac5b696663a3c +Version: v1.6.0 License type (autodetected): Apache-2.0 ./vendor/github.com/aws/aws-lambda-go/LICENSE: -------------------------------------------------------------------- @@ -401,8 +384,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/aws/aws-lambda-go -Version: =v1.6.0 -Revision: 2d482ef09017ae953b1e8d5a6ddac5b696663a3c +Version: v1.6.0 License type (autodetected): MIT ./vendor/github.com/aws/aws-lambda-go/LICENSE-LAMBDACODE: -------------------------------------------------------------------- @@ -425,27 +407,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/aws/aws-sdk-go-v2 Version: v0.9.0 -Revision: 098e15df3044cf1b04a222c1c33c3e6135ac89f3 License type (autodetected): Apache-2.0 ./vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt: -------------------------------------------------------------------- Apache License 2.0 - --------------------------------------------------------------------- -Dependency: github.com/awslabs/goformation -Version: v4.1.0 -Revision: 18ccd0e58e5df10d9f82f875d54b087d3058cfc1 -License type (autodetected): Apache-2.0 -./vendor/github.com/awslabs/goformation/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - +-------NOTICE.txt----- +AWS SDK for Go +Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2014-2015 Stripe, Inc. -------------------------------------------------------------------- Dependency: github.com/awslabs/goformation/v4 Version: v4.1.0 -Revision: 18ccd0e58e5df10d9f82f875d54b087d3058cfc1 License type (autodetected): Apache-2.0 ./vendor/github.com/awslabs/goformation/v4/LICENSE: -------------------------------------------------------------------- @@ -458,7 +432,6 @@ Copyright 2011-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -------------------------------------------------------------------- Dependency: github.com/Azure/azure-amqp-common-go/v3 Version: v3.0.0 -Revision: af261efd31b6641d91d5c53cc4f9bc1e438f4e5a License type (autodetected): MIT ./vendor/github.com/Azure/azure-amqp-common-go/v3/LICENSE: -------------------------------------------------------------------- @@ -486,8 +459,7 @@ License type (autodetected): MIT -------------------------------------------------------------------- Dependency: github.com/Azure/azure-event-hubs-go/v3 -Version: v3.0.0 -Revision: 7a1b2e2089e284bcec716b3bdc64ee2e5e626871 +Version: v3.1.0 License type (autodetected): MIT ./vendor/github.com/Azure/azure-event-hubs-go/v3/LICENSE: -------------------------------------------------------------------- @@ -515,6 +487,7 @@ License type (autodetected): MIT -------------------------------------------------------------------- Dependency: github.com/Azure/azure-pipeline-go +Version: v0.2.1 License type (autodetected): MIT ./vendor/github.com/Azure/azure-pipeline-go/LICENSE: -------------------------------------------------------------------- @@ -541,7 +514,7 @@ License type (autodetected): MIT SOFTWARE -------------------------------------------------------------------- Dependency: github.com/Azure/azure-sdk-for-go -Revision: 0820c0553d6c410603056869f7b0e52d61ce5bee +Version: v37.1.0 License type (autodetected): Apache-2.0 ./vendor/github.com/Azure/azure-sdk-for-go/LICENSE: -------------------------------------------------------------------- @@ -556,6 +529,7 @@ the Microsoft Corporation (https://www.microsoft.com). -------------------------------------------------------------------- Dependency: github.com/Azure/azure-storage-blob-go +Version: v0.8.0 License type (autodetected): MIT ./vendor/github.com/Azure/azure-storage-blob-go/LICENSE: -------------------------------------------------------------------- @@ -582,7 +556,7 @@ License type (autodetected): MIT SOFTWARE -------------------------------------------------------------------- Dependency: github.com/Azure/go-amqp -Revision: 35df54553cf7e6d1b8526b67fb5dd2e1ff0b0ff2 +Version: v0.12.6 License type (autodetected): MIT ./vendor/github.com/Azure/go-amqp/LICENSE: -------------------------------------------------------------------- @@ -610,7 +584,7 @@ License type (autodetected): MIT -------------------------------------------------------------------- Dependency: github.com/Azure/go-ansiterm -Revision: d6e3b3328b783f23731bc4d058875b0371ff8109 +Revision: d6e3b3328b78 License type (autodetected): MIT ./vendor/github.com/Azure/go-ansiterm/LICENSE: -------------------------------------------------------------------- @@ -637,17 +611,89 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/Azure/go-autorest -Revision: ba1147dc57f993013ef255c128ca1cac8a557409 +Dependency: github.com/Azure/go-autorest/autorest +Version: v0.9.4 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/autorest/adal +Version: v0.8.1 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/autorest/azure/auth +Version: v0.4.2 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/autorest/azure/cli +Version: v0.3.1 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/autorest/date +Version: v0.2.0 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/date/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/autorest/to +Version: v0.3.0 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/to/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/autorest/validation +Version: v0.2.0 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/logger +Version: v0.1.0 +License type (autodetected): Apache-2.0 +./vendor/github.com/Azure/go-autorest/logger/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + +-------------------------------------------------------------------- +Dependency: github.com/Azure/go-autorest/tracing +Version: v0.5.0 License type (autodetected): Apache-2.0 -./vendor/github.com/Azure/go-autorest/LICENSE: +./vendor/github.com/Azure/go-autorest/tracing/LICENSE: -------------------------------------------------------------------- Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/beorn7/perks -Revision: 37c8de3658fcb183f997c4e13e8337516ab753e6 +Version: v1.0.1 License type (autodetected): MIT ./vendor/github.com/beorn7/perks/LICENSE: -------------------------------------------------------------------- @@ -674,7 +720,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/blakesmith/ar -Revision: 8bd4349a67f2533b078dbc524689d15dba0f4659 +Revision: 8bd4349a67f2 License type (autodetected): MIT ./vendor/github.com/blakesmith/ar/COPYING: -------------------------------------------------------------------- @@ -699,9 +745,19 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-------------------------------------------------------------------- +Dependency: github.com/bradleyfalzon/ghinstallation +Version: v1.1.0 +License type (autodetected): Apache-2.0 +./vendor/github.com/bradleyfalzon/ghinstallation/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + + -------------------------------------------------------------------- Dependency: github.com/bsm/sarama-cluster -Revision: 7e67d87a6b3f83fe08c096fd084691bd9dca112f +Version: v2.1.14 +Revision: 7e67d87a6b3f License type (autodetected): MIT ./vendor/github.com/bsm/sarama-cluster/LICENSE: -------------------------------------------------------------------- @@ -729,33 +785,36 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/cavaliercoder/badio -Revision: ce5280129e9e9d80def35bfe203b845a4eebc9db +Dependency: github.com/BurntSushi/toml +Version: v0.3.1 License type (autodetected): MIT -./vendor/github.com/cavaliercoder/badio/LICENSE: +./vendor/github.com/BurntSushi/toml/COPYING: -------------------------------------------------------------------- -Copyright (c) 2015 Ryan Armstrong +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Copyright (c) 2013 TOML authors -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/cavaliercoder/go-rpm -Revision: 7a9c54e3d83e935c2f070a97273c99be6a3ac2e9 +Revision: 7a9c54e3d83e License type (autodetected): BSD-3-Clause ./vendor/github.com/cavaliercoder/go-rpm/LICENSE: -------------------------------------------------------------------- @@ -787,19 +846,10 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/census-instrumentation/opencensus-proto -Revision: 26aa36c099c2041b432cf3cc8a26c5fb858d218b -License type (autodetected): Apache-2.0 -./vendor/github.com/census-instrumentation/opencensus-proto/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/cespare/xxhash -Revision: 2372543dd2bbab7a55ce14c54eb357abe23a42f5 +Dependency: github.com/cespare/xxhash/v2 +Version: v2.1.1 License type (autodetected): MIT -./vendor/github.com/cespare/xxhash/LICENSE.txt: +./vendor/github.com/cespare/xxhash/v2/LICENSE.txt: -------------------------------------------------------------------- Copyright (c) 2016 Caleb Spare @@ -824,41 +874,9 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------- -Dependency: github.com/cloudflare/cfssl -Revision: b1ec8c586c2aa3ec3eaf4a622933f169cfa5648b -License type (autodetected): BSD-2-Clause -./vendor/github.com/cloudflare/cfssl/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2014 CloudFlare Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- Dependency: github.com/cloudfoundry-community/go-cfclient -Version: master -Revision: 35bcce23fc5f8b9969723ac38c0de1f82c4d3471 +Revision: 35bcce23fc5f License type (autodetected): MIT ./vendor/github.com/cloudfoundry-community/go-cfclient/LICENSE: -------------------------------------------------------------------- @@ -886,7 +904,7 @@ THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/cloudfoundry/sonde-go -Revision: b33733203bb48d7c56de7cb639d77f78b0449d19 +Revision: b33733203bb4 License type (autodetected): Apache-2.0 ./vendor/github.com/cloudfoundry/sonde-go/LICENSE: -------------------------------------------------------------------- @@ -911,7 +929,7 @@ Limitations under the License. -------------------------------------------------------------------- Dependency: github.com/containerd/containerd -Revision: 36cf5b690dcc00ff0f34ff7799209050c3d0c59a +Version: v1.3.3 License type (autodetected): Apache-2.0 ./vendor/github.com/containerd/containerd/LICENSE: -------------------------------------------------------------------- @@ -937,7 +955,7 @@ See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. -------------------------------------------------------------------- Dependency: github.com/containerd/continuity -Revision: 26c1120b8d4107d2471b93ad78ef7ce1fc84c4c4 +Revision: 26c1120b8d41 License type (autodetected): Apache-2.0 ./vendor/github.com/containerd/continuity/LICENSE: -------------------------------------------------------------------- @@ -946,7 +964,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/containerd/fifo -Revision: bda0ff6ed73c67bfb5e62bc9c697f146b7fd7f13 +Revision: bda0ff6ed73c License type (autodetected): Apache-2.0 ./vendor/github.com/containerd/fifo/LICENSE: -------------------------------------------------------------------- @@ -955,7 +973,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/coreos/bbolt -Revision: af9db2027c98c61ecd8e17caa5bd265792b9b9a2 +Version: v1.3.1 +Revision: af9db2027c98 License type (autodetected): MIT ./vendor/github.com/coreos/bbolt/LICENSE: -------------------------------------------------------------------- @@ -981,26 +1000,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/coreos/etcd -Revision: 4d210173ae0d59d4d746735fdd26839513aadaf1 +Dependency: github.com/coreos/go-systemd/v22 +Version: v22.0.0 License type (autodetected): Apache-2.0 -./vendor/github.com/coreos/etcd/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - --------NOTICE----- -CoreOS Project -Copyright 2014 CoreOS, Inc - -This product includes software developed at CoreOS, Inc. -(http://www.coreos.com/). - --------------------------------------------------------------------- -Dependency: github.com/coreos/go-systemd -Version: v20 -Revision: e64a0ec8b42a61e2a9801dc1d0abe539dea79197 -License type (autodetected): Apache-2.0 -./vendor/github.com/coreos/go-systemd/LICENSE: +./vendor/github.com/coreos/go-systemd/v22/LICENSE: -------------------------------------------------------------------- Apache License 2.0 @@ -1013,7 +1016,7 @@ This product includes software developed at CoreOS, Inc. -------------------------------------------------------------------- Dependency: github.com/coreos/pkg -Revision: 97fdf19511ea361ae1c100dd393cc47f8dcfa1e1 +Revision: 97fdf19511ea License type (autodetected): Apache-2.0 ./vendor/github.com/coreos/pkg/LICENSE: -------------------------------------------------------------------- @@ -1028,16 +1031,15 @@ This product includes software developed at CoreOS, Inc. -------------------------------------------------------------------- Dependency: github.com/davecgh/go-spew -Version: v1.1.0 -Revision: 346938d642f2ec3594ed81d874461961cd0faa76 -License type (autodetected): MIT +Version: v1.1.1 +License type (autodetected): ISC ./vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------- ISC License Copyright (c) 2012-2016 Dave Collins -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. @@ -1051,7 +1053,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/davecgh/go-xdr -Revision: e6a2ba005892b6a5b27cb5352f64c2e96942dd28 +Revision: e6a2ba005892 License type (autodetected): MIT ./vendor/github.com/davecgh/go-xdr/LICENSE: -------------------------------------------------------------------- @@ -1070,7 +1072,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/denisenkom/go-mssqldb -Revision: 4e0d7dc8888fbb59764060e99b7b68e77a6f9698 +Revision: 4e0d7dc8888f License type (autodetected): BSD-3-Clause ./vendor/github.com/denisenkom/go-mssqldb/LICENSE.txt: -------------------------------------------------------------------- @@ -1104,7 +1106,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/devigned/tab -Revision: 0c15cf42f9a213a393bbc9ddbd13c231c7a36af0 +Version: v0.1.2 +Revision: 0c15cf42f9a2 License type (autodetected): MIT ./vendor/github.com/devigned/tab/LICENSE: -------------------------------------------------------------------- @@ -1132,7 +1135,8 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/dgrijalva/jwt-go -Revision: 5e25c22bd5d6de03265bbe5462dcd162f85046f6 +Version: v3.2.1 +Revision: 5e25c22bd5d6 License type (autodetected): MIT ./vendor/github.com/dgrijalva/jwt-go/LICENSE: -------------------------------------------------------------------- @@ -1147,7 +1151,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI -------------------------------------------------------------------- Dependency: github.com/digitalocean/go-libvirt -Revision: 6075ea3c39a182efd22179110e92d4e8a8892d00 +Revision: 6075ea3c39a1 License type (autodetected): Apache-2.0 ./vendor/github.com/digitalocean/go-libvirt/LICENSE.md: -------------------------------------------------------------------- @@ -1156,7 +1160,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/dimchansky/utfbom -Revision: d2133a1ce379ef6fa992b0514a77146c60db9d1c +Version: v1.1.0 License type (autodetected): Apache-2.0 ./vendor/github.com/dimchansky/utfbom/LICENSE: -------------------------------------------------------------------- @@ -1165,7 +1169,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/dlclark/regexp2 -Revision: 7632a260cbaf5e7594fc1544a503456ecd0827f1 +Version: v1.1.7 +Revision: 7632a260cbaf License type (autodetected): MIT ./vendor/github.com/dlclark/regexp2/LICENSE: -------------------------------------------------------------------- @@ -1193,7 +1198,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/docker/distribution -Revision: aeaeb844071362767ad497eb0911fcf60e47fa11 +Version: v2.7.1 License type (autodetected): Apache-2.0 ./vendor/github.com/docker/distribution/LICENSE: -------------------------------------------------------------------- @@ -1202,8 +1207,10 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/docker/docker -Version: v19.03.5 -Revision: ea84732a77251e0d7af278e2b7df1d6a59fca46b +Version: v1.4.2 +Revision: 8af4db6f002a +Overwrite: github.com/docker/engine +Overwrite-Revision: ea84732a7725 License type (autodetected): Apache-2.0 ./vendor/github.com/docker/docker/LICENSE: -------------------------------------------------------------------- @@ -1232,26 +1239,16 @@ See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. -------------------------------------------------------------------- Dependency: github.com/docker/go-connections -Version: v0.3.0 -Revision: 3ede32e2033de7505e6500d6c868c2b9ed9f169d +Version: v0.4.0 License type (autodetected): Apache-2.0 ./vendor/github.com/docker/go-connections/LICENSE: -------------------------------------------------------------------- Apache License 2.0 --------------------------------------------------------------------- -Dependency: github.com/docker/go-events -Revision: e31b211e4f1cd09aa76fe4ac244571fab96ae47f -License type (autodetected): Apache-2.0 -./vendor/github.com/docker/go-events/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/docker/go-metrics -Revision: b619b3592b65de4f087d9f16863a7e6ff905973c +Version: v0.0.1 License type (autodetected): Apache-2.0 ./vendor/github.com/docker/go-metrics/LICENSE: -------------------------------------------------------------------- @@ -1277,7 +1274,9 @@ See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. -------------------------------------------------------------------- Dependency: github.com/docker/go-plugins-helpers -Revision: 1e6269c305b8c75cfda1c8aa91349c38d7335814 +Revision: 1e6269c305b8 +Overwrite: github.com/elastic/go-plugins-helpers +Overwrite-Revision: bdf17607b79f License type (autodetected): Apache-2.0 ./vendor/github.com/docker/go-plugins-helpers/LICENSE: -------------------------------------------------------------------- @@ -1306,7 +1305,7 @@ See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. -------------------------------------------------------------------- Dependency: github.com/docker/go-units -Revision: 0dadbb0345b35ec7ef35e228dabb8de89a65bf52 +Version: v0.4.0 License type (autodetected): Apache-2.0 ./vendor/github.com/docker/go-units/LICENSE: -------------------------------------------------------------------- @@ -1314,66 +1313,31 @@ Apache License 2.0 -------------------------------------------------------------------- -Dependency: github.com/docker/libkv -Revision: 458977154600b9f23984d9f4b82e79570b5ae12b -License type (autodetected): Apache-2.0 -./vendor/github.com/docker/libkv/LICENSE.code: +Dependency: github.com/dop251/goja +Overwrite: github.com/andrewkroh/goja +Overwrite-Revision: dd2ac4456e20 +License type (autodetected): MIT +./vendor/github.com/dop251/goja/LICENSE: -------------------------------------------------------------------- -Apache License 2.0 +Copyright (c) 2016 Dmitry Panov + +Copyright (c) 2012 Robert Krimen +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following conditions: --------------------------------------------------------------------- -Dependency: github.com/docker/libnetwork -Revision: 92d1fbe1eb0883cf11d283cea8e658275146411d -License type (autodetected): Apache-2.0 -./vendor/github.com/docker/libnetwork/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - --------------------------------------------------------------------- -Dependency: github.com/docker/libtrust -Revision: aabc10ec26b754e797f9028f4589c5b7bd90dc20 -License type (autodetected): Apache-2.0 -./vendor/github.com/docker/libtrust/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/docker/swarmkit -Revision: 958d149179db019aef3a065f23b35455b2dd54ca -License type (autodetected): Apache-2.0 -./vendor/github.com/docker/swarmkit/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/dop251/goja -Revision: dd2ac4456e2073f116d6b88741d513addabe0326 -License type (autodetected): MIT -./vendor/github.com/dop251/goja/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2016 Dmitry Panov - -Copyright (c) 2012 Robert Krimen - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/dop251/goja_nodejs -Revision: adff31b136e6b7e044712aab7236a775e1bd085e +Revision: adff31b136e6 License type (autodetected): MIT ./vendor/github.com/dop251/goja_nodejs/LICENSE: -------------------------------------------------------------------- @@ -1393,7 +1357,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -------------------------------------------------------------------- Dependency: github.com/dustin/go-humanize -Revision: 259d2a102b871d17f30e3cd9881a642961a1e486 +Revision: bb3d318650d4 License type (autodetected): MIT ./vendor/github.com/dustin/go-humanize/LICENSE: -------------------------------------------------------------------- @@ -1421,7 +1385,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/eapache/go-resiliency -Revision: b86b1ec0dd4209a588dc1285cdd471e73525c0b3 +Version: v1.1.0 License type (autodetected): MIT ./vendor/github.com/eapache/go-resiliency/LICENSE: -------------------------------------------------------------------- @@ -1450,7 +1414,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/eapache/go-xerial-snappy -Revision: bb955e01b9346ac19dc29eb16586c90ded99a98c +Revision: 776d5712da21 License type (autodetected): MIT ./vendor/github.com/eapache/go-xerial-snappy/LICENSE: -------------------------------------------------------------------- @@ -1478,7 +1442,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/eapache/queue -Revision: 44cc805cf13205b55f69e14bcb69867d1ae92f98 +Version: v1.1.0 License type (autodetected): MIT ./vendor/github.com/eapache/queue/LICENSE: -------------------------------------------------------------------- @@ -1505,7 +1469,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/eclipse/paho.mqtt.golang -Revision: 0d940dd29fd24f905cd16b28b1209b4977b97e1a +Version: v1.2.1 +Revision: 0d940dd29fd2 License type (autodetected): EPL-1.0 ./vendor/github.com/eclipse/paho.mqtt.golang/LICENSE: -------------------------------------------------------------------- @@ -1599,27 +1564,45 @@ This Agreement is governed by the laws of the State of New York and the intellec -------------------------------------------------------------------- Dependency: github.com/elastic/ecs Version: v1.4.0 -Revision: cc4b36eebec29975f57cd0475c3987c9bde5c15a License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/ecs/LICENSE.txt: -------------------------------------------------------------------- Apache License 2.0 +-------NOTICE.txt----- +Elastic Common Schema +Copyright 2018 Elasticsearch B.V. + +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. -------------------------------------------------------------------- Dependency: github.com/elastic/go-libaudit Version: v0.4.0 -Revision: 39073a2988f718067d85d27a4d18b1b57de5d947 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-libaudit/LICENSE.txt: -------------------------------------------------------------------- Apache License 2.0 +-------NOTICE.txt----- +Elastic go-libaudit +Copyright 2017-2018 Elasticsearch B.V. + +This product includes software developed at +Elasticsearch, B.V. (https://www.elastic.co/). -------------------------------------------------------------------- Dependency: github.com/elastic/go-licenser -Version: 0.2.0 -Revision: 2b2abd4ee9b58025ebd0630d7621cfd7619f58ac +Version: v0.2.1 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-licenser/LICENSE: -------------------------------------------------------------------- @@ -1634,8 +1617,7 @@ Elasticsearch, B.V. (https://www.elastic.co/). -------------------------------------------------------------------- Dependency: github.com/elastic/go-lookslike -Version: =v0.3.0 -Revision: 747dc7db1c961662d8e225a42af6c3859a1a0f1d +Version: v0.3.0 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-lookslike/LICENSE: -------------------------------------------------------------------- @@ -1644,7 +1626,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/elastic/go-lumber -Revision: 616041e345fc33c97bc0eb0fa6b388aa07bca3e1 +Version: v0.1.0 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-lumber/LICENSE: -------------------------------------------------------------------- @@ -1653,7 +1635,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/elastic/go-perf -Revision: 9c656876f595360525261b7db5bbbcd3c40b7dbb +Revision: 9c656876f595 License type (autodetected): BSD-3-Clause ./vendor/github.com/elastic/go-perf/LICENSE: -------------------------------------------------------------------- @@ -1688,17 +1670,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/elastic/go-seccomp-bpf Version: v1.1.0 -Revision: 4e6640ac0ec1b7cd22a7ec12f4ca610efbe3c4d9 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-seccomp-bpf/LICENSE.txt: -------------------------------------------------------------------- Apache License 2.0 +-------NOTICE.txt----- +Elastic go-seccomp-bpf +Copyright 2018 Elasticsearch B.V. + +This product includes software developed at +Elasticsearch, B.V. (https://www.elastic.co/). -------------------------------------------------------------------- Dependency: github.com/elastic/go-structform Version: v0.0.6 -Revision: a50e916a1b628ad1abc6f58b47668a2f60075ef1 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-structform/LICENSE: -------------------------------------------------------------------- @@ -1708,7 +1694,6 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/elastic/go-sysinfo Version: v1.3.0 -Revision: b719bc42e40963c707571af208683a049e61f07f License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-sysinfo/LICENSE.txt: -------------------------------------------------------------------- @@ -1724,7 +1709,6 @@ Elasticsearch, B.V. (https://www.elastic.co/). -------------------------------------------------------------------- Dependency: github.com/elastic/go-txfile Version: v0.0.7 -Revision: 4acb7500cf41aea9d6362378aee5ebacac831ea4 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-txfile/LICENSE: -------------------------------------------------------------------- @@ -1734,7 +1718,6 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/elastic/go-ucfg Version: v0.8.3 -Revision: f3ae3b220df32cfcae011ec6bbf87a711e6bf06b License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-ucfg/LICENSE: -------------------------------------------------------------------- @@ -1744,17 +1727,21 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/elastic/go-windows Version: v1.0.1 -Revision: 8c929792e70203792e3baf128c380e28754ae8b5 License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/go-windows/LICENSE.txt: -------------------------------------------------------------------- Apache License 2.0 +-------NOTICE.txt----- +Elastic go-windows +Copyright 2017-2019 Elasticsearch B.V. + +This product includes software developed at +Elasticsearch, B.V. (https://www.elastic.co/). -------------------------------------------------------------------- Dependency: github.com/elastic/gosigar Version: v0.10.5 -Revision: 7aef3366157f2bfdf3e068f73ce7193573e88e0c License type (autodetected): Apache-2.0 ./vendor/github.com/elastic/gosigar/LICENSE: -------------------------------------------------------------------- @@ -1773,7 +1760,6 @@ subcomponent's license, as noted in the LICENSE file. -------------------------------------------------------------------- Dependency: github.com/fatih/color Version: v1.5.0 -Revision: 570b54cabe6b8eb0bc2dfce68d964677d63b5260 License type (autodetected): MIT ./vendor/github.com/fatih/color/LICENSE.md: -------------------------------------------------------------------- @@ -1800,7 +1786,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/fsnotify/fsevents -Revision: e1d381a4d27063baac2e9d3c5887ceb4ab059287 +Overwrite: github.com/elastic/fsevents +Overwrite-Revision: e1d381a4d270 License type (autodetected): BSD-3-Clause ./vendor/github.com/fsnotify/fsevents/LICENSE: -------------------------------------------------------------------- @@ -1834,7 +1821,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/fsnotify/fsnotify -Revision: c9bbe1f46f1da9904baf3916a4ba4aec7f1e9000 +Version: v1.4.7 +Overwrite: github.com/adriansr/fsnotify +Overwrite-Revision: c9bbe1f46f1d License type (autodetected): BSD-3-Clause ./vendor/github.com/fsnotify/fsnotify/LICENSE: -------------------------------------------------------------------- @@ -1869,81 +1858,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/garyburd/redigo -Revision: b8dc90050f24c1a73a52f107f3f575be67b21b7c +Version: v1.0.1 +Revision: b8dc90050f24 License type (autodetected): Apache-2.0 ./vendor/github.com/garyburd/redigo/LICENSE: -------------------------------------------------------------------- Apache License 2.0 --------------------------------------------------------------------- -Dependency: github.com/ghodss/yaml -Revision: 0ca9ea5df5451ffdf184b4428c902747c2c11cd7 -License type (autodetected): MIT -./vendor/github.com/ghodss/yaml/LICENSE: --------------------------------------------------------------------- -The MIT License (MIT) - -Copyright (c) 2014 Sam Ghods - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- -Dependency: github.com/go-ini/ini -License type (autodetected): Apache-2.0 -./vendor/github.com/go-ini/ini/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/go-ole/go-ole -Revision: 14974a1cf6477f616180232977d8ab4791ea8820 +Version: v1.2.5 +Revision: 14974a1cf647 License type (autodetected): MIT ./vendor/github.com/go-ole/go-ole/LICENSE: -------------------------------------------------------------------- @@ -1971,7 +1897,7 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/go-sourcemap/sourcemap -Revision: b019cc30c1eaa584753491b0d8f8c1534bf1eb44 +Version: v2.1.2 License type (autodetected): BSD-2-Clause ./vendor/github.com/go-sourcemap/sourcemap/LICENSE: -------------------------------------------------------------------- @@ -2004,7 +1930,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/go-sql-driver/mysql Version: v1.4.1 -Revision: 72cd26f257d44c1114970e19afddcd812016007e License type (autodetected): MPL-2.0 ./vendor/github.com/go-sql-driver/mysql/LICENSE: -------------------------------------------------------------------- @@ -2384,7 +2309,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice -------------------------------------------------------------------- Dependency: github.com/gocarina/gocsv -Revision: ffef3ffc77bec026fefa6f76bd53d158cfa0e669 +Revision: ffef3ffc77be License type (autodetected): MIT ./vendor/github.com/gocarina/gocsv/LICENSE: -------------------------------------------------------------------- @@ -2410,10 +2335,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/godbus/dbus -Revision: 37bf87eef99d69c4f1d3528bd66e3a87dc201472 +Dependency: github.com/godbus/dbus/v5 +Version: v5.0.3 License type (autodetected): BSD-2-Clause -./vendor/github.com/godbus/dbus/LICENSE: +./vendor/github.com/godbus/dbus/v5/LICENSE: -------------------------------------------------------------------- Copyright (c) 2013, Georg Reinke (), Google All rights reserved. @@ -2444,7 +2369,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/godror/godror Version: v0.10.4 -Revision: 0123d49bd73e1bed106ac8b6af67f943fbbf06e2 License type (autodetected): Apache-2.0 ./vendor/github.com/godror/godror/LICENSE.md: -------------------------------------------------------------------- @@ -2676,7 +2600,8 @@ END OF TERMS AND CONDITIONS -------------------------------------------------------------------- Dependency: github.com/gofrs/flock -Revision: 5135e617513b1e6e205a3a89b042249dee6730c8 +Version: v0.7.2 +Revision: 5135e617513b License type (autodetected): BSD-3-Clause ./vendor/github.com/gofrs/flock/LICENSE: -------------------------------------------------------------------- @@ -2710,8 +2635,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/gofrs/uuid -Version: 3.1.1 -Revision: 47cd1dca1a6e7f807d5a492bd7e7f41d0855b5a1 +Version: v3.2.0 License type (autodetected): MIT ./vendor/github.com/gofrs/uuid/LICENSE: -------------------------------------------------------------------- @@ -2739,7 +2663,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/gogo/protobuf Version: v1.3.1 -Revision: 5628607bb4c51c3157aacc3a50f0ab707582b805 License type (autodetected): BSD-3-Clause ./vendor/github.com/gogo/protobuf/LICENSE: -------------------------------------------------------------------- @@ -2780,17 +2703,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/golang/glog -Revision: 23def4e6c14b4da8ac2ed8007337bc5eb5007998 +Dependency: github.com/golang/groupcache +Revision: 215e87163ea7 License type (autodetected): Apache-2.0 -./vendor/github.com/golang/glog/LICENSE: +./vendor/github.com/golang/groupcache/LICENSE: -------------------------------------------------------------------- Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/golang/protobuf -Revision: 6c65a5562fc06764971b7c5d05c76c75e84bdbf7 +Version: v1.3.2 License type (autodetected): BSD-3-Clause ./vendor/github.com/golang/protobuf/LICENSE: -------------------------------------------------------------------- @@ -2825,7 +2748,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/golang/snappy -Revision: 553a641470496b2327abcac10b36396bd98e45c9 +Version: v0.0.1 License type (autodetected): BSD-3-Clause ./vendor/github.com/golang/snappy/LICENSE: -------------------------------------------------------------------- @@ -2857,18 +2780,10 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: github.com/google/certificate-transparency-go -Revision: 2c006aff63ed2c60653701dfb7b53424339382b1 -License type (autodetected): Apache-2.0 -./vendor/github.com/google/certificate-transparency-go/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/google/flatbuffers -Revision: 7a6b2bf521e95097a92ec848001531b2dcf0f3fa +Version: v1.7.2 +Revision: 7a6b2bf521e9 License type (autodetected): Apache-2.0 ./vendor/github.com/google/flatbuffers/LICENSE.txt: -------------------------------------------------------------------- @@ -2877,7 +2792,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/google/go-cmp -Revision: 1b316004397f1f336546ca058ddb5b95c41a8772 +Version: v0.4.0 License type (autodetected): BSD-3-Clause ./vendor/github.com/google/go-cmp/LICENSE: -------------------------------------------------------------------- @@ -2909,9 +2824,111 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------- +Dependency: github.com/google/go-github/v28 +Version: v28.1.1 +License type (autodetected): BSD-3-Clause +./vendor/github.com/google/go-github/v28/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2013 The go-github AUTHORS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- +Dependency: github.com/google/go-github/v29 +Version: v29.0.2 +License type (autodetected): BSD-3-Clause +./vendor/github.com/google/go-github/v29/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2013 The go-github AUTHORS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- +Dependency: github.com/google/go-querystring +Version: v1.0.0 +License type (autodetected): BSD-3-Clause +./vendor/github.com/google/go-querystring/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2013 Google. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -------------------------------------------------------------------- Dependency: github.com/google/gofuzz -Revision: f140a6486e521aad38f5917de355cbf147cc0496 +Version: v1.0.0 License type (autodetected): Apache-2.0 ./vendor/github.com/google/gofuzz/LICENSE: -------------------------------------------------------------------- @@ -2920,7 +2937,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/google/gopacket -Revision: 0ad7f2610e344e58c1c95e2adda5c3258da8e97b +Version: v1.1.18 +Revision: 0ad7f2610e34 License type (autodetected): BSD-3-Clause ./vendor/github.com/google/gopacket/LICENSE: -------------------------------------------------------------------- @@ -2955,7 +2973,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/google/uuid -Revision: c2e93f3ae59f2904160ceaab466009f965df46d6 +Version: v1.1.2 +Revision: c2e93f3ae59f License type (autodetected): BSD-3-Clause ./vendor/github.com/google/uuid/LICENSE: -------------------------------------------------------------------- @@ -2988,11 +3007,10 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/googleapis/gax-go +Dependency: github.com/googleapis/gax-go/v2 Version: v2.0.5 -Revision: bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2 License type (autodetected): BSD-3-Clause -./vendor/github.com/googleapis/gax-go/LICENSE: +./vendor/github.com/googleapis/gax-go/v2/LICENSE: -------------------------------------------------------------------- Copyright 2016, Google Inc. All rights reserved. @@ -3024,7 +3042,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/googleapis/gnostic -Revision: 25d8b0b6698593f520d9d8dc5a88e6b16ca9ecc0 +Version: v0.3.1 +Revision: 25d8b0b66985 License type (autodetected): Apache-2.0 ./vendor/github.com/googleapis/gnostic/LICENSE: -------------------------------------------------------------------- @@ -3033,7 +3052,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/gorhill/cronexpr -Revision: d520615e531a6bf3fb69406b9eba718261285ec8 +Revision: d520615e531a License type (autodetected): Apache-2.0 ./vendor/github.com/gorhill/cronexpr/APLv2: -------------------------------------------------------------------- @@ -3042,7 +3061,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/gorilla/websocket -Revision: c3e18be99d19e6b3e8f1559eea2c161a665c4b6b +Version: v1.4.1 License type (autodetected): BSD-2-Clause ./vendor/github.com/gorilla/websocket/LICENSE: -------------------------------------------------------------------- @@ -3070,53 +3089,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/grpc-ecosystem/go-grpc-prometheus -Revision: ae0d8660c5f2108ca70a3776dbe0fb53cf79f1da -License type (autodetected): Apache-2.0 -./vendor/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/grpc-ecosystem/grpc-gateway -Revision: d63917fcb0d53f39184485b9b6a0893af18a5668 -License type (autodetected): BSD-3-Clause -./vendor/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt: --------------------------------------------------------------------- -Copyright (c) 2015, Gengo, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Gengo, Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- -Dependency: github.com/hashicorp/go-immutable-radix -Revision: 0146a9aba1948ded4ed290cfd3fded2c15313f63 +Dependency: github.com/hashicorp/go-uuid +Version: v1.0.1 License type (autodetected): MPL-2.0 -./vendor/github.com/hashicorp/go-immutable-radix/LICENSE: +./vendor/github.com/hashicorp/go-uuid/LICENSE: -------------------------------------------------------------------- Mozilla Public License, version 2.0 @@ -3483,98 +3459,98 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice -------------------------------------------------------------------- -Dependency: github.com/hashicorp/go-memdb -Revision: 5500ca0de0dab231b02aedabac095d43a59f31d2 +Dependency: github.com/hashicorp/go-version +Version: v1.0.0 License type (autodetected): MPL-2.0 -./vendor/github.com/hashicorp/go-memdb/LICENSE: +./vendor/github.com/hashicorp/go-version/LICENSE: -------------------------------------------------------------------- Mozilla Public License, version 2.0 1. Definitions -1.1. "Contributor" +1.1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. -1.2. "Contributor Version" +1.2. “Contributor Version” means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. + Contributor and that particular Contributor’s Contribution. -1.3. "Contribution" +1.3. “Contribution” means Covered Software of a particular Contributor. -1.4. "Covered Software" +1.4. “Covered Software” means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. -1.5. "Incompatible With Secondary Licenses" +1.5. “Incompatible With Secondary Licenses” means a. that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. -1.6. "Executable Form" +1.6. “Executable Form” means any form of the work other than Source Code Form. -1.7. "Larger Work" +1.7. “Larger Work” - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. -1.8. "License" +1.8. “License” means this document. -1.9. "Licensable" +1.9. “Licensable” - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. -1.10. "Modifications" +1.10. “Modifications” means any of the following: - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or b. any new file in Source Code Form that contains any Covered Software. -1.11. "Patent Claims" of a Contributor +1.11. “Patent Claims” of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. -1.12. "Secondary License" +1.12. “Secondary License” means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. -1.13. "Source Code Form" +1.13. “Source Code Form” means the form of the work preferred for making modifications. -1.14. "You" (or "Your") +1.14. “You” (or “Your”) means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is + License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause + definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. @@ -3590,59 +3566,57 @@ Mozilla Public License, version 2.0 a. under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. 2.2. Effective Date - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. 2.3. Limitations on Grant Scope - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: a. for any code that a Contributor has removed from Covered Software; or - b. for infringements caused by: (i) Your and any other third party's + b. for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). 2.5. Representation - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. 2.6. Fair Use - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions @@ -3655,12 +3629,11 @@ Mozilla Public License, version 2.0 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. 3.2. Distribution of Executable Form @@ -3672,40 +3645,39 @@ Mozilla Public License, version 2.0 reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). 3.4. Notices - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any @@ -3714,14 +3686,14 @@ Mozilla Public License, version 2.0 4. Inability to Comply Due to Statute or Regulation If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. 5. Termination @@ -3729,22 +3701,21 @@ Mozilla Public License, version 2.0 fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been @@ -3753,16 +3724,16 @@ Mozilla Public License, version 2.0 6. Disclaimer of Warranty - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. 7. Limitation of Liability @@ -3774,29 +3745,27 @@ Mozilla Public License, version 2.0 goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. 8. Litigation - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. 9. Miscellaneous - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. 10. Versions of the License @@ -3810,24 +3779,23 @@ Mozilla Public License, version 2.0 10.2. Effect of New Versions - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice @@ -3838,114 +3806,113 @@ Exhibit A - Source Code Form License Notice obtain one at http://mozilla.org/MPL/2.0/. -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. -Exhibit B - "Incompatible With Secondary Licenses" Notice +Exhibit B - “Incompatible With Secondary Licenses” Notice - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0. -------------------------------------------------------------------- -Dependency: github.com/hashicorp/go-multierror -Version: v1.0.0 -Revision: 886a7fbe3eb1c874d46f623bfa70af45f425b3d1 +Dependency: github.com/hashicorp/golang-lru +Version: v0.5.2 +Revision: 59383c442f7d License type (autodetected): MPL-2.0 -./vendor/github.com/hashicorp/go-multierror/LICENSE: +./vendor/github.com/hashicorp/golang-lru/LICENSE: -------------------------------------------------------------------- Mozilla Public License, version 2.0 1. Definitions -1.1. “Contributor” +1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. -1.2. “Contributor Version” +1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. + Contributor and that particular Contributor's Contribution. -1.3. “Contribution” +1.3. "Contribution" means Covered Software of a particular Contributor. -1.4. “Covered Software” +1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. -1.5. “Incompatible With Secondary Licenses” +1.5. "Incompatible With Secondary Licenses" means a. that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. -1.6. “Executable Form” +1.6. "Executable Form" means any form of the work other than Source Code Form. -1.7. “Larger Work” +1.7. "Larger Work" - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. -1.8. “License” +1.8. "License" means this document. -1.9. “Licensable” +1.9. "Licensable" - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. -1.10. “Modifications” +1.10. "Modifications" means any of the following: - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or b. any new file in Source Code Form that contains any Covered Software. -1.11. “Patent Claims” of a Contributor +1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. -1.12. “Secondary License” +1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. -1.13. “Source Code Form” +1.13. "Source Code Form" means the form of the work preferred for making modifications. -1.14. “You” (or “Your”) +1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is + License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause + definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. @@ -3961,57 +3928,59 @@ Mozilla Public License, version 2.0 a. under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. 2.2. Effective Date - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. 2.3. Limitations on Grant Scope - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: a. for any code that a Contributor has removed from Covered Software; or - b. for infringements caused by: (i) Your and any other third party’s + b. for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). 2.5. Representation - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. 2.6. Fair Use - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. 2.7. Conditions @@ -4024,11 +3993,12 @@ Mozilla Public License, version 2.0 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. 3.2. Distribution of Executable Form @@ -4040,39 +4010,40 @@ Mozilla Public License, version 2.0 reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). 3.4. Notices - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any @@ -4081,14 +4052,14 @@ Mozilla Public License, version 2.0 4. Inability to Comply Due to Statute or Regulation If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. 5. Termination @@ -4096,22 +4067,23 @@ Mozilla Public License, version 2.0 fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. 5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to @@ -4119,16 +4091,16 @@ Mozilla Public License, version 2.0 6. Disclaimer of Warranty - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. 7. Limitation of Liability @@ -4140,27 +4112,29 @@ Mozilla Public License, version 2.0 goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. 8. Litigation - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. 9. Miscellaneous - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. 10. Versions of the License @@ -4174,23 +4148,24 @@ Mozilla Public License, version 2.0 10.2. Effect of New Versions - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. Exhibit A - Source Code Form License Notice @@ -4201,765 +4176,363 @@ Exhibit A - Source Code Form License Notice obtain one at http://mozilla.org/MPL/2.0/. -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. You may add additional accurate notices of copyright ownership. -Exhibit B - “Incompatible With Secondary Licenses” Notice +Exhibit B - "Incompatible With Secondary Licenses" Notice - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. -------------------------------------------------------------------- -Dependency: github.com/hashicorp/go-uuid -Revision: 4f571afc59f3043a65f8fe6bf46d887b10a01d43 -License type (autodetected): MPL-2.0 -./vendor/github.com/hashicorp/go-uuid/LICENSE: +Dependency: github.com/haya14busa/go-actions-toolkit +Revision: ca0307860f01 +License type (autodetected): MIT +./vendor/github.com/haya14busa/go-actions-toolkit/LICENSE: -------------------------------------------------------------------- -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" +MIT License - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. +Copyright (c) 2020 haya14busa -1.3. "Contribution" +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - means Covered Software of a particular Contributor. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -1.4. "Covered Software" +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. +--- -1.5. "Incompatible With Secondary Licenses" - means +https://github.com/actions/toolkit - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or +Copyright 2019 GitHub - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -1.6. "Executable Form" +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - means any form of the work other than Source Code Form. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -1.7. "Larger Work" +-------------------------------------------------------------------- +Dependency: github.com/imdario/mergo +Version: v0.3.6 +License type (autodetected): BSD-3-Clause +./vendor/github.com/imdario/mergo/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: -1.8. "License" + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. - means this document. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -1.9. "Licensable" +-------------------------------------------------------------------- +Dependency: github.com/inconshreveable/mousetrap +Version: v1.0.0 +License type (autodetected): Apache-2.0 +./vendor/github.com/inconshreveable/mousetrap/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. -1.10. "Modifications" +-------------------------------------------------------------------- +Dependency: github.com/insomniacslk/dhcp +Revision: 633285ba52b2 +Overwrite: github.com/elastic/dhcp +Overwrite-Revision: 57ec251c7eb3 +License type (autodetected): BSD-3-Clause +./vendor/github.com/insomniacslk/dhcp/LICENSE: +-------------------------------------------------------------------- +BSD 3-Clause License - means any of the following: +Copyright (c) 2018, Andrea Barberio +All rights reserved. - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: - b. any new file in Source Code Form that contains any Covered Software. +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -1.11. "Patent Claims" of a Contributor +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -1.12. "Secondary License" +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. +-------------------------------------------------------------------- +Dependency: github.com/jcmturner/gofork +Version: v1.0.0 +License type (autodetected): BSD-3-Clause +./vendor/github.com/jcmturner/gofork/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2009 The Go Authors. All rights reserved. -1.13. "Source Code Form" +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - means the form of the work preferred for making modifications. + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - - --------------------------------------------------------------------- -Dependency: github.com/hashicorp/golang-lru -Revision: 59383c442f7d7b190497e9bb8fc17a48d06cd03f -License type (autodetected): MPL-2.0 -./vendor/github.com/hashicorp/golang-lru/LICENSE: --------------------------------------------------------------------- -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. +-------------------------------------------------------------------- +Dependency: github.com/jmespath/go-jmespath +Revision: c2b33e8439af +License type (autodetected): Apache-2.0 +./vendor/github.com/jmespath/go-jmespath/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 -4. Inability to Comply Due to Statute or Regulation - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. +-------------------------------------------------------------------- +Dependency: github.com/jmoiron/sqlx +Version: v1.2.1 +Revision: d7d95172beb5 +License type (autodetected): MIT +./vendor/github.com/jmoiron/sqlx/LICENSE: +-------------------------------------------------------------------- + Copyright (c) 2013, Jason Moiron -5. Termination + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. -6. Disclaimer of Warranty +-------------------------------------------------------------------- +Dependency: github.com/joeshaw/multierror +Revision: 69b34d4ec901 +License type (autodetected): MIT +./vendor/github.com/joeshaw/multierror/LICENSE: +-------------------------------------------------------------------- +The MIT License (MIT) - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. +Copyright (c) 2014 Joe Shaw -7. Limitation of Liability +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -8. Litigation +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. +-------------------------------------------------------------------- +Dependency: github.com/josephspurrier/goversioninfo +Revision: 63e6d1acd3dd +License type (autodetected): MIT +./vendor/github.com/josephspurrier/goversioninfo/LICENSE: +-------------------------------------------------------------------- +The MIT License (MIT) -9. Miscellaneous +Copyright (c) 2016 Joseph Spurrier - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -10. Versions of the License +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -10.1. New Versions +-------------------------------------------------------------------- +Dependency: github.com/jpillora/backoff +Version: v1.0.0 +License type (autodetected): MIT +./vendor/github.com/jpillora/backoff/LICENSE: +-------------------------------------------------------------------- +The MIT License (MIT) - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. +Copyright (c) 2017 Jaime Pillora -10.2. Effect of New Versions +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -10.3. Modified Versions +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). +-------------------------------------------------------------------- +Dependency: github.com/json-iterator/go +Version: v1.1.7 +License type (autodetected): MIT +./vendor/github.com/json-iterator/go/LICENSE: +-------------------------------------------------------------------- +MIT License -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. +Copyright (c) 2016 json-iterator -Exhibit A - Source Code Form License Notice +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -You may add additional accurate notices of copyright ownership. +-------------------------------------------------------------------- +Dependency: github.com/jstemmer/go-junit-report +Version: v0.9.1 +License type (autodetected): MIT +./vendor/github.com/jstemmer/go-junit-report/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2012 Joel Stemmer -Exhibit B - "Incompatible With Secondary Licenses" Notice +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/imdario/mergo -Revision: 9f23e2d6bd2a77f959b2bf6acdbefd708a83a4a4 +Dependency: github.com/klauspost/compress +Version: v1.9.3 +Revision: c099ac9f21dd License type (autodetected): BSD-3-Clause -./vendor/github.com/imdario/mergo/LICENSE: +./vendor/github.com/klauspost/compress/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2013 Dario Castañé. All rights reserved. Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2019 Klaus Post. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -4988,66 +4561,11 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/inconshreveable/mousetrap -Revision: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 -License type (autodetected): Apache-2.0 -./vendor/github.com/inconshreveable/mousetrap/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/insomniacslk/dhcp -Revision: 633285ba52b2a67b98a3026eb87ee1a76ab60f3c -License type (autodetected): BSD-3-Clause -./vendor/github.com/insomniacslk/dhcp/LICENSE: --------------------------------------------------------------------- -BSD 3-Clause License - -Copyright (c) 2018, Andrea Barberio -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------- -Dependency: github.com/ishidawataru/sctp -Revision: 7c296d48a2b553e41cc06904a1e6317a20694dc0 -License type (autodetected): Apache-2.0 -./vendor/github.com/ishidawataru/sctp/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/jcmturner/gofork -Revision: dc7c13fece037a4a36e2b3c69db4991498d30692 +Dependency: github.com/klauspost/compress/snappy License type (autodetected): BSD-3-Clause -./vendor/github.com/jcmturner/gofork/LICENSE: +./vendor/github.com/klauspost/compress/snappy/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -5076,54 +4594,96 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/jmespath/go-jmespath -Version: 0.2.2 -Revision: 3433f3ea46d9f8019119e7dd41274e112a2359a9 +Dependency: github.com/klauspost/compress/zstd/internal/xxhash +License type (autodetected): MIT +./vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt: +-------------------------------------------------------------------- +Copyright (c) 2016 Caleb Spare + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: github.com/konsorten/go-windows-terminal-sequences +Version: v1.0.2 +License type (autodetected): MIT +./vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE: +-------------------------------------------------------------------- +(The MIT License) + +Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: github.com/lib/pq +Version: v1.1.2 +Revision: 2ff3cb3adc01 +License type (autodetected): MIT +./vendor/github.com/lib/pq/LICENSE.md: +-------------------------------------------------------------------- +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: github.com/magefile/mage +Version: v1.9.0 License type (autodetected): Apache-2.0 -./vendor/github.com/jmespath/go-jmespath/LICENSE: +./vendor/github.com/magefile/mage/LICENSE: -------------------------------------------------------------------- Apache License 2.0 -------------------------------------------------------------------- -Dependency: github.com/jmoiron/sqlx -Revision: d7d95172beb5a538ff08c50a6e98aee6e7c41f40 +Dependency: github.com/mailru/easyjson +Version: v0.7.1 License type (autodetected): MIT -./vendor/github.com/jmoiron/sqlx/LICENSE: +./vendor/github.com/mailru/easyjson/LICENSE: -------------------------------------------------------------------- - Copyright (c) 2013, Jason Moiron - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: +Copyright (c) 2016 Mail.Ru Group - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/joeshaw/multierror -Revision: 69b34d4ec901851247ae7e77d33909caf9df99ed +Dependency: github.com/Masterminds/semver +Version: v1.4.2 License type (autodetected): MIT -./vendor/github.com/joeshaw/multierror/LICENSE: +./vendor/github.com/Masterminds/semver/LICENSE.txt: -------------------------------------------------------------------- -The MIT License (MIT) - -Copyright (c) 2014 Joe Shaw +The Masterminds +Copyright (C) 2014-2015, Matt Butcher and Matt Farina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5144,14 +4704,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/josephspurrier/goversioninfo -Revision: 63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786 +Dependency: github.com/mattn/go-colorable +Version: v0.0.8 License type (autodetected): MIT -./vendor/github.com/josephspurrier/goversioninfo/LICENSE: +./vendor/github.com/mattn/go-colorable/LICENSE: -------------------------------------------------------------------- The MIT License (MIT) -Copyright (c) 2016 Joseph Spurrier +Copyright (c) 2016 Yasuhiro Matsumoto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5172,14 +4732,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/jpillora/backoff -Revision: d80867952dff4e2fbfb4280ded4ff94d67790457 +Dependency: github.com/mattn/go-ieproxy +Revision: 7c0f6868bffe License type (autodetected): MIT -./vendor/github.com/jpillora/backoff/LICENSE: +./vendor/github.com/mattn/go-ieproxy/LICENSE: -------------------------------------------------------------------- -The MIT License (MIT) +MIT License -Copyright (c) 2017 Jaime Pillora +Copyright (c) 2014 mattn +Copyright (c) 2017 oliverpool +Copyright (c) 2019 Adele Reed Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5200,14 +4762,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/json-iterator/go -Revision: 27518f6661eba504be5a7a9a9f6d9460d892ade3 +Dependency: github.com/mattn/go-isatty +Version: v0.0.2 License type (autodetected): MIT -./vendor/github.com/json-iterator/go/LICENSE: +./vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------- -MIT License +Copyright (c) Yasuhiro MATSUMOTO -Copyright (c) 2016 json-iterator +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: github.com/mattn/go-shellwords +Version: v1.0.7 +License type (autodetected): MIT +./vendor/github.com/mattn/go-shellwords/LICENSE: +-------------------------------------------------------------------- +The MIT License (MIT) + +Copyright (c) 2017 Yasuhiro Matsumoto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5228,74 +4806,85 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/jstemmer/go-junit-report -Revision: 385fac0ced9acaae6dc5b39144194008ded00697 +Dependency: github.com/matttproud/golang_protobuf_extensions +Version: v1.0.2 +Revision: c182affec369 +License type (autodetected): Apache-2.0 +./vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE: +-------------------------------------------------------------------- +Apache License 2.0 + +-------NOTICE----- +Copyright 2012 Matt T. Proud (matt.proud@gmail.com) + +-------------------------------------------------------------------- +Dependency: github.com/Microsoft/go-winio +Version: v0.4.15 +Revision: fc70bd9a86b5 License type (autodetected): MIT -./vendor/github.com/jstemmer/go-junit-report/LICENSE: +./vendor/github.com/Microsoft/go-winio/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2012 Joel Stemmer +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Copyright (c) 2015 Microsoft -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/klauspost/compress -Revision: 14c9a76e3c95e47f8ccce949bba2c1101a8b85e6 -License type (autodetected): BSD-3-Clause -./vendor/github.com/klauspost/compress/LICENSE: +Dependency: github.com/Microsoft/hcsshim +Version: v0.8.7 +License type (autodetected): MIT +./vendor/github.com/Microsoft/hcsshim/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2019 Klaus Post. All rights reserved. +The MIT License (MIT) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +Copyright (c) 2015 Microsoft - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/klauspost/compress/snappy -Revision: c099ac9f21ddbdc8fda7992ce71fae347bf1df88 +Dependency: github.com/miekg/dns +Version: v1.1.15 License type (autodetected): BSD-3-Clause -./vendor/github.com/klauspost/compress/snappy/LICENSE: +./vendor/github.com/miekg/dns/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -5323,371 +4912,425 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -------------------------------------------------------------------- -Dependency: github.com/klauspost/compress/zstd/internal/xxhash -Revision: c099ac9f21ddbdc8fda7992ce71fae347bf1df88 +Dependency: github.com/mitchellh/go-homedir +Version: v1.1.0 License type (autodetected): MIT -./vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt: +./vendor/github.com/mitchellh/go-homedir/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2016 Caleb Spare +The MIT License (MIT) -MIT License +Copyright (c) 2013 Mitchell Hashimoto -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: github.com/mitchellh/gox +Version: v1.0.1 +License type (autodetected): MPL-2.0 +./vendor/github.com/mitchellh/gox/LICENSE: +-------------------------------------------------------------------- +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + (b) any new file in Source Code Form that contains any Covered + Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. --------------------------------------------------------------------- -Dependency: github.com/klauspost/cpuid -Revision: 09cded8978dc9e80714c4d85b0322337b0a1e5e0 -License type (autodetected): MIT -./vendor/github.com/klauspost/cpuid/LICENSE: --------------------------------------------------------------------- -The MIT License (MIT) +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. -Copyright (c) 2015 Klaus Post +1.13. "Source Code Form" + means the form of the work preferred for making modifications. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +2. License Grants and Conditions +-------------------------------- -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +2.1. Grants +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: --------------------------------------------------------------------- -Dependency: github.com/klauspost/crc32 -Revision: 1bab8b35b6bb565f92cbc97939610af9369f942a -License type (autodetected): BSD-3-Clause -./vendor/github.com/klauspost/crc32/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2015 Klaus Post +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +2.2. Effective Date -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. --------------------------------------------------------------------- -Dependency: github.com/konsorten/go-windows-terminal-sequences -Revision: f55edac94c9bbba5d6182a4be46d86a2c9b5b50e -License type (autodetected): MIT -./vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE: --------------------------------------------------------------------- -(The MIT License) +2.3. Limitations on Grant Scope -Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de) +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +(a) for any code that a Contributor has removed from Covered Software; + or -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. --------------------------------------------------------------------- -Dependency: github.com/lib/pq -Revision: 2ff3cb3adc01768e0a552b3a02575a6df38a9bea -License type (autodetected): MIT -./vendor/github.com/lib/pq/LICENSE.md: --------------------------------------------------------------------- -Copyright (c) 2011-2013, 'pq' Contributors -Portions Copyright (C) 2011 Blake Mizerany +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +2.4. Subsequent Licenses -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +2.5. Representation --------------------------------------------------------------------- -Dependency: github.com/magefile/mage -Version: v1.9.0 -Revision: 1c36bf78a98209d91af71354deb001cca75e11fc -License type (autodetected): Apache-2.0 -./vendor/github.com/magefile/mage/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. +2.6. Fair Use --------------------------------------------------------------------- -Dependency: github.com/mailru/easyjson -Revision: 8edcc4e51f39ddbd3505a3386aff3f435a7fd028 -License type (autodetected): MIT -./vendor/github.com/mailru/easyjson/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2016 Mail.Ru Group +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +2.7. Conditions -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +3. Responsibilities +------------------- --------------------------------------------------------------------- -Dependency: github.com/Masterminds/semver -Revision: 910aa146bd66780c2815d652b92a7fc5331e533c -License type (autodetected): MIT -./vendor/github.com/Masterminds/semver/LICENSE.txt: --------------------------------------------------------------------- -Copyright (C) 2014-2019, Matt Butcher and Matt Farina +3.1. Distribution of Source Form -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +3.2. Distribution of Executable Form -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +If You distribute Covered Software in Executable Form then: --------------------------------------------------------------------- -Dependency: github.com/mattn/go-colorable -Revision: 941b50ebc6efddf4c41c8e4537a5f68a4e686b24 -License type (autodetected): MIT -./vendor/github.com/mattn/go-colorable/LICENSE: --------------------------------------------------------------------- -The MIT License (MIT) +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and -Copyright (c) 2016 Yasuhiro Matsumoto +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +3.3. Distribution of a Larger Work -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +3.4. Notices --------------------------------------------------------------------- -Dependency: github.com/mattn/go-ieproxy -Revision: 7c0f6868bffe087073376feaab3ace57f2ef90b2 -License type (autodetected): MIT -./vendor/github.com/mattn/go-ieproxy/LICENSE: --------------------------------------------------------------------- -MIT License +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. -Copyright (c) 2014 mattn -Copyright (c) 2017 oliverpool -Copyright (c) 2019 Adele Reed +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +5. Termination +-------------- -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. --------------------------------------------------------------------- -Dependency: github.com/mattn/go-isatty -Revision: fc9e8d8ef48496124e79ae0df75490096eccf6fe -License type (autodetected): MIT -./vendor/github.com/mattn/go-isatty/LICENSE: --------------------------------------------------------------------- -Copyright (c) Yasuhiro MATSUMOTO +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. -MIT License (Expat) +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +8. Litigation +------------- --------------------------------------------------------------------- -Dependency: github.com/matttproud/golang_protobuf_extensions -Revision: c182affec369e30f25d3eb8cd8a478dee585ae7d -License type (autodetected): Apache-2.0 -./vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. --------NOTICE----- -Copyright 2012 Matt T. Proud (matt.proud@gmail.com) +9. Miscellaneous +---------------- --------------------------------------------------------------------- -Dependency: github.com/Microsoft/go-winio -Version: v0.4.14 -Revision: 6c72808b55902eae4c5943626030429ff20f3b63 -License type (autodetected): MIT -./vendor/github.com/Microsoft/go-winio/LICENSE: --------------------------------------------------------------------- -The MIT License (MIT) +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. -Copyright (c) 2015 Microsoft +10. Versions of the License +--------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +10.1. New Versions -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +10.2. Effect of New Versions +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. --------------------------------------------------------------------- -Dependency: github.com/Microsoft/hcsshim -Revision: 84b0c364e1e3bb91e43b85bf20d72e7948666817 -License type (autodetected): MIT -./vendor/github.com/Microsoft/hcsshim/LICENSE: --------------------------------------------------------------------- -The MIT License (MIT) +10.3. Modified Versions -Copyright (c) 2015 Microsoft +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. --------------------------------------------------------------------- -Dependency: github.com/miekg/dns -Version: v1.1.15 -Revision: b13675009d59c97f3721247d9efa8914e1866a5b -License type (autodetected): BSD-3-Clause -./vendor/github.com/miekg/dns/LICENSE: --------------------------------------------------------------------- -Extensions of the original work are copyright (c) 2011 Miek Gieben +Exhibit A - Source Code Form License Notice +------------------------------------------- -As this is fork of the official Go code the same license applies: + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. -Copyright (c) 2009 The Go Authors. All rights reserved. +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +You may add additional accurate notices of copyright ownership. - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. -------------------------------------------------------------------- -Dependency: github.com/mitchellh/go-homedir -Revision: af06845cf3004701891bf4fdb884bfe4920b3727 +Dependency: github.com/mitchellh/hashstructure +Revision: ab25296c0f51 License type (autodetected): MIT -./vendor/github.com/mitchellh/go-homedir/LICENSE: +./vendor/github.com/mitchellh/hashstructure/LICENSE: -------------------------------------------------------------------- The MIT License (MIT) -Copyright (c) 2013 Mitchell Hashimoto +Copyright (c) 2016 Mitchell Hashimoto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5708,14 +5351,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: github.com/mitchellh/hashstructure -Revision: ab25296c0f51f1022f01cd99dfb45f1775de8799 +Dependency: github.com/mitchellh/iochan +Version: v1.0.0 License type (autodetected): MIT -./vendor/github.com/mitchellh/hashstructure/LICENSE: +./vendor/github.com/mitchellh/iochan/LICENSE.md: -------------------------------------------------------------------- The MIT License (MIT) -Copyright (c) 2016 Mitchell Hashimoto +Copyright (c) 2015 Mitchell Hashimoto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5738,7 +5381,6 @@ THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/mitchellh/mapstructure Version: v1.1.2 -Revision: 3536a929edddb9a5b34bd6861dc4a9647cb459fe License type (autodetected): MIT ./vendor/github.com/mitchellh/mapstructure/LICENSE: -------------------------------------------------------------------- @@ -5766,7 +5408,7 @@ THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/modern-go/concurrent -Revision: bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94 +Revision: bacd9c7ef1dd License type (autodetected): Apache-2.0 ./vendor/github.com/modern-go/concurrent/LICENSE: -------------------------------------------------------------------- @@ -5775,7 +5417,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/modern-go/reflect2 -Revision: 94122c33edd36123c84d5368cfb2b69df93a0ec8 +Version: v1.0.1 License type (autodetected): Apache-2.0 ./vendor/github.com/modern-go/reflect2/LICENSE: -------------------------------------------------------------------- @@ -5784,7 +5426,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/morikuni/aec -Revision: 39771216ff4c63d11f5e604076f9c45e8be1067b +Version: v1.0.0 License type (autodetected): MIT ./vendor/github.com/morikuni/aec/LICENSE: -------------------------------------------------------------------- @@ -5810,19 +5452,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------- -Dependency: github.com/oklog/ulid -Version: v2.0.2 -Revision: be3bccf06dda9a40aa6800c4736ac77f2fef987f -License type (autodetected): Apache-2.0 -./vendor/github.com/oklog/ulid/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/opencontainers/go-digest -Revision: ac19fd6e7483ff933754af248d80be865e543d22 +Version: v1.0.0 +Revision: ac19fd6e7483 License type (autodetected): Apache-2.0 ./vendor/github.com/opencontainers/go-digest/LICENSE: -------------------------------------------------------------------- @@ -5831,7 +5464,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/opencontainers/image-spec -Revision: 775207bd45b6cb8153ce218cc59351799217451f +Version: v1.0.2 +Revision: 775207bd45b6 License type (autodetected): Apache-2.0 ./vendor/github.com/opencontainers/image-spec/LICENSE: -------------------------------------------------------------------- @@ -5841,7 +5475,6 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/opencontainers/runc Version: v1.0.0-rc9 -Revision: d736ef14f0288d6993a1845745d6756cfc9ddd5a License type (autodetected): Apache-2.0 ./vendor/github.com/opencontainers/runc/LICENSE: -------------------------------------------------------------------- @@ -5868,7 +5501,7 @@ See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. -------------------------------------------------------------------- Dependency: github.com/pierrec/lz4 -Revision: 90290f74b1b4d9c097f0a3b3c7eba2ef3875c699 +Version: v2.2.6 License type (autodetected): BSD-3-Clause ./vendor/github.com/pierrec/lz4/LICENSE: -------------------------------------------------------------------- @@ -5901,44 +5534,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: github.com/pierrec/xxHash -Revision: 5a004441f897722c627870a981d02b29924215fa -License type (autodetected): BSD-3-Clause -./vendor/github.com/pierrec/xxHash/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2014, Pierre Curto -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of xxHash nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -------------------------------------------------------------------- Dependency: github.com/pierrre/gotestcover -Revision: 7b94f124d338b6ae06df22bc2ee7909af27aae85 +Revision: 7b94f124d338 License type (autodetected): MIT ./vendor/github.com/pierrre/gotestcover/LICENSE: -------------------------------------------------------------------- @@ -5951,7 +5549,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/pkg/errors -Revision: ff09b135c25aae272398c51a07235b90a75aa4f0 +Version: v0.9.1 License type (autodetected): BSD-2-Clause ./vendor/github.com/pkg/errors/LICENSE: -------------------------------------------------------------------- @@ -5982,7 +5580,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/pmezard/go-difflib Version: v1.0.0 -Revision: 792786c7400a136282c1664665ae0a8db921c6c2 License type (autodetected): BSD-2-Clause ./vendor/github.com/pmezard/go-difflib/LICENSE: -------------------------------------------------------------------- @@ -6016,7 +5613,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/prometheus/client_golang -Revision: 20428fa0bffcb4ee7a7941545ae0df9acdc9d8a7 +Version: v1.1.1 +Revision: 20428fa0bffc License type (autodetected): Apache-2.0 ./vendor/github.com/prometheus/client_golang/LICENSE: -------------------------------------------------------------------- @@ -6049,6 +5647,7 @@ Licensed under the Apache License, Version 2.0 -------------------------------------------------------------------- Dependency: github.com/prometheus/client_model +Revision: 14fe0d1b01d4 License type (autodetected): Apache-2.0 ./vendor/github.com/prometheus/client_model/LICENSE: -------------------------------------------------------------------- @@ -6063,7 +5662,7 @@ SoundCloud Ltd. (http://soundcloud.com/). -------------------------------------------------------------------- Dependency: github.com/prometheus/common -Revision: 637d7c34db122e2d1a25d061423098663758d2d3 +Version: v0.7.0 License type (autodetected): Apache-2.0 ./vendor/github.com/prometheus/common/LICENSE: -------------------------------------------------------------------- @@ -6078,7 +5677,8 @@ SoundCloud Ltd. (http://soundcloud.com/). -------------------------------------------------------------------- Dependency: github.com/prometheus/procfs -Revision: 42f6e295b56f795825f88add3c95f83aedb744a4 +Version: v0.0.9 +Revision: 42f6e295b56f License type (autodetected): Apache-2.0 ./vendor/github.com/prometheus/procfs/LICENSE: -------------------------------------------------------------------- @@ -6095,7 +5695,7 @@ SoundCloud Ltd. (http://soundcloud.com/). -------------------------------------------------------------------- Dependency: github.com/rcrowley/go-metrics -Revision: 3113b8401b8a98917cde58f8bbd42a1b1c03b1fd +Revision: 3113b8401b8a License type (autodetected): BSD-2-Clause ./vendor/github.com/rcrowley/go-metrics/LICENSE: -------------------------------------------------------------------- @@ -6130,40 +5730,64 @@ are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Richard Crowley. -------------------------------------------------------------------- -Dependency: github.com/samuel/go-parser -Revision: ca8abbf65d0e61dedf061f98bd3850f250e27539 -License type (autodetected): BSD-3-Clause -./vendor/github.com/samuel/go-parser/LICENSE: +Dependency: github.com/reviewdog/errorformat +Revision: 8983be9bc7dd +License type (autodetected): MIT +./vendor/github.com/reviewdog/errorformat/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2013, Samuel Stauffer -All rights reserved. +MIT License -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +Copyright (c) 2016 haya14busa -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of the author nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +-------------------------------------------------------------------- +Dependency: github.com/reviewdog/reviewdog +Version: v0.9.17 +License type (autodetected): MIT +./vendor/github.com/reviewdog/reviewdog/LICENSE: +-------------------------------------------------------------------- +MIT License + +Copyright (c) 2016 haya14busa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/samuel/go-thrift -Revision: 2187045faa54fce7f5028706ffeb2f2fc342aa7e +Revision: 2187045faa54 License type (autodetected): BSD-3-Clause ./vendor/github.com/samuel/go-thrift/LICENSE: -------------------------------------------------------------------- @@ -6195,8 +5819,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/sanathkr/go-yaml -Version: v2 -Revision: ed9d249f429b3f5a69f80a7abef6bfce81fef894 +Revision: ed9d249f429b License type (autodetected): Apache-2.0 ./vendor/github.com/sanathkr/go-yaml/LICENSE: -------------------------------------------------------------------- @@ -6205,8 +5828,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/sanathkr/go-yaml -Version: v2 -Revision: ed9d249f429b3f5a69f80a7abef6bfce81fef894 +Revision: ed9d249f429b License type (autodetected): MIT ./vendor/github.com/sanathkr/go-yaml/LICENSE.libyaml: -------------------------------------------------------------------- @@ -6244,7 +5866,8 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/sanathkr/yaml -Revision: 0056894fa522748ca336761ffeeeb6bbae654d07 +Version: v1.0.1 +Revision: 0056894fa522 License type (autodetected): MIT ./vendor/github.com/sanathkr/yaml/LICENSE: -------------------------------------------------------------------- @@ -6302,7 +5925,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/shirou/gopsutil Version: v2.19.11 -Revision: fc7e5e7af6052e36e83e5539148015ed2c09d8f9 License type (autodetected): BSD-3-Clause ./vendor/github.com/shirou/gopsutil/LICENSE: -------------------------------------------------------------------- @@ -6367,40 +5989,10 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: github.com/shirou/w32 -Revision: bb4de0191aa41b5507caa14b0650cdbddcd9280b -License type (autodetected): BSD-2-Clause -./vendor/github.com/shirou/w32/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2010-2012 The w32 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- Dependency: github.com/Shopify/sarama -Version: v1.24.1-elastic -Revision: 355d120d09706d85bc6d2a84287be7fbd13ef453 +Overwrite: github.com/elastic/sarama +Overwrite-Revision: 355d120d0970 License type (autodetected): MIT ./vendor/github.com/Shopify/sarama/LICENSE: -------------------------------------------------------------------- @@ -6427,7 +6019,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/sirupsen/logrus -Revision: a6c0064cfaf982707445a1c90368f956421ebcf0 +Version: v1.4.2 License type (autodetected): MIT ./vendor/github.com/sirupsen/logrus/LICENSE: -------------------------------------------------------------------- @@ -6455,7 +6047,7 @@ THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/spf13/cobra -Revision: 1be1d2841c773c01bee8289f55f7463b6e2c2539 +Version: v0.0.3 License type (autodetected): Apache-2.0 ./vendor/github.com/spf13/cobra/LICENSE.txt: -------------------------------------------------------------------- @@ -6464,7 +6056,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/spf13/pflag -Revision: e57e3eeb33f795204c1ca35f56c44f83227c6e66 +Version: v1.0.3 License type (autodetected): BSD-3-Clause ./vendor/github.com/spf13/pflag/LICENSE: -------------------------------------------------------------------- @@ -6499,7 +6091,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/StackExchange/wmi -Revision: 9f32b5905fd6ce7384093f9d048437e79f7b4d85 +Revision: 9f32b5905fd6 License type (autodetected): MIT ./vendor/github.com/StackExchange/wmi/LICENSE: -------------------------------------------------------------------- @@ -6526,7 +6118,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/stretchr/objx -Revision: b8b73a35e9830ae509858c10dec5866b4d5c8bff +Version: v0.1.2 +Revision: b8b73a35e983 License type (autodetected): MIT ./vendor/github.com/stretchr/objx/LICENSE: -------------------------------------------------------------------- @@ -6555,37 +6148,35 @@ SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/stretchr/testify -Version: v1.2.2 -Revision: f35b8ab0b5a2cef36673838d662e249dd9c94686 +Version: v1.4.0 License type (autodetected): MIT ./vendor/github.com/stretchr/testify/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell +MIT License -Please consider promoting this project if you find it useful. +Copyright (c) 2012-2018 Mat Ryer and Tyler Bunnell -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/tsg/go-daemon -Revision: c6e0d1a849861166320520e9bae9bbda5f2ecb03 +Revision: e704b93fd89b License type (autodetected): BSD-2-Clause ./vendor/github.com/tsg/go-daemon/LICENSE: -------------------------------------------------------------------- @@ -6619,7 +6210,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/tsg/gopacket -Revision: 7c5392a5f2b5c5fa393c71e1f9064e22b5408995 +Revision: dd3d0e41124a License type (autodetected): BSD-3-Clause ./vendor/github.com/tsg/gopacket/LICENSE: -------------------------------------------------------------------- @@ -6652,36 +6243,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: github.com/urso/diag -Revision: 21b3cc8eb79749b97f4be4fa033ed8e82c007c80 -License type (autodetected): Apache-2.0 -./vendor/github.com/urso/diag/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/urso/diag-ecs -Revision: ab085841dcb9be7f8befd9135806e1a6585dff8a -License type (autodetected): Apache-2.0 -./vendor/github.com/urso/diag-ecs/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/urso/ecslog -Revision: b79160ce24a22a95b1146a13c8f135b1a621bfd6 -License type (autodetected): Apache-2.0 -./vendor/github.com/urso/ecslog/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/urso/go-bin -Revision: 781c575c9f0eb3cb9dca94521bd7ad7d5aec7fd4 +Revision: 781c575c9f0e License type (autodetected): Apache-2.0 ./vendor/github.com/urso/go-bin/LICENSE: -------------------------------------------------------------------- @@ -6690,34 +6254,16 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/urso/magetools -Revision: 61080ed7b22b35d276d023e17437c85d8a5ade51 +Revision: 61080ed7b22b License type (autodetected): Apache-2.0 ./vendor/github.com/urso/magetools/LICENSE: -------------------------------------------------------------------- Apache License 2.0 --------------------------------------------------------------------- -Dependency: github.com/urso/qcgen -Revision: 0b059e7db4f40a062ca3d975b7500c6a0a968d87 -License type (autodetected): Apache-2.0 -./vendor/github.com/urso/qcgen/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - --------------------------------------------------------------------- -Dependency: github.com/urso/sderr -Revision: c2a16f3d43ec497b86419314127a5da5e655277d -License type (autodetected): Apache-2.0 -./vendor/github.com/urso/sderr/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: github.com/vmware/govmomi -Revision: 2cad15190b417804d82edb4981e7b3e62907c4ee +Revision: 2cad15190b41 License type (autodetected): Apache-2.0 ./vendor/github.com/vmware/govmomi/LICENSE.txt: -------------------------------------------------------------------- @@ -6726,7 +6272,6 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/vmware/govmomi/vim25/xml -Revision: 2cad15190b417804d82edb4981e7b3e62907c4ee License type (autodetected): BSD-3-Clause ./vendor/github.com/vmware/govmomi/vim25/xml/LICENSE: -------------------------------------------------------------------- @@ -6759,35 +6304,17 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: github.com/weppos/publicsuffix-go -Revision: 120738c23213637160ef8bdcfae4b10bf42bfffc -License type (autodetected): MIT -./vendor/github.com/weppos/publicsuffix-go/LICENSE.txt: +Dependency: github.com/xanzy/go-gitlab +Version: v0.22.3 +License type (autodetected): Apache-2.0 +./vendor/github.com/xanzy/go-gitlab/LICENSE: -------------------------------------------------------------------- -The MIT License (MIT) - -Copyright (c) 2016-2018 Simone Carletti - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Apache License 2.0 -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -------------------------------------------------------------------- Dependency: github.com/xdg/scram -Revision: 7eeb5667e42c09cb51bf7b7c28aea8c56767da90 +Revision: 7eeb5667e42c License type (autodetected): Apache-2.0 ./vendor/github.com/xdg/scram/LICENSE: -------------------------------------------------------------------- @@ -6796,7 +6323,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/xdg/stringprep -Revision: 73f8eece6fdcd902c185bf651de50f3828bed5ed +Version: v1.0.0 License type (autodetected): Apache-2.0 ./vendor/github.com/xdg/stringprep/LICENSE: -------------------------------------------------------------------- @@ -6805,7 +6332,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: github.com/yuin/gopher-lua -Revision: b402f3114ec730d8bddb074a6c137309f561aa78 +Revision: b402f3114ec7 License type (autodetected): MIT ./vendor/github.com/yuin/gopher-lua/LICENSE: -------------------------------------------------------------------- @@ -6831,19 +6358,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------- -Dependency: github.com/zmap/zlint -Revision: 5dcecad773158b82b5e52064ee2782d1b8a79314 -License type (autodetected): Apache-2.0 -./vendor/github.com/zmap/zlint/LICENSE: --------------------------------------------------------------------- -Apache License 2.0 - - -------------------------------------------------------------------- Dependency: go.opencensus.io -Version: v0.22.0 -Revision: 9c377598961b706d1542bd2d84d538b5094d596e +Version: v0.22.2 License type (autodetected): Apache-2.0 ./vendor/go.opencensus.io/LICENSE: -------------------------------------------------------------------- @@ -6852,7 +6369,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: go.uber.org/atomic -Revision: 8474b86a5a6f79c443ce4b2992817ff32cf208b8 +Version: v1.3.1 License type (autodetected): MIT ./vendor/go.uber.org/atomic/LICENSE.txt: -------------------------------------------------------------------- @@ -6878,7 +6395,8 @@ THE SOFTWARE. -------------------------------------------------------------------- Dependency: go.uber.org/multierr -Revision: fb7d312c2c04c34f0ad621048bbb953b168f9ff6 +Version: v1.1.1 +Revision: fb7d312c2c04 License type (autodetected): MIT ./vendor/go.uber.org/multierr/LICENSE.txt: -------------------------------------------------------------------- @@ -6903,40 +6421,106 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------- -Dependency: go.uber.org/zap -Version: v1.7.1 -Revision: 35aad584952c3e7020db7b839f6b102de6271f89 -License type (autodetected): MIT -./vendor/go.uber.org/zap/LICENSE.txt: +Dependency: go.uber.org/zap +Version: v1.7.1 +License type (autodetected): MIT +./vendor/go.uber.org/zap/LICENSE.txt: +-------------------------------------------------------------------- +Copyright (c) 2016-2017 Uber Technologies, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: golang.org/x/crypto +Revision: c9f3fb736b72 +License type (autodetected): BSD-3-Clause +./vendor/golang.org/x/crypto/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- +Dependency: golang.org/x/exp +Revision: da58074b4299 +License type (autodetected): BSD-3-Clause +./vendor/golang.org/x/exp/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2016-2017 Uber Technologies, Inc. +Copyright (c) 2009 The Go Authors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- -Dependency: golang.org/x/crypto -Version: release-branch.go1.13 -Revision: 60c769a6c58655dab1b9adac0d58967dd517cfba +Dependency: golang.org/x/lint +Revision: fdd1cda4f05f License type (autodetected): BSD-3-Clause -./vendor/golang.org/x/crypto/LICENSE: +./vendor/golang.org/x/lint/LICENSE: -------------------------------------------------------------------- -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright (c) 2013 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -6966,8 +6550,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/net -Version: release-branch.go1.13 -Revision: 13f9640d40b9cc418fb53703dfbd177679788ceb +Revision: 16171245cfb2 License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/net/LICENSE: -------------------------------------------------------------------- @@ -7001,7 +6584,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/oauth2 -Revision: 0f29369cfe4552d0e4bcddc57cc75f4d7e672a33 +Revision: bf48bf16ab8d License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/oauth2/LICENSE: -------------------------------------------------------------------- @@ -7035,7 +6618,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/sync -Revision: 112230192c580c3556b8cee6403af37a4fc5f28c +Revision: cd5d95a43a6e License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/sync/LICENSE: -------------------------------------------------------------------- @@ -7069,8 +6652,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/sys -Version: release-branch.go1.13 -Revision: fde4db37ae7ad8191b03d30d27f258b5291ae4e3 +Revision: c96a22e43c9c License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/sys/LICENSE: -------------------------------------------------------------------- @@ -7104,8 +6686,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/text -Version: release-branch.go1.13 -Revision: 342b2e1fbaa52c93f31447ad2c6abc048c63e475 +Version: v0.3.2 License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------- @@ -7139,8 +6720,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/time -Version: release-branch.go1.13 -Revision: 555d28b269f0569763d25dbe1a237ae74c6bcc82 +Revision: 555d28b269f0 License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/time/LICENSE: -------------------------------------------------------------------- @@ -7174,8 +6754,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/tools -Version: release-branch.go1.13 -Revision: 65e3620a7ae7ac25e8494a60f0e5ef4e4fba03b3 +Revision: 7b8e75db28f4 License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/tools/LICENSE: -------------------------------------------------------------------- @@ -7209,7 +6788,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: golang.org/x/xerrors -Revision: 9bdfabe68543c54f90421aeb9a60ef8061b5b544 +Revision: 9bdfabe68543 License type (autodetected): BSD-3-Clause ./vendor/golang.org/x/xerrors/LICENSE: -------------------------------------------------------------------- @@ -7243,8 +6822,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: google.golang.org/api -Version: v0.7.0 -Revision: 02490b97dff7cfde1995bd77de808fd27053bc87 +Version: v0.15.0 License type (autodetected): BSD-3-Clause ./vendor/google.golang.org/api/LICENSE: -------------------------------------------------------------------- @@ -7276,36 +6854,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- -Dependency: google.golang.org/api/googleapi/internal/uritemplates -Version: v0.7.0 -Revision: 02490b97dff7cfde1995bd77de808fd27053bc87 -License type (autodetected): MIT -./vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE: --------------------------------------------------------------------- -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------- Dependency: google.golang.org/api/internal/third_party/uritemplates -Version: v0.14.0 -Revision: 8a410c21381766a810817fd6200fce8838ecb277 License type (autodetected): BSD-3-Clause ./vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE: -------------------------------------------------------------------- @@ -7339,8 +6889,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: google.golang.org/appengine -Version: v1.6.1 -Revision: b2f4a3cf3c67576a2ee09e1fe62656a5086ce880 +Version: v1.6.5 License type (autodetected): Apache-2.0 ./vendor/google.golang.org/appengine/LICENSE: -------------------------------------------------------------------- @@ -7349,7 +6898,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: google.golang.org/genproto -Revision: 83cc0476cb11ea0da33dacd4c6354ab192de6fe6 +Revision: f3c370f40bfb License type (autodetected): Apache-2.0 ./vendor/google.golang.org/genproto/LICENSE: -------------------------------------------------------------------- @@ -7358,45 +6907,16 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: google.golang.org/grpc -Version: v1.25.1 -Revision: 1a3960e4bd028ac0cec0a2afd27d7d8e67c11514 +Version: v1.27.1 License type (autodetected): Apache-2.0 ./vendor/google.golang.org/grpc/LICENSE: -------------------------------------------------------------------- Apache License 2.0 --------------------------------------------------------------------- -Dependency: gopkg.in/hjson/hjson-go.v3 -Revision: 8f44e1182a33737b57cb6855fe656ece998e9b3c -License type (autodetected): MIT -./vendor/gopkg.in/hjson/hjson-go.v3/LICENSE: --------------------------------------------------------------------- -MIT License - -Copyright (c) 2016, 2017 Christian Zangl - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------- Dependency: gopkg.in/inf.v0 -Revision: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 +Version: v0.9.0 License type (autodetected): BSD-3-Clause ./vendor/gopkg.in/inf.v0/LICENSE: -------------------------------------------------------------------- @@ -7431,7 +6951,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: gopkg.in/jcmturner/aescts.v1 -Revision: f6abebb3171c4c1b1fea279cb7c7325020a26290 +Version: v1.0.1 License type (autodetected): Apache-2.0 ./vendor/gopkg.in/jcmturner/aescts.v1/LICENSE: -------------------------------------------------------------------- @@ -7440,7 +6960,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: gopkg.in/jcmturner/dnsutils.v1 -Revision: 13eeb8d49ffb74d7a75784c35e4d900607a3943c +Version: v1.0.1 License type (autodetected): Apache-2.0 ./vendor/gopkg.in/jcmturner/dnsutils.v1/LICENSE: -------------------------------------------------------------------- @@ -7449,7 +6969,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: gopkg.in/jcmturner/gokrb5.v7 -Revision: 363118e62befa8a14ff01031c025026077fe5d6d +Version: v7.3.0 License type (autodetected): Apache-2.0 ./vendor/gopkg.in/jcmturner/gokrb5.v7/LICENSE: -------------------------------------------------------------------- @@ -7458,7 +6978,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: gopkg.in/jcmturner/rpc.v1 -Revision: 99a8ce2fbf8b8087b6ed12a37c61b10f04070043 +Version: v1.1.0 License type (autodetected): Apache-2.0 ./vendor/gopkg.in/jcmturner/rpc.v1/LICENSE: -------------------------------------------------------------------- @@ -7467,7 +6987,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: gopkg.in/mgo.v2 -Revision: 3f83fa5005286a7fe593b055f0d7771a7dce4655 +Version: v2.0.0 +Revision: 3f83fa500528 License type (autodetected): BSD-2-Clause ./vendor/gopkg.in/mgo.v2/LICENSE: -------------------------------------------------------------------- @@ -7499,7 +7020,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: gopkg.in/mgo.v2/bson -Revision: 3f83fa5005286a7fe593b055f0d7771a7dce4655 License type (autodetected): BSD-2-Clause ./vendor/gopkg.in/mgo.v2/bson/LICENSE: -------------------------------------------------------------------- @@ -7531,7 +7051,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: gopkg.in/mgo.v2/internal/json -Revision: 3f83fa5005286a7fe593b055f0d7771a7dce4655 License type (autodetected): BSD-3-Clause ./vendor/gopkg.in/mgo.v2/internal/json/LICENSE: -------------------------------------------------------------------- @@ -7565,7 +7084,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: gopkg.in/yaml.v2 -Revision: 5420a8b6744d3b0345ab293f6fcba19c978f1183 +Version: v2.2.7 License type (autodetected): Apache-2.0 ./vendor/gopkg.in/yaml.v2/LICENSE: -------------------------------------------------------------------- @@ -7588,7 +7107,7 @@ limitations under the License. -------------------------------------------------------------------- Dependency: gopkg.in/yaml.v2 -Revision: 5420a8b6744d3b0345ab293f6fcba19c978f1183 +Version: v2.2.7 License type (autodetected): MIT ./vendor/gopkg.in/yaml.v2/LICENSE.libyaml: -------------------------------------------------------------------- @@ -7624,9 +7143,337 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-------------------------------------------------------------------- +Dependency: honnef.co/go/tools +Version: v0.0.1-2019.2.3 +License type (autodetected): MIT +./vendor/honnef.co/go/tools/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2016 Dominik Honnef + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------- +Dependency: honnef.co/go/tools +Version: v0.0.1-2019.2.3 +License type (autodetected): BSD-3-Clause +./vendor/honnef.co/go/tools/LICENSE-THIRD-PARTY: +-------------------------------------------------------------------- +Staticcheck and its related tools make use of third party projects, +either by reusing their code, or by statically linking them into +resulting binaries. These projects are: + +* The Go Programming Language - https://golang.org/ + + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +* github.com/BurntSushi/toml - https://github.com/BurntSushi/toml + + The MIT License (MIT) + + Copyright (c) 2013 TOML authors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + +* github.com/google/renameio - https://github.com/google/renameio + + Copyright 2018 Google Inc. + + 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. + + +* github.com/kisielk/gotool – https://github.com/kisielk/gotool + + Copyright (c) 2013 Kamil Kisiel + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + All the files in this distribution are covered under either the MIT + license (see the file LICENSE) except some files mentioned below. + + match.go, match_test.go: + + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +* github.com/rogpeppe/go-internal - https://github.com/rogpeppe/go-internal + + Copyright (c) 2018 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +* golang.org/x/mod/module - https://github.com/golang/mod + + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +* golang.org/x/tools/go/analysis - https://github.com/golang/tools + + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------- +Dependency: honnef.co/go/tools/lint +License type (autodetected): BSD-3-Clause +./vendor/honnef.co/go/tools/lint/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2013 The Go Authors. All rights reserved. +Copyright (c) 2016 Dominik Honnef. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------- +Dependency: honnef.co/go/tools/ssa +License type (autodetected): BSD-3-Clause +./vendor/honnef.co/go/tools/ssa/LICENSE: +-------------------------------------------------------------------- +Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright (c) 2016 Dominik Honnef. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -------------------------------------------------------------------- Dependency: howett.net/plist -Revision: 233df3c4f07b0c562da0e8a6fb850681ac49bb90 +Revision: 591f970eefbb License type (autodetected): BSD-2-Clause ./vendor/howett.net/plist/LICENSE: -------------------------------------------------------------------- @@ -7691,7 +7538,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: k8s.io/api -Revision: b90922c02518d683852c467209bbab0a76db36e0 +Revision: b90922c02518 License type (autodetected): Apache-2.0 ./vendor/k8s.io/api/LICENSE: -------------------------------------------------------------------- @@ -7700,7 +7547,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: k8s.io/apimachinery -Revision: bfcf53abc9f82bad3e534fcb1c36599d3c989ebf +Revision: bfcf53abc9f8 License type (autodetected): Apache-2.0 ./vendor/k8s.io/apimachinery/LICENSE: -------------------------------------------------------------------- @@ -7709,8 +7556,7 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: k8s.io/client-go -Version: v12.0.0 -Revision: 78d2af792babf2dd937ba2e2a8d99c753a5eda89 +Revision: 78d2af792bab License type (autodetected): Apache-2.0 ./vendor/k8s.io/client-go/LICENSE: -------------------------------------------------------------------- @@ -7719,7 +7565,8 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: k8s.io/klog -Revision: 6a023d6d0e0954feabd46dc2d3a6a2c3c991fe1a +Version: v0.3.4 +Revision: 6a023d6d0e09 License type (autodetected): Apache-2.0 ./vendor/k8s.io/klog/LICENSE: -------------------------------------------------------------------- @@ -7728,44 +7575,17 @@ Apache License 2.0 -------------------------------------------------------------------- Dependency: k8s.io/utils -Revision: 3dccf664f023863740c508fb4284e49742bedfa4 +Revision: 3dccf664f023 License type (autodetected): Apache-2.0 ./vendor/k8s.io/utils/LICENSE: -------------------------------------------------------------------- Apache License 2.0 --------------------------------------------------------------------- -Dependency: pack.ag/amqp -Revision: ddf76e6b06138e7e73606c99f40d6f21a02c0be5 -License type (autodetected): MIT -./vendor/pack.ag/amqp/LICENSE: --------------------------------------------------------------------- -MIT License - -Copyright (C) 2017 Kale Blankenship - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------- Dependency: sigs.k8s.io/yaml -Revision: 4cd0c284b15f1735b8cc247df097d262b8903f9f +Version: v1.1.1 +Revision: 4cd0c284b15f License type (autodetected): MIT ./vendor/sigs.k8s.io/yaml/LICENSE: -------------------------------------------------------------------- diff --git a/auditbeat/cmd/root.go b/auditbeat/cmd/root.go index ae0b8e0d0ea2..a16be519cd58 100644 --- a/auditbeat/cmd/root.go +++ b/auditbeat/cmd/root.go @@ -21,11 +21,11 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/elastic/beats/auditbeat/core" - "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/metricbeat/beater" - "github.com/elastic/beats/metricbeat/mb/module" + "github.com/elastic/beats/v7/auditbeat/core" + "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/metricbeat/beater" + "github.com/elastic/beats/v7/metricbeat/mb/module" ) // Name of the beat (auditbeat). diff --git a/auditbeat/core/eventmod.go b/auditbeat/core/eventmod.go index 3dfe57d82d35..662422f7e9da 100644 --- a/auditbeat/core/eventmod.go +++ b/auditbeat/core/eventmod.go @@ -18,8 +18,8 @@ package core import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // AddDatasetToEvent adds dataset information to the event. In particular this diff --git a/auditbeat/datastore/datastore.go b/auditbeat/datastore/datastore.go index 018897ee7bfd..5d06fd502c14 100644 --- a/auditbeat/datastore/datastore.go +++ b/auditbeat/datastore/datastore.go @@ -24,7 +24,7 @@ import ( bolt "github.com/coreos/bbolt" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/paths" ) var ( diff --git a/auditbeat/helper/hasher/hasher.go b/auditbeat/helper/hasher/hasher.go index a9e3ab19bb91..cc4c928867e8 100644 --- a/auditbeat/helper/hasher/hasher.go +++ b/auditbeat/helper/hasher/hasher.go @@ -30,7 +30,7 @@ import ( "strings" "time" - "github.com/cespare/xxhash" + "github.com/cespare/xxhash/v2" "github.com/dustin/go-humanize" "github.com/joeshaw/multierror" "github.com/pkg/errors" @@ -38,7 +38,7 @@ import ( "golang.org/x/crypto/sha3" "golang.org/x/time/rate" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/file" ) // HashType identifies a cryptographic algorithm. diff --git a/auditbeat/include/fields.go b/auditbeat/include/fields.go index 81c4957de811..a88a625f94dd 100644 --- a/auditbeat/include/fields.go +++ b/auditbeat/include/fields.go @@ -20,7 +20,7 @@ package include import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/auditbeat/include/list.go b/auditbeat/include/list.go index 97177fac811d..737124691b12 100644 --- a/auditbeat/include/list.go +++ b/auditbeat/include/list.go @@ -21,6 +21,6 @@ package include import ( // Import packages that need to register themselves. - _ "github.com/elastic/beats/auditbeat/module/auditd" - _ "github.com/elastic/beats/auditbeat/module/file_integrity" + _ "github.com/elastic/beats/v7/auditbeat/module/auditd" + _ "github.com/elastic/beats/v7/auditbeat/module/file_integrity" ) diff --git a/auditbeat/magefile.go b/auditbeat/magefile.go index 74a65087dbc2..e9d80728ac40 100644 --- a/auditbeat/magefile.go +++ b/auditbeat/magefile.go @@ -26,13 +26,13 @@ import ( "github.com/magefile/mage/mg" - auditbeat "github.com/elastic/beats/auditbeat/scripts/mage" - devtools "github.com/elastic/beats/dev-tools/mage" + auditbeat "github.com/elastic/beats/v7/auditbeat/scripts/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" // mage:import - "github.com/elastic/beats/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/integtest" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/integtest" ) func init() { diff --git a/auditbeat/main.go b/auditbeat/main.go index 3403e3ec0c05..9937e2d42fe1 100644 --- a/auditbeat/main.go +++ b/auditbeat/main.go @@ -20,14 +20,14 @@ package main import ( "os" - "github.com/elastic/beats/auditbeat/cmd" + "github.com/elastic/beats/v7/auditbeat/cmd" // Register modules. - _ "github.com/elastic/beats/auditbeat/module/auditd" - _ "github.com/elastic/beats/auditbeat/module/file_integrity" + _ "github.com/elastic/beats/v7/auditbeat/module/auditd" + _ "github.com/elastic/beats/v7/auditbeat/module/file_integrity" // Register includes. - _ "github.com/elastic/beats/auditbeat/include" + _ "github.com/elastic/beats/v7/auditbeat/include" ) func main() { diff --git a/auditbeat/main_test.go b/auditbeat/main_test.go index 453fe4d27356..d6e81c2aad2c 100644 --- a/auditbeat/main_test.go +++ b/auditbeat/main_test.go @@ -23,8 +23,8 @@ import ( "flag" "testing" - "github.com/elastic/beats/auditbeat/cmd" - "github.com/elastic/beats/libbeat/tests/system/template" + "github.com/elastic/beats/v7/auditbeat/cmd" + "github.com/elastic/beats/v7/libbeat/tests/system/template" ) var systemTest *bool diff --git a/auditbeat/module/auditd/audit_linux.go b/auditbeat/module/auditd/audit_linux.go index 35b7e683f0c2..1cf0236d7f7a 100644 --- a/auditbeat/module/auditd/audit_linux.go +++ b/auditbeat/module/auditd/audit_linux.go @@ -30,11 +30,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" "github.com/elastic/go-libaudit" "github.com/elastic/go-libaudit/aucoalesce" "github.com/elastic/go-libaudit/auparse" diff --git a/auditbeat/module/auditd/audit_linux_test.go b/auditbeat/module/auditd/audit_linux_test.go index 6fc4bf4b0dfb..c8da4f06965b 100644 --- a/auditbeat/module/auditd/audit_linux_test.go +++ b/auditbeat/module/auditd/audit_linux_test.go @@ -34,12 +34,12 @@ import ( "github.com/prometheus/procfs" - "github.com/elastic/beats/auditbeat/core" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/mapping" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/auditbeat/core" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/mapping" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/elastic/go-libaudit" "github.com/elastic/go-libaudit/auparse" ) diff --git a/auditbeat/module/auditd/audit_unsupported.go b/auditbeat/module/auditd/audit_unsupported.go index 23d34b8042e7..94761612928d 100644 --- a/auditbeat/module/auditd/audit_unsupported.go +++ b/auditbeat/module/auditd/audit_unsupported.go @@ -22,8 +22,8 @@ package auditd import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) func init() { diff --git a/auditbeat/module/auditd/config_linux_test.go b/auditbeat/module/auditd/config_linux_test.go index c8a5e85fc6b1..8d677fdfcb73 100644 --- a/auditbeat/module/auditd/config_linux_test.go +++ b/auditbeat/module/auditd/config_linux_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestConfigValidate(t *testing.T) { diff --git a/auditbeat/module/auditd/fields.go b/auditbeat/module/auditd/fields.go index 83de724b83d6..5b23bddb2bbd 100644 --- a/auditbeat/module/auditd/fields.go +++ b/auditbeat/module/auditd/fields.go @@ -20,7 +20,7 @@ package auditd import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/auditbeat/module/auditd/show_linux.go b/auditbeat/module/auditd/show_linux.go index f7ce49fdce0c..bcd332eaa7be 100644 --- a/auditbeat/module/auditd/show_linux.go +++ b/auditbeat/module/auditd/show_linux.go @@ -27,7 +27,7 @@ import ( "github.com/elastic/go-libaudit" "github.com/elastic/go-libaudit/rule" - "github.com/elastic/beats/auditbeat/cmd" + "github.com/elastic/beats/v7/auditbeat/cmd" ) var ( diff --git a/auditbeat/module/file_integrity/config.go b/auditbeat/module/file_integrity/config.go index 6b76deb6ac8e..c280fb52d0ef 100644 --- a/auditbeat/module/file_integrity/config.go +++ b/auditbeat/module/file_integrity/config.go @@ -26,7 +26,7 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/common/match" ) // HashType identifies a cryptographic algorithm. diff --git a/auditbeat/module/file_integrity/config_test.go b/auditbeat/module/file_integrity/config_test.go index 202f186e29d5..c0097fc086e1 100644 --- a/auditbeat/module/file_integrity/config_test.go +++ b/auditbeat/module/file_integrity/config_test.go @@ -26,7 +26,7 @@ import ( "github.com/joeshaw/multierror" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/go-ucfg" ) diff --git a/auditbeat/module/file_integrity/event.go b/auditbeat/module/file_integrity/event.go index 29397ec957fd..61e9b2148193 100644 --- a/auditbeat/module/file_integrity/event.go +++ b/auditbeat/module/file_integrity/event.go @@ -33,14 +33,14 @@ import ( "strconv" "time" - "github.com/cespare/xxhash" + "github.com/cespare/xxhash/v2" "github.com/pkg/errors" "golang.org/x/crypto/blake2b" "golang.org/x/crypto/sha3" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Source identifies the source of an event (i.e. what triggered it). diff --git a/auditbeat/module/file_integrity/event_test.go b/auditbeat/module/file_integrity/event_test.go index 953de9276e89..1d20f1b39655 100644 --- a/auditbeat/module/file_integrity/event_test.go +++ b/auditbeat/module/file_integrity/event_test.go @@ -29,7 +29,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var testEventTime = time.Now().UTC() diff --git a/auditbeat/module/file_integrity/eventreader_fsevents.go b/auditbeat/module/file_integrity/eventreader_fsevents.go index b355e96eaecf..064c46c101f6 100644 --- a/auditbeat/module/file_integrity/eventreader_fsevents.go +++ b/auditbeat/module/file_integrity/eventreader_fsevents.go @@ -28,7 +28,7 @@ import ( "github.com/fsnotify/fsevents" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type fsreader struct { diff --git a/auditbeat/module/file_integrity/eventreader_fsnotify.go b/auditbeat/module/file_integrity/eventreader_fsnotify.go index b228ebc59a32..4c59191dfe71 100644 --- a/auditbeat/module/file_integrity/eventreader_fsnotify.go +++ b/auditbeat/module/file_integrity/eventreader_fsnotify.go @@ -26,8 +26,8 @@ import ( "github.com/fsnotify/fsnotify" "github.com/pkg/errors" - "github.com/elastic/beats/auditbeat/module/file_integrity/monitor" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/auditbeat/module/file_integrity/monitor" + "github.com/elastic/beats/v7/libbeat/logp" ) type reader struct { diff --git a/auditbeat/module/file_integrity/fields.go b/auditbeat/module/file_integrity/fields.go index 84341850eb5a..c7dce9bc9867 100644 --- a/auditbeat/module/file_integrity/fields.go +++ b/auditbeat/module/file_integrity/fields.go @@ -20,7 +20,7 @@ package file_integrity import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/auditbeat/module/file_integrity/fileinfo_windows.go b/auditbeat/module/file_integrity/fileinfo_windows.go index 880620a7b32f..9a61ce19cdb9 100644 --- a/auditbeat/module/file_integrity/fileinfo_windows.go +++ b/auditbeat/module/file_integrity/fileinfo_windows.go @@ -29,7 +29,7 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/file" ) // NewMetadata returns a new Metadata object. If an error is returned it is diff --git a/auditbeat/module/file_integrity/flatbuffers.go b/auditbeat/module/file_integrity/flatbuffers.go index 2d6f823b1c7b..cd85894e6d1a 100644 --- a/auditbeat/module/file_integrity/flatbuffers.go +++ b/auditbeat/module/file_integrity/flatbuffers.go @@ -25,7 +25,7 @@ import ( flatbuffers "github.com/google/flatbuffers/go" "github.com/pkg/errors" - "github.com/elastic/beats/auditbeat/module/file_integrity/schema" + "github.com/elastic/beats/v7/auditbeat/module/file_integrity/schema" ) // Requires the Google flatbuffer compiler. diff --git a/auditbeat/module/file_integrity/metricset.go b/auditbeat/module/file_integrity/metricset.go index 8e6792fd93d2..ad5958a3e8eb 100644 --- a/auditbeat/module/file_integrity/metricset.go +++ b/auditbeat/module/file_integrity/metricset.go @@ -26,10 +26,10 @@ import ( bolt "github.com/coreos/bbolt" "github.com/pkg/errors" - "github.com/elastic/beats/auditbeat/datastore" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/auditbeat/datastore" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/auditbeat/module/file_integrity/metricset_test.go b/auditbeat/module/file_integrity/metricset_test.go index 195de0a515f7..43fa02d15f78 100644 --- a/auditbeat/module/file_integrity/metricset_test.go +++ b/auditbeat/module/file_integrity/metricset_test.go @@ -27,10 +27,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/auditbeat/core" - "github.com/elastic/beats/auditbeat/datastore" - abtest "github.com/elastic/beats/auditbeat/testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/auditbeat/core" + "github.com/elastic/beats/v7/auditbeat/datastore" + abtest "github.com/elastic/beats/v7/auditbeat/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/auditbeat/module/file_integrity/monitor/recursive.go b/auditbeat/module/file_integrity/monitor/recursive.go index b04658cfe8cc..8999ba5f8a0f 100644 --- a/auditbeat/module/file_integrity/monitor/recursive.go +++ b/auditbeat/module/file_integrity/monitor/recursive.go @@ -25,7 +25,7 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type recursiveWatcher struct { diff --git a/auditbeat/module/file_integrity/scanner.go b/auditbeat/module/file_integrity/scanner.go index 0438a6dad4f7..6a960065d1c3 100644 --- a/auditbeat/module/file_integrity/scanner.go +++ b/auditbeat/module/file_integrity/scanner.go @@ -26,7 +26,7 @@ import ( "golang.org/x/time/rate" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // scannerID is used as a global monotonically increasing counter for assigning diff --git a/auditbeat/scripts/mage/config.go b/auditbeat/scripts/mage/config.go index 72a67100dbd7..91f704461232 100644 --- a/auditbeat/scripts/mage/config.go +++ b/auditbeat/scripts/mage/config.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) const ( diff --git a/auditbeat/scripts/mage/docs.go b/auditbeat/scripts/mage/docs.go index 0a2409e4323c..d28d1df62587 100644 --- a/auditbeat/scripts/mage/docs.go +++ b/auditbeat/scripts/mage/docs.go @@ -25,7 +25,7 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // ModuleDocs collects documentation from modules (both OSS and X-Pack). diff --git a/auditbeat/scripts/mage/package.go b/auditbeat/scripts/mage/package.go index 1ff16f64ddce..fbda2077f4f7 100644 --- a/auditbeat/scripts/mage/package.go +++ b/auditbeat/scripts/mage/package.go @@ -20,7 +20,7 @@ package mage import ( "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // PackagingFlavor specifies the type of packaging (OSS vs X-Pack). diff --git a/auditbeat/testing/setup.go b/auditbeat/testing/setup.go index 00939eb0cbcf..1a8a8866b196 100644 --- a/auditbeat/testing/setup.go +++ b/auditbeat/testing/setup.go @@ -22,7 +22,7 @@ import ( "os" "testing" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/paths" ) // SetupDataDir sets up a temporary data directory to use for testing. diff --git a/dev-tools/cmd/asset/asset.go b/dev-tools/cmd/asset/asset.go index 3fa75501f193..1696e0781360 100644 --- a/dev-tools/cmd/asset/asset.go +++ b/dev-tools/cmd/asset/asset.go @@ -26,8 +26,8 @@ import ( "io/ioutil" "os" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/licenses" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/licenses" ) var ( diff --git a/dev-tools/cmd/dashboards/export_dashboards.go b/dev-tools/cmd/dashboards/export_dashboards.go index 7e48f19caaef..eeae6773a969 100644 --- a/dev-tools/cmd/dashboards/export_dashboards.go +++ b/dev-tools/cmd/dashboards/export_dashboards.go @@ -29,8 +29,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/dashboards" - "github.com/elastic/beats/libbeat/kibana" + "github.com/elastic/beats/v7/libbeat/dashboards" + "github.com/elastic/beats/v7/libbeat/kibana" ) var ( diff --git a/dev-tools/cmd/module_fields/module_fields.go b/dev-tools/cmd/module_fields/module_fields.go index 5c967ec9ecfd..203cc2980287 100644 --- a/dev-tools/cmd/module_fields/module_fields.go +++ b/dev-tools/cmd/module_fields/module_fields.go @@ -25,9 +25,9 @@ import ( "os" "path/filepath" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/libbeat/generator/fields" - "github.com/elastic/beats/licenses" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/generator/fields" + "github.com/elastic/beats/v7/licenses" ) var usageText = ` diff --git a/dev-tools/cmd/module_include_list/module_include_list.go b/dev-tools/cmd/module_include_list/module_include_list.go index d3e5d3c2b3e7..d4fb9bd9d256 100644 --- a/dev-tools/cmd/module_include_list/module_include_list.go +++ b/dev-tools/cmd/module_include_list/module_include_list.go @@ -32,8 +32,8 @@ import ( "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/licenses" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/licenses" ) var usageText = ` diff --git a/dev-tools/generate_notice.py b/dev-tools/generate_notice.py index c38f8c4243a9..3b9fb278bb65 100755 --- a/dev-tools/generate_notice.py +++ b/dev-tools/generate_notice.py @@ -20,6 +20,71 @@ def read_file(filename): return f.read() +def read_go_mod(vendor_dir): + lines = [] + with open(os.path.join(vendor_dir, "modules.txt"), encoding="utf_8") as f: + lines = f.readlines() + + deps = [] + for line in lines: + if line.startswith("# "): + line = line[2:] + elems = line.split(" ") + if len(elems) == 2: + data = _get_version_info(elems) + deps.append(data) + continue + + if " => " in line: + data = _get_replaced_dep_data(line) + deps.append(data) + + return deps + + +def _get_version_info(elems): + data = {} + data["path"] = elems[0] + + version_info = elems[1].rstrip("\n") + if version_info.endswith("+incompatible"): + version_info = version_info[:-len("+incompatible")] + + if len(version_info) < 30: + data["version"] = version_info + return data + + revision_elems = version_info.split("-") + if len(revision_elems) != 3: + raise ValueError("unexpected number of elements") + + if revision_elems[0] != "v0.0.0": + data["version"] = revision_elems[0] + data["revision"] = revision_elems[2] + + return data + + +def _get_replaced_dep_data(line): + original, fork = line.split(" => ") + elems = fork.split(" ") + fork_data = _get_version_info(elems) + elems = original.split(" ") + data = _get_version_info(elems) + + if "path" in fork_data: + data["overwrite-path"] = fork_data["path"] + if "version" in fork_data: + data["overwrite-version"] = fork_data["version"] + if "revision" in fork_data: + data["overwrite-revision"] = fork_data["revision"] + + if "revision" in data and data["revision"] == "000000000000": + del(data["revision"]) + + return data + + def get_library_path(license): """ Get the contents up to the vendor folder. @@ -31,51 +96,41 @@ def get_library_path(license): return "/".join(split) -def read_versions(vendor): - libs = [] - with open(os.path.join(vendor, "vendor.json"), encoding='utf_8') as f: - govendor = json.load(f) - for package in govendor["package"]: - libs.append(package) - return libs +def gather_dependencies(vendor_dir, overrides=None): + dependencies = {} # lib_path -> [array of lib] + libs = read_go_mod(vendor_dir) + + # walk looking for LICENSE files + for root, dirs, filenames in os.walk("./vendor"): + licenses = get_licenses(root) + for filename in licenses: + lib_path = get_library_path(root) + lib_search = [l for l in libs if l["path"].startswith(lib_path)] + if len(lib_search) == 0: + print("WARNING: No version information found for: {}".format(lib_path)) + lib = {"path": lib_path} + else: + lib = copy.deepcopy(lib_search[0]) + lib["license_file"] = os.path.join(root, filename) -def gather_dependencies(vendor_dirs, overrides=None): - dependencies = {} # lib_path -> [array of lib] - for vendor in vendor_dirs: - libs = read_versions(vendor) - - # walk looking for LICENSE files - for root, dirs, filenames in os.walk(vendor): - licenses = get_licenses(root) - for filename in licenses: - lib_path = get_library_path(root) - lib_search = [l for l in libs if l["path"].startswith(lib_path)] - if len(lib_search) == 0: - print("WARNING: No version information found for: {}".format(lib_path)) - lib = {"path": lib_path} - else: - lib = copy.deepcopy(lib_search[0]) - - lib["license_file"] = os.path.join(root, filename) - - lib["license_contents"] = read_file(lib["license_file"]) - lib["license_summary"] = detect_license_summary(lib["license_contents"]) - if lib["license_summary"] == "UNKNOWN": - print("WARNING: Unknown license for: {}".format(lib_path)) - - revision = overrides.get(lib_path, {}).get("revision") - if revision: - lib["revision"] = revision - - if lib_path not in dependencies: - dependencies[lib_path] = [lib] - else: - dependencies[lib_path].append(lib) - - # don't walk down into another vendor dir - if "vendor" in dirs: - dirs.remove("vendor") + lib["license_contents"] = read_file(lib["license_file"]) + lib["license_summary"] = detect_license_summary(lib["license_contents"]) + if lib["license_summary"] == "UNKNOWN": + print("WARNING: Unknown license for: {}".format(lib_path)) + + revision = overrides.get(lib_path, {}).get("revision") + if revision: + lib["revision"] = revision + + if lib_path not in dependencies: + dependencies[lib_path] = [lib] + else: + dependencies[lib_path].append(lib) + + # don't walk down into another vendor dir + if "vendor" in dirs: + dirs.remove("vendor") return dependencies @@ -134,7 +189,7 @@ def has_license(folder): return True, "" -def check_all_have_license_files(vendor_dirs): +def check_all_have_license_files(vendor_dir): """ Checks that everything in the vendor folders has a license one way or the other. This doesn't collect the licenses, because the code that @@ -142,15 +197,19 @@ def check_all_have_license_files(vendor_dirs): that every folder in the `vendor` directories has at least one license. """ issues = [] - for vendor in vendor_dirs: - for root, dirs, filenames in os.walk(vendor): - if root.count(os.sep) - vendor.count(os.sep) == 2: # two levels deep - # Two level deep means folders like `github.com/elastic`. - # look for the license in root but also one level up - ok, issue = has_license(root) - if not ok: + for root, dirs, filenames in os.walk(vendor_dir): + depth = 2 + if root.count(os.sep) - vendor_dir.count(os.sep) == depth: # two levels deep + # Two level deep means folders like `github.com/elastic`. + # look for the license in root but also one level up + ok, issue = has_license(root) + if not ok: + depth += 1 + + if depth > 5: print("No license in: {}".format(issue)) issues.append(issue) + if len(issues) > 0: raise Exception("I have found licensing issues in the following folders: {}" .format(issues)) @@ -181,6 +240,12 @@ def write_notice_file(f, beat, copyright, dependencies): f.write("Version: {}\n".format(lib["version"])) if "revision" in lib: f.write("Revision: {}\n".format(lib["revision"])) + if "overwrite-path" in lib: + f.write("Overwrite: {}\n".format(lib["overwrite-path"])) + if "overwrite-version" in lib: + f.write("Overwrite-Version: {}\n".format(lib["overwrite-version"])) + if "overwrite-revision" in lib: + f.write("Overwrite-Revision: {}\n".format(lib["overwrite-revision"])) f.write("License type (autodetected): {}\n".format(lib["license_summary"])) f.write("{}:\n".format(lib["license_file"])) f.write("--------------------------------------------------------------------\n") @@ -215,8 +280,8 @@ def get_url(repo): return "https://github.com/{}/{}".format(words[1], words[2]) -def create_notice(filename, beat, copyright, vendor_dirs, csvfile, overrides=None): - dependencies = gather_dependencies(vendor_dirs, overrides=overrides) +def create_notice(filename, beat, copyright, vendor_dir, csvfile, overrides=None): + dependencies = gather_dependencies(vendor_dir, overrides=overrides) if not csvfile: with open(filename, "w+", encoding='utf_8') as f: write_notice_file(f, beat, copyright, dependencies) @@ -320,6 +385,10 @@ def create_notice(filename, beat, copyright, vendor_dirs, csvfile, overrides=Non "The Universal Permissive License (UPL), Version 1.0" ] +ISC_LICENSE_TITLE = [ + "ISC License", +] + # return SPDX identifiers from https://spdx.org/licenses/ def detect_license_summary(content): @@ -348,6 +417,10 @@ def detect_license_summary(content): return "UPL-1.0" if any(sentence in content[0:1500] for sentence in ECLIPSE_PUBLIC_LICENSE_TITLES): return "EPL-1.0" + if any(sentence in content[0:1500] for sentence in ISC_LICENSE_TITLE): + return "ISC" + if any(sentence in content[0:1500] for sentence in ECLIPSE_PUBLIC_LICENSE_TITLES): + return "EPL-1.0" return "UNKNOWN" @@ -360,6 +433,7 @@ def detect_license_summary(content): "MIT", "MPL-2.0", "UPL-1.0", + "ISC", ] SKIP_NOTICE = [] @@ -386,35 +460,21 @@ def detect_license_summary(content): cwd = os.getcwd() notice = os.path.join(cwd, "NOTICE.txt") - vendor_dirs = [] + vendor_dir = "./vendor" excludes = args.excludes if not isinstance(excludes, list): excludes = [excludes] SKIP_NOTICE = args.skip_notice - for root, dirs, files in os.walk(args.vendor): - - # Skips all hidden paths like ".git" - if '/.' in root: - continue - - if 'vendor' in dirs: - vendor_dirs.append(os.path.join(root, 'vendor')) - dirs.remove('vendor') # don't walk down into sub-vendors - - for exclude in excludes: - if exclude in dirs: - dirs.remove(exclude) - overrides = {} # revision overrides only for now if args.beats_origin: govendor = json.load(args.beats_origin) overrides = {package['path']: package for package in govendor["package"]} - print("Get the licenses available from {}".format(vendor_dirs)) - check_all_have_license_files(vendor_dirs) - dependencies = create_notice(notice, args.beat, args.copyright, vendor_dirs, args.csvfile, overrides=overrides) + print("Get the licenses available from {}".format(vendor_dir)) + check_all_have_license_files(vendor_dir) + dependencies = create_notice(notice, args.beat, args.copyright, vendor_dir, args.csvfile, overrides=overrides) # check that all licenses are accepted for _, deps in dependencies.items(): diff --git a/dev-tools/jenkins_ci.ps1 b/dev-tools/jenkins_ci.ps1 index 870932080555..9d43fef5c9b7 100755 --- a/dev-tools/jenkins_ci.ps1 +++ b/dev-tools/jenkins_ci.ps1 @@ -32,7 +32,7 @@ $env:TEST_COVERAGE = "true" $env:RACE_DETECTOR = "true" # Install mage from vendor. -exec { go install github.com/elastic/beats/vendor/github.com/magefile/mage } "mage install FAILURE" +exec { go install -mod=vendor github.com/magefile/mage } "mage install FAILURE" if (Test-Path "$env:beat\magefile.go") { cd "$env:beat" diff --git a/dev-tools/mage/build.go b/dev-tools/mage/build.go index c478466539b4..33ebba2e8154 100644 --- a/dev-tools/mage/build.go +++ b/dev-tools/mage/build.go @@ -59,26 +59,9 @@ func DefaultBuildArgs() BuildArgs { }, WinMetadata: true, } - if versionQualified { args.Vars["github.com/elastic/beats/libbeat/version.qualifier"] = "{{ .Qualifier }}" } - - repo, err := GetProjectRepoInfo() - if err != nil { - panic(errors.Wrap(err, "failed to determine project repo info")) - } - - if !repo.IsElasticBeats() { - // Assume libbeat is vendored and prefix the variables. - prefix := repo.RootImportPath + "/vendor/" - prefixedVars := map[string]string{} - for k, v := range args.Vars { - prefixedVars[prefix+k] = v - } - args.Vars = prefixedVars - } - return args } @@ -135,6 +118,16 @@ func Build(params BuildArgs) error { } env["CGO_ENABLED"] = cgoEnabled + if UseVendor { + var goFlags string + goFlags, ok := env["GOFLAGS"] + if !ok { + env["GOFLAGS"] = "-mod=vendor" + } else { + env["GOFLAGS"] = strings.Join([]string{goFlags, "-mod=vendor"}, " ") + } + } + // Spec args := []string{ "build", diff --git a/dev-tools/mage/check.go b/dev-tools/mage/check.go index 6c30bd1dafc1..11767ae7d3c9 100644 --- a/dev-tools/mage/check.go +++ b/dev-tools/mage/check.go @@ -35,8 +35,8 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - "github.com/elastic/beats/dev-tools/mage/gotool" - "github.com/elastic/beats/libbeat/processors/dissect" + "github.com/elastic/beats/v7/dev-tools/mage/gotool" + "github.com/elastic/beats/v7/libbeat/processors/dissect" ) // Check looks for created/modified/deleted/renamed files and returns an error diff --git a/dev-tools/mage/crossbuild.go b/dev-tools/mage/crossbuild.go index 17158ad4b4c6..b4ca802be1bf 100644 --- a/dev-tools/mage/crossbuild.go +++ b/dev-tools/mage/crossbuild.go @@ -31,7 +31,7 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/file" ) const defaultCrossBuildTarget = "golangCrossBuild" @@ -215,7 +215,7 @@ func (b GolangCrossBuilder) Build() error { return errors.Wrap(err, "failed to determine repo root and package sub dir") } - mountPoint := filepath.ToSlash(filepath.Join("/go", "src", repoInfo.RootImportPath)) + mountPoint := filepath.ToSlash(filepath.Join("/go", "src", repoInfo.CanonicalRootImportPath)) // use custom dir for build if given, subdir if not: cwd := repoInfo.SubDir if b.InDir != "" { @@ -247,6 +247,10 @@ func (b GolangCrossBuilder) Build() error { if versionQualified { args = append(args, "--env", "VERSION_QUALIFIER="+versionQualifier) } + if UseVendor { + args = append(args, "--env", "GOFLAGS=-mod=vendor") + } + args = append(args, "--rm", "--env", "MAGEFILE_VERBOSE="+verbose, diff --git a/dev-tools/mage/dashboard.go b/dev-tools/mage/dashboard.go index 764a9e286952..562a3bf8f799 100644 --- a/dev-tools/mage/dashboard.go +++ b/dev-tools/mage/dashboard.go @@ -44,7 +44,7 @@ func ExportDashboard() error { return err } - dashboardCmd := sh.RunCmd("go", "run", filepath.Join(beatsDir, "dev-tools/cmd/dashboards/export_dashboards.go")) + dashboardCmd := sh.RunCmd("go", "run", "-mod", "vendor", filepath.Join(beatsDir, "dev-tools/cmd/dashboards/export_dashboards.go")) // TODO: This is currently hardcoded for KB 7, we need to figure out what we do for KB 8 if applicable file := CWD("module", module, "_meta/kibana/7/dashboard", id+".json") diff --git a/dev-tools/mage/fields.go b/dev-tools/mage/fields.go index 009d720840cb..cb2b6ef76856 100644 --- a/dev-tools/mage/fields.go +++ b/dev-tools/mage/fields.go @@ -101,12 +101,17 @@ func generateFieldsYAML(baseDir, output string, moduleDirs ...string) error { return err } - globalFieldsCmd := sh.RunCmd("go", "run", + cmd := []string{"run"} + if UseVendor { + cmd = append(cmd, "-mod", "vendor") + } + cmd = append(cmd, filepath.Join(beatsDir, globalFieldsCmdPath), "-es_beats_path", beatsDir, "-beat_path", baseDir, "-out", CreateDir(output), ) + globalFieldsCmd := sh.RunCmd("go", cmd...) return globalFieldsCmd(moduleDirs...) } @@ -125,7 +130,11 @@ func GenerateFieldsGo(fieldsYML, out string) error { return err } - assetCmd := sh.RunCmd("go", "run", + cmd := []string{"run"} + if UseVendor { + cmd = append(cmd, "-mod", "vendor") + } + cmd = append(cmd, filepath.Join(beatsDir, assetCmdPath), "-pkg", "include", "-in", fieldsYML, @@ -133,6 +142,7 @@ func GenerateFieldsGo(fieldsYML, out string) error { "-license", toLibbeatLicenseName(BeatLicense), BeatName, ) + assetCmd := sh.RunCmd("go", cmd...) return assetCmd() } @@ -152,12 +162,17 @@ func GenerateModuleFieldsGo(moduleDir string) error { moduleDir = CWD(moduleDir) } - moduleFieldsCmd := sh.RunCmd("go", "run", + cmd := []string{"run"} + if UseVendor { + cmd = append(cmd, "-mod", "vendor") + } + cmd = append(cmd, filepath.Join(beatsDir, moduleFieldsCmdPath), "-beat", BeatName, "-license", toLibbeatLicenseName(BeatLicense), moduleDir, ) + moduleFieldsCmd := sh.RunCmd("go", cmd...) return moduleFieldsCmd() } @@ -179,13 +194,19 @@ func GenerateIncludeListGo(options IncludeListOptions) error { return err } - includeListCmd := sh.RunCmd("go", "run", + cmd := []string{"run"} + if UseVendor { + cmd = append(cmd, "-mod", "vendor") + } + cmd = append(cmd, filepath.Join(beatsDir, moduleIncludeListCmdPath), "-license", toLibbeatLicenseName(BeatLicense), "-out", options.Outfile, "-buildTags", options.BuildTags, "-pkg", options.Pkg, ) + includeListCmd := sh.RunCmd("go", cmd...) + var args []string for _, dir := range options.ImportDirs { if !filepath.IsAbs(dir) { diff --git a/dev-tools/mage/fmt.go b/dev-tools/mage/fmt.go index 8851f67676ad..f86ed59a692d 100644 --- a/dev-tools/mage/fmt.go +++ b/dev-tools/mage/fmt.go @@ -27,12 +27,12 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - "github.com/elastic/beats/dev-tools/mage/gotool" + "github.com/elastic/beats/v7/dev-tools/mage/gotool" ) var ( // GoImportsImportPath controls the import path used to install goimports. - GoImportsImportPath = "github.com/elastic/beats/vendor/golang.org/x/tools/cmd/goimports" + GoImportsImportPath = "golang.org/x/tools/cmd/goimports" // GoImportsLocalPrefix is a string prefix matching imports that should be // grouped after third-party packages. @@ -64,8 +64,19 @@ func GoImports() error { } fmt.Println(">> fmt - goimports: Formatting Go code") - if err := sh.Run("go", "get", GoImportsImportPath); err != nil { - return err + if UseVendor { + if err := gotool.Install( + gotool.Install.Vendored(), + gotool.Install.Package(filepath.Join(GoImportsImportPath)), + ); err != nil { + return err + } + } else { + if err := gotool.Get( + gotool.Get.Package(filepath.Join(GoImportsImportPath)), + ); err != nil { + return err + } } args := append( diff --git a/dev-tools/mage/godaemon.go b/dev-tools/mage/godaemon.go index ee6b38a360ef..7511cae8044c 100644 --- a/dev-tools/mage/godaemon.go +++ b/dev-tools/mage/godaemon.go @@ -43,7 +43,7 @@ func BuildGoDaemon() error { // Test if binaries are up-to-date. output := MustExpand("build/golang-crossbuild/god-{{.Platform.GOOS}}-{{.Platform.Arch}}") - input := MustExpand("{{ elastic_beats_dir }}/vendor/github.com/tsg/go-daemon/god.c") + input := MustExpand("{{ elastic_beats_dir }}/vendor/github.com/tsg/go-daemon/src/god.c") if IsUpToDate(output, input) { log.Println(">>> buildGoDaemon is up-to-date for", Platform.Name) return nil diff --git a/dev-tools/mage/gomod.go b/dev-tools/mage/gomod.go new file mode 100644 index 000000000000..17f4e8917f6a --- /dev/null +++ b/dev-tools/mage/gomod.go @@ -0,0 +1,96 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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 mage + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/elastic/beats/v7/dev-tools/mage/gotool" +) + +// copyModule contains a module name and the list of files or directories +// to copy recursively. +type copyModule struct { + name string + filesToCopy []string +} + +var ( + copyAll = []copyModule{ + copyModule{ + name: "github.com/godror/godror", + filesToCopy: []string{ + "odpi", + }, + }, + copyModule{ + name: "github.com/tsg/go-daemon", + filesToCopy: []string{ + "src", + }, + }, + } +) + +// Vendor cleans up go.mod and copies the files not carried over from modules cache. +func Vendor() error { + mod := gotool.Mod + + err := mod.Tidy() + if err != nil { + return err + } + + err = mod.Vendor() + if err != nil { + return err + } + + err = mod.Verify() + if err != nil { + return err + } + + repo, err := GetProjectRepoInfo() + if err != nil { + return err + } + vendorFolder := filepath.Join(repo.RootDir, "vendor") + + // copy packages which require the whole tree + for _, p := range copyAll { + path, err := gotool.ListModulePath(p.name) + if err != nil { + return err + } + fmt.Println(path) + + for _, f := range p.filesToCopy { + from := filepath.Join(path, f) + to := filepath.Join(vendorFolder, p.name, f) + copyTask := &CopyTask{Source: from, Dest: to, DirMode: os.ModeDir | 0750} + err = copyTask.Execute() + if err != nil { + return err + } + } + } + return nil +} diff --git a/dev-tools/mage/gotool/go.go b/dev-tools/mage/gotool/go.go index 64ea94a9ad78..30eaa6ff87d6 100644 --- a/dev-tools/mage/gotool/go.go +++ b/dev-tools/mage/gotool/go.go @@ -18,6 +18,7 @@ package gotool import ( + "fmt" "os" "strings" @@ -37,11 +38,36 @@ type Args struct { // ArgOpt is a functional option adding info to Args once executed. type ArgOpt func(args *Args) +type goInstall func(opts ...ArgOpt) error + +// Install runs `go install` and provides optionals for adding command line arguments. +var Install goInstall = runGoInstall + +func runGoInstall(opts ...ArgOpt) error { + args := buildArgs(opts) + return runVGo("install", args) +} + +func (goInstall) Package(pkg string) ArgOpt { return posArg(pkg) } +func (goInstall) Vendored() ArgOpt { return flagArg("-mod", "vendor") } + type goTest func(opts ...ArgOpt) error // Test runs `go test` and provides optionals for adding command line arguments. var Test goTest = runGoTest +// GetModuleName returns the name of the module. +func GetModuleName() (string, error) { + lines, err := getLines(callGo(nil, "list", "-m")) + if err != nil { + return "", err + } + if len(lines) != 1 { + return "", fmt.Errorf("unexpected number of lines") + } + return lines[0], nil +} + // ListProjectPackages lists all packages in the current project func ListProjectPackages() ([]string, error) { return ListPackages("./...") @@ -67,6 +93,23 @@ func ListTestFiles(pkg string) ([]string, error) { return getLines(callGo(nil, "list", "-f", tmpl, pkg)) } +// ListModulePath returns the path to the module in the cache. +func ListModulePath(pkg string) (string, error) { + const tmpl = `{{.Dir}}` + env := map[string]string{ + // make sure to look in the module cache + "GOFLAGS": "", + } + lines, err := getLines(callGo(env, "list", "-m", "-f", tmpl, pkg)) + if err != nil { + return "", err + } + if n := len(lines); n != 1 { + return "", fmt.Errorf("expected 1 line, got %d", n) + } + return lines[0], nil +} + // HasTests returns true if the given package contains test files. func HasTests(pkg string) (bool, error) { files, err := ListTestFiles(pkg) diff --git a/dev-tools/mage/gotool/modules.go b/dev-tools/mage/gotool/modules.go new file mode 100644 index 000000000000..239425ee3217 --- /dev/null +++ b/dev-tools/mage/gotool/modules.go @@ -0,0 +1,54 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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 gotool + +// Mod is the command go mod. +var Mod = goMod{ + Tidy: modCommand{"tidy"}.run, + Verify: modCommand{"verify"}.run, + Vendor: modCommand{"vendor"}.run, +} + +type modCommand struct { + method string +} + +func (cmd modCommand) run(opts ...ArgOpt) error { + o := make([]ArgOpt, len(opts)+1) + o[0] = posArg(cmd.method) + for i, opt := range opts { + o[i+1] = opt + } + args := buildArgs(o) + return runVGo("mod", args) +} + +type goMod struct { + Tidy modTidy + Verify modVerify + Vendor modVendor +} + +// modTidy cleans the go.mod file +type modTidy func(opts ...ArgOpt) error + +// modVerify check that deps have the expected content. +type modVerify func(opts ...ArgOpt) error + +// modVendor downloads and copies dependencies under the folder vendor. +type modVendor func(opts ...ArgOpt) error diff --git a/dev-tools/mage/install.go b/dev-tools/mage/install.go index 9b2c7795c631..67483d23bb9f 100644 --- a/dev-tools/mage/install.go +++ b/dev-tools/mage/install.go @@ -18,11 +18,7 @@ package mage import ( - "path/filepath" - - "github.com/pkg/errors" - - "github.com/elastic/beats/dev-tools/mage/gotool" + "github.com/elastic/beats/v7/dev-tools/mage/gotool" ) var ( @@ -32,18 +28,19 @@ var ( // InstallVendored uses go get to install a command from its vendored source func InstallVendored(importPath string) error { - beatDir, err := ElasticBeatsDir() - if err != nil { - return errors.Wrap(err, "failed to obtain beats repository path") - } - - get := gotool.Get - return get( - get.Package(filepath.Join(beatDir, "vendor", importPath)), + install := gotool.Install + return install( + install.Vendored(), + install.Package(importPath), ) } // InstallGoLicenser target installs go-licenser func InstallGoLicenser() error { - return InstallVendored(GoLicenserImportPath) + if UseVendor { + return InstallVendored(GoLicenserImportPath) + } + return gotool.Get( + gotool.Get.Package(GoLicenserImportPath), + ) } diff --git a/dev-tools/mage/integtest.go b/dev-tools/mage/integtest.go index 0c8d32e19f4b..41219d58d6cf 100644 --- a/dev-tools/mage/integtest.go +++ b/dev-tools/mage/integtest.go @@ -182,7 +182,7 @@ func runInIntegTestEnv(mageTarget string, test func() error, passThroughEnvVars if err != nil { return err } - magePath := filepath.Join("/go/src", repo.ImportPath, "build/mage-linux-amd64") + magePath := filepath.Join("/go/src", repo.CanonicalRootImportPath, repo.SubDir, "build/mage-linux-amd64") // Build docker-compose args. args := []string{"-p", dockerComposeProjectName(), "run", @@ -194,6 +194,9 @@ func runInIntegTestEnv(mageTarget string, test func() error, passThroughEnvVars "-e", "STACK_ENVIRONMENT=" + StackEnvironment, "-e", "TESTING_ENVIRONMENT=" + StackEnvironment, } + if UseVendor { + args = append(args, "-e", "GOFLAGS=-mod=vendor") + } args, err = addUidGidEnvArgs(args) if err != nil { return err diff --git a/dev-tools/mage/pkg_test.go b/dev-tools/mage/pkg_test.go index f9bd3a708eda..e360686b54a3 100644 --- a/dev-tools/mage/pkg_test.go +++ b/dev-tools/mage/pkg_test.go @@ -88,7 +88,7 @@ func TestRepoRoot(t *testing.T) { t.Error(err) } - assert.Equal(t, "github.com/elastic/beats", repo.RootImportPath) + assert.Equal(t, "github.com/elastic/beats/v7", repo.RootImportPath) assert.True(t, filepath.IsAbs(repo.RootDir)) cwd := filepath.Join(repo.RootDir, repo.SubDir) assert.Equal(t, CWD(), cwd) diff --git a/dev-tools/mage/settings.go b/dev-tools/mage/settings.go index dfe674326071..cc1a42f86ef4 100644 --- a/dev-tools/mage/settings.go +++ b/dev-tools/mage/settings.go @@ -23,7 +23,9 @@ import ( "io/ioutil" "log" "os" + "path" "path/filepath" + "reflect" "regexp" "strconv" "strings" @@ -33,6 +35,8 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" "golang.org/x/tools/go/vcs" + + "github.com/elastic/beats/v7/dev-tools/mage/gotool" ) const ( @@ -56,6 +60,7 @@ var ( XPackDir = "../x-pack" RaceDetector = false TestCoverage = false + UseVendor = true BeatName = EnvOr("BEAT_NAME", filepath.Base(CWD())) BeatServiceName = EnvOr("BEAT_SERVICE_NAME", BeatName) @@ -101,6 +106,10 @@ func init() { if err != nil { panic(errors.Wrap(err, "failed to parse TEST_COVERAGE env value")) } + UseVendor, err = strconv.ParseBool(EnvOr("USE_VENDOR", "true")) + if err != nil { + panic(errors.Wrap(err, "failed to parse USE_VENDOR env value")) + } Snapshot, err = strconv.ParseBool(EnvOr("SNAPSHOT", "false")) if err != nil { @@ -189,16 +198,17 @@ VersionQualifier = {{.Qualifier}} ## Functions -beat_doc_branch = {{ beat_doc_branch }} -beat_version = {{ beat_version }} -commit = {{ commit }} -date = {{ date }} -elastic_beats_dir = {{ elastic_beats_dir }} -go_version = {{ go_version }} -repo.RootImportPath = {{ repo.RootImportPath }} -repo.RootDir = {{ repo.RootDir }} -repo.ImportPath = {{ repo.ImportPath }} -repo.SubDir = {{ repo.SubDir }} +beat_doc_branch = {{ beat_doc_branch }} +beat_version = {{ beat_version }} +commit = {{ commit }} +date = {{ date }} +elastic_beats_dir = {{ elastic_beats_dir }} +go_version = {{ go_version }} +repo.RootImportPath = {{ repo.RootImportPath }} +repo.CanonicalRootImportPath = {{ repo.CanonicalRootImportPath }} +repo.RootDir = {{ repo.RootDir }} +repo.ImportPath = {{ repo.ImportPath }} +repo.SubDir = {{ repo.SubDir }} ` return Expand(dumpTemplate) @@ -259,39 +269,26 @@ func ElasticBeatsDir() (string, error) { return elasticBeatsDirValue, elasticBeatsDirErr } -// findElasticBeatsDir attempts to find the root of the Elastic Beats directory. -// It checks to see if the current project is elastic/beats, and then if not -// checks the vendor directory. +// findElasticBeatsDir returns the root directory of the Elastic Beats module, using "go list". // -// If your project places the Beats files in a different location (specifically -// the dev-tools/ contents) then you can use SetElasticBeatsDir(). +// When running within the Elastic Beats repo, this will return the repo root. Otherwise, +// it will return the root directory of the module from within the module cache or vendor +// directory. func findElasticBeatsDir() (string, error) { - repo, err := GetProjectRepoInfo() - if err != nil { - return "", err - } - - if repo.IsElasticBeats() { - return repo.RootDir, nil - } - - const devToolsImportPath = elasticBeatsImportPath + "/dev-tools/mage" - - // Search in project vendor directories. Order is relevant - searchPaths := []string{ - // beats directory of apm-server - filepath.Join(repo.RootDir, "_beats/dev-tools/vendor"), - filepath.Join(repo.RootDir, repo.SubDir, "vendor", devToolsImportPath), - filepath.Join(repo.RootDir, "vendor", devToolsImportPath), - } - - for _, path := range searchPaths { - if _, err := os.Stat(path); err == nil { - return filepath.Join(path, "../.."), nil + // Find the import path for the package containing this file. + type foo struct{} + typ := reflect.TypeOf(foo{}) + magepkgpath := typ.PkgPath() + + // Walk up the import path until we find the elastic/beats module path. + pkgpath := magepkgpath + for extractCanonicalRootImportPath(pkgpath) != elasticBeatsImportPath { + pkgpath = path.Dir(pkgpath) + if pkgpath == "." { + return "", errors.Errorf("failed to find %q from %q", elasticBeatsImportPath, magepkgpath) } } - - return "", errors.Errorf("failed to find %v in the project's vendor", devToolsImportPath) + return gotool.ListModulePath(pkgpath) } var ( @@ -539,16 +536,17 @@ func parseDocBranch(data []byte) (string, error) { // ProjectRepoInfo contains information about the project's repo. type ProjectRepoInfo struct { - RootImportPath string // Import path at the project root. - RootDir string // Root directory of the project. - ImportPath string // Import path of the current directory. - SubDir string // Relative path from the root dir to the current dir. + RootImportPath string // Import path at the project root. + CanonicalRootImportPath string // Pre-modules root import path (does not contain semantic import version identifier). + RootDir string // Root directory of the project. + ImportPath string // Import path of the current directory. + SubDir string // Relative path from the root dir to the current dir. } // IsElasticBeats returns true if the current project is // github.com/elastic/beats. func (r *ProjectRepoInfo) IsElasticBeats() bool { - return r.RootImportPath == elasticBeatsImportPath + return r.CanonicalRootImportPath == elasticBeatsImportPath } var ( @@ -561,61 +559,177 @@ var ( // import path and the current directory's import path. func GetProjectRepoInfo() (*ProjectRepoInfo, error) { repoInfoOnce.Do(func() { - repoInfoValue, repoInfoErr = getProjectRepoInfo() + if isUnderGOPATH() { + repoInfoValue, repoInfoErr = getProjectRepoInfoUnderGopath() + } else { + repoInfoValue, repoInfoErr = getProjectRepoInfoWithModules() + } }) return repoInfoValue, repoInfoErr } -func getProjectRepoInfo() (*ProjectRepoInfo, error) { +func isUnderGOPATH() bool { + underGOPATH := false + srcDirs, err := listSrcGOPATHs() + if err != nil { + return false + } + for _, srcDir := range srcDirs { + rel, err := filepath.Rel(srcDir, CWD()) + if err != nil { + continue + } + + if !strings.Contains(rel, "..") { + underGOPATH = true + } + } + + return underGOPATH +} + +func getProjectRepoInfoWithModules() (*ProjectRepoInfo, error) { var ( - cwd = CWD() - rootImportPath string - srcDir string + cwd = CWD() + rootDir string + subDir string ) - // Search upward from the CWD to determine the project root based on VCS. + possibleRoot := cwd var errs []string - for _, gopath := range filepath.SplitList(build.Default.GOPATH) { - gopath = filepath.Clean(gopath) + for { + isRoot, err := isGoModRoot(possibleRoot) + if err != nil { + errs = append(errs, err.Error()) + } - if !strings.HasPrefix(cwd, gopath) { - // Fixes an issue on macOS when /var is actually /private/var. - var err error - gopath, err = filepath.EvalSymlinks(gopath) - if err != nil { - errs = append(errs, err.Error()) - continue - } + if isRoot { + rootDir = possibleRoot + break } - srcDir = filepath.Join(gopath, "src") + subDir, err = filepath.Rel(possibleRoot, cwd) + if err != nil { + errs = append(errs, err.Error()) + } + possibleRoot = filepath.Dir(possibleRoot) + } + + if rootDir == "" { + return nil, errors.Errorf("failed to find root dir of module file: %v", errs) + } + + rootImportPath, err := gotool.GetModuleName() + if err != nil { + return nil, err + } + + return &ProjectRepoInfo{ + RootImportPath: rootImportPath, + CanonicalRootImportPath: filepath.ToSlash(extractCanonicalRootImportPath(rootImportPath)), + RootDir: rootDir, + SubDir: subDir, + ImportPath: filepath.ToSlash(filepath.Join(rootImportPath, subDir)), + }, nil +} + +func isGoModRoot(path string) (bool, error) { + gomodPath := filepath.Join(path, "go.mod") + _, err := os.Stat(gomodPath) + if os.IsNotExist(err) { + return false, nil + } + if err != nil { + return false, err + } + + return true, nil +} + +func getProjectRepoInfoUnderGopath() (*ProjectRepoInfo, error) { + var ( + cwd = CWD() + errs []string + rootDir string + ) + + srcDirs, err := listSrcGOPATHs() + if err != nil { + return nil, err + } + + for _, srcDir := range srcDirs { _, root, err := vcs.FromDir(cwd, srcDir) if err != nil { // Try the next gopath. errs = append(errs, err.Error()) continue } - rootImportPath = root + rootDir = filepath.Join(srcDir, root) break } - if rootImportPath == "" { - return nil, errors.Errorf("failed to determine root import path (Did "+ - "you git init?, Is the project in the GOPATH? GOPATH=%v, CWD=%v?): %v", - build.Default.GOPATH, cwd, errs) + + if rootDir == "" { + return nil, errors.Errorf("error while determining root directory: %v", errs) } - rootDir := filepath.Join(srcDir, rootImportPath) subDir, err := filepath.Rel(rootDir, cwd) if err != nil { return nil, errors.Wrap(err, "failed to get relative path to repo root") } - importPath := filepath.ToSlash(filepath.Join(rootImportPath, subDir)) + + rootImportPath, err := gotool.GetModuleName() + if err != nil { + return nil, err + } return &ProjectRepoInfo{ - RootImportPath: rootImportPath, - RootDir: rootDir, - SubDir: subDir, - ImportPath: importPath, + RootImportPath: rootImportPath, + CanonicalRootImportPath: filepath.ToSlash(extractCanonicalRootImportPath(rootImportPath)), + RootDir: rootDir, + SubDir: subDir, + ImportPath: filepath.ToSlash(filepath.Join(rootImportPath, subDir)), }, nil } + +func extractCanonicalRootImportPath(rootImportPath string) string { + // In order to be compatible with go modules, the root import + // path of any module at major version v2 or higher must include + // the major version. + // Ref: https://github.com/golang/go/wiki/Modules#semantic-import-versioning + // + // Thus, Beats has to include the major version as well. + // This regex removes the major version from the import path. + re := regexp.MustCompile(`(/v[1-9][0-9]*)$`) + return re.ReplaceAllString(rootImportPath, "") +} + +func listSrcGOPATHs() ([]string, error) { + var ( + cwd = CWD() + errs []string + srcDirs []string + ) + for _, gopath := range filepath.SplitList(build.Default.GOPATH) { + gopath = filepath.Clean(gopath) + + if !strings.HasPrefix(cwd, gopath) { + // Fixes an issue on macOS when /var is actually /private/var. + var err error + gopath, err = filepath.EvalSymlinks(gopath) + if err != nil { + errs = append(errs, err.Error()) + continue + } + } + + srcDirs = append(srcDirs, filepath.Join(gopath, "src")) + } + + if len(srcDirs) == 0 { + return srcDirs, errors.Errorf("failed to find any GOPATH %v", errs) + } + + return srcDirs, nil +} diff --git a/dev-tools/mage/target/build/build.go b/dev-tools/mage/target/build/build.go index edb56e86ded5..4e668fc78691 100644 --- a/dev-tools/mage/target/build/build.go +++ b/dev-tools/mage/target/build/build.go @@ -18,7 +18,7 @@ package build import ( - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // Build builds the Beat binary. diff --git a/dev-tools/mage/target/collectors/collect.go b/dev-tools/mage/target/collectors/collect.go index eb24360f6767..cd1614b19850 100644 --- a/dev-tools/mage/target/collectors/collect.go +++ b/dev-tools/mage/target/collectors/collect.go @@ -18,7 +18,7 @@ package collectors import ( - metricbeat "github.com/elastic/beats/metricbeat/scripts/mage" + metricbeat "github.com/elastic/beats/v7/metricbeat/scripts/mage" ) //CollectDocs creates the documentation under docs/ diff --git a/dev-tools/mage/target/common/check.go b/dev-tools/mage/target/common/check.go index d5038c99c947..90e4e56a256c 100644 --- a/dev-tools/mage/target/common/check.go +++ b/dev-tools/mage/target/common/check.go @@ -20,7 +20,7 @@ package common import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) var checkDeps []interface{} diff --git a/dev-tools/mage/target/common/clean.go b/dev-tools/mage/target/common/clean.go index ddda44fee328..fcda6e25fe51 100644 --- a/dev-tools/mage/target/common/clean.go +++ b/dev-tools/mage/target/common/clean.go @@ -17,7 +17,7 @@ package common -import devtools "github.com/elastic/beats/dev-tools/mage" +import devtools "github.com/elastic/beats/v7/dev-tools/mage" // Clean cleans all generated files and build artifacts. func Clean() error { diff --git a/dev-tools/mage/target/common/fmt.go b/dev-tools/mage/target/common/fmt.go index 9405d69ca487..b29dac7ae906 100644 --- a/dev-tools/mage/target/common/fmt.go +++ b/dev-tools/mage/target/common/fmt.go @@ -20,7 +20,7 @@ package common import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // Fmt formats source code (.go and .py) and adds license headers. diff --git a/dev-tools/mage/target/common/shared.go b/dev-tools/mage/target/common/shared.go index 68f2620b3f3a..a062bf50084e 100644 --- a/dev-tools/mage/target/common/shared.go +++ b/dev-tools/mage/target/common/shared.go @@ -17,7 +17,7 @@ package common -import devtools "github.com/elastic/beats/dev-tools/mage" +import devtools "github.com/elastic/beats/v7/dev-tools/mage" // DumpVariables writes the template variables and values to stdout. func DumpVariables() error { diff --git a/dev-tools/mage/target/compose/compose.go b/dev-tools/mage/target/compose/compose.go index c6ee75b8bcdc..8af1666d7526 100644 --- a/dev-tools/mage/target/compose/compose.go +++ b/dev-tools/mage/target/compose/compose.go @@ -30,7 +30,7 @@ import ( "github.com/pkg/errors" "gopkg.in/yaml.v2" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // SupportedVersions is the definition of supported version files diff --git a/dev-tools/mage/target/dashboards/dashboards.go b/dev-tools/mage/target/dashboards/dashboards.go index 372a61e52d25..c993b8bacc0a 100644 --- a/dev-tools/mage/target/dashboards/dashboards.go +++ b/dev-tools/mage/target/dashboards/dashboards.go @@ -21,7 +21,7 @@ import ( "github.com/magefile/mage/mg" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) var ( diff --git a/dev-tools/mage/target/docs/docs.go b/dev-tools/mage/target/docs/docs.go index 7558b6280359..fa972056b5ae 100644 --- a/dev-tools/mage/target/docs/docs.go +++ b/dev-tools/mage/target/docs/docs.go @@ -20,7 +20,7 @@ package docs import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) var ( diff --git a/dev-tools/mage/target/integtest/integtest.go b/dev-tools/mage/target/integtest/integtest.go index 33c924bbe180..142a713effc8 100644 --- a/dev-tools/mage/target/integtest/integtest.go +++ b/dev-tools/mage/target/integtest/integtest.go @@ -22,8 +22,8 @@ import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/dev-tools/mage/target/test" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/dev-tools/mage/target/test" ) func init() { diff --git a/dev-tools/mage/target/pkg/test.go b/dev-tools/mage/target/pkg/test.go index 806d46789a34..7d4f0ef92213 100644 --- a/dev-tools/mage/target/pkg/test.go +++ b/dev-tools/mage/target/pkg/test.go @@ -17,7 +17,7 @@ package pkg -import devtools "github.com/elastic/beats/dev-tools/mage" +import devtools "github.com/elastic/beats/v7/dev-tools/mage" // PackageTest tests the generated packages in build/distributions. It checks // things like file ownership/mode, package attributes, etc. diff --git a/dev-tools/mage/target/unittest/unittest.go b/dev-tools/mage/target/unittest/unittest.go index 1805e9a62882..859849bac1ed 100644 --- a/dev-tools/mage/target/unittest/unittest.go +++ b/dev-tools/mage/target/unittest/unittest.go @@ -22,8 +22,8 @@ import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/dev-tools/mage/target/test" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/dev-tools/mage/target/test" ) func init() { diff --git a/dev-tools/magefile.go b/dev-tools/magefile.go index 233ccfde5a9f..083e7e3479c1 100644 --- a/dev-tools/magefile.go +++ b/dev-tools/magefile.go @@ -21,5 +21,5 @@ package main import ( // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/common" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/common" ) diff --git a/dev-tools/make/mage.mk b/dev-tools/make/mage.mk index 8fab2e736cc9..bf8c443a5fe8 100644 --- a/dev-tools/make/mage.mk +++ b/dev-tools/make/mage.mk @@ -1,13 +1,13 @@ MAGE_VERSION ?= v1.9.0 MAGE_PRESENT := $(shell mage --version 2> /dev/null | grep $(MAGE_VERSION)) -MAGE_IMPORT_PATH ?= github.com/elastic/beats/vendor/github.com/magefile/mage +MAGE_IMPORT_PATH ?= github.com/magefile/mage export MAGE_IMPORT_PATH .PHONY: mage mage: ifndef MAGE_PRESENT @echo Installing mage $(MAGE_VERSION) from vendor dir. - go install -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH} + go install -mod=vendor -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH} @-mage -clean endif @true diff --git a/dev-tools/packaging/preference-pane/magefile.go b/dev-tools/packaging/preference-pane/magefile.go index 16ccb18184f5..77eb9c437dae 100644 --- a/dev-tools/packaging/preference-pane/magefile.go +++ b/dev-tools/packaging/preference-pane/magefile.go @@ -28,7 +28,7 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) var builder = preferencePaneBuilder{ diff --git a/dev-tools/packaging/templates/common/magefile.go.tmpl b/dev-tools/packaging/templates/common/magefile.go.tmpl index c09fc4eb1e27..286f9d30555a 100644 --- a/dev-tools/packaging/templates/common/magefile.go.tmpl +++ b/dev-tools/packaging/templates/common/magefile.go.tmpl @@ -10,7 +10,7 @@ import ( "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) func init() { diff --git a/docs/devguide/contributing.asciidoc b/docs/devguide/contributing.asciidoc index 6a835559c2e5..60115947aefe 100644 --- a/docs/devguide/contributing.asciidoc +++ b/docs/devguide/contributing.asciidoc @@ -55,10 +55,6 @@ After https://golang.org/doc/install[installing Go], set the https://golang.org/doc/code.html#GOPATH[GOPATH] environment variable to point to your workspace location, and make sure `$GOPATH/bin` is in your PATH. -The location where you clone is important. Make a directory structure under -`GOPATH` that matches the URL used for Elastic repositories, then clone the -beats repository under the new directory: - [source,shell] ---------------------------------------------------------------------- mkdir -p ${GOPATH}/src/github.com/elastic @@ -185,11 +181,9 @@ external tools. [float] ==== Golang -To manage the `vendor/` folder we use -https://github.com/kardianos/govendor[govendor]. Please see -the govendor documentation on how to add or update vendored dependencies. +To manage the `vendor/` folder we use go modules. -In most cases `govendor fetch your/dependency@version +out` will get the job done. +To update the contents of `vendor/`, run `mage vendor`. [float] ==== Other dependencies diff --git a/filebeat/autodiscover/autodiscover.go b/filebeat/autodiscover/autodiscover.go index faa0475163fd..85fa6cf65bd2 100644 --- a/filebeat/autodiscover/autodiscover.go +++ b/filebeat/autodiscover/autodiscover.go @@ -20,10 +20,10 @@ package autodiscover import ( "errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) // AutodiscoverAdapter for Filebeat modules & input diff --git a/filebeat/autodiscover/builder/hints/config.go b/filebeat/autodiscover/builder/hints/config.go index 25994c211c83..55b1ffb18115 100644 --- a/filebeat/autodiscover/builder/hints/config.go +++ b/filebeat/autodiscover/builder/hints/config.go @@ -17,7 +17,7 @@ package hints -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" type config struct { Key string `config:"key"` diff --git a/filebeat/autodiscover/builder/hints/logs.go b/filebeat/autodiscover/builder/hints/logs.go index 571c30fd33b1..f467f7c2ef60 100644 --- a/filebeat/autodiscover/builder/hints/logs.go +++ b/filebeat/autodiscover/builder/hints/logs.go @@ -21,14 +21,14 @@ import ( "fmt" "regexp" - "github.com/elastic/beats/filebeat/fileset" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/fileset" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/filebeat/autodiscover/builder/hints/logs_test.go b/filebeat/autodiscover/builder/hints/logs_test.go index 4303d41363e3..b316cdb506c2 100644 --- a/filebeat/autodiscover/builder/hints/logs_test.go +++ b/filebeat/autodiscover/builder/hints/logs_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/paths" ) func TestGenerateHints(t *testing.T) { diff --git a/filebeat/autodiscover/include.go b/filebeat/autodiscover/include.go index 1cebd28bc1a5..de15185e7166 100644 --- a/filebeat/autodiscover/include.go +++ b/filebeat/autodiscover/include.go @@ -19,5 +19,5 @@ package autodiscover import ( // include all filebeat specific builders - _ "github.com/elastic/beats/filebeat/autodiscover/builder/hints" + _ "github.com/elastic/beats/v7/filebeat/autodiscover/builder/hints" ) diff --git a/filebeat/beater/acker.go b/filebeat/beater/acker.go index a157bb7ec34f..35ef0ca0beb9 100644 --- a/filebeat/beater/acker.go +++ b/filebeat/beater/acker.go @@ -18,8 +18,8 @@ package beater import ( - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/logp" ) // eventAcker handles publisher pipeline ACKs and forwards diff --git a/filebeat/beater/acker_test.go b/filebeat/beater/acker_test.go index 717812500af5..2d195c8aabde 100644 --- a/filebeat/beater/acker_test.go +++ b/filebeat/beater/acker_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/input/file" + "github.com/elastic/beats/v7/filebeat/input/file" ) type mockStatefulLogger struct { diff --git a/filebeat/beater/channels.go b/filebeat/beater/channels.go index cd0eba04f48a..38874cf483a4 100644 --- a/filebeat/beater/channels.go +++ b/filebeat/beater/channels.go @@ -20,9 +20,9 @@ package beater import ( "sync" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/filebeat/registrar" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/filebeat/registrar" + "github.com/elastic/beats/v7/libbeat/monitoring" ) type registrarLogger struct { diff --git a/filebeat/beater/filebeat.go b/filebeat/beater/filebeat.go index 991ae798480e..30f2781c68d5 100644 --- a/filebeat/beater/filebeat.go +++ b/filebeat/beater/filebeat.go @@ -22,30 +22,30 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/common/reload" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/management" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - - fbautodiscover "github.com/elastic/beats/filebeat/autodiscover" - "github.com/elastic/beats/filebeat/channel" - cfg "github.com/elastic/beats/filebeat/config" - "github.com/elastic/beats/filebeat/crawler" - "github.com/elastic/beats/filebeat/fileset" - "github.com/elastic/beats/filebeat/registrar" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/management" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + + fbautodiscover "github.com/elastic/beats/v7/filebeat/autodiscover" + "github.com/elastic/beats/v7/filebeat/channel" + cfg "github.com/elastic/beats/v7/filebeat/config" + "github.com/elastic/beats/v7/filebeat/crawler" + "github.com/elastic/beats/v7/filebeat/fileset" + "github.com/elastic/beats/v7/filebeat/registrar" // Add filebeat level processors - _ "github.com/elastic/beats/filebeat/processor/add_kubernetes_metadata" - _ "github.com/elastic/beats/libbeat/processors/decode_csv_fields" + _ "github.com/elastic/beats/v7/filebeat/processor/add_kubernetes_metadata" + _ "github.com/elastic/beats/v7/libbeat/processors/decode_csv_fields" ) const pipelinesWarning = "Filebeat is unable to load the Ingest Node pipelines for the configured" + diff --git a/filebeat/beater/signalwait.go b/filebeat/beater/signalwait.go index ce8399352a30..a6115f8d7066 100644 --- a/filebeat/beater/signalwait.go +++ b/filebeat/beater/signalwait.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type signalWait struct { diff --git a/filebeat/channel/connector.go b/filebeat/channel/connector.go index d2a20dd54a2c..8f253bb13230 100644 --- a/filebeat/channel/connector.go +++ b/filebeat/channel/connector.go @@ -18,11 +18,11 @@ package channel import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/add_formatted_index" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/add_formatted_index" ) // ConnectorFunc is an adapter for using ordinary functions as Connector. diff --git a/filebeat/channel/connector_test.go b/filebeat/channel/connector_test.go index f9f5cc0640c7..fe6e32991889 100644 --- a/filebeat/channel/connector_test.go +++ b/filebeat/channel/connector_test.go @@ -24,10 +24,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/actions" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/actions" ) func TestProcessorsForConfig(t *testing.T) { diff --git a/filebeat/channel/factory.go b/filebeat/channel/factory.go index d4373beec19d..3bfeccc01505 100644 --- a/filebeat/channel/factory.go +++ b/filebeat/channel/factory.go @@ -18,10 +18,10 @@ package channel import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/processors" ) type OutletFactory struct { diff --git a/filebeat/channel/interface.go b/filebeat/channel/interface.go index 30b41ac0461b..0069cda6f020 100644 --- a/filebeat/channel/interface.go +++ b/filebeat/channel/interface.go @@ -18,8 +18,8 @@ package channel import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // Factory is used to create a new Outlet instance diff --git a/filebeat/channel/outlet.go b/filebeat/channel/outlet.go index ce8e5de79963..3211a9d7293e 100644 --- a/filebeat/channel/outlet.go +++ b/filebeat/channel/outlet.go @@ -18,8 +18,8 @@ package channel import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" ) type outlet struct { diff --git a/filebeat/channel/util.go b/filebeat/channel/util.go index f7579b341171..2c2125534548 100644 --- a/filebeat/channel/util.go +++ b/filebeat/channel/util.go @@ -20,7 +20,7 @@ package channel import ( "sync" - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" ) type subOutlet struct { diff --git a/filebeat/channel/util_test.go b/filebeat/channel/util_test.go index c3a534f52bd8..49bd2da3094c 100644 --- a/filebeat/channel/util_test.go +++ b/filebeat/channel/util_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/tests/resources" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/tests/resources" ) type dummyOutletter struct { diff --git a/filebeat/cmd/generate.go b/filebeat/cmd/generate.go index 9b081ff6eeff..822b1acc953b 100644 --- a/filebeat/cmd/generate.go +++ b/filebeat/cmd/generate.go @@ -23,11 +23,11 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/filebeat/generator/fields" - "github.com/elastic/beats/filebeat/generator/fileset" - "github.com/elastic/beats/filebeat/generator/module" - "github.com/elastic/beats/libbeat/common/cli" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/filebeat/generator/fields" + "github.com/elastic/beats/v7/filebeat/generator/fileset" + "github.com/elastic/beats/v7/filebeat/generator/module" + "github.com/elastic/beats/v7/libbeat/common/cli" + "github.com/elastic/beats/v7/libbeat/paths" ) var ( diff --git a/filebeat/cmd/modules.go b/filebeat/cmd/modules.go index ea62e2921a2d..d07ebd78fb5d 100644 --- a/filebeat/cmd/modules.go +++ b/filebeat/cmd/modules.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cmd" ) func buildModulesManager(beat *beat.Beat) (cmd.ModulesManager, error) { diff --git a/filebeat/cmd/root.go b/filebeat/cmd/root.go index 3cb795a2ae17..43b42a56b67f 100644 --- a/filebeat/cmd/root.go +++ b/filebeat/cmd/root.go @@ -22,14 +22,14 @@ import ( "github.com/spf13/pflag" - "github.com/elastic/beats/filebeat/beater" + "github.com/elastic/beats/v7/filebeat/beater" - cmd "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" + cmd "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" // Import processors. - _ "github.com/elastic/beats/libbeat/processors/script" - _ "github.com/elastic/beats/libbeat/processors/timestamp" + _ "github.com/elastic/beats/v7/libbeat/processors/script" + _ "github.com/elastic/beats/v7/libbeat/processors/timestamp" ) // Name of this beat diff --git a/filebeat/config/config.go b/filebeat/config/config.go index 47faaf442947..db10fa20ba6e 100644 --- a/filebeat/config/config.go +++ b/filebeat/config/config.go @@ -25,12 +25,12 @@ import ( "sort" "time" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/paths" ) // Defaults for config variables which are not set diff --git a/filebeat/config/config_test.go b/filebeat/config/config_test.go index e922f743a2c5..15f9f624b28f 100644 --- a/filebeat/config/config_test.go +++ b/filebeat/config/config_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" ) func TestReadConfig2(t *testing.T) { diff --git a/filebeat/crawler/crawler.go b/filebeat/crawler/crawler.go index d53511b90f0a..29410080061a 100644 --- a/filebeat/crawler/crawler.go +++ b/filebeat/crawler/crawler.go @@ -21,17 +21,17 @@ import ( "fmt" "sync" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/fileset" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/filebeat/registrar" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - - _ "github.com/elastic/beats/filebeat/include" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/fileset" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/filebeat/registrar" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + + _ "github.com/elastic/beats/v7/filebeat/include" ) type Crawler struct { diff --git a/filebeat/fileset/config.go b/filebeat/fileset/config.go index 816e696fd08a..4a9937a3392f 100644 --- a/filebeat/fileset/config.go +++ b/filebeat/fileset/config.go @@ -21,9 +21,9 @@ import ( "fmt" "path/filepath" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/paths" ) // ModuleConfig contains the configuration file options for a module diff --git a/filebeat/fileset/config_test.go b/filebeat/fileset/config_test.go index 78a1f6f5edd7..972d7eff6319 100644 --- a/filebeat/fileset/config_test.go +++ b/filebeat/fileset/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestInputSettings(t *testing.T) { diff --git a/filebeat/fileset/factory.go b/filebeat/fileset/factory.go index 2d534e045734..e7e6d30515dd 100644 --- a/filebeat/fileset/factory.go +++ b/filebeat/fileset/factory.go @@ -20,15 +20,15 @@ package fileset import ( "github.com/gofrs/uuid" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/registrar" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/registrar" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" "github.com/mitchellh/hashstructure" ) diff --git a/filebeat/fileset/fileset.go b/filebeat/fileset/fileset.go index eccd019fcb59..dc136feee45d 100644 --- a/filebeat/fileset/fileset.go +++ b/filebeat/fileset/fileset.go @@ -39,9 +39,9 @@ import ( errw "github.com/pkg/errors" "gopkg.in/yaml.v2" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) // Fileset struct is the representation of a fileset. diff --git a/filebeat/fileset/fileset_test.go b/filebeat/fileset/fileset_test.go index e66eafe2b973..9f0309b25f0e 100644 --- a/filebeat/fileset/fileset_test.go +++ b/filebeat/fileset/fileset_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func getModuleForTesting(t *testing.T, module, fileset string) *Fileset { diff --git a/filebeat/fileset/flags.go b/filebeat/fileset/flags.go index 61f126327727..45297d9f3383 100644 --- a/filebeat/fileset/flags.go +++ b/filebeat/fileset/flags.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Modules related command line flags. diff --git a/filebeat/fileset/modules.go b/filebeat/fileset/modules.go index c1d7d969d45a..56ab0359a16e 100644 --- a/filebeat/fileset/modules.go +++ b/filebeat/fileset/modules.go @@ -28,9 +28,9 @@ import ( "github.com/pkg/errors" yaml "gopkg.in/yaml.v2" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/paths" ) var availableMLModules = map[string]string{ diff --git a/filebeat/fileset/modules_integration_test.go b/filebeat/fileset/modules_integration_test.go index c806ec2c7b7b..ea6d646ede21 100644 --- a/filebeat/fileset/modules_integration_test.go +++ b/filebeat/fileset/modules_integration_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/outputs/elasticsearch/estest" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch/estest" ) func TestLoadPipeline(t *testing.T) { diff --git a/filebeat/fileset/modules_test.go b/filebeat/fileset/modules_test.go index 1c0d1766d360..5a7bc46a53c3 100644 --- a/filebeat/fileset/modules_test.go +++ b/filebeat/fileset/modules_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/paths" ) func load(t *testing.T, from interface{}) *common.Config { diff --git a/filebeat/fileset/pipelines.go b/filebeat/fileset/pipelines.go index 0f21dc4a026d..db1293054632 100644 --- a/filebeat/fileset/pipelines.go +++ b/filebeat/fileset/pipelines.go @@ -24,8 +24,8 @@ import ( "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // PipelineLoaderFactory builds and returns a PipelineLoader diff --git a/filebeat/fileset/pipelines_test.go b/filebeat/fileset/pipelines_test.go index a9758df894a2..d808639cda89 100644 --- a/filebeat/fileset/pipelines_test.go +++ b/filebeat/fileset/pipelines_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" ) func TestLoadPipelinesWithMultiPipelineFileset(t *testing.T) { diff --git a/filebeat/fileset/setup.go b/filebeat/fileset/setup.go index f6f4932ccda8..9bdb274da0a9 100644 --- a/filebeat/fileset/setup.go +++ b/filebeat/fileset/setup.go @@ -18,10 +18,10 @@ package fileset import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // SetupFactory is for loading module assets when running setup subcommand. diff --git a/filebeat/generator/fileset/fileset.go b/filebeat/generator/fileset/fileset.go index c2a49a34bd39..d17219e2c52e 100644 --- a/filebeat/generator/fileset/fileset.go +++ b/filebeat/generator/fileset/fileset.go @@ -21,7 +21,7 @@ import ( "fmt" "path" - "github.com/elastic/beats/filebeat/generator" + "github.com/elastic/beats/v7/filebeat/generator" ) // Generate creates directories and placeholder files required by a fileset. diff --git a/filebeat/generator/module/module.go b/filebeat/generator/module/module.go index 0a6f25aeaaf6..64a470dcb17e 100644 --- a/filebeat/generator/module/module.go +++ b/filebeat/generator/module/module.go @@ -22,7 +22,7 @@ import ( "os" "path" - "github.com/elastic/beats/filebeat/generator" + "github.com/elastic/beats/v7/filebeat/generator" ) // Generate creates directories and placeholder files required by a new module. diff --git a/filebeat/harvester/forwarder.go b/filebeat/harvester/forwarder.go index 935555f777f7..3bd5d51bc4c8 100644 --- a/filebeat/harvester/forwarder.go +++ b/filebeat/harvester/forwarder.go @@ -20,8 +20,8 @@ package harvester import ( "errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" ) // Outlet interface is used for forwarding events diff --git a/filebeat/harvester/registry.go b/filebeat/harvester/registry.go index 9a6748151a37..d0bfd10ec5cc 100644 --- a/filebeat/harvester/registry.go +++ b/filebeat/harvester/registry.go @@ -23,7 +23,7 @@ import ( "github.com/gofrs/uuid" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // Registry struct manages (start / stop) a list of harvesters diff --git a/filebeat/harvester/util.go b/filebeat/harvester/util.go index e885aab3881b..f39a718573a4 100644 --- a/filebeat/harvester/util.go +++ b/filebeat/harvester/util.go @@ -17,7 +17,7 @@ package harvester -import "github.com/elastic/beats/libbeat/common/match" +import "github.com/elastic/beats/v7/libbeat/common/match" // Contains available input types const ( diff --git a/filebeat/harvester/util_test.go b/filebeat/harvester/util_test.go index 5a3313696b9d..0f0971a8a422 100644 --- a/filebeat/harvester/util_test.go +++ b/filebeat/harvester/util_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/logp" ) // InitMatchers initializes a list of compiled regular expressions. diff --git a/filebeat/include/fields.go b/filebeat/include/fields.go index d37e8023ffee..c88ec996f42c 100644 --- a/filebeat/include/fields.go +++ b/filebeat/include/fields.go @@ -20,7 +20,7 @@ package include import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/include/list.go b/filebeat/include/list.go index acaa460cfdfb..519d0e715819 100644 --- a/filebeat/include/list.go +++ b/filebeat/include/list.go @@ -21,33 +21,33 @@ package include import ( // Import packages that need to register themselves. - _ "github.com/elastic/beats/filebeat/input/container" - _ "github.com/elastic/beats/filebeat/input/docker" - _ "github.com/elastic/beats/filebeat/input/kafka" - _ "github.com/elastic/beats/filebeat/input/log" - _ "github.com/elastic/beats/filebeat/input/mqtt" - _ "github.com/elastic/beats/filebeat/input/redis" - _ "github.com/elastic/beats/filebeat/input/stdin" - _ "github.com/elastic/beats/filebeat/input/syslog" - _ "github.com/elastic/beats/filebeat/input/tcp" - _ "github.com/elastic/beats/filebeat/input/udp" - _ "github.com/elastic/beats/filebeat/module/apache" - _ "github.com/elastic/beats/filebeat/module/auditd" - _ "github.com/elastic/beats/filebeat/module/elasticsearch" - _ "github.com/elastic/beats/filebeat/module/haproxy" - _ "github.com/elastic/beats/filebeat/module/icinga" - _ "github.com/elastic/beats/filebeat/module/iis" - _ "github.com/elastic/beats/filebeat/module/kafka" - _ "github.com/elastic/beats/filebeat/module/kibana" - _ "github.com/elastic/beats/filebeat/module/logstash" - _ "github.com/elastic/beats/filebeat/module/mongodb" - _ "github.com/elastic/beats/filebeat/module/mysql" - _ "github.com/elastic/beats/filebeat/module/nats" - _ "github.com/elastic/beats/filebeat/module/nginx" - _ "github.com/elastic/beats/filebeat/module/osquery" - _ "github.com/elastic/beats/filebeat/module/postgresql" - _ "github.com/elastic/beats/filebeat/module/redis" - _ "github.com/elastic/beats/filebeat/module/santa" - _ "github.com/elastic/beats/filebeat/module/system" - _ "github.com/elastic/beats/filebeat/module/traefik" + _ "github.com/elastic/beats/v7/filebeat/input/container" + _ "github.com/elastic/beats/v7/filebeat/input/docker" + _ "github.com/elastic/beats/v7/filebeat/input/kafka" + _ "github.com/elastic/beats/v7/filebeat/input/log" + _ "github.com/elastic/beats/v7/filebeat/input/mqtt" + _ "github.com/elastic/beats/v7/filebeat/input/redis" + _ "github.com/elastic/beats/v7/filebeat/input/stdin" + _ "github.com/elastic/beats/v7/filebeat/input/syslog" + _ "github.com/elastic/beats/v7/filebeat/input/tcp" + _ "github.com/elastic/beats/v7/filebeat/input/udp" + _ "github.com/elastic/beats/v7/filebeat/module/apache" + _ "github.com/elastic/beats/v7/filebeat/module/auditd" + _ "github.com/elastic/beats/v7/filebeat/module/elasticsearch" + _ "github.com/elastic/beats/v7/filebeat/module/haproxy" + _ "github.com/elastic/beats/v7/filebeat/module/icinga" + _ "github.com/elastic/beats/v7/filebeat/module/iis" + _ "github.com/elastic/beats/v7/filebeat/module/kafka" + _ "github.com/elastic/beats/v7/filebeat/module/kibana" + _ "github.com/elastic/beats/v7/filebeat/module/logstash" + _ "github.com/elastic/beats/v7/filebeat/module/mongodb" + _ "github.com/elastic/beats/v7/filebeat/module/mysql" + _ "github.com/elastic/beats/v7/filebeat/module/nats" + _ "github.com/elastic/beats/v7/filebeat/module/nginx" + _ "github.com/elastic/beats/v7/filebeat/module/osquery" + _ "github.com/elastic/beats/v7/filebeat/module/postgresql" + _ "github.com/elastic/beats/v7/filebeat/module/redis" + _ "github.com/elastic/beats/v7/filebeat/module/santa" + _ "github.com/elastic/beats/v7/filebeat/module/system" + _ "github.com/elastic/beats/v7/filebeat/module/traefik" ) diff --git a/filebeat/input/config.go b/filebeat/input/config.go index 750b370419b6..448a878a607d 100644 --- a/filebeat/input/config.go +++ b/filebeat/input/config.go @@ -20,8 +20,8 @@ package input import ( "time" - cfg "github.com/elastic/beats/filebeat/config" - "github.com/elastic/beats/libbeat/common/cfgwarn" + cfg "github.com/elastic/beats/v7/filebeat/config" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" ) var ( diff --git a/filebeat/input/container/input.go b/filebeat/input/container/input.go index 656b93b47fd1..b208cd16013d 100644 --- a/filebeat/input/container/input.go +++ b/filebeat/input/container/input.go @@ -18,10 +18,10 @@ package container import ( - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/log" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/log" + "github.com/elastic/beats/v7/libbeat/common" "github.com/pkg/errors" ) diff --git a/filebeat/input/docker/input.go b/filebeat/input/docker/input.go index 750d6d8d68c5..70df9ce2238a 100644 --- a/filebeat/input/docker/input.go +++ b/filebeat/input/docker/input.go @@ -21,12 +21,12 @@ import ( "fmt" "path" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/log" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/log" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/pkg/errors" ) diff --git a/filebeat/input/file/file.go b/filebeat/input/file/file.go index c3bc1bb624ad..676a2d5cfcb6 100644 --- a/filebeat/input/file/file.go +++ b/filebeat/input/file/file.go @@ -20,7 +20,7 @@ package file import ( "os" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type File struct { diff --git a/filebeat/input/file/state.go b/filebeat/input/file/state.go index 96c5abf2071f..dde3c6c54217 100644 --- a/filebeat/input/file/state.go +++ b/filebeat/input/file/state.go @@ -25,7 +25,7 @@ import ( "github.com/mitchellh/hashstructure" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/file" ) // State is used to communicate the reading state of a file diff --git a/filebeat/input/file/states.go b/filebeat/input/file/states.go index d01026f87768..fc50dd904c0b 100644 --- a/filebeat/input/file/states.go +++ b/filebeat/input/file/states.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // States handles list of FileState. One must use NewStates to instantiate a diff --git a/filebeat/input/input.go b/filebeat/input/input.go index e1931d4e4bfa..06e62e035555 100644 --- a/filebeat/input/input.go +++ b/filebeat/input/input.go @@ -24,11 +24,11 @@ import ( "github.com/mitchellh/hashstructure" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var ( diff --git a/filebeat/input/kafka/config.go b/filebeat/input/kafka/config.go index 6fb14730aea3..d36b46772333 100644 --- a/filebeat/input/kafka/config.go +++ b/filebeat/input/kafka/config.go @@ -24,12 +24,12 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/common/kafka" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/adapter" - "github.com/elastic/beats/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/common/kafka" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/adapter" + "github.com/elastic/beats/v7/libbeat/outputs" ) type kafkaInputConfig struct { diff --git a/filebeat/input/kafka/input.go b/filebeat/input/kafka/input.go index 72cb12542840..5dadb0585124 100644 --- a/filebeat/input/kafka/input.go +++ b/filebeat/input/kafka/input.go @@ -27,13 +27,13 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/backoff" - "github.com/elastic/beats/libbeat/common/kafka" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/backoff" + "github.com/elastic/beats/v7/libbeat/common/kafka" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/pkg/errors" ) diff --git a/filebeat/input/kafka/kafka_integration_test.go b/filebeat/input/kafka/kafka_integration_test.go index ca4d03a8d9c5..c7ad9fc999cb 100644 --- a/filebeat/input/kafka/kafka_integration_test.go +++ b/filebeat/input/kafka/kafka_integration_test.go @@ -32,12 +32,12 @@ import ( "github.com/Shopify/sarama" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - _ "github.com/elastic/beats/libbeat/outputs/codec/format" - _ "github.com/elastic/beats/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/format" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/json" ) const ( diff --git a/filebeat/input/log/config.go b/filebeat/input/log/config.go index 78669b4c107e..835358b4e66d 100644 --- a/filebeat/input/log/config.go +++ b/filebeat/input/log/config.go @@ -24,15 +24,15 @@ import ( "github.com/dustin/go-humanize" - cfg "github.com/elastic/beats/filebeat/config" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/reader/multiline" - "github.com/elastic/beats/libbeat/reader/readfile" - "github.com/elastic/beats/libbeat/reader/readjson" + cfg "github.com/elastic/beats/v7/filebeat/config" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/reader/multiline" + "github.com/elastic/beats/v7/libbeat/reader/readfile" + "github.com/elastic/beats/v7/libbeat/reader/readjson" ) var ( diff --git a/filebeat/input/log/config_test.go b/filebeat/input/log/config_test.go index bf73d0412b03..7406014d049e 100644 --- a/filebeat/input/log/config_test.go +++ b/filebeat/input/log/config_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/harvester" ) func TestCleanOlderError(t *testing.T) { diff --git a/filebeat/input/log/file.go b/filebeat/input/log/file.go index 59d408c87adf..27858c0c4c7f 100644 --- a/filebeat/input/log/file.go +++ b/filebeat/input/log/file.go @@ -20,7 +20,7 @@ package log import ( "os" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/file" ) type File struct { diff --git a/filebeat/input/log/harvester.go b/filebeat/input/log/harvester.go index 5f0c47c98784..94162ebfec97 100644 --- a/filebeat/input/log/harvester.go +++ b/filebeat/input/log/harvester.go @@ -39,21 +39,21 @@ import ( "github.com/gofrs/uuid" "golang.org/x/text/transform" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - file_helper "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/reader" - "github.com/elastic/beats/libbeat/reader/debug" - "github.com/elastic/beats/libbeat/reader/multiline" - "github.com/elastic/beats/libbeat/reader/readfile" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" - "github.com/elastic/beats/libbeat/reader/readjson" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + file_helper "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/debug" + "github.com/elastic/beats/v7/libbeat/reader/multiline" + "github.com/elastic/beats/v7/libbeat/reader/readfile" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/reader/readjson" ) var ( diff --git a/filebeat/input/log/harvester_test.go b/filebeat/input/log/harvester_test.go index 2ee03824efbb..96ae5c7e5ed0 100644 --- a/filebeat/input/log/harvester_test.go +++ b/filebeat/input/log/harvester_test.go @@ -29,10 +29,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/reader" - "github.com/elastic/beats/libbeat/reader/readfile" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/readfile" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" ) func TestReadLine(t *testing.T) { diff --git a/filebeat/input/log/input.go b/filebeat/input/log/input.go index 24cbdf33abc0..ac0d71cf53d6 100644 --- a/filebeat/input/log/input.go +++ b/filebeat/input/log/input.go @@ -27,15 +27,15 @@ import ( "sync" "time" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) const ( diff --git a/filebeat/input/log/input_other_test.go b/filebeat/input/log/input_other_test.go index 9eb2a7ba4b88..e37b4d0c1f21 100644 --- a/filebeat/input/log/input_other_test.go +++ b/filebeat/input/log/input_other_test.go @@ -22,8 +22,8 @@ package log import ( "testing" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/common/match" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/common/match" "github.com/stretchr/testify/assert" ) diff --git a/filebeat/input/log/input_test.go b/filebeat/input/log/input_test.go index eaf080d39d6b..0eb7d1899d7d 100644 --- a/filebeat/input/log/input_test.go +++ b/filebeat/input/log/input_test.go @@ -29,13 +29,13 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/tests/resources" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/tests/resources" ) func TestInputFileExclude(t *testing.T) { diff --git a/filebeat/input/log/log.go b/filebeat/input/log/log.go index 79bc5f145053..1a89c5bc8d14 100644 --- a/filebeat/input/log/log.go +++ b/filebeat/input/log/log.go @@ -22,9 +22,9 @@ import ( "os" "time" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/logp" ) // Log contains all log related data diff --git a/filebeat/input/log/prospector_windows_test.go b/filebeat/input/log/prospector_windows_test.go index 92183cdb1ed6..2b60fac4c649 100644 --- a/filebeat/input/log/prospector_windows_test.go +++ b/filebeat/input/log/prospector_windows_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/common/match" ) var matchTestsWindows = []struct { diff --git a/filebeat/input/mqtt/client.go b/filebeat/input/mqtt/client.go index 73e8d2f53441..b87884fd9bf9 100644 --- a/filebeat/input/mqtt/client.go +++ b/filebeat/input/mqtt/client.go @@ -20,7 +20,7 @@ package mqtt import ( libmqtt "github.com/eclipse/paho.mqtt.golang" - "github.com/elastic/beats/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs" ) func createClientOptions(config mqttInputConfig, onConnectHandler func(client libmqtt.Client)) (*libmqtt.ClientOptions, error) { diff --git a/filebeat/input/mqtt/client_mocked.go b/filebeat/input/mqtt/client_mocked.go index dadccdf93565..2ac2ccb77a03 100644 --- a/filebeat/input/mqtt/client_mocked.go +++ b/filebeat/input/mqtt/client_mocked.go @@ -22,10 +22,10 @@ import ( libmqtt "github.com/eclipse/paho.mqtt.golang" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/backoff" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/backoff" ) type mockedMessage struct { diff --git a/filebeat/input/mqtt/config.go b/filebeat/input/mqtt/config.go index 6a1ed8ca1e91..c4fbe2b77359 100644 --- a/filebeat/input/mqtt/config.go +++ b/filebeat/input/mqtt/config.go @@ -20,7 +20,7 @@ package mqtt import ( "errors" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) type mqttInputConfig struct { diff --git a/filebeat/input/mqtt/input.go b/filebeat/input/mqtt/input.go index f2edab19b6fc..a802a43c6281 100644 --- a/filebeat/input/mqtt/input.go +++ b/filebeat/input/mqtt/input.go @@ -25,12 +25,12 @@ import ( libmqtt "github.com/eclipse/paho.mqtt.golang" "github.com/pkg/errors" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/backoff" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/backoff" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/filebeat/input/mqtt/input_test.go b/filebeat/input/mqtt/input_test.go index 3e54e17f1180..cc6bf4b05b77 100644 --- a/filebeat/input/mqtt/input_test.go +++ b/filebeat/input/mqtt/input_test.go @@ -26,11 +26,11 @@ import ( libmqtt "github.com/eclipse/paho.mqtt.golang" "github.com/stretchr/testify/require" - finput "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/backoff" - "github.com/elastic/beats/libbeat/logp" + finput "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/backoff" + "github.com/elastic/beats/v7/libbeat/logp" ) var logger = logp.NewLogger("test") diff --git a/filebeat/input/mqtt/logging.go b/filebeat/input/mqtt/logging.go index 35510c20b348..fde4a0b8513a 100644 --- a/filebeat/input/mqtt/logging.go +++ b/filebeat/input/mqtt/logging.go @@ -23,7 +23,7 @@ import ( libmqtt "github.com/eclipse/paho.mqtt.golang" "go.uber.org/zap" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) var setupLoggingOnce sync.Once diff --git a/filebeat/input/mqtt/mqtt_integration_test.go b/filebeat/input/mqtt/mqtt_integration_test.go index 3fd3506cbf40..60b8c595afc2 100644 --- a/filebeat/input/mqtt/mqtt_integration_test.go +++ b/filebeat/input/mqtt/mqtt_integration_test.go @@ -29,11 +29,11 @@ import ( libmqtt "github.com/eclipse/paho.mqtt.golang" "github.com/stretchr/testify/require" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/filebeat/input/plugin.go b/filebeat/input/plugin.go index 364fa57a718b..c0d273d97e2b 100644 --- a/filebeat/input/plugin.go +++ b/filebeat/input/plugin.go @@ -20,7 +20,7 @@ package input import ( "errors" - "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/plugin" ) type inputPlugin struct { diff --git a/filebeat/input/redis/config.go b/filebeat/input/redis/config.go index b5829b6defc4..1177fd8bb1b2 100644 --- a/filebeat/input/redis/config.go +++ b/filebeat/input/redis/config.go @@ -20,7 +20,7 @@ package redis import ( "time" - "github.com/elastic/beats/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/harvester" ) var defaultConfig = config{ diff --git a/filebeat/input/redis/harvester.go b/filebeat/input/redis/harvester.go index 73b9111a8725..49d153cf26c0 100644 --- a/filebeat/input/redis/harvester.go +++ b/filebeat/input/redis/harvester.go @@ -25,11 +25,11 @@ import ( rd "github.com/garyburd/redigo/redis" "github.com/gofrs/uuid" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/harvester" ) // Harvester contains all redis harvester data diff --git a/filebeat/input/redis/input.go b/filebeat/input/redis/input.go index f4909e2c6a5a..a784af74c055 100644 --- a/filebeat/input/redis/input.go +++ b/filebeat/input/redis/input.go @@ -22,14 +22,14 @@ import ( rd "github.com/garyburd/redigo/redis" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/filebeat/input/registry.go b/filebeat/input/registry.go index 69e2d942bef4..06b23d3ac189 100644 --- a/filebeat/input/registry.go +++ b/filebeat/input/registry.go @@ -20,10 +20,10 @@ package input import ( "fmt" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type Context struct { diff --git a/filebeat/input/registry_test.go b/filebeat/input/registry_test.go index ca6857781868..0532d5ac8bcf 100644 --- a/filebeat/input/registry_test.go +++ b/filebeat/input/registry_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/libbeat/common" ) var fakeFactory = func(_ *common.Config, _ channel.Connector, _ Context) (Input, error) { diff --git a/filebeat/input/runnerfactory.go b/filebeat/input/runnerfactory.go index c4bb0818031c..d41382fe01fb 100644 --- a/filebeat/input/runnerfactory.go +++ b/filebeat/input/runnerfactory.go @@ -18,11 +18,11 @@ package input import ( - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/registrar" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/registrar" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" ) // RunnerFactory is a factory for registrars diff --git a/filebeat/input/stdin/input.go b/filebeat/input/stdin/input.go index f59c0da521e8..8273da27f622 100644 --- a/filebeat/input/stdin/input.go +++ b/filebeat/input/stdin/input.go @@ -20,14 +20,14 @@ package stdin import ( "fmt" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/input/file" - "github.com/elastic/beats/filebeat/input/log" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/input/file" + "github.com/elastic/beats/v7/filebeat/input/log" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/filebeat/input/syslog/config.go b/filebeat/input/syslog/config.go index 4e8eecc74b40..28590b3ced36 100644 --- a/filebeat/input/syslog/config.go +++ b/filebeat/input/syslog/config.go @@ -23,11 +23,11 @@ import ( "github.com/dustin/go-humanize" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/filebeat/inputsource/tcp" - "github.com/elastic/beats/filebeat/inputsource/udp" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/filebeat/inputsource/tcp" + "github.com/elastic/beats/v7/filebeat/inputsource/udp" + "github.com/elastic/beats/v7/libbeat/common" ) type config struct { diff --git a/filebeat/input/syslog/input.go b/filebeat/input/syslog/input.go index 71efa8bcfc71..24271c6fe4b3 100644 --- a/filebeat/input/syslog/input.go +++ b/filebeat/input/syslog/input.go @@ -24,19 +24,19 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) // Parser is generated from a ragel state machine using the following command: //go:generate ragel -Z -G2 parser.rl -o parser.go -//go:generate go fmt parser.go +//go:generate goimports -l -w parser.go // Severity and Facility are derived from the priority, theses are the human readable terms // defined in https://tools.ietf.org/html/rfc3164#section-4.1.1. diff --git a/filebeat/input/syslog/input_test.go b/filebeat/input/syslog/input_test.go index f52d235e3a48..b6c29b74a519 100644 --- a/filebeat/input/syslog/input_test.go +++ b/filebeat/input/syslog/input_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestWhenPriorityIsSet(t *testing.T) { diff --git a/filebeat/input/tcp/config.go b/filebeat/input/tcp/config.go index 4e07fa91f896..3bc928ac8c05 100644 --- a/filebeat/input/tcp/config.go +++ b/filebeat/input/tcp/config.go @@ -22,8 +22,8 @@ import ( "github.com/dustin/go-humanize" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/inputsource/tcp" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/inputsource/tcp" ) type config struct { diff --git a/filebeat/input/tcp/input.go b/filebeat/input/tcp/input.go index 77a7162b0395..9c0b7476f90a 100644 --- a/filebeat/input/tcp/input.go +++ b/filebeat/input/tcp/input.go @@ -22,14 +22,14 @@ import ( "sync" "time" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/filebeat/inputsource/tcp" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/filebeat/inputsource/tcp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/filebeat/input/tcp/input_test.go b/filebeat/input/tcp/input_test.go index a7ca64ba59d5..d820e0687236 100644 --- a/filebeat/input/tcp/input_test.go +++ b/filebeat/input/tcp/input_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/inputsource" + "github.com/elastic/beats/v7/filebeat/inputsource" ) func TestCreateEvent(t *testing.T) { diff --git a/filebeat/input/udp/config.go b/filebeat/input/udp/config.go index 65e522920b7a..33696dc69c72 100644 --- a/filebeat/input/udp/config.go +++ b/filebeat/input/udp/config.go @@ -22,8 +22,8 @@ import ( "github.com/dustin/go-humanize" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/inputsource/udp" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/inputsource/udp" ) var defaultConfig = config{ diff --git a/filebeat/input/udp/input.go b/filebeat/input/udp/input.go index 30bb818d2a57..9d5f45208908 100644 --- a/filebeat/input/udp/input.go +++ b/filebeat/input/udp/input.go @@ -21,14 +21,14 @@ import ( "sync" "time" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/harvester" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/filebeat/inputsource/udp" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/harvester" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/filebeat/inputsource/udp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/filebeat/inputsource/tcp/config.go b/filebeat/inputsource/tcp/config.go index f63481796274..3eb25c42d9aa 100644 --- a/filebeat/inputsource/tcp/config.go +++ b/filebeat/inputsource/tcp/config.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/cfgtype" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/cfgtype" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) // Name is the human readable name and identifier. diff --git a/filebeat/inputsource/tcp/handler.go b/filebeat/inputsource/tcp/handler.go index f5454322bc24..e92180732e4b 100644 --- a/filebeat/inputsource/tcp/handler.go +++ b/filebeat/inputsource/tcp/handler.go @@ -26,9 +26,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" ) // splitHandler is a TCP client that has splitting capabilities. diff --git a/filebeat/inputsource/tcp/server.go b/filebeat/inputsource/tcp/server.go index df7343f9947c..04a6df4559c2 100644 --- a/filebeat/inputsource/tcp/server.go +++ b/filebeat/inputsource/tcp/server.go @@ -27,10 +27,10 @@ import ( "golang.org/x/net/netutil" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // Server represent a TCP server diff --git a/filebeat/inputsource/tcp/server_test.go b/filebeat/inputsource/tcp/server_test.go index 82e89fb72a75..4e25ef74892b 100644 --- a/filebeat/inputsource/tcp/server_test.go +++ b/filebeat/inputsource/tcp/server_test.go @@ -30,8 +30,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/libbeat/common" ) var defaultConfig = Config{ diff --git a/filebeat/inputsource/udp/config.go b/filebeat/inputsource/udp/config.go index f269a805cb59..6c8646384555 100644 --- a/filebeat/inputsource/udp/config.go +++ b/filebeat/inputsource/udp/config.go @@ -20,7 +20,7 @@ package udp import ( "time" - "github.com/elastic/beats/libbeat/common/cfgtype" + "github.com/elastic/beats/v7/libbeat/common/cfgtype" ) // Config options for the UDPServer diff --git a/filebeat/inputsource/udp/server.go b/filebeat/inputsource/udp/server.go index 2c8cc9200aad..9df2e57904a4 100644 --- a/filebeat/inputsource/udp/server.go +++ b/filebeat/inputsource/udp/server.go @@ -26,8 +26,8 @@ import ( "github.com/dustin/go-humanize" - "github.com/elastic/beats/filebeat/inputsource" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/inputsource" + "github.com/elastic/beats/v7/libbeat/logp" ) // Name is the human readable name and identifier. diff --git a/filebeat/inputsource/udp/server_test.go b/filebeat/inputsource/udp/server_test.go index 3c94349fa2b0..766f7d0b7aa5 100644 --- a/filebeat/inputsource/udp/server_test.go +++ b/filebeat/inputsource/udp/server_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/inputsource" + "github.com/elastic/beats/v7/filebeat/inputsource" ) const maxMessageSize = 20 diff --git a/filebeat/magefile.go b/filebeat/magefile.go index e82403d361c0..b18450a0f256 100644 --- a/filebeat/magefile.go +++ b/filebeat/magefile.go @@ -26,13 +26,13 @@ import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" - filebeat "github.com/elastic/beats/filebeat/scripts/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + filebeat "github.com/elastic/beats/v7/filebeat/scripts/mage" // mage:import - "github.com/elastic/beats/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import generate - _ "github.com/elastic/beats/filebeat/scripts/mage/generate" + _ "github.com/elastic/beats/v7/filebeat/scripts/mage/generate" ) func init() { diff --git a/filebeat/main.go b/filebeat/main.go index c0b3c2c0b923..21289acdf6f9 100644 --- a/filebeat/main.go +++ b/filebeat/main.go @@ -20,7 +20,7 @@ package main import ( "os" - "github.com/elastic/beats/filebeat/cmd" + "github.com/elastic/beats/v7/filebeat/cmd" ) // The basic model of execution: diff --git a/filebeat/main_test.go b/filebeat/main_test.go index 075487d60ec5..84f3e686e4c3 100644 --- a/filebeat/main_test.go +++ b/filebeat/main_test.go @@ -23,8 +23,8 @@ import ( "flag" "testing" - "github.com/elastic/beats/filebeat/cmd" - "github.com/elastic/beats/libbeat/tests/system/template" + "github.com/elastic/beats/v7/filebeat/cmd" + "github.com/elastic/beats/v7/libbeat/tests/system/template" ) var systemTest *bool diff --git a/filebeat/module/apache/fields.go b/filebeat/module/apache/fields.go index ba11297c42ff..c1e04806ad5f 100644 --- a/filebeat/module/apache/fields.go +++ b/filebeat/module/apache/fields.go @@ -20,7 +20,7 @@ package apache import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/auditd/fields.go b/filebeat/module/auditd/fields.go index 41ffa6beb71b..6dc1d8a8a5ed 100644 --- a/filebeat/module/auditd/fields.go +++ b/filebeat/module/auditd/fields.go @@ -20,7 +20,7 @@ package auditd import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/elasticsearch/fields.go b/filebeat/module/elasticsearch/fields.go index 2d7b16f74d0f..98808ad5e05a 100644 --- a/filebeat/module/elasticsearch/fields.go +++ b/filebeat/module/elasticsearch/fields.go @@ -20,7 +20,7 @@ package elasticsearch import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/haproxy/fields.go b/filebeat/module/haproxy/fields.go index 9b572b78dbcd..8b9176b7cfe3 100644 --- a/filebeat/module/haproxy/fields.go +++ b/filebeat/module/haproxy/fields.go @@ -20,7 +20,7 @@ package haproxy import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/icinga/fields.go b/filebeat/module/icinga/fields.go index 7307a8522974..a442241f22a4 100644 --- a/filebeat/module/icinga/fields.go +++ b/filebeat/module/icinga/fields.go @@ -20,7 +20,7 @@ package icinga import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/iis/fields.go b/filebeat/module/iis/fields.go index a234fc3847b4..a2638d7ddb88 100644 --- a/filebeat/module/iis/fields.go +++ b/filebeat/module/iis/fields.go @@ -20,7 +20,7 @@ package iis import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/kafka/fields.go b/filebeat/module/kafka/fields.go index ed538d21f99b..86950968bf0b 100644 --- a/filebeat/module/kafka/fields.go +++ b/filebeat/module/kafka/fields.go @@ -20,7 +20,7 @@ package kafka import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/kibana/fields.go b/filebeat/module/kibana/fields.go index ab0297c148e5..d5733c14aa17 100644 --- a/filebeat/module/kibana/fields.go +++ b/filebeat/module/kibana/fields.go @@ -20,7 +20,7 @@ package kibana import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/logstash/fields.go b/filebeat/module/logstash/fields.go index 70fb188699e8..2097117ebf70 100644 --- a/filebeat/module/logstash/fields.go +++ b/filebeat/module/logstash/fields.go @@ -20,7 +20,7 @@ package logstash import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/mongodb/fields.go b/filebeat/module/mongodb/fields.go index 564680f6998f..b6e51a3838b7 100644 --- a/filebeat/module/mongodb/fields.go +++ b/filebeat/module/mongodb/fields.go @@ -20,7 +20,7 @@ package mongodb import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/mysql/fields.go b/filebeat/module/mysql/fields.go index 0e53ab01b338..fba7746ab833 100644 --- a/filebeat/module/mysql/fields.go +++ b/filebeat/module/mysql/fields.go @@ -20,7 +20,7 @@ package mysql import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/nats/fields.go b/filebeat/module/nats/fields.go index 825c42644a14..77551238beac 100644 --- a/filebeat/module/nats/fields.go +++ b/filebeat/module/nats/fields.go @@ -20,7 +20,7 @@ package nats import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/nginx/fields.go b/filebeat/module/nginx/fields.go index e45823e11ebd..df2afc9669e4 100644 --- a/filebeat/module/nginx/fields.go +++ b/filebeat/module/nginx/fields.go @@ -20,7 +20,7 @@ package nginx import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/osquery/fields.go b/filebeat/module/osquery/fields.go index 7f423fda95b2..98f1d9db0fb2 100644 --- a/filebeat/module/osquery/fields.go +++ b/filebeat/module/osquery/fields.go @@ -20,7 +20,7 @@ package osquery import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/postgresql/fields.go b/filebeat/module/postgresql/fields.go index 573e617dcd9d..1ef2040d458d 100644 --- a/filebeat/module/postgresql/fields.go +++ b/filebeat/module/postgresql/fields.go @@ -20,7 +20,7 @@ package postgresql import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/redis/fields.go b/filebeat/module/redis/fields.go index 49ac22676a45..66298b24738f 100644 --- a/filebeat/module/redis/fields.go +++ b/filebeat/module/redis/fields.go @@ -20,7 +20,7 @@ package redis import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/santa/fields.go b/filebeat/module/santa/fields.go index cc67c59b2b22..06b53e41d848 100644 --- a/filebeat/module/santa/fields.go +++ b/filebeat/module/santa/fields.go @@ -20,7 +20,7 @@ package santa import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/system/fields.go b/filebeat/module/system/fields.go index 4cfa76bf8c71..dcf2568f5e1c 100644 --- a/filebeat/module/system/fields.go +++ b/filebeat/module/system/fields.go @@ -20,7 +20,7 @@ package system import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/module/traefik/fields.go b/filebeat/module/traefik/fields.go index b5b1fc8935e7..f7e75e94d570 100644 --- a/filebeat/module/traefik/fields.go +++ b/filebeat/module/traefik/fields.go @@ -20,7 +20,7 @@ package traefik import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/filebeat/processor/add_kubernetes_metadata/matchers.go b/filebeat/processor/add_kubernetes_metadata/matchers.go index 5f0f6b0a8188..805e55fb43b5 100644 --- a/filebeat/processor/add_kubernetes_metadata/matchers.go +++ b/filebeat/processor/add_kubernetes_metadata/matchers.go @@ -23,9 +23,9 @@ import ( "runtime" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors/add_kubernetes_metadata" ) func init() { diff --git a/filebeat/processor/add_kubernetes_metadata/matchers_test.go b/filebeat/processor/add_kubernetes_metadata/matchers_test.go index 0c8c64d5387d..82addc9d3b43 100644 --- a/filebeat/processor/add_kubernetes_metadata/matchers_test.go +++ b/filebeat/processor/add_kubernetes_metadata/matchers_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // A random container ID that we use for our tests diff --git a/filebeat/registrar/migrate.go b/filebeat/registrar/migrate.go index a48df0477c45..64d2b4579a8c 100644 --- a/filebeat/registrar/migrate.go +++ b/filebeat/registrar/migrate.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" - helper "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/logp" + helper "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/filebeat/registrar/registrar.go b/filebeat/registrar/registrar.go index 22fdd1b60662..61b9c2608e1a 100644 --- a/filebeat/registrar/registrar.go +++ b/filebeat/registrar/registrar.go @@ -26,12 +26,12 @@ import ( "sync" "time" - "github.com/elastic/beats/filebeat/config" - "github.com/elastic/beats/filebeat/input/file" - helper "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/filebeat/config" + "github.com/elastic/beats/v7/filebeat/input/file" + helper "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/paths" ) type Registrar struct { diff --git a/filebeat/registrar/registrar_test.go b/filebeat/registrar/registrar_test.go index 102b073dffad..58d5d5acff81 100644 --- a/filebeat/registrar/registrar_test.go +++ b/filebeat/registrar/registrar_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/input/file" + "github.com/elastic/beats/v7/filebeat/input/file" ) func TestRegistrarRead(t *testing.T) { diff --git a/filebeat/scripts/mage/config.go b/filebeat/scripts/mage/config.go index 23abad70ac59..7585c62b634a 100644 --- a/filebeat/scripts/mage/config.go +++ b/filebeat/scripts/mage/config.go @@ -18,7 +18,7 @@ package mage import ( - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) const modulesConfigYml = "build/config.modules.yml" diff --git a/filebeat/scripts/mage/docs.go b/filebeat/scripts/mage/docs.go index ae124600ca07..fd12ce859a8d 100644 --- a/filebeat/scripts/mage/docs.go +++ b/filebeat/scripts/mage/docs.go @@ -20,7 +20,7 @@ package mage import ( "github.com/magefile/mage/sh" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // CollectDocs executes the Filebeat docs_collector script to collect/generate diff --git a/filebeat/scripts/mage/generate/fields.go b/filebeat/scripts/mage/generate/fields.go index 9bc8a8af40a1..01bc6a1c46af 100644 --- a/filebeat/scripts/mage/generate/fields.go +++ b/filebeat/scripts/mage/generate/fields.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - devtools "github.com/elastic/beats/dev-tools/mage" - genfields "github.com/elastic/beats/filebeat/generator/fields" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + genfields "github.com/elastic/beats/v7/filebeat/generator/fields" ) // Fields creates a new fields.yml for an existing Filebeat fileset. diff --git a/filebeat/scripts/mage/generate/fileset.go b/filebeat/scripts/mage/generate/fileset.go index 612567a11045..ff54b2546324 100644 --- a/filebeat/scripts/mage/generate/fileset.go +++ b/filebeat/scripts/mage/generate/fileset.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - devtools "github.com/elastic/beats/dev-tools/mage" - genfileset "github.com/elastic/beats/filebeat/generator/fileset" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + genfileset "github.com/elastic/beats/v7/filebeat/generator/fileset" ) // Fileset creates a new fileset for an existing Filebeat module. diff --git a/filebeat/scripts/mage/generate/module.go b/filebeat/scripts/mage/generate/module.go index 5d14e3ec09f5..6995d483c779 100644 --- a/filebeat/scripts/mage/generate/module.go +++ b/filebeat/scripts/mage/generate/module.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - devtools "github.com/elastic/beats/dev-tools/mage" - genmod "github.com/elastic/beats/filebeat/generator/module" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + genmod "github.com/elastic/beats/v7/filebeat/generator/module" ) // Module creates a new Filebeat module. diff --git a/filebeat/scripts/mage/package.go b/filebeat/scripts/mage/package.go index 9de7c6c959c4..8a0819caf5ae 100644 --- a/filebeat/scripts/mage/package.go +++ b/filebeat/scripts/mage/package.go @@ -21,7 +21,7 @@ import ( "github.com/magefile/mage/mg" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) const ( diff --git a/filebeat/scripts/tester/main.go b/filebeat/scripts/tester/main.go index 63ecd2a69aa2..2ae9de443882 100644 --- a/filebeat/scripts/tester/main.go +++ b/filebeat/scripts/tester/main.go @@ -29,12 +29,12 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/reader" - "github.com/elastic/beats/libbeat/reader/multiline" - "github.com/elastic/beats/libbeat/reader/readfile" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/multiline" + "github.com/elastic/beats/v7/libbeat/reader/readfile" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" ) type logReaderConfig struct { diff --git a/generator/beat/.gitignore b/generator/_templates/beat/.gitignore similarity index 100% rename from generator/beat/.gitignore rename to generator/_templates/beat/.gitignore diff --git a/generator/beat/CHANGELOG.md b/generator/_templates/beat/CHANGELOG.md similarity index 100% rename from generator/beat/CHANGELOG.md rename to generator/_templates/beat/CHANGELOG.md diff --git a/generator/_templates/beat/Makefile b/generator/_templates/beat/Makefile new file mode 100644 index 000000000000..7c476dc5f6ef --- /dev/null +++ b/generator/_templates/beat/Makefile @@ -0,0 +1 @@ +include ../../common/Makefile diff --git a/generator/beat/README.md b/generator/_templates/beat/README.md similarity index 100% rename from generator/beat/README.md rename to generator/_templates/beat/README.md diff --git a/generator/beat/{beat}/.editorconfig b/generator/_templates/beat/{beat}/.editorconfig similarity index 100% rename from generator/beat/{beat}/.editorconfig rename to generator/_templates/beat/{beat}/.editorconfig diff --git a/generator/beat/{beat}/.gitignore b/generator/_templates/beat/{beat}/.gitignore similarity index 100% rename from generator/beat/{beat}/.gitignore rename to generator/_templates/beat/{beat}/.gitignore diff --git a/generator/beat/{beat}/.travis.yml b/generator/_templates/beat/{beat}/.travis.yml similarity index 100% rename from generator/beat/{beat}/.travis.yml rename to generator/_templates/beat/{beat}/.travis.yml diff --git a/generator/beat/{beat}/CONTRIBUTING.md b/generator/_templates/beat/{beat}/CONTRIBUTING.md similarity index 100% rename from generator/beat/{beat}/CONTRIBUTING.md rename to generator/_templates/beat/{beat}/CONTRIBUTING.md diff --git a/generator/beat/{beat}/LICENSE.txt b/generator/_templates/beat/{beat}/LICENSE.txt similarity index 100% rename from generator/beat/{beat}/LICENSE.txt rename to generator/_templates/beat/{beat}/LICENSE.txt diff --git a/generator/beat/{beat}/Makefile b/generator/_templates/beat/{beat}/Makefile similarity index 100% rename from generator/beat/{beat}/Makefile rename to generator/_templates/beat/{beat}/Makefile diff --git a/generator/beat/{beat}/NOTICE.txt b/generator/_templates/beat/{beat}/NOTICE.txt similarity index 100% rename from generator/beat/{beat}/NOTICE.txt rename to generator/_templates/beat/{beat}/NOTICE.txt diff --git a/generator/beat/{beat}/README.md b/generator/_templates/beat/{beat}/README.md similarity index 100% rename from generator/beat/{beat}/README.md rename to generator/_templates/beat/{beat}/README.md diff --git a/generator/beat/{beat}/_meta/beat.docker.yml b/generator/_templates/beat/{beat}/_meta/beat.docker.yml similarity index 100% rename from generator/beat/{beat}/_meta/beat.docker.yml rename to generator/_templates/beat/{beat}/_meta/beat.docker.yml diff --git a/generator/beat/{beat}/_meta/beat.yml b/generator/_templates/beat/{beat}/_meta/beat.yml similarity index 100% rename from generator/beat/{beat}/_meta/beat.yml rename to generator/_templates/beat/{beat}/_meta/beat.yml diff --git a/generator/beat/{beat}/_meta/fields.yml b/generator/_templates/beat/{beat}/_meta/fields.yml similarity index 100% rename from generator/beat/{beat}/_meta/fields.yml rename to generator/_templates/beat/{beat}/_meta/fields.yml diff --git a/generator/beat/{beat}/beater/{beat}.go b/generator/_templates/beat/{beat}/beater/{beat}.go similarity index 89% rename from generator/beat/{beat}/beater/{beat}.go rename to generator/_templates/beat/{beat}/beater/{beat}.go index 8031896402b7..236c3d663901 100644 --- a/generator/beat/{beat}/beater/{beat}.go +++ b/generator/_templates/beat/{beat}/beater/{beat}.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" "{beat_path}/config" ) diff --git a/generator/_templates/beat/{beat}/cmd/root.go b/generator/_templates/beat/{beat}/cmd/root.go new file mode 100644 index 000000000000..9607edb86a2f --- /dev/null +++ b/generator/_templates/beat/{beat}/cmd/root.go @@ -0,0 +1,14 @@ +package cmd + +import ( + "{beat_path}/beater" + + cmd "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" +) + +// Name of this beat +var Name = "{beat}" + +// RootCmd to handle beats cli +var RootCmd = cmd.GenRootCmdWithSettings(beater.New, instance.Settings{Name: Name}) diff --git a/generator/beat/{beat}/config/config.go b/generator/_templates/beat/{beat}/config/config.go similarity index 100% rename from generator/beat/{beat}/config/config.go rename to generator/_templates/beat/{beat}/config/config.go diff --git a/generator/beat/{beat}/config/config_test.go b/generator/_templates/beat/{beat}/config/config_test.go similarity index 100% rename from generator/beat/{beat}/config/config_test.go rename to generator/_templates/beat/{beat}/config/config_test.go diff --git a/generator/beat/{beat}/docs/index.asciidoc b/generator/_templates/beat/{beat}/docs/index.asciidoc similarity index 100% rename from generator/beat/{beat}/docs/index.asciidoc rename to generator/_templates/beat/{beat}/docs/index.asciidoc diff --git a/generator/_templates/beat/{beat}/magefile.go b/generator/_templates/beat/{beat}/magefile.go new file mode 100644 index 000000000000..b79448c2aaa5 --- /dev/null +++ b/generator/_templates/beat/{beat}/magefile.go @@ -0,0 +1,102 @@ +// +build mage + +package main + +import ( + "fmt" + "time" + + "github.com/magefile/mage/mg" + "github.com/magefile/mage/sh" + + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/dev-tools/mage/target/build" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/pkg" + "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" + "github.com/elastic/beats/v7/generator/common/beatgen" +) + +func init() { + devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources) + + devtools.BeatDescription = "One sentence description of the Beat." + devtools.BeatVendor = "{full_name}" + devtools.BeatProjectType = devtools.CommunityProject +} + +// VendorUpdate updates elastic/beats/v7 in the vendor dir +func VendorUpdate() error { + return beatgen.VendorUpdate() +} + +// Package packages the Beat for distribution. +// Use SNAPSHOT=true to build snapshots. +// Use PLATFORMS to control the target platforms. +func Package() { + start := time.Now() + defer func() { fmt.Println("package ran for", time.Since(start)) }() + + devtools.UseCommunityBeatPackaging() + + mg.Deps(Update) + mg.Deps(build.CrossBuild, build.CrossBuildGoDaemon) + mg.SerialDeps(devtools.Package, pkg.PackageTest) +} + +// Update updates the generated files (aka make update). +func Update() error { + return sh.Run("make", "update") +} + +// Fields generates a fields.yml for the Beat. +func Fields() error { + return devtools.GenerateFieldsYAML() +} + +// Config generates both the short/reference/docker configs. +func Config() error { + return devtools.Config(devtools.AllConfigTypes, devtools.ConfigFileParams{}, ".") +} + +// Clean cleans all generated files and build artifacts. +func Clean() error { + return devtools.Clean() +} + +// Check formats code, updates generated content, check for common errors, and +// checks for any modified files. +func Check() { + common.Check() +} + +// Fmt formats source code (.go and .py) and adds license headers. +func Fmt() { + common.Fmt() +} + +// Test runs all available tests +func Test() { + mg.Deps(unittest.GoUnitTest) +} + +// Build builds the Beat binary. +func Build() error { + return build.Build() +} + +// CrossBuild cross-builds the beat for all target platforms. +func CrossBuild() error { + return build.CrossBuild() +} + +// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon). +func BuildGoDaemon() error { + return build.BuildGoDaemon() +} + +// GolangCrossBuild build the Beat binary inside of the golang-builder. +// Do not use directly, use crossBuild instead. +func GolangCrossBuild() error { + return build.GolangCrossBuild() +} diff --git a/generator/beat/{beat}/main.go b/generator/_templates/beat/{beat}/main.go similarity index 100% rename from generator/beat/{beat}/main.go rename to generator/_templates/beat/{beat}/main.go diff --git a/generator/beat/{beat}/main_test.go b/generator/_templates/beat/{beat}/main_test.go similarity index 100% rename from generator/beat/{beat}/main_test.go rename to generator/_templates/beat/{beat}/main_test.go diff --git a/generator/beat/{beat}/make.bat b/generator/_templates/beat/{beat}/make.bat similarity index 100% rename from generator/beat/{beat}/make.bat rename to generator/_templates/beat/{beat}/make.bat diff --git a/generator/beat/{beat}/tests/system/config/{beat}.yml.j2 b/generator/_templates/beat/{beat}/tests/system/config/{beat}.yml.j2 similarity index 100% rename from generator/beat/{beat}/tests/system/config/{beat}.yml.j2 rename to generator/_templates/beat/{beat}/tests/system/config/{beat}.yml.j2 diff --git a/generator/beat/{beat}/tests/system/requirements.txt b/generator/_templates/beat/{beat}/tests/system/requirements.txt similarity index 100% rename from generator/beat/{beat}/tests/system/requirements.txt rename to generator/_templates/beat/{beat}/tests/system/requirements.txt diff --git a/generator/beat/{beat}/tests/system/test_base.py b/generator/_templates/beat/{beat}/tests/system/test_base.py similarity index 100% rename from generator/beat/{beat}/tests/system/test_base.py rename to generator/_templates/beat/{beat}/tests/system/test_base.py diff --git a/generator/beat/{beat}/tests/system/{beat}.py b/generator/_templates/beat/{beat}/tests/system/{beat}.py similarity index 100% rename from generator/beat/{beat}/tests/system/{beat}.py rename to generator/_templates/beat/{beat}/tests/system/{beat}.py diff --git a/generator/metricbeat/.gitignore b/generator/_templates/metricbeat/.gitignore similarity index 100% rename from generator/metricbeat/.gitignore rename to generator/_templates/metricbeat/.gitignore diff --git a/generator/metricbeat/CHANGELOG.md b/generator/_templates/metricbeat/CHANGELOG.md similarity index 100% rename from generator/metricbeat/CHANGELOG.md rename to generator/_templates/metricbeat/CHANGELOG.md diff --git a/generator/metricbeat/LICENSE b/generator/_templates/metricbeat/LICENSE similarity index 100% rename from generator/metricbeat/LICENSE rename to generator/_templates/metricbeat/LICENSE diff --git a/generator/_templates/metricbeat/Makefile b/generator/_templates/metricbeat/Makefile new file mode 100644 index 000000000000..d58cf4922bb8 --- /dev/null +++ b/generator/_templates/metricbeat/Makefile @@ -0,0 +1,7 @@ +BEAT_TYPE = metricbeat + +include ../../common/Makefile + +# Collects all dependencies and then calls update +.PHONY: collect +collect: diff --git a/generator/metricbeat/README.md b/generator/_templates/metricbeat/README.md similarity index 100% rename from generator/metricbeat/README.md rename to generator/_templates/metricbeat/README.md diff --git a/generator/metricbeat/{beat}/.editorconfig b/generator/_templates/metricbeat/{beat}/.editorconfig similarity index 100% rename from generator/metricbeat/{beat}/.editorconfig rename to generator/_templates/metricbeat/{beat}/.editorconfig diff --git a/generator/metricbeat/{beat}/.gitignore b/generator/_templates/metricbeat/{beat}/.gitignore similarity index 100% rename from generator/metricbeat/{beat}/.gitignore rename to generator/_templates/metricbeat/{beat}/.gitignore diff --git a/generator/metricbeat/{beat}/CONTRIBUTING.md b/generator/_templates/metricbeat/{beat}/CONTRIBUTING.md similarity index 100% rename from generator/metricbeat/{beat}/CONTRIBUTING.md rename to generator/_templates/metricbeat/{beat}/CONTRIBUTING.md diff --git a/generator/metricbeat/{beat}/LICENSE.txt b/generator/_templates/metricbeat/{beat}/LICENSE.txt similarity index 100% rename from generator/metricbeat/{beat}/LICENSE.txt rename to generator/_templates/metricbeat/{beat}/LICENSE.txt diff --git a/generator/metricbeat/{beat}/Makefile b/generator/_templates/metricbeat/{beat}/Makefile similarity index 100% rename from generator/metricbeat/{beat}/Makefile rename to generator/_templates/metricbeat/{beat}/Makefile diff --git a/generator/metricbeat/{beat}/NOTICE.txt b/generator/_templates/metricbeat/{beat}/NOTICE.txt similarity index 100% rename from generator/metricbeat/{beat}/NOTICE.txt rename to generator/_templates/metricbeat/{beat}/NOTICE.txt diff --git a/generator/metricbeat/{beat}/README.md b/generator/_templates/metricbeat/{beat}/README.md similarity index 100% rename from generator/metricbeat/{beat}/README.md rename to generator/_templates/metricbeat/{beat}/README.md diff --git a/generator/metricbeat/{beat}/_meta/docker.yml b/generator/_templates/metricbeat/{beat}/_meta/docker.yml similarity index 100% rename from generator/metricbeat/{beat}/_meta/docker.yml rename to generator/_templates/metricbeat/{beat}/_meta/docker.yml diff --git a/generator/metricbeat/{beat}/_meta/reference.yml b/generator/_templates/metricbeat/{beat}/_meta/reference.yml similarity index 100% rename from generator/metricbeat/{beat}/_meta/reference.yml rename to generator/_templates/metricbeat/{beat}/_meta/reference.yml diff --git a/generator/metricbeat/{beat}/_meta/short.yml b/generator/_templates/metricbeat/{beat}/_meta/short.yml similarity index 100% rename from generator/metricbeat/{beat}/_meta/short.yml rename to generator/_templates/metricbeat/{beat}/_meta/short.yml diff --git a/generator/_templates/metricbeat/{beat}/cmd/modules.go b/generator/_templates/metricbeat/{beat}/cmd/modules.go new file mode 100644 index 000000000000..411a9bdaeff7 --- /dev/null +++ b/generator/_templates/metricbeat/{beat}/cmd/modules.go @@ -0,0 +1,48 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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 cmd + +import ( + "strings" + + "github.com/pkg/errors" + + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cmd" +) + +// BuildModulesManager adds support for modules management to a beat +func BuildModulesManager(beat *beat.Beat) (cmd.ModulesManager, error) { + config := beat.BeatConfig + + glob, err := config.String("config.modules.path", -1) + if err != nil { + return nil, errors.Errorf("modules management requires '%s.config.modules.path' setting", Name) + } + + if !strings.HasSuffix(glob, "*.yml") { + return nil, errors.Errorf("wrong settings for config.modules.path, it is expected to end with *.yml. Got: %s", glob) + } + + modulesManager, err := cfgfile.NewGlobManager(glob, ".yml", ".disabled") + if err != nil { + return nil, errors.Wrap(err, "initialization error") + } + return modulesManager, nil +} diff --git a/generator/_templates/metricbeat/{beat}/cmd/root.go b/generator/_templates/metricbeat/{beat}/cmd/root.go new file mode 100644 index 000000000000..840e7b1a7cdc --- /dev/null +++ b/generator/_templates/metricbeat/{beat}/cmd/root.go @@ -0,0 +1,50 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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 cmd + +import ( + cmd "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/metricbeat/beater" + "github.com/elastic/beats/v7/metricbeat/cmd/test" + "github.com/elastic/beats/v7/metricbeat/mb/module" +) + +// Name of this beat +var Name = "{beat}" + +// RootCmd to handle beats cli +var RootCmd *cmd.BeatsRootCmd + +var ( + // Use a customized instance of Metricbeat where startup delay has + // been disabled to workaround the fact that Modules() will return + // the static modules (not the dynamic ones) with a start delay. + testModulesCreator = beater.Creator( + beater.WithModuleOptions( + module.WithMetricSetInfo(), + module.WithMaxStartDelay(0), + ), + ) +) + +func init() { + RootCmd = cmd.GenRootCmdWithSettings(beater.DefaultCreator(), instance.Settings{Name: Name}) + RootCmd.AddCommand(cmd.GenModulesCmd(Name, "", BuildModulesManager)) + RootCmd.TestCmd.AddCommand(test.GenTestModulesCmd(Name, "", testModulesCreator)) +} diff --git a/generator/_templates/metricbeat/{beat}/magefile.go b/generator/_templates/metricbeat/{beat}/magefile.go new file mode 100644 index 000000000000..22b3dcfcc762 --- /dev/null +++ b/generator/_templates/metricbeat/{beat}/magefile.go @@ -0,0 +1,137 @@ +// +build mage + +package main + +import ( + "fmt" + "time" + + "github.com/magefile/mage/mg" + + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/dev-tools/mage/target/build" + "github.com/elastic/beats/v7/dev-tools/mage/target/collectors" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/pkg" + "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" + "github.com/elastic/beats/v7/dev-tools/mage/target/update" + "github.com/elastic/beats/v7/generator/common/beatgen" + metricbeat "github.com/elastic/beats/v7/metricbeat/scripts/mage" +) + +func init() { + devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources) + + devtools.BeatDescription = "One sentence description of the Beat." + devtools.BeatVendor = "{full_name}" +} + +// VendorUpdate updates elastic/beats/v7 in the vendor dir +func VendorUpdate() error { + return beatgen.VendorUpdate() +} + +// CollectAll generates the docs and the fields. +func CollectAll() { + mg.Deps(collectors.CollectDocs, FieldsDocs) +} + +// Package packages the Beat for distribution. +// Use SNAPSHOT=true to build snapshots. +// Use PLATFORMS to control the target platforms. +func Package() { + start := time.Now() + defer func() { fmt.Println("package ran for", time.Since(start)) }() + + devtools.UseCommunityBeatPackaging() + + mg.Deps(update.Update) + mg.Deps(build.CrossBuild, build.CrossBuildGoDaemon) + mg.SerialDeps(devtools.Package, pkg.PackageTest) +} + +// FieldsDocs generates docs/fields.asciidoc containing all fields +// (including x-pack). +func FieldsDocs() error { + inputs := []string{ + devtools.OSSBeatDir("module"), + } + output := devtools.CreateDir("build/fields/fields.all.yml") + if err := devtools.GenerateFieldsYAMLTo(output, inputs...); err != nil { + return err + } + return devtools.Docs.FieldDocs(output) +} + +// Fields generates a fields.yml for the Beat. +func Fields() error { + return devtools.GenerateFieldsYAML("module") +} + +// Config generates both the short/reference/docker configs. +func Config() { + mg.Deps(configYML, metricbeat.GenerateDirModulesD) +} + +func configYML() error { + customDeps := devtools.ConfigFileParams{ + ShortParts: []string{"_meta/short.yml", devtools.LibbeatDir("_meta/config.yml.tmpl")}, + ReferenceParts: []string{"_meta/reference.yml", devtools.LibbeatDir("_meta/config.reference.yml.tmpl")}, + DockerParts: []string{"_meta/docker.yml", devtools.LibbeatDir("_meta/config.docker.yml")}, + ExtraVars: map[string]interface{}{"BeatName": devtools.BeatName}, + } + return devtools.Config(devtools.AllConfigTypes, customDeps, ".") +} + +// Clean cleans all generated files and build artifacts. +func Clean() error { + return devtools.Clean() +} + +// Check formats code, updates generated content, check for common errors, and +// checks for any modified files. +func Check() { + common.Check() +} + +// Fmt formats source code (.go and .py) and adds license headers. +func Fmt() { + common.Fmt() +} + +// Update updates the generated files (aka make update). +func Update() error { + return update.Update() +} + +// Imports generates an include/list.go file containing +// a import statement for each module and dataset. +func Imports() error { + return devtools.GenerateModuleIncludeListGo() +} + +// Test runs all available tests +func Test() { + mg.Deps(unittest.GoUnitTest) +} + +// Build builds the Beat binary. +func Build() error { + return build.Build() +} + +// CrossBuild cross-builds the beat for all target platforms. +func CrossBuild() error { + return build.CrossBuild() +} + +// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon). +func BuildGoDaemon() error { + return build.BuildGoDaemon() +} + +// GolangCrossBuild build the Beat binary inside of the golang-builder. +// Do not use directly, use crossBuild instead. +func GolangCrossBuild() error { + return build.GolangCrossBuild() +} diff --git a/generator/metricbeat/{beat}/main.go b/generator/_templates/metricbeat/{beat}/main.go similarity index 100% rename from generator/metricbeat/{beat}/main.go rename to generator/_templates/metricbeat/{beat}/main.go diff --git a/generator/metricbeat/{beat}/make.bat b/generator/_templates/metricbeat/{beat}/make.bat similarity index 100% rename from generator/metricbeat/{beat}/make.bat rename to generator/_templates/metricbeat/{beat}/make.bat diff --git a/generator/beat/Makefile b/generator/beat/Makefile deleted file mode 100644 index dd1e5be85573..000000000000 --- a/generator/beat/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../common/Makefile diff --git a/generator/beat/{beat}/cmd/root.go b/generator/beat/{beat}/cmd/root.go deleted file mode 100644 index 21cd202d0790..000000000000 --- a/generator/beat/{beat}/cmd/root.go +++ /dev/null @@ -1,14 +0,0 @@ -package cmd - -import ( - "{beat_path}/beater" - - cmd "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" -) - -// Name of this beat -var Name = "{beat}" - -// RootCmd to handle beats cli -var RootCmd = cmd.GenRootCmdWithSettings(beater.New, instance.Settings{Name: Name}) diff --git a/generator/beat/{beat}/magefile.go b/generator/beat/{beat}/magefile.go deleted file mode 100644 index 609c191e3969..000000000000 --- a/generator/beat/{beat}/magefile.go +++ /dev/null @@ -1,102 +0,0 @@ -// +build mage - -package main - -import ( - "fmt" - "time" - - "github.com/magefile/mage/mg" - "github.com/magefile/mage/sh" - - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/dev-tools/mage/target/build" - "github.com/elastic/beats/dev-tools/mage/target/common" - "github.com/elastic/beats/dev-tools/mage/target/pkg" - "github.com/elastic/beats/dev-tools/mage/target/unittest" - "github.com/elastic/beats/generator/common/beatgen" -) - -func init() { - devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources) - - devtools.BeatDescription = "One sentence description of the Beat." - devtools.BeatVendor = "{full_name}" - devtools.BeatProjectType = devtools.CommunityProject -} - -// VendorUpdate updates elastic/beats in the vendor dir -func VendorUpdate() error { - return beatgen.VendorUpdate() -} - -// Package packages the Beat for distribution. -// Use SNAPSHOT=true to build snapshots. -// Use PLATFORMS to control the target platforms. -func Package() { - start := time.Now() - defer func() { fmt.Println("package ran for", time.Since(start)) }() - - devtools.UseCommunityBeatPackaging() - - mg.Deps(Update) - mg.Deps(build.CrossBuild, build.CrossBuildGoDaemon) - mg.SerialDeps(devtools.Package, pkg.PackageTest) -} - -// Update updates the generated files (aka make update). -func Update() error { - return sh.Run("make", "update") -} - -// Fields generates a fields.yml for the Beat. -func Fields() error { - return devtools.GenerateFieldsYAML() -} - -// Config generates both the short/reference/docker configs. -func Config() error { - return devtools.Config(devtools.AllConfigTypes, devtools.ConfigFileParams{}, ".") -} - -// Clean cleans all generated files and build artifacts. -func Clean() error { - return devtools.Clean() -} - -// Check formats code, updates generated content, check for common errors, and -// checks for any modified files. -func Check() { - common.Check() -} - -// Fmt formats source code (.go and .py) and adds license headers. -func Fmt() { - common.Fmt() -} - -// Test runs all available tests -func Test() { - mg.Deps(unittest.GoUnitTest) -} - -// Build builds the Beat binary. -func Build() error { - return build.Build() -} - -// CrossBuild cross-builds the beat for all target platforms. -func CrossBuild() error { - return build.CrossBuild() -} - -// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon). -func BuildGoDaemon() error { - return build.BuildGoDaemon() -} - -// GolangCrossBuild build the Beat binary inside of the golang-builder. -// Do not use directly, use crossBuild instead. -func GolangCrossBuild() error { - return build.GolangCrossBuild() -} diff --git a/generator/common/beatgen/beatgen.go b/generator/common/beatgen/beatgen.go index 62e7c36427d4..cd1d1900e883 100644 --- a/generator/common/beatgen/beatgen.go +++ b/generator/common/beatgen/beatgen.go @@ -29,8 +29,8 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/generator/common/beatgen/setup" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/generator/common/beatgen/setup" ) // ConfigItem represents a value that must be configured for the custom beat diff --git a/generator/common/beatgen/setup/creator.go b/generator/common/beatgen/setup/creator.go index 6685ed938e23..8656bf5a5f1f 100644 --- a/generator/common/beatgen/setup/creator.go +++ b/generator/common/beatgen/setup/creator.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // CfgPrefix specifies the env variable prefix used to configure the beat diff --git a/generator/common/beatgen/setup/setup.go b/generator/common/beatgen/setup/setup.go index 16987a2e55ad..b0bb5427e22d 100644 --- a/generator/common/beatgen/setup/setup.go +++ b/generator/common/beatgen/setup/setup.go @@ -25,7 +25,7 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // RunSetup runs any remaining setup commands after the vendor directory has been setup diff --git a/generator/metricbeat/Makefile b/generator/metricbeat/Makefile deleted file mode 100644 index c773d75926c1..000000000000 --- a/generator/metricbeat/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -BEAT_TYPE = metricbeat - -include ../common/Makefile - -# Collects all dependencies and then calls update -.PHONY: collect -collect: diff --git a/generator/metricbeat/{beat}/cmd/modules.go b/generator/metricbeat/{beat}/cmd/modules.go deleted file mode 100644 index 84809354f3ef..000000000000 --- a/generator/metricbeat/{beat}/cmd/modules.go +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 cmd - -import ( - "strings" - - "github.com/pkg/errors" - - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/cmd" -) - -// BuildModulesManager adds support for modules management to a beat -func BuildModulesManager(beat *beat.Beat) (cmd.ModulesManager, error) { - config := beat.BeatConfig - - glob, err := config.String("config.modules.path", -1) - if err != nil { - return nil, errors.Errorf("modules management requires '%s.config.modules.path' setting", Name) - } - - if !strings.HasSuffix(glob, "*.yml") { - return nil, errors.Errorf("wrong settings for config.modules.path, it is expected to end with *.yml. Got: %s", glob) - } - - modulesManager, err := cfgfile.NewGlobManager(glob, ".yml", ".disabled") - if err != nil { - return nil, errors.Wrap(err, "initialization error") - } - return modulesManager, nil -} diff --git a/generator/metricbeat/{beat}/cmd/root.go b/generator/metricbeat/{beat}/cmd/root.go deleted file mode 100644 index 94de89a11048..000000000000 --- a/generator/metricbeat/{beat}/cmd/root.go +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you 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 cmd - -import ( - cmd "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/metricbeat/beater" - "github.com/elastic/beats/metricbeat/cmd/test" - "github.com/elastic/beats/metricbeat/mb/module" -) - -// Name of this beat -var Name = "{beat}" - -// RootCmd to handle beats cli -var RootCmd *cmd.BeatsRootCmd - -var ( - // Use a customized instance of Metricbeat where startup delay has - // been disabled to workaround the fact that Modules() will return - // the static modules (not the dynamic ones) with a start delay. - testModulesCreator = beater.Creator( - beater.WithModuleOptions( - module.WithMetricSetInfo(), - module.WithMaxStartDelay(0), - ), - ) -) - -func init() { - RootCmd = cmd.GenRootCmdWithSettings(beater.DefaultCreator(), instance.Settings{Name: Name}) - RootCmd.AddCommand(cmd.GenModulesCmd(Name, "", BuildModulesManager)) - RootCmd.TestCmd.AddCommand(test.GenTestModulesCmd(Name, "", testModulesCreator)) -} diff --git a/generator/metricbeat/{beat}/magefile.go b/generator/metricbeat/{beat}/magefile.go deleted file mode 100644 index eada92dcd4cd..000000000000 --- a/generator/metricbeat/{beat}/magefile.go +++ /dev/null @@ -1,137 +0,0 @@ -// +build mage - -package main - -import ( - "fmt" - "time" - - "github.com/magefile/mage/mg" - - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/dev-tools/mage/target/build" - "github.com/elastic/beats/dev-tools/mage/target/collectors" - "github.com/elastic/beats/dev-tools/mage/target/common" - "github.com/elastic/beats/dev-tools/mage/target/pkg" - "github.com/elastic/beats/dev-tools/mage/target/unittest" - "github.com/elastic/beats/dev-tools/mage/target/update" - "github.com/elastic/beats/generator/common/beatgen" - metricbeat "github.com/elastic/beats/metricbeat/scripts/mage" -) - -func init() { - devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources) - - devtools.BeatDescription = "One sentence description of the Beat." - devtools.BeatVendor = "{full_name}" -} - -// VendorUpdate updates elastic/beats in the vendor dir -func VendorUpdate() error { - return beatgen.VendorUpdate() -} - -// CollectAll generates the docs and the fields. -func CollectAll() { - mg.Deps(collectors.CollectDocs, FieldsDocs) -} - -// Package packages the Beat for distribution. -// Use SNAPSHOT=true to build snapshots. -// Use PLATFORMS to control the target platforms. -func Package() { - start := time.Now() - defer func() { fmt.Println("package ran for", time.Since(start)) }() - - devtools.UseCommunityBeatPackaging() - - mg.Deps(update.Update) - mg.Deps(build.CrossBuild, build.CrossBuildGoDaemon) - mg.SerialDeps(devtools.Package, pkg.PackageTest) -} - -// FieldsDocs generates docs/fields.asciidoc containing all fields -// (including x-pack). -func FieldsDocs() error { - inputs := []string{ - devtools.OSSBeatDir("module"), - } - output := devtools.CreateDir("build/fields/fields.all.yml") - if err := devtools.GenerateFieldsYAMLTo(output, inputs...); err != nil { - return err - } - return devtools.Docs.FieldDocs(output) -} - -// Fields generates a fields.yml for the Beat. -func Fields() error { - return devtools.GenerateFieldsYAML("module") -} - -// Config generates both the short/reference/docker configs. -func Config() { - mg.Deps(configYML, metricbeat.GenerateDirModulesD) -} - -func configYML() error { - customDeps := devtools.ConfigFileParams{ - ShortParts: []string{"_meta/short.yml", devtools.LibbeatDir("_meta/config.yml.tmpl")}, - ReferenceParts: []string{"_meta/reference.yml", devtools.LibbeatDir("_meta/config.reference.yml.tmpl")}, - DockerParts: []string{"_meta/docker.yml", devtools.LibbeatDir("_meta/config.docker.yml")}, - ExtraVars: map[string]interface{}{"BeatName": devtools.BeatName}, - } - return devtools.Config(devtools.AllConfigTypes, customDeps, ".") -} - -// Clean cleans all generated files and build artifacts. -func Clean() error { - return devtools.Clean() -} - -// Check formats code, updates generated content, check for common errors, and -// checks for any modified files. -func Check() { - common.Check() -} - -// Fmt formats source code (.go and .py) and adds license headers. -func Fmt() { - common.Fmt() -} - -// Update updates the generated files (aka make update). -func Update() error { - return update.Update() -} - -// Imports generates an include/list.go file containing -// a import statement for each module and dataset. -func Imports() error { - return devtools.GenerateModuleIncludeListGo() -} - -// Test runs all available tests -func Test() { - mg.Deps(unittest.GoUnitTest) -} - -// Build builds the Beat binary. -func Build() error { - return build.Build() -} - -// CrossBuild cross-builds the beat for all target platforms. -func CrossBuild() error { - return build.CrossBuild() -} - -// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon). -func BuildGoDaemon() error { - return build.BuildGoDaemon() -} - -// GolangCrossBuild build the Beat binary inside of the golang-builder. -// Do not use directly, use crossBuild instead. -func GolangCrossBuild() error { - return build.GolangCrossBuild() -} diff --git a/go.mod b/go.mod new file mode 100644 index 000000000000..de1bb8b07f95 --- /dev/null +++ b/go.mod @@ -0,0 +1,174 @@ +module github.com/elastic/beats/v7 + +go 1.13 + +require ( + 4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b + cloud.google.com/go v0.51.0 + cloud.google.com/go/pubsub v1.0.1 + cloud.google.com/go/storage v1.0.0 + code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee // indirect + code.cloudfoundry.org/go-loggregator v7.4.0+incompatible + code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a // indirect + github.com/Azure/azure-event-hubs-go/v3 v3.1.0 + github.com/Azure/azure-sdk-for-go v37.1.0+incompatible + github.com/Azure/azure-storage-blob-go v0.8.0 + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect + github.com/Azure/go-autorest/autorest v0.9.4 + github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 + github.com/Azure/go-autorest/autorest/date v0.2.0 + github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 + github.com/Shopify/sarama v0.0.0-00010101000000-000000000000 + github.com/StackExchange/wmi v0.0.0-20170221213301-9f32b5905fd6 + github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc + github.com/akavel/rsrc v0.8.0 // indirect + github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 + github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 + github.com/aws/aws-lambda-go v1.6.0 + github.com/aws/aws-sdk-go-v2 v0.9.0 + github.com/awslabs/goformation/v4 v4.1.0 + github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 + github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible + github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e // indirect + github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e + github.com/cespare/xxhash/v2 v2.1.1 + github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f + github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 + github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c + github.com/coreos/bbolt v1.3.1-coreos.6.0.20180318001526-af9db2027c98 + github.com/coreos/go-systemd/v22 v22.0.0 + github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea + github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 // indirect + github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f + github.com/devigned/tab v0.1.2-0.20190607222403-0c15cf42f9a2 // indirect + github.com/dgrijalva/jwt-go v3.2.1-0.20190620180102-5e25c22bd5d6+incompatible // indirect + github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1 + github.com/dlclark/regexp2 v1.1.7-0.20171009020623-7632a260cbaf // indirect + github.com/docker/docker v1.4.2-0.20170802015333-8af4db6f002a + github.com/docker/go-connections v0.4.0 + github.com/docker/go-metrics v0.0.1 // indirect + github.com/docker/go-plugins-helpers v0.0.0-20181025120712-1e6269c305b8 + github.com/docker/go-units v0.4.0 + github.com/dop251/goja v0.0.0-00010101000000-000000000000 + github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6 + github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 + github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2 + github.com/elastic/ecs v1.4.0 + github.com/elastic/go-libaudit v0.4.0 + github.com/elastic/go-licenser v0.2.1 + github.com/elastic/go-lookslike v0.3.0 + github.com/elastic/go-lumber v0.1.0 + github.com/elastic/go-perf v0.0.0-20191212140718-9c656876f595 + github.com/elastic/go-seccomp-bpf v1.1.0 + github.com/elastic/go-structform v0.0.6 + github.com/elastic/go-sysinfo v1.3.0 + github.com/elastic/go-txfile v0.0.7 + github.com/elastic/go-ucfg v0.8.3 + github.com/elastic/go-windows v1.0.1 // indirect + github.com/elastic/gosigar v0.10.5 + github.com/fatih/color v1.5.0 + github.com/fsnotify/fsevents v0.0.0-00010101000000-000000000000 + github.com/fsnotify/fsnotify v1.4.7 + github.com/garyburd/redigo v1.0.1-0.20160525165706-b8dc90050f24 + github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647 // indirect + github.com/go-sourcemap/sourcemap v2.1.2+incompatible // indirect + github.com/go-sql-driver/mysql v1.4.1 + github.com/gocarina/gocsv v0.0.0-20170324095351-ffef3ffc77be + github.com/godror/godror v0.10.4 + github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b + github.com/gofrs/uuid v3.2.0+incompatible + github.com/gogo/protobuf v1.3.1 + github.com/golang/protobuf v1.3.2 + github.com/golang/snappy v0.0.1 + github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9 + github.com/google/gopacket v1.1.18-0.20191009163724-0ad7f2610e34 + github.com/google/uuid v1.1.2-0.20190416172445-c2e93f3ae59f // indirect + github.com/googleapis/gnostic v0.3.1-0.20190624222214-25d8b0b66985 // indirect + github.com/gorhill/cronexpr v0.0.0-20161205141322-d520615e531a + github.com/gorilla/mux v1.7.2 // indirect + github.com/gorilla/websocket v1.4.1 // indirect + github.com/hashicorp/golang-lru v0.5.2-0.20190520140433-59383c442f7d // indirect + github.com/insomniacslk/dhcp v0.0.0-20180716145214-633285ba52b2 + github.com/jcmturner/gofork v1.0.0 // indirect + github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5 + github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 + github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd + github.com/jpillora/backoff v1.0.0 // indirect + github.com/jstemmer/go-junit-report v0.9.1 + github.com/klauspost/compress v1.9.3-0.20191122130757-c099ac9f21dd // indirect + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01 + github.com/magefile/mage v1.9.0 + github.com/mailru/easyjson v0.7.1 // indirect + github.com/mattn/go-colorable v0.0.8 + github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe // indirect + github.com/mattn/go-isatty v0.0.2 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/miekg/dns v1.1.15 + github.com/mitchellh/gox v1.0.1 + github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51 + github.com/mitchellh/mapstructure v1.1.2 + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0-rc1.0.20190228220655-ac19fd6e7483 // indirect + github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 // indirect + github.com/pierrre/gotestcover v0.0.0-20160113212533-7b94f124d338 + github.com/pkg/errors v0.9.1 + github.com/pmezard/go-difflib v1.0.0 + github.com/prometheus/client_golang v1.1.1-0.20190913103102-20428fa0bffc // indirect + github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 + github.com/prometheus/common v0.7.0 + github.com/prometheus/procfs v0.0.9-0.20191208103036-42f6e295b56f + github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a + github.com/reviewdog/reviewdog v0.9.17 + github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e // indirect + github.com/samuel/go-thrift v0.0.0-20140522043831-2187045faa54 + github.com/sanathkr/yaml v1.0.1-0.20170819201035-0056894fa522 // indirect + github.com/shirou/gopsutil v2.19.11+incompatible + github.com/spf13/cobra v0.0.3 + github.com/spf13/pflag v1.0.3 + github.com/stretchr/objx v0.1.2-0.20180702103455-b8b73a35e983 // indirect + github.com/stretchr/testify v1.4.0 + github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b + github.com/tsg/gopacket v0.0.0-20190320122513-dd3d0e41124a + github.com/urso/magetools v0.0.0-20200106130147-61080ed7b22b // indirect + github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41 + github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c + github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7 // indirect + go.uber.org/atomic v1.3.1 + go.uber.org/multierr v1.1.1-0.20170829224307-fb7d312c2c04 + go.uber.org/zap v1.7.1 + golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 + golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f + golang.org/x/net v0.0.0-20200202094626-16171245cfb2 + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e + golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c + golang.org/x/text v0.3.2 + golang.org/x/time v0.0.0-20191024005414-555d28b269f0 + golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4 + google.golang.org/api v0.15.0 + google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb + gopkg.in/inf.v0 v0.9.0 + gopkg.in/jcmturner/gokrb5.v7 v7.3.0 // indirect + gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528 + gopkg.in/yaml.v2 v2.2.7 + howett.net/plist v0.0.0-20181124034731-591f970eefbb + k8s.io/api v0.0.0-20190722141453-b90922c02518 + k8s.io/apimachinery v0.0.0-20190719140911-bfcf53abc9f8 + k8s.io/client-go v0.0.0-20190620085101-78d2af792bab + k8s.io/klog v0.3.4-0.20190719014911-6a023d6d0e09 // indirect + k8s.io/utils v0.0.0-20190712204705-3dccf664f023 // indirect + sigs.k8s.io/yaml v1.1.1-0.20190704183835-4cd0c284b15f // indirect +) + +replace ( + github.com/Azure/go-autorest => github.com/Azure/go-autorest v12.2.0+incompatible + github.com/Shopify/sarama => github.com/elastic/sarama v0.0.0-20191122160421-355d120d0970 + github.com/docker/docker => github.com/docker/engine v0.0.0-20191113042239-ea84732a7725 + github.com/docker/go-plugins-helpers => github.com/elastic/go-plugins-helpers v0.0.0-20200207104224-bdf17607b79f + github.com/dop251/goja => github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20 + github.com/fsnotify/fsevents => github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270 + github.com/fsnotify/fsnotify => github.com/adriansr/fsnotify v0.0.0-20180417234312-c9bbe1f46f1d + github.com/insomniacslk/dhcp => github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3 // indirect + github.com/tonistiigi/fifo => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000000..d95286d6c56a --- /dev/null +++ b/go.sum @@ -0,0 +1,880 @@ +4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f h1:oyYjGRBNq1TxAIG8aHqtxlvqUfzdZf+MbcRb/oweNfY= +4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE= +4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b h1:+TO4EgK74+Qo/ilRDiF2WpY09Jk9VSJSLe3wEn+dJBw= +4d63.com/tz v1.1.1-0.20191124060701-6d37baae851b/go.mod h1:SHGqVdL7hd2ZaX2T9uEiOZ/OFAUfCCLURdLPJsd8ZNs= +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +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/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee h1:iAAPf9s7/+BIiGf+RjgcXLm3NoZaLIJsBXJuUa63Lx8= +code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee/go.mod h1:Jzi+ccHgo/V/PLQUaQ6hnZcC1c4BS790gx21LRRui4g= +code.cloudfoundry.org/go-loggregator v7.4.0+incompatible h1:KqZYloMQWM5Zg/BQKunOIA4OODh7djZbk48qqbowNFI= +code.cloudfoundry.org/go-loggregator v7.4.0+incompatible/go.mod h1:KPBTRqj+y738Nhf1+g4JHFaBU8j7dedirR5ETNHvMXU= +code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= +code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= +code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= +code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-amqp-common-go/v3 v3.0.0 h1:j9tjcwhypb/jek3raNrwlCIl7iKQYOug7CLpSyBBodc= +github.com/Azure/azure-amqp-common-go/v3 v3.0.0/go.mod h1:SY08giD/XbhTz07tJdpw1SoxQXHPN30+DI3Z04SYqyg= +github.com/Azure/azure-event-hubs-go/v3 v3.1.0 h1:j+/WXzke3PTRu5gAgSpWgWJVfpwIyaedIqqgdgkjAe0= +github.com/Azure/azure-event-hubs-go/v3 v3.1.0/go.mod h1:hR40byNJjKkS74+3RhloPQ8sJ8zFQeJ920Uk3oYY0+k= +github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= +github.com/Azure/azure-pipeline-go v0.1.9/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= +github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-sdk-for-go v37.1.0+incompatible h1:aFlw3lP7ZHQi4m1kWCpcwYtczhDkGhDoRaMTaxcOf68= +github.com/Azure/azure-sdk-for-go v37.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= +github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= +github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= +github.com/Azure/go-amqp v0.12.6 h1:34yItuwhA/nusvq2sPSNPQxZLCf/CtaogYH8n578mnY= +github.com/Azure/go-amqp v0.12.6/go.mod h1:qApuH6OFTSKZFmCOxccvAv5rLizBQf4v8pRmG138DPo= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v12.2.0+incompatible h1:2Fxszbg492oAJrcvJlgyVaTqnQYRkxmEK6VPCLLVpBI= +github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6yDJ+PSwsgi4= +github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= +github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4= +github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20170221213301-9f32b5905fd6 h1:2Gl9Tray0NEjP9KC0FjdGWlszbmTIsBP3JYzgyFdL4E= +github.com/StackExchange/wmi v0.0.0-20170221213301-9f32b5905fd6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/adriansr/fsnotify v0.0.0-20180417234312-c9bbe1f46f1d h1:g0M6kedfjDpyAAuxqBvJzMNjFzlrQ7Av6LCDFqWierk= +github.com/adriansr/fsnotify v0.0.0-20180417234312-c9bbe1f46f1d/go.mod h1:VykaKG/ofkKje+MSvqjrDsz1wfyHIvEVFljhq2EOZ4g= +github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc h1:9iW/Fbn/R/nyUOiqo6AgwBe8uirqUIoTGF3vKG8qjoc= +github.com/aerospike/aerospike-client-go v1.27.1-0.20170612174108-0f3b54da6bdc/go.mod h1:zj8LBEnWBDOVEIJt8LvaRvDG5ARAoa5dBeHaB472NRc= +github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw= +github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20 h1:7rj9qZ63knnVo2ZeepYHvHuRdG76f3tRUTdIQDzRBeI= +github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20/go.mod h1:cI59GRkC2FRaFYtgbYEqMlgnnfvAwXzjojyZKXwklNg= +github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 h1:WFwa9pqou0Nb4DdfBOyaBTH0GqLE74Qwdf61E7ITHwQ= +github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43/go.mod h1:tJPYQG4mnMeUtQvQKNkbsFrnmZOg59Qnf8CcctFv5v4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/aws/aws-lambda-go v1.6.0 h1:T+u/g79zPKw1oJM7xYhvpq7i4Sjc0iVsXZUaqRVVSOg= +github.com/aws/aws-lambda-go v1.6.0/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A= +github.com/aws/aws-sdk-go-v2 v0.9.0 h1:dWtJKGRFv3UZkMBQaIzMsF0/y4ge3iQPWTzeC4r/vl4= +github.com/aws/aws-sdk-go-v2 v0.9.0/go.mod h1:sa1GePZ/LfBGI4dSq30f6uR4Tthll8axxtEPvlpXZ8U= +github.com/awslabs/goformation/v3 v3.1.0/go.mod h1:hQ5RXo3GNm2laHWKizDzU5DsDy+yNcenSca2UxN0850= +github.com/awslabs/goformation/v4 v4.1.0 h1:JRxIW0IjhYpYDrIZOTJGMu2azXKI+OK5dP56ubpywGU= +github.com/awslabs/goformation/v4 v4.1.0/go.mod h1:MBDN7u1lMNDoehbFuO4uPvgwPeolTMA2TzX1yO6KlxI= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 h1:oMCHnXa6CCCafdPDbMh/lWRhRByN0VFLvv+g+ayx1SI= +github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bradleyfalzon/ghinstallation v1.1.0 h1:mwazVinJU0mPyLxIcdtJzu4DhWXFO5lMsWhKyFRIwFk= +github.com/bradleyfalzon/ghinstallation v1.1.0/go.mod h1:p7iD8KytOOKg2wCqbwvJlq4JGpYMjwjkiqdyUqOIHLI= +github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible h1:4g18+HnTDwEtO0n7K8B1Kjq+04MEKJRkhJNQ/hb9d5A= +github.com/bsm/sarama-cluster v2.1.14-0.20180625083203-7e67d87a6b3f+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= +github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e h1:YYUjy5BRwO5zPtfk+aa2gw255FIIoi93zMmuy19o0bc= +github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e/go.mod h1:V284PjgVwSk4ETmz84rpu9ehpGg7swlIH8npP9k2bGw= +github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e h1:Gbx+iVCXG/1m5WSnidDGuHgN+vbIwl+6fR092ANU+Y8= +github.com/cavaliercoder/go-rpm v0.0.0-20190131055624-7a9c54e3d83e/go.mod h1:AZIh1CCnMrcVm6afFf96PBvE2MRpWFco91z8ObJtgDY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f h1:fK3ikA1s77arBhpDwFuyO0hUZ2Aa8O6o2Uzy8Q6iLbs= +github.com/cloudfoundry-community/go-cfclient v0.0.0-20190808214049-35bcce23fc5f/go.mod h1:RtIewdO+K/czvxvIFCMbPyx7jdxSLL1RZ+DA/Vk8Lwg= +github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 h1:cWfya7mo/zbnwYVio6eWGsFJHqYw4/k/uhwIJ1eqRPI= +github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.3 h1:LoIzb5y9x5l8VKAlyrbusNPXqBY0+kviRloxFUMFwKc= +github.com/containerd/containerd v1.3.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 h1:kIFnQBO7rQ0XkMe6xEwbybYHBEaWmh/f++laI6Emt7M= +github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk= +github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/coreos/bbolt v1.3.1-coreos.6.0.20180318001526-af9db2027c98 h1:oWP4KxUD7aOeKajtnU4/gqkJOTze6zHP6z/aTmI94/4= +github.com/coreos/bbolt v1.3.1-coreos.6.0.20180318001526-af9db2027c98/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 h1:qg9VbHo1TlL0KDM0vYvBG9EY0X0Yku5WYIPoFWt8f6o= +github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE= +github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f h1:WH0w/R4Yoey+04HhFxqZ6VX6I0d7RMyw5aXQ9UTvQPs= +github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= +github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= +github.com/devigned/tab v0.1.2-0.20190607222403-0c15cf42f9a2 h1:6+hM8KeYKV0Z9EIINNqIEDyyIRAcNc2FW+/TUYNmWyw= +github.com/devigned/tab v0.1.2-0.20190607222403-0c15cf42f9a2/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= +github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.1-0.20190620180102-5e25c22bd5d6+incompatible h1:4jGdduO4ceTJFKf0IhgaB8NJapGqKHwC2b4xQ/cXujM= +github.com/dgrijalva/jwt-go v3.2.1-0.20190620180102-5e25c22bd5d6+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1 h1:eG5K5GNAAHvQlFmfIuy0Ocjg5dvyX22g/KknwTpmBko= +github.com/digitalocean/go-libvirt v0.0.0-20180301200012-6075ea3c39a1/go.mod h1:PRcPVAAma6zcLpFd4GZrjR/MRpood3TamjKI2m/z/Uw= +github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dlclark/regexp2 v1.1.7-0.20171009020623-7632a260cbaf h1:uOWCk+L8abzw0BzmnCn7j7VT3g6bv9zW8fkR0yOP0Q4= +github.com/dlclark/regexp2 v1.1.7-0.20171009020623-7632a260cbaf/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/engine v0.0.0-20191113042239-ea84732a7725 h1:j0zqmciWFnhB01BT/CyfoXNEONoxerGjkcxM8i6tlXI= +github.com/docker/engine v0.0.0-20191113042239-ea84732a7725/go.mod h1:3CPr2caMgTHxxIAZgEMd3uLYPDlRvPqCpyeRf6ncPcY= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6 h1:RrkoB0pT3gnjXhL/t10BSP1mcr/0Ldea2uMyuBr2SWk= +github.com/dop251/goja_nodejs v0.0.0-20171011081505-adff31b136e6/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2 h1:DW6WrARxK5J+o8uAKCiACi5wy9EK1UzrsCpGBPsKHAA= +github.com/eclipse/paho.mqtt.golang v1.2.1-0.20200121105743-0d940dd29fd2/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3 h1:lnDkqiRFKm0rxdljqrj3lotWinO9+jFmeDXIC4gvIQs= +github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3/go.mod h1:aPqzac6AYkipvp4hufTyMj5PDIphF3+At8zr7r51xjY= +github.com/elastic/ecs v1.4.0 h1:BGIUwWJhThRO2IQxzm7ekV9TMUGwZoYyevT5/1xmMf0= +github.com/elastic/ecs v1.4.0/go.mod h1:pgiLbQsijLOJvFR8OTILLu0Ni/R/foUNg0L+T6mU9b4= +github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270 h1:cWPqxlPtir4RoQVCpGSRXmLqjEHpJKbR60rxh1nQZY4= +github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270/go.mod h1:Msl1pdboCbArMF/nSCDUXgQuWTeoMmE/z8607X+k7ng= +github.com/elastic/go-libaudit v0.4.0 h1:pxLCycMJKW91W8ZmZT74DQmryTZuXryKESo6sXdu1XY= +github.com/elastic/go-libaudit v0.4.0/go.mod h1:lNJ7gX+arohEQTwqinAc8xycVuFNqsaunba1mwcBdvE= +github.com/elastic/go-licenser v0.2.1 h1:K76YI6XR2LRpewLGwhrTqasXZcNJG2yHY4/jit/IXGY= +github.com/elastic/go-licenser v0.2.1/go.mod h1:D8eNQk70FOCVBl3smCGQt/lv7meBeQno2eI1S5apiHQ= +github.com/elastic/go-lookslike v0.3.0 h1:HDI/DQ65V85ZqM7D/sbxcK2wFFnh3+7iFvBk2v2FTHs= +github.com/elastic/go-lookslike v0.3.0/go.mod h1:AhH+rdJux5RlVjs+6ej4jkvYyoNRkj2crxmqeHlj3hA= +github.com/elastic/go-lumber v0.1.0 h1:HUjpyg36v2HoKtXlEC53EJ3zDFiDRn65d7B8dBHNius= +github.com/elastic/go-lumber v0.1.0/go.mod h1:8YvjMIRYypWuPvpxx7WoijBYdbB7XIh/9FqSYQZTtxQ= +github.com/elastic/go-perf v0.0.0-20191212140718-9c656876f595 h1:q8n4QjcLa4q39Q3fqHRknTBXBtegjriHFrB42YKgXGI= +github.com/elastic/go-perf v0.0.0-20191212140718-9c656876f595/go.mod h1:s09U1b4P1ZxnKx2OsqY7KlHdCesqZWIhyq0Gs/QC/Us= +github.com/elastic/go-plugins-helpers v0.0.0-20200207104224-bdf17607b79f h1:FvsqAVIFZtJtK+koSvFU+/KoNQo1m14kgV5qJ8ImN+U= +github.com/elastic/go-plugins-helpers v0.0.0-20200207104224-bdf17607b79f/go.mod h1:OPGqFNdTS34kMReS5hPFtBhD9J8itmSDurs1ix2wx7c= +github.com/elastic/go-seccomp-bpf v1.1.0 h1:jUzzDc6LyCtdolZdvL/26dad6rZ9vsc7xZ2eadKECAU= +github.com/elastic/go-seccomp-bpf v1.1.0/go.mod h1:l+89Vy5BzjVcaX8USZRMOwmwwDScE+vxCFzzvQwN7T8= +github.com/elastic/go-structform v0.0.6 h1:wqeK4LwD2NNDOoRGTImE24S6pkCDVr8+oUSIkmChzLk= +github.com/elastic/go-structform v0.0.6/go.mod h1:QrMyP3oM9Sjk92EVGLgRaL2lKt0Qx7ZNDRWDxB6khVs= +github.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE= +github.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-txfile v0.0.7 h1:Yn28gclW7X0Qy09nSMSsx0uOAvAGMsp6XHydbiLVe2s= +github.com/elastic/go-txfile v0.0.7/go.mod h1:H0nCoFae0a4ga57apgxFsgmRjevNCsEaT6g56JoeKAE= +github.com/elastic/go-ucfg v0.7.0 h1:1+C/sZdJKww8hKl7XtLPTjs4cFslhQF2fazKTF+ZE+4= +github.com/elastic/go-ucfg v0.7.0/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+FX0JKxzo= +github.com/elastic/go-ucfg v0.8.3 h1:leywnFjzr2QneZZWhE6uWd+QN/UpP0sdJRHYyuFvkeo= +github.com/elastic/go-ucfg v0.8.3/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+FX0JKxzo= +github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= +github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= +github.com/elastic/gosigar v0.10.5 h1:GzPQ+78RaAb4J63unidA/JavQRKrB6s8IOzN6Ib59jo= +github.com/elastic/gosigar v0.10.5/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= +github.com/elastic/sarama v0.0.0-20191122160421-355d120d0970 h1:rSo6gsz4zOanqtJ5fmZYQJvEJnA5YsVOB25casIwqUw= +github.com/elastic/sarama v0.0.0-20191122160421-355d120d0970/go.mod h1:fGP8eQ6PugKEI0iUETYYtnP6d1pH/bdDMTel1X5ajsU= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.5.0 h1:vBh+kQp8lg9XPr56u1CPrWjFXtdphMoGWVHr9/1c+A0= +github.com/fatih/color v1.5.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/frankban/quicktest v1.4.1 h1:Wv2VwvNn73pAdFIVUQRXYDFp31lXKbqblIXo/Q5GPSg= +github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= +github.com/garyburd/redigo v1.0.1-0.20160525165706-b8dc90050f24 h1:nREVDi4H8mwnNqfxFU9NMzZrDCg8TXbEatMvHozxKwU= +github.com/garyburd/redigo v1.0.1-0.20160525165706-b8dc90050f24/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647 h1:whypLownH338a3Ork2w9t0KUKtVxbXYySuz7V1YGsJo= +github.com/go-ole/go-ole v1.2.5-0.20190920104607-14974a1cf647/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= +github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gocarina/gocsv v0.0.0-20170324095351-ffef3ffc77be h1:zXHeEEJ231bTf/IXqvCfeaqjLpXsq42ybLoT4ROSR6Y= +github.com/gocarina/gocsv v0.0.0-20170324095351-ffef3ffc77be/go.mod h1:/oj50ZdPq/cUjA02lMZhijk5kR31SEydKyqah1OgBuo= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godror/godror v0.10.4 h1:44FcfzDPp/PJZzen5Hm59SZQBhgrbR6E1KwCjg6gnJo= +github.com/godror/godror v0.10.4/go.mod h1:9MVLtu25FBJBMHkPs0m3Ngf/VmwGcLpM2HS8PlNGw9U= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b h1:3QNh5Xo2pmr2nZXENtnztfpjej8XY8EPmvYxF5SzY9M= +github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +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/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9 h1:b4EyQBj8pgtcWOr7YCSxK6NUQzJr0n4hxJ3mc+dtKk4= +github.com/google/flatbuffers v1.7.2-0.20170925184458-7a6b2bf521e9/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= +github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= +github.com/google/go-github/v29 v29.0.2 h1:opYN6Wc7DOz7Ku3Oh4l7prmkOMwEcQxpFtxdU8N8Pts= +github.com/google/go-github/v29 v29.0.2/go.mod h1:CHKiKKPHJ0REzfwc14QMklvtHwCveD0PxlMjLlzAM5E= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gopacket v1.1.18-0.20191009163724-0ad7f2610e34 h1:/wV+gZsAEt7vP+fJkT1AltOejfLS3uonB4RTOdXWjVk= +github.com/google/gopacket v1.1.18-0.20191009163724-0ad7f2610e34/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +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/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2-0.20190416172445-c2e93f3ae59f h1:XXzyYlFbxK3kWfcmu3Wc+Tv8/QQl/VqwsWuSYF1Rj0s= +github.com/google/uuid v1.1.2-0.20190416172445-c2e93f3ae59f/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1-0.20190624222214-25d8b0b66985 h1:bCrkbuMwrQnnTsa9Y0giRda4P3fvay8f98tvYmZXVhg= +github.com/googleapis/gnostic v0.3.1-0.20190624222214-25d8b0b66985/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorhill/cronexpr v0.0.0-20161205141322-d520615e531a h1:yNuTIQkXLNAevCwQJ7ur3ZPoZPhbvAi6QXhJ/ylX6+8= +github.com/gorhill/cronexpr v0.0.0-20161205141322-d520615e531a/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= +github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.0.0 h1:21MVWPKDphxa7ineQQTrCU5brh7OuVVAzGOCnnCPtE8= +github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.2-0.20190520140433-59383c442f7d h1:Ft6PtvobE9vwkCsuoNO5DZDbhKkKuktAlSsiOi1X5NA= +github.com/hashicorp/golang-lru v0.5.2-0.20190520140433-59383c442f7d/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/haya14busa/go-actions-toolkit v0.0.0-20200105081403-ca0307860f01 h1:HiJF8Mek+I7PY0Bm+SuhkwaAZSZP83sw6rrTMrgZ0io= +github.com/haya14busa/go-actions-toolkit v0.0.0-20200105081403-ca0307860f01/go.mod h1:1DWDZmeYf0LX30zscWb7K9rUMeirNeBMd5Dum+seUhc= +github.com/haya14busa/go-checkstyle v0.0.0-20170303121022-5e9d09f51fa1/go.mod h1:RsN5RGgVYeXpcXNtWyztD5VIe7VNSEqpJvF2iEH7QvI= +github.com/haya14busa/secretbox v0.0.0-20180525171038-07c7ecf409f5/go.mod h1:FGO/dXIFZnan7KvvUSFk1hYMnoVNzB6NTMPrmke8SSI= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5 h1:lrdPtrORjGv1HbbEvKWDUAy97mPpFm4B8hp77tcCUJY= +github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd h1:KikNiFwUO3QLyeKyN4k9yBH9Pcu/gU/yficWi61cJIw= +github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE= +github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/justinas/nosurf v1.1.0/go.mod h1:ALpWdSbuNGy2lZWtyXdjkYv4edL23oSEgfBT1gPJ5BQ= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.3-0.20191122130757-c099ac9f21dd h1:eTGTdO1ZbZ0HSC6TxDLtBl7W0fgFpGlbdPBK+IF0I0g= +github.com/klauspost/compress v1.9.3-0.20191122130757-c099ac9f21dd/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01 h1:EPw7R3OAyxHBCyl0oqh3lUZqS5lu3KSxzzGasE0opXQ= +github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/magefile/mage v1.9.0 h1:t3AU2wNwehMCW97vuqQLtw6puppWXHO+O2MHo5a50XE= +github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a h1:TpvdAwDAt1K4ANVOfcihouRdvP+MgAfDWwBuct4l6ZY= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11 h1:YFh+sjyJTMQSYjKwM4dFKhJPJC/wfo98tPUc17HdoYw= +github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11/go.mod h1:Ah2dBMoxZEqk118as2T4u4fjfXarE0pPnMJaArZQZsI= +github.com/mattn/go-colorable v0.0.8 h1:KatiXbcoFpoKmM5pL0yhug+tx/POfZO+0aVsuGhUhgo= +github.com/mattn/go-colorable v0.0.8/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe h1:YioO2TiJyAHWHyCRQCP8jk5IzTqmsbGc5qQPIhHo6xs= +github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= +github.com/mattn/go-isatty v0.0.2 h1:F+DnWktyadxnOrohKLNUC9/GjFii5RJgY4GFG6ilggw= +github.com/mattn/go-isatty v0.0.2/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-shellwords v1.0.7 h1:KqhVjVZomx2puPACkj9vrGFqnp42Htvo9SEAWePHKOs= +github.com/mattn/go-shellwords v1.0.7/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.1.15 h1:CSSIDtllwGLMoA6zjdKnaE6Tx6eVUxQ29LUgGetiDCI= +github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI= +github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4= +github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51 h1:qdHlMllk/PTLUrX3XdtXDrLL1lPSfcqUmJD1eYfbapg= +github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.5.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.2.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20190228220655-ac19fd6e7483 h1:eFd3FsB01m/zNg/yBMYdm/XqiqCztcN9SVRPtGtzDHo= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20190228220655-ac19fd6e7483/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 h1:yN8BPXVwMBAm3Cuvh1L5XE8XpvYRMdsVLd82ILprhUU= +github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU4LguQVtc= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso= +github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v2.2.6+incompatible h1:6aCX4/YZ9v8q69hTyiR7dNLnTA3fgtKHVVW5BCd5Znw= +github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrre/gotestcover v0.0.0-20160113212533-7b94f124d338 h1:/VAZ3an4jHXs+61iNHugNR1mG25MSpaxtMnwOJVEAQM= +github.com/pierrre/gotestcover v0.0.0-20160113212533-7b94f124d338/go.mod h1:4xpMLz7RBWyB+ElzHu8Llua96TRCB3YwX+l5EP1wmHk= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.1.1-0.20190913103102-20428fa0bffc h1:6B8wpniGN4FtqzqWhe2OBOGkeZFbhwZpCh+V/pv/oik= +github.com/prometheus/client_golang v1.1.1-0.20190913103102-20428fa0bffc/go.mod h1:ikMPikHu8SMvBGWoKulvvOOZN227amf2E9eMYqyAwAY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.9-0.20191208103036-42f6e295b56f h1:i2BUTcG1g7lSgF/xVL4BJBAdrtNp4zL8woVTGHpEG4g= +github.com/prometheus/procfs v0.0.9-0.20191208103036-42f6e295b56f/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/reviewdog/errorformat v0.0.0-20200109134752-8983be9bc7dd h1:fvaEkjpr2NJbtnFRCft7D6y/mQ5/2OQU0pKJLW8dwFA= +github.com/reviewdog/errorformat v0.0.0-20200109134752-8983be9bc7dd/go.mod h1:giYAXnpegRDPsXUO7TRpDKXJo1lFGYxyWRfEt5iQ+OA= +github.com/reviewdog/reviewdog v0.9.17 h1:MKb3rlQZgkEXr3d85iqtYNITXn7gDJr2kT0IhgX/X9A= +github.com/reviewdog/reviewdog v0.9.17/go.mod h1:Y0yPFDTi9L5ohkoecJdgbvAhq+dUXp+zI7atqVibwKg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e h1:hUGyBE/4CXRPThr4b6kt+f1CN90no4Fs5CNrYOKYSIg= +github.com/samuel/go-parser v0.0.0-20130731160455-ca8abbf65d0e/go.mod h1:Sb6li54lXV0yYEjI4wX8cucdQ9gqUJV3+Ngg3l9g30I= +github.com/samuel/go-thrift v0.0.0-20140522043831-2187045faa54 h1:jbchLJWyhKcmOjkbC4zDvT/n5EEd7g6hnnF760rEyRA= +github.com/samuel/go-thrift v0.0.0-20140522043831-2187045faa54/go.mod h1:Vrkh1pnjV9Bl8c3P9zH0/D4NlOHWP5d4/hF4YTULaec= +github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b h1:jUK33OXuZP/l6babJtnLo1qsGvq6G9so9KMflGAm4YA= +github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b/go.mod h1:8458kAagoME2+LN5//WxE71ysZ3B7r22fdgb7qVmXSY= +github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522/go.mod h1:tQTYKOQgxoH3v6dEmdHiz4JG+nbxWwM5fgPQUpSZqVQ= +github.com/sanathkr/yaml v1.0.1-0.20170819201035-0056894fa522 h1:39BJIaZIhIBmXATIhdlTBlTQpAiGXHnz17CrO7vF2Ss= +github.com/sanathkr/yaml v1.0.1-0.20170819201035-0056894fa522/go.mod h1:tQTYKOQgxoH3v6dEmdHiz4JG+nbxWwM5fgPQUpSZqVQ= +github.com/shirou/gopsutil v2.19.11+incompatible h1:lJHR0foqAjI4exXqWsU3DbH7bX1xvdhGdnXTIARA9W4= +github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.2-0.20180702103455-b8b73a35e983 h1:4s04gnPlcop3dmAHjOAHWa6gX7Dg7h0gh81gr3GwzIk= +github.com/stretchr/objx v0.1.2-0.20180702103455-b8b73a35e983/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b h1:X/8hkb4rQq3+QuOxpJK7gWmAXmZucF0EI1s1BfBLq6U= +github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b/go.mod h1:jAqhj/JBVC1PwcLTWd6rjQyGyItxxrhpiBl8LSuAGmw= +github.com/tsg/gopacket v0.0.0-20190320122513-dd3d0e41124a h1:vVmCas8T0lbxAI1GuQO45L0o/OrWJSXtiK6vH27Qspg= +github.com/tsg/gopacket v0.0.0-20190320122513-dd3d0e41124a/go.mod h1:RIkfovP3Y7my19aXEjjbNd9E5TlHozzAyt7B8AaEcwg= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urso/go-bin v0.0.0-20180220135811-781c575c9f0e h1:NiofbjIUI5gR+ybDsGSVH1fWyjSeDYiYVJHT1+kcsak= +github.com/urso/go-bin v0.0.0-20180220135811-781c575c9f0e/go.mod h1:6GfHrdWBQYjFRIznu7XuQH4lYB2w8nO4bnImVKkzPOM= +github.com/urso/magetools v0.0.0-20190919040553-290c89e0c230/go.mod h1:DFxTNgS/ExCGmmjVjSOgS2WjtfjKXgCyDzAFgbtovSA= +github.com/urso/magetools v0.0.0-20200106130147-61080ed7b22b h1:eRYRTx+2CteM4P2U+VgAeAmuMAyB/QAGxWtgH7/o4l8= +github.com/urso/magetools v0.0.0-20200106130147-61080ed7b22b/go.mod h1:DFxTNgS/ExCGmmjVjSOgS2WjtfjKXgCyDzAFgbtovSA= +github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4 h1:hhA8EBThzz9PztawVTycKvfETVuBqxAQ5keFlAVtbAw= +github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4/go.mod h1:RspW+E2Yb7Fs7HclB2tiDaiu6Rp41BiIG4Wo1YaoXGc= +github.com/vbatts/tar-split v0.11.1/go.mod h1:LEuURwDEiWjRjwu46yU3KVGuUdVv/dcnpcEPSzR8z6g= +github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41 h1:NeNpIvfvaFOh0BH7nMEljE5Rk/VJlxhm58M41SeOD20= +github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= +github.com/xanzy/go-gitlab v0.22.3 h1:/rNlZ2hquUWNc6rJdntVM03tEOoTmnZ1lcNyJCl0WlU= +github.com/xanzy/go-gitlab v0.22.3/go.mod h1:t4Bmvnxj7k37S4Y17lfLx+nLqkf/oQwT2HagfWKv5Og= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56 h1:yhqBHs09SmmUoNOHc9jgK4a60T3XFRtPAkYxVnqgY50= +github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7 h1:0gYLpmzecnaDCoeWxSfEJ7J1b6B/67+NV++4HKQXx+Y= +github.com/yuin/gopher-lua v0.0.0-20170403160031-b402f3114ec7/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.1 h1:U8WaWEmp56LGz7PReduqHRVF6zzs9GbMC2NEZ42dxSQ= +go.uber.org/atomic v1.3.1/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.1-0.20170829224307-fb7d312c2c04 h1:8sYuFs2lovgFwQi15/wIkCkGX9sL8RouzbWUmBjTcXk= +go.uber.org/multierr v1.1.1-0.20170829224307-fb7d312c2c04/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.7.1 h1:wKPciimwkIgV4Aag/wpSDzvtO5JrfwdHKHO7blTHx7Q= +go.uber.org/zap v1.7.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 h1:+ELyKg6m8UBf0nPFSqD0mi7zUfwPyXo23HNjMnXPz7w= +golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/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-20190206173232-65e2d4e15006/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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/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/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c h1:OYFUffxXPezb7BVTx9AaD4Vl0qtxmklBIkwCKH1YwDY= +golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +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-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4 h1:Toz2IK7k8rbltAXwNAxKcn9OzqyNfMUhUNjz3sL0NMk= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +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-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb h1:ADPHZzpzM4tk4V4S5cnCrr5SwzvlrPRmqqCuJDB8UTs= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o= +gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0 h1:0709Jtq/6QXEuWRfAm260XqlpcwL1vxtO1tUE2qK8Z4= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= +gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528 h1:/saqWwm73dLmuzbNhe92F0QsZ/KiFND+esHco2v1hiY= +gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +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/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= +k8s.io/api v0.0.0-20190722141453-b90922c02518 h1:mShu41WQl4VJGAd7fbhhH0tsy+KMjZRnC/OcFYF8RVc= +k8s.io/api v0.0.0-20190722141453-b90922c02518/go.mod h1:1O0xzX/RAtnm7l+5VEUxZ1ysO2ghatfq/OZED4zM9kA= +k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= +k8s.io/apimachinery v0.0.0-20190719140911-bfcf53abc9f8 h1:fVMoqaOPZ6KTeszBSBO8buFmXaR2JlnMn53eEBeganU= +k8s.io/apimachinery v0.0.0-20190719140911-bfcf53abc9f8/go.mod h1:sBJWIJZfxLhp7mRsRyuAE/NfKTr3kXGR1iaqg8O0gJo= +k8s.io/client-go v0.0.0-20190620085101-78d2af792bab h1:E8Fecph0qbNsAbijJJQryKu4Oi9QTp5cVpjTE+nqg6g= +k8s.io/client-go v0.0.0-20190620085101-78d2af792bab/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.4-0.20190719014911-6a023d6d0e09 h1:w2hB+DoJsxpuO4hxMXfs44k1riAXX5kaV40564cWMUc= +k8s.io/klog v0.3.4-0.20190719014911-6a023d6d0e09/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= +k8s.io/utils v0.0.0-20190712204705-3dccf664f023 h1:1H4Jyzb0z2X0GfBMTwRjnt5ejffRHrGftUgJcV/ZfDc= +k8s.io/utils v0.0.0-20190712204705-3dccf664f023/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.1.1-0.20190704183835-4cd0c284b15f h1:rBmJnclilUaQG3K5/iL9zD57jtKRimbK2bJQGqktcs8= +sigs.k8s.io/yaml v1.1.1-0.20190704183835-4cd0c284b15f/go.mod h1:JLeFbgenPHTQHNZeYbMLTT18IylpsFnR2+IHPl6wctA= diff --git a/heartbeat/autodiscover/builder/hints/monitors.go b/heartbeat/autodiscover/builder/hints/monitors.go index bb2a7d16ca70..ba89d81b4563 100644 --- a/heartbeat/autodiscover/builder/hints/monitors.go +++ b/heartbeat/autodiscover/builder/hints/monitors.go @@ -23,12 +23,12 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/heartbeat/autodiscover/builder/hints/monitors_test.go b/heartbeat/autodiscover/builder/hints/monitors_test.go index d3d37f990908..82c4dc6262c8 100644 --- a/heartbeat/autodiscover/builder/hints/monitors_test.go +++ b/heartbeat/autodiscover/builder/hints/monitors_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestGenerateHints(t *testing.T) { diff --git a/heartbeat/autodiscover/include.go b/heartbeat/autodiscover/include.go index cd4bf8bf0b62..2ae869729c49 100644 --- a/heartbeat/autodiscover/include.go +++ b/heartbeat/autodiscover/include.go @@ -19,5 +19,5 @@ package autodiscover import ( // include all heartbeat specific builders - _ "github.com/elastic/beats/heartbeat/autodiscover/builder/hints" + _ "github.com/elastic/beats/v7/heartbeat/autodiscover/builder/hints" ) diff --git a/heartbeat/beater/heartbeat.go b/heartbeat/beater/heartbeat.go index 66861a9d94ec..90eef546788f 100644 --- a/heartbeat/beater/heartbeat.go +++ b/heartbeat/beater/heartbeat.go @@ -21,20 +21,20 @@ import ( "fmt" "time" - "github.com/elastic/beats/heartbeat/hbregistry" + "github.com/elastic/beats/v7/heartbeat/hbregistry" "github.com/pkg/errors" - "github.com/elastic/beats/heartbeat/config" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/heartbeat/scheduler" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/management" + "github.com/elastic/beats/v7/heartbeat/config" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/scheduler" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/management" ) // Heartbeat represents the root datastructure of this beat. diff --git a/heartbeat/cmd/root.go b/heartbeat/cmd/root.go index 80435dbc4b99..858cc2c0daf6 100644 --- a/heartbeat/cmd/root.go +++ b/heartbeat/cmd/root.go @@ -20,14 +20,14 @@ package cmd import ( "fmt" - _ "github.com/elastic/beats/heartbeat/autodiscover" - "github.com/elastic/beats/heartbeat/beater" + _ "github.com/elastic/beats/v7/heartbeat/autodiscover" + "github.com/elastic/beats/v7/heartbeat/beater" // register default heartbeat monitors - _ "github.com/elastic/beats/heartbeat/monitors/defaults" - cmd "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/publisher/processing" + _ "github.com/elastic/beats/v7/heartbeat/monitors/defaults" + cmd "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/publisher/processing" ) // Name of this beat diff --git a/heartbeat/config/config.go b/heartbeat/config/config.go index fd23e1e6af78..5e676c191083 100644 --- a/heartbeat/config/config.go +++ b/heartbeat/config/config.go @@ -21,8 +21,8 @@ package config import ( - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/common" ) // Config defines the structure of heartbeat.yml. diff --git a/heartbeat/eventext/eventext.go b/heartbeat/eventext/eventext.go index 675fe191c910..122c8ae70e2c 100644 --- a/heartbeat/eventext/eventext.go +++ b/heartbeat/eventext/eventext.go @@ -18,8 +18,8 @@ package eventext import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // MergeEventFields merges the given common.MapStr into the given Event's Fields. diff --git a/heartbeat/hbregistry/hbregistry.go b/heartbeat/hbregistry/hbregistry.go index dfd4c799cabc..66b4ad2117c9 100644 --- a/heartbeat/hbregistry/hbregistry.go +++ b/heartbeat/hbregistry/hbregistry.go @@ -17,7 +17,7 @@ package hbregistry -import "github.com/elastic/beats/libbeat/monitoring" +import "github.com/elastic/beats/v7/libbeat/monitoring" // StatsRegistry contains a singleton instance of the heartbeat stats registry var StatsRegistry = monitoring.Default.NewRegistry("heartbeat") diff --git a/heartbeat/hbtest/hbtestutil.go b/heartbeat/hbtest/hbtestutil.go index 05f09d0f1e90..9bec84ee0b59 100644 --- a/heartbeat/hbtest/hbtestutil.go +++ b/heartbeat/hbtest/hbtestutil.go @@ -30,12 +30,12 @@ import ( "strings" "testing" - "github.com/elastic/beats/heartbeat/hbtestllext" + "github.com/elastic/beats/v7/heartbeat/hbtestllext" "github.com/stretchr/testify/require" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/libbeat/common/x509util" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/libbeat/common/x509util" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/isdef" "github.com/elastic/go-lookslike/validator" diff --git a/heartbeat/include/fields.go b/heartbeat/include/fields.go index 7b29eac539d8..939dd4872b2a 100644 --- a/heartbeat/include/fields.go +++ b/heartbeat/include/fields.go @@ -20,7 +20,7 @@ package include import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/heartbeat/look/look.go b/heartbeat/look/look.go index b22281f64920..d6ea75a395a7 100644 --- a/heartbeat/look/look.go +++ b/heartbeat/look/look.go @@ -22,9 +22,9 @@ package look import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/heartbeat/reason" + "github.com/elastic/beats/v7/heartbeat/reason" ) // RTT formats a round-trip-time given as time.Duration into an diff --git a/heartbeat/look/look_test.go b/heartbeat/look/look_test.go index 558337adfc7f..e5b566ebb574 100644 --- a/heartbeat/look/look_test.go +++ b/heartbeat/look/look_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - reason2 "github.com/elastic/beats/heartbeat/reason" - "github.com/elastic/beats/libbeat/common" + reason2 "github.com/elastic/beats/v7/heartbeat/reason" + "github.com/elastic/beats/v7/libbeat/common" ) // helper diff --git a/heartbeat/magefile.go b/heartbeat/magefile.go index 84a38bf5e629..0771f376c4c7 100644 --- a/heartbeat/magefile.go +++ b/heartbeat/magefile.go @@ -27,16 +27,16 @@ import ( "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/generator/common/beatgen" - heartbeat "github.com/elastic/beats/heartbeat/scripts/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/generator/common/beatgen" + heartbeat "github.com/elastic/beats/v7/heartbeat/scripts/mage" // mage:import - "github.com/elastic/beats/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/integtest/notests" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/integtest/notests" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/unittest" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" ) func init() { @@ -47,7 +47,7 @@ func init() { devtools.BeatServiceName = "heartbeat-elastic" } -// VendorUpdate updates elastic/beats in the vendor dir +// VendorUpdate updates elastic/beats/v7 in the vendor dir func VendorUpdate() error { return beatgen.VendorUpdate() } diff --git a/heartbeat/main.go b/heartbeat/main.go index 009752fd20f3..6218bf004322 100644 --- a/heartbeat/main.go +++ b/heartbeat/main.go @@ -20,9 +20,9 @@ package main import ( "os" - "github.com/elastic/beats/heartbeat/cmd" + "github.com/elastic/beats/v7/heartbeat/cmd" - _ "github.com/elastic/beats/heartbeat/include" + _ "github.com/elastic/beats/v7/heartbeat/include" ) func main() { diff --git a/heartbeat/main_test.go b/heartbeat/main_test.go index 7a10fb838ee9..7de20114fa03 100644 --- a/heartbeat/main_test.go +++ b/heartbeat/main_test.go @@ -23,8 +23,8 @@ import ( "flag" "testing" - "github.com/elastic/beats/heartbeat/cmd" - "github.com/elastic/beats/libbeat/tests/system/template" + "github.com/elastic/beats/v7/heartbeat/cmd" + "github.com/elastic/beats/v7/libbeat/tests/system/template" ) var systemTest *bool diff --git a/heartbeat/monitors/active/dialchain/builder.go b/heartbeat/monitors/active/dialchain/builder.go index 301c932db573..72e74aadc921 100644 --- a/heartbeat/monitors/active/dialchain/builder.go +++ b/heartbeat/monitors/active/dialchain/builder.go @@ -23,11 +23,11 @@ import ( "net/url" "time" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // Builder maintains a DialerChain for building dialers and dialer based diff --git a/heartbeat/monitors/active/dialchain/dialchain.go b/heartbeat/monitors/active/dialchain/dialchain.go index 0f0c764e779d..d6d2ea050987 100644 --- a/heartbeat/monitors/active/dialchain/dialchain.go +++ b/heartbeat/monitors/active/dialchain/dialchain.go @@ -18,8 +18,8 @@ package dialchain import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // DialerChain composes builders for multiple network layers, used to build diff --git a/heartbeat/monitors/active/dialchain/net.go b/heartbeat/monitors/active/dialchain/net.go index e31798982b37..01b8b6c49b7e 100644 --- a/heartbeat/monitors/active/dialchain/net.go +++ b/heartbeat/monitors/active/dialchain/net.go @@ -23,12 +23,12 @@ import ( "strconv" "time" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // TCPDialer creates a new NetDialer with constant event fields and default diff --git a/heartbeat/monitors/active/dialchain/socks5.go b/heartbeat/monitors/active/dialchain/socks5.go index 694b8cd949cd..ce8987a0623c 100644 --- a/heartbeat/monitors/active/dialchain/socks5.go +++ b/heartbeat/monitors/active/dialchain/socks5.go @@ -20,9 +20,9 @@ package dialchain import ( "net" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // SOCKS5Layer configures a SOCKS5 proxy layer in a DialerChain. diff --git a/heartbeat/monitors/active/dialchain/tls.go b/heartbeat/monitors/active/dialchain/tls.go index f7f6de720d37..79ea3aea2597 100644 --- a/heartbeat/monitors/active/dialchain/tls.go +++ b/heartbeat/monitors/active/dialchain/tls.go @@ -24,10 +24,10 @@ import ( "net" "time" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // TLSLayer configures the TLS layer in a DialerChain. diff --git a/heartbeat/monitors/active/dialchain/tls_test.go b/heartbeat/monitors/active/dialchain/tls_test.go index b281bf602e94..8df41fbd3b06 100644 --- a/heartbeat/monitors/active/dialchain/tls_test.go +++ b/heartbeat/monitors/active/dialchain/tls_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func Test_addCertMetdata(t *testing.T) { diff --git a/heartbeat/monitors/active/dialchain/util.go b/heartbeat/monitors/active/dialchain/util.go index f0c8247361a1..fdc6a7843c1b 100644 --- a/heartbeat/monitors/active/dialchain/util.go +++ b/heartbeat/monitors/active/dialchain/util.go @@ -21,8 +21,8 @@ import ( "net" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type timer struct { diff --git a/heartbeat/monitors/active/http/check.go b/heartbeat/monitors/active/http/check.go index 4ff5ab4a4702..327674f7956d 100644 --- a/heartbeat/monitors/active/http/check.go +++ b/heartbeat/monitors/active/http/check.go @@ -27,11 +27,11 @@ import ( pkgerrors "github.com/pkg/errors" - "github.com/elastic/beats/heartbeat/reason" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/jsontransform" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/conditions" + "github.com/elastic/beats/v7/heartbeat/reason" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/jsontransform" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/conditions" ) // multiValidator combines multiple validations of each type into a single easy to use object. diff --git a/heartbeat/monitors/active/http/check_test.go b/heartbeat/monitors/active/http/check_test.go index 3c3e42caa060..14f4fb0c2646 100644 --- a/heartbeat/monitors/active/http/check_test.go +++ b/heartbeat/monitors/active/http/check_test.go @@ -27,9 +27,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/conditions" ) func TestCheckBody(t *testing.T) { diff --git a/heartbeat/monitors/active/http/config.go b/heartbeat/monitors/active/http/config.go index e195f4209e3e..c648cfecfc92 100644 --- a/heartbeat/monitors/active/http/config.go +++ b/heartbeat/monitors/active/http/config.go @@ -23,10 +23,10 @@ import ( "strings" "time" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/conditions" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/conditions" ) type Config struct { diff --git a/heartbeat/monitors/active/http/http.go b/heartbeat/monitors/active/http/http.go index ef6c43b9c58f..c52b07005af1 100644 --- a/heartbeat/monitors/active/http/http.go +++ b/heartbeat/monitors/active/http/http.go @@ -22,13 +22,13 @@ import ( "net/http" "net/url" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) func init() { diff --git a/heartbeat/monitors/active/http/http_test.go b/heartbeat/monitors/active/http/http_test.go index bcb372361080..fd3642fbd178 100644 --- a/heartbeat/monitors/active/http/http_test.go +++ b/heartbeat/monitors/active/http/http_test.go @@ -33,14 +33,14 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/heartbeat/hbtest" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - schedule "github.com/elastic/beats/heartbeat/scheduler/schedule" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/outputs/transport" - btesting "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/heartbeat/hbtest" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + schedule "github.com/elastic/beats/v7/heartbeat/scheduler/schedule" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + btesting "github.com/elastic/beats/v7/libbeat/testing" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/isdef" "github.com/elastic/go-lookslike/testslike" diff --git a/heartbeat/monitors/active/http/respbody.go b/heartbeat/monitors/active/http/respbody.go index b8b95e5b023d..6aee68417f4b 100644 --- a/heartbeat/monitors/active/http/respbody.go +++ b/heartbeat/monitors/active/http/respbody.go @@ -26,8 +26,8 @@ import ( "github.com/docker/go-units" - "github.com/elastic/beats/heartbeat/reason" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/reason" + "github.com/elastic/beats/v7/libbeat/common" ) // maxBufferBodyBytes sets a hard limit on how much we're willing to buffer for any reason internally. diff --git a/heartbeat/monitors/active/http/respbody_test.go b/heartbeat/monitors/active/http/respbody_test.go index 1a3b8accb4ac..071f4e27a47e 100644 --- a/heartbeat/monitors/active/http/respbody_test.go +++ b/heartbeat/monitors/active/http/respbody_test.go @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/common/match" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/testslike" ) diff --git a/heartbeat/monitors/active/http/simple_transp.go b/heartbeat/monitors/active/http/simple_transp.go index 889baa8e5a1e..56d7fbf3c9ad 100644 --- a/heartbeat/monitors/active/http/simple_transp.go +++ b/heartbeat/monitors/active/http/simple_transp.go @@ -28,7 +28,7 @@ import ( "net/url" "strings" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) const ( diff --git a/heartbeat/monitors/active/http/task.go b/heartbeat/monitors/active/http/task.go index 6a4fe1f9a03d..69ec37932304 100644 --- a/heartbeat/monitors/active/http/task.go +++ b/heartbeat/monitors/active/http/task.go @@ -29,17 +29,17 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common/useragent" - - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/heartbeat/monitors/active/dialchain" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/reason" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common/useragent" + + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors/active/dialchain" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/reason" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) var userAgent = useragent.UserAgent("Heartbeat") diff --git a/heartbeat/monitors/active/http/task_test.go b/heartbeat/monitors/active/http/task_test.go index 765887302c0a..5d46befc8b12 100644 --- a/heartbeat/monitors/active/http/task_test.go +++ b/heartbeat/monitors/active/http/task_test.go @@ -24,7 +24,7 @@ import ( "reflect" "testing" - "github.com/elastic/beats/libbeat/common/useragent" + "github.com/elastic/beats/v7/libbeat/common/useragent" "github.com/stretchr/testify/require" diff --git a/heartbeat/monitors/active/icmp/config.go b/heartbeat/monitors/active/icmp/config.go index 5ad176d41243..331ff8f45f6c 100644 --- a/heartbeat/monitors/active/icmp/config.go +++ b/heartbeat/monitors/active/icmp/config.go @@ -20,7 +20,7 @@ package icmp import ( "time" - "github.com/elastic/beats/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors" ) type Config struct { diff --git a/heartbeat/monitors/active/icmp/icmp.go b/heartbeat/monitors/active/icmp/icmp.go index be90421fd2f8..66bc0b2adc61 100644 --- a/heartbeat/monitors/active/icmp/icmp.go +++ b/heartbeat/monitors/active/icmp/icmp.go @@ -22,14 +22,14 @@ import ( "net" "net/url" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/heartbeat/monitors/active/tcp/config.go b/heartbeat/monitors/active/tcp/config.go index 749ad1600169..9b6f65fa97b4 100644 --- a/heartbeat/monitors/active/tcp/config.go +++ b/heartbeat/monitors/active/tcp/config.go @@ -21,10 +21,10 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/outputs/transport" - "github.com/elastic/beats/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors" ) type Config struct { diff --git a/heartbeat/monitors/active/tcp/task.go b/heartbeat/monitors/active/tcp/task.go index 4c5523f671a5..f583f278aeca 100644 --- a/heartbeat/monitors/active/tcp/task.go +++ b/heartbeat/monitors/active/tcp/task.go @@ -20,12 +20,12 @@ package tcp import ( "time" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/heartbeat/reason" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/heartbeat/reason" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) func pingHost( diff --git a/heartbeat/monitors/active/tcp/tcp.go b/heartbeat/monitors/active/tcp/tcp.go index 0fcc4329b9ce..fb547df58dde 100644 --- a/heartbeat/monitors/active/tcp/tcp.go +++ b/heartbeat/monitors/active/tcp/tcp.go @@ -23,14 +23,14 @@ import ( "strconv" "strings" - "github.com/elastic/beats/heartbeat/monitors" - "github.com/elastic/beats/heartbeat/monitors/active/dialchain" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/heartbeat/monitors" + "github.com/elastic/beats/v7/heartbeat/monitors/active/dialchain" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) func init() { diff --git a/heartbeat/monitors/active/tcp/tcp_test.go b/heartbeat/monitors/active/tcp/tcp_test.go index 2f3e915d53fa..7980510f3f8f 100644 --- a/heartbeat/monitors/active/tcp/tcp_test.go +++ b/heartbeat/monitors/active/tcp/tcp_test.go @@ -31,12 +31,12 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/heartbeat/hbtest" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/heartbeat/scheduler/schedule" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - btesting "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/heartbeat/hbtest" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + btesting "github.com/elastic/beats/v7/libbeat/testing" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/isdef" "github.com/elastic/go-lookslike/testslike" diff --git a/heartbeat/monitors/defaults/default.go b/heartbeat/monitors/defaults/default.go index 5e65d46fab3e..610faf5c452f 100644 --- a/heartbeat/monitors/defaults/default.go +++ b/heartbeat/monitors/defaults/default.go @@ -21,7 +21,7 @@ package defaults import ( // Import packages that need to register themselves. - _ "github.com/elastic/beats/heartbeat/monitors/active/http" - _ "github.com/elastic/beats/heartbeat/monitors/active/icmp" - _ "github.com/elastic/beats/heartbeat/monitors/active/tcp" + _ "github.com/elastic/beats/v7/heartbeat/monitors/active/http" + _ "github.com/elastic/beats/v7/heartbeat/monitors/active/icmp" + _ "github.com/elastic/beats/v7/heartbeat/monitors/active/tcp" ) diff --git a/heartbeat/monitors/factory.go b/heartbeat/monitors/factory.go index 6f9391a2fdf6..b6c39d14d4d9 100644 --- a/heartbeat/monitors/factory.go +++ b/heartbeat/monitors/factory.go @@ -18,10 +18,10 @@ package monitors import ( - "github.com/elastic/beats/heartbeat/scheduler" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/scheduler" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" ) // RunnerFactory that can be used to create cfg.Runner cast versions of Monitor diff --git a/heartbeat/monitors/jobs/job.go b/heartbeat/monitors/jobs/job.go index efa387394018..bc41d097f07f 100644 --- a/heartbeat/monitors/jobs/job.go +++ b/heartbeat/monitors/jobs/job.go @@ -18,7 +18,7 @@ package jobs import ( - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" ) // A Job represents a unit of execution, and may return multiple continuation jobs. diff --git a/heartbeat/monitors/jobs/job_test.go b/heartbeat/monitors/jobs/job_test.go index ffcbc9d6e911..dbb84c324530 100644 --- a/heartbeat/monitors/jobs/job_test.go +++ b/heartbeat/monitors/jobs/job_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/testslike" ) diff --git a/heartbeat/monitors/jobs/testing.go b/heartbeat/monitors/jobs/testing.go index c1ba0362d18a..a60b72e28c3e 100644 --- a/heartbeat/monitors/jobs/testing.go +++ b/heartbeat/monitors/jobs/testing.go @@ -20,7 +20,7 @@ package jobs import ( "testing" - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" ) // ExecJobsAndConts recursively executes multiple jobs. diff --git a/heartbeat/monitors/mocks_test.go b/heartbeat/monitors/mocks_test.go index 6fa1793d4f7c..629eeb43a43c 100644 --- a/heartbeat/monitors/mocks_test.go +++ b/heartbeat/monitors/mocks_test.go @@ -25,13 +25,13 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/hbtest" - "github.com/elastic/beats/heartbeat/hbtestllext" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/hbtest" + "github.com/elastic/beats/v7/heartbeat/hbtestllext" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/isdef" "github.com/elastic/go-lookslike/validator" diff --git a/heartbeat/monitors/monitor.go b/heartbeat/monitors/monitor.go index 01213f2ad2d1..0326c4094156 100644 --- a/heartbeat/monitors/monitor.go +++ b/heartbeat/monitors/monitor.go @@ -26,13 +26,13 @@ import ( "github.com/mitchellh/hashstructure" "github.com/pkg/errors" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/heartbeat/scheduler" - "github.com/elastic/beats/heartbeat/watcher" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/heartbeat/scheduler" + "github.com/elastic/beats/v7/heartbeat/watcher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Monitor represents a configured recurring monitoring configuredJob loaded from a config file. Starting it diff --git a/heartbeat/monitors/monitor_test.go b/heartbeat/monitors/monitor_test.go index 8e19ba52df1f..50553a06e89a 100644 --- a/heartbeat/monitors/monitor_test.go +++ b/heartbeat/monitors/monitor_test.go @@ -21,14 +21,14 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/elastic/go-lookslike/testslike" - "github.com/elastic/beats/heartbeat/scheduler" + "github.com/elastic/beats/v7/heartbeat/scheduler" ) func TestMonitor(t *testing.T) { diff --git a/heartbeat/monitors/plugin.go b/heartbeat/monitors/plugin.go index 68aaa151cd43..a75f8990477e 100644 --- a/heartbeat/monitors/plugin.go +++ b/heartbeat/monitors/plugin.go @@ -23,10 +23,10 @@ import ( "sort" "strings" - "github.com/elastic/beats/heartbeat/hbregistry" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/heartbeat/hbregistry" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/plugin" ) type pluginBuilder struct { diff --git a/heartbeat/monitors/pluginconf.go b/heartbeat/monitors/pluginconf.go index 20aace700fdb..5df2c192cce5 100644 --- a/heartbeat/monitors/pluginconf.go +++ b/heartbeat/monitors/pluginconf.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/heartbeat/scheduler/schedule" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule" + "github.com/elastic/beats/v7/libbeat/common" ) // ErrPluginDisabled is returned when the monitor plugin is marked as disabled. diff --git a/heartbeat/monitors/regrecord.go b/heartbeat/monitors/regrecord.go index b779d68d0e0e..a7c630deaa1a 100644 --- a/heartbeat/monitors/regrecord.go +++ b/heartbeat/monitors/regrecord.go @@ -18,7 +18,7 @@ package monitors import ( - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) type registryRecorder interface { diff --git a/heartbeat/monitors/task.go b/heartbeat/monitors/task.go index 148019f5425c..4c045bf6513c 100644 --- a/heartbeat/monitors/task.go +++ b/heartbeat/monitors/task.go @@ -23,14 +23,14 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/scheduler" - "github.com/elastic/beats/heartbeat/scheduler/schedule" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/scheduler" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" ) // configuredJob represents a job combined with its config and any diff --git a/heartbeat/monitors/task_test.go b/heartbeat/monitors/task_test.go index 6358edd9f352..dc0aa7ab23c4 100644 --- a/heartbeat/monitors/task_test.go +++ b/heartbeat/monitors/task_test.go @@ -28,10 +28,10 @@ import ( "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/testslike" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func Test_runPublishJob(t *testing.T) { diff --git a/heartbeat/monitors/util.go b/heartbeat/monitors/util.go index df32a928aef9..8cf2679c0d8b 100644 --- a/heartbeat/monitors/util.go +++ b/heartbeat/monitors/util.go @@ -23,12 +23,12 @@ import ( "net" "time" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/monitors/wrappers" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/monitors/wrappers" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // IPSettings provides common configuration settings for IP resolution and ping diff --git a/heartbeat/monitors/wrappers/monitors.go b/heartbeat/monitors/wrappers/monitors.go index c565d7481c09..5868cdca6364 100644 --- a/heartbeat/monitors/wrappers/monitors.go +++ b/heartbeat/monitors/wrappers/monitors.go @@ -22,18 +22,18 @@ import ( "sync" "time" - "github.com/elastic/beats/heartbeat/scheduler/schedule" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule" "github.com/gofrs/uuid" "github.com/mitchellh/hashstructure" "github.com/pkg/errors" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/look" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/look" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // WrapCommon applies the common wrappers that all monitor jobs get. diff --git a/heartbeat/monitors/wrappers/monitors_test.go b/heartbeat/monitors/wrappers/monitors_test.go index 51e17890e495..5cbcb43ebd59 100644 --- a/heartbeat/monitors/wrappers/monitors_test.go +++ b/heartbeat/monitors/wrappers/monitors_test.go @@ -27,12 +27,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/hbtestllext" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/heartbeat/scheduler/schedule" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/hbtestllext" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/isdef" "github.com/elastic/go-lookslike/testslike" diff --git a/heartbeat/monitors/wrappers/util.go b/heartbeat/monitors/wrappers/util.go index 83778069d99e..30afb29c444f 100644 --- a/heartbeat/monitors/wrappers/util.go +++ b/heartbeat/monitors/wrappers/util.go @@ -21,10 +21,10 @@ import ( "net/url" "strconv" - "github.com/elastic/beats/heartbeat/eventext" - "github.com/elastic/beats/heartbeat/monitors/jobs" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/heartbeat/eventext" + "github.com/elastic/beats/v7/heartbeat/monitors/jobs" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // WithFields wraps a Job and all continuations, updating all events returned with the set of diff --git a/heartbeat/monitors/wrappers/util_test.go b/heartbeat/monitors/wrappers/util_test.go index f87b2a9cbd31..a681d4cedad4 100644 --- a/heartbeat/monitors/wrappers/util_test.go +++ b/heartbeat/monitors/wrappers/util_test.go @@ -26,7 +26,7 @@ import ( "github.com/elastic/go-lookslike" "github.com/elastic/go-lookslike/testslike" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestURLFields(t *testing.T) { diff --git a/heartbeat/reason/reason.go b/heartbeat/reason/reason.go index d5fc5e456898..677a87a8971f 100644 --- a/heartbeat/reason/reason.go +++ b/heartbeat/reason/reason.go @@ -17,7 +17,7 @@ package reason -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" type Reason interface { error diff --git a/heartbeat/scheduler/schedule/schedule.go b/heartbeat/scheduler/schedule/schedule.go index 696a6b8fa007..51755ae70598 100644 --- a/heartbeat/scheduler/schedule/schedule.go +++ b/heartbeat/scheduler/schedule/schedule.go @@ -21,8 +21,8 @@ import ( "strings" "time" - "github.com/elastic/beats/heartbeat/scheduler" - "github.com/elastic/beats/heartbeat/scheduler/schedule/cron" + "github.com/elastic/beats/v7/heartbeat/scheduler" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule/cron" ) type Schedule struct { diff --git a/heartbeat/scheduler/schedule/schedule_test.go b/heartbeat/scheduler/schedule/schedule_test.go index 2d0bed8d8362..9665b54d33aa 100644 --- a/heartbeat/scheduler/schedule/schedule_test.go +++ b/heartbeat/scheduler/schedule/schedule_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - "github.com/elastic/beats/heartbeat/scheduler" - "github.com/elastic/beats/heartbeat/scheduler/schedule/cron" + "github.com/elastic/beats/v7/heartbeat/scheduler" + "github.com/elastic/beats/v7/heartbeat/scheduler/schedule/cron" ) func TestParse(t *testing.T) { diff --git a/heartbeat/scheduler/scheduler.go b/heartbeat/scheduler/scheduler.go index c104a366c85a..18f927a2d806 100644 --- a/heartbeat/scheduler/scheduler.go +++ b/heartbeat/scheduler/scheduler.go @@ -27,10 +27,10 @@ import ( "golang.org/x/sync/semaphore" - "github.com/elastic/beats/heartbeat/scheduler/timerqueue" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/heartbeat/scheduler/timerqueue" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) const ( diff --git a/heartbeat/scheduler/scheduler_test.go b/heartbeat/scheduler/scheduler_test.go index 5ed7e9c95878..6567dab2bebc 100644 --- a/heartbeat/scheduler/scheduler_test.go +++ b/heartbeat/scheduler/scheduler_test.go @@ -28,8 +28,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - batomic "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/monitoring" + batomic "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/monitoring" ) // The runAt in the island of tarawa 🏝. Good test TZ because it's pretty rare for a local box diff --git a/heartbeat/scripts/mage/config.go b/heartbeat/scripts/mage/config.go index e3c9ce6752e2..5128c7d6672b 100644 --- a/heartbeat/scripts/mage/config.go +++ b/heartbeat/scripts/mage/config.go @@ -18,7 +18,7 @@ package mage import ( - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // ConfigFileParams returns the default ConfigFileParams for generating diff --git a/heartbeat/watcher/watcher.go b/heartbeat/watcher/watcher.go index d0669127fa0e..cd9866f638e0 100644 --- a/heartbeat/watcher/watcher.go +++ b/heartbeat/watcher/watcher.go @@ -23,7 +23,7 @@ import ( "os" "time" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type Watch interface { diff --git a/journalbeat/beater/journalbeat.go b/journalbeat/beater/journalbeat.go index 7a54163f832e..a2dcab6d7b63 100644 --- a/journalbeat/beater/journalbeat.go +++ b/journalbeat/beater/journalbeat.go @@ -22,19 +22,19 @@ import ( "sync" "time" - "github.com/elastic/beats/journalbeat/checkpoint" - "github.com/elastic/beats/journalbeat/cmd/instance" - "github.com/elastic/beats/journalbeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/journalbeat/checkpoint" + "github.com/elastic/beats/v7/journalbeat/cmd/instance" + "github.com/elastic/beats/v7/journalbeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/journalbeat/config" - _ "github.com/elastic/beats/journalbeat/include" + "github.com/elastic/beats/v7/journalbeat/config" + _ "github.com/elastic/beats/v7/journalbeat/include" // Add dedicated processors - _ "github.com/elastic/beats/libbeat/processors/decode_csv_fields" + _ "github.com/elastic/beats/v7/libbeat/processors/decode_csv_fields" ) // Journalbeat instance diff --git a/journalbeat/checkpoint/checkpoint.go b/journalbeat/checkpoint/checkpoint.go index ff8e702de1cb..2ba4140182a1 100644 --- a/journalbeat/checkpoint/checkpoint.go +++ b/journalbeat/checkpoint/checkpoint.go @@ -32,8 +32,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/paths" ) // Checkpoint persists event log state information to disk. diff --git a/journalbeat/cmd/instance/metrics.go b/journalbeat/cmd/instance/metrics.go index 6f2cff63c5a9..7b569da8dd26 100644 --- a/journalbeat/cmd/instance/metrics.go +++ b/journalbeat/cmd/instance/metrics.go @@ -22,9 +22,9 @@ package instance import ( "fmt" - "github.com/coreos/go-systemd/sdjournal" + "github.com/coreos/go-systemd/v22/sdjournal" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var ( diff --git a/journalbeat/cmd/root.go b/journalbeat/cmd/root.go index a276788d0849..4393f505bb81 100644 --- a/journalbeat/cmd/root.go +++ b/journalbeat/cmd/root.go @@ -18,14 +18,14 @@ package cmd import ( - "github.com/elastic/beats/journalbeat/beater" + "github.com/elastic/beats/v7/journalbeat/beater" - cmd "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" + cmd "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" // Import processors. - _ "github.com/elastic/beats/libbeat/processors/script" - _ "github.com/elastic/beats/libbeat/processors/timestamp" + _ "github.com/elastic/beats/v7/libbeat/processors/script" + _ "github.com/elastic/beats/v7/libbeat/processors/timestamp" ) // Name of this beat diff --git a/journalbeat/config/config.go b/journalbeat/config/config.go index 395bf13ec9cb..a5d9127641de 100644 --- a/journalbeat/config/config.go +++ b/journalbeat/config/config.go @@ -23,7 +23,7 @@ package config import ( "fmt" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // SeekMode is specifies how a journal is read diff --git a/journalbeat/include/fields.go b/journalbeat/include/fields.go index 782f09f53f34..45161a4a9fe4 100644 --- a/journalbeat/include/fields.go +++ b/journalbeat/include/fields.go @@ -20,7 +20,7 @@ package include import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/journalbeat/input/config.go b/journalbeat/input/config.go index 3916f9ad515b..00eb871cb4c6 100644 --- a/journalbeat/input/config.go +++ b/journalbeat/input/config.go @@ -20,10 +20,10 @@ package input import ( "time" - "github.com/elastic/beats/journalbeat/config" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/journalbeat/config" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/processors" ) // Config stores the options of an input. diff --git a/journalbeat/input/input.go b/journalbeat/input/input.go index b3a74dd46b89..ca39b082049e 100644 --- a/journalbeat/input/input.go +++ b/journalbeat/input/input.go @@ -21,18 +21,18 @@ import ( "fmt" "sync" - "github.com/elastic/beats/libbeat/processors/add_formatted_index" + "github.com/elastic/beats/v7/libbeat/processors/add_formatted_index" - "github.com/elastic/beats/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" "github.com/gofrs/uuid" - "github.com/elastic/beats/journalbeat/checkpoint" - "github.com/elastic/beats/journalbeat/reader" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/journalbeat/checkpoint" + "github.com/elastic/beats/v7/journalbeat/reader" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" ) // Input manages readers and forwards entries from journals. diff --git a/journalbeat/input/input_test.go b/journalbeat/input/input_test.go index 76e99852c9a3..f80688b786ef 100644 --- a/journalbeat/input/input_test.go +++ b/journalbeat/input/input_test.go @@ -24,10 +24,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - _ "github.com/elastic/beats/libbeat/processors/actions" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + _ "github.com/elastic/beats/v7/libbeat/processors/actions" ) func TestProcessorsForInput(t *testing.T) { diff --git a/journalbeat/magefile.go b/journalbeat/magefile.go index 4e3b2c8e5e05..ae30d5983a6d 100644 --- a/journalbeat/magefile.go +++ b/journalbeat/magefile.go @@ -29,14 +29,14 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" // mage:import - "github.com/elastic/beats/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/integtest/notests" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/integtest/notests" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/unittest" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" ) func init() { diff --git a/journalbeat/main.go b/journalbeat/main.go index 6bfbba776b2d..56c0e645406b 100644 --- a/journalbeat/main.go +++ b/journalbeat/main.go @@ -20,7 +20,7 @@ package main import ( "os" - "github.com/elastic/beats/journalbeat/cmd" + "github.com/elastic/beats/v7/journalbeat/cmd" ) func main() { diff --git a/journalbeat/main_test.go b/journalbeat/main_test.go index 7a55116c7f06..63c0e4926046 100644 --- a/journalbeat/main_test.go +++ b/journalbeat/main_test.go @@ -23,8 +23,8 @@ import ( "flag" "testing" - "github.com/elastic/beats/journalbeat/cmd" - "github.com/elastic/beats/libbeat/tests/system/template" + "github.com/elastic/beats/v7/journalbeat/cmd" + "github.com/elastic/beats/v7/libbeat/tests/system/template" ) var systemTest *bool diff --git a/journalbeat/reader/config.go b/journalbeat/reader/config.go index f97390ad0ad6..d9ad57696883 100644 --- a/journalbeat/reader/config.go +++ b/journalbeat/reader/config.go @@ -20,7 +20,7 @@ package reader import ( "time" - "github.com/elastic/beats/journalbeat/config" + "github.com/elastic/beats/v7/journalbeat/config" ) // Config stores the options of a reder. diff --git a/journalbeat/reader/fields.go b/journalbeat/reader/fields.go index 3c06822d98e2..8075e4aee805 100644 --- a/journalbeat/reader/fields.go +++ b/journalbeat/reader/fields.go @@ -19,7 +19,7 @@ package reader -import "github.com/coreos/go-systemd/sdjournal" +import "github.com/coreos/go-systemd/v22/sdjournal" type fieldConversion struct { name string diff --git a/journalbeat/reader/journal.go b/journalbeat/reader/journal.go index a2c9d0e8ce17..9c599d296577 100644 --- a/journalbeat/reader/journal.go +++ b/journalbeat/reader/journal.go @@ -28,16 +28,16 @@ import ( "syscall" "time" - "github.com/coreos/go-systemd/sdjournal" + "github.com/coreos/go-systemd/v22/sdjournal" "github.com/pkg/errors" - "github.com/elastic/beats/journalbeat/checkpoint" - "github.com/elastic/beats/journalbeat/cmd/instance" - "github.com/elastic/beats/journalbeat/config" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/backoff" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/journalbeat/checkpoint" + "github.com/elastic/beats/v7/journalbeat/cmd/instance" + "github.com/elastic/beats/v7/journalbeat/config" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/backoff" + "github.com/elastic/beats/v7/libbeat/logp" ) // Reader reads entries from journal(s). diff --git a/journalbeat/reader/journal_other.go b/journalbeat/reader/journal_other.go index 82ad678c3266..26f0a7b5f1fe 100644 --- a/journalbeat/reader/journal_other.go +++ b/journalbeat/reader/journal_other.go @@ -22,9 +22,9 @@ package reader import ( "errors" - "github.com/elastic/beats/journalbeat/checkpoint" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/journalbeat/checkpoint" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" ) // Reader stub for non linux builds. diff --git a/journalbeat/reader/journal_test.go b/journalbeat/reader/journal_test.go index 8ce288e05d7f..c54ee800c433 100644 --- a/journalbeat/reader/journal_test.go +++ b/journalbeat/reader/journal_test.go @@ -23,13 +23,13 @@ import ( "reflect" "testing" - "github.com/coreos/go-systemd/sdjournal" + "github.com/coreos/go-systemd/v22/sdjournal" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/journalbeat/checkpoint" - "github.com/elastic/beats/journalbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/journalbeat/checkpoint" + "github.com/elastic/beats/v7/journalbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type ToEventTestCase struct { diff --git a/libbeat/api/make_listener_posix.go b/libbeat/api/make_listener_posix.go index 672af5cc95df..422a1c542911 100644 --- a/libbeat/api/make_listener_posix.go +++ b/libbeat/api/make_listener_posix.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/api/npipe" + "github.com/elastic/beats/v7/libbeat/api/npipe" ) func makeListener(cfg Config) (net.Listener, error) { diff --git a/libbeat/api/make_listener_windows.go b/libbeat/api/make_listener_windows.go index ef549f46a9af..adc9dff4efd5 100644 --- a/libbeat/api/make_listener_windows.go +++ b/libbeat/api/make_listener_windows.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/api/npipe" + "github.com/elastic/beats/v7/libbeat/api/npipe" ) func makeListener(cfg Config) (net.Listener, error) { diff --git a/libbeat/api/routes.go b/libbeat/api/routes.go index e78dfa16ae84..8cb35cfc23ca 100644 --- a/libbeat/api/routes.go +++ b/libbeat/api/routes.go @@ -22,9 +22,9 @@ import ( "net/http" "net/url" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) type handlerFunc func(http.ResponseWriter, *http.Request) diff --git a/libbeat/api/server.go b/libbeat/api/server.go index 44db0baed145..682fd726ce91 100644 --- a/libbeat/api/server.go +++ b/libbeat/api/server.go @@ -24,8 +24,8 @@ import ( "net/url" "strconv" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Server takes cares of correctly starting the HTTP component of the API diff --git a/libbeat/api/server_test.go b/libbeat/api/server_test.go index c021113ccb13..e4df0f5b4e37 100644 --- a/libbeat/api/server_test.go +++ b/libbeat/api/server_test.go @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestConfiguration(t *testing.T) { diff --git a/libbeat/api/server_windows_test.go b/libbeat/api/server_windows_test.go index 0931da865c33..51efc0f1f819 100644 --- a/libbeat/api/server_windows_test.go +++ b/libbeat/api/server_windows_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/api/npipe" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/api/npipe" + "github.com/elastic/beats/v7/libbeat/common" ) func TestNamedPipe(t *testing.T) { diff --git a/libbeat/asset/asset.go b/libbeat/asset/asset.go index d005545b5fba..51ebb2032492 100644 --- a/libbeat/asset/asset.go +++ b/libbeat/asset/asset.go @@ -46,7 +46,7 @@ var Template = template.Must(template.New("normalizations").Parse(` package {{ .Package }} import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/libbeat/autodiscover/appender.go b/libbeat/autodiscover/appender.go index 08debb573bac..b82ad0c8e7cd 100644 --- a/libbeat/autodiscover/appender.go +++ b/libbeat/autodiscover/appender.go @@ -21,8 +21,8 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) // Appender provides an interface by which extra configuration can be added into configs diff --git a/libbeat/autodiscover/appender_test.go b/libbeat/autodiscover/appender_test.go index 78e51129a6e0..9dbf455e7b20 100644 --- a/libbeat/autodiscover/appender_test.go +++ b/libbeat/autodiscover/appender_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) type fakeAppender struct{} diff --git a/libbeat/autodiscover/appenders/config/config.go b/libbeat/autodiscover/appenders/config/config.go index 1efaaf14bf8c..018ee1b587d8 100644 --- a/libbeat/autodiscover/appenders/config/config.go +++ b/libbeat/autodiscover/appenders/config/config.go @@ -22,13 +22,13 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/conditions" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/libbeat/autodiscover/appenders/config/config_test.go b/libbeat/autodiscover/appenders/config/config_test.go index e92252883f3e..36b4ee5b390c 100644 --- a/libbeat/autodiscover/appenders/config/config_test.go +++ b/libbeat/autodiscover/appenders/config/config_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) func TestGenerateAppender(t *testing.T) { diff --git a/libbeat/autodiscover/appenders/registry.go b/libbeat/autodiscover/appenders/registry.go index e72700fc368a..8a3bbc2f9ab8 100644 --- a/libbeat/autodiscover/appenders/registry.go +++ b/libbeat/autodiscover/appenders/registry.go @@ -20,8 +20,8 @@ package appenders import ( "errors" - "github.com/elastic/beats/libbeat/autodiscover" - p "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/autodiscover" + p "github.com/elastic/beats/v7/libbeat/plugin" ) type appenderPlugin struct { diff --git a/libbeat/autodiscover/autodiscover.go b/libbeat/autodiscover/autodiscover.go index 5ddeb21a0ed7..6ceb46fa794f 100644 --- a/libbeat/autodiscover/autodiscover.go +++ b/libbeat/autodiscover/autodiscover.go @@ -23,13 +23,13 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover/meta" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/meta" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/libbeat/autodiscover/autodiscover_test.go b/libbeat/autodiscover/autodiscover_test.go index c454a8c64adb..c466785d4b95 100644 --- a/libbeat/autodiscover/autodiscover_test.go +++ b/libbeat/autodiscover/autodiscover_test.go @@ -26,11 +26,11 @@ import ( "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/tests/resources" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/tests/resources" ) type mockRunner struct { diff --git a/libbeat/autodiscover/builder.go b/libbeat/autodiscover/builder.go index aa966d592c8b..b77ef847a97b 100644 --- a/libbeat/autodiscover/builder.go +++ b/libbeat/autodiscover/builder.go @@ -22,8 +22,8 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) // Builder provides an interface by which configs can be built from provider metadata diff --git a/libbeat/autodiscover/builder/helper.go b/libbeat/autodiscover/builder/helper.go index 91fe093acea4..b6d52a08eb58 100644 --- a/libbeat/autodiscover/builder/helper.go +++ b/libbeat/autodiscover/builder/helper.go @@ -24,9 +24,9 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) // GetContainerID returns the id of a container diff --git a/libbeat/autodiscover/builder/helper_test.go b/libbeat/autodiscover/builder/helper_test.go index 530f1147a8c0..e8b5ce521791 100644 --- a/libbeat/autodiscover/builder/helper_test.go +++ b/libbeat/autodiscover/builder/helper_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestGetProcessors(t *testing.T) { diff --git a/libbeat/autodiscover/builder/plugin.go b/libbeat/autodiscover/builder/plugin.go index 87f33cda3bf2..83abccc2097c 100644 --- a/libbeat/autodiscover/builder/plugin.go +++ b/libbeat/autodiscover/builder/plugin.go @@ -20,8 +20,8 @@ package builder import ( "errors" - "github.com/elastic/beats/libbeat/autodiscover" - p "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/autodiscover" + p "github.com/elastic/beats/v7/libbeat/plugin" ) type builderPlugin struct { diff --git a/libbeat/autodiscover/builder_test.go b/libbeat/autodiscover/builder_test.go index d305dd6fa4a3..75cc0dafaebf 100644 --- a/libbeat/autodiscover/builder_test.go +++ b/libbeat/autodiscover/builder_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) type fakeBuilder struct{} diff --git a/libbeat/autodiscover/config.go b/libbeat/autodiscover/config.go index 7072d5b9d7d9..f4d8081e2928 100644 --- a/libbeat/autodiscover/config.go +++ b/libbeat/autodiscover/config.go @@ -18,7 +18,7 @@ package autodiscover import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Config settings for Autodiscover diff --git a/libbeat/autodiscover/factoryadapter.go b/libbeat/autodiscover/factoryadapter.go index 358addd6bb9f..64dc9f15ca74 100644 --- a/libbeat/autodiscover/factoryadapter.go +++ b/libbeat/autodiscover/factoryadapter.go @@ -20,10 +20,10 @@ package autodiscover import ( "errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) // FactoryAdapter is an adapter that works with any cfgfile.RunnerFactory. diff --git a/libbeat/autodiscover/meta/meta.go b/libbeat/autodiscover/meta/meta.go index 28464dfd9ebb..bf1a2048caed 100644 --- a/libbeat/autodiscover/meta/meta.go +++ b/libbeat/autodiscover/meta/meta.go @@ -20,7 +20,7 @@ package meta import ( "sync" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Map stores a map of id -> MapStrPointer diff --git a/libbeat/autodiscover/meta/meta_test.go b/libbeat/autodiscover/meta/meta_test.go index ea7a31c3eac2..d48351324ebf 100644 --- a/libbeat/autodiscover/meta/meta_test.go +++ b/libbeat/autodiscover/meta/meta_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestStoreNil(t *testing.T) { diff --git a/libbeat/autodiscover/provider.go b/libbeat/autodiscover/provider.go index dc7d416b1307..f7bfefc69d05 100644 --- a/libbeat/autodiscover/provider.go +++ b/libbeat/autodiscover/provider.go @@ -23,9 +23,9 @@ import ( "github.com/gofrs/uuid" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) // Provider for autodiscover diff --git a/libbeat/autodiscover/providers/docker/config.go b/libbeat/autodiscover/providers/docker/config.go index cba67993677c..4780addecbde 100644 --- a/libbeat/autodiscover/providers/docker/config.go +++ b/libbeat/autodiscover/providers/docker/config.go @@ -22,9 +22,9 @@ package docker import ( "time" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/docker" ) // Config for docker autodiscover provider diff --git a/libbeat/autodiscover/providers/docker/docker.go b/libbeat/autodiscover/providers/docker/docker.go index 1189137f608a..3e487a666704 100644 --- a/libbeat/autodiscover/providers/docker/docker.go +++ b/libbeat/autodiscover/providers/docker/docker.go @@ -26,15 +26,15 @@ import ( "github.com/gofrs/uuid" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/common/docker" - "github.com/elastic/beats/libbeat/common/safemapstr" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/libbeat/autodiscover/providers/docker/docker_integration_test.go b/libbeat/autodiscover/providers/docker/docker_integration_test.go index 288b004bd468..b8afbafbb62b 100644 --- a/libbeat/autodiscover/providers/docker/docker_integration_test.go +++ b/libbeat/autodiscover/providers/docker/docker_integration_test.go @@ -23,15 +23,15 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - dk "github.com/elastic/beats/libbeat/tests/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + dk "github.com/elastic/beats/v7/libbeat/tests/docker" ) // Test docker start emits an autodiscover event diff --git a/libbeat/autodiscover/providers/docker/docker_test.go b/libbeat/autodiscover/providers/docker/docker_test.go index ba663d30314d..40fef07f1834 100644 --- a/libbeat/autodiscover/providers/docker/docker_test.go +++ b/libbeat/autodiscover/providers/docker/docker_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/docker" ) func TestGenerateHints(t *testing.T) { diff --git a/libbeat/autodiscover/providers/jolokia/config.go b/libbeat/autodiscover/providers/jolokia/config.go index 7bde0b938268..8d81ac2cc8ac 100644 --- a/libbeat/autodiscover/providers/jolokia/config.go +++ b/libbeat/autodiscover/providers/jolokia/config.go @@ -20,8 +20,8 @@ package jolokia import ( "time" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" ) var ( diff --git a/libbeat/autodiscover/providers/jolokia/config_test.go b/libbeat/autodiscover/providers/jolokia/config_test.go index a72ae0dffa9b..3135a22c4afc 100644 --- a/libbeat/autodiscover/providers/jolokia/config_test.go +++ b/libbeat/autodiscover/providers/jolokia/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestInterfaceConfigsUnpack(t *testing.T) { diff --git a/libbeat/autodiscover/providers/jolokia/discovery.go b/libbeat/autodiscover/providers/jolokia/discovery.go index ed026ec3b078..380369fa9118 100644 --- a/libbeat/autodiscover/providers/jolokia/discovery.go +++ b/libbeat/autodiscover/providers/jolokia/discovery.go @@ -27,11 +27,11 @@ import ( "github.com/gofrs/uuid" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/logp" ) // Jolokia Discovery query diff --git a/libbeat/autodiscover/providers/jolokia/jolokia.go b/libbeat/autodiscover/providers/jolokia/jolokia.go index f938e4a379a9..b370d747b893 100644 --- a/libbeat/autodiscover/providers/jolokia/jolokia.go +++ b/libbeat/autodiscover/providers/jolokia/jolokia.go @@ -23,10 +23,10 @@ import ( "github.com/gofrs/uuid" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) func init() { diff --git a/libbeat/autodiscover/providers/kubernetes/config.go b/libbeat/autodiscover/providers/kubernetes/config.go index f443439c57f7..a1ec2db5dd51 100644 --- a/libbeat/autodiscover/providers/kubernetes/config.go +++ b/libbeat/autodiscover/providers/kubernetes/config.go @@ -23,12 +23,12 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) // Config for kubernetes autodiscover provider diff --git a/libbeat/autodiscover/providers/kubernetes/config_test.go b/libbeat/autodiscover/providers/kubernetes/config_test.go index 727df2c0388c..55fd601037dd 100644 --- a/libbeat/autodiscover/providers/kubernetes/config_test.go +++ b/libbeat/autodiscover/providers/kubernetes/config_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) func TestConfigWithCustomBuilders(t *testing.T) { diff --git a/libbeat/autodiscover/providers/kubernetes/kubernetes.go b/libbeat/autodiscover/providers/kubernetes/kubernetes.go index 52177f39b2b6..3e1685830e20 100644 --- a/libbeat/autodiscover/providers/kubernetes/kubernetes.go +++ b/libbeat/autodiscover/providers/kubernetes/kubernetes.go @@ -25,13 +25,13 @@ import ( "github.com/gofrs/uuid" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/libbeat/autodiscover/providers/kubernetes/node.go b/libbeat/autodiscover/providers/kubernetes/node.go index 4d83294cd48d..bd529582f0cd 100644 --- a/libbeat/autodiscover/providers/kubernetes/node.go +++ b/libbeat/autodiscover/providers/kubernetes/node.go @@ -25,13 +25,13 @@ import ( v1 "k8s.io/api/core/v1" k8s "k8s.io/client-go/kubernetes" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" - "github.com/elastic/beats/libbeat/common/safemapstr" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/logp" ) type node struct { diff --git a/libbeat/autodiscover/providers/kubernetes/node_test.go b/libbeat/autodiscover/providers/kubernetes/node_test.go index 8b0dd7f9a5b7..0685adfe1bdd 100644 --- a/libbeat/autodiscover/providers/kubernetes/node_test.go +++ b/libbeat/autodiscover/providers/kubernetes/node_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" @@ -29,11 +29,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestGenerateHints_Node(t *testing.T) { diff --git a/libbeat/autodiscover/providers/kubernetes/pod.go b/libbeat/autodiscover/providers/kubernetes/pod.go index 9cd5094fa5ab..44f85a2363a3 100644 --- a/libbeat/autodiscover/providers/kubernetes/pod.go +++ b/libbeat/autodiscover/providers/kubernetes/pod.go @@ -24,13 +24,13 @@ import ( "github.com/gofrs/uuid" k8s "k8s.io/client-go/kubernetes" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" - "github.com/elastic/beats/libbeat/common/safemapstr" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/logp" ) type pod struct { diff --git a/libbeat/autodiscover/providers/kubernetes/pod_test.go b/libbeat/autodiscover/providers/kubernetes/pod_test.go index 1d3d11b61bd8..b105aa0991fe 100644 --- a/libbeat/autodiscover/providers/kubernetes/pod_test.go +++ b/libbeat/autodiscover/providers/kubernetes/pod_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" @@ -29,11 +29,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestGenerateHints(t *testing.T) { diff --git a/libbeat/autodiscover/providers/kubernetes/service.go b/libbeat/autodiscover/providers/kubernetes/service.go index f840f9c09698..8708833cd8dd 100644 --- a/libbeat/autodiscover/providers/kubernetes/service.go +++ b/libbeat/autodiscover/providers/kubernetes/service.go @@ -21,17 +21,17 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" "github.com/gofrs/uuid" k8s "k8s.io/client-go/kubernetes" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/safemapstr" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/logp" ) type service struct { diff --git a/libbeat/autodiscover/providers/kubernetes/service_test.go b/libbeat/autodiscover/providers/kubernetes/service_test.go index aa056fc11499..a17ef8a569d7 100644 --- a/libbeat/autodiscover/providers/kubernetes/service_test.go +++ b/libbeat/autodiscover/providers/kubernetes/service_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" @@ -29,11 +29,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestGenerateHints_Service(t *testing.T) { diff --git a/libbeat/autodiscover/providers/plugin.go b/libbeat/autodiscover/providers/plugin.go index 6ace05aaf4b3..2e413032400a 100644 --- a/libbeat/autodiscover/providers/plugin.go +++ b/libbeat/autodiscover/providers/plugin.go @@ -20,8 +20,8 @@ package providers import ( "errors" - "github.com/elastic/beats/libbeat/autodiscover" - p "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/autodiscover" + p "github.com/elastic/beats/v7/libbeat/plugin" ) type providerPlugin struct { diff --git a/libbeat/autodiscover/registry.go b/libbeat/autodiscover/registry.go index a08d637ad424..97955635e502 100644 --- a/libbeat/autodiscover/registry.go +++ b/libbeat/autodiscover/registry.go @@ -20,7 +20,7 @@ package autodiscover import ( "sync" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // Register of autodiscover providers diff --git a/libbeat/autodiscover/template/config.go b/libbeat/autodiscover/template/config.go index c1a2c2b6c513..151f76dde0f3 100644 --- a/libbeat/autodiscover/template/config.go +++ b/libbeat/autodiscover/template/config.go @@ -18,10 +18,10 @@ package template import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/conditions" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/elastic/go-ucfg" ) diff --git a/libbeat/autodiscover/template/config_test.go b/libbeat/autodiscover/template/config_test.go index 8bf554768474..570de15a840b 100644 --- a/libbeat/autodiscover/template/config_test.go +++ b/libbeat/autodiscover/template/config_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) func TestConfigsMapping(t *testing.T) { diff --git a/libbeat/beat/beat.go b/libbeat/beat/beat.go index 08bbaaf9b6c3..3aaed4c66413 100644 --- a/libbeat/beat/beat.go +++ b/libbeat/beat/beat.go @@ -18,8 +18,8 @@ package beat import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/management" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/management" ) // Creator initializes and configures a new Beater instance used to execute diff --git a/libbeat/beat/event.go b/libbeat/beat/event.go index d156a887a93c..4ef560420396 100644 --- a/libbeat/beat/event.go +++ b/libbeat/beat/event.go @@ -22,7 +22,7 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // FlagField fields used to keep information or errors when events are parsed. diff --git a/libbeat/beat/event_test.go b/libbeat/beat/event_test.go index 789a3e0a994b..384ece4d1aea 100644 --- a/libbeat/beat/event_test.go +++ b/libbeat/beat/event_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func newEmptyEvent() *Event { diff --git a/libbeat/beat/pipeline.go b/libbeat/beat/pipeline.go index f07d2f0a701b..c4f4665af1b4 100644 --- a/libbeat/beat/pipeline.go +++ b/libbeat/beat/pipeline.go @@ -20,7 +20,7 @@ package beat import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type Pipeline interface { diff --git a/libbeat/cfgfile/cfgfile.go b/libbeat/cfgfile/cfgfile.go index b0c9f7ffd220..767cbd34bc57 100644 --- a/libbeat/cfgfile/cfgfile.go +++ b/libbeat/cfgfile/cfgfile.go @@ -22,8 +22,8 @@ import ( "os" "path/filepath" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Command line flags. diff --git a/libbeat/cfgfile/glob_watcher.go b/libbeat/cfgfile/glob_watcher.go index 2aff04adad54..fc3e64eafa98 100644 --- a/libbeat/cfgfile/glob_watcher.go +++ b/libbeat/cfgfile/glob_watcher.go @@ -24,7 +24,7 @@ import ( "github.com/mitchellh/hashstructure" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type GlobWatcher struct { diff --git a/libbeat/cfgfile/list.go b/libbeat/cfgfile/list.go index c836c6b10029..db02c56bbdd1 100644 --- a/libbeat/cfgfile/list.go +++ b/libbeat/cfgfile/list.go @@ -24,10 +24,10 @@ import ( "github.com/mitchellh/hashstructure" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/logp" ) // RunnerList implements a reloadable.List of Runners diff --git a/libbeat/cfgfile/list_test.go b/libbeat/cfgfile/list_test.go index e4851e5d1cb9..b9ae56878318 100644 --- a/libbeat/cfgfile/list_test.go +++ b/libbeat/cfgfile/list_test.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" ) type runner struct { diff --git a/libbeat/cfgfile/reload.go b/libbeat/cfgfile/reload.go index dee3be817b5f..6b1be3d16e57 100644 --- a/libbeat/cfgfile/reload.go +++ b/libbeat/cfgfile/reload.go @@ -26,12 +26,12 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/paths" ) var ( diff --git a/libbeat/cfgfile/reload_test.go b/libbeat/cfgfile/reload_test.go index d6575acdaee1..d52b4f293ff5 100644 --- a/libbeat/cfgfile/reload_test.go +++ b/libbeat/cfgfile/reload_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestReloader(t *testing.T) { diff --git a/libbeat/cloudid/cloudid.go b/libbeat/cloudid/cloudid.go index 9b0d5102771c..5e39dee27f1d 100644 --- a/libbeat/cloudid/cloudid.go +++ b/libbeat/cloudid/cloudid.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const defaultCloudPort = "443" diff --git a/libbeat/cloudid/cloudid_test.go b/libbeat/cloudid/cloudid_test.go index aea97646d9ec..889fa152a108 100644 --- a/libbeat/cloudid/cloudid_test.go +++ b/libbeat/cloudid/cloudid_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestDecode(t *testing.T) { diff --git a/libbeat/cmd/completion.go b/libbeat/cmd/completion.go index 578d943775ed..7c7ca31a0749 100644 --- a/libbeat/cmd/completion.go +++ b/libbeat/cmd/completion.go @@ -21,7 +21,7 @@ import ( "fmt" "os" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/cmd/instance" "github.com/spf13/cobra" ) diff --git a/libbeat/cmd/export.go b/libbeat/cmd/export.go index 82e89bb09ee8..44bb95ab60fb 100644 --- a/libbeat/cmd/export.go +++ b/libbeat/cmd/export.go @@ -20,8 +20,8 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/export" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/cmd/export" + "github.com/elastic/beats/v7/libbeat/cmd/instance" ) func genExportCmd(settings instance.Settings) *cobra.Command { diff --git a/libbeat/cmd/export/config.go b/libbeat/cmd/export/config.go index df9816a00e3c..c89cd29d5dd5 100644 --- a/libbeat/cmd/export/config.go +++ b/libbeat/cmd/export/config.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" "gopkg.in/yaml.v2" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common/cli" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common/cli" ) // GenExportConfigCmd write to stdout the current configuration in the YAML format. diff --git a/libbeat/cmd/export/dashboard.go b/libbeat/cmd/export/dashboard.go index 552fbd6c6e68..9cd63f03366b 100644 --- a/libbeat/cmd/export/dashboard.go +++ b/libbeat/cmd/export/dashboard.go @@ -23,10 +23,10 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/dashboards" - "github.com/elastic/beats/libbeat/kibana" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/dashboards" + "github.com/elastic/beats/v7/libbeat/kibana" ) // GenDashboardCmd is the command used to export a dashboard. diff --git a/libbeat/cmd/export/export.go b/libbeat/cmd/export/export.go index 07ec27edf087..b5bbe4ba1342 100644 --- a/libbeat/cmd/export/export.go +++ b/libbeat/cmd/export/export.go @@ -22,9 +22,9 @@ import ( "os" "path/filepath" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/version" ) type stdoutClient struct { diff --git a/libbeat/cmd/export/ilm_policy.go b/libbeat/cmd/export/ilm_policy.go index 57a3c32103aa..b2a8b8455142 100644 --- a/libbeat/cmd/export/ilm_policy.go +++ b/libbeat/cmd/export/ilm_policy.go @@ -20,9 +20,9 @@ package export import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" ) // GenGetILMPolicyCmd is the command used to export the ilm policy. diff --git a/libbeat/cmd/export/index_pattern.go b/libbeat/cmd/export/index_pattern.go index 5fc4e7f45601..86f6d9c966a7 100644 --- a/libbeat/cmd/export/index_pattern.go +++ b/libbeat/cmd/export/index_pattern.go @@ -22,9 +22,9 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/kibana" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/kibana" ) // GenIndexPatternConfigCmd generates an index pattern for Kibana diff --git a/libbeat/cmd/export/template.go b/libbeat/cmd/export/template.go index 6dd145ec4087..23d572fad2af 100644 --- a/libbeat/cmd/export/template.go +++ b/libbeat/cmd/export/template.go @@ -20,9 +20,9 @@ package export import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" ) // GenTemplateConfigCmd is the command used to export the elasticsearch template. diff --git a/libbeat/cmd/instance/beat.go b/libbeat/cmd/instance/beat.go index b1bf04a1462e..d9d486c62a81 100644 --- a/libbeat/cmd/instance/beat.go +++ b/libbeat/cmd/instance/beat.go @@ -33,7 +33,7 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/kibana" + "github.com/elastic/beats/v7/libbeat/kibana" "github.com/gofrs/uuid" errw "github.com/pkg/errors" @@ -43,33 +43,33 @@ import ( "github.com/elastic/go-sysinfo/types" ucfg "github.com/elastic/go-ucfg" - "github.com/elastic/beats/libbeat/api" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/cloudid" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/common/seccomp" - "github.com/elastic/beats/libbeat/dashboards" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/keystore" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/logp/configure" - "github.com/elastic/beats/libbeat/management" - "github.com/elastic/beats/libbeat/metric/system/host" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/report" - "github.com/elastic/beats/libbeat/monitoring/report/log" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/paths" - "github.com/elastic/beats/libbeat/plugin" - "github.com/elastic/beats/libbeat/publisher/pipeline" - "github.com/elastic/beats/libbeat/publisher/processing" - svc "github.com/elastic/beats/libbeat/service" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/api" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cloudid" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/common/seccomp" + "github.com/elastic/beats/v7/libbeat/dashboards" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/keystore" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp/configure" + "github.com/elastic/beats/v7/libbeat/management" + "github.com/elastic/beats/v7/libbeat/metric/system/host" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/monitoring/report/log" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/publisher/pipeline" + "github.com/elastic/beats/v7/libbeat/publisher/processing" + svc "github.com/elastic/beats/v7/libbeat/service" + "github.com/elastic/beats/v7/libbeat/version" ) // Beat provides the runnable and configurable instance of a beat. diff --git a/libbeat/cmd/instance/beat_test.go b/libbeat/cmd/instance/beat_test.go index 9ea780ed4b32..8c04e87390f6 100644 --- a/libbeat/cmd/instance/beat_test.go +++ b/libbeat/cmd/instance/beat_test.go @@ -24,7 +24,7 @@ import ( "os" "testing" - "github.com/elastic/beats/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cfgfile" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" diff --git a/libbeat/cmd/instance/imports_common.go b/libbeat/cmd/instance/imports_common.go index b90820daeb91..5e993f6a2a00 100644 --- a/libbeat/cmd/instance/imports_common.go +++ b/libbeat/cmd/instance/imports_common.go @@ -18,23 +18,23 @@ package instance import ( - _ "github.com/elastic/beats/libbeat/autodiscover/appenders/config" // Register autodiscover appenders - _ "github.com/elastic/beats/libbeat/autodiscover/providers/jolokia" - _ "github.com/elastic/beats/libbeat/monitoring/report/elasticsearch" // Register default monitoring reporting - _ "github.com/elastic/beats/libbeat/processors/actions" // Register default processors. - _ "github.com/elastic/beats/libbeat/processors/add_cloud_metadata" - _ "github.com/elastic/beats/libbeat/processors/add_host_metadata" - _ "github.com/elastic/beats/libbeat/processors/add_id" - _ "github.com/elastic/beats/libbeat/processors/add_locale" - _ "github.com/elastic/beats/libbeat/processors/add_observer_metadata" - _ "github.com/elastic/beats/libbeat/processors/add_process_metadata" - _ "github.com/elastic/beats/libbeat/processors/communityid" - _ "github.com/elastic/beats/libbeat/processors/convert" - _ "github.com/elastic/beats/libbeat/processors/dissect" - _ "github.com/elastic/beats/libbeat/processors/dns" - _ "github.com/elastic/beats/libbeat/processors/extract_array" - _ "github.com/elastic/beats/libbeat/processors/fingerprint" - _ "github.com/elastic/beats/libbeat/processors/registered_domain" - _ "github.com/elastic/beats/libbeat/processors/translate_sid" - _ "github.com/elastic/beats/libbeat/publisher/includes" // Register publisher pipeline modules + _ "github.com/elastic/beats/v7/libbeat/autodiscover/appenders/config" // Register autodiscover appenders + _ "github.com/elastic/beats/v7/libbeat/autodiscover/providers/jolokia" + _ "github.com/elastic/beats/v7/libbeat/monitoring/report/elasticsearch" // Register default monitoring reporting + _ "github.com/elastic/beats/v7/libbeat/processors/actions" // Register default processors. + _ "github.com/elastic/beats/v7/libbeat/processors/add_cloud_metadata" + _ "github.com/elastic/beats/v7/libbeat/processors/add_host_metadata" + _ "github.com/elastic/beats/v7/libbeat/processors/add_id" + _ "github.com/elastic/beats/v7/libbeat/processors/add_locale" + _ "github.com/elastic/beats/v7/libbeat/processors/add_observer_metadata" + _ "github.com/elastic/beats/v7/libbeat/processors/add_process_metadata" + _ "github.com/elastic/beats/v7/libbeat/processors/communityid" + _ "github.com/elastic/beats/v7/libbeat/processors/convert" + _ "github.com/elastic/beats/v7/libbeat/processors/dissect" + _ "github.com/elastic/beats/v7/libbeat/processors/dns" + _ "github.com/elastic/beats/v7/libbeat/processors/extract_array" + _ "github.com/elastic/beats/v7/libbeat/processors/fingerprint" + _ "github.com/elastic/beats/v7/libbeat/processors/registered_domain" + _ "github.com/elastic/beats/v7/libbeat/processors/translate_sid" + _ "github.com/elastic/beats/v7/libbeat/publisher/includes" // Register publisher pipeline modules ) diff --git a/libbeat/cmd/instance/imports_docker.go b/libbeat/cmd/instance/imports_docker.go index faca620d087c..12d379714ed1 100644 --- a/libbeat/cmd/instance/imports_docker.go +++ b/libbeat/cmd/instance/imports_docker.go @@ -20,8 +20,8 @@ package instance import ( - _ "github.com/elastic/beats/libbeat/autodiscover/providers/docker" // Register autodiscover providers - _ "github.com/elastic/beats/libbeat/autodiscover/providers/kubernetes" - _ "github.com/elastic/beats/libbeat/processors/add_docker_metadata" - _ "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata" + _ "github.com/elastic/beats/v7/libbeat/autodiscover/providers/docker" // Register autodiscover providers + _ "github.com/elastic/beats/v7/libbeat/autodiscover/providers/kubernetes" + _ "github.com/elastic/beats/v7/libbeat/processors/add_docker_metadata" + _ "github.com/elastic/beats/v7/libbeat/processors/add_kubernetes_metadata" ) diff --git a/libbeat/cmd/instance/locker.go b/libbeat/cmd/instance/locker.go index 9cfe9603880d..9e7f929ef495 100644 --- a/libbeat/cmd/instance/locker.go +++ b/libbeat/cmd/instance/locker.go @@ -23,7 +23,7 @@ import ( "github.com/gofrs/flock" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/paths" ) var ( diff --git a/libbeat/cmd/instance/locker_test.go b/libbeat/cmd/instance/locker_test.go index e6feab0e7fed..7e15517edb53 100644 --- a/libbeat/cmd/instance/locker_test.go +++ b/libbeat/cmd/instance/locker_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/paths" ) // TestLocker tests that two beats pointing to the same data path cannot diff --git a/libbeat/cmd/instance/metrics.go b/libbeat/cmd/instance/metrics.go index 9b0697d1e0bf..54cd3ab55d83 100644 --- a/libbeat/cmd/instance/metrics.go +++ b/libbeat/cmd/instance/metrics.go @@ -23,11 +23,11 @@ import ( "fmt" "runtime" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/metric/system/cpu" - "github.com/elastic/beats/libbeat/metric/system/process" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/metric/system/cpu" + "github.com/elastic/beats/v7/libbeat/metric/system/process" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var ( diff --git a/libbeat/cmd/instance/metrics_common.go b/libbeat/cmd/instance/metrics_common.go index ca45f08d53d5..feff54b48411 100644 --- a/libbeat/cmd/instance/metrics_common.go +++ b/libbeat/cmd/instance/metrics_common.go @@ -22,9 +22,9 @@ import ( "github.com/gofrs/uuid" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/report/log" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/report/log" ) var ( diff --git a/libbeat/cmd/instance/metrics_file_descriptors.go b/libbeat/cmd/instance/metrics_file_descriptors.go index d120efabcc77..5d255fd483d1 100644 --- a/libbeat/cmd/instance/metrics_file_descriptors.go +++ b/libbeat/cmd/instance/metrics_file_descriptors.go @@ -22,8 +22,8 @@ package instance import ( "fmt" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) func setupLinuxBSDFDMetrics() { diff --git a/libbeat/cmd/instance/metrics_handles.go b/libbeat/cmd/instance/metrics_handles.go index 6848a20f105c..497fe5edcd6e 100644 --- a/libbeat/cmd/instance/metrics_handles.go +++ b/libbeat/cmd/instance/metrics_handles.go @@ -20,8 +20,8 @@ package instance import ( - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" sysinfo "github.com/elastic/go-sysinfo" "github.com/elastic/go-sysinfo/types" ) diff --git a/libbeat/cmd/instance/metrics_other.go b/libbeat/cmd/instance/metrics_other.go index 37e092be4bb4..2ea96cd6c8e8 100644 --- a/libbeat/cmd/instance/metrics_other.go +++ b/libbeat/cmd/instance/metrics_other.go @@ -22,7 +22,7 @@ package instance import ( - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func setupMetrics(name string) error { diff --git a/libbeat/cmd/instance/settings.go b/libbeat/cmd/instance/settings.go index 7b7ab66706d4..ee22dc084e0e 100644 --- a/libbeat/cmd/instance/settings.go +++ b/libbeat/cmd/instance/settings.go @@ -20,11 +20,11 @@ package instance import ( "github.com/spf13/pflag" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/monitoring/report" - "github.com/elastic/beats/libbeat/publisher/processing" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/publisher/processing" ) // Settings contains basic settings for any beat to pass into GenRootCmd diff --git a/libbeat/cmd/keystore.go b/libbeat/cmd/keystore.go index b2cffe2b7ebf..4410f1d4d745 100644 --- a/libbeat/cmd/keystore.go +++ b/libbeat/cmd/keystore.go @@ -29,10 +29,10 @@ import ( "github.com/spf13/cobra" tml "golang.org/x/crypto/ssh/terminal" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common/cli" - "github.com/elastic/beats/libbeat/common/terminal" - "github.com/elastic/beats/libbeat/keystore" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common/cli" + "github.com/elastic/beats/v7/libbeat/common/terminal" + "github.com/elastic/beats/v7/libbeat/keystore" ) func getKeystore(settings instance.Settings) (keystore.Keystore, error) { diff --git a/libbeat/cmd/modules.go b/libbeat/cmd/modules.go index 4bd6bff137ea..2accdf7a46f6 100644 --- a/libbeat/cmd/modules.go +++ b/libbeat/cmd/modules.go @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cmd/instance" ) // ModulesManager interface provides all actions needed to implement modules command diff --git a/libbeat/cmd/root.go b/libbeat/cmd/root.go index 94382eed5bae..b748225fa924 100644 --- a/libbeat/cmd/root.go +++ b/libbeat/cmd/root.go @@ -25,9 +25,9 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cmd/instance" ) func init() { diff --git a/libbeat/cmd/run.go b/libbeat/cmd/run.go index 7e52fca3cc64..b078aadaf89c 100644 --- a/libbeat/cmd/run.go +++ b/libbeat/cmd/run.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cmd/instance" ) func genRunCmd(settings instance.Settings, beatCreator beat.Creator) *cobra.Command { diff --git a/libbeat/cmd/setup.go b/libbeat/cmd/setup.go index ff52fcfbaebc..d5fc8e65603c 100644 --- a/libbeat/cmd/setup.go +++ b/libbeat/cmd/setup.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cmd/instance" ) const ( diff --git a/libbeat/cmd/test.go b/libbeat/cmd/test.go index 1b17eca8f03f..95b07ff4ac70 100644 --- a/libbeat/cmd/test.go +++ b/libbeat/cmd/test.go @@ -20,9 +20,9 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/cmd/test" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/cmd/test" ) func genTestCmd(settings instance.Settings, beatCreator beat.Creator) *cobra.Command { diff --git a/libbeat/cmd/test/config.go b/libbeat/cmd/test/config.go index e8dfd07dae73..dfc93344acf9 100644 --- a/libbeat/cmd/test/config.go +++ b/libbeat/cmd/test/config.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cmd/instance" ) func GenTestConfigCmd(settings instance.Settings, beatCreator beat.Creator) *cobra.Command { diff --git a/libbeat/cmd/test/output.go b/libbeat/cmd/test/output.go index 6d4761d65a82..5df48051fc10 100644 --- a/libbeat/cmd/test/output.go +++ b/libbeat/cmd/test/output.go @@ -23,10 +23,10 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/testing" ) func GenTestOutputCmd(settings instance.Settings) *cobra.Command { diff --git a/libbeat/cmd/version.go b/libbeat/cmd/version.go index 6145c52e7074..7019ccd77c93 100644 --- a/libbeat/cmd/version.go +++ b/libbeat/cmd/version.go @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common/cli" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common/cli" + "github.com/elastic/beats/v7/libbeat/version" ) // GenVersionCmd generates the command version for a Beat. diff --git a/libbeat/common/bus/bus.go b/libbeat/common/bus/bus.go index cb7393b0c5cb..7b3cf7f9d362 100644 --- a/libbeat/common/bus/bus.go +++ b/libbeat/common/bus/bus.go @@ -20,8 +20,8 @@ package bus import ( "sync" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Event sent to the bus diff --git a/libbeat/common/bus/bus_test.go b/libbeat/common/bus/bus_test.go index c80d3d71a7e2..d87d9522c13b 100644 --- a/libbeat/common/bus/bus_test.go +++ b/libbeat/common/bus/bus_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestEmit(t *testing.T) { diff --git a/libbeat/common/cfgtype/byte_size.go b/libbeat/common/cfgtype/byte_size.go index 72776019afc9..a692cad586d7 100644 --- a/libbeat/common/cfgtype/byte_size.go +++ b/libbeat/common/cfgtype/byte_size.go @@ -22,7 +22,7 @@ import ( "github.com/dustin/go-humanize" - "github.com/elastic/beats/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" ) // ByteSize defines a new configuration option that will parse `go-humanize` compatible values into a diff --git a/libbeat/common/cfgwarn/cfgwarn.go b/libbeat/common/cfgwarn/cfgwarn.go index f7ef2fba1d1f..e102ed20e4b6 100644 --- a/libbeat/common/cfgwarn/cfgwarn.go +++ b/libbeat/common/cfgwarn/cfgwarn.go @@ -22,7 +22,7 @@ import ( "go.uber.org/zap" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) const selector = "cfgwarn" diff --git a/libbeat/common/cfgwarn/removed.go b/libbeat/common/cfgwarn/removed.go index d7060bbada6a..68d3e5468d3b 100644 --- a/libbeat/common/cfgwarn/removed.go +++ b/libbeat/common/cfgwarn/removed.go @@ -23,7 +23,7 @@ import ( "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func checkRemovedSettings(cfg *common.Config, settings ...string) error { diff --git a/libbeat/common/cfgwarn/removed_test.go b/libbeat/common/cfgwarn/removed_test.go index 3bbd819b2367..2615cd9e7edb 100644 --- a/libbeat/common/cfgwarn/removed_test.go +++ b/libbeat/common/cfgwarn/removed_test.go @@ -24,7 +24,7 @@ import ( "github.com/joeshaw/multierror" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestRemovedSetting(t *testing.T) { diff --git a/libbeat/common/cleanup/cleanup_test.go b/libbeat/common/cleanup/cleanup_test.go index 5208dc750aa4..6b45b9de0f59 100644 --- a/libbeat/common/cleanup/cleanup_test.go +++ b/libbeat/common/cleanup/cleanup_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/cleanup" + "github.com/elastic/beats/v7/libbeat/common/cleanup" ) func TestIfBool(t *testing.T) { diff --git a/libbeat/common/config.go b/libbeat/common/config.go index 448b2476156d..e4155c4f3afb 100644 --- a/libbeat/common/config.go +++ b/libbeat/common/config.go @@ -27,8 +27,8 @@ import ( "runtime" "strings" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/logp" ucfg "github.com/elastic/go-ucfg" "github.com/elastic/go-ucfg/cfgutil" "github.com/elastic/go-ucfg/yaml" diff --git a/libbeat/common/docker/client.go b/libbeat/common/docker/client.go index a86edcfcd109..de29a0f8c22e 100644 --- a/libbeat/common/docker/client.go +++ b/libbeat/common/docker/client.go @@ -25,7 +25,7 @@ import ( "github.com/docker/docker/client" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // NewClient builds and returns a new Docker client. On the first request the diff --git a/libbeat/common/docker/helpers.go b/libbeat/common/docker/helpers.go index ae9ea0d62898..e53c84997106 100644 --- a/libbeat/common/docker/helpers.go +++ b/libbeat/common/docker/helpers.go @@ -20,8 +20,8 @@ package docker import ( "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" ) // ExtractContainerName strips the `/` characters that frequently appear in container names diff --git a/libbeat/common/docker/watcher.go b/libbeat/common/docker/watcher.go index 388aa2589a46..0543d37e9c33 100644 --- a/libbeat/common/docker/watcher.go +++ b/libbeat/common/docker/watcher.go @@ -31,8 +31,8 @@ import ( "github.com/docker/go-connections/tlsconfig" "golang.org/x/net/context" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/logp" ) // Select Docker API version diff --git a/libbeat/common/docker/watcher_test.go b/libbeat/common/docker/watcher_test.go index 31f33dde9157..a7fb9ca73fb4 100644 --- a/libbeat/common/docker/watcher_test.go +++ b/libbeat/common/docker/watcher_test.go @@ -29,7 +29,7 @@ import ( "github.com/stretchr/testify/assert" "golang.org/x/net/context" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type MockClient struct { diff --git a/libbeat/common/event.go b/libbeat/common/event.go index 0502a3ce0274..f68cf33cc87a 100644 --- a/libbeat/common/event.go +++ b/libbeat/common/event.go @@ -28,7 +28,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() diff --git a/libbeat/common/event_test.go b/libbeat/common/event_test.go index 1bf622f38182..c9d3a36e0c94 100644 --- a/libbeat/common/event_test.go +++ b/libbeat/common/event_test.go @@ -25,7 +25,7 @@ import ( "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestConvertNestedMapStr(t *testing.T) { diff --git a/libbeat/common/file/fileinfo_test.go b/libbeat/common/file/fileinfo_test.go index ce3e43c06ace..9df25ba638a7 100644 --- a/libbeat/common/file/fileinfo_test.go +++ b/libbeat/common/file/fileinfo_test.go @@ -31,7 +31,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common/file" ) func TestStat(t *testing.T) { diff --git a/libbeat/common/file/rotator_test.go b/libbeat/common/file/rotator_test.go index 8a2c52b3ae38..ccafad556665 100644 --- a/libbeat/common/file/rotator_test.go +++ b/libbeat/common/file/rotator_test.go @@ -28,8 +28,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/logp" ) const logMessage = "Test file rotator.\n" diff --git a/libbeat/common/flowhash/examples/example.go b/libbeat/common/flowhash/examples/example.go index 467f8fafad79..7930f0ea4633 100644 --- a/libbeat/common/flowhash/examples/example.go +++ b/libbeat/common/flowhash/examples/example.go @@ -21,7 +21,7 @@ import ( "fmt" "net" - "github.com/elastic/beats/libbeat/common/flowhash" + "github.com/elastic/beats/v7/libbeat/common/flowhash" ) // ExampleCommunityIDHash shows example usage for flowhash.CommunityID.Hash() diff --git a/libbeat/common/fmtstr/formatevents.go b/libbeat/common/fmtstr/formatevents.go index e7950a39d0f7..1861b7a60e40 100644 --- a/libbeat/common/fmtstr/formatevents.go +++ b/libbeat/common/fmtstr/formatevents.go @@ -28,9 +28,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/dtfmt" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/dtfmt" ) // EventFormatString implements format string support on events diff --git a/libbeat/common/fmtstr/formatevents_test.go b/libbeat/common/fmtstr/formatevents_test.go index 01d21dd81e34..6e78eb5713f9 100644 --- a/libbeat/common/fmtstr/formatevents_test.go +++ b/libbeat/common/fmtstr/formatevents_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestEventFormatString(t *testing.T) { diff --git a/libbeat/common/fmtstr/formattimestamp.go b/libbeat/common/fmtstr/formattimestamp.go index 68c22d636496..e58ce8b2cd9f 100644 --- a/libbeat/common/fmtstr/formattimestamp.go +++ b/libbeat/common/fmtstr/formattimestamp.go @@ -20,8 +20,8 @@ package fmtstr import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // TimestampFormatString is a wrapper around EventFormatString for the diff --git a/libbeat/common/fmtstr/formattimestamp_test.go b/libbeat/common/fmtstr/formattimestamp_test.go index d194f597ad5f..4df8e6b3fdc1 100644 --- a/libbeat/common/fmtstr/formattimestamp_test.go +++ b/libbeat/common/fmtstr/formattimestamp_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestTimestampFormatString(t *testing.T) { diff --git a/libbeat/common/jsontransform/jsonhelper.go b/libbeat/common/jsontransform/jsonhelper.go index bd4b4454d312..1490bcff1706 100644 --- a/libbeat/common/jsontransform/jsonhelper.go +++ b/libbeat/common/jsontransform/jsonhelper.go @@ -21,9 +21,9 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // WriteJSONKeys writes the json keys to the given event based on the overwriteKeys option and the addErrKey diff --git a/libbeat/common/jsontransform/transform.go b/libbeat/common/jsontransform/transform.go index dbb2d27c856d..b6e19a06fe37 100644 --- a/libbeat/common/jsontransform/transform.go +++ b/libbeat/common/jsontransform/transform.go @@ -20,7 +20,7 @@ package jsontransform import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // TransformNumbers walks a json decoded tree an replaces json.Number diff --git a/libbeat/common/kubernetes/metadata/config.go b/libbeat/common/kubernetes/metadata/config.go index 78abe6d8e539..3d3a028d13c5 100644 --- a/libbeat/common/kubernetes/metadata/config.go +++ b/libbeat/common/kubernetes/metadata/config.go @@ -17,7 +17,7 @@ package metadata -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" // Config declares supported configuration for metadata generation type Config struct { diff --git a/libbeat/common/kubernetes/metadata/metadata.go b/libbeat/common/kubernetes/metadata/metadata.go index b2205c91dd90..d81f79f28d58 100644 --- a/libbeat/common/kubernetes/metadata/metadata.go +++ b/libbeat/common/kubernetes/metadata/metadata.go @@ -18,9 +18,9 @@ package metadata import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" ) // MetaGen allows creation of metadata from either Kubernetes resources or their Resource names. diff --git a/libbeat/common/kubernetes/metadata/namespace.go b/libbeat/common/kubernetes/metadata/namespace.go index 366b72884d2a..92dfbc55b2af 100644 --- a/libbeat/common/kubernetes/metadata/namespace.go +++ b/libbeat/common/kubernetes/metadata/namespace.go @@ -20,8 +20,8 @@ package metadata import ( "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) const resource = "namespace" diff --git a/libbeat/common/kubernetes/metadata/namespace_test.go b/libbeat/common/kubernetes/metadata/namespace_test.go index 4011a2f00530..5ac460d7ca77 100644 --- a/libbeat/common/kubernetes/metadata/namespace_test.go +++ b/libbeat/common/kubernetes/metadata/namespace_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) func TestNamespace_Generate(t *testing.T) { diff --git a/libbeat/common/kubernetes/metadata/node.go b/libbeat/common/kubernetes/metadata/node.go index 309e7489a8ca..9d15868177f9 100644 --- a/libbeat/common/kubernetes/metadata/node.go +++ b/libbeat/common/kubernetes/metadata/node.go @@ -20,8 +20,8 @@ package metadata import ( "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) type node struct { diff --git a/libbeat/common/kubernetes/metadata/node_test.go b/libbeat/common/kubernetes/metadata/node_test.go index 9d198361ab91..226e84710c24 100644 --- a/libbeat/common/kubernetes/metadata/node_test.go +++ b/libbeat/common/kubernetes/metadata/node_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) func TestNode_Generate(t *testing.T) { diff --git a/libbeat/common/kubernetes/metadata/pod.go b/libbeat/common/kubernetes/metadata/pod.go index 018b710e4b43..c25db1f7a76a 100644 --- a/libbeat/common/kubernetes/metadata/pod.go +++ b/libbeat/common/kubernetes/metadata/pod.go @@ -20,8 +20,8 @@ package metadata import ( "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) type pod struct { diff --git a/libbeat/common/kubernetes/metadata/pod_test.go b/libbeat/common/kubernetes/metadata/pod_test.go index a5c3f2658a46..34bea7a75d3f 100644 --- a/libbeat/common/kubernetes/metadata/pod_test.go +++ b/libbeat/common/kubernetes/metadata/pod_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) func TestPod_Generate(t *testing.T) { diff --git a/libbeat/common/kubernetes/metadata/resource.go b/libbeat/common/kubernetes/metadata/resource.go index eb00455ffabc..d9610a32f37b 100644 --- a/libbeat/common/kubernetes/metadata/resource.go +++ b/libbeat/common/kubernetes/metadata/resource.go @@ -22,9 +22,9 @@ import ( "k8s.io/apimachinery/pkg/api/meta" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" ) // Resource generates metadata for any kubernetes resource diff --git a/libbeat/common/kubernetes/metadata/resource_test.go b/libbeat/common/kubernetes/metadata/resource_test.go index dbf168644af4..01e7280a4f5e 100644 --- a/libbeat/common/kubernetes/metadata/resource_test.go +++ b/libbeat/common/kubernetes/metadata/resource_test.go @@ -25,8 +25,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) func TestResource_Generate(t *testing.T) { diff --git a/libbeat/common/kubernetes/metadata/service.go b/libbeat/common/kubernetes/metadata/service.go index 7c2fab68fd37..4577d898ec28 100644 --- a/libbeat/common/kubernetes/metadata/service.go +++ b/libbeat/common/kubernetes/metadata/service.go @@ -20,8 +20,8 @@ package metadata import ( "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) type service struct { diff --git a/libbeat/common/kubernetes/metadata/service_test.go b/libbeat/common/kubernetes/metadata/service_test.go index dfda4e9db27f..a574f1a7b7a1 100644 --- a/libbeat/common/kubernetes/metadata/service_test.go +++ b/libbeat/common/kubernetes/metadata/service_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/cache" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) func TestService_Generate(t *testing.T) { diff --git a/libbeat/common/kubernetes/util.go b/libbeat/common/kubernetes/util.go index a8f1254b64a2..470d07373eee 100644 --- a/libbeat/common/kubernetes/util.go +++ b/libbeat/common/kubernetes/util.go @@ -27,7 +27,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) const defaultNode = "localhost" diff --git a/libbeat/common/kubernetes/watcher.go b/libbeat/common/kubernetes/watcher.go index 79f2b8625794..33cc808358ac 100644 --- a/libbeat/common/kubernetes/watcher.go +++ b/libbeat/common/kubernetes/watcher.go @@ -30,7 +30,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/libbeat/common/mapstr_test.go b/libbeat/common/mapstr_test.go index 784814bdac38..de633ff162ea 100644 --- a/libbeat/common/mapstr_test.go +++ b/libbeat/common/mapstr_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap/zapcore" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestMapStrUpdate(t *testing.T) { diff --git a/libbeat/common/reload/reload.go b/libbeat/common/reload/reload.go index ceb377274b55..ed2fe528363d 100644 --- a/libbeat/common/reload/reload.go +++ b/libbeat/common/reload/reload.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Register holds a registry of reloadable objects diff --git a/libbeat/common/safemapstr/safemapstr.go b/libbeat/common/safemapstr/safemapstr.go index 75afe81226ed..07d7d95d2eca 100644 --- a/libbeat/common/safemapstr/safemapstr.go +++ b/libbeat/common/safemapstr/safemapstr.go @@ -20,7 +20,7 @@ package safemapstr import ( "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const alternativeKey = "value" diff --git a/libbeat/common/safemapstr/safemapstr_test.go b/libbeat/common/safemapstr/safemapstr_test.go index 0e3a9c95a7b5..ce46d0300ec5 100644 --- a/libbeat/common/safemapstr/safemapstr_test.go +++ b/libbeat/common/safemapstr/safemapstr_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestPut(t *testing.T) { diff --git a/libbeat/common/schema/mapstriface/mapstriface.go b/libbeat/common/schema/mapstriface/mapstriface.go index cda5c093ac9b..d08631f78c47 100644 --- a/libbeat/common/schema/mapstriface/mapstriface.go +++ b/libbeat/common/schema/mapstriface/mapstriface.go @@ -77,9 +77,9 @@ import ( "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/schema" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/schema" + "github.com/elastic/beats/v7/libbeat/logp" ) type ConvMap struct { diff --git a/libbeat/common/schema/mapstriface/mapstriface_test.go b/libbeat/common/schema/mapstriface/mapstriface_test.go index 9bd53cb404d9..dcc56b24addb 100644 --- a/libbeat/common/schema/mapstriface/mapstriface_test.go +++ b/libbeat/common/schema/mapstriface/mapstriface_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" ) func TestConversions(t *testing.T) { diff --git a/libbeat/common/schema/mapstrstr/mapstrstr.go b/libbeat/common/schema/mapstrstr/mapstrstr.go index 7b9dae83f14b..0e114a720963 100644 --- a/libbeat/common/schema/mapstrstr/mapstrstr.go +++ b/libbeat/common/schema/mapstrstr/mapstrstr.go @@ -62,8 +62,8 @@ import ( "strconv" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/schema" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/schema" ) // toBool converts value to bool. In case of error, returns false diff --git a/libbeat/common/schema/mapstrstr/mapstrstr_test.go b/libbeat/common/schema/mapstrstr/mapstrstr_test.go index 240c7db77ec2..486f8e968f68 100644 --- a/libbeat/common/schema/mapstrstr/mapstrstr_test.go +++ b/libbeat/common/schema/mapstrstr/mapstrstr_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" ) func TestConversions(t *testing.T) { diff --git a/libbeat/common/schema/options.go b/libbeat/common/schema/options.go index b7d365367008..0f8b7e28840a 100644 --- a/libbeat/common/schema/options.go +++ b/libbeat/common/schema/options.go @@ -20,7 +20,7 @@ package schema import ( "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // DefaultApplyOptions are the default options for Apply() diff --git a/libbeat/common/schema/options_test.go b/libbeat/common/schema/options_test.go index 0e4271d7c219..ecc65ead7141 100644 --- a/libbeat/common/schema/options_test.go +++ b/libbeat/common/schema/options_test.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestApplyOptions(t *testing.T) { diff --git a/libbeat/common/schema/schema.go b/libbeat/common/schema/schema.go index fe9cd7945882..1df3388d39be 100644 --- a/libbeat/common/schema/schema.go +++ b/libbeat/common/schema/schema.go @@ -20,9 +20,9 @@ package schema import ( "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Schema describes how a map[string]interface{} object can be parsed and converted into diff --git a/libbeat/common/schema/schema_test.go b/libbeat/common/schema/schema_test.go index 58299c3d5d20..3b6b453e8071 100644 --- a/libbeat/common/schema/schema_test.go +++ b/libbeat/common/schema/schema_test.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func nop(key string, data map[string]interface{}) (interface{}, error) { diff --git a/libbeat/common/seccomp/seccomp.go b/libbeat/common/seccomp/seccomp.go index 9971934a9f8f..e877fcbeab1c 100644 --- a/libbeat/common/seccomp/seccomp.go +++ b/libbeat/common/seccomp/seccomp.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/elastic/go-seccomp-bpf" ) diff --git a/libbeat/common/streambuf/net.go b/libbeat/common/streambuf/net.go index 10ed41336d31..d6db9d4337d6 100644 --- a/libbeat/common/streambuf/net.go +++ b/libbeat/common/streambuf/net.go @@ -20,7 +20,7 @@ package streambuf // read integers in network byte order import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Parse 8bit binary value from Buffer. diff --git a/libbeat/common/transport/tlscommon/ca_pinning_test.go b/libbeat/common/transport/tlscommon/ca_pinning_test.go index a9f95e5c6ac7..c188a20e63a6 100644 --- a/libbeat/common/transport/tlscommon/ca_pinning_test.go +++ b/libbeat/common/transport/tlscommon/ca_pinning_test.go @@ -36,7 +36,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var ser int64 = 1 diff --git a/libbeat/common/transport/tlscommon/server_config.go b/libbeat/common/transport/tlscommon/server_config.go index 8e0e668faa8a..3cea793eaab6 100644 --- a/libbeat/common/transport/tlscommon/server_config.go +++ b/libbeat/common/transport/tlscommon/server_config.go @@ -22,7 +22,7 @@ import ( "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // ServerConfig defines the user configurable tls options for any TCP based service. diff --git a/libbeat/common/transport/tlscommon/tls.go b/libbeat/common/transport/tlscommon/tls.go index c239299af4bf..432073226efd 100644 --- a/libbeat/common/transport/tlscommon/tls.go +++ b/libbeat/common/transport/tlscommon/tls.go @@ -26,7 +26,7 @@ import ( "fmt" "io/ioutil" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // LoadCertificate will load a certificate from disk and return a tls.Certificate or error diff --git a/libbeat/common/transport/tlscommon/tls_config.go b/libbeat/common/transport/tlscommon/tls_config.go index 5d8ce9360292..346d796ee82a 100644 --- a/libbeat/common/transport/tlscommon/tls_config.go +++ b/libbeat/common/transport/tlscommon/tls_config.go @@ -21,7 +21,7 @@ import ( "crypto/tls" "crypto/x509" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // TLSConfig is the interface used to configure a tcp client or server from a `Config` diff --git a/libbeat/common/transport/tlscommon/tls_test.go b/libbeat/common/transport/tlscommon/tls_test.go index 33233c787c9d..94e74a49b920 100644 --- a/libbeat/common/transport/tlscommon/tls_test.go +++ b/libbeat/common/transport/tlscommon/tls_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // test TLS config loading diff --git a/libbeat/common/useragent/useragent.go b/libbeat/common/useragent/useragent.go index 5275fcdafc25..fdff31c2dc15 100644 --- a/libbeat/common/useragent/useragent.go +++ b/libbeat/common/useragent/useragent.go @@ -21,7 +21,7 @@ import ( "fmt" "runtime" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/version" ) // UserAgent takes the capitalized name of the current beat and returns diff --git a/libbeat/conditions/and_test.go b/libbeat/conditions/and_test.go index 468080c2380d..74d3cf63e901 100644 --- a/libbeat/conditions/and_test.go +++ b/libbeat/conditions/and_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestANDCondition(t *testing.T) { diff --git a/libbeat/conditions/conditions.go b/libbeat/conditions/conditions.go index 9ddd39ac4fed..8a0c823564f9 100644 --- a/libbeat/conditions/conditions.go +++ b/libbeat/conditions/conditions.go @@ -20,8 +20,8 @@ package conditions import ( "errors" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/logp" ) const logName = "conditions" diff --git a/libbeat/conditions/conditions_benchmarks_test.go b/libbeat/conditions/conditions_benchmarks_test.go index dddd3a086008..1ccfe400334a 100644 --- a/libbeat/conditions/conditions_benchmarks_test.go +++ b/libbeat/conditions/conditions_benchmarks_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func BenchmarkSimpleCondition(b *testing.B) { diff --git a/libbeat/conditions/conditions_test.go b/libbeat/conditions/conditions_test.go index 3f91d2f3768d..0977fe313e1b 100644 --- a/libbeat/conditions/conditions_test.go +++ b/libbeat/conditions/conditions_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestCreateNilCondition(t *testing.T) { diff --git a/libbeat/conditions/equals.go b/libbeat/conditions/equals.go index 1cd176276763..6662e34ea635 100644 --- a/libbeat/conditions/equals.go +++ b/libbeat/conditions/equals.go @@ -20,7 +20,7 @@ package conditions import ( "fmt" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type equalsValue struct { diff --git a/libbeat/conditions/matcher.go b/libbeat/conditions/matcher.go index 788546af9a93..5a70df61cb61 100644 --- a/libbeat/conditions/matcher.go +++ b/libbeat/conditions/matcher.go @@ -20,8 +20,8 @@ package conditions import ( "fmt" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/logp" ) type matcherMap map[string]match.Matcher diff --git a/libbeat/conditions/matcher_test.go b/libbeat/conditions/matcher_test.go index cd4986f175c7..13d144625945 100644 --- a/libbeat/conditions/matcher_test.go +++ b/libbeat/conditions/matcher_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestRegxpCreate(t *testing.T) { diff --git a/libbeat/conditions/network.go b/libbeat/conditions/network.go index 2b0b2df42b79..e5c732d469e1 100644 --- a/libbeat/conditions/network.go +++ b/libbeat/conditions/network.go @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var ( diff --git a/libbeat/conditions/network_test.go b/libbeat/conditions/network_test.go index 57676eca54dc..9effaf622661 100644 --- a/libbeat/conditions/network_test.go +++ b/libbeat/conditions/network_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestNetworkConfigUnpack(t *testing.T) { diff --git a/libbeat/conditions/not_test.go b/libbeat/conditions/not_test.go index bc8c6f494058..f3a4fe715a5a 100644 --- a/libbeat/conditions/not_test.go +++ b/libbeat/conditions/not_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestNOTCondition(t *testing.T) { diff --git a/libbeat/conditions/or_test.go b/libbeat/conditions/or_test.go index e09fd903bf43..26ddef3cf1a4 100644 --- a/libbeat/conditions/or_test.go +++ b/libbeat/conditions/or_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestORCondition(t *testing.T) { diff --git a/libbeat/conditions/range.go b/libbeat/conditions/range.go index 4ab7bb90d76d..063a98e3152d 100644 --- a/libbeat/conditions/range.go +++ b/libbeat/conditions/range.go @@ -22,8 +22,8 @@ import ( "reflect" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type rangeValue struct { diff --git a/libbeat/conditions/range_test.go b/libbeat/conditions/range_test.go index 4ac99dc01e04..311df2115809 100644 --- a/libbeat/conditions/range_test.go +++ b/libbeat/conditions/range_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestRangeCreateNumeric(t *testing.T) { diff --git a/libbeat/dashboards/dashboards.go b/libbeat/dashboards/dashboards.go index c1ba0ca9b1c4..8049d114dac8 100644 --- a/libbeat/dashboards/dashboards.go +++ b/libbeat/dashboards/dashboards.go @@ -25,8 +25,8 @@ import ( errw "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // ImportDashboards tries to import the kibana dashboards. diff --git a/libbeat/dashboards/decode.go b/libbeat/dashboards/decode.go index 2b659d7251eb..8a0235e38943 100644 --- a/libbeat/dashboards/decode.go +++ b/libbeat/dashboards/decode.go @@ -21,8 +21,8 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var ( diff --git a/libbeat/dashboards/export.go b/libbeat/dashboards/export.go index 4e9a91309be8..4bd6ed826f22 100644 --- a/libbeat/dashboards/export.go +++ b/libbeat/dashboards/export.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" "gopkg.in/yaml.v2" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/kibana" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/kibana" ) const ( diff --git a/libbeat/dashboards/importer.go b/libbeat/dashboards/importer.go index 40d0e68a22e2..eb399ba1b3d8 100644 --- a/libbeat/dashboards/importer.go +++ b/libbeat/dashboards/importer.go @@ -31,7 +31,7 @@ import ( errw "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // ErrNotFound returned when we cannot find any dashboard to import. diff --git a/libbeat/dashboards/kibana_loader.go b/libbeat/dashboards/kibana_loader.go index ca7dd345f15b..93dd0e5dc0e3 100644 --- a/libbeat/dashboards/kibana_loader.go +++ b/libbeat/dashboards/kibana_loader.go @@ -25,9 +25,9 @@ import ( "net/url" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/kibana" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/kibana" + "github.com/elastic/beats/v7/libbeat/logp" ) var importAPI = "/api/kibana/dashboards/import" diff --git a/libbeat/dashboards/modify_json.go b/libbeat/dashboards/modify_json.go index f844a0bb19bc..c8b1c79da6b0 100644 --- a/libbeat/dashboards/modify_json.go +++ b/libbeat/dashboards/modify_json.go @@ -22,8 +22,8 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type JSONObjectAttribute struct { diff --git a/libbeat/dashboards/modify_json_test.go b/libbeat/dashboards/modify_json_test.go index d7e54827ba85..08fedac4df33 100644 --- a/libbeat/dashboards/modify_json_test.go +++ b/libbeat/dashboards/modify_json_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestReplaceStringInDashboard(t *testing.T) { diff --git a/libbeat/feature/registry.go b/libbeat/feature/registry.go index 77d829ac994d..2449654152af 100644 --- a/libbeat/feature/registry.go +++ b/libbeat/feature/registry.go @@ -23,7 +23,7 @@ import ( "strings" "sync" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type mapper map[string]map[string]Featurable diff --git a/libbeat/idxmgmt/client_handler.go b/libbeat/idxmgmt/client_handler.go index 9feba65ebd78..ee5b3e22c861 100644 --- a/libbeat/idxmgmt/client_handler.go +++ b/libbeat/idxmgmt/client_handler.go @@ -18,9 +18,9 @@ package idxmgmt import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/template" ) // ClientHandler defines the interface between a remote service and the Manager for ILM and templates. diff --git a/libbeat/idxmgmt/idxmgmt.go b/libbeat/idxmgmt/idxmgmt.go index 6837af03d13d..c6e67cc7540e 100644 --- a/libbeat/idxmgmt/idxmgmt.go +++ b/libbeat/idxmgmt/idxmgmt.go @@ -21,12 +21,12 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/template" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/template" ) // SupportFactory is used to provide custom index management support to libbeat. diff --git a/libbeat/idxmgmt/ilm/client_handler.go b/libbeat/idxmgmt/ilm/client_handler.go index df5ca22a0542..12b739c99467 100644 --- a/libbeat/idxmgmt/ilm/client_handler.go +++ b/libbeat/idxmgmt/ilm/client_handler.go @@ -23,7 +23,7 @@ import ( "net/url" "path" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // ClientHandler defines the interface between a remote service and the Manager. diff --git a/libbeat/idxmgmt/ilm/client_handler_integration_test.go b/libbeat/idxmgmt/ilm/client_handler_integration_test.go index a9333ba6adce..2d9c2ca721e5 100644 --- a/libbeat/idxmgmt/ilm/client_handler_integration_test.go +++ b/libbeat/idxmgmt/ilm/client_handler_integration_test.go @@ -30,11 +30,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/version" ) const ( diff --git a/libbeat/idxmgmt/ilm/config.go b/libbeat/idxmgmt/ilm/config.go index 3697d808f4e7..de78cdbce551 100644 --- a/libbeat/idxmgmt/ilm/config.go +++ b/libbeat/idxmgmt/ilm/config.go @@ -22,9 +22,9 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" ) // Config is used for unpacking a common.Config. diff --git a/libbeat/idxmgmt/ilm/ilm.go b/libbeat/idxmgmt/ilm/ilm.go index d9f6bbe6a06e..ac87161c481c 100644 --- a/libbeat/idxmgmt/ilm/ilm.go +++ b/libbeat/idxmgmt/ilm/ilm.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/logp" ) // SupportFactory is used to define a policy type to be used. diff --git a/libbeat/idxmgmt/ilm/ilm_test.go b/libbeat/idxmgmt/ilm/ilm_test.go index cc751d2bd4b5..e47a9c0d06bc 100644 --- a/libbeat/idxmgmt/ilm/ilm_test.go +++ b/libbeat/idxmgmt/ilm/ilm_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestDefaultSupport_Init(t *testing.T) { diff --git a/libbeat/idxmgmt/ilm/noop.go b/libbeat/idxmgmt/ilm/noop.go index 7acbafbb645b..b516acf8aceb 100644 --- a/libbeat/idxmgmt/ilm/noop.go +++ b/libbeat/idxmgmt/ilm/noop.go @@ -18,8 +18,8 @@ package ilm import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type noopSupport struct{} diff --git a/libbeat/idxmgmt/ilm/std.go b/libbeat/idxmgmt/ilm/std.go index fbb497857f91..0e33fc00f3ed 100644 --- a/libbeat/idxmgmt/ilm/std.go +++ b/libbeat/idxmgmt/ilm/std.go @@ -20,7 +20,7 @@ package ilm import ( "time" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type stdSupport struct { diff --git a/libbeat/idxmgmt/mockilm_test.go b/libbeat/idxmgmt/mockilm_test.go index a36e17bd4211..6022ad843b42 100644 --- a/libbeat/idxmgmt/mockilm_test.go +++ b/libbeat/idxmgmt/mockilm_test.go @@ -20,10 +20,10 @@ package idxmgmt import ( "github.com/stretchr/testify/mock" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/logp" ) type mockILMSupport struct { diff --git a/libbeat/idxmgmt/std.go b/libbeat/idxmgmt/std.go index bb961712436e..a6aff9af9d34 100644 --- a/libbeat/idxmgmt/std.go +++ b/libbeat/idxmgmt/std.go @@ -21,14 +21,14 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/template" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/template" ) type indexSupport struct { diff --git a/libbeat/idxmgmt/std_test.go b/libbeat/idxmgmt/std_test.go index b3ba0b123edf..ea23a53fd848 100644 --- a/libbeat/idxmgmt/std_test.go +++ b/libbeat/idxmgmt/std_test.go @@ -25,11 +25,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt/ilm" - "github.com/elastic/beats/libbeat/mapping" - "github.com/elastic/beats/libbeat/template" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt/ilm" + "github.com/elastic/beats/v7/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/template" ) type mockClientHandler struct { diff --git a/libbeat/keystore/file_keystore.go b/libbeat/keystore/file_keystore.go index 357002cb1510..36a21359043e 100644 --- a/libbeat/keystore/file_keystore.go +++ b/libbeat/keystore/file_keystore.go @@ -34,8 +34,8 @@ import ( "golang.org/x/crypto/pbkdf2" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/file" ) const ( diff --git a/libbeat/keystore/file_keystore_test.go b/libbeat/keystore/file_keystore_test.go index 42eb36f2c4ed..5626a68d5911 100644 --- a/libbeat/keystore/file_keystore_test.go +++ b/libbeat/keystore/file_keystore_test.go @@ -27,7 +27,7 @@ import ( "github.com/docker/docker/pkg/ioutils" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var keyValue = "output.elasticsearch.password" diff --git a/libbeat/keystore/keystore.go b/libbeat/keystore/keystore.go index 15937b5163e8..57f1cd707e8a 100644 --- a/libbeat/keystore/keystore.go +++ b/libbeat/keystore/keystore.go @@ -21,7 +21,7 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ucfg "github.com/elastic/go-ucfg" "github.com/elastic/go-ucfg/parse" ) diff --git a/libbeat/kibana/client.go b/libbeat/kibana/client.go index 174ef1113db1..85c7aac17a79 100644 --- a/libbeat/kibana/client.go +++ b/libbeat/kibana/client.go @@ -31,10 +31,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type Connection struct { diff --git a/libbeat/kibana/client_config.go b/libbeat/kibana/client_config.go index 3d55c6998bec..07897b9fad9a 100644 --- a/libbeat/kibana/client_config.go +++ b/libbeat/kibana/client_config.go @@ -20,7 +20,7 @@ package kibana import ( "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) // ClientConfig to connect to Kibana diff --git a/libbeat/kibana/dashboard.go b/libbeat/kibana/dashboard.go index 6da7f39530cc..d5174b5b1a5a 100644 --- a/libbeat/kibana/dashboard.go +++ b/libbeat/kibana/dashboard.go @@ -21,7 +21,7 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // RemoveIndexPattern removes the index pattern entry from a given dashboard export diff --git a/libbeat/kibana/fields_transformer.go b/libbeat/kibana/fields_transformer.go index b5ffd82fa043..7009484e573f 100644 --- a/libbeat/kibana/fields_transformer.go +++ b/libbeat/kibana/fields_transformer.go @@ -21,8 +21,8 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" ) var v640 = common.MustNewVersion("6.4.0") diff --git a/libbeat/kibana/fields_transformer_test.go b/libbeat/kibana/fields_transformer_test.go index be2fd6864fc9..fc7e9485536f 100644 --- a/libbeat/kibana/fields_transformer_test.go +++ b/libbeat/kibana/fields_transformer_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" ) var ( diff --git a/libbeat/kibana/index_pattern_generator.go b/libbeat/kibana/index_pattern_generator.go index 93b5406c2de0..abe8634c862b 100644 --- a/libbeat/kibana/index_pattern_generator.go +++ b/libbeat/kibana/index_pattern_generator.go @@ -24,8 +24,8 @@ import ( "path/filepath" "regexp" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" ) type IndexPatternGenerator struct { diff --git a/libbeat/kibana/index_pattern_generator_test.go b/libbeat/kibana/index_pattern_generator_test.go index 6d327c3e3cb3..f2a7c86784d6 100644 --- a/libbeat/kibana/index_pattern_generator_test.go +++ b/libbeat/kibana/index_pattern_generator_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const ( diff --git a/libbeat/kibana/transformer.go b/libbeat/kibana/transformer.go index f99dd5ff0c07..6e2b086e28bc 100644 --- a/libbeat/kibana/transformer.go +++ b/libbeat/kibana/transformer.go @@ -18,7 +18,7 @@ package kibana import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/go-ucfg/yaml" ) diff --git a/libbeat/libbeat.go b/libbeat/libbeat.go index 03327a00ec1c..70ebf26a5160 100644 --- a/libbeat/libbeat.go +++ b/libbeat/libbeat.go @@ -20,8 +20,8 @@ package main import ( "os" - "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/mock" + "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/mock" ) var RootCmd = cmd.GenRootCmdWithSettings(mock.New, mock.Settings) diff --git a/libbeat/libbeat_test.go b/libbeat/libbeat_test.go index b45fca1d7d20..d1d06506c87e 100644 --- a/libbeat/libbeat_test.go +++ b/libbeat/libbeat_test.go @@ -21,7 +21,7 @@ import ( "flag" "testing" - "github.com/elastic/beats/libbeat/tests/system/template" + "github.com/elastic/beats/v7/libbeat/tests/system/template" ) var systemTest *bool diff --git a/libbeat/logp/configure/logging.go b/libbeat/logp/configure/logging.go index be1a7c5c6ab3..6e4d60ece1f3 100644 --- a/libbeat/logp/configure/logging.go +++ b/libbeat/logp/configure/logging.go @@ -22,8 +22,8 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // CLI flags for configuring logging. diff --git a/libbeat/logp/core.go b/libbeat/logp/core.go index 5dd990714f41..b0204a62ac76 100644 --- a/libbeat/logp/core.go +++ b/libbeat/logp/core.go @@ -32,8 +32,8 @@ import ( "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest/observer" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/paths" ) var ( diff --git a/libbeat/magefile.go b/libbeat/magefile.go index eb5dfe022af1..ff168daec533 100644 --- a/libbeat/magefile.go +++ b/libbeat/magefile.go @@ -22,12 +22,12 @@ package main import ( "context" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/common" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/unittest" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" ) // Build builds the Beat binary. diff --git a/libbeat/management/management.go b/libbeat/management/management.go index 8299365bfe3e..fb6c89ba8706 100644 --- a/libbeat/management/management.go +++ b/libbeat/management/management.go @@ -20,9 +20,9 @@ package management import ( "github.com/gofrs/uuid" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/feature" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/feature" ) // Namespace is the feature namespace for queue definition. diff --git a/libbeat/mapping/field_test.go b/libbeat/mapping/field_test.go index 6d2bfe49551e..0236ac4a6ae5 100644 --- a/libbeat/mapping/field_test.go +++ b/libbeat/mapping/field_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/go-ucfg/yaml" ) diff --git a/libbeat/metric/system/cpu/cpu.go b/libbeat/metric/system/cpu/cpu.go index b5cb6981fb87..abf274ff066c 100644 --- a/libbeat/metric/system/cpu/cpu.go +++ b/libbeat/metric/system/cpu/cpu.go @@ -22,7 +22,7 @@ package cpu import ( "runtime" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" sigar "github.com/elastic/gosigar" ) diff --git a/libbeat/metric/system/host/host.go b/libbeat/metric/system/host/host.go index 25cfb814749c..0d143ed2499e 100644 --- a/libbeat/metric/system/host/host.go +++ b/libbeat/metric/system/host/host.go @@ -18,8 +18,8 @@ package host import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" "github.com/elastic/go-sysinfo" "github.com/elastic/go-sysinfo/types" ) diff --git a/libbeat/metric/system/memory/memory.go b/libbeat/metric/system/memory/memory.go index d2833d4b092c..9351ac08e9e5 100644 --- a/libbeat/metric/system/memory/memory.go +++ b/libbeat/metric/system/memory/memory.go @@ -22,8 +22,8 @@ package memory import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" sysinfo "github.com/elastic/go-sysinfo" sysinfotypes "github.com/elastic/go-sysinfo/types" sigar "github.com/elastic/gosigar" diff --git a/libbeat/metric/system/process/process.go b/libbeat/metric/system/process/process.go index 544bacc7ec6d..7c5d70ebbc69 100644 --- a/libbeat/metric/system/process/process.go +++ b/libbeat/metric/system/process/process.go @@ -29,10 +29,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/metric/system/memory" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/metric/system/memory" sigar "github.com/elastic/gosigar" ) diff --git a/libbeat/metric/system/process/process_test.go b/libbeat/metric/system/process/process_test.go index 23b19610417b..527f6030716a 100644 --- a/libbeat/metric/system/process/process_test.go +++ b/libbeat/metric/system/process/process_test.go @@ -29,7 +29,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/gosigar" ) diff --git a/libbeat/mock/mockbeat.go b/libbeat/mock/mockbeat.go index 4a7dd1e01542..6224534c03be 100644 --- a/libbeat/mock/mockbeat.go +++ b/libbeat/mock/mockbeat.go @@ -20,10 +20,10 @@ package mock import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) ///*** Mock Beat Setup ***/// diff --git a/libbeat/monitoring/adapter/filters.go b/libbeat/monitoring/adapter/filters.go index c596a7f8763c..9d0f68e933b6 100644 --- a/libbeat/monitoring/adapter/filters.go +++ b/libbeat/monitoring/adapter/filters.go @@ -20,8 +20,8 @@ package adapter import ( "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" ) // provide filters for filtering and adapting a metric type diff --git a/libbeat/monitoring/adapter/go-metrics-wrapper.go b/libbeat/monitoring/adapter/go-metrics-wrapper.go index 815bc1284870..20f3714aa04d 100644 --- a/libbeat/monitoring/adapter/go-metrics-wrapper.go +++ b/libbeat/monitoring/adapter/go-metrics-wrapper.go @@ -20,7 +20,7 @@ package adapter import ( metrics "github.com/rcrowley/go-metrics" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) // go-metrics wrapper interface required to unpack the original metric diff --git a/libbeat/monitoring/adapter/go-metrics.go b/libbeat/monitoring/adapter/go-metrics.go index 69b043687971..27fbfbf4aff0 100644 --- a/libbeat/monitoring/adapter/go-metrics.go +++ b/libbeat/monitoring/adapter/go-metrics.go @@ -24,8 +24,8 @@ import ( metrics "github.com/rcrowley/go-metrics" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) // implement adapter for adding go-metrics based counters diff --git a/libbeat/monitoring/adapter/go-metrics_test.go b/libbeat/monitoring/adapter/go-metrics_test.go index 07aaf0e4a81b..1715b6c69fbe 100644 --- a/libbeat/monitoring/adapter/go-metrics_test.go +++ b/libbeat/monitoring/adapter/go-metrics_test.go @@ -24,7 +24,7 @@ import ( metrics "github.com/rcrowley/go-metrics" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) func TestGoMetricsAdapter(t *testing.T) { diff --git a/libbeat/monitoring/cloudid.go b/libbeat/monitoring/cloudid.go index 73e08bed4574..d6a53f7bc143 100644 --- a/libbeat/monitoring/cloudid.go +++ b/libbeat/monitoring/cloudid.go @@ -22,8 +22,8 @@ import ( errw "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/cloudid" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/cloudid" + "github.com/elastic/beats/v7/libbeat/common" ) type cloudConfig struct { diff --git a/libbeat/monitoring/cloudid_test.go b/libbeat/monitoring/cloudid_test.go index 0ac5acf13140..d9935fbb67bd 100644 --- a/libbeat/monitoring/cloudid_test.go +++ b/libbeat/monitoring/cloudid_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestOverrideWithCloudSettings(t *testing.T) { diff --git a/libbeat/monitoring/metrics.go b/libbeat/monitoring/metrics.go index 364ee6b21e5a..22ad0482b1d2 100644 --- a/libbeat/monitoring/metrics.go +++ b/libbeat/monitoring/metrics.go @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" ) // makeExpvar wraps a callback for registering a metrics with expvar.Publish. diff --git a/libbeat/monitoring/monitoring.go b/libbeat/monitoring/monitoring.go index 48b854a773e7..04014b818cb4 100644 --- a/libbeat/monitoring/monitoring.go +++ b/libbeat/monitoring/monitoring.go @@ -20,9 +20,9 @@ package monitoring import ( "errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/monitoring/report" ) // BeatConfig represents the part of the $BEAT.yml to do with monitoring settings diff --git a/libbeat/monitoring/report/elasticsearch/client.go b/libbeat/monitoring/report/elasticsearch/client.go index 6f47c6b62095..ca3aeda9566b 100644 --- a/libbeat/monitoring/report/elasticsearch/client.go +++ b/libbeat/monitoring/report/elasticsearch/client.go @@ -25,12 +25,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring/report" - esout "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring/report" + esout "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/testing" ) var createDocPrivAvailableESVersion = common.MustNewVersion("7.5.0") diff --git a/libbeat/monitoring/report/elasticsearch/config.go b/libbeat/monitoring/report/elasticsearch/config.go index 4f355e270054..a603c73788bd 100644 --- a/libbeat/monitoring/report/elasticsearch/config.go +++ b/libbeat/monitoring/report/elasticsearch/config.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/monitoring/report" ) // config is subset of libbeat/outputs/elasticsearch config tailored diff --git a/libbeat/monitoring/report/elasticsearch/elasticsearch.go b/libbeat/monitoring/report/elasticsearch/elasticsearch.go index c755feec120d..b84ea9e1d67a 100644 --- a/libbeat/monitoring/report/elasticsearch/elasticsearch.go +++ b/libbeat/monitoring/report/elasticsearch/elasticsearch.go @@ -27,20 +27,20 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/report" - "github.com/elastic/beats/libbeat/outputs" - esout "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/publisher/pipeline" - "github.com/elastic/beats/libbeat/publisher/processing" - "github.com/elastic/beats/libbeat/publisher/queue" - "github.com/elastic/beats/libbeat/publisher/queue/memqueue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/outputs" + esout "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/publisher/pipeline" + "github.com/elastic/beats/v7/libbeat/publisher/processing" + "github.com/elastic/beats/v7/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/publisher/queue/memqueue" ) type reporter struct { diff --git a/libbeat/monitoring/report/elasticsearch/snapshot.go b/libbeat/monitoring/report/elasticsearch/snapshot.go index 62766174c2a4..72c4c69fb790 100644 --- a/libbeat/monitoring/report/elasticsearch/snapshot.go +++ b/libbeat/monitoring/report/elasticsearch/snapshot.go @@ -18,8 +18,8 @@ package elasticsearch import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" ) func makeSnapshot(R *monitoring.Registry) common.MapStr { diff --git a/libbeat/monitoring/report/event.go b/libbeat/monitoring/report/event.go index bdcab64ccc08..f7d1e923c1be 100644 --- a/libbeat/monitoring/report/event.go +++ b/libbeat/monitoring/report/event.go @@ -20,7 +20,7 @@ package report import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Event is the format of monitoring events. diff --git a/libbeat/monitoring/report/log/log.go b/libbeat/monitoring/report/log/log.go index bd6bf9e43cc2..2e8ef566bcfd 100644 --- a/libbeat/monitoring/report/log/log.go +++ b/libbeat/monitoring/report/log/log.go @@ -21,11 +21,11 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/report" ) // List of metrics that are gauges. This is used to identify metrics that should diff --git a/libbeat/monitoring/report/log/log_test.go b/libbeat/monitoring/report/log/log_test.go index 3d7091d781c2..4d0e215d6c8c 100644 --- a/libbeat/monitoring/report/log/log_test.go +++ b/libbeat/monitoring/report/log/log_test.go @@ -23,10 +23,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var ( diff --git a/libbeat/monitoring/report/report.go b/libbeat/monitoring/report/report.go index 1b05b85bb49e..e6812515af97 100644 --- a/libbeat/monitoring/report/report.go +++ b/libbeat/monitoring/report/report.go @@ -21,8 +21,8 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // Format encodes the type of format to report monitoring data in. This diff --git a/libbeat/outputs/backoff.go b/libbeat/outputs/backoff.go index dca02fc88fc5..256b8029b099 100644 --- a/libbeat/outputs/backoff.go +++ b/libbeat/outputs/backoff.go @@ -21,9 +21,9 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/common/backoff" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/common/backoff" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/testing" ) type backoffClient struct { diff --git a/libbeat/outputs/codec/codec.go b/libbeat/outputs/codec/codec.go index 790611ddaea6..347738d9c5a3 100644 --- a/libbeat/outputs/codec/codec.go +++ b/libbeat/outputs/codec/codec.go @@ -17,7 +17,7 @@ package codec -import "github.com/elastic/beats/libbeat/beat" +import "github.com/elastic/beats/v7/libbeat/beat" type Codec interface { Encode(index string, event *beat.Event) ([]byte, error) diff --git a/libbeat/outputs/codec/codec_reg.go b/libbeat/outputs/codec/codec_reg.go index 7db8aee58f21..b4468bba9328 100644 --- a/libbeat/outputs/codec/codec_reg.go +++ b/libbeat/outputs/codec/codec_reg.go @@ -20,8 +20,8 @@ package codec import ( "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type Factory func(beat.Info, *common.Config) (Codec, error) diff --git a/libbeat/outputs/codec/common.go b/libbeat/outputs/codec/common.go index d3df85dc5346..296e0aff3896 100644 --- a/libbeat/outputs/codec/common.go +++ b/libbeat/outputs/codec/common.go @@ -20,8 +20,8 @@ package codec import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/dtfmt" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/dtfmt" "github.com/elastic/go-structform" ) diff --git a/libbeat/outputs/codec/format/format.go b/libbeat/outputs/codec/format/format.go index 0416222dc2e0..1be9268fa3d1 100644 --- a/libbeat/outputs/codec/format/format.go +++ b/libbeat/outputs/codec/format/format.go @@ -20,10 +20,10 @@ package format import ( "errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/outputs/codec" ) type Encoder struct { diff --git a/libbeat/outputs/codec/format/format_test.go b/libbeat/outputs/codec/format/format_test.go index 191ee5520064..96ded4f78410 100644 --- a/libbeat/outputs/codec/format/format_test.go +++ b/libbeat/outputs/codec/format/format_test.go @@ -20,9 +20,9 @@ package format import ( "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" ) func TestFormatStringWriter(t *testing.T) { diff --git a/libbeat/outputs/codec/json/event.go b/libbeat/outputs/codec/json/event.go index 2f0d2c1217b0..c966df28f5f9 100644 --- a/libbeat/outputs/codec/json/event.go +++ b/libbeat/outputs/codec/json/event.go @@ -20,8 +20,8 @@ package json import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // Event describes the event structure for events diff --git a/libbeat/outputs/codec/json/json.go b/libbeat/outputs/codec/json/json.go index 45b875b3ba9f..01d4f324104e 100644 --- a/libbeat/outputs/codec/json/json.go +++ b/libbeat/outputs/codec/json/json.go @@ -21,9 +21,9 @@ import ( "bytes" stdjson "encoding/json" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/codec" "github.com/elastic/go-structform/gotype" "github.com/elastic/go-structform/json" ) diff --git a/libbeat/outputs/codec/json/json_bench_test.go b/libbeat/outputs/codec/json/json_bench_test.go index 8d60362b3d5e..dbdde0fa33e5 100644 --- a/libbeat/outputs/codec/json/json_bench_test.go +++ b/libbeat/outputs/codec/json/json_bench_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) var result []byte diff --git a/libbeat/outputs/codec/json/json_test.go b/libbeat/outputs/codec/json/json_test.go index dc01e397e0bd..be2381e38c46 100644 --- a/libbeat/outputs/codec/json/json_test.go +++ b/libbeat/outputs/codec/json/json_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestJsonCodec(t *testing.T) { diff --git a/libbeat/outputs/codec/plugin.go b/libbeat/outputs/codec/plugin.go index 951bae242c09..b99ba36e7ca0 100644 --- a/libbeat/outputs/codec/plugin.go +++ b/libbeat/outputs/codec/plugin.go @@ -21,7 +21,7 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/plugin" ) type codecPlugin struct { diff --git a/libbeat/outputs/console/config.go b/libbeat/outputs/console/config.go index 09debf38aa84..44869e388fa9 100644 --- a/libbeat/outputs/console/config.go +++ b/libbeat/outputs/console/config.go @@ -17,7 +17,7 @@ package console -import "github.com/elastic/beats/libbeat/outputs/codec" +import "github.com/elastic/beats/v7/libbeat/outputs/codec" type Config struct { Codec codec.Config `config:"codec"` diff --git a/libbeat/outputs/console/console.go b/libbeat/outputs/console/console.go index c91d420674dd..3df69f4e5ba2 100644 --- a/libbeat/outputs/console/console.go +++ b/libbeat/outputs/console/console.go @@ -24,13 +24,13 @@ import ( "runtime" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/codec/json" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/publisher" ) type console struct { diff --git a/libbeat/outputs/console/console_test.go b/libbeat/outputs/console/console_test.go index 46c655094ab0..29201beee54c 100644 --- a/libbeat/outputs/console/console_test.go +++ b/libbeat/outputs/console/console_test.go @@ -27,15 +27,15 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/codec/format" - "github.com/elastic/beats/libbeat/outputs/codec/json" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/codec/format" + "github.com/elastic/beats/v7/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/publisher" ) // capture stdout and return captured string diff --git a/libbeat/outputs/elasticsearch/api.go b/libbeat/outputs/elasticsearch/api.go index 91c15cf2a468..d267fb6a98af 100644 --- a/libbeat/outputs/elasticsearch/api.go +++ b/libbeat/outputs/elasticsearch/api.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // QueryResult contains the result of a query. diff --git a/libbeat/outputs/elasticsearch/api_integration_test.go b/libbeat/outputs/elasticsearch/api_integration_test.go index 46020f784de4..41ec6c0634bd 100644 --- a/libbeat/outputs/elasticsearch/api_integration_test.go +++ b/libbeat/outputs/elasticsearch/api_integration_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestIndex(t *testing.T) { diff --git a/libbeat/outputs/elasticsearch/api_mock_test.go b/libbeat/outputs/elasticsearch/api_mock_test.go index 2cd92546fd06..65e687548332 100644 --- a/libbeat/outputs/elasticsearch/api_mock_test.go +++ b/libbeat/outputs/elasticsearch/api_mock_test.go @@ -28,7 +28,7 @@ import ( "strings" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func ElasticsearchMock(code int, body []byte) *httptest.Server { diff --git a/libbeat/outputs/elasticsearch/api_test.go b/libbeat/outputs/elasticsearch/api_test.go index 9ddff5405372..73eaa7708cc4 100644 --- a/libbeat/outputs/elasticsearch/api_test.go +++ b/libbeat/outputs/elasticsearch/api_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) func GetValidQueryResult() QueryResult { diff --git a/libbeat/outputs/elasticsearch/bulkapi.go b/libbeat/outputs/elasticsearch/bulkapi.go index 48c174624306..1eccdb235bce 100644 --- a/libbeat/outputs/elasticsearch/bulkapi.go +++ b/libbeat/outputs/elasticsearch/bulkapi.go @@ -25,7 +25,7 @@ import ( "net/http" "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // MetaBuilder creates meta data for bulk requests diff --git a/libbeat/outputs/elasticsearch/bulkapi_integration_test.go b/libbeat/outputs/elasticsearch/bulkapi_integration_test.go index 594310f666d4..54e2201b398a 100644 --- a/libbeat/outputs/elasticsearch/bulkapi_integration_test.go +++ b/libbeat/outputs/elasticsearch/bulkapi_integration_test.go @@ -24,7 +24,7 @@ import ( "os" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestBulk(t *testing.T) { diff --git a/libbeat/outputs/elasticsearch/bulkapi_mock_test.go b/libbeat/outputs/elasticsearch/bulkapi_mock_test.go index ca927db61c41..a87d0d1046c7 100644 --- a/libbeat/outputs/elasticsearch/bulkapi_mock_test.go +++ b/libbeat/outputs/elasticsearch/bulkapi_mock_test.go @@ -26,7 +26,7 @@ import ( "strings" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestOneHostSuccessResp_Bulk(t *testing.T) { diff --git a/libbeat/outputs/elasticsearch/client.go b/libbeat/outputs/elasticsearch/client.go index 5c3a1bc7b487..9838f355dd55 100644 --- a/libbeat/outputs/elasticsearch/client.go +++ b/libbeat/outputs/elasticsearch/client.go @@ -29,14 +29,14 @@ import ( "net/url" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/testing" ) // Client is an elasticsearch client. diff --git a/libbeat/outputs/elasticsearch/client_integration_test.go b/libbeat/outputs/elasticsearch/client_integration_test.go index b3d2a96d7e70..fb4c62cb86fa 100644 --- a/libbeat/outputs/elasticsearch/client_integration_test.go +++ b/libbeat/outputs/elasticsearch/client_integration_test.go @@ -33,14 +33,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/elasticsearch/internal" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch/internal" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) func TestClientConnect(t *testing.T) { diff --git a/libbeat/outputs/elasticsearch/client_proxy_test.go b/libbeat/outputs/elasticsearch/client_proxy_test.go index 3521a5868e0a..4d57f87fb783 100644 --- a/libbeat/outputs/elasticsearch/client_proxy_test.go +++ b/libbeat/outputs/elasticsearch/client_proxy_test.go @@ -33,8 +33,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) // These constants are inserted into client http request headers and confirmed diff --git a/libbeat/outputs/elasticsearch/client_test.go b/libbeat/outputs/elasticsearch/client_test.go index 72ad6ee22f9c..7a0ac0e68245 100644 --- a/libbeat/outputs/elasticsearch/client_test.go +++ b/libbeat/outputs/elasticsearch/client_test.go @@ -30,14 +30,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/version" ) func readStatusItem(in []byte) (int, string, error) { diff --git a/libbeat/outputs/elasticsearch/config.go b/libbeat/outputs/elasticsearch/config.go index 8178d015b108..4cbf449b6ecb 100644 --- a/libbeat/outputs/elasticsearch/config.go +++ b/libbeat/outputs/elasticsearch/config.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) type elasticsearchConfig struct { diff --git a/libbeat/outputs/elasticsearch/elasticsearch.go b/libbeat/outputs/elasticsearch/elasticsearch.go index 55ef6e82a2c6..0cdad25cbe88 100644 --- a/libbeat/outputs/elasticsearch/elasticsearch.go +++ b/libbeat/outputs/elasticsearch/elasticsearch.go @@ -25,12 +25,12 @@ import ( "github.com/gofrs/uuid" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) func init() { diff --git a/libbeat/outputs/elasticsearch/enc.go b/libbeat/outputs/elasticsearch/enc.go index 11d43c8c4797..8d2497e51829 100644 --- a/libbeat/outputs/elasticsearch/enc.go +++ b/libbeat/outputs/elasticsearch/enc.go @@ -24,9 +24,9 @@ import ( "net/http" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/codec" "github.com/elastic/go-structform/gotype" "github.com/elastic/go-structform/json" ) diff --git a/libbeat/outputs/elasticsearch/enc_test.go b/libbeat/outputs/elasticsearch/enc_test.go index 135bdf0d5f58..0ccea8cd0f40 100644 --- a/libbeat/outputs/elasticsearch/enc_test.go +++ b/libbeat/outputs/elasticsearch/enc_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring/report" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring/report" ) func TestJSONEncoderMarshalBeatEvent(t *testing.T) { diff --git a/libbeat/outputs/elasticsearch/estest/estest.go b/libbeat/outputs/elasticsearch/estest/estest.go index b5334edd5251..3aafc7da0d7f 100644 --- a/libbeat/outputs/elasticsearch/estest/estest.go +++ b/libbeat/outputs/elasticsearch/estest/estest.go @@ -20,9 +20,9 @@ package estest import ( "time" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/outputs/elasticsearch/internal" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch/internal" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) // GetTestingElasticsearch creates a test client. diff --git a/libbeat/outputs/elasticsearch/json_read.go b/libbeat/outputs/elasticsearch/json_read.go index 896ec89f2fae..8df87e5cb431 100644 --- a/libbeat/outputs/elasticsearch/json_read.go +++ b/libbeat/outputs/elasticsearch/json_read.go @@ -20,7 +20,7 @@ package elasticsearch import ( "errors" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) // SAX like json parser. But instead of relying on callbacks, state machine diff --git a/libbeat/outputs/failover.go b/libbeat/outputs/failover.go index 99d379a39436..b388a58a61f0 100644 --- a/libbeat/outputs/failover.go +++ b/libbeat/outputs/failover.go @@ -23,8 +23,8 @@ import ( "math/rand" "strings" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/testing" ) type failoverClient struct { diff --git a/libbeat/outputs/fileout/config.go b/libbeat/outputs/fileout/config.go index 742334ceed0b..4b83cdbab971 100644 --- a/libbeat/outputs/fileout/config.go +++ b/libbeat/outputs/fileout/config.go @@ -20,8 +20,8 @@ package fileout import ( "fmt" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/outputs/codec" ) type config struct { diff --git a/libbeat/outputs/fileout/file.go b/libbeat/outputs/fileout/file.go index ab5b040bea59..5080f9b87e88 100644 --- a/libbeat/outputs/fileout/file.go +++ b/libbeat/outputs/fileout/file.go @@ -21,13 +21,13 @@ import ( "os" "path/filepath" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/file" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/file" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/publisher" ) func init() { diff --git a/libbeat/outputs/hosts.go b/libbeat/outputs/hosts.go index f8b192dba386..2ece4fc3ab8e 100644 --- a/libbeat/outputs/hosts.go +++ b/libbeat/outputs/hosts.go @@ -17,7 +17,7 @@ package outputs -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" // ReadHostList reads a list of hosts to connect to from an configuration // object. If the `workers` settings is > 1, each host is duplicated in the final diff --git a/libbeat/outputs/kafka/client.go b/libbeat/outputs/kafka/client.go index ad1ff3e45de0..e5ab6f2ae858 100644 --- a/libbeat/outputs/kafka/client.go +++ b/libbeat/outputs/kafka/client.go @@ -26,14 +26,14 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/testing" ) type client struct { diff --git a/libbeat/outputs/kafka/config.go b/libbeat/outputs/kafka/config.go index e0cca75718cb..d663b7a61130 100644 --- a/libbeat/outputs/kafka/config.go +++ b/libbeat/outputs/kafka/config.go @@ -25,15 +25,15 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/common/kafka" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/adapter" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/common/kafka" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/adapter" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" ) type kafkaConfig struct { diff --git a/libbeat/outputs/kafka/config_test.go b/libbeat/outputs/kafka/config_test.go index dd74b50ed3d7..ee404666e142 100644 --- a/libbeat/outputs/kafka/config_test.go +++ b/libbeat/outputs/kafka/config_test.go @@ -20,7 +20,7 @@ package kafka import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestConfigAcceptValid(t *testing.T) { diff --git a/libbeat/outputs/kafka/kafka.go b/libbeat/outputs/kafka/kafka.go index 37c478569467..a84d9790b2b8 100644 --- a/libbeat/outputs/kafka/kafka.go +++ b/libbeat/outputs/kafka/kafka.go @@ -23,12 +23,12 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) const ( diff --git a/libbeat/outputs/kafka/kafka_integration_test.go b/libbeat/outputs/kafka/kafka_integration_test.go index 771a402f8d24..58d03d1c1e70 100644 --- a/libbeat/outputs/kafka/kafka_integration_test.go +++ b/libbeat/outputs/kafka/kafka_integration_test.go @@ -32,14 +32,14 @@ import ( "github.com/Shopify/sarama" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - _ "github.com/elastic/beats/libbeat/outputs/codec/format" - _ "github.com/elastic/beats/libbeat/outputs/codec/json" - "github.com/elastic/beats/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/format" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/outputs/outest" ) const ( diff --git a/libbeat/outputs/kafka/log.go b/libbeat/outputs/kafka/log.go index 027f476406ba..11da0e377afc 100644 --- a/libbeat/outputs/kafka/log.go +++ b/libbeat/outputs/kafka/log.go @@ -20,7 +20,7 @@ package kafka import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type kafkaLogger struct{} diff --git a/libbeat/outputs/kafka/message.go b/libbeat/outputs/kafka/message.go index 7254c3908338..16f169b8bd19 100644 --- a/libbeat/outputs/kafka/message.go +++ b/libbeat/outputs/kafka/message.go @@ -22,7 +22,7 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher" ) type message struct { diff --git a/libbeat/outputs/kafka/partition.go b/libbeat/outputs/kafka/partition.go index f903becdbf38..399c6d9de96b 100644 --- a/libbeat/outputs/kafka/partition.go +++ b/libbeat/outputs/kafka/partition.go @@ -28,8 +28,8 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type partitionBuilder func(*common.Config) (func() partitioner, error) diff --git a/libbeat/outputs/kafka/partition_test.go b/libbeat/outputs/kafka/partition_test.go index fed71a283fc0..67ea36444e7e 100644 --- a/libbeat/outputs/kafka/partition_test.go +++ b/libbeat/outputs/kafka/partition_test.go @@ -28,9 +28,9 @@ import ( "github.com/Shopify/sarama" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher" ) type partTestScenario func(*testing.T, bool, sarama.Partitioner) error diff --git a/libbeat/outputs/logstash/async.go b/libbeat/outputs/logstash/async.go index 967ae7d0f6c1..b3357f725893 100644 --- a/libbeat/outputs/logstash/async.go +++ b/libbeat/outputs/logstash/async.go @@ -23,12 +23,12 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/publisher" v2 "github.com/elastic/go-lumber/client/v2" ) diff --git a/libbeat/outputs/logstash/async_test.go b/libbeat/outputs/logstash/async_test.go index b99fb9a57491..fb70962d3b97 100644 --- a/libbeat/outputs/logstash/async_test.go +++ b/libbeat/outputs/logstash/async_test.go @@ -24,10 +24,10 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type testAsyncDriver struct { diff --git a/libbeat/outputs/logstash/client_test.go b/libbeat/outputs/logstash/client_test.go index 30e98fd83094..87cf8e50f436 100644 --- a/libbeat/outputs/logstash/client_test.go +++ b/libbeat/outputs/logstash/client_test.go @@ -26,11 +26,11 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/outputs/transport/transptest" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/outputs/transport/transptest" v2 "github.com/elastic/go-lumber/server/v2" ) diff --git a/libbeat/outputs/logstash/common_test.go b/libbeat/outputs/logstash/common_test.go index 47ae55088fde..75f2aa15e560 100644 --- a/libbeat/outputs/logstash/common_test.go +++ b/libbeat/outputs/logstash/common_test.go @@ -18,7 +18,7 @@ package logstash import ( - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func enableLogging(selectors []string) { diff --git a/libbeat/outputs/logstash/config.go b/libbeat/outputs/logstash/config.go index 6d2a30d39ea6..be6ad1a4f4a5 100644 --- a/libbeat/outputs/logstash/config.go +++ b/libbeat/outputs/logstash/config.go @@ -21,12 +21,12 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type Config struct { diff --git a/libbeat/outputs/logstash/config_test.go b/libbeat/outputs/logstash/config_test.go index ee3ffe179786..572749bc1a3e 100644 --- a/libbeat/outputs/logstash/config_test.go +++ b/libbeat/outputs/logstash/config_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" ) diff --git a/libbeat/outputs/logstash/enc.go b/libbeat/outputs/logstash/enc.go index fb42626ec5cd..747a7d3fd5be 100644 --- a/libbeat/outputs/logstash/enc.go +++ b/libbeat/outputs/logstash/enc.go @@ -20,8 +20,8 @@ package logstash import ( "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs/codec/json" ) func makeLogstashEventEncoder(info beat.Info, escapeHTML bool, index string) func(interface{}) ([]byte, error) { diff --git a/libbeat/outputs/logstash/logstash.go b/libbeat/outputs/logstash/logstash.go index d1a64a47b269..b2c3bb95565b 100644 --- a/libbeat/outputs/logstash/logstash.go +++ b/libbeat/outputs/logstash/logstash.go @@ -18,12 +18,12 @@ package logstash import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) const ( diff --git a/libbeat/outputs/logstash/logstash_integration_test.go b/libbeat/outputs/logstash/logstash_integration_test.go index 6aca15337fe8..c2170cb25d8a 100644 --- a/libbeat/outputs/logstash/logstash_integration_test.go +++ b/libbeat/outputs/logstash/logstash_integration_test.go @@ -29,14 +29,14 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/idxmgmt" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/idxmgmt" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/outil" ) const ( diff --git a/libbeat/outputs/logstash/logstash_test.go b/libbeat/outputs/logstash/logstash_test.go index e51ae1cdb34c..911e6e22129e 100644 --- a/libbeat/outputs/logstash/logstash_test.go +++ b/libbeat/outputs/logstash/logstash_test.go @@ -25,11 +25,11 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/transport/transptest" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/transport/transptest" v2 "github.com/elastic/go-lumber/server/v2" ) diff --git a/libbeat/outputs/logstash/sync.go b/libbeat/outputs/logstash/sync.go index 8b47ce691cad..cd37e0bbb317 100644 --- a/libbeat/outputs/logstash/sync.go +++ b/libbeat/outputs/logstash/sync.go @@ -20,11 +20,11 @@ package logstash import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/publisher" v2 "github.com/elastic/go-lumber/client/v2" ) diff --git a/libbeat/outputs/logstash/sync_test.go b/libbeat/outputs/logstash/sync_test.go index f9d74cb69cba..5b05c4d0ccc8 100644 --- a/libbeat/outputs/logstash/sync_test.go +++ b/libbeat/outputs/logstash/sync_test.go @@ -24,11 +24,11 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/outest" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/outputs/transport/transptest" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/outputs/transport/transptest" ) type testSyncDriver struct { diff --git a/libbeat/outputs/metrics.go b/libbeat/outputs/metrics.go index 28ac20627da5..602506a1befc 100644 --- a/libbeat/outputs/metrics.go +++ b/libbeat/outputs/metrics.go @@ -17,7 +17,7 @@ package outputs -import "github.com/elastic/beats/libbeat/monitoring" +import "github.com/elastic/beats/v7/libbeat/monitoring" // Stats implements the Observer interface, for collecting metrics on common // outputs events. diff --git a/libbeat/outputs/outest/batch.go b/libbeat/outputs/outest/batch.go index 5cb16f5a830d..11d4bf1a2667 100644 --- a/libbeat/outputs/outest/batch.go +++ b/libbeat/outputs/outest/batch.go @@ -18,8 +18,8 @@ package outest import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/publisher" ) type Batch struct { diff --git a/libbeat/outputs/outil/select.go b/libbeat/outputs/outil/select.go index d06ee4e32091..6ff629c88e75 100644 --- a/libbeat/outputs/outil/select.go +++ b/libbeat/outputs/outil/select.go @@ -21,10 +21,10 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/conditions" ) // Selector is used to produce a string based on the contents of a Beats event. diff --git a/libbeat/outputs/outil/select_test.go b/libbeat/outputs/outil/select_test.go index f6e837966b2d..e16cb602a96d 100644 --- a/libbeat/outputs/outil/select_test.go +++ b/libbeat/outputs/outil/select_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type node map[string]interface{} diff --git a/libbeat/outputs/output_reg.go b/libbeat/outputs/output_reg.go index 6625f1125b1f..86c1323c505b 100644 --- a/libbeat/outputs/output_reg.go +++ b/libbeat/outputs/output_reg.go @@ -20,8 +20,8 @@ package outputs import ( "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) var outputReg = map[string]Factory{} diff --git a/libbeat/outputs/outputs.go b/libbeat/outputs/outputs.go index 2dab0adf06ea..c6808321ce76 100644 --- a/libbeat/outputs/outputs.go +++ b/libbeat/outputs/outputs.go @@ -21,7 +21,7 @@ package outputs import ( - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher" ) // Client provides the minimal interface an output must implement to be usable diff --git a/libbeat/outputs/plugin.go b/libbeat/outputs/plugin.go index 254f93832ce9..b76afedd45a4 100644 --- a/libbeat/outputs/plugin.go +++ b/libbeat/outputs/plugin.go @@ -21,7 +21,7 @@ import ( "errors" "fmt" - p "github.com/elastic/beats/libbeat/plugin" + p "github.com/elastic/beats/v7/libbeat/plugin" ) type outputPlugin struct { diff --git a/libbeat/outputs/redis/backoff.go b/libbeat/outputs/redis/backoff.go index 3084522f6af7..30107df90fa5 100644 --- a/libbeat/outputs/redis/backoff.go +++ b/libbeat/outputs/redis/backoff.go @@ -22,8 +22,8 @@ import ( "github.com/garyburd/redigo/redis" - b "github.com/elastic/beats/libbeat/common/backoff" - "github.com/elastic/beats/libbeat/publisher" + b "github.com/elastic/beats/v7/libbeat/common/backoff" + "github.com/elastic/beats/v7/libbeat/publisher" ) type backoffClient struct { diff --git a/libbeat/outputs/redis/client.go b/libbeat/outputs/redis/client.go index 1764d9e60f99..df1c3b91a59c 100644 --- a/libbeat/outputs/redis/client.go +++ b/libbeat/outputs/redis/client.go @@ -26,14 +26,14 @@ import ( "github.com/garyburd/redigo/redis" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/publisher" ) var ( diff --git a/libbeat/outputs/redis/config.go b/libbeat/outputs/redis/config.go index bcad44af0969..b92c290c2c90 100644 --- a/libbeat/outputs/redis/config.go +++ b/libbeat/outputs/redis/config.go @@ -21,9 +21,9 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type redisConfig struct { diff --git a/libbeat/outputs/redis/redis.go b/libbeat/outputs/redis/redis.go index fe090dd150cc..7c29568123eb 100644 --- a/libbeat/outputs/redis/redis.go +++ b/libbeat/outputs/redis/redis.go @@ -24,15 +24,15 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/outil" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/outil" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type redisOut struct { diff --git a/libbeat/outputs/redis/redis_integration_test.go b/libbeat/outputs/redis/redis_integration_test.go index ef691f25d442..66c3375246a1 100644 --- a/libbeat/outputs/redis/redis_integration_test.go +++ b/libbeat/outputs/redis/redis_integration_test.go @@ -30,12 +30,12 @@ import ( "github.com/garyburd/redigo/redis" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs" - _ "github.com/elastic/beats/libbeat/outputs/codec/format" - _ "github.com/elastic/beats/libbeat/outputs/codec/json" - "github.com/elastic/beats/libbeat/outputs/outest" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/format" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/outputs/outest" ) const ( diff --git a/libbeat/outputs/redis/redis_test.go b/libbeat/outputs/redis/redis_test.go index 387c6b363c4d..5ca91d3fef01 100644 --- a/libbeat/outputs/redis/redis_test.go +++ b/libbeat/outputs/redis/redis_test.go @@ -22,10 +22,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs" - _ "github.com/elastic/beats/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/json" ) type checker func(*testing.T, outputs.Group) diff --git a/libbeat/outputs/tls.go b/libbeat/outputs/tls.go index 468a8f648547..907af8a79fa0 100644 --- a/libbeat/outputs/tls.go +++ b/libbeat/outputs/tls.go @@ -18,7 +18,7 @@ package outputs import ( - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) // Managing TLS option with the outputs package is deprecated move your code to use the tlscommon diff --git a/libbeat/outputs/transport/client.go b/libbeat/outputs/transport/client.go index 7855dfc106ef..338801b444d8 100644 --- a/libbeat/outputs/transport/client.go +++ b/libbeat/outputs/transport/client.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/testing" ) type Client struct { diff --git a/libbeat/outputs/transport/proxy.go b/libbeat/outputs/transport/proxy.go index 95bc7f4d00a8..a755a914a671 100644 --- a/libbeat/outputs/transport/proxy.go +++ b/libbeat/outputs/transport/proxy.go @@ -23,7 +23,7 @@ import ( "golang.org/x/net/proxy" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // ProxyConfig holds the configuration information required to proxy diff --git a/libbeat/outputs/transport/tcp.go b/libbeat/outputs/transport/tcp.go index b1e6024f8f17..8ffc70debe14 100644 --- a/libbeat/outputs/transport/tcp.go +++ b/libbeat/outputs/transport/tcp.go @@ -23,8 +23,8 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/testing" ) func NetDialer(timeout time.Duration) Dialer { diff --git a/libbeat/outputs/transport/tls.go b/libbeat/outputs/transport/tls.go index 9bc90b629cef..1ef879e0c89e 100644 --- a/libbeat/outputs/transport/tls.go +++ b/libbeat/outputs/transport/tls.go @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/testing" ) // TLSConfig is the interface used to configure a tcp client or server from a `Config` diff --git a/libbeat/outputs/transport/transport.go b/libbeat/outputs/transport/transport.go index 28367129d1cf..7ff01c2fa30e 100644 --- a/libbeat/outputs/transport/transport.go +++ b/libbeat/outputs/transport/transport.go @@ -21,7 +21,7 @@ import ( "errors" "net" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type Dialer interface { diff --git a/libbeat/outputs/transport/transptest/testing.go b/libbeat/outputs/transport/transptest/testing.go index 08bcf64cc236..2d91c0711d44 100644 --- a/libbeat/outputs/transport/transptest/testing.go +++ b/libbeat/outputs/transport/transptest/testing.go @@ -31,8 +31,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) type MockServer struct { diff --git a/libbeat/outputs/transport/transptest/testing_test.go b/libbeat/outputs/transport/transptest/testing_test.go index 9db2d36fbc03..73b04e157b59 100644 --- a/libbeat/outputs/transport/transptest/testing_test.go +++ b/libbeat/outputs/transport/transptest/testing_test.go @@ -29,7 +29,7 @@ import ( socks5 "github.com/armon/go-socks5" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // netSOCKS5Proxy starts a new SOCKS5 proxy server that listens on localhost. diff --git a/libbeat/plugin/cli.go b/libbeat/plugin/cli.go index 425b2b429343..3111d149ea3f 100644 --- a/libbeat/plugin/cli.go +++ b/libbeat/plugin/cli.go @@ -24,8 +24,8 @@ import ( "flag" "strings" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) type pluginList struct { diff --git a/libbeat/processors/actions/add_fields.go b/libbeat/processors/actions/add_fields.go index f370b4c5c439..3d39c1afb4db 100644 --- a/libbeat/processors/actions/add_fields.go +++ b/libbeat/processors/actions/add_fields.go @@ -21,11 +21,11 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type addFields struct { diff --git a/libbeat/processors/actions/add_fields_test.go b/libbeat/processors/actions/add_fields_test.go index daaa71482179..a0b7b1d37dc8 100644 --- a/libbeat/processors/actions/add_fields_test.go +++ b/libbeat/processors/actions/add_fields_test.go @@ -20,7 +20,7 @@ package actions import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestAddFields(t *testing.T) { diff --git a/libbeat/processors/actions/add_labels.go b/libbeat/processors/actions/add_labels.go index 8d7ddc45d7a7..766966592652 100644 --- a/libbeat/processors/actions/add_labels.go +++ b/libbeat/processors/actions/add_labels.go @@ -20,9 +20,9 @@ package actions import ( "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" ) // LabelsKey is the default target key for the add_labels processor. diff --git a/libbeat/processors/actions/add_labels_test.go b/libbeat/processors/actions/add_labels_test.go index 50dbbd6ee54c..24ddcbab58f2 100644 --- a/libbeat/processors/actions/add_labels_test.go +++ b/libbeat/processors/actions/add_labels_test.go @@ -20,7 +20,7 @@ package actions import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestAddLabels(t *testing.T) { diff --git a/libbeat/processors/actions/add_tags.go b/libbeat/processors/actions/add_tags.go index d8e6cd9811ca..15161ca8114c 100644 --- a/libbeat/processors/actions/add_tags.go +++ b/libbeat/processors/actions/add_tags.go @@ -21,10 +21,10 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" ) type addTags struct { diff --git a/libbeat/processors/actions/add_tags_test.go b/libbeat/processors/actions/add_tags_test.go index 678d883e5ba2..9ec78b927b11 100644 --- a/libbeat/processors/actions/add_tags_test.go +++ b/libbeat/processors/actions/add_tags_test.go @@ -20,7 +20,7 @@ package actions import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestAddTags(t *testing.T) { diff --git a/libbeat/processors/actions/common_test.go b/libbeat/processors/actions/common_test.go index 70071f508526..4c4a294970b9 100644 --- a/libbeat/processors/actions/common_test.go +++ b/libbeat/processors/actions/common_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) type testCase struct { diff --git a/libbeat/processors/actions/copy_fields.go b/libbeat/processors/actions/copy_fields.go index b81826a7ad1f..44c13f41c8a8 100644 --- a/libbeat/processors/actions/copy_fields.go +++ b/libbeat/processors/actions/copy_fields.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type copyFields struct { diff --git a/libbeat/processors/actions/copy_fields_test.go b/libbeat/processors/actions/copy_fields_test.go index 7050e93a97a4..2ccbb1187b88 100644 --- a/libbeat/processors/actions/copy_fields_test.go +++ b/libbeat/processors/actions/copy_fields_test.go @@ -20,12 +20,12 @@ package actions import ( "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestCopyFields(t *testing.T) { diff --git a/libbeat/processors/actions/decode_base64_field.go b/libbeat/processors/actions/decode_base64_field.go index bf2c92dc6e46..4f6b0ff34ab8 100644 --- a/libbeat/processors/actions/decode_base64_field.go +++ b/libbeat/processors/actions/decode_base64_field.go @@ -23,12 +23,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const ( diff --git a/libbeat/processors/actions/decode_base64_field_test.go b/libbeat/processors/actions/decode_base64_field_test.go index de4f6a42ed34..3941198a565a 100644 --- a/libbeat/processors/actions/decode_base64_field_test.go +++ b/libbeat/processors/actions/decode_base64_field_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestDecodeBase64Run(t *testing.T) { diff --git a/libbeat/processors/actions/decode_json_fields.go b/libbeat/processors/actions/decode_json_fields.go index dbff3364338e..b9ea3440db9f 100644 --- a/libbeat/processors/actions/decode_json_fields.go +++ b/libbeat/processors/actions/decode_json_fields.go @@ -25,13 +25,13 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/jsontransform" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/jsontransform" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type decodeJSONFields struct { diff --git a/libbeat/processors/actions/decode_json_fields_test.go b/libbeat/processors/actions/decode_json_fields_test.go index 328cadab9f30..91246c7fed4a 100644 --- a/libbeat/processors/actions/decode_json_fields_test.go +++ b/libbeat/processors/actions/decode_json_fields_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var fields = [1]string{"msg"} diff --git a/libbeat/processors/actions/decompress_gzip_field.go b/libbeat/processors/actions/decompress_gzip_field.go index efa3e04ef829..21c5b7f88b53 100644 --- a/libbeat/processors/actions/decompress_gzip_field.go +++ b/libbeat/processors/actions/decompress_gzip_field.go @@ -25,11 +25,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" ) type decompressGzipField struct { diff --git a/libbeat/processors/actions/decompress_gzip_field_test.go b/libbeat/processors/actions/decompress_gzip_field_test.go index c7b8097997af..0792d60e64d0 100644 --- a/libbeat/processors/actions/decompress_gzip_field_test.go +++ b/libbeat/processors/actions/decompress_gzip_field_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestDecompressGzip(t *testing.T) { diff --git a/libbeat/processors/actions/drop_event.go b/libbeat/processors/actions/drop_event.go index a24db8fc3f15..52c502188db6 100644 --- a/libbeat/processors/actions/drop_event.go +++ b/libbeat/processors/actions/drop_event.go @@ -18,10 +18,10 @@ package actions import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" ) type dropEvent struct{} diff --git a/libbeat/processors/actions/drop_fields.go b/libbeat/processors/actions/drop_fields.go index cbdd258c43ac..540880a750a0 100644 --- a/libbeat/processors/actions/drop_fields.go +++ b/libbeat/processors/actions/drop_fields.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" "go.uber.org/multierr" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" ) type dropFields struct { diff --git a/libbeat/processors/actions/extract_field.go b/libbeat/processors/actions/extract_field.go index 4b03f8f8a5ba..58b64caae27d 100644 --- a/libbeat/processors/actions/extract_field.go +++ b/libbeat/processors/actions/extract_field.go @@ -21,9 +21,9 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) type extract_field struct { diff --git a/libbeat/processors/actions/extract_field_test.go b/libbeat/processors/actions/extract_field_test.go index 4973bbffe068..3cbcf2f714f8 100644 --- a/libbeat/processors/actions/extract_field_test.go +++ b/libbeat/processors/actions/extract_field_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestCommonPaths(t *testing.T) { diff --git a/libbeat/processors/actions/include_fields.go b/libbeat/processors/actions/include_fields.go index ada8d300bef4..32c404d3a78d 100644 --- a/libbeat/processors/actions/include_fields.go +++ b/libbeat/processors/actions/include_fields.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" ) type includeFields struct { diff --git a/libbeat/processors/actions/include_fields_test.go b/libbeat/processors/actions/include_fields_test.go index d33c934de2e0..1432a2f32f75 100644 --- a/libbeat/processors/actions/include_fields_test.go +++ b/libbeat/processors/actions/include_fields_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestIncludeFields(t *testing.T) { diff --git a/libbeat/processors/actions/rename.go b/libbeat/processors/actions/rename.go index 626d35219e8a..8be084a281b0 100644 --- a/libbeat/processors/actions/rename.go +++ b/libbeat/processors/actions/rename.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type renameFields struct { diff --git a/libbeat/processors/actions/rename_test.go b/libbeat/processors/actions/rename_test.go index 646d83407e56..1bc34e149e88 100644 --- a/libbeat/processors/actions/rename_test.go +++ b/libbeat/processors/actions/rename_test.go @@ -21,12 +21,12 @@ import ( "reflect" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestRenameRun(t *testing.T) { diff --git a/libbeat/processors/actions/truncate_fields.go b/libbeat/processors/actions/truncate_fields.go index 00289b84bcc9..ead07724fab1 100644 --- a/libbeat/processors/actions/truncate_fields.go +++ b/libbeat/processors/actions/truncate_fields.go @@ -25,12 +25,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type truncateFieldsConfig struct { diff --git a/libbeat/processors/actions/truncate_fields_test.go b/libbeat/processors/actions/truncate_fields_test.go index b6e041ca8ee8..c19bc4e27ffb 100644 --- a/libbeat/processors/actions/truncate_fields_test.go +++ b/libbeat/processors/actions/truncate_fields_test.go @@ -20,12 +20,12 @@ package actions import ( "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestTruncateFields(t *testing.T) { diff --git a/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go b/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go index 22146e5ebe67..c49f37ad3983 100644 --- a/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go +++ b/libbeat/processors/add_cloud_metadata/add_cloud_metadata.go @@ -24,11 +24,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const ( diff --git a/libbeat/processors/add_cloud_metadata/http_fetcher.go b/libbeat/processors/add_cloud_metadata/http_fetcher.go index 30e312443337..e9b184786614 100644 --- a/libbeat/processors/add_cloud_metadata/http_fetcher.go +++ b/libbeat/processors/add_cloud_metadata/http_fetcher.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type httpMetadataFetcher struct { diff --git a/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud.go b/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud.go index afa502990a20..7d9e9ee986f5 100644 --- a/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud.go +++ b/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud.go @@ -17,7 +17,7 @@ package add_cloud_metadata -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" // Alibaba Cloud Metadata Service // Document https://help.aliyun.com/knowledge_detail/49122.html diff --git a/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud_test.go b/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud_test.go index 7a6b7265d693..8d887245d86a 100644 --- a/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_alibaba_cloud_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func initECSTestServer() *httptest.Server { diff --git a/libbeat/processors/add_cloud_metadata/provider_aws_ec2.go b/libbeat/processors/add_cloud_metadata/provider_aws_ec2.go index ed28f3b38aa5..b65d914f10c9 100644 --- a/libbeat/processors/add_cloud_metadata/provider_aws_ec2.go +++ b/libbeat/processors/add_cloud_metadata/provider_aws_ec2.go @@ -18,9 +18,9 @@ package add_cloud_metadata import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) const ec2InstanceIdentityURI = "/2014-02-25/dynamic/instance-identity/document" diff --git a/libbeat/processors/add_cloud_metadata/provider_aws_ec2_test.go b/libbeat/processors/add_cloud_metadata/provider_aws_ec2_test.go index 69db09c25996..4a54e549c322 100644 --- a/libbeat/processors/add_cloud_metadata/provider_aws_ec2_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_aws_ec2_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func createEC2MockAPI(responseMap map[string]string) *httptest.Server { diff --git a/libbeat/processors/add_cloud_metadata/provider_azure_vm.go b/libbeat/processors/add_cloud_metadata/provider_azure_vm.go index 8ee84f417e3b..077e9b610ddb 100644 --- a/libbeat/processors/add_cloud_metadata/provider_azure_vm.go +++ b/libbeat/processors/add_cloud_metadata/provider_azure_vm.go @@ -18,9 +18,9 @@ package add_cloud_metadata import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) // Azure VM Metadata Service diff --git a/libbeat/processors/add_cloud_metadata/provider_azure_vm_test.go b/libbeat/processors/add_cloud_metadata/provider_azure_vm_test.go index 23133a4b3877..57f26c8ecd5b 100644 --- a/libbeat/processors/add_cloud_metadata/provider_azure_vm_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_azure_vm_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const azInstanceIdentityDocument = `{ diff --git a/libbeat/processors/add_cloud_metadata/provider_digital_ocean.go b/libbeat/processors/add_cloud_metadata/provider_digital_ocean.go index fe016ffb95e9..cc56ae044bd2 100644 --- a/libbeat/processors/add_cloud_metadata/provider_digital_ocean.go +++ b/libbeat/processors/add_cloud_metadata/provider_digital_ocean.go @@ -18,9 +18,9 @@ package add_cloud_metadata import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) // DigitalOcean Metadata Service diff --git a/libbeat/processors/add_cloud_metadata/provider_digital_ocean_test.go b/libbeat/processors/add_cloud_metadata/provider_digital_ocean_test.go index 3237b6ec8385..5fb19a98feec 100644 --- a/libbeat/processors/add_cloud_metadata/provider_digital_ocean_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_digital_ocean_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const digitalOceanMetadataV1 = `{ diff --git a/libbeat/processors/add_cloud_metadata/provider_google_gce.go b/libbeat/processors/add_cloud_metadata/provider_google_gce.go index 27c574f9f1dc..0fe69e1998d4 100644 --- a/libbeat/processors/add_cloud_metadata/provider_google_gce.go +++ b/libbeat/processors/add_cloud_metadata/provider_google_gce.go @@ -20,9 +20,9 @@ package add_cloud_metadata import ( "path" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) // Google GCE Metadata Service diff --git a/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go b/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go index 7cac4c4376b0..eccc07d4b30d 100644 --- a/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const gceMetadataV1 = `{ diff --git a/libbeat/processors/add_cloud_metadata/provider_openstack_nova.go b/libbeat/processors/add_cloud_metadata/provider_openstack_nova.go index cbb516059b9f..17bc5abf6893 100644 --- a/libbeat/processors/add_cloud_metadata/provider_openstack_nova.go +++ b/libbeat/processors/add_cloud_metadata/provider_openstack_nova.go @@ -18,7 +18,7 @@ package add_cloud_metadata import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const ( diff --git a/libbeat/processors/add_cloud_metadata/provider_openstack_nova_test.go b/libbeat/processors/add_cloud_metadata/provider_openstack_nova_test.go index bb2c0b4b28ad..d5c38a8437b5 100644 --- a/libbeat/processors/add_cloud_metadata/provider_openstack_nova_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_openstack_nova_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func initOpenstackNovaTestServer() *httptest.Server { diff --git a/libbeat/processors/add_cloud_metadata/provider_tencent_cloud.go b/libbeat/processors/add_cloud_metadata/provider_tencent_cloud.go index d24778c6850c..be5956955353 100644 --- a/libbeat/processors/add_cloud_metadata/provider_tencent_cloud.go +++ b/libbeat/processors/add_cloud_metadata/provider_tencent_cloud.go @@ -17,7 +17,7 @@ package add_cloud_metadata -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" // Tencent Cloud Metadata Service // Document https://www.qcloud.com/document/product/213/4934 diff --git a/libbeat/processors/add_cloud_metadata/provider_tencent_cloud_test.go b/libbeat/processors/add_cloud_metadata/provider_tencent_cloud_test.go index 72be1934c2d6..1615d37a38cc 100644 --- a/libbeat/processors/add_cloud_metadata/provider_tencent_cloud_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_tencent_cloud_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func initQCloudTestServer() *httptest.Server { diff --git a/libbeat/processors/add_cloud_metadata/providers.go b/libbeat/processors/add_cloud_metadata/providers.go index 78ca9220e299..f93e8cf78f45 100644 --- a/libbeat/processors/add_cloud_metadata/providers.go +++ b/libbeat/processors/add_cloud_metadata/providers.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type provider struct { diff --git a/libbeat/processors/add_cloud_metadata/providers_test.go b/libbeat/processors/add_cloud_metadata/providers_test.go index e9c8732c54a2..eed1e752278d 100644 --- a/libbeat/processors/add_cloud_metadata/providers_test.go +++ b/libbeat/processors/add_cloud_metadata/providers_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestProvidersFilter(t *testing.T) { diff --git a/libbeat/processors/add_docker_metadata/add_docker_metadata.go b/libbeat/processors/add_docker_metadata/add_docker_metadata.go index 994ffae9afc9..cf0fda79d8dd 100644 --- a/libbeat/processors/add_docker_metadata/add_docker_metadata.go +++ b/libbeat/processors/add_docker_metadata/add_docker_metadata.go @@ -30,13 +30,13 @@ import ( "github.com/elastic/gosigar/cgroup" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/docker" - "github.com/elastic/beats/libbeat/common/safemapstr" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/actions" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/actions" ) const ( diff --git a/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go b/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go index 7ed4f486cb59..2d8a5a9e970b 100644 --- a/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go +++ b/libbeat/processors/add_docker_metadata/add_docker_metadata_test.go @@ -27,11 +27,11 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/docker" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/libbeat/processors/add_docker_metadata/config.go b/libbeat/processors/add_docker_metadata/config.go index 930ca4ecdc6e..89e97fa9af42 100644 --- a/libbeat/processors/add_docker_metadata/config.go +++ b/libbeat/processors/add_docker_metadata/config.go @@ -22,7 +22,7 @@ package add_docker_metadata import ( "time" - "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common/docker" ) // Config for docker processor. diff --git a/libbeat/processors/add_formatted_index/add_formatted_index.go b/libbeat/processors/add_formatted_index/add_formatted_index.go index ed947be73491..72be2a89775c 100644 --- a/libbeat/processors/add_formatted_index/add_formatted_index.go +++ b/libbeat/processors/add_formatted_index/add_formatted_index.go @@ -20,9 +20,9 @@ package add_formatted_index import ( "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" ) // AddFormattedIndex is a Processor to set an event's "raw_index" metadata field diff --git a/libbeat/processors/add_host_metadata/add_host_metadata.go b/libbeat/processors/add_host_metadata/add_host_metadata.go index f9dd09db0d6e..1cf1bd90503a 100644 --- a/libbeat/processors/add_host_metadata/add_host_metadata.go +++ b/libbeat/processors/add_host_metadata/add_host_metadata.go @@ -24,13 +24,13 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/metric/system/host" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" - "github.com/elastic/beats/libbeat/processors/util" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/metric/system/host" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/processors/util" "github.com/elastic/go-sysinfo" ) diff --git a/libbeat/processors/add_host_metadata/add_host_metadata_test.go b/libbeat/processors/add_host_metadata/add_host_metadata_test.go index 1ef8035f6252..500fc4ba9d8c 100644 --- a/libbeat/processors/add_host_metadata/add_host_metadata_test.go +++ b/libbeat/processors/add_host_metadata/add_host_metadata_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/go-sysinfo/types" ) diff --git a/libbeat/processors/add_host_metadata/config.go b/libbeat/processors/add_host_metadata/config.go index 76e3709ff2f1..81c0452f4d93 100644 --- a/libbeat/processors/add_host_metadata/config.go +++ b/libbeat/processors/add_host_metadata/config.go @@ -20,7 +20,7 @@ package add_host_metadata import ( "time" - "github.com/elastic/beats/libbeat/processors/util" + "github.com/elastic/beats/v7/libbeat/processors/util" ) // Config for add_host_metadata processor. diff --git a/libbeat/processors/add_id/add_id.go b/libbeat/processors/add_id/add_id.go index 5df081460c33..44d03f6cd7c5 100644 --- a/libbeat/processors/add_id/add_id.go +++ b/libbeat/processors/add_id/add_id.go @@ -20,12 +20,12 @@ package add_id import ( "fmt" - "github.com/elastic/beats/libbeat/processors/add_id/generator" + "github.com/elastic/beats/v7/libbeat/processors/add_id/generator" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) func init() { diff --git a/libbeat/processors/add_id/add_id_test.go b/libbeat/processors/add_id/add_id_test.go index 6a3fb5b3a099..54ad579e9fd2 100644 --- a/libbeat/processors/add_id/add_id_test.go +++ b/libbeat/processors/add_id/add_id_test.go @@ -20,9 +20,9 @@ package add_id import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" "github.com/stretchr/testify/assert" ) diff --git a/libbeat/processors/add_id/config.go b/libbeat/processors/add_id/config.go index ca28d48d68ee..04a1c114219e 100644 --- a/libbeat/processors/add_id/config.go +++ b/libbeat/processors/add_id/config.go @@ -18,7 +18,7 @@ package add_id import ( - "github.com/elastic/beats/libbeat/processors/add_id/generator" + "github.com/elastic/beats/v7/libbeat/processors/add_id/generator" ) // configuration for Add ID processor. diff --git a/libbeat/processors/add_kubernetes_metadata/cache.go b/libbeat/processors/add_kubernetes_metadata/cache.go index f5fb4ba52e65..da7492b43a92 100644 --- a/libbeat/processors/add_kubernetes_metadata/cache.go +++ b/libbeat/processors/add_kubernetes_metadata/cache.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type cache struct { diff --git a/libbeat/processors/add_kubernetes_metadata/config.go b/libbeat/processors/add_kubernetes_metadata/config.go index 84d2c246948d..b5e492d8ccc0 100644 --- a/libbeat/processors/add_kubernetes_metadata/config.go +++ b/libbeat/processors/add_kubernetes_metadata/config.go @@ -20,7 +20,7 @@ package add_kubernetes_metadata import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type kubeAnnotatorConfig struct { diff --git a/libbeat/processors/add_kubernetes_metadata/indexers.go b/libbeat/processors/add_kubernetes_metadata/indexers.go index 3d6dd601fcb9..673337fa7936 100644 --- a/libbeat/processors/add_kubernetes_metadata/indexers.go +++ b/libbeat/processors/add_kubernetes_metadata/indexers.go @@ -21,11 +21,11 @@ import ( "fmt" "sync" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/libbeat/processors/add_kubernetes_metadata/indexers_test.go b/libbeat/processors/add_kubernetes_metadata/indexers_test.go index 278275f10fd1..5eca3050fae8 100644 --- a/libbeat/processors/add_kubernetes_metadata/indexers_test.go +++ b/libbeat/processors/add_kubernetes_metadata/indexers_test.go @@ -21,15 +21,15 @@ import ( "fmt" "testing" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) var metagen = metadata.NewPodMetadataGenerator(common.NewConfig(), nil, nil, nil) diff --git a/libbeat/processors/add_kubernetes_metadata/indexing.go b/libbeat/processors/add_kubernetes_metadata/indexing.go index e5485abe47b3..d011d0c7a970 100644 --- a/libbeat/processors/add_kubernetes_metadata/indexing.go +++ b/libbeat/processors/add_kubernetes_metadata/indexing.go @@ -20,7 +20,7 @@ package add_kubernetes_metadata import ( "sync" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Indexing is the singleton Register instance where all Indexers and Matchers diff --git a/libbeat/processors/add_kubernetes_metadata/kubernetes.go b/libbeat/processors/add_kubernetes_metadata/kubernetes.go index f83bb3ab9b08..b3bec5294209 100644 --- a/libbeat/processors/add_kubernetes_metadata/kubernetes.go +++ b/libbeat/processors/add_kubernetes_metadata/kubernetes.go @@ -27,12 +27,12 @@ import ( k8sclient "k8s.io/client-go/kubernetes" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" ) const ( diff --git a/libbeat/processors/add_kubernetes_metadata/kubernetes_test.go b/libbeat/processors/add_kubernetes_metadata/kubernetes_test.go index 4da15db969b4..7d18d169e401 100644 --- a/libbeat/processors/add_kubernetes_metadata/kubernetes_test.go +++ b/libbeat/processors/add_kubernetes_metadata/kubernetes_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // Test metadata updates don't replace existing pod metrics diff --git a/libbeat/processors/add_kubernetes_metadata/matchers.go b/libbeat/processors/add_kubernetes_metadata/matchers.go index 61590821771f..ca14746f1304 100644 --- a/libbeat/processors/add_kubernetes_metadata/matchers.go +++ b/libbeat/processors/add_kubernetes_metadata/matchers.go @@ -21,12 +21,12 @@ import ( "fmt" "sync" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/outputs/codec/format" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/outputs/codec/format" ) const ( diff --git a/libbeat/processors/add_kubernetes_metadata/matchers_test.go b/libbeat/processors/add_kubernetes_metadata/matchers_test.go index 0a1c723f6c3e..13e453426e76 100644 --- a/libbeat/processors/add_kubernetes_metadata/matchers_test.go +++ b/libbeat/processors/add_kubernetes_metadata/matchers_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestFieldMatcher(t *testing.T) { diff --git a/libbeat/processors/add_kubernetes_metadata/registry.go b/libbeat/processors/add_kubernetes_metadata/registry.go index 7198f485557c..417cb9e55334 100644 --- a/libbeat/processors/add_kubernetes_metadata/registry.go +++ b/libbeat/processors/add_kubernetes_metadata/registry.go @@ -21,7 +21,7 @@ import ( "errors" "fmt" - p "github.com/elastic/beats/libbeat/plugin" + p "github.com/elastic/beats/v7/libbeat/plugin" ) var ( diff --git a/libbeat/processors/add_locale/add_locale.go b/libbeat/processors/add_locale/add_locale.go index 9d98c045df7e..b45682313a30 100644 --- a/libbeat/processors/add_locale/add_locale.go +++ b/libbeat/processors/add_locale/add_locale.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type addLocale struct { diff --git a/libbeat/processors/add_locale/add_locale_test.go b/libbeat/processors/add_locale/add_locale_test.go index f75467b19eb7..d3bb8c71b2b9 100644 --- a/libbeat/processors/add_locale/add_locale_test.go +++ b/libbeat/processors/add_locale/add_locale_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestExportTimezone(t *testing.T) { diff --git a/libbeat/processors/add_observer_metadata/add_observer_metadata.go b/libbeat/processors/add_observer_metadata/add_observer_metadata.go index 464c051fb1ad..ce16a9ca65f2 100644 --- a/libbeat/processors/add_observer_metadata/add_observer_metadata.go +++ b/libbeat/processors/add_observer_metadata/add_observer_metadata.go @@ -24,12 +24,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" - "github.com/elastic/beats/libbeat/processors/util" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/processors/util" "github.com/elastic/go-sysinfo" ) diff --git a/libbeat/processors/add_observer_metadata/add_observer_metadata_test.go b/libbeat/processors/add_observer_metadata/add_observer_metadata_test.go index c9d55318fdd8..69de476b7fd3 100644 --- a/libbeat/processors/add_observer_metadata/add_observer_metadata_test.go +++ b/libbeat/processors/add_observer_metadata/add_observer_metadata_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestConfigDefault(t *testing.T) { diff --git a/libbeat/processors/add_observer_metadata/config.go b/libbeat/processors/add_observer_metadata/config.go index aea1fff2c1d2..91acdc9e6d28 100644 --- a/libbeat/processors/add_observer_metadata/config.go +++ b/libbeat/processors/add_observer_metadata/config.go @@ -20,7 +20,7 @@ package add_observer_metadata import ( "time" - "github.com/elastic/beats/libbeat/processors/util" + "github.com/elastic/beats/v7/libbeat/processors/util" ) // Config for add_host_metadata processor. diff --git a/libbeat/processors/add_process_metadata/add_process_metadata.go b/libbeat/processors/add_process_metadata/add_process_metadata.go index 2b78fcb817e4..4b6270c9f6e0 100644 --- a/libbeat/processors/add_process_metadata/add_process_metadata.go +++ b/libbeat/processors/add_process_metadata/add_process_metadata.go @@ -24,12 +24,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const ( diff --git a/libbeat/processors/add_process_metadata/add_process_metadata_test.go b/libbeat/processors/add_process_metadata/add_process_metadata_test.go index 8f76c5ec685f..16d3f38fa714 100644 --- a/libbeat/processors/add_process_metadata/add_process_metadata_test.go +++ b/libbeat/processors/add_process_metadata/add_process_metadata_test.go @@ -25,9 +25,9 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestAddProcessMetadata(t *testing.T) { diff --git a/libbeat/processors/add_process_metadata/config.go b/libbeat/processors/add_process_metadata/config.go index fb42a3e716a3..87d375b0a09a 100644 --- a/libbeat/processors/add_process_metadata/config.go +++ b/libbeat/processors/add_process_metadata/config.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type config struct { diff --git a/libbeat/processors/checks/checks.go b/libbeat/processors/checks/checks.go index d275278544b8..6291ba57b2be 100644 --- a/libbeat/processors/checks/checks.go +++ b/libbeat/processors/checks/checks.go @@ -20,8 +20,8 @@ package checks import ( "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) // ConfigChecked returns a wrapper that will validate the configuration using diff --git a/libbeat/processors/checks/checks_test.go b/libbeat/processors/checks/checks_test.go index 656f922fccc5..c84965bbb132 100644 --- a/libbeat/processors/checks/checks_test.go +++ b/libbeat/processors/checks/checks_test.go @@ -20,9 +20,9 @@ package checks import ( "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) type mockProcessor struct{} diff --git a/libbeat/processors/communityid/communityid.go b/libbeat/processors/communityid/communityid.go index f5c2812f6b18..db24fe34eaf3 100644 --- a/libbeat/processors/communityid/communityid.go +++ b/libbeat/processors/communityid/communityid.go @@ -26,12 +26,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/flowhash" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/flowhash" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const logName = "processor.community_id" diff --git a/libbeat/processors/communityid/communityid_test.go b/libbeat/processors/communityid/communityid_test.go index 1820c78ba409..97a7644bbe91 100644 --- a/libbeat/processors/communityid/communityid_test.go +++ b/libbeat/processors/communityid/communityid_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestNewDefaults(t *testing.T) { diff --git a/libbeat/processors/conditionals.go b/libbeat/processors/conditionals.go index ca563702f869..70f0c7ef48c7 100644 --- a/libbeat/processors/conditionals.go +++ b/libbeat/processors/conditionals.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/conditions" ) // NewConditional returns a constructor suitable for registering when conditionals as a plugin. diff --git a/libbeat/processors/conditionals_test.go b/libbeat/processors/conditionals_test.go index baf097b2385b..7521d3a72c1a 100644 --- a/libbeat/processors/conditionals_test.go +++ b/libbeat/processors/conditionals_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type countFilter struct { diff --git a/libbeat/processors/config.go b/libbeat/processors/config.go index 46be05753f41..5477626a5987 100644 --- a/libbeat/processors/config.go +++ b/libbeat/processors/config.go @@ -18,7 +18,7 @@ package processors import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // PluginConfig represents the list of processors. diff --git a/libbeat/processors/convert/convert.go b/libbeat/processors/convert/convert.go index 887fbdd02a9f..c6f3e5aea285 100644 --- a/libbeat/processors/convert/convert.go +++ b/libbeat/processors/convert/convert.go @@ -26,11 +26,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const logName = "processor.convert" diff --git a/libbeat/processors/convert/convert_test.go b/libbeat/processors/convert/convert_test.go index 141fafc0f8fe..1eba3ff550fe 100644 --- a/libbeat/processors/convert/convert_test.go +++ b/libbeat/processors/convert/convert_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestConvert(t *testing.T) { diff --git a/libbeat/processors/decode_csv_fields/decode_csv_fields.go b/libbeat/processors/decode_csv_fields/decode_csv_fields.go index e65fe2231ac8..ff2cdf0938c8 100644 --- a/libbeat/processors/decode_csv_fields/decode_csv_fields.go +++ b/libbeat/processors/decode_csv_fields/decode_csv_fields.go @@ -25,11 +25,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type decodeCSVFields struct { diff --git a/libbeat/processors/decode_csv_fields/decode_csv_fields_test.go b/libbeat/processors/decode_csv_fields/decode_csv_fields_test.go index 68a35b6300aa..8a406ca06e6a 100644 --- a/libbeat/processors/decode_csv_fields/decode_csv_fields_test.go +++ b/libbeat/processors/decode_csv_fields/decode_csv_fields_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestDecodeCSVField(t *testing.T) { diff --git a/libbeat/processors/dissect/config_test.go b/libbeat/processors/dissect/config_test.go index dfe93274a881..09d4da5a1805 100644 --- a/libbeat/processors/dissect/config_test.go +++ b/libbeat/processors/dissect/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestConfig(t *testing.T) { diff --git a/libbeat/processors/dissect/processor.go b/libbeat/processors/dissect/processor.go index ab5c18903092..ac812e9ffaeb 100644 --- a/libbeat/processors/dissect/processor.go +++ b/libbeat/processors/dissect/processor.go @@ -22,10 +22,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const flagParsingError = "dissect_parsing_error" diff --git a/libbeat/processors/dissect/processor_test.go b/libbeat/processors/dissect/processor_test.go index f822db1d6e37..26a579ae6999 100644 --- a/libbeat/processors/dissect/processor_test.go +++ b/libbeat/processors/dissect/processor_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestProcessor(t *testing.T) { diff --git a/libbeat/processors/dns/cache.go b/libbeat/processors/dns/cache.go index 57fa99a17b69..6bd6b373db90 100644 --- a/libbeat/processors/dns/cache.go +++ b/libbeat/processors/dns/cache.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) type ptrRecord struct { diff --git a/libbeat/processors/dns/cache_test.go b/libbeat/processors/dns/cache_test.go index b2ad5af75a54..d64dbd460b46 100644 --- a/libbeat/processors/dns/cache_test.go +++ b/libbeat/processors/dns/cache_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) type stubResolver struct{} diff --git a/libbeat/processors/dns/config.go b/libbeat/processors/dns/config.go index 4345d73db0a5..ae447a20c721 100644 --- a/libbeat/processors/dns/config.go +++ b/libbeat/processors/dns/config.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Config defines the configuration options for the DNS processor. diff --git a/libbeat/processors/dns/dns.go b/libbeat/processors/dns/dns.go index 7dc447d44c6e..49b4946733ed 100644 --- a/libbeat/processors/dns/dns.go +++ b/libbeat/processors/dns/dns.go @@ -25,13 +25,13 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const logName = "processor.dns" diff --git a/libbeat/processors/dns/dns_test.go b/libbeat/processors/dns/dns_test.go index d4fe14e28dfa..bdd92e1f088f 100644 --- a/libbeat/processors/dns/dns_test.go +++ b/libbeat/processors/dns/dns_test.go @@ -24,10 +24,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) func TestDNSProcessorRun(t *testing.T) { diff --git a/libbeat/processors/dns/resolver.go b/libbeat/processors/dns/resolver.go index c4f54c73c87d..701ee8e49ace 100644 --- a/libbeat/processors/dns/resolver.go +++ b/libbeat/processors/dns/resolver.go @@ -28,8 +28,8 @@ import ( "github.com/pkg/errors" "github.com/rcrowley/go-metrics" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/adapter" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/adapter" ) const etcResolvConf = "/etc/resolv.conf" diff --git a/libbeat/processors/dns/resolver_test.go b/libbeat/processors/dns/resolver_test.go index a8e6e9ad13da..0340da316d7e 100644 --- a/libbeat/processors/dns/resolver_test.go +++ b/libbeat/processors/dns/resolver_test.go @@ -25,7 +25,7 @@ import ( "github.com/miekg/dns" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var _ PTRResolver = (*MiekgResolver)(nil) diff --git a/libbeat/processors/extract_array/extract_array.go b/libbeat/processors/extract_array/extract_array.go index ce76b0962aea..1c9fc05da93e 100644 --- a/libbeat/processors/extract_array/extract_array.go +++ b/libbeat/processors/extract_array/extract_array.go @@ -24,11 +24,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/checks" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/checks" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) type config struct { diff --git a/libbeat/processors/extract_array/extract_array_test.go b/libbeat/processors/extract_array/extract_array_test.go index 8dbde97a50a8..1707e317530f 100644 --- a/libbeat/processors/extract_array/extract_array_test.go +++ b/libbeat/processors/extract_array/extract_array_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestExtractArrayProcessor_String(t *testing.T) { diff --git a/libbeat/processors/fingerprint/fingerprint.go b/libbeat/processors/fingerprint/fingerprint.go index b0f877dfeb32..90d051cec77a 100644 --- a/libbeat/processors/fingerprint/fingerprint.go +++ b/libbeat/processors/fingerprint/fingerprint.go @@ -23,10 +23,10 @@ import ( "io" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) func init() { diff --git a/libbeat/processors/fingerprint/fingerprint_test.go b/libbeat/processors/fingerprint/fingerprint_test.go index e0cb0475f546..6274af7c0b29 100644 --- a/libbeat/processors/fingerprint/fingerprint_test.go +++ b/libbeat/processors/fingerprint/fingerprint_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestHashMethods(t *testing.T) { diff --git a/libbeat/processors/fingerprint/hash.go b/libbeat/processors/fingerprint/hash.go index cc957d03258d..1c4af0d0161a 100644 --- a/libbeat/processors/fingerprint/hash.go +++ b/libbeat/processors/fingerprint/hash.go @@ -25,7 +25,7 @@ import ( "hash" "strings" - "github.com/cespare/xxhash" + "github.com/cespare/xxhash/v2" ) type hashMethod func() hash.Hash diff --git a/libbeat/processors/namespace.go b/libbeat/processors/namespace.go index 1dd10f4b5172..5bd8a0635ce1 100644 --- a/libbeat/processors/namespace.go +++ b/libbeat/processors/namespace.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type Namespace struct { diff --git a/libbeat/processors/namespace_test.go b/libbeat/processors/namespace_test.go index 73b71ad36ad2..43698ebdf4a9 100644 --- a/libbeat/processors/namespace_test.go +++ b/libbeat/processors/namespace_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type testFilterRule struct { diff --git a/libbeat/processors/processor.go b/libbeat/processors/processor.go index 5eaa6dd2fb4c..c5002b7cebd5 100644 --- a/libbeat/processors/processor.go +++ b/libbeat/processors/processor.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const logName = "processors" diff --git a/libbeat/processors/processor_test.go b/libbeat/processors/processor_test.go index b6168aa41181..e4fe0d58481d 100644 --- a/libbeat/processors/processor_test.go +++ b/libbeat/processors/processor_test.go @@ -23,12 +23,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - _ "github.com/elastic/beats/libbeat/processors/actions" - _ "github.com/elastic/beats/libbeat/processors/add_cloud_metadata" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + _ "github.com/elastic/beats/v7/libbeat/processors/actions" + _ "github.com/elastic/beats/v7/libbeat/processors/add_cloud_metadata" ) func GetProcessors(t testing.TB, yml []map[string]interface{}) *processors.Processors { diff --git a/libbeat/processors/registered_domain/registered_domain.go b/libbeat/processors/registered_domain/registered_domain.go index b378da752339..047ef4472347 100644 --- a/libbeat/processors/registered_domain/registered_domain.go +++ b/libbeat/processors/registered_domain/registered_domain.go @@ -23,12 +23,12 @@ import ( "github.com/pkg/errors" "golang.org/x/net/publicsuffix" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const ( diff --git a/libbeat/processors/registered_domain/registered_domain_test.go b/libbeat/processors/registered_domain/registered_domain_test.go index 8434242d7b09..53d1184d7476 100644 --- a/libbeat/processors/registered_domain/registered_domain_test.go +++ b/libbeat/processors/registered_domain/registered_domain_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) func TestProcessorRun(t *testing.T) { diff --git a/libbeat/processors/registry.go b/libbeat/processors/registry.go index f8e32c5c78ff..2e771bc331d0 100644 --- a/libbeat/processors/registry.go +++ b/libbeat/processors/registry.go @@ -20,9 +20,9 @@ package processors import ( "errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - p "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + p "github.com/elastic/beats/v7/libbeat/plugin" ) type processorPlugin struct { diff --git a/libbeat/processors/script/javascript/beatevent_v0.go b/libbeat/processors/script/javascript/beatevent_v0.go index fa9420793364..a24135f30dac 100644 --- a/libbeat/processors/script/javascript/beatevent_v0.go +++ b/libbeat/processors/script/javascript/beatevent_v0.go @@ -21,8 +21,8 @@ import ( "github.com/dop251/goja" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // IMPORTANT: diff --git a/libbeat/processors/script/javascript/beatevent_v0_test.go b/libbeat/processors/script/javascript/beatevent_v0_test.go index dc1f66bb71d0..030a260d4240 100644 --- a/libbeat/processors/script/javascript/beatevent_v0_test.go +++ b/libbeat/processors/script/javascript/beatevent_v0_test.go @@ -25,10 +25,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/tests/resources" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/tests/resources" ) const ( diff --git a/libbeat/processors/script/javascript/javascript.go b/libbeat/processors/script/javascript/javascript.go index 4f222fe3e346..e23ee3b83b40 100644 --- a/libbeat/processors/script/javascript/javascript.go +++ b/libbeat/processors/script/javascript/javascript.go @@ -30,12 +30,12 @@ import ( "github.com/pkg/errors" "github.com/rcrowley/go-metrics" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/monitoring/adapter" - "github.com/elastic/beats/libbeat/paths" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/monitoring/adapter" + "github.com/elastic/beats/v7/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/processors" ) type jsProcessor struct { diff --git a/libbeat/processors/script/javascript/module/console/console.go b/libbeat/processors/script/javascript/module/console/console.go index 92188f230c43..281ba3d12409 100644 --- a/libbeat/processors/script/javascript/module/console/console.go +++ b/libbeat/processors/script/javascript/module/console/console.go @@ -22,7 +22,7 @@ import ( "github.com/dop251/goja_nodejs/require" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" // Require the util module for handling the log format arguments. _ "github.com/dop251/goja_nodejs/util" diff --git a/libbeat/processors/script/javascript/module/console/console_test.go b/libbeat/processors/script/javascript/module/console/console_test.go index 48fe4165c076..aa4c00ce6c1f 100644 --- a/libbeat/processors/script/javascript/module/console/console_test.go +++ b/libbeat/processors/script/javascript/module/console/console_test.go @@ -23,13 +23,13 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" // Register require module. - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/require" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/require" ) func TestConsole(t *testing.T) { diff --git a/libbeat/processors/script/javascript/module/include.go b/libbeat/processors/script/javascript/module/include.go index 6b4608a51eae..f30e423e7a23 100644 --- a/libbeat/processors/script/javascript/module/include.go +++ b/libbeat/processors/script/javascript/module/include.go @@ -19,9 +19,9 @@ package module import ( // Register javascript modules. - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/console" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/net" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/path" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/require" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/console" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/net" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/path" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/require" ) diff --git a/libbeat/processors/script/javascript/module/net/net_test.go b/libbeat/processors/script/javascript/module/net/net_test.go index f54014036439..559fff00d503 100644 --- a/libbeat/processors/script/javascript/module/net/net_test.go +++ b/libbeat/processors/script/javascript/module/net/net_test.go @@ -22,12 +22,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/net" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/require" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/net" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/require" ) func TestNetIsIP(t *testing.T) { diff --git a/libbeat/processors/script/javascript/module/path/path_test.go b/libbeat/processors/script/javascript/module/path/path_test.go index f1288d92aa3c..4ad47de13a53 100644 --- a/libbeat/processors/script/javascript/module/path/path_test.go +++ b/libbeat/processors/script/javascript/module/path/path_test.go @@ -22,12 +22,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/path" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/require" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/path" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/require" ) func TestWin32(t *testing.T) { diff --git a/libbeat/processors/script/javascript/module/processor/chain.go b/libbeat/processors/script/javascript/module/processor/chain.go index 947903c57ef5..e58aac293720 100644 --- a/libbeat/processors/script/javascript/module/processor/chain.go +++ b/libbeat/processors/script/javascript/module/processor/chain.go @@ -21,9 +21,9 @@ import ( "github.com/dop251/goja" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" ) // chainBuilder builds a new processor chain. diff --git a/libbeat/processors/script/javascript/module/processor/processor.go b/libbeat/processors/script/javascript/module/processor/processor.go index da5a914cd924..31fecc0cdd67 100644 --- a/libbeat/processors/script/javascript/module/processor/processor.go +++ b/libbeat/processors/script/javascript/module/processor/processor.go @@ -22,9 +22,9 @@ import ( "github.com/dop251/goja_nodejs/require" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" ) // Create constructors for most of the Beat processors. diff --git a/libbeat/processors/script/javascript/module/processor/processor_test.go b/libbeat/processors/script/javascript/module/processor/processor_test.go index 7faddd241c51..6ea66f409ffe 100644 --- a/libbeat/processors/script/javascript/module/processor/processor_test.go +++ b/libbeat/processors/script/javascript/module/processor/processor_test.go @@ -24,13 +24,13 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module/require" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/require" ) func init() { diff --git a/libbeat/processors/script/javascript/module/require/require.go b/libbeat/processors/script/javascript/module/require/require.go index e9da5e9076e6..db0dcaaa4efc 100644 --- a/libbeat/processors/script/javascript/module/require/require.go +++ b/libbeat/processors/script/javascript/module/require/require.go @@ -21,7 +21,7 @@ import ( "github.com/dop251/goja_nodejs/require" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" ) func init() { diff --git a/libbeat/processors/script/javascript/session.go b/libbeat/processors/script/javascript/session.go index ca892fc5537e..1bade0cc2ba3 100644 --- a/libbeat/processors/script/javascript/session.go +++ b/libbeat/processors/script/javascript/session.go @@ -26,9 +26,9 @@ import ( "github.com/pkg/errors" "go.uber.org/zap" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/libbeat/processors/script/javascript/session_test.go b/libbeat/processors/script/javascript/session_test.go index 7f7443394aaa..043253c93d66 100644 --- a/libbeat/processors/script/javascript/session_test.go +++ b/libbeat/processors/script/javascript/session_test.go @@ -23,9 +23,9 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/stretchr/testify/assert" ) diff --git a/libbeat/processors/script/processor.go b/libbeat/processors/script/processor.go index 640659ecbfb2..7f61c7cfae5a 100644 --- a/libbeat/processors/script/processor.go +++ b/libbeat/processors/script/processor.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/script/javascript" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/script/javascript" // Register javascript modules with the processor. - _ "github.com/elastic/beats/libbeat/processors/script/javascript/module" + _ "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module" ) func init() { diff --git a/libbeat/processors/timeseries/timeseries.go b/libbeat/processors/timeseries/timeseries.go index 79e68edb5336..45b71ce79bfe 100644 --- a/libbeat/processors/timeseries/timeseries.go +++ b/libbeat/processors/timeseries/timeseries.go @@ -20,11 +20,11 @@ package timeseries import ( "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/mapping" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/processors" "github.com/mitchellh/hashstructure" ) diff --git a/libbeat/processors/timeseries/timeseries_test.go b/libbeat/processors/timeseries/timeseries_test.go index f25c56030b59..18dedb5b88a6 100644 --- a/libbeat/processors/timeseries/timeseries_test.go +++ b/libbeat/processors/timeseries/timeseries_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" ) var ( diff --git a/libbeat/processors/timestamp/timestamp.go b/libbeat/processors/timestamp/timestamp.go index 4971c24cc441..20da35fdb7a2 100644 --- a/libbeat/processors/timestamp/timestamp.go +++ b/libbeat/processors/timestamp/timestamp.go @@ -24,11 +24,11 @@ import ( "4d63.com/tz" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" ) const logName = "processor.timestamp" diff --git a/libbeat/processors/timestamp/timestamp_test.go b/libbeat/processors/timestamp/timestamp_test.go index 814f91637129..4b7e8dd09939 100644 --- a/libbeat/processors/timestamp/timestamp_test.go +++ b/libbeat/processors/timestamp/timestamp_test.go @@ -25,9 +25,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var expected = time.Date(2015, 3, 7, 11, 6, 39, 0, time.UTC) diff --git a/libbeat/processors/translate_sid/translatesid.go b/libbeat/processors/translate_sid/translatesid.go index 92e121d38240..491ed66859f8 100644 --- a/libbeat/processors/translate_sid/translatesid.go +++ b/libbeat/processors/translate_sid/translatesid.go @@ -27,12 +27,12 @@ import ( "go.uber.org/multierr" "golang.org/x/sys/windows" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - jsprocessor "github.com/elastic/beats/libbeat/processors/script/javascript/module/processor" - "github.com/elastic/beats/winlogbeat/sys" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + jsprocessor "github.com/elastic/beats/v7/libbeat/processors/script/javascript/module/processor" + "github.com/elastic/beats/v7/winlogbeat/sys" ) const logName = "processor.translate_sid" diff --git a/libbeat/processors/translate_sid/translatesid_test.go b/libbeat/processors/translate_sid/translatesid_test.go index d0c0ee2206c7..ad1fbc6a4b8d 100644 --- a/libbeat/processors/translate_sid/translatesid_test.go +++ b/libbeat/processors/translate_sid/translatesid_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/assert" "golang.org/x/sys/windows" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/winlogbeat/sys" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/winlogbeat/sys" ) func TestTranslateSID(t *testing.T) { diff --git a/libbeat/processors/util/geo.go b/libbeat/processors/util/geo.go index d8decf0de9c1..48d39780d22a 100644 --- a/libbeat/processors/util/geo.go +++ b/libbeat/processors/util/geo.go @@ -21,7 +21,7 @@ import ( "fmt" "regexp" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // GeoConfig contains geo configuration data. diff --git a/libbeat/processors/util/geo_test.go b/libbeat/processors/util/geo_test.go index cd7334c766cc..aa8754c2c329 100644 --- a/libbeat/processors/util/geo_test.go +++ b/libbeat/processors/util/geo_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // parseGeoConfig converts the map into a GeoConfig. diff --git a/libbeat/publisher/event.go b/libbeat/publisher/event.go index 8edc2e9db7f3..29625319e7c1 100644 --- a/libbeat/publisher/event.go +++ b/libbeat/publisher/event.go @@ -18,8 +18,8 @@ package publisher import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // Batch is used to pass a batch of events to the outputs and asynchronously listening diff --git a/libbeat/publisher/includes/includes.go b/libbeat/publisher/includes/includes.go index be42bdbabcac..e6f3ded0beea 100644 --- a/libbeat/publisher/includes/includes.go +++ b/libbeat/publisher/includes/includes.go @@ -19,14 +19,14 @@ package includes import ( // import queue types - _ "github.com/elastic/beats/libbeat/outputs/codec/format" - _ "github.com/elastic/beats/libbeat/outputs/codec/json" - _ "github.com/elastic/beats/libbeat/outputs/console" - _ "github.com/elastic/beats/libbeat/outputs/elasticsearch" - _ "github.com/elastic/beats/libbeat/outputs/fileout" - _ "github.com/elastic/beats/libbeat/outputs/kafka" - _ "github.com/elastic/beats/libbeat/outputs/logstash" - _ "github.com/elastic/beats/libbeat/outputs/redis" - _ "github.com/elastic/beats/libbeat/publisher/queue/memqueue" - _ "github.com/elastic/beats/libbeat/publisher/queue/spool" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/format" + _ "github.com/elastic/beats/v7/libbeat/outputs/codec/json" + _ "github.com/elastic/beats/v7/libbeat/outputs/console" + _ "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + _ "github.com/elastic/beats/v7/libbeat/outputs/fileout" + _ "github.com/elastic/beats/v7/libbeat/outputs/kafka" + _ "github.com/elastic/beats/v7/libbeat/outputs/logstash" + _ "github.com/elastic/beats/v7/libbeat/outputs/redis" + _ "github.com/elastic/beats/v7/libbeat/publisher/queue/memqueue" + _ "github.com/elastic/beats/v7/libbeat/publisher/queue/spool" ) diff --git a/libbeat/publisher/pipeline/acker.go b/libbeat/publisher/pipeline/acker.go index 3436f7a25289..ad0b0366416d 100644 --- a/libbeat/publisher/pipeline/acker.go +++ b/libbeat/publisher/pipeline/acker.go @@ -21,8 +21,8 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" ) // acker is used to account for published and non-published events to be ACKed diff --git a/libbeat/publisher/pipeline/batch.go b/libbeat/publisher/pipeline/batch.go index 7ce87bd77a58..5a8903c58140 100644 --- a/libbeat/publisher/pipeline/batch.go +++ b/libbeat/publisher/pipeline/batch.go @@ -20,8 +20,8 @@ package pipeline import ( "sync" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) type Batch struct { diff --git a/libbeat/publisher/pipeline/client.go b/libbeat/publisher/pipeline/client.go index c508c66db62c..d8413d97b30b 100644 --- a/libbeat/publisher/pipeline/client.go +++ b/libbeat/publisher/pipeline/client.go @@ -20,11 +20,11 @@ package pipeline import ( "sync" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // client connects a beat with the processors and pipeline queue. diff --git a/libbeat/publisher/pipeline/client_ack.go b/libbeat/publisher/pipeline/client_ack.go index 5ace3de7fcef..cbd8fc9bb2da 100644 --- a/libbeat/publisher/pipeline/client_ack.go +++ b/libbeat/publisher/pipeline/client_ack.go @@ -20,8 +20,8 @@ package pipeline import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" ) type clientACKer struct { diff --git a/libbeat/publisher/pipeline/client_test.go b/libbeat/publisher/pipeline/client_test.go index 3d84ee538816..88c3a67eb817 100644 --- a/libbeat/publisher/pipeline/client_test.go +++ b/libbeat/publisher/pipeline/client_test.go @@ -22,11 +22,11 @@ import ( "sync" "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/publisher/queue" - "github.com/elastic/beats/libbeat/tests/resources" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/tests/resources" ) func TestClient(t *testing.T) { diff --git a/libbeat/publisher/pipeline/config.go b/libbeat/publisher/pipeline/config.go index 70006d417c6d..775e75d95e22 100644 --- a/libbeat/publisher/pipeline/config.go +++ b/libbeat/publisher/pipeline/config.go @@ -21,9 +21,9 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) // Config object for loading a pipeline instance via Load. diff --git a/libbeat/publisher/pipeline/consumer.go b/libbeat/publisher/pipeline/consumer.go index cba643c94ee7..4dd211052c25 100644 --- a/libbeat/publisher/pipeline/consumer.go +++ b/libbeat/publisher/pipeline/consumer.go @@ -18,9 +18,9 @@ package pipeline import ( - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // eventConsumer collects and forwards events from the queue to the outputs work queue. diff --git a/libbeat/publisher/pipeline/controller.go b/libbeat/publisher/pipeline/controller.go index 885d0cd02941..05bd65338a98 100644 --- a/libbeat/publisher/pipeline/controller.go +++ b/libbeat/publisher/pipeline/controller.go @@ -18,11 +18,11 @@ package pipeline import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // outputController manages the pipelines output capabilities, like: diff --git a/libbeat/publisher/pipeline/module.go b/libbeat/publisher/pipeline/module.go index 570676aeee0e..6522bb721206 100644 --- a/libbeat/publisher/pipeline/module.go +++ b/libbeat/publisher/pipeline/module.go @@ -21,13 +21,13 @@ import ( "flag" "fmt" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/publisher/processing" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/publisher/processing" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // Global pipeline module for loading the main pipeline from a configuration object diff --git a/libbeat/publisher/pipeline/monitoring.go b/libbeat/publisher/pipeline/monitoring.go index 4fbf3ff8da02..b41baed1785d 100644 --- a/libbeat/publisher/pipeline/monitoring.go +++ b/libbeat/publisher/pipeline/monitoring.go @@ -17,7 +17,7 @@ package pipeline -import "github.com/elastic/beats/libbeat/monitoring" +import "github.com/elastic/beats/v7/libbeat/monitoring" type observer interface { pipelineObserver diff --git a/libbeat/publisher/pipeline/output.go b/libbeat/publisher/pipeline/output.go index a82750d4f262..405fc7cc432b 100644 --- a/libbeat/publisher/pipeline/output.go +++ b/libbeat/publisher/pipeline/output.go @@ -18,9 +18,9 @@ package pipeline import ( - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" ) // clientWorker manages output client of type outputs.Client, not supporting reconnect. diff --git a/libbeat/publisher/pipeline/pipeline.go b/libbeat/publisher/pipeline/pipeline.go index 8c2067733382..7f462b91152f 100644 --- a/libbeat/publisher/pipeline/pipeline.go +++ b/libbeat/publisher/pipeline/pipeline.go @@ -26,15 +26,15 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/processing" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/processing" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // Pipeline implementation providint all beats publisher functionality. diff --git a/libbeat/publisher/pipeline/pipeline_ack.go b/libbeat/publisher/pipeline/pipeline_ack.go index b9be8c42e495..e9efb390f4f6 100644 --- a/libbeat/publisher/pipeline/pipeline_ack.go +++ b/libbeat/publisher/pipeline/pipeline_ack.go @@ -20,7 +20,7 @@ package pipeline import ( "errors" - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" ) type ackBuilder interface { diff --git a/libbeat/publisher/pipeline/pipeline_test.go b/libbeat/publisher/pipeline/pipeline_test.go index c5ff791bf681..88a0c21f6315 100644 --- a/libbeat/publisher/pipeline/pipeline_test.go +++ b/libbeat/publisher/pipeline/pipeline_test.go @@ -20,9 +20,9 @@ package pipeline import ( "sync" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) type testQueue struct { diff --git a/libbeat/publisher/pipeline/retry.go b/libbeat/publisher/pipeline/retry.go index 9dd3385c40ee..a65a7d227c8c 100644 --- a/libbeat/publisher/pipeline/retry.go +++ b/libbeat/publisher/pipeline/retry.go @@ -20,7 +20,7 @@ package pipeline import ( "sync" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // retryer is responsible for accepting and managing failed send attempts. It diff --git a/libbeat/publisher/pipeline/stress/gen.go b/libbeat/publisher/pipeline/stress/gen.go index d33049bc3903..e5a18ceaef62 100644 --- a/libbeat/publisher/pipeline/stress/gen.go +++ b/libbeat/publisher/pipeline/stress/gen.go @@ -24,10 +24,10 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" ) type generateConfig struct { diff --git a/libbeat/publisher/pipeline/stress/out.go b/libbeat/publisher/pipeline/stress/out.go index 211e056ce602..692d62f98ab3 100644 --- a/libbeat/publisher/pipeline/stress/out.go +++ b/libbeat/publisher/pipeline/stress/out.go @@ -21,10 +21,10 @@ import ( "math/rand" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/publisher" ) type testOutput struct { diff --git a/libbeat/publisher/pipeline/stress/run.go b/libbeat/publisher/pipeline/stress/run.go index 902d303e94f4..8a46489ae6cf 100644 --- a/libbeat/publisher/pipeline/stress/run.go +++ b/libbeat/publisher/pipeline/stress/run.go @@ -22,12 +22,12 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs" - "github.com/elastic/beats/libbeat/publisher/pipeline" - "github.com/elastic/beats/libbeat/publisher/processing" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs" + "github.com/elastic/beats/v7/libbeat/publisher/pipeline" + "github.com/elastic/beats/v7/libbeat/publisher/processing" ) type config struct { diff --git a/libbeat/publisher/pipeline/stress/sig.go b/libbeat/publisher/pipeline/stress/sig.go index 913e4b7aa014..537fc9c633bb 100644 --- a/libbeat/publisher/pipeline/stress/sig.go +++ b/libbeat/publisher/pipeline/stress/sig.go @@ -17,7 +17,7 @@ package stress -import "github.com/elastic/beats/libbeat/common/atomic" +import "github.com/elastic/beats/v7/libbeat/common/atomic" type closeSignaler struct { active atomic.Bool diff --git a/libbeat/publisher/pipeline/stress/stress_test.go b/libbeat/publisher/pipeline/stress/stress_test.go index 2f0899d8a18b..04f39e49afda 100644 --- a/libbeat/publisher/pipeline/stress/stress_test.go +++ b/libbeat/publisher/pipeline/stress/stress_test.go @@ -29,11 +29,11 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/publisher/pipeline/stress" - _ "github.com/elastic/beats/libbeat/publisher/queue/memqueue" - _ "github.com/elastic/beats/libbeat/publisher/queue/spool" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher/pipeline/stress" + _ "github.com/elastic/beats/v7/libbeat/publisher/queue/memqueue" + _ "github.com/elastic/beats/v7/libbeat/publisher/queue/spool" ) // additional flags diff --git a/libbeat/publisher/processing/default.go b/libbeat/publisher/processing/default.go index cd15a0750fd8..dea3fe88fd8b 100644 --- a/libbeat/publisher/processing/default.go +++ b/libbeat/publisher/processing/default.go @@ -22,14 +22,14 @@ import ( "github.com/elastic/ecs/code/go/ecs" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/mapping" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/actions" - "github.com/elastic/beats/libbeat/processors/timeseries" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/actions" + "github.com/elastic/beats/v7/libbeat/processors/timeseries" ) // builder is used to create the event processing pipeline in Beats. The diff --git a/libbeat/publisher/processing/default_test.go b/libbeat/publisher/processing/default_test.go index c21345d27014..ba6a6042993f 100644 --- a/libbeat/publisher/processing/default_test.go +++ b/libbeat/publisher/processing/default_test.go @@ -26,10 +26,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors/actions" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors/actions" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/libbeat/publisher/processing/processing.go b/libbeat/publisher/processing/processing.go index ff1be24fc453..4f615fb1422f 100644 --- a/libbeat/publisher/processing/processing.go +++ b/libbeat/publisher/processing/processing.go @@ -18,9 +18,9 @@ package processing import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // SupportFactory creates a new processing Supporter that can be used with diff --git a/libbeat/publisher/processing/processors.go b/libbeat/publisher/processing/processors.go index bb0b2c7ccf03..0125008c39fc 100644 --- a/libbeat/publisher/processing/processors.go +++ b/libbeat/publisher/processing/processors.go @@ -22,11 +22,11 @@ import ( "strings" "sync" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/outputs/codec/json" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/processors" ) type group struct { diff --git a/libbeat/publisher/queue/memqueue/batchbuf.go b/libbeat/publisher/queue/memqueue/batchbuf.go index d84c8717acfc..30019cadeb63 100644 --- a/libbeat/publisher/queue/memqueue/batchbuf.go +++ b/libbeat/publisher/queue/memqueue/batchbuf.go @@ -17,7 +17,7 @@ package memqueue -import "github.com/elastic/beats/libbeat/publisher" +import "github.com/elastic/beats/v7/libbeat/publisher" type batchBuffer struct { next *batchBuffer diff --git a/libbeat/publisher/queue/memqueue/broker.go b/libbeat/publisher/queue/memqueue/broker.go index 1446182b4b64..b91c0deea9f6 100644 --- a/libbeat/publisher/queue/memqueue/broker.go +++ b/libbeat/publisher/queue/memqueue/broker.go @@ -21,10 +21,10 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/feature" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/feature" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // Feature exposes a memory queue. diff --git a/libbeat/publisher/queue/memqueue/consume.go b/libbeat/publisher/queue/memqueue/consume.go index f225fc130066..300422751172 100644 --- a/libbeat/publisher/queue/memqueue/consume.go +++ b/libbeat/publisher/queue/memqueue/consume.go @@ -21,9 +21,9 @@ import ( "errors" "io" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) type consumer struct { diff --git a/libbeat/publisher/queue/memqueue/internal_api.go b/libbeat/publisher/queue/memqueue/internal_api.go index c73260c2150a..d693645587f6 100644 --- a/libbeat/publisher/queue/memqueue/internal_api.go +++ b/libbeat/publisher/queue/memqueue/internal_api.go @@ -17,7 +17,7 @@ package memqueue -import "github.com/elastic/beats/libbeat/publisher" +import "github.com/elastic/beats/v7/libbeat/publisher" // producer -> broker API diff --git a/libbeat/publisher/queue/memqueue/produce.go b/libbeat/publisher/queue/memqueue/produce.go index 67c0c49f62ab..2838e1ce574b 100644 --- a/libbeat/publisher/queue/memqueue/produce.go +++ b/libbeat/publisher/queue/memqueue/produce.go @@ -18,10 +18,10 @@ package memqueue import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) type forgetfulProducer struct { diff --git a/libbeat/publisher/queue/memqueue/queue_test.go b/libbeat/publisher/queue/memqueue/queue_test.go index eca1f1918caf..44d94d05bf47 100644 --- a/libbeat/publisher/queue/memqueue/queue_test.go +++ b/libbeat/publisher/queue/memqueue/queue_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/publisher/queue" - "github.com/elastic/beats/libbeat/publisher/queue/queuetest" + "github.com/elastic/beats/v7/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/publisher/queue/queuetest" ) var seed int64 diff --git a/libbeat/publisher/queue/memqueue/ringbuf.go b/libbeat/publisher/queue/memqueue/ringbuf.go index 24af319c283d..202411c9c432 100644 --- a/libbeat/publisher/queue/memqueue/ringbuf.go +++ b/libbeat/publisher/queue/memqueue/ringbuf.go @@ -20,7 +20,7 @@ package memqueue import ( "fmt" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher" ) // Internal event ring buffer. diff --git a/libbeat/publisher/queue/queue.go b/libbeat/publisher/queue/queue.go index 9cda2b25f884..a126e9ef381b 100644 --- a/libbeat/publisher/queue/queue.go +++ b/libbeat/publisher/queue/queue.go @@ -20,10 +20,10 @@ package queue import ( "io" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/publisher" ) // Factory for creating a queue used by a pipeline instance. diff --git a/libbeat/publisher/queue/queue_reg.go b/libbeat/publisher/queue/queue_reg.go index d7690c006f3b..c4a9d446c521 100644 --- a/libbeat/publisher/queue/queue_reg.go +++ b/libbeat/publisher/queue/queue_reg.go @@ -18,7 +18,7 @@ package queue import ( - "github.com/elastic/beats/libbeat/feature" + "github.com/elastic/beats/v7/libbeat/feature" ) // Namespace is the feature namespace for queue definition. diff --git a/libbeat/publisher/queue/queuetest/event.go b/libbeat/publisher/queue/queuetest/event.go index ff30f9609ab9..5a66fe050e23 100644 --- a/libbeat/publisher/queue/queuetest/event.go +++ b/libbeat/publisher/queue/queuetest/event.go @@ -20,9 +20,9 @@ package queuetest import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher" ) func makeEvent(fields common.MapStr) publisher.Event { diff --git a/libbeat/publisher/queue/queuetest/log.go b/libbeat/publisher/queue/queuetest/log.go index af893a0cf08f..ba2c8e1f1ff6 100644 --- a/libbeat/publisher/queue/queuetest/log.go +++ b/libbeat/publisher/queue/queuetest/log.go @@ -25,7 +25,7 @@ import ( "sync" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) var debug bool diff --git a/libbeat/publisher/queue/queuetest/producer_cancel.go b/libbeat/publisher/queue/queuetest/producer_cancel.go index baa0021bbe86..195c2de79f75 100644 --- a/libbeat/publisher/queue/queuetest/producer_cancel.go +++ b/libbeat/publisher/queue/queuetest/producer_cancel.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // TestSingleProducerConsumer tests buffered events for a producer getting diff --git a/libbeat/publisher/queue/queuetest/queuetest.go b/libbeat/publisher/queue/queuetest/queuetest.go index 4e4fefa81ade..fb5b04666b99 100644 --- a/libbeat/publisher/queue/queuetest/queuetest.go +++ b/libbeat/publisher/queue/queuetest/queuetest.go @@ -21,8 +21,8 @@ import ( "sync" "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // QueueFactory is used to create a per test queue instance. diff --git a/libbeat/publisher/queue/spool/codec.go b/libbeat/publisher/queue/spool/codec.go index ea51e930b980..69f693a4817e 100644 --- a/libbeat/publisher/queue/spool/codec.go +++ b/libbeat/publisher/queue/spool/codec.go @@ -22,10 +22,10 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/codec" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/codec" + "github.com/elastic/beats/v7/libbeat/publisher" "github.com/elastic/go-structform" "github.com/elastic/go-structform/cborl" "github.com/elastic/go-structform/gotype" diff --git a/libbeat/publisher/queue/spool/codec_test.go b/libbeat/publisher/queue/spool/codec_test.go index 3588d3e2f21c..6460985f6c30 100644 --- a/libbeat/publisher/queue/spool/codec_test.go +++ b/libbeat/publisher/queue/spool/codec_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher" ) func TestEncodeDecode(t *testing.T) { diff --git a/libbeat/publisher/queue/spool/config.go b/libbeat/publisher/queue/spool/config.go index e936bae1f7bf..1d9d9a3299d4 100644 --- a/libbeat/publisher/queue/spool/config.go +++ b/libbeat/publisher/queue/spool/config.go @@ -27,7 +27,7 @@ import ( "github.com/dustin/go-humanize" "github.com/joeshaw/multierror" - "github.com/elastic/beats/libbeat/common/cfgtype" + "github.com/elastic/beats/v7/libbeat/common/cfgtype" ) type config struct { diff --git a/libbeat/publisher/queue/spool/consume.go b/libbeat/publisher/queue/spool/consume.go index a8f55775cb92..74f3058f739f 100644 --- a/libbeat/publisher/queue/spool/consume.go +++ b/libbeat/publisher/queue/spool/consume.go @@ -21,9 +21,9 @@ import ( "errors" "io" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) type consumer struct { diff --git a/libbeat/publisher/queue/spool/inbroker.go b/libbeat/publisher/queue/spool/inbroker.go index 54e895bc1fd7..b165f2a152b9 100644 --- a/libbeat/publisher/queue/spool/inbroker.go +++ b/libbeat/publisher/queue/spool/inbroker.go @@ -22,7 +22,7 @@ import ( "math" "time" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/publisher/queue" "github.com/elastic/go-txfile/pq" ) diff --git a/libbeat/publisher/queue/spool/internal_api.go b/libbeat/publisher/queue/spool/internal_api.go index e4a38b317d3c..a6fd97102d4b 100644 --- a/libbeat/publisher/queue/spool/internal_api.go +++ b/libbeat/publisher/queue/spool/internal_api.go @@ -18,7 +18,7 @@ package spool import ( - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher" ) // producer -> broker API diff --git a/libbeat/publisher/queue/spool/log.go b/libbeat/publisher/queue/spool/log.go index f85bc035ec12..64150366b531 100644 --- a/libbeat/publisher/queue/spool/log.go +++ b/libbeat/publisher/queue/spool/log.go @@ -21,7 +21,7 @@ import ( "fmt" "sync" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type logger interface { diff --git a/libbeat/publisher/queue/spool/module.go b/libbeat/publisher/queue/spool/module.go index 7d778b5057ca..a98c063eb486 100644 --- a/libbeat/publisher/queue/spool/module.go +++ b/libbeat/publisher/queue/spool/module.go @@ -18,12 +18,12 @@ package spool import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/feature" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/paths" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/feature" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/publisher/queue" "github.com/elastic/go-txfile" ) diff --git a/libbeat/publisher/queue/spool/outbroker.go b/libbeat/publisher/queue/spool/outbroker.go index e29a2b4edbb7..409b2cde3885 100644 --- a/libbeat/publisher/queue/spool/outbroker.go +++ b/libbeat/publisher/queue/spool/outbroker.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher" "github.com/elastic/go-txfile/pq" ) diff --git a/libbeat/publisher/queue/spool/produce.go b/libbeat/publisher/queue/spool/produce.go index fb2efb8d5841..81e12a18d02e 100644 --- a/libbeat/publisher/queue/spool/produce.go +++ b/libbeat/publisher/queue/spool/produce.go @@ -20,10 +20,10 @@ package spool import ( "sync" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/publisher" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/publisher" + "github.com/elastic/beats/v7/libbeat/publisher/queue" ) // forgetfulProducer forwards event to the inBroker. The forgetfulProducer diff --git a/libbeat/publisher/queue/spool/spool.go b/libbeat/publisher/queue/spool/spool.go index d5ac5f7e3679..bc1ee43b831d 100644 --- a/libbeat/publisher/queue/spool/spool.go +++ b/libbeat/publisher/queue/spool/spool.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/publisher/queue" "github.com/elastic/go-txfile" "github.com/elastic/go-txfile/pq" ) diff --git a/libbeat/publisher/queue/spool/spool_test.go b/libbeat/publisher/queue/spool/spool_test.go index 612fc0247811..8a8b466c2a1c 100644 --- a/libbeat/publisher/queue/spool/spool_test.go +++ b/libbeat/publisher/queue/spool/spool_test.go @@ -26,8 +26,8 @@ import ( humanize "github.com/dustin/go-humanize" - "github.com/elastic/beats/libbeat/publisher/queue" - "github.com/elastic/beats/libbeat/publisher/queue/queuetest" + "github.com/elastic/beats/v7/libbeat/publisher/queue" + "github.com/elastic/beats/v7/libbeat/publisher/queue/queuetest" "github.com/elastic/go-txfile" "github.com/elastic/go-txfile/txfiletest" ) diff --git a/libbeat/publisher/testing/testing.go b/libbeat/publisher/testing/testing.go index 87a1ac2c0bd6..401aa833c9d5 100644 --- a/libbeat/publisher/testing/testing.go +++ b/libbeat/publisher/testing/testing.go @@ -19,7 +19,7 @@ package testing // ChanClient implements Client interface, forwarding published events to some import ( - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" ) type TestPublisher struct { diff --git a/libbeat/publisher/testing/testing_test.go b/libbeat/publisher/testing/testing_test.go index 6ade86c0d3ec..a7bffe0bb361 100644 --- a/libbeat/publisher/testing/testing_test.go +++ b/libbeat/publisher/testing/testing_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) var cnt = 0 diff --git a/libbeat/reader/debug/debug.go b/libbeat/reader/debug/debug.go index 31012158dc57..5e0b1e7c93a5 100644 --- a/libbeat/reader/debug/debug.go +++ b/libbeat/reader/debug/debug.go @@ -21,7 +21,7 @@ import ( "bytes" "io" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/libbeat/reader/debug/debug_test.go b/libbeat/reader/debug/debug_test.go index deb89eb08349..ac6b6878c9b1 100644 --- a/libbeat/reader/debug/debug_test.go +++ b/libbeat/reader/debug/debug_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func TestMakeNullCheck(t *testing.T) { diff --git a/libbeat/reader/message.go b/libbeat/reader/message.go index a92bc9092ccf..344eacd54dfc 100644 --- a/libbeat/reader/message.go +++ b/libbeat/reader/message.go @@ -20,7 +20,7 @@ package reader import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Message represents a reader event with timestamp, content and actual number diff --git a/libbeat/reader/multiline/multiline.go b/libbeat/reader/multiline/multiline.go index cf3b586d1caa..a6054c765502 100644 --- a/libbeat/reader/multiline/multiline.go +++ b/libbeat/reader/multiline/multiline.go @@ -22,10 +22,10 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/reader" - "github.com/elastic/beats/libbeat/reader/readfile" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/readfile" ) // MultiLine reader combining multiple line events into one multi-line event. diff --git a/libbeat/reader/multiline/multiline_config.go b/libbeat/reader/multiline/multiline_config.go index 94e9c447e9be..93c155c39071 100644 --- a/libbeat/reader/multiline/multiline_config.go +++ b/libbeat/reader/multiline/multiline_config.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/common/match" ) // Config holds the options of multiline readers. diff --git a/libbeat/reader/multiline/multiline_test.go b/libbeat/reader/multiline/multiline_test.go index dd9071804c19..a17c79c53d6e 100644 --- a/libbeat/reader/multiline/multiline_test.go +++ b/libbeat/reader/multiline/multiline_test.go @@ -29,10 +29,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/match" - "github.com/elastic/beats/libbeat/reader" - "github.com/elastic/beats/libbeat/reader/readfile" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/common/match" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/readfile" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" ) type bufferSource struct{ buf *bytes.Buffer } diff --git a/libbeat/reader/readfile/encode.go b/libbeat/reader/readfile/encode.go index ada4ae91947b..d2cf3cce4be0 100644 --- a/libbeat/reader/readfile/encode.go +++ b/libbeat/reader/readfile/encode.go @@ -22,8 +22,8 @@ import ( "io" "time" - "github.com/elastic/beats/libbeat/reader" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" ) // Reader produces lines by reading lines from an io.Reader diff --git a/libbeat/reader/readfile/encode_test.go b/libbeat/reader/readfile/encode_test.go index 36d3df433ec5..9d6205c229fa 100644 --- a/libbeat/reader/readfile/encode_test.go +++ b/libbeat/reader/readfile/encode_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" ) func TestEncodeLines(t *testing.T) { diff --git a/libbeat/reader/readfile/limit.go b/libbeat/reader/readfile/limit.go index 403dea958476..d547ff09dfe1 100644 --- a/libbeat/reader/readfile/limit.go +++ b/libbeat/reader/readfile/limit.go @@ -20,7 +20,7 @@ package readfile import ( "fmt" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader" ) // Reader sets an upper limited on line length. Lines longer diff --git a/libbeat/reader/readfile/limit_test.go b/libbeat/reader/readfile/limit_test.go index 9f72d297475b..e310e151cf8a 100644 --- a/libbeat/reader/readfile/limit_test.go +++ b/libbeat/reader/readfile/limit_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader" ) type mockReader struct { diff --git a/libbeat/reader/readfile/line.go b/libbeat/reader/readfile/line.go index 698aa3cff110..21d902c6eb84 100644 --- a/libbeat/reader/readfile/line.go +++ b/libbeat/reader/readfile/line.go @@ -24,8 +24,8 @@ import ( "golang.org/x/text/transform" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" ) // lineReader reads lines from underlying reader, decoding the input stream diff --git a/libbeat/reader/readfile/line_test.go b/libbeat/reader/readfile/line_test.go index 7ac684163c9c..13b13127a86a 100644 --- a/libbeat/reader/readfile/line_test.go +++ b/libbeat/reader/readfile/line_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/assert" "golang.org/x/text/transform" - "github.com/elastic/beats/libbeat/reader/readfile/encoding" + "github.com/elastic/beats/v7/libbeat/reader/readfile/encoding" ) // Sample texts are from http://www.columbia.edu/~kermit/utf8.html diff --git a/libbeat/reader/readfile/strip_newline.go b/libbeat/reader/readfile/strip_newline.go index e815020dc6b1..97cc005da92c 100644 --- a/libbeat/reader/readfile/strip_newline.go +++ b/libbeat/reader/readfile/strip_newline.go @@ -20,7 +20,7 @@ package readfile import ( "bytes" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader" ) // StripNewline reader removes the last trailing newline characters from diff --git a/libbeat/reader/readfile/timeout.go b/libbeat/reader/readfile/timeout.go index 80a3270ce05c..fd3d1c8ba7c9 100644 --- a/libbeat/reader/readfile/timeout.go +++ b/libbeat/reader/readfile/timeout.go @@ -21,7 +21,7 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/reader" ) var ( diff --git a/libbeat/reader/readjson/docker_json.go b/libbeat/reader/readjson/docker_json.go index 57040d0b27ab..95c98bddbb88 100644 --- a/libbeat/reader/readjson/docker_json.go +++ b/libbeat/reader/readjson/docker_json.go @@ -26,9 +26,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/reader" ) // DockerJSONReader processor renames a given field diff --git a/libbeat/reader/readjson/docker_json_test.go b/libbeat/reader/readjson/docker_json_test.go index f87c138587f9..23cc862d9646 100644 --- a/libbeat/reader/readjson/docker_json_test.go +++ b/libbeat/reader/readjson/docker_json_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/reader" ) func TestDockerJSON(t *testing.T) { diff --git a/libbeat/reader/readjson/json.go b/libbeat/reader/readjson/json.go index a669b3f49ae0..3567c372ed81 100644 --- a/libbeat/reader/readjson/json.go +++ b/libbeat/reader/readjson/json.go @@ -23,11 +23,11 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/jsontransform" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/reader" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/jsontransform" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/reader" ) // JSONReader parses JSON inputs diff --git a/libbeat/reader/readjson/json_test.go b/libbeat/reader/readjson/json_test.go index d6f82585e492..7d88b032c971 100644 --- a/libbeat/reader/readjson/json_test.go +++ b/libbeat/reader/readjson/json_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestUnmarshal(t *testing.T) { diff --git a/libbeat/scripts/Makefile b/libbeat/scripts/Makefile index 91f7880f0606..89b3adf2ffa7 100755 --- a/libbeat/scripts/Makefile +++ b/libbeat/scripts/Makefile @@ -3,7 +3,10 @@ BEAT_NAME?=libbeat## @packaging Name of the binary LICENSE?=ASL2 BEAT_TITLE?=${BEAT_NAME}## @packaging Title of the application -BEAT_PATH?=github.com/elastic/beats/${BEAT_NAME} +BEATS_ROOT?=github.com/elastic/beats +BEATS_ROOT_IMPORT_PATH?=${BEATS_ROOT}/v7 +BEAT_PATH?=${BEATS_ROOT}/${BEAT_NAME} +BEAT_IMPORT_PATH?=${BEATS_ROOT_IMPORT_PATH}/${BEAT_NAME} BEAT_PACKAGE_NAME?=${BEAT_NAME} BEAT_INDEX_PREFIX?=${BEAT_NAME} BEAT_URL?=https://www.elastic.co/products/beats/${BEAT_NAME} ## @packaging Link to the homepage of the application @@ -13,7 +16,7 @@ BEAT_VENDOR?=Elastic ## @packaging Name of the vendor of the application BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH})) BEAT_REF_YAML?=true ES_BEATS?=..## @community_beat Must be set to ./vendor/github.com/elastic/beats. It must always be a relative path. -GOPACKAGES?=$(shell go list ${BEAT_PATH}/... | grep -v /vendor/ | grep -v /scripts/cmd/ ) +GOPACKAGES?=$(shell go list ${BEAT_IMPORT_PATH}/... | grep -v /scripts/cmd/ ) PACKER_TEMPLATES_DIR?=${ES_BEATS}/dev-tools/packer ## @Building Directory of templates that are used by "make release" NOTICE_FILE?=../NOTICE.txt LICENSE_FILE?=../licenses/APACHE-LICENSE-2.0.txt @@ -21,8 +24,12 @@ ELASTIC_LICENSE_FILE?=../licenses/ELASTIC-LICENSE.txt SECCOMP_BINARY?=${BEAT_NAME} SECCOMP_BLACKLIST?=${ES_BEATS}/libbeat/common/seccomp/seccomp-profiler-blacklist.txt SECCOMP_ALLOWLIST?=${ES_BEATS}/libbeat/common/seccomp/seccomp-profiler-allow.txt +INSTALL_FLAG?=-mod=vendor +INSTALL_CMD?=install ${INSTALL_FLAG} +export INSTALL_FLAG +export INSTALL_CMD MAGE_PRESENT := $(shell command -v mage 2> /dev/null) -MAGE_IMPORT_PATH?=github.com/elastic/beats/vendor/github.com/magefile/mage +MAGE_IMPORT_PATH?=github.com/magefile/mage export MAGE_IMPORT_PATH space:=$() # @@ -59,8 +66,8 @@ PKG_BUILD_DIR?=$(BUILD_DIR)/package${PKG_SUFFIX} PKG_UPLOAD_DIR?=$(BUILD_DIR)/upload COVERAGE_DIR?=${BUILD_DIR}/coverage COVERAGE_TOOL?=${BEAT_GOPATH}/bin/gotestcover -COVERAGE_TOOL_REPO?=github.com/elastic/beats/vendor/github.com/pierrre/gotestcover -TESTIFY_TOOL_REPO?=github.com/elastic/beats/vendor/github.com/stretchr/testify/assert +COVERAGE_TOOL_REPO?=github.com/pierrre/gotestcover +TESTIFY_TOOL_REPO?=github.com/stretchr/testify/assert NOW=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') GOBUILD_FLAGS?=-ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=$(NOW) -X github.com/elastic/beats/libbeat/version.commit=$(COMMIT_ID)" GOIMPORTS=goimports @@ -70,7 +77,7 @@ GOLINT=golint GOLINT_REPO?=golang.org/x/lint/golint REVIEWDOG?=reviewdog -conf ${ES_BEATS}/reviewdog.yml REVIEWDOG_OPTIONS?=-diff "git diff master" -REVIEWDOG_REPO?=github.com/haya14busa/reviewdog/cmd/reviewdog +REVIEWDOG_REPO?=github.com/reviewdog/reviewdog/cmd/reviewdog PROCESSES?= 4 TIMEOUT?= 90 PYTHON_TEST_FILES?=$(shell find . -type f -name 'test_*.py' -not -path "*/build/*" -not -path "*/vendor/*" 2>/dev/null) @@ -121,19 +128,24 @@ include $(ES_BEATS)/dev-tools/make/mage.mk .DEFAULT_GOAL := ${BEAT_NAME} -${BEAT_NAME}: $(GOFILES_ALL) ## @build build the beat application +${BEAT_NAME}: $(GOFILES_ALL) update-yacc-vendor ## @build build the beat application go build $(GOBUILD_FLAGS) # Create test coverage binary -${BEAT_NAME}.test: $(GOFILES_ALL) +${BEAT_NAME}.test: $(GOFILES_ALL) update-yacc-vendor @go build -o /dev/null @go test $(RACE) -c -coverpkg ${GOPACKAGES_COMMA_SEP} +# Avoid running yacc to generate a parser for dependency. +.PHONY: update-yacc-vendor +update-yacc-vendor: + touch -c ../vendor/github.com/yuin/gopher-lua/parse/parser.go + .PHONY: crosscompile crosscompile: ## @build Cross-compile beat for the OS'es specified in GOX_OS variable. The binaries are placed in the build/bin directory. crosscompile: $(GOFILES) ifneq ($(shell [[ $(BEAT_NAME) == journalbeat ]] && echo true ),true) - go get github.com/mitchellh/gox + go install -mod=vendor github.com/mitchellh/gox mkdir -p ${BUILD_DIR}/bin gox -output="${BUILD_DIR}/bin/{{.Dir}}-{{.OS}}-{{.Arch}}" -os="$(strip $(GOX_OS))" -osarch="$(strip $(GOX_OSARCH))" ${GOX_FLAGS} endif @@ -156,13 +168,13 @@ endif .PHONY: fmt fmt: add-headers python-env ## @build Runs `goimports -l -w` and `autopep8`on the project's source code, modifying any files that do not match its style. - @go get $(GOIMPORTS_REPO) + @go ${INSTALL_CMD} $(GOIMPORTS_REPO) @goimports -local ${GOIMPORTS_LOCAL_PREFIX} -l -w ${GOFILES_NOVENDOR} @${FIND} -name '*.py' -exec ${PYTHON_ENV}/bin/autopep8 --in-place --max-line-length 120 {} \; .PHONY: lint lint: - @go get $(GOLINT_REPO) $(REVIEWDOG_REPO) + @go install -mod=vendor $(GOLINT_REPO) $(REVIEWDOG_REPO) $(REVIEWDOG) $(REVIEWDOG_OPTIONS) .PHONY: clean @@ -181,12 +193,14 @@ ci: ## @build Shortcut for continuous integration. This should always run befor # Preparation for tests .PHONY: prepare-tests -prepare-tests: +prepare-tests: update-yacc-vendor mkdir -p ${COVERAGE_DIR} # gotestcover is needed to fetch coverage for multiple packages - go get ${COVERAGE_TOOL_REPO} + go ${INSTALL_CMD} ${COVERAGE_TOOL_REPO} # testify is needed for unit and integration tests - go get ${TESTIFY_TOOL_REPO} + go ${INSTALL_CMD} ${TESTIFY_TOOL_REPO} + # Avoid running yacc to generate a parser for dependency. + touch -c ../vendor/github.com/yuin/gopher-lua/parse/parser.go.c .PHONY: unit-tests unit-tests: ## @testing Runs the unit tests with coverage. Race is not enabled for unit tests because tests run much slower. @@ -216,6 +230,7 @@ integration-tests-environment: prepare-tests build-image -e DOCKER_COMPOSE_PROJECT_NAME=${DOCKER_COMPOSE_PROJECT_NAME} \ -e TEST_ENVIRONMENT=${TEST_ENVIRONMENT} \ -e BEATS_DOCKER_INTEGRATION_TEST_ENV=${BEATS_DOCKER_INTEGRATION_TEST_ENV} \ + -e GOFLAGS=${INSTALL_FLAG} \ beat make integration-tests # Runs the system tests @@ -229,7 +244,13 @@ system-tests: prepare-tests ${BEAT_NAME}.test python-env .PHONY: system-tests-environment system-tests-environment: ## @testing Runs the system tests inside a virtual environment. This can be run on any docker-machine (local, remote) system-tests-environment: prepare-tests build-image - ${DOCKER_COMPOSE} run -e INTEGRATION_TESTS=1 -e TESTING_ENVIRONMENT=${TESTING_ENVIRONMENT} -e DOCKER_COMPOSE_PROJECT_NAME=${DOCKER_COMPOSE_PROJECT_NAME} -e PYTHON_EXE=${PYTHON_EXE} beat make system-tests + ${DOCKER_COMPOSE} run \ + -e INTEGRATION_TESTS=1 \ + -e TESTING_ENVIRONMENT=${TESTING_ENVIRONMENT} \ + -e DOCKER_COMPOSE_PROJECT_NAME=${DOCKER_COMPOSE_PROJECT_NAME} \ + -e PYTHON_EXE=${PYTHON_EXE} \ + -e GOFLAGS=${INSTALL_FLAG} \ + beat make system-tests .PHONY: fast-system-tests fast-system-tests: ## @testing Runs system tests without coverage reports and in parallel @@ -441,7 +462,7 @@ help_variables: ## @help Show Makefile customizable variables. # SECCOMP_BINARY. .PHONY: seccomp seccomp: - @go get github.com/elastic/beats/vendor/github.com/elastic/go-seccomp-bpf/cmd/seccomp-profiler + @go ${INSTALL_CMD} github.com/elastic/go-seccomp-bpf/cmd/seccomp-profiler @test -f ${SECCOMP_BINARY} || (echo "${SECCOMP_BINARY} binary is not built."; false) seccomp-profiler \ -b "$(shell grep -v ^# "${SECCOMP_BLACKLIST}")" \ @@ -471,3 +492,7 @@ ifdef NO_COLLECT .PHONY: collect collect: endif + +.PHONY: vendor +vendor: + @mage vendor diff --git a/libbeat/scripts/cmd/global_fields/main.go b/libbeat/scripts/cmd/global_fields/main.go index b71a848d845a..914556e350ac 100644 --- a/libbeat/scripts/cmd/global_fields/main.go +++ b/libbeat/scripts/cmd/global_fields/main.go @@ -25,8 +25,8 @@ import ( "os" "path/filepath" - "github.com/elastic/beats/libbeat/generator/fields" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/generator/fields" + "github.com/elastic/beats/v7/libbeat/mapping" ) func main() { diff --git a/libbeat/scripts/cmd/global_fields/main_test.go b/libbeat/scripts/cmd/global_fields/main_test.go index cef6b68faeba..9c1e0b633f93 100644 --- a/libbeat/scripts/cmd/global_fields/main_test.go +++ b/libbeat/scripts/cmd/global_fields/main_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/generator/fields" + "github.com/elastic/beats/v7/libbeat/generator/fields" ) type testcase struct { diff --git a/libbeat/scripts/cmd/stress_pipeline/main.go b/libbeat/scripts/cmd/stress_pipeline/main.go index a0c0d81dbb62..49ba19c686c0 100644 --- a/libbeat/scripts/cmd/stress_pipeline/main.go +++ b/libbeat/scripts/cmd/stress_pipeline/main.go @@ -25,18 +25,18 @@ import ( _ "net/http/pprof" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - logpcfg "github.com/elastic/beats/libbeat/logp/configure" - _ "github.com/elastic/beats/libbeat/outputs/console" - _ "github.com/elastic/beats/libbeat/outputs/elasticsearch" - _ "github.com/elastic/beats/libbeat/outputs/fileout" - _ "github.com/elastic/beats/libbeat/outputs/logstash" - "github.com/elastic/beats/libbeat/paths" - "github.com/elastic/beats/libbeat/publisher/pipeline/stress" - _ "github.com/elastic/beats/libbeat/publisher/queue/memqueue" - _ "github.com/elastic/beats/libbeat/publisher/queue/spool" - "github.com/elastic/beats/libbeat/service" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + logpcfg "github.com/elastic/beats/v7/libbeat/logp/configure" + _ "github.com/elastic/beats/v7/libbeat/outputs/console" + _ "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + _ "github.com/elastic/beats/v7/libbeat/outputs/fileout" + _ "github.com/elastic/beats/v7/libbeat/outputs/logstash" + "github.com/elastic/beats/v7/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/publisher/pipeline/stress" + _ "github.com/elastic/beats/v7/libbeat/publisher/queue/memqueue" + _ "github.com/elastic/beats/v7/libbeat/publisher/queue/spool" + "github.com/elastic/beats/v7/libbeat/service" ) var ( diff --git a/libbeat/service/service.go b/libbeat/service/service.go index 4063e5e6be79..2d88b25f7823 100644 --- a/libbeat/service/service.go +++ b/libbeat/service/service.go @@ -32,8 +32,8 @@ import ( "sync" "syscall" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) // HandleSignals manages OS signals that ask the service/daemon to stop. diff --git a/libbeat/service/service_windows.go b/libbeat/service/service_windows.go index 74d1f8f4ea8d..649bf85cfa88 100644 --- a/libbeat/service/service_windows.go +++ b/libbeat/service/service_windows.go @@ -25,7 +25,7 @@ import ( "golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc/debug" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type beatService struct{} diff --git a/libbeat/template/config.go b/libbeat/template/config.go index 6d6d8426df9e..c9e963d6135f 100644 --- a/libbeat/template/config.go +++ b/libbeat/template/config.go @@ -17,7 +17,7 @@ package template -import "github.com/elastic/beats/libbeat/mapping" +import "github.com/elastic/beats/v7/libbeat/mapping" // TemplateConfig holds config information about the Elasticsearch template type TemplateConfig struct { diff --git a/libbeat/template/load.go b/libbeat/template/load.go index 2a63c9efb397..88244fb11510 100644 --- a/libbeat/template/load.go +++ b/libbeat/template/load.go @@ -25,10 +25,10 @@ import ( "os" "strings" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/paths" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/paths" ) //Loader interface for loading templates diff --git a/libbeat/template/load_integration_test.go b/libbeat/template/load_integration_test.go index ae393010f0db..958b311057f7 100644 --- a/libbeat/template/load_integration_test.go +++ b/libbeat/template/load_integration_test.go @@ -32,11 +32,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/elasticsearch" - "github.com/elastic/beats/libbeat/outputs/elasticsearch/estest" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch" + "github.com/elastic/beats/v7/libbeat/outputs/elasticsearch/estest" + "github.com/elastic/beats/v7/libbeat/version" ) func init() { diff --git a/libbeat/template/load_test.go b/libbeat/template/load_test.go index 97c11b8dfce7..75096e559f29 100644 --- a/libbeat/template/load_test.go +++ b/libbeat/template/load_test.go @@ -21,8 +21,8 @@ import ( "fmt" "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/libbeat/template/processor.go b/libbeat/template/processor.go index 48593ad4317c..30e8bdd8b1c6 100644 --- a/libbeat/template/processor.go +++ b/libbeat/template/processor.go @@ -21,8 +21,8 @@ import ( "errors" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" ) // Processor struct to process fields to template diff --git a/libbeat/template/processor_test.go b/libbeat/template/processor_test.go index dd316957e24e..55859403ec56 100644 --- a/libbeat/template/processor_test.go +++ b/libbeat/template/processor_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" ) func TestProcessor(t *testing.T) { diff --git a/libbeat/template/template.go b/libbeat/template/template.go index 83d393b293a1..b11599eb205c 100644 --- a/libbeat/template/template.go +++ b/libbeat/template/template.go @@ -24,10 +24,10 @@ import ( "github.com/elastic/go-ucfg/yaml" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/mapping" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/mapping" ) var ( diff --git a/libbeat/template/template_test.go b/libbeat/template/template_test.go index 70cd3e14ad7e..7e6a688db5d6 100644 --- a/libbeat/template/template_test.go +++ b/libbeat/template/template_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/version" ) type testTemplate struct { diff --git a/libbeat/tests/compose/project.go b/libbeat/tests/compose/project.go index 602b38b83ae0..ceb783a2f39f 100644 --- a/libbeat/tests/compose/project.go +++ b/libbeat/tests/compose/project.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // CreateOptions are the options when containers are created diff --git a/libbeat/tests/compose/wrapper.go b/libbeat/tests/compose/wrapper.go index 646900edab74..87919c3fd9ce 100644 --- a/libbeat/tests/compose/wrapper.go +++ b/libbeat/tests/compose/wrapper.go @@ -38,7 +38,7 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common/docker" ) const ( diff --git a/libbeat/tests/docker/docker.go b/libbeat/tests/docker/docker.go index afa18317eb9d..b81ffa285ea4 100644 --- a/libbeat/tests/docker/docker.go +++ b/libbeat/tests/docker/docker.go @@ -26,7 +26,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" - "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common/docker" ) // Client for Docker diff --git a/libbeat/tests/system/template/template.go b/libbeat/tests/system/template/template.go index 33d690e6ad61..3005662d195b 100644 --- a/libbeat/tests/system/template/template.go +++ b/libbeat/tests/system/template/template.go @@ -21,10 +21,10 @@ import ( "strings" "testing" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/template" - "github.com/elastic/beats/libbeat/version" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/template" + "github.com/elastic/beats/v7/libbeat/version" ) // MaxDefaultFieldLength is the limit on the number of default_field values diff --git a/magefile.go b/magefile.go index c09718d94d88..6806d57d4041 100644 --- a/magefile.go +++ b/magefile.go @@ -28,10 +28,10 @@ import ( "github.com/pkg/errors" "go.uber.org/multierr" - "github.com/elastic/beats/generator/common/beatgen" + "github.com/elastic/beats/v7/generator/common/beatgen" - devtools "github.com/elastic/beats/dev-tools/mage" - "github.com/elastic/beats/dev-tools/mage/gotool" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + "github.com/elastic/beats/v7/dev-tools/mage/gotool" ) var ( @@ -109,8 +109,8 @@ func AddLicenseHeaders() error { licenser( licenser.License("ASL2"), licenser.Exclude("x-pack"), - licenser.Exclude("generator/beat/{beat}"), - licenser.Exclude("generator/metricbeat/{beat}"), + licenser.Exclude("generator/_templates/beat/{beat}"), + licenser.Exclude("generator/_templates/metricbeat/{beat}"), ), licenser( licenser.License("Elastic"), @@ -133,9 +133,9 @@ func CheckLicenseHeaders() error { licenser.Check(), licenser.License("ASL2"), licenser.Exclude("x-pack"), - licenser.Exclude("generator/beat/{beat}"), - licenser.Exclude("generator/metricbeat/{beat}"), - licenser.Exclude("generator/beat/{beat}"), + licenser.Exclude("generator/_templates/beat/{beat}"), + licenser.Exclude("generator/_templates/metricbeat/{beat}"), + licenser.Exclude("generator/_templates/beat/{beat}"), ), licenser( licenser.Check(), @@ -149,3 +149,8 @@ func CheckLicenseHeaders() error { func DumpVariables() error { return devtools.DumpVariables() } + +// Vendor moves dependencies to the repo using go modules. +func Vendor() error { + return devtools.Vendor() +} diff --git a/metricbeat/Makefile b/metricbeat/Makefile index cc7d31f62da2..fd2c60935e76 100644 --- a/metricbeat/Makefile +++ b/metricbeat/Makefile @@ -74,9 +74,9 @@ test-module: python-env update metricbeat.test .PHONY: assets assets: - go run ${ES_BEATS}/metricbeat/scripts/assets/assets.go ${ES_BEATS}/metricbeat/module + go run ${INSTALL_FLAG} ${ES_BEATS}/metricbeat/scripts/assets/assets.go ${ES_BEATS}/metricbeat/module mkdir -p include/fields - go run ${ES_BEATS}/libbeat/scripts/cmd/global_fields/main.go -es_beats_path ${ES_BEATS} -beat_path ${PWD} | go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license ${LICENSE} -out ./include/fields/fields.go -pkg include -priority asset.LibbeatFieldsPri ${ES_BEATS}/libbeat/fields.yml $(BEAT_NAME) + go run ${INSTALL_FLAG} ${ES_BEATS}/libbeat/scripts/cmd/global_fields/main.go -es_beats_path ${ES_BEATS} -beat_path ${PWD} | go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license ${LICENSE} -out ./include/fields/fields.go -pkg include -priority asset.LibbeatFieldsPri ${ES_BEATS}/libbeat/fields.yml $(BEAT_NAME) .PHONY: integration-tests integration-tests: ## @testing Run golang integration tests. diff --git a/metricbeat/autodiscover/appender/kubernetes/token/config.go b/metricbeat/autodiscover/appender/kubernetes/token/config.go index 7e1271a6e3f1..7363c600b07c 100644 --- a/metricbeat/autodiscover/appender/kubernetes/token/config.go +++ b/metricbeat/autodiscover/appender/kubernetes/token/config.go @@ -18,7 +18,7 @@ package token import ( - "github.com/elastic/beats/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/conditions" ) type config struct { diff --git a/metricbeat/autodiscover/appender/kubernetes/token/token.go b/metricbeat/autodiscover/appender/kubernetes/token/token.go index 5471f874ca9b..9f4f99c45833 100644 --- a/metricbeat/autodiscover/appender/kubernetes/token/token.go +++ b/metricbeat/autodiscover/appender/kubernetes/token/token.go @@ -21,12 +21,12 @@ import ( "fmt" "io/ioutil" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/conditions" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/conditions" + "github.com/elastic/beats/v7/libbeat/logp" ) func init() { diff --git a/metricbeat/autodiscover/appender/kubernetes/token/token_test.go b/metricbeat/autodiscover/appender/kubernetes/token/token_test.go index 4a9f80592e8b..28b0ecb611ea 100644 --- a/metricbeat/autodiscover/appender/kubernetes/token/token_test.go +++ b/metricbeat/autodiscover/appender/kubernetes/token/token_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" ) func TestTokenAppender(t *testing.T) { diff --git a/metricbeat/autodiscover/builder/hints/config.go b/metricbeat/autodiscover/builder/hints/config.go index f3a33b128d04..957ec278d7d0 100644 --- a/metricbeat/autodiscover/builder/hints/config.go +++ b/metricbeat/autodiscover/builder/hints/config.go @@ -17,7 +17,7 @@ package hints -import "github.com/elastic/beats/metricbeat/mb" +import "github.com/elastic/beats/v7/metricbeat/mb" type config struct { Key string `config:"key"` diff --git a/metricbeat/autodiscover/builder/hints/metrics.go b/metricbeat/autodiscover/builder/hints/metrics.go index 247d30468604..3e859b23d118 100644 --- a/metricbeat/autodiscover/builder/hints/metrics.go +++ b/metricbeat/autodiscover/builder/hints/metrics.go @@ -22,13 +22,13 @@ import ( "strings" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/autodiscover/builder" - "github.com/elastic/beats/libbeat/autodiscover/template" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/autodiscover/builder" + "github.com/elastic/beats/v7/libbeat/autodiscover/template" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/autodiscover/builder/hints/metrics_test.go b/metricbeat/autodiscover/builder/hints/metrics_test.go index 1f3d37c86bf6..f3f9d5a5200a 100644 --- a/metricbeat/autodiscover/builder/hints/metrics_test.go +++ b/metricbeat/autodiscover/builder/hints/metrics_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/bus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/bus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func TestGenerateHints(t *testing.T) { diff --git a/metricbeat/autodiscover/include.go b/metricbeat/autodiscover/include.go index 37d6a683ac7a..0843fe6c156f 100644 --- a/metricbeat/autodiscover/include.go +++ b/metricbeat/autodiscover/include.go @@ -19,8 +19,8 @@ package autodiscover import ( // include all metricbeat specific builders - _ "github.com/elastic/beats/metricbeat/autodiscover/builder/hints" + _ "github.com/elastic/beats/v7/metricbeat/autodiscover/builder/hints" // include all metricbeat specific appenders - _ "github.com/elastic/beats/metricbeat/autodiscover/appender/kubernetes/token" + _ "github.com/elastic/beats/v7/metricbeat/autodiscover/appender/kubernetes/token" ) diff --git a/metricbeat/beater/config.go b/metricbeat/beater/config.go index bdf0786ade4d..51ac82aaa2da 100644 --- a/metricbeat/beater/config.go +++ b/metricbeat/beater/config.go @@ -20,8 +20,8 @@ package beater import ( "time" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/common" ) // Config is the root of the Metricbeat configuration hierarchy. diff --git a/metricbeat/beater/doc.go b/metricbeat/beater/doc.go index e63709050029..21d475c77e6a 100644 --- a/metricbeat/beater/doc.go +++ b/metricbeat/beater/doc.go @@ -25,7 +25,7 @@ called a Module. Each Module has one or more MetricSet implementations which do the work of collecting a particular set of metrics from the service. The public interfaces used in implementing Modules and MetricSets are defined in -the github.com/elastic/beats/metricbeat/mb package. +the github.com/elastic/beats/v7/metricbeat/mb package. Event Format diff --git a/metricbeat/beater/metricbeat.go b/metricbeat/beater/metricbeat.go index f7f79f7e42a0..b396ac19c4bf 100644 --- a/metricbeat/beater/metricbeat.go +++ b/metricbeat/beater/metricbeat.go @@ -22,22 +22,22 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/autodiscover" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/reload" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/management" - "github.com/elastic/beats/libbeat/paths" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/module" + "github.com/elastic/beats/v7/libbeat/autodiscover" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/reload" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/management" + "github.com/elastic/beats/v7/libbeat/paths" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/module" // Add autodiscover builders / appenders - _ "github.com/elastic/beats/metricbeat/autodiscover" + _ "github.com/elastic/beats/v7/metricbeat/autodiscover" // Add metricbeat default processors - _ "github.com/elastic/beats/metricbeat/processor/add_kubernetes_metadata" + _ "github.com/elastic/beats/v7/metricbeat/processor/add_kubernetes_metadata" ) // Metricbeat implements the Beater interface for metricbeat. diff --git a/metricbeat/cmd/modules.go b/metricbeat/cmd/modules.go index 608eb47fc7b7..f137a91c37b7 100644 --- a/metricbeat/cmd/modules.go +++ b/metricbeat/cmd/modules.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/cmd" ) // BuildModulesManager adds support for modules management to a beat diff --git a/metricbeat/cmd/root.go b/metricbeat/cmd/root.go index 8fb81dc82627..892d734b8e24 100644 --- a/metricbeat/cmd/root.go +++ b/metricbeat/cmd/root.go @@ -22,17 +22,17 @@ import ( "github.com/spf13/pflag" - "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/metricbeat/beater" - "github.com/elastic/beats/metricbeat/cmd/test" + "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/metricbeat/beater" + "github.com/elastic/beats/v7/metricbeat/cmd/test" // import modules - _ "github.com/elastic/beats/metricbeat/include" - _ "github.com/elastic/beats/metricbeat/include/fields" + _ "github.com/elastic/beats/v7/metricbeat/include" + _ "github.com/elastic/beats/v7/metricbeat/include/fields" // Import processors. - _ "github.com/elastic/beats/libbeat/processors/script" + _ "github.com/elastic/beats/v7/libbeat/processors/script" ) // Name of this beat diff --git a/metricbeat/cmd/test/modules.go b/metricbeat/cmd/test/modules.go index f2cafc5b43cd..93950973a5dc 100644 --- a/metricbeat/cmd/test/modules.go +++ b/metricbeat/cmd/test/modules.go @@ -23,10 +23,10 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/libbeat/testing" - "github.com/elastic/beats/metricbeat/beater" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/libbeat/testing" + "github.com/elastic/beats/v7/metricbeat/beater" ) func GenTestModulesCmd(name, beatVersion string, create beat.Creator) *cobra.Command { diff --git a/metricbeat/helper/config.go b/metricbeat/helper/config.go index 1c4c8fd6ddcd..8581c45a0155 100644 --- a/metricbeat/helper/config.go +++ b/metricbeat/helper/config.go @@ -20,7 +20,7 @@ package helper import ( "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) // Config for an HTTP helper diff --git a/metricbeat/helper/dialer/dialer.go b/metricbeat/helper/dialer/dialer.go index d2aaf0b6ed9b..05c723fff4ff 100644 --- a/metricbeat/helper/dialer/dialer.go +++ b/metricbeat/helper/dialer/dialer.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // Builder is a dialer builder. diff --git a/metricbeat/helper/dialer/dialer_posix.go b/metricbeat/helper/dialer/dialer_posix.go index 4b6f61d1bfb0..2a320ce2525b 100644 --- a/metricbeat/helper/dialer/dialer_posix.go +++ b/metricbeat/helper/dialer/dialer_posix.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // UnixDialerBuilder creates a builder to dial over unix domain socket. diff --git a/metricbeat/helper/dialer/dialer_windows.go b/metricbeat/helper/dialer/dialer_windows.go index 421f91a6017d..873a853e593e 100644 --- a/metricbeat/helper/dialer/dialer_windows.go +++ b/metricbeat/helper/dialer/dialer_windows.go @@ -28,8 +28,8 @@ import ( winio "github.com/Microsoft/go-winio" - "github.com/elastic/beats/libbeat/api/npipe" - "github.com/elastic/beats/libbeat/outputs/transport" + "github.com/elastic/beats/v7/libbeat/api/npipe" + "github.com/elastic/beats/v7/libbeat/outputs/transport" ) // UnixDialerBuilder creates a builder to dial over a unix domain socket. diff --git a/metricbeat/helper/elastic/elastic.go b/metricbeat/helper/elastic/elastic.go index 46cb9d48de58..b4b9f6195ab7 100644 --- a/metricbeat/helper/elastic/elastic.go +++ b/metricbeat/helper/elastic/elastic.go @@ -21,10 +21,10 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Product supported by X-Pack Monitoring diff --git a/metricbeat/helper/elastic/elastic_test.go b/metricbeat/helper/elastic/elastic_test.go index c0de5ea8809b..14f6a119eb79 100644 --- a/metricbeat/helper/elastic/elastic_test.go +++ b/metricbeat/helper/elastic/elastic_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) func TestMakeXPackMonitoringIndexName(t *testing.T) { diff --git a/metricbeat/helper/http.go b/metricbeat/helper/http.go index 1dde8cd3a622..5b969fab404e 100644 --- a/metricbeat/helper/http.go +++ b/metricbeat/helper/http.go @@ -28,10 +28,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/outputs/transport" - "github.com/elastic/beats/metricbeat/helper/dialer" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/outputs/transport" + "github.com/elastic/beats/v7/metricbeat/helper/dialer" + "github.com/elastic/beats/v7/metricbeat/mb" ) // HTTP is a custom HTTP Client that handle the complexity of connection and retrieving information diff --git a/metricbeat/helper/http_test.go b/metricbeat/helper/http_test.go index bb6781eb9163..efbecffd93fe 100644 --- a/metricbeat/helper/http_test.go +++ b/metricbeat/helper/http_test.go @@ -31,8 +31,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/metricbeat/helper/dialer" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/dialer" + "github.com/elastic/beats/v7/metricbeat/mb" ) func TestGetAuthHeaderFromToken(t *testing.T) { diff --git a/metricbeat/helper/http_windows_test.go b/metricbeat/helper/http_windows_test.go index 3d01f9c9a3b5..388eace429bb 100644 --- a/metricbeat/helper/http_windows_test.go +++ b/metricbeat/helper/http_windows_test.go @@ -29,9 +29,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/api/npipe" - "github.com/elastic/beats/metricbeat/helper/dialer" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/api/npipe" + "github.com/elastic/beats/v7/metricbeat/helper/dialer" + "github.com/elastic/beats/v7/metricbeat/mb" ) func TestOverNamedpipe(t *testing.T) { diff --git a/metricbeat/helper/privileges_windows.go b/metricbeat/helper/privileges_windows.go index 9e182a8cde3f..625daf59748a 100644 --- a/metricbeat/helper/privileges_windows.go +++ b/metricbeat/helper/privileges_windows.go @@ -25,7 +25,7 @@ import ( "github.com/elastic/gosigar/sys/windows" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) var once sync.Once diff --git a/metricbeat/helper/prometheus/hash.go b/metricbeat/helper/prometheus/hash.go index 6ed7a8ed2405..2efe5f195920 100644 --- a/metricbeat/helper/prometheus/hash.go +++ b/metricbeat/helper/prometheus/hash.go @@ -23,9 +23,9 @@ import ( "strconv" "sync" - "github.com/cespare/xxhash" + "github.com/cespare/xxhash/v2" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const sep = '\xff' diff --git a/metricbeat/helper/prometheus/hash_benchmark_test.go b/metricbeat/helper/prometheus/hash_benchmark_test.go index cd41d2af976c..edecb5cb54b7 100644 --- a/metricbeat/helper/prometheus/hash_benchmark_test.go +++ b/metricbeat/helper/prometheus/hash_benchmark_test.go @@ -20,7 +20,7 @@ package prometheus import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var testLabels = common.MapStr{ diff --git a/metricbeat/helper/prometheus/metric.go b/metricbeat/helper/prometheus/metric.go index 57cd395724c7..ee34c1137468 100644 --- a/metricbeat/helper/prometheus/metric.go +++ b/metricbeat/helper/prometheus/metric.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" dto "github.com/prometheus/client_model/go" ) diff --git a/metricbeat/helper/prometheus/module.go b/metricbeat/helper/prometheus/module.go index da1ea895f257..cc6b7d2a068c 100644 --- a/metricbeat/helper/prometheus/module.go +++ b/metricbeat/helper/prometheus/module.go @@ -18,8 +18,8 @@ package prometheus import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/helper/prometheus/prometheus.go b/metricbeat/helper/prometheus/prometheus.go index 6709e6c93eff..6da2b91c4f34 100644 --- a/metricbeat/helper/prometheus/prometheus.go +++ b/metricbeat/helper/prometheus/prometheus.go @@ -27,10 +27,10 @@ import ( dto "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Prometheus helper retrieves prometheus formatted metrics diff --git a/metricbeat/helper/prometheus/prometheus_test.go b/metricbeat/helper/prometheus/prometheus_test.go index 20715b67750d..b1557115d83e 100644 --- a/metricbeat/helper/prometheus/prometheus_test.go +++ b/metricbeat/helper/prometheus/prometheus_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) const ( diff --git a/metricbeat/helper/prometheus/ptest/ptest.go b/metricbeat/helper/prometheus/ptest/ptest.go index ab7940cc2210..c59c62c40505 100644 --- a/metricbeat/helper/prometheus/ptest/ptest.go +++ b/metricbeat/helper/prometheus/ptest/ptest.go @@ -30,10 +30,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/mb/testing/flags" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/mb/testing/flags" ) // TestCases holds the list of test cases to test a metricset diff --git a/metricbeat/helper/server/http/config.go b/metricbeat/helper/server/http/config.go index 5f70317fcc79..726e1ca4dbbf 100644 --- a/metricbeat/helper/server/http/config.go +++ b/metricbeat/helper/server/http/config.go @@ -17,7 +17,7 @@ package http -import "github.com/elastic/beats/libbeat/common/transport/tlscommon" +import "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" type HttpConfig struct { Host string `config:"host"` diff --git a/metricbeat/helper/server/http/http.go b/metricbeat/helper/server/http/http.go index 5ecfb32c70a4..b67209c53440 100644 --- a/metricbeat/helper/server/http/http.go +++ b/metricbeat/helper/server/http/http.go @@ -24,11 +24,11 @@ import ( "net/http" "strconv" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper/server" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/mb" ) type HttpServer struct { diff --git a/metricbeat/helper/server/http/http_test.go b/metricbeat/helper/server/http/http_test.go index 501bfb0d98d9..7b7a0a2c7f3c 100644 --- a/metricbeat/helper/server/http/http_test.go +++ b/metricbeat/helper/server/http/http_test.go @@ -34,7 +34,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/helper/server" ) func TestHTTPServers(t *testing.T) { diff --git a/metricbeat/helper/server/server.go b/metricbeat/helper/server/server.go index 70e903f9db83..3f3fb52c4911 100644 --- a/metricbeat/helper/server/server.go +++ b/metricbeat/helper/server/server.go @@ -17,7 +17,7 @@ package server -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" type Meta common.MapStr diff --git a/metricbeat/helper/server/tcp/tcp.go b/metricbeat/helper/server/tcp/tcp.go index e4455758368c..a0afc51fb09f 100644 --- a/metricbeat/helper/server/tcp/tcp.go +++ b/metricbeat/helper/server/tcp/tcp.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper/server" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/mb" ) type TcpServer struct { diff --git a/metricbeat/helper/server/tcp/tcp_test.go b/metricbeat/helper/server/tcp/tcp_test.go index 27ad81a060fc..637dba54159e 100644 --- a/metricbeat/helper/server/tcp/tcp_test.go +++ b/metricbeat/helper/server/tcp/tcp_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper/server" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper/server" ) func GetTestTcpServer(host string, port int) (server.Server, error) { diff --git a/metricbeat/helper/server/udp/udp.go b/metricbeat/helper/server/udp/udp.go index 3d53fdde9aa2..e19f86975196 100644 --- a/metricbeat/helper/server/udp/udp.go +++ b/metricbeat/helper/server/udp/udp.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper/server" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/mb" ) type UdpServer struct { diff --git a/metricbeat/helper/server/udp/udp_test.go b/metricbeat/helper/server/udp/udp_test.go index 6d288e8bc88b..2ead3294237f 100644 --- a/metricbeat/helper/server/udp/udp_test.go +++ b/metricbeat/helper/server/udp/udp_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper/server" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper/server" ) func GetTestUdpServer(host string, port int) (server.Server, error) { diff --git a/metricbeat/helper/socket/ptable_linux.go b/metricbeat/helper/socket/ptable_linux.go index 091efe60bfea..f08e9fe61440 100644 --- a/metricbeat/helper/socket/ptable_linux.go +++ b/metricbeat/helper/socket/ptable_linux.go @@ -20,7 +20,7 @@ package socket import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var requiredCapabilities = []string{"sys_ptrace", "dac_read_search"} diff --git a/metricbeat/helper/windows/pdh/doc.go b/metricbeat/helper/windows/pdh/doc.go index fc6ec0cd1326..736bde4bec9a 100644 --- a/metricbeat/helper/windows/pdh/doc.go +++ b/metricbeat/helper/windows/pdh/doc.go @@ -21,4 +21,4 @@ package pdh //go:generate go run ../run.go -cmd "go tool cgo -godefs defs_pdh_windows.go" -goarch amd64 -output defs_pdh_windows_amd64.go //go:generate go run ../run.go -cmd "go tool cgo -godefs defs_pdh_windows.go" -goarch 386 -output defs_pdh_windows_386.go //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zpdh_windows.go pdh_windows.go -//go:generate gofmt -w defs_pdh_windows_amd64.go defs_pdh_windows_386.go zpdh_windows.go +//go:generate goimports -w defs_pdh_windows_amd64.go defs_pdh_windows_386.go zpdh_windows.go diff --git a/metricbeat/include/fields/fields.go b/metricbeat/include/fields/fields.go index 75e43d7e3cfd..bbb4f4bd0f1d 100644 --- a/metricbeat/include/fields/fields.go +++ b/metricbeat/include/fields/fields.go @@ -20,7 +20,7 @@ package include import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/include/list_common.go b/metricbeat/include/list_common.go index eb96b2f25c11..a44f3bdb7c99 100644 --- a/metricbeat/include/list_common.go +++ b/metricbeat/include/list_common.go @@ -21,152 +21,152 @@ package include import ( // Import packages that need to register themselves. - _ "github.com/elastic/beats/metricbeat/module/aerospike" - _ "github.com/elastic/beats/metricbeat/module/aerospike/namespace" - _ "github.com/elastic/beats/metricbeat/module/apache" - _ "github.com/elastic/beats/metricbeat/module/apache/status" - _ "github.com/elastic/beats/metricbeat/module/beat" - _ "github.com/elastic/beats/metricbeat/module/beat/state" - _ "github.com/elastic/beats/metricbeat/module/beat/stats" - _ "github.com/elastic/beats/metricbeat/module/ceph" - _ "github.com/elastic/beats/metricbeat/module/ceph/cluster_disk" - _ "github.com/elastic/beats/metricbeat/module/ceph/cluster_health" - _ "github.com/elastic/beats/metricbeat/module/ceph/cluster_status" - _ "github.com/elastic/beats/metricbeat/module/ceph/mgr_cluster_disk" - _ "github.com/elastic/beats/metricbeat/module/ceph/mgr_cluster_health" - _ "github.com/elastic/beats/metricbeat/module/ceph/mgr_osd_perf" - _ "github.com/elastic/beats/metricbeat/module/ceph/mgr_osd_pool_stats" - _ "github.com/elastic/beats/metricbeat/module/ceph/mgr_osd_tree" - _ "github.com/elastic/beats/metricbeat/module/ceph/mgr_pool_disk" - _ "github.com/elastic/beats/metricbeat/module/ceph/monitor_health" - _ "github.com/elastic/beats/metricbeat/module/ceph/osd_df" - _ "github.com/elastic/beats/metricbeat/module/ceph/osd_tree" - _ "github.com/elastic/beats/metricbeat/module/ceph/pool_disk" - _ "github.com/elastic/beats/metricbeat/module/consul" - _ "github.com/elastic/beats/metricbeat/module/consul/agent" - _ "github.com/elastic/beats/metricbeat/module/couchbase" - _ "github.com/elastic/beats/metricbeat/module/couchbase/bucket" - _ "github.com/elastic/beats/metricbeat/module/couchbase/cluster" - _ "github.com/elastic/beats/metricbeat/module/couchbase/node" - _ "github.com/elastic/beats/metricbeat/module/couchdb" - _ "github.com/elastic/beats/metricbeat/module/couchdb/server" - _ "github.com/elastic/beats/metricbeat/module/dropwizard" - _ "github.com/elastic/beats/metricbeat/module/dropwizard/collector" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/ccr" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/cluster_stats" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/enrich" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/index" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/index_recovery" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/index_summary" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/ml_job" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/node" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/node_stats" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/pending_tasks" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/shard" - _ "github.com/elastic/beats/metricbeat/module/envoyproxy" - _ "github.com/elastic/beats/metricbeat/module/envoyproxy/server" - _ "github.com/elastic/beats/metricbeat/module/etcd" - _ "github.com/elastic/beats/metricbeat/module/etcd/leader" - _ "github.com/elastic/beats/metricbeat/module/etcd/metrics" - _ "github.com/elastic/beats/metricbeat/module/etcd/self" - _ "github.com/elastic/beats/metricbeat/module/etcd/store" - _ "github.com/elastic/beats/metricbeat/module/golang" - _ "github.com/elastic/beats/metricbeat/module/golang/expvar" - _ "github.com/elastic/beats/metricbeat/module/golang/heap" - _ "github.com/elastic/beats/metricbeat/module/graphite" - _ "github.com/elastic/beats/metricbeat/module/graphite/server" - _ "github.com/elastic/beats/metricbeat/module/haproxy" - _ "github.com/elastic/beats/metricbeat/module/haproxy/info" - _ "github.com/elastic/beats/metricbeat/module/haproxy/stat" - _ "github.com/elastic/beats/metricbeat/module/http" - _ "github.com/elastic/beats/metricbeat/module/http/json" - _ "github.com/elastic/beats/metricbeat/module/http/server" - _ "github.com/elastic/beats/metricbeat/module/iis" - _ "github.com/elastic/beats/metricbeat/module/iis/application_pool" - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" - _ "github.com/elastic/beats/metricbeat/module/kafka" - _ "github.com/elastic/beats/metricbeat/module/kafka/consumergroup" - _ "github.com/elastic/beats/metricbeat/module/kafka/partition" - _ "github.com/elastic/beats/metricbeat/module/kibana" - _ "github.com/elastic/beats/metricbeat/module/kibana/stats" - _ "github.com/elastic/beats/metricbeat/module/kibana/status" - _ "github.com/elastic/beats/metricbeat/module/kvm" - _ "github.com/elastic/beats/metricbeat/module/kvm/dommemstat" - _ "github.com/elastic/beats/metricbeat/module/logstash" - _ "github.com/elastic/beats/metricbeat/module/logstash/node" - _ "github.com/elastic/beats/metricbeat/module/logstash/node_stats" - _ "github.com/elastic/beats/metricbeat/module/memcached" - _ "github.com/elastic/beats/metricbeat/module/memcached/stats" - _ "github.com/elastic/beats/metricbeat/module/mongodb" - _ "github.com/elastic/beats/metricbeat/module/mongodb/collstats" - _ "github.com/elastic/beats/metricbeat/module/mongodb/dbstats" - _ "github.com/elastic/beats/metricbeat/module/mongodb/metrics" - _ "github.com/elastic/beats/metricbeat/module/mongodb/replstatus" - _ "github.com/elastic/beats/metricbeat/module/mongodb/status" - _ "github.com/elastic/beats/metricbeat/module/munin" - _ "github.com/elastic/beats/metricbeat/module/munin/node" - _ "github.com/elastic/beats/metricbeat/module/mysql" - _ "github.com/elastic/beats/metricbeat/module/mysql/galera_status" - _ "github.com/elastic/beats/metricbeat/module/mysql/status" - _ "github.com/elastic/beats/metricbeat/module/nats" - _ "github.com/elastic/beats/metricbeat/module/nats/connections" - _ "github.com/elastic/beats/metricbeat/module/nats/routes" - _ "github.com/elastic/beats/metricbeat/module/nats/stats" - _ "github.com/elastic/beats/metricbeat/module/nats/subscriptions" - _ "github.com/elastic/beats/metricbeat/module/nginx" - _ "github.com/elastic/beats/metricbeat/module/nginx/stubstatus" - _ "github.com/elastic/beats/metricbeat/module/php_fpm" - _ "github.com/elastic/beats/metricbeat/module/php_fpm/pool" - _ "github.com/elastic/beats/metricbeat/module/php_fpm/process" - _ "github.com/elastic/beats/metricbeat/module/postgresql" - _ "github.com/elastic/beats/metricbeat/module/postgresql/activity" - _ "github.com/elastic/beats/metricbeat/module/postgresql/bgwriter" - _ "github.com/elastic/beats/metricbeat/module/postgresql/database" - _ "github.com/elastic/beats/metricbeat/module/postgresql/statement" - _ "github.com/elastic/beats/metricbeat/module/prometheus" - _ "github.com/elastic/beats/metricbeat/module/prometheus/collector" - _ "github.com/elastic/beats/metricbeat/module/rabbitmq" - _ "github.com/elastic/beats/metricbeat/module/rabbitmq/connection" - _ "github.com/elastic/beats/metricbeat/module/rabbitmq/exchange" - _ "github.com/elastic/beats/metricbeat/module/rabbitmq/node" - _ "github.com/elastic/beats/metricbeat/module/rabbitmq/queue" - _ "github.com/elastic/beats/metricbeat/module/redis" - _ "github.com/elastic/beats/metricbeat/module/redis/info" - _ "github.com/elastic/beats/metricbeat/module/redis/key" - _ "github.com/elastic/beats/metricbeat/module/redis/keyspace" - _ "github.com/elastic/beats/metricbeat/module/system" - _ "github.com/elastic/beats/metricbeat/module/system/core" - _ "github.com/elastic/beats/metricbeat/module/system/cpu" - _ "github.com/elastic/beats/metricbeat/module/system/diskio" - _ "github.com/elastic/beats/metricbeat/module/system/entropy" - _ "github.com/elastic/beats/metricbeat/module/system/filesystem" - _ "github.com/elastic/beats/metricbeat/module/system/fsstat" - _ "github.com/elastic/beats/metricbeat/module/system/load" - _ "github.com/elastic/beats/metricbeat/module/system/memory" - _ "github.com/elastic/beats/metricbeat/module/system/network" - _ "github.com/elastic/beats/metricbeat/module/system/network_summary" - _ "github.com/elastic/beats/metricbeat/module/system/process" - _ "github.com/elastic/beats/metricbeat/module/system/process_summary" - _ "github.com/elastic/beats/metricbeat/module/system/raid" - _ "github.com/elastic/beats/metricbeat/module/system/service" - _ "github.com/elastic/beats/metricbeat/module/system/socket" - _ "github.com/elastic/beats/metricbeat/module/system/socket_summary" - _ "github.com/elastic/beats/metricbeat/module/system/uptime" - _ "github.com/elastic/beats/metricbeat/module/traefik" - _ "github.com/elastic/beats/metricbeat/module/traefik/health" - _ "github.com/elastic/beats/metricbeat/module/uwsgi" - _ "github.com/elastic/beats/metricbeat/module/uwsgi/status" - _ "github.com/elastic/beats/metricbeat/module/vsphere" - _ "github.com/elastic/beats/metricbeat/module/vsphere/datastore" - _ "github.com/elastic/beats/metricbeat/module/vsphere/host" - _ "github.com/elastic/beats/metricbeat/module/vsphere/virtualmachine" - _ "github.com/elastic/beats/metricbeat/module/windows" - _ "github.com/elastic/beats/metricbeat/module/windows/perfmon" - _ "github.com/elastic/beats/metricbeat/module/windows/service" - _ "github.com/elastic/beats/metricbeat/module/zookeeper" - _ "github.com/elastic/beats/metricbeat/module/zookeeper/connection" - _ "github.com/elastic/beats/metricbeat/module/zookeeper/mntr" - _ "github.com/elastic/beats/metricbeat/module/zookeeper/server" + _ "github.com/elastic/beats/v7/metricbeat/module/aerospike" + _ "github.com/elastic/beats/v7/metricbeat/module/aerospike/namespace" + _ "github.com/elastic/beats/v7/metricbeat/module/apache" + _ "github.com/elastic/beats/v7/metricbeat/module/apache/status" + _ "github.com/elastic/beats/v7/metricbeat/module/beat" + _ "github.com/elastic/beats/v7/metricbeat/module/beat/state" + _ "github.com/elastic/beats/v7/metricbeat/module/beat/stats" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/cluster_disk" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/cluster_health" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/cluster_status" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr_cluster_disk" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr_cluster_health" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr_osd_perf" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr_osd_pool_stats" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr_osd_tree" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr_pool_disk" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/monitor_health" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/osd_df" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/osd_tree" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph/pool_disk" + _ "github.com/elastic/beats/v7/metricbeat/module/consul" + _ "github.com/elastic/beats/v7/metricbeat/module/consul/agent" + _ "github.com/elastic/beats/v7/metricbeat/module/couchbase" + _ "github.com/elastic/beats/v7/metricbeat/module/couchbase/bucket" + _ "github.com/elastic/beats/v7/metricbeat/module/couchbase/cluster" + _ "github.com/elastic/beats/v7/metricbeat/module/couchbase/node" + _ "github.com/elastic/beats/v7/metricbeat/module/couchdb" + _ "github.com/elastic/beats/v7/metricbeat/module/couchdb/server" + _ "github.com/elastic/beats/v7/metricbeat/module/dropwizard" + _ "github.com/elastic/beats/v7/metricbeat/module/dropwizard/collector" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/ccr" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/cluster_stats" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/enrich" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/index" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/index_recovery" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/index_summary" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/ml_job" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/node" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/node_stats" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/pending_tasks" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/shard" + _ "github.com/elastic/beats/v7/metricbeat/module/envoyproxy" + _ "github.com/elastic/beats/v7/metricbeat/module/envoyproxy/server" + _ "github.com/elastic/beats/v7/metricbeat/module/etcd" + _ "github.com/elastic/beats/v7/metricbeat/module/etcd/leader" + _ "github.com/elastic/beats/v7/metricbeat/module/etcd/metrics" + _ "github.com/elastic/beats/v7/metricbeat/module/etcd/self" + _ "github.com/elastic/beats/v7/metricbeat/module/etcd/store" + _ "github.com/elastic/beats/v7/metricbeat/module/golang" + _ "github.com/elastic/beats/v7/metricbeat/module/golang/expvar" + _ "github.com/elastic/beats/v7/metricbeat/module/golang/heap" + _ "github.com/elastic/beats/v7/metricbeat/module/graphite" + _ "github.com/elastic/beats/v7/metricbeat/module/graphite/server" + _ "github.com/elastic/beats/v7/metricbeat/module/haproxy" + _ "github.com/elastic/beats/v7/metricbeat/module/haproxy/info" + _ "github.com/elastic/beats/v7/metricbeat/module/haproxy/stat" + _ "github.com/elastic/beats/v7/metricbeat/module/http" + _ "github.com/elastic/beats/v7/metricbeat/module/http/json" + _ "github.com/elastic/beats/v7/metricbeat/module/http/server" + _ "github.com/elastic/beats/v7/metricbeat/module/iis" + _ "github.com/elastic/beats/v7/metricbeat/module/iis/application_pool" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/kafka" + _ "github.com/elastic/beats/v7/metricbeat/module/kafka/consumergroup" + _ "github.com/elastic/beats/v7/metricbeat/module/kafka/partition" + _ "github.com/elastic/beats/v7/metricbeat/module/kibana" + _ "github.com/elastic/beats/v7/metricbeat/module/kibana/stats" + _ "github.com/elastic/beats/v7/metricbeat/module/kibana/status" + _ "github.com/elastic/beats/v7/metricbeat/module/kvm" + _ "github.com/elastic/beats/v7/metricbeat/module/kvm/dommemstat" + _ "github.com/elastic/beats/v7/metricbeat/module/logstash" + _ "github.com/elastic/beats/v7/metricbeat/module/logstash/node" + _ "github.com/elastic/beats/v7/metricbeat/module/logstash/node_stats" + _ "github.com/elastic/beats/v7/metricbeat/module/memcached" + _ "github.com/elastic/beats/v7/metricbeat/module/memcached/stats" + _ "github.com/elastic/beats/v7/metricbeat/module/mongodb" + _ "github.com/elastic/beats/v7/metricbeat/module/mongodb/collstats" + _ "github.com/elastic/beats/v7/metricbeat/module/mongodb/dbstats" + _ "github.com/elastic/beats/v7/metricbeat/module/mongodb/metrics" + _ "github.com/elastic/beats/v7/metricbeat/module/mongodb/replstatus" + _ "github.com/elastic/beats/v7/metricbeat/module/mongodb/status" + _ "github.com/elastic/beats/v7/metricbeat/module/munin" + _ "github.com/elastic/beats/v7/metricbeat/module/munin/node" + _ "github.com/elastic/beats/v7/metricbeat/module/mysql" + _ "github.com/elastic/beats/v7/metricbeat/module/mysql/galera_status" + _ "github.com/elastic/beats/v7/metricbeat/module/mysql/status" + _ "github.com/elastic/beats/v7/metricbeat/module/nats" + _ "github.com/elastic/beats/v7/metricbeat/module/nats/connections" + _ "github.com/elastic/beats/v7/metricbeat/module/nats/routes" + _ "github.com/elastic/beats/v7/metricbeat/module/nats/stats" + _ "github.com/elastic/beats/v7/metricbeat/module/nats/subscriptions" + _ "github.com/elastic/beats/v7/metricbeat/module/nginx" + _ "github.com/elastic/beats/v7/metricbeat/module/nginx/stubstatus" + _ "github.com/elastic/beats/v7/metricbeat/module/php_fpm" + _ "github.com/elastic/beats/v7/metricbeat/module/php_fpm/pool" + _ "github.com/elastic/beats/v7/metricbeat/module/php_fpm/process" + _ "github.com/elastic/beats/v7/metricbeat/module/postgresql" + _ "github.com/elastic/beats/v7/metricbeat/module/postgresql/activity" + _ "github.com/elastic/beats/v7/metricbeat/module/postgresql/bgwriter" + _ "github.com/elastic/beats/v7/metricbeat/module/postgresql/database" + _ "github.com/elastic/beats/v7/metricbeat/module/postgresql/statement" + _ "github.com/elastic/beats/v7/metricbeat/module/prometheus" + _ "github.com/elastic/beats/v7/metricbeat/module/prometheus/collector" + _ "github.com/elastic/beats/v7/metricbeat/module/rabbitmq" + _ "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/connection" + _ "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/exchange" + _ "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/node" + _ "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/queue" + _ "github.com/elastic/beats/v7/metricbeat/module/redis" + _ "github.com/elastic/beats/v7/metricbeat/module/redis/info" + _ "github.com/elastic/beats/v7/metricbeat/module/redis/key" + _ "github.com/elastic/beats/v7/metricbeat/module/redis/keyspace" + _ "github.com/elastic/beats/v7/metricbeat/module/system" + _ "github.com/elastic/beats/v7/metricbeat/module/system/core" + _ "github.com/elastic/beats/v7/metricbeat/module/system/cpu" + _ "github.com/elastic/beats/v7/metricbeat/module/system/diskio" + _ "github.com/elastic/beats/v7/metricbeat/module/system/entropy" + _ "github.com/elastic/beats/v7/metricbeat/module/system/filesystem" + _ "github.com/elastic/beats/v7/metricbeat/module/system/fsstat" + _ "github.com/elastic/beats/v7/metricbeat/module/system/load" + _ "github.com/elastic/beats/v7/metricbeat/module/system/memory" + _ "github.com/elastic/beats/v7/metricbeat/module/system/network" + _ "github.com/elastic/beats/v7/metricbeat/module/system/network_summary" + _ "github.com/elastic/beats/v7/metricbeat/module/system/process" + _ "github.com/elastic/beats/v7/metricbeat/module/system/process_summary" + _ "github.com/elastic/beats/v7/metricbeat/module/system/raid" + _ "github.com/elastic/beats/v7/metricbeat/module/system/service" + _ "github.com/elastic/beats/v7/metricbeat/module/system/socket" + _ "github.com/elastic/beats/v7/metricbeat/module/system/socket_summary" + _ "github.com/elastic/beats/v7/metricbeat/module/system/uptime" + _ "github.com/elastic/beats/v7/metricbeat/module/traefik" + _ "github.com/elastic/beats/v7/metricbeat/module/traefik/health" + _ "github.com/elastic/beats/v7/metricbeat/module/uwsgi" + _ "github.com/elastic/beats/v7/metricbeat/module/uwsgi/status" + _ "github.com/elastic/beats/v7/metricbeat/module/vsphere" + _ "github.com/elastic/beats/v7/metricbeat/module/vsphere/datastore" + _ "github.com/elastic/beats/v7/metricbeat/module/vsphere/host" + _ "github.com/elastic/beats/v7/metricbeat/module/vsphere/virtualmachine" + _ "github.com/elastic/beats/v7/metricbeat/module/windows" + _ "github.com/elastic/beats/v7/metricbeat/module/windows/perfmon" + _ "github.com/elastic/beats/v7/metricbeat/module/windows/service" + _ "github.com/elastic/beats/v7/metricbeat/module/zookeeper" + _ "github.com/elastic/beats/v7/metricbeat/module/zookeeper/connection" + _ "github.com/elastic/beats/v7/metricbeat/module/zookeeper/mntr" + _ "github.com/elastic/beats/v7/metricbeat/module/zookeeper/server" ) diff --git a/metricbeat/include/list_docker.go b/metricbeat/include/list_docker.go index f0015d31b3b6..18a34924bd84 100644 --- a/metricbeat/include/list_docker.go +++ b/metricbeat/include/list_docker.go @@ -23,35 +23,35 @@ package include import ( // Import packages that need to register themselves. - _ "github.com/elastic/beats/metricbeat/module/docker/container" - _ "github.com/elastic/beats/metricbeat/module/docker/cpu" - _ "github.com/elastic/beats/metricbeat/module/docker/diskio" - _ "github.com/elastic/beats/metricbeat/module/docker/event" - _ "github.com/elastic/beats/metricbeat/module/docker/healthcheck" - _ "github.com/elastic/beats/metricbeat/module/docker/image" - _ "github.com/elastic/beats/metricbeat/module/docker/info" - _ "github.com/elastic/beats/metricbeat/module/docker/memory" - _ "github.com/elastic/beats/metricbeat/module/docker/network" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/apiserver" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/container" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/controllermanager" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/event" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/node" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/pod" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/proxy" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/scheduler" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_container" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_cronjob" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_deployment" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_node" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_persistentvolume" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_persistentvolumeclaim" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_pod" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_replicaset" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_resourcequota" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_service" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_statefulset" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/state_storageclass" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/system" - _ "github.com/elastic/beats/metricbeat/module/kubernetes/volume" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/container" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/cpu" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/diskio" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/event" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/healthcheck" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/image" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/info" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/memory" + _ "github.com/elastic/beats/v7/metricbeat/module/docker/network" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/apiserver" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/container" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/controllermanager" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/event" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/node" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/pod" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/proxy" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/scheduler" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_container" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_cronjob" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_deployment" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_node" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_persistentvolume" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_persistentvolumeclaim" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_pod" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_replicaset" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_resourcequota" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_service" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_statefulset" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/state_storageclass" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/system" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes/volume" ) diff --git a/metricbeat/magefile.go b/metricbeat/magefile.go index 1b84d3cc3dc4..2f955efb7253 100644 --- a/metricbeat/magefile.go +++ b/metricbeat/magefile.go @@ -28,27 +28,27 @@ import ( "github.com/magefile/mage/mg" - devtools "github.com/elastic/beats/dev-tools/mage" - metricbeat "github.com/elastic/beats/metricbeat/scripts/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + metricbeat "github.com/elastic/beats/v7/metricbeat/scripts/mage" // mage:import - build "github.com/elastic/beats/dev-tools/mage/target/build" + build "github.com/elastic/beats/v7/dev-tools/mage/target/build" // mage:import - "github.com/elastic/beats/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/dashboards" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/dashboards" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/docs" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/docs" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/pkg" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/pkg" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/test" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/test" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/unittest" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/unittest" // mage:import - update "github.com/elastic/beats/dev-tools/mage/target/update" + update "github.com/elastic/beats/v7/dev-tools/mage/target/update" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/compose" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/compose" ) func init() { @@ -114,7 +114,7 @@ func configYML() error { func MockedTests(ctx context.Context) error { params := devtools.DefaultGoTestUnitArgs() - params.ExtraFlags = []string{"github.com/elastic/beats/metricbeat/mb/testing/data/."} + params.ExtraFlags = []string{"github.com/elastic/beats/v7/metricbeat/mb/testing/data/."} if module := os.Getenv("MODULE"); module != "" { params.ExtraFlags = append(params.ExtraFlags, "-module="+module) diff --git a/metricbeat/main.go b/metricbeat/main.go index bba266fd14b9..749ec8001bdd 100644 --- a/metricbeat/main.go +++ b/metricbeat/main.go @@ -27,7 +27,7 @@ package main import ( "os" - "github.com/elastic/beats/metricbeat/cmd" + "github.com/elastic/beats/v7/metricbeat/cmd" ) func main() { diff --git a/metricbeat/main_test.go b/metricbeat/main_test.go index 5f8d0d1a6eac..1c0033a2b2d5 100644 --- a/metricbeat/main_test.go +++ b/metricbeat/main_test.go @@ -23,8 +23,8 @@ import ( "flag" "testing" - "github.com/elastic/beats/libbeat/tests/system/template" - "github.com/elastic/beats/metricbeat/cmd" + "github.com/elastic/beats/v7/libbeat/tests/system/template" + "github.com/elastic/beats/v7/metricbeat/cmd" ) var systemTest *bool diff --git a/metricbeat/mb/builders.go b/metricbeat/mb/builders.go index 04b32f5638aa..48683e05e8ab 100644 --- a/metricbeat/mb/builders.go +++ b/metricbeat/mb/builders.go @@ -25,9 +25,9 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var ( diff --git a/metricbeat/mb/event.go b/metricbeat/mb/event.go index f502299ce8d2..f92615462fa1 100644 --- a/metricbeat/mb/event.go +++ b/metricbeat/mb/event.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) // EventModifier is a function that can modifies an Event. This is typically diff --git a/metricbeat/mb/event_test.go b/metricbeat/mb/event_test.go index 1040102de8c2..3de07034fca6 100644 --- a/metricbeat/mb/event_test.go +++ b/metricbeat/mb/event_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestEventConversionToBeatEvent(t *testing.T) { diff --git a/metricbeat/mb/example_metricset_test.go b/metricbeat/mb/example_metricset_test.go index 35267d3c7d63..af7a2dfcb6a4 100644 --- a/metricbeat/mb/example_metricset_test.go +++ b/metricbeat/mb/example_metricset_test.go @@ -20,9 +20,9 @@ package mb_test import ( "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) var hostParser = parse.URLHostParserBuilder{ diff --git a/metricbeat/mb/example_module_test.go b/metricbeat/mb/example_module_test.go index 5c3ca2ff0f59..b4520f719714 100644 --- a/metricbeat/mb/example_module_test.go +++ b/metricbeat/mb/example_module_test.go @@ -18,7 +18,7 @@ package mb_test import ( - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/mb/lightmetricset.go b/metricbeat/mb/lightmetricset.go index 11e49cd5c772..2354187b4eaf 100644 --- a/metricbeat/mb/lightmetricset.go +++ b/metricbeat/mb/lightmetricset.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) // LightMetricSet contains the definition of a non-registered metric set diff --git a/metricbeat/mb/lightmetricset_test.go b/metricbeat/mb/lightmetricset_test.go index ecb3f374d481..ebdf9e1bf759 100644 --- a/metricbeat/mb/lightmetricset_test.go +++ b/metricbeat/mb/lightmetricset_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestLightMetricSetRegistration(t *testing.T) { diff --git a/metricbeat/mb/lightmodules.go b/metricbeat/mb/lightmodules.go index 0f0fb9f23cfa..bffbfbe026e4 100644 --- a/metricbeat/mb/lightmodules.go +++ b/metricbeat/mb/lightmodules.go @@ -26,9 +26,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" ) const ( diff --git a/metricbeat/mb/lightmodules_test.go b/metricbeat/mb/lightmodules_test.go index 287b7bfc6714..07a4ceeb54f9 100644 --- a/metricbeat/mb/lightmodules_test.go +++ b/metricbeat/mb/lightmodules_test.go @@ -27,9 +27,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - _ "github.com/elastic/beats/libbeat/processors/add_id" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + _ "github.com/elastic/beats/v7/libbeat/processors/add_id" ) // TestLightModulesAsModuleSource checks that registry correctly lists diff --git a/metricbeat/mb/mb.go b/metricbeat/mb/mb.go index 24475e0e01a6..b22b09debed9 100644 --- a/metricbeat/mb/mb.go +++ b/metricbeat/mb/mb.go @@ -27,10 +27,10 @@ import ( "net/url" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/metricbeat/helper/dialer" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/metricbeat/helper/dialer" ) const ( diff --git a/metricbeat/mb/mb_test.go b/metricbeat/mb/mb_test.go index f93721d8a81e..3b734ae9208a 100644 --- a/metricbeat/mb/mb_test.go +++ b/metricbeat/mb/mb_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/mb/module/configuration.go b/metricbeat/mb/module/configuration.go index 2ccd0bd99aca..8b0701c0ae9f 100644 --- a/metricbeat/mb/module/configuration.go +++ b/metricbeat/mb/module/configuration.go @@ -20,9 +20,9 @@ package module import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // ConfiguredModules returns a list of all configured modules, including anyone present under dynamic config settings. diff --git a/metricbeat/mb/module/connector.go b/metricbeat/mb/module/connector.go index 15456c160a8e..5d9c75a573c9 100644 --- a/metricbeat/mb/module/connector.go +++ b/metricbeat/mb/module/connector.go @@ -20,11 +20,11 @@ package module import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/fmtstr" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/processors/add_formatted_index" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/fmtstr" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/processors/add_formatted_index" ) // Connector configures and establishes a beat.Client for publishing events diff --git a/metricbeat/mb/module/connector_test.go b/metricbeat/mb/module/connector_test.go index 9ca3e48cd17e..3695d1c61bea 100644 --- a/metricbeat/mb/module/connector_test.go +++ b/metricbeat/mb/module/connector_test.go @@ -25,9 +25,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" ) func TestProcessorsForConfig(t *testing.T) { diff --git a/metricbeat/mb/module/doc.go b/metricbeat/mb/module/doc.go index 1b6b13b13ba6..c67256697371 100644 --- a/metricbeat/mb/module/doc.go +++ b/metricbeat/mb/module/doc.go @@ -18,7 +18,7 @@ // Package module contains the low-level utilities for running Metricbeat // modules and metricsets. This is useful for building your own tool that // has a module and sub-module concept. If you want to reuse the whole -// Metricbeat framework see the github.com/elastic/beats/metricbeat/beater +// Metricbeat framework see the github.com/elastic/beats/v7/metricbeat/beater // package that provides a higher level interface. // // This contains the tools for instantiating modules, running them, and diff --git a/metricbeat/mb/module/example_test.go b/metricbeat/mb/module/example_test.go index e5fc7e81e830..eee9dda60b8b 100644 --- a/metricbeat/mb/module/example_test.go +++ b/metricbeat/mb/module/example_test.go @@ -25,12 +25,12 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/outputs/codec/json" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/outputs/codec/json" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/module" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/module" ) // ExampleWrapper demonstrates how to create a single Wrapper diff --git a/metricbeat/mb/module/factory.go b/metricbeat/mb/module/factory.go index 08aafb36875f..5392701ccb0f 100644 --- a/metricbeat/mb/module/factory.go +++ b/metricbeat/mb/module/factory.go @@ -18,10 +18,10 @@ package module import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/cfgfile" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/cfgfile" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Factory creates new Runner instances from configuration objects. diff --git a/metricbeat/mb/module/options.go b/metricbeat/mb/module/options.go index 2d25e363b3cd..273db92b7189 100644 --- a/metricbeat/mb/module/options.go +++ b/metricbeat/mb/module/options.go @@ -20,8 +20,8 @@ package module import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Option specifies some optional arguments used for configuring the behavior diff --git a/metricbeat/mb/module/options_test.go b/metricbeat/mb/module/options_test.go index 795fd4961895..5cc0f17be98e 100644 --- a/metricbeat/mb/module/options_test.go +++ b/metricbeat/mb/module/options_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) func TestWithMaxStartDelay(t *testing.T) { diff --git a/metricbeat/mb/module/publish.go b/metricbeat/mb/module/publish.go index 40ce01549fe4..6f9c200eac6c 100644 --- a/metricbeat/mb/module/publish.go +++ b/metricbeat/mb/module/publish.go @@ -20,7 +20,7 @@ package module import ( "sync" - "github.com/elastic/beats/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/beat" ) // PublishChannels publishes the events read from each channel to the given diff --git a/metricbeat/mb/module/runner.go b/metricbeat/mb/module/runner.go index c60a009caea3..0e4bd78c9978 100644 --- a/metricbeat/mb/module/runner.go +++ b/metricbeat/mb/module/runner.go @@ -21,8 +21,8 @@ import ( "fmt" "sync" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/monitoring" ) var ( diff --git a/metricbeat/mb/module/runner_group_test.go b/metricbeat/mb/module/runner_group_test.go index cbf2f310a87f..dd7babee0d79 100644 --- a/metricbeat/mb/module/runner_group_test.go +++ b/metricbeat/mb/module/runner_group_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/common/atomic" ) const ( diff --git a/metricbeat/mb/module/runner_test.go b/metricbeat/mb/module/runner_test.go index 140e6333400d..6b8b2d705ef2 100644 --- a/metricbeat/mb/module/runner_test.go +++ b/metricbeat/mb/module/runner_test.go @@ -22,11 +22,11 @@ package module_test import ( "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - pubtest "github.com/elastic/beats/libbeat/publisher/testing" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/module" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + pubtest "github.com/elastic/beats/v7/libbeat/publisher/testing" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/module" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/mb/module/testing.go b/metricbeat/mb/module/testing.go index c7ac928ea76c..12a5891b7552 100644 --- a/metricbeat/mb/module/testing.go +++ b/metricbeat/mb/module/testing.go @@ -22,9 +22,9 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/testing" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/testing" ) // receiveOneEvent receives one event from the events channel then closes the diff --git a/metricbeat/mb/module/wrapper.go b/metricbeat/mb/module/wrapper.go index dfb547dcd27d..f8375b4adf67 100644 --- a/metricbeat/mb/module/wrapper.go +++ b/metricbeat/mb/module/wrapper.go @@ -24,12 +24,12 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/libbeat/testing" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/testing" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Expvar metric names. diff --git a/metricbeat/mb/module/wrapper_test.go b/metricbeat/mb/module/wrapper_test.go index b83db1ff6bf8..1108b5bd737b 100644 --- a/metricbeat/mb/module/wrapper_test.go +++ b/metricbeat/mb/module/wrapper_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/module" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/module" ) const ( diff --git a/metricbeat/mb/parse/hostparsers.go b/metricbeat/mb/parse/hostparsers.go index 5e193e1b103e..e499de9a1d86 100644 --- a/metricbeat/mb/parse/hostparsers.go +++ b/metricbeat/mb/parse/hostparsers.go @@ -20,7 +20,7 @@ package parse import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) // PassThruHostParser is a HostParser that sets the HostData URI, SanitizedURI, diff --git a/metricbeat/mb/parse/url.go b/metricbeat/mb/parse/url.go index cf9a7511bceb..0bcbfa2cac02 100644 --- a/metricbeat/mb/parse/url.go +++ b/metricbeat/mb/parse/url.go @@ -24,8 +24,8 @@ import ( p "path" "strings" - "github.com/elastic/beats/metricbeat/helper/dialer" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/dialer" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/pkg/errors" ) diff --git a/metricbeat/mb/parse/url_test.go b/metricbeat/mb/parse/url_test.go index d7ff295b3757..997385b443f5 100644 --- a/metricbeat/mb/parse/url_test.go +++ b/metricbeat/mb/parse/url_test.go @@ -20,10 +20,10 @@ package parse import ( "testing" - "github.com/elastic/beats/metricbeat/helper/dialer" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/dialer" + "github.com/elastic/beats/v7/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/mb/registry.go b/metricbeat/mb/registry.go index c7b13b3a60bc..780213d2392a 100644 --- a/metricbeat/mb/registry.go +++ b/metricbeat/mb/registry.go @@ -25,8 +25,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" ) const initialSize = 20 // initialSize specifies the initial size of the Register. diff --git a/metricbeat/mb/testing/data/data_test.go b/metricbeat/mb/testing/data/data_test.go index a6d1f4681271..775f539b59a6 100644 --- a/metricbeat/mb/testing/data/data_test.go +++ b/metricbeat/mb/testing/data/data_test.go @@ -24,8 +24,8 @@ import ( "strings" "testing" - _ "github.com/elastic/beats/metricbeat/include" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/include" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestAll(t *testing.T) { diff --git a/metricbeat/mb/testing/data_generator.go b/metricbeat/mb/testing/data_generator.go index d890364cf870..10ab9b76e34c 100644 --- a/metricbeat/mb/testing/data_generator.go +++ b/metricbeat/mb/testing/data_generator.go @@ -26,10 +26,10 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/testing/flags" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/testing/flags" ) // WriteEvent fetches a single event writes the output to a ./_meta/data.json diff --git a/metricbeat/mb/testing/fetcher.go b/metricbeat/mb/testing/fetcher.go index 5b01e1b81382..e80101c0918e 100644 --- a/metricbeat/mb/testing/fetcher.go +++ b/metricbeat/mb/testing/fetcher.go @@ -20,9 +20,9 @@ package testing import ( "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Fetcher is an interface implemented by all fetchers for testing purpouses diff --git a/metricbeat/mb/testing/modules.go b/metricbeat/mb/testing/modules.go index 3edd1baeef9b..673deef850d7 100644 --- a/metricbeat/mb/testing/modules.go +++ b/metricbeat/mb/testing/modules.go @@ -28,7 +28,7 @@ that Metricbeat does it and with the same validations. package mymetricset_test import ( - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { @@ -59,8 +59,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) type TestModule struct { diff --git a/metricbeat/mb/testing/testdata.go b/metricbeat/mb/testing/testdata.go index c400be0a3045..39ff777beefd 100644 --- a/metricbeat/mb/testing/testdata.go +++ b/metricbeat/mb/testing/testdata.go @@ -32,13 +32,13 @@ import ( "github.com/mitchellh/hashstructure" "gopkg.in/yaml.v2" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/mapping" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/testing/flags" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/mapping" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/testing/flags" - _ "github.com/elastic/beats/metricbeat/include/fields" + _ "github.com/elastic/beats/v7/metricbeat/include/fields" ) const ( diff --git a/metricbeat/module/aerospike/fields.go b/metricbeat/module/aerospike/fields.go index 2a325a2a214c..4e03f23d432b 100644 --- a/metricbeat/module/aerospike/fields.go +++ b/metricbeat/module/aerospike/fields.go @@ -20,7 +20,7 @@ package aerospike import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/aerospike/namespace/data.go b/metricbeat/module/aerospike/namespace/data.go index 9a0b3bd3b38f..e774d2e9ec94 100644 --- a/metricbeat/module/aerospike/namespace/data.go +++ b/metricbeat/module/aerospike/namespace/data.go @@ -18,8 +18,8 @@ package namespace import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var schema = s.Schema{ diff --git a/metricbeat/module/aerospike/namespace/namespace.go b/metricbeat/module/aerospike/namespace/namespace.go index 61b80a405306..2ac8a632626b 100644 --- a/metricbeat/module/aerospike/namespace/namespace.go +++ b/metricbeat/module/aerospike/namespace/namespace.go @@ -23,9 +23,9 @@ import ( as "github.com/aerospike/aerospike-client-go" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/aerospike" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/aerospike" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/aerospike/namespace/namespace_integration_test.go b/metricbeat/module/aerospike/namespace/namespace_integration_test.go index 1e0d1cdcd06c..547a49986a60 100644 --- a/metricbeat/module/aerospike/namespace/namespace_integration_test.go +++ b/metricbeat/module/aerospike/namespace/namespace_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/apache/fields.go b/metricbeat/module/apache/fields.go index 4dcc41db0513..619e56f1a831 100644 --- a/metricbeat/module/apache/fields.go +++ b/metricbeat/module/apache/fields.go @@ -20,7 +20,7 @@ package apache import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/apache/status/data.go b/metricbeat/module/apache/status/data.go index 7659d161d2e3..0c57bc34357c 100644 --- a/metricbeat/module/apache/status/data.go +++ b/metricbeat/module/apache/status/data.go @@ -22,9 +22,9 @@ import ( "regexp" "strings" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var ( diff --git a/metricbeat/module/apache/status/status.go b/metricbeat/module/apache/status/status.go index ddd132841deb..92053f2373db 100644 --- a/metricbeat/module/apache/status/status.go +++ b/metricbeat/module/apache/status/status.go @@ -21,10 +21,10 @@ package status import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/apache/status/status_integration_test.go b/metricbeat/module/apache/status/status_integration_test.go index ffb563135085..96ab5439b98f 100644 --- a/metricbeat/module/apache/status/status_integration_test.go +++ b/metricbeat/module/apache/status/status_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/apache/status/status_test.go b/metricbeat/module/apache/status/status_test.go index e0eba14252a2..182b41e1af3c 100644 --- a/metricbeat/module/apache/status/status_test.go +++ b/metricbeat/module/apache/status/status_test.go @@ -31,12 +31,12 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" - _ "github.com/elastic/beats/metricbeat/module/apache" + _ "github.com/elastic/beats/v7/metricbeat/module/apache" ) // response is a raw response copied from an Apache web server. diff --git a/metricbeat/module/beat/beat.go b/metricbeat/module/beat/beat.go index 941885e6e921..42927977b0f5 100644 --- a/metricbeat/module/beat/beat.go +++ b/metricbeat/module/beat/beat.go @@ -24,9 +24,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/beat/beat_integration_test.go b/metricbeat/module/beat/beat_integration_test.go index ba13a54cf622..d96bba4be0f2 100644 --- a/metricbeat/module/beat/beat_integration_test.go +++ b/metricbeat/module/beat/beat_integration_test.go @@ -24,11 +24,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/beat" - _ "github.com/elastic/beats/metricbeat/module/beat/state" - _ "github.com/elastic/beats/metricbeat/module/beat/stats" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/beat" + _ "github.com/elastic/beats/v7/metricbeat/module/beat/state" + _ "github.com/elastic/beats/v7/metricbeat/module/beat/stats" ) var metricSets = []string{ diff --git a/metricbeat/module/beat/fields.go b/metricbeat/module/beat/fields.go index 53102ecb26ce..33bbffd7dc09 100644 --- a/metricbeat/module/beat/fields.go +++ b/metricbeat/module/beat/fields.go @@ -20,7 +20,7 @@ package beat import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/beat/metricset.go b/metricbeat/module/beat/metricset.go index ba4957b47c68..fe0d2d9acf8e 100644 --- a/metricbeat/module/beat/metricset.go +++ b/metricbeat/module/beat/metricset.go @@ -18,8 +18,8 @@ package beat import ( - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" ) // MetricSet can be used to build other metricsets within the Beat module. diff --git a/metricbeat/module/beat/state/data.go b/metricbeat/module/beat/state/data.go index 15a258389590..97a714cd9e09 100644 --- a/metricbeat/module/beat/state/data.go +++ b/metricbeat/module/beat/state/data.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/beat" ) var ( diff --git a/metricbeat/module/beat/state/data_test.go b/metricbeat/module/beat/state/data_test.go index 468e986f91a0..606853c02065 100644 --- a/metricbeat/module/beat/state/data_test.go +++ b/metricbeat/module/beat/state/data_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/metricbeat/module/beat" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/beat/state/data_xpack.go b/metricbeat/module/beat/state/data_xpack.go index e92bdd924d97..2dc2bebff880 100644 --- a/metricbeat/module/beat/state/data_xpack.go +++ b/metricbeat/module/beat/state/data_xpack.go @@ -23,11 +23,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - b "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + b "github.com/elastic/beats/v7/metricbeat/module/beat" ) func eventMappingXPack(r mb.ReporterV2, m *MetricSet, info b.Info, content []byte) error { diff --git a/metricbeat/module/beat/state/state.go b/metricbeat/module/beat/state/state.go index 218686abce39..eb6a41ff8bfb 100644 --- a/metricbeat/module/beat/state/state.go +++ b/metricbeat/module/beat/state/state.go @@ -18,9 +18,9 @@ package state import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/beat" ) func init() { diff --git a/metricbeat/module/beat/stats/data.go b/metricbeat/module/beat/stats/data.go index 8c868e1d5b29..acc595745cd6 100644 --- a/metricbeat/module/beat/stats/data.go +++ b/metricbeat/module/beat/stats/data.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/beat" ) var ( diff --git a/metricbeat/module/beat/stats/data_test.go b/metricbeat/module/beat/stats/data_test.go index 78a87e2d4ae2..2a2feb408a45 100644 --- a/metricbeat/module/beat/stats/data_test.go +++ b/metricbeat/module/beat/stats/data_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/metricbeat/module/beat" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/beat/stats/data_xpack.go b/metricbeat/module/beat/stats/data_xpack.go index 8b0da8a84e65..d0b81dbe29db 100644 --- a/metricbeat/module/beat/stats/data_xpack.go +++ b/metricbeat/module/beat/stats/data_xpack.go @@ -23,11 +23,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/beat" ) func eventMappingXPack(r mb.ReporterV2, m *MetricSet, info beat.Info, content []byte) error { diff --git a/metricbeat/module/beat/stats/stats.go b/metricbeat/module/beat/stats/stats.go index fcab548c5a37..6cee03e426ad 100644 --- a/metricbeat/module/beat/stats/stats.go +++ b/metricbeat/module/beat/stats/stats.go @@ -18,9 +18,9 @@ package stats import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/beat" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/beat" ) func init() { diff --git a/metricbeat/module/ceph/cluster_disk/cluster_disk.go b/metricbeat/module/ceph/cluster_disk/cluster_disk.go index 37f68f37a6cb..8f33d0e847b1 100644 --- a/metricbeat/module/ceph/cluster_disk/cluster_disk.go +++ b/metricbeat/module/ceph/cluster_disk/cluster_disk.go @@ -18,9 +18,9 @@ package cluster_disk import ( - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/cluster_disk/cluster_disk_integration_test.go b/metricbeat/module/ceph/cluster_disk/cluster_disk_integration_test.go index b91147bfecc3..9c467a459bb3 100644 --- a/metricbeat/module/ceph/cluster_disk/cluster_disk_integration_test.go +++ b/metricbeat/module/ceph/cluster_disk/cluster_disk_integration_test.go @@ -22,8 +22,8 @@ package cluster_disk import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/ceph/cluster_disk/cluster_disk_test.go b/metricbeat/module/ceph/cluster_disk/cluster_disk_test.go index b073f4be6b67..b6aa3b97bded 100644 --- a/metricbeat/module/ceph/cluster_disk/cluster_disk_test.go +++ b/metricbeat/module/ceph/cluster_disk/cluster_disk_test.go @@ -24,8 +24,8 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/ceph/cluster_disk/data.go b/metricbeat/module/ceph/cluster_disk/data.go index 259d712f8c9e..b75daa31b0e6 100644 --- a/metricbeat/module/ceph/cluster_disk/data.go +++ b/metricbeat/module/ceph/cluster_disk/data.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type StatsCluster struct { diff --git a/metricbeat/module/ceph/cluster_health/cluster_health.go b/metricbeat/module/ceph/cluster_health/cluster_health.go index e651a7332d79..887cb9a5de27 100644 --- a/metricbeat/module/ceph/cluster_health/cluster_health.go +++ b/metricbeat/module/ceph/cluster_health/cluster_health.go @@ -20,9 +20,9 @@ package cluster_health import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/cluster_health/cluster_health_integration_test.go b/metricbeat/module/ceph/cluster_health/cluster_health_integration_test.go index ff7c7d8e68cd..3a4e3799425e 100644 --- a/metricbeat/module/ceph/cluster_health/cluster_health_integration_test.go +++ b/metricbeat/module/ceph/cluster_health/cluster_health_integration_test.go @@ -22,8 +22,8 @@ package cluster_health import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/ceph/cluster_health/cluster_health_test.go b/metricbeat/module/ceph/cluster_health/cluster_health_test.go index 9f1d15fb2a54..e5514e94682a 100644 --- a/metricbeat/module/ceph/cluster_health/cluster_health_test.go +++ b/metricbeat/module/ceph/cluster_health/cluster_health_test.go @@ -24,8 +24,8 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/ceph/cluster_health/data.go b/metricbeat/module/ceph/cluster_health/data.go index cb827e0975fe..bd94c44be2e4 100644 --- a/metricbeat/module/ceph/cluster_health/data.go +++ b/metricbeat/module/ceph/cluster_health/data.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Timecheck contains part of the response from a HealthRequest diff --git a/metricbeat/module/ceph/cluster_status/cluster_status.go b/metricbeat/module/ceph/cluster_status/cluster_status.go index b7a9eaa469b9..69c11a084f32 100644 --- a/metricbeat/module/ceph/cluster_status/cluster_status.go +++ b/metricbeat/module/ceph/cluster_status/cluster_status.go @@ -20,9 +20,9 @@ package cluster_status import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/cluster_status/cluster_status_integration_test.go b/metricbeat/module/ceph/cluster_status/cluster_status_integration_test.go index 1741918bf668..fee52f71fe1a 100644 --- a/metricbeat/module/ceph/cluster_status/cluster_status_integration_test.go +++ b/metricbeat/module/ceph/cluster_status/cluster_status_integration_test.go @@ -22,8 +22,8 @@ package cluster_status import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/ceph/cluster_status/cluster_status_test.go b/metricbeat/module/ceph/cluster_status/cluster_status_test.go index c9066e707225..3f6cd3ed7bd3 100644 --- a/metricbeat/module/ceph/cluster_status/cluster_status_test.go +++ b/metricbeat/module/ceph/cluster_status/cluster_status_test.go @@ -24,8 +24,8 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/ceph/cluster_status/data.go b/metricbeat/module/ceph/cluster_status/data.go index 064026355fec..c19a75b44d39 100644 --- a/metricbeat/module/ceph/cluster_status/data.go +++ b/metricbeat/module/ceph/cluster_status/data.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // PgState represents placement group state diff --git a/metricbeat/module/ceph/fields.go b/metricbeat/module/ceph/fields.go index c0b558982fc4..f401f7849767 100644 --- a/metricbeat/module/ceph/fields.go +++ b/metricbeat/module/ceph/fields.go @@ -20,7 +20,7 @@ package ceph import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/ceph/mgr/metricset.go b/metricbeat/module/ceph/mgr/metricset.go index a982cf706b2c..a8e84100dcc1 100644 --- a/metricbeat/module/ceph/mgr/metricset.go +++ b/metricbeat/module/ceph/mgr/metricset.go @@ -20,8 +20,8 @@ package mgr import ( "fmt" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" ) type MetricSet struct { diff --git a/metricbeat/module/ceph/mgr_cluster_disk/data.go b/metricbeat/module/ceph/mgr_cluster_disk/data.go index cbb69d054162..8940f5030ed2 100644 --- a/metricbeat/module/ceph/mgr_cluster_disk/data.go +++ b/metricbeat/module/ceph/mgr_cluster_disk/data.go @@ -20,8 +20,8 @@ package mgr_cluster_disk import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) type DfResponse struct { diff --git a/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk.go b/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk.go index 0cb42828faf7..14342f13621a 100644 --- a/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk.go +++ b/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk.go @@ -18,10 +18,10 @@ package mgr_cluster_disk import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) const ( diff --git a/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_integration_test.go b/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_integration_test.go index 47f0fa15e4df..bb7f21f4d708 100644 --- a/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_integration_test.go +++ b/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/ceph/mgrtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgrtest" ) const user = "demo" diff --git a/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_test.go b/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_test.go index b227f4c3f021..d658fa6b7048 100644 --- a/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_test.go +++ b/metricbeat/module/ceph/mgr_cluster_disk/mgr_cluster_disk_test.go @@ -20,8 +20,8 @@ package mgr_cluster_disk import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/ceph" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" ) func TestDataFiles(t *testing.T) { diff --git a/metricbeat/module/ceph/mgr_cluster_health/data.go b/metricbeat/module/ceph/mgr_cluster_health/data.go index 8dae532bc562..b81fad378ca1 100644 --- a/metricbeat/module/ceph/mgr_cluster_health/data.go +++ b/metricbeat/module/ceph/mgr_cluster_health/data.go @@ -20,8 +20,8 @@ package mgr_cluster_health import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) type StatusResponse struct { diff --git a/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health.go b/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health.go index b8dc57d2931c..fa2c1f387e53 100644 --- a/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health.go +++ b/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health.go @@ -20,10 +20,10 @@ package mgr_cluster_health import ( "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) const ( diff --git a/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_integration_test.go b/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_integration_test.go index 9113992a86be..3ab6a31574bf 100644 --- a/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_integration_test.go +++ b/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/ceph/mgrtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgrtest" ) const user = "demo" diff --git a/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_test.go b/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_test.go index 255d96cfd7fd..3aa12fe454c8 100644 --- a/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_test.go +++ b/metricbeat/module/ceph/mgr_cluster_health/mgr_cluster_health_test.go @@ -29,8 +29,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) type clientRequest struct { diff --git a/metricbeat/module/ceph/mgr_osd_perf/data.go b/metricbeat/module/ceph/mgr_osd_perf/data.go index 18b78ac6114b..562515e7b7cd 100644 --- a/metricbeat/module/ceph/mgr_osd_perf/data.go +++ b/metricbeat/module/ceph/mgr_osd_perf/data.go @@ -20,8 +20,8 @@ package mgr_osd_perf import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) type OsdPerfResponse struct { diff --git a/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf.go b/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf.go index bd8fc20efd75..239afd61ed37 100644 --- a/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf.go +++ b/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf.go @@ -18,9 +18,9 @@ package mgr_osd_perf import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) const ( diff --git a/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_integration_test.go b/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_integration_test.go index c592f764ed35..a187bfefe9fa 100644 --- a/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_integration_test.go +++ b/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/ceph/mgrtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgrtest" ) const user = "demo" diff --git a/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_test.go b/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_test.go index 9cd253b9d07b..500d812c4689 100644 --- a/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_test.go +++ b/metricbeat/module/ceph/mgr_osd_perf/mgr_osd_perf_test.go @@ -20,8 +20,8 @@ package mgr_osd_perf import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/ceph" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" ) func TestDataFiles(t *testing.T) { diff --git a/metricbeat/module/ceph/mgr_osd_pool_stats/data.go b/metricbeat/module/ceph/mgr_osd_pool_stats/data.go index 4a86c6b9327e..a4990384ef74 100644 --- a/metricbeat/module/ceph/mgr_osd_pool_stats/data.go +++ b/metricbeat/module/ceph/mgr_osd_pool_stats/data.go @@ -20,8 +20,8 @@ package mgr_osd_pool_stats import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) type OsdPoolStat struct { diff --git a/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats.go b/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats.go index 8d864a623e1e..1ce58e3a06d9 100644 --- a/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats.go +++ b/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats.go @@ -18,9 +18,9 @@ package mgr_osd_pool_stats import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) const ( diff --git a/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_integration_test.go b/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_integration_test.go index af2d8898fc22..3dcfb120442a 100644 --- a/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_integration_test.go +++ b/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/ceph/mgrtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgrtest" ) const user = "demo" diff --git a/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_test.go b/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_test.go index 9e3e27729112..8b84f192f59f 100644 --- a/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_test.go +++ b/metricbeat/module/ceph/mgr_osd_pool_stats/mgr_osd_pool_stats_test.go @@ -20,8 +20,8 @@ package mgr_osd_pool_stats import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/ceph" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" ) func TestDataFiles(t *testing.T) { diff --git a/metricbeat/module/ceph/mgr_osd_tree/data.go b/metricbeat/module/ceph/mgr_osd_tree/data.go index 8694c21f90a3..3f3d1934c2ee 100644 --- a/metricbeat/module/ceph/mgr_osd_tree/data.go +++ b/metricbeat/module/ceph/mgr_osd_tree/data.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) type OsdTreeResponse struct { diff --git a/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree.go b/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree.go index 49b197f2682f..aded13c1a7ab 100644 --- a/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree.go +++ b/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree.go @@ -18,10 +18,10 @@ package mgr_osd_tree import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) const ( diff --git a/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_integration_test.go b/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_integration_test.go index cedc692e0791..3ecab4bdb456 100644 --- a/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_integration_test.go +++ b/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/ceph/mgrtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgrtest" ) const user = "demo" diff --git a/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_test.go b/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_test.go index d59ac2803e0b..7547285046ce 100644 --- a/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_test.go +++ b/metricbeat/module/ceph/mgr_osd_tree/mgr_osd_tree_test.go @@ -20,8 +20,8 @@ package mgr_osd_tree import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/ceph" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" ) func TestDataFiles(t *testing.T) { diff --git a/metricbeat/module/ceph/mgr_pool_disk/data.go b/metricbeat/module/ceph/mgr_pool_disk/data.go index 437c164fec90..5d586a0a134a 100644 --- a/metricbeat/module/ceph/mgr_pool_disk/data.go +++ b/metricbeat/module/ceph/mgr_pool_disk/data.go @@ -20,8 +20,8 @@ package mgr_pool_disk import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) type DfResponse struct { diff --git a/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk.go b/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk.go index 41b025abf24d..a3b510de9154 100644 --- a/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk.go +++ b/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk.go @@ -18,10 +18,10 @@ package mgr_pool_disk import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/ceph/mgr" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgr" ) const ( diff --git a/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_integration_test.go b/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_integration_test.go index f3b7748263dd..e1e625521b84 100644 --- a/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_integration_test.go +++ b/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/ceph/mgrtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/ceph/mgrtest" ) const user = "demo" diff --git a/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_test.go b/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_test.go index ab0c3f03d690..43dc8f7cbaa9 100644 --- a/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_test.go +++ b/metricbeat/module/ceph/mgr_pool_disk/mgr_pool_disk_test.go @@ -20,8 +20,8 @@ package mgr_pool_disk import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/ceph" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" ) func TestDataFiles(t *testing.T) { diff --git a/metricbeat/module/ceph/monitor_health/data.go b/metricbeat/module/ceph/monitor_health/data.go index 7ca509ea212e..a40612e339df 100644 --- a/metricbeat/module/ceph/monitor_health/data.go +++ b/metricbeat/module/ceph/monitor_health/data.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type Tick struct { diff --git a/metricbeat/module/ceph/monitor_health/monitor_health.go b/metricbeat/module/ceph/monitor_health/monitor_health.go index 16f7b4373243..f726969da9ee 100644 --- a/metricbeat/module/ceph/monitor_health/monitor_health.go +++ b/metricbeat/module/ceph/monitor_health/monitor_health.go @@ -18,9 +18,9 @@ package monitor_health import ( - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/monitor_health/monitor_health_test.go b/metricbeat/module/ceph/monitor_health/monitor_health_test.go index 6790e258f077..e6a464b2543d 100644 --- a/metricbeat/module/ceph/monitor_health/monitor_health_test.go +++ b/metricbeat/module/ceph/monitor_health/monitor_health_test.go @@ -24,12 +24,12 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" - _ "github.com/elastic/beats/metricbeat/module/ceph" + _ "github.com/elastic/beats/v7/metricbeat/module/ceph" ) func TestFetchEventContents(t *testing.T) { diff --git a/metricbeat/module/ceph/osd_df/data.go b/metricbeat/module/ceph/osd_df/data.go index fa0422afa519..9b48e4f89f31 100644 --- a/metricbeat/module/ceph/osd_df/data.go +++ b/metricbeat/module/ceph/osd_df/data.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // Node represents a node object diff --git a/metricbeat/module/ceph/osd_df/osd_df.go b/metricbeat/module/ceph/osd_df/osd_df.go index 79139ed89fa1..333f259b9d96 100644 --- a/metricbeat/module/ceph/osd_df/osd_df.go +++ b/metricbeat/module/ceph/osd_df/osd_df.go @@ -20,9 +20,9 @@ package osd_df import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/osd_df/osd_df_integration_test.go b/metricbeat/module/ceph/osd_df/osd_df_integration_test.go index 8d6ba84664fa..6735749bd70d 100644 --- a/metricbeat/module/ceph/osd_df/osd_df_integration_test.go +++ b/metricbeat/module/ceph/osd_df/osd_df_integration_test.go @@ -22,8 +22,8 @@ package osd_df import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/ceph/osd_df/osd_df_test.go b/metricbeat/module/ceph/osd_df/osd_df_test.go index cc9683956970..bef039597dd5 100644 --- a/metricbeat/module/ceph/osd_df/osd_df_test.go +++ b/metricbeat/module/ceph/osd_df/osd_df_test.go @@ -24,7 +24,7 @@ import ( "path/filepath" "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/ceph/osd_tree/data.go b/metricbeat/module/ceph/osd_tree/data.go index 5f7d32056f0a..f88426fa2787 100644 --- a/metricbeat/module/ceph/osd_tree/data.go +++ b/metricbeat/module/ceph/osd_tree/data.go @@ -22,8 +22,8 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Node represents a node object diff --git a/metricbeat/module/ceph/osd_tree/osd_tree.go b/metricbeat/module/ceph/osd_tree/osd_tree.go index 85192cff2920..6417ca59d9b0 100644 --- a/metricbeat/module/ceph/osd_tree/osd_tree.go +++ b/metricbeat/module/ceph/osd_tree/osd_tree.go @@ -20,9 +20,9 @@ package osd_tree import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/osd_tree/osd_tree_integration_test.go b/metricbeat/module/ceph/osd_tree/osd_tree_integration_test.go index 27bd36120a1f..69d7e3ed7e3d 100644 --- a/metricbeat/module/ceph/osd_tree/osd_tree_integration_test.go +++ b/metricbeat/module/ceph/osd_tree/osd_tree_integration_test.go @@ -22,8 +22,8 @@ package osd_tree import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/ceph/osd_tree/osd_tree_test.go b/metricbeat/module/ceph/osd_tree/osd_tree_test.go index a92f40a8135e..872da2d32c91 100644 --- a/metricbeat/module/ceph/osd_tree/osd_tree_test.go +++ b/metricbeat/module/ceph/osd_tree/osd_tree_test.go @@ -24,7 +24,7 @@ import ( "path/filepath" "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/ceph/pool_disk/data.go b/metricbeat/module/ceph/pool_disk/data.go index d2bef377dc11..e3758c94816c 100644 --- a/metricbeat/module/ceph/pool_disk/data.go +++ b/metricbeat/module/ceph/pool_disk/data.go @@ -20,8 +20,8 @@ package pool_disk import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Stats represents the statistics for a pool diff --git a/metricbeat/module/ceph/pool_disk/pool_disk.go b/metricbeat/module/ceph/pool_disk/pool_disk.go index dfcbf79c97a3..4fda029bff46 100644 --- a/metricbeat/module/ceph/pool_disk/pool_disk.go +++ b/metricbeat/module/ceph/pool_disk/pool_disk.go @@ -20,9 +20,9 @@ package pool_disk import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/ceph/pool_disk/pool_disk_integration_test.go b/metricbeat/module/ceph/pool_disk/pool_disk_integration_test.go index cc1f68cdd81b..002acbf0c6a6 100644 --- a/metricbeat/module/ceph/pool_disk/pool_disk_integration_test.go +++ b/metricbeat/module/ceph/pool_disk/pool_disk_integration_test.go @@ -22,8 +22,8 @@ package pool_disk import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/ceph/pool_disk/pool_disk_test.go b/metricbeat/module/ceph/pool_disk/pool_disk_test.go index f2367401f8f7..4f153dd9d5a5 100644 --- a/metricbeat/module/ceph/pool_disk/pool_disk_test.go +++ b/metricbeat/module/ceph/pool_disk/pool_disk_test.go @@ -24,8 +24,8 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/consul/agent/agent.go b/metricbeat/module/consul/agent/agent.go index c1fa03ae127f..2eedcfb5506a 100644 --- a/metricbeat/module/consul/agent/agent.go +++ b/metricbeat/module/consul/agent/agent.go @@ -20,10 +20,10 @@ package agent import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) var ( diff --git a/metricbeat/module/consul/agent/agent_integration_test.go b/metricbeat/module/consul/agent/agent_integration_test.go index 43c4358df903..e4e4a585e300 100644 --- a/metricbeat/module/consul/agent/agent_integration_test.go +++ b/metricbeat/module/consul/agent/agent_integration_test.go @@ -22,15 +22,15 @@ package agent import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - "github.com/elastic/beats/metricbeat/module/consul" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + "github.com/elastic/beats/v7/metricbeat/module/consul" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/consul/agent/agent_test.go b/metricbeat/module/consul/agent/agent_test.go index 523c2449b0ff..8e47bd0b9cd6 100644 --- a/metricbeat/module/consul/agent/agent_test.go +++ b/metricbeat/module/consul/agent/agent_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var jsonExample = `{ diff --git a/metricbeat/module/consul/agent/data.go b/metricbeat/module/consul/agent/data.go index 022e066b861f..a8e45a06bab5 100644 --- a/metricbeat/module/consul/agent/data.go +++ b/metricbeat/module/consul/agent/data.go @@ -21,7 +21,7 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type valueConverter interface { diff --git a/metricbeat/module/consul/agent/data_integration_test.go b/metricbeat/module/consul/agent/data_integration_test.go index 5dfc8a32514c..b93677235c7b 100644 --- a/metricbeat/module/consul/agent/data_integration_test.go +++ b/metricbeat/module/consul/agent/data_integration_test.go @@ -24,9 +24,9 @@ import ( _ "github.com/denisenkom/go-mssqldb" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/consul" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/consul" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/consul/fields.go b/metricbeat/module/consul/fields.go index 5bd61822219a..3e396c8a0b35 100644 --- a/metricbeat/module/consul/fields.go +++ b/metricbeat/module/consul/fields.go @@ -20,7 +20,7 @@ package consul import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/couchbase/bucket/bucket.go b/metricbeat/module/couchbase/bucket/bucket.go index 3f06a9760f7d..643b1ecf41c6 100644 --- a/metricbeat/module/couchbase/bucket/bucket.go +++ b/metricbeat/module/couchbase/bucket/bucket.go @@ -20,9 +20,9 @@ package bucket import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/couchbase/bucket/bucket_integration_test.go b/metricbeat/module/couchbase/bucket/bucket_integration_test.go index 9f498bb52621..4311b07f06b5 100644 --- a/metricbeat/module/couchbase/bucket/bucket_integration_test.go +++ b/metricbeat/module/couchbase/bucket/bucket_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/couchbase" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/couchbase" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/couchbase/bucket/bucket_test.go b/metricbeat/module/couchbase/bucket/bucket_test.go index 62934d6472b2..0d39b4bb5fe7 100644 --- a/metricbeat/module/couchbase/bucket/bucket_test.go +++ b/metricbeat/module/couchbase/bucket/bucket_test.go @@ -26,8 +26,8 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/couchbase/bucket/data.go b/metricbeat/module/couchbase/bucket/data.go index 432bcf38cd84..2aa6ab328c8b 100644 --- a/metricbeat/module/couchbase/bucket/data.go +++ b/metricbeat/module/couchbase/bucket/data.go @@ -20,8 +20,8 @@ package bucket import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type BucketQuota struct { diff --git a/metricbeat/module/couchbase/cluster/cluster.go b/metricbeat/module/couchbase/cluster/cluster.go index 556b37669821..2d18856c090e 100644 --- a/metricbeat/module/couchbase/cluster/cluster.go +++ b/metricbeat/module/couchbase/cluster/cluster.go @@ -20,9 +20,9 @@ package cluster import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/couchbase/cluster/cluster_integration_test.go b/metricbeat/module/couchbase/cluster/cluster_integration_test.go index d2eb6c8d72e5..11b136f0bb35 100644 --- a/metricbeat/module/couchbase/cluster/cluster_integration_test.go +++ b/metricbeat/module/couchbase/cluster/cluster_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/couchbase" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/couchbase" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/couchbase/cluster/cluster_test.go b/metricbeat/module/couchbase/cluster/cluster_test.go index 0733e9fbc7f4..8a7c6f5338cf 100644 --- a/metricbeat/module/couchbase/cluster/cluster_test.go +++ b/metricbeat/module/couchbase/cluster/cluster_test.go @@ -22,9 +22,9 @@ package cluster import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/couchbase" + _ "github.com/elastic/beats/v7/metricbeat/module/couchbase" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/couchbase/cluster/data.go b/metricbeat/module/couchbase/cluster/data.go index e099c3e5a9f0..5195f6d708c4 100644 --- a/metricbeat/module/couchbase/cluster/data.go +++ b/metricbeat/module/couchbase/cluster/data.go @@ -20,8 +20,8 @@ package cluster import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type StorageTotals_Ram struct { diff --git a/metricbeat/module/couchbase/fields.go b/metricbeat/module/couchbase/fields.go index 8cc55dafee70..5168ad706776 100644 --- a/metricbeat/module/couchbase/fields.go +++ b/metricbeat/module/couchbase/fields.go @@ -20,7 +20,7 @@ package couchbase import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/couchbase/node/data.go b/metricbeat/module/couchbase/node/data.go index 046226bce5fb..b4a2d107e3fa 100644 --- a/metricbeat/module/couchbase/node/data.go +++ b/metricbeat/module/couchbase/node/data.go @@ -22,8 +22,8 @@ import ( "strconv" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type NodeSystemStats struct { diff --git a/metricbeat/module/couchbase/node/node.go b/metricbeat/module/couchbase/node/node.go index 5ad637aa8b49..cbb1ba7ce068 100644 --- a/metricbeat/module/couchbase/node/node.go +++ b/metricbeat/module/couchbase/node/node.go @@ -20,9 +20,9 @@ package node import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/couchbase/node/node_integration_test.go b/metricbeat/module/couchbase/node/node_integration_test.go index 2ed90e6c86fa..63c47e1c565d 100644 --- a/metricbeat/module/couchbase/node/node_integration_test.go +++ b/metricbeat/module/couchbase/node/node_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/couchbase" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/couchbase" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/couchbase/node/node_test.go b/metricbeat/module/couchbase/node/node_test.go index 4245bd3589c3..b99a2c0b76fd 100644 --- a/metricbeat/module/couchbase/node/node_test.go +++ b/metricbeat/module/couchbase/node/node_test.go @@ -22,9 +22,9 @@ package node import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/couchbase" + _ "github.com/elastic/beats/v7/metricbeat/module/couchbase" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/couchdb/fields.go b/metricbeat/module/couchdb/fields.go index 0b4759ade514..fb4182e2dbd5 100644 --- a/metricbeat/module/couchdb/fields.go +++ b/metricbeat/module/couchdb/fields.go @@ -20,7 +20,7 @@ package couchdb import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/couchdb/server/data.go b/metricbeat/module/couchdb/server/data.go index 0d971f40a1d7..9b6c3c25cd73 100644 --- a/metricbeat/module/couchdb/server/data.go +++ b/metricbeat/module/couchdb/server/data.go @@ -20,8 +20,8 @@ package server import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // Server type defines all fields of the Server Metricset diff --git a/metricbeat/module/couchdb/server/server.go b/metricbeat/module/couchdb/server/server.go index e32d827f4d27..7207fbf08eab 100644 --- a/metricbeat/module/couchdb/server/server.go +++ b/metricbeat/module/couchdb/server/server.go @@ -20,9 +20,9 @@ package server import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/couchdb/server/server_integration_test.go b/metricbeat/module/couchdb/server/server_integration_test.go index 08f443d78027..22c7a841a34d 100644 --- a/metricbeat/module/couchdb/server/server_integration_test.go +++ b/metricbeat/module/couchdb/server/server_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/couchdb/server/server_test.go b/metricbeat/module/couchdb/server/server_test.go index dd13ee45bed8..d76b2f2c9041 100644 --- a/metricbeat/module/couchdb/server/server_test.go +++ b/metricbeat/module/couchdb/server/server_test.go @@ -26,7 +26,7 @@ import ( "testing" "time" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/docker/container/container.go b/metricbeat/module/docker/container/container.go index b3523464db3e..04c4f123b799 100644 --- a/metricbeat/module/docker/container/container.go +++ b/metricbeat/module/docker/container/container.go @@ -26,8 +26,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/container/container_integration_test.go b/metricbeat/module/docker/container/container_integration_test.go index 146d31d25f86..47b9dff36f63 100644 --- a/metricbeat/module/docker/container/container_integration_test.go +++ b/metricbeat/module/docker/container/container_integration_test.go @@ -22,7 +22,7 @@ package container import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/container/data.go b/metricbeat/module/docker/container/data.go index d693f988e296..abda8657e7da 100644 --- a/metricbeat/module/docker/container/data.go +++ b/metricbeat/module/docker/container/data.go @@ -22,9 +22,9 @@ import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/docker" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/docker" + "github.com/elastic/beats/v7/metricbeat/mb" ) func eventsMapping(r mb.ReporterV2, containersList []types.Container, dedot bool) { diff --git a/metricbeat/module/docker/cpu/cpu.go b/metricbeat/module/docker/cpu/cpu.go index a07b4f8466f0..0f13fab22484 100644 --- a/metricbeat/module/docker/cpu/cpu.go +++ b/metricbeat/module/docker/cpu/cpu.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/cpu/cpu_integration_test.go b/metricbeat/module/docker/cpu/cpu_integration_test.go index d781791849e7..7ef25eb1a4b4 100644 --- a/metricbeat/module/docker/cpu/cpu_integration_test.go +++ b/metricbeat/module/docker/cpu/cpu_integration_test.go @@ -22,7 +22,7 @@ package cpu import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/cpu/cpu_test.go b/metricbeat/module/docker/cpu/cpu_test.go index bcce353343d0..d14fda678d9b 100644 --- a/metricbeat/module/docker/cpu/cpu_test.go +++ b/metricbeat/module/docker/cpu/cpu_test.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) var cpuService CPUService diff --git a/metricbeat/module/docker/cpu/data.go b/metricbeat/module/docker/cpu/data.go index 3614d55e4ca0..d69d3aa78288 100644 --- a/metricbeat/module/docker/cpu/data.go +++ b/metricbeat/module/docker/cpu/data.go @@ -18,8 +18,8 @@ package cpu import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) func eventsMapping(r mb.ReporterV2, cpuStatsList []CPUStats) { diff --git a/metricbeat/module/docker/cpu/helper.go b/metricbeat/module/docker/cpu/helper.go index 02d045f30b74..75527285f1ee 100644 --- a/metricbeat/module/docker/cpu/helper.go +++ b/metricbeat/module/docker/cpu/helper.go @@ -20,9 +20,9 @@ package cpu import ( "strconv" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) type CPUStats struct { diff --git a/metricbeat/module/docker/diskio/data.go b/metricbeat/module/docker/diskio/data.go index 2a7d4cb9569a..85b975ffeae2 100644 --- a/metricbeat/module/docker/diskio/data.go +++ b/metricbeat/module/docker/diskio/data.go @@ -18,8 +18,8 @@ package diskio import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) func eventsMapping(r mb.ReporterV2, blkioStatsList []BlkioStats) { diff --git a/metricbeat/module/docker/diskio/diskio.go b/metricbeat/module/docker/diskio/diskio.go index dacf86374c30..8868d1607f7b 100644 --- a/metricbeat/module/docker/diskio/diskio.go +++ b/metricbeat/module/docker/diskio/diskio.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/diskio/diskio_integration_test.go b/metricbeat/module/docker/diskio/diskio_integration_test.go index 875815ff1828..0c5cd6a27c6a 100644 --- a/metricbeat/module/docker/diskio/diskio_integration_test.go +++ b/metricbeat/module/docker/diskio/diskio_integration_test.go @@ -22,7 +22,7 @@ package diskio import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/diskio/diskio_test.go b/metricbeat/module/docker/diskio/diskio_test.go index a10db61221cd..520ec7bd2658 100644 --- a/metricbeat/module/docker/diskio/diskio_test.go +++ b/metricbeat/module/docker/diskio/diskio_test.go @@ -25,7 +25,7 @@ import ( "github.com/docker/docker/api/types" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) var blkioService BlkioService diff --git a/metricbeat/module/docker/diskio/helper.go b/metricbeat/module/docker/diskio/helper.go index e75c21b886fb..5873a3615b3f 100644 --- a/metricbeat/module/docker/diskio/helper.go +++ b/metricbeat/module/docker/diskio/helper.go @@ -22,7 +22,7 @@ import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) type BlkioStats struct { diff --git a/metricbeat/module/docker/docker.go b/metricbeat/module/docker/docker.go index 2957dabefcd4..b4a7b91a1cf3 100644 --- a/metricbeat/module/docker/docker.go +++ b/metricbeat/module/docker/docker.go @@ -30,9 +30,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/go-connections/tlsconfig" - "github.com/elastic/beats/libbeat/common/docker" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) // Select Docker API version diff --git a/metricbeat/module/docker/event/event.go b/metricbeat/module/docker/event/event.go index c8ab896de6bb..ad9421cb8f06 100644 --- a/metricbeat/module/docker/event/event.go +++ b/metricbeat/module/docker/event/event.go @@ -28,10 +28,10 @@ import ( "github.com/docker/docker/api/types/events" "github.com/docker/docker/client" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/docker/event/event_integration_test.go b/metricbeat/module/docker/event/event_integration_test.go index 51666efe579c..5d4b7ce79893 100644 --- a/metricbeat/module/docker/event/event_integration_test.go +++ b/metricbeat/module/docker/event/event_integration_test.go @@ -30,10 +30,10 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" - "github.com/elastic/beats/auditbeat/core" - "github.com/elastic/beats/libbeat/common/docker" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/auditbeat/core" + "github.com/elastic/beats/v7/libbeat/common/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/fields.go b/metricbeat/module/docker/fields.go index d2fd8a42eaae..31e6287f9a81 100644 --- a/metricbeat/module/docker/fields.go +++ b/metricbeat/module/docker/fields.go @@ -20,7 +20,7 @@ package docker import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/docker/healthcheck/data.go b/metricbeat/module/docker/healthcheck/data.go index 5f0c8dbc9cc0..6ced97223289 100644 --- a/metricbeat/module/docker/healthcheck/data.go +++ b/metricbeat/module/docker/healthcheck/data.go @@ -24,9 +24,9 @@ import ( "github.com/docker/docker/api/types" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func eventsMapping(r mb.ReporterV2, containers []types.Container, m *MetricSet) { diff --git a/metricbeat/module/docker/healthcheck/healthcheck.go b/metricbeat/module/docker/healthcheck/healthcheck.go index 1b90ccd5471a..1033af8d692f 100644 --- a/metricbeat/module/docker/healthcheck/healthcheck.go +++ b/metricbeat/module/docker/healthcheck/healthcheck.go @@ -26,8 +26,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/healthcheck/healthcheck_integration_test.go b/metricbeat/module/docker/healthcheck/healthcheck_integration_test.go index 600fcb926a60..2f0012ef5e48 100644 --- a/metricbeat/module/docker/healthcheck/healthcheck_integration_test.go +++ b/metricbeat/module/docker/healthcheck/healthcheck_integration_test.go @@ -22,7 +22,7 @@ package healthcheck import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/helper.go b/metricbeat/module/docker/helper.go index 6813ef2a4317..fd2343d6f259 100644 --- a/metricbeat/module/docker/helper.go +++ b/metricbeat/module/docker/helper.go @@ -20,8 +20,8 @@ package docker import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/libbeat/common" - helpers "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common" + helpers "github.com/elastic/beats/v7/libbeat/common/docker" ) // Container is a struct representation of a container diff --git a/metricbeat/module/docker/helper_test.go b/metricbeat/module/docker/helper_test.go index c9fc5a18f70a..556c75e54f70 100644 --- a/metricbeat/module/docker/helper_test.go +++ b/metricbeat/module/docker/helper_test.go @@ -20,11 +20,11 @@ package docker import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" - helpers "github.com/elastic/beats/libbeat/common/docker" + helpers "github.com/elastic/beats/v7/libbeat/common/docker" ) func TestDeDotLabels(t *testing.T) { diff --git a/metricbeat/module/docker/image/data.go b/metricbeat/module/docker/image/data.go index bf2fa4e96ba6..e809450f241f 100644 --- a/metricbeat/module/docker/image/data.go +++ b/metricbeat/module/docker/image/data.go @@ -22,8 +22,8 @@ import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/docker" ) func eventsMapping(imagesList []types.ImageSummary, dedot bool) []common.MapStr { diff --git a/metricbeat/module/docker/image/image.go b/metricbeat/module/docker/image/image.go index 7dead12f42f8..62ea612f83c0 100644 --- a/metricbeat/module/docker/image/image.go +++ b/metricbeat/module/docker/image/image.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/docker/image/image_integration_test.go b/metricbeat/module/docker/image/image_integration_test.go index 591656810848..1dd56b6d177c 100644 --- a/metricbeat/module/docker/image/image_integration_test.go +++ b/metricbeat/module/docker/image/image_integration_test.go @@ -22,7 +22,7 @@ package image import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/info/data.go b/metricbeat/module/docker/info/data.go index 65d2738db6bc..6b3f2e628cf8 100644 --- a/metricbeat/module/docker/info/data.go +++ b/metricbeat/module/docker/info/data.go @@ -20,7 +20,7 @@ package info import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func eventMapping(info *types.Info) common.MapStr { diff --git a/metricbeat/module/docker/info/info.go b/metricbeat/module/docker/info/info.go index 5a6fd0f04efb..e4ea3765de70 100644 --- a/metricbeat/module/docker/info/info.go +++ b/metricbeat/module/docker/info/info.go @@ -22,8 +22,8 @@ import ( "github.com/docker/docker/client" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/info/info_integration_test.go b/metricbeat/module/docker/info/info_integration_test.go index 452651b142a8..3ec84b09128c 100644 --- a/metricbeat/module/docker/info/info_integration_test.go +++ b/metricbeat/module/docker/info/info_integration_test.go @@ -22,7 +22,7 @@ package info import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/memory/data.go b/metricbeat/module/docker/memory/data.go index 25737be8b351..0a418e48c5ba 100644 --- a/metricbeat/module/docker/memory/data.go +++ b/metricbeat/module/docker/memory/data.go @@ -18,8 +18,8 @@ package memory import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) func eventsMapping(r mb.ReporterV2, memoryDataList []MemoryData) { diff --git a/metricbeat/module/docker/memory/helper.go b/metricbeat/module/docker/memory/helper.go index 7c3b86845e0c..459c26cccebc 100644 --- a/metricbeat/module/docker/memory/helper.go +++ b/metricbeat/module/docker/memory/helper.go @@ -18,8 +18,8 @@ package memory import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) // MemoryData contains parsed container memory info diff --git a/metricbeat/module/docker/memory/memory.go b/metricbeat/module/docker/memory/memory.go index 8108b30d46ce..3a56adba57a7 100644 --- a/metricbeat/module/docker/memory/memory.go +++ b/metricbeat/module/docker/memory/memory.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/memory/memory_integration_test.go b/metricbeat/module/docker/memory/memory_integration_test.go index d751841c6b94..6d21e07eb728 100644 --- a/metricbeat/module/docker/memory/memory_integration_test.go +++ b/metricbeat/module/docker/memory/memory_integration_test.go @@ -22,7 +22,7 @@ package memory import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/docker/memory/memory_test.go b/metricbeat/module/docker/memory/memory_test.go index 05f742417a77..695e6770de12 100644 --- a/metricbeat/module/docker/memory/memory_test.go +++ b/metricbeat/module/docker/memory/memory_test.go @@ -25,9 +25,9 @@ import ( "github.com/docker/docker/api/types" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func TestMemoryService_GetMemoryStats(t *testing.T) { diff --git a/metricbeat/module/docker/network/data.go b/metricbeat/module/docker/network/data.go index 94567f08f390..b4a2b90c4056 100644 --- a/metricbeat/module/docker/network/data.go +++ b/metricbeat/module/docker/network/data.go @@ -18,8 +18,8 @@ package network import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) func eventsMapping(r mb.ReporterV2, netsStatsList []NetStats) { diff --git a/metricbeat/module/docker/network/helper.go b/metricbeat/module/docker/network/helper.go index 794574bace1b..0f980fc2ab94 100644 --- a/metricbeat/module/docker/network/helper.go +++ b/metricbeat/module/docker/network/helper.go @@ -22,7 +22,7 @@ import ( "github.com/docker/docker/api/types" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) type NetService struct { diff --git a/metricbeat/module/docker/network/network.go b/metricbeat/module/docker/network/network.go index 84cdd4d1c59b..04e67c954129 100644 --- a/metricbeat/module/docker/network/network.go +++ b/metricbeat/module/docker/network/network.go @@ -23,8 +23,8 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/docker" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/docker" ) func init() { diff --git a/metricbeat/module/docker/network/network_integration_test.go b/metricbeat/module/docker/network/network_integration_test.go index 015bf40a5faa..418d057e247a 100644 --- a/metricbeat/module/docker/network/network_integration_test.go +++ b/metricbeat/module/docker/network/network_integration_test.go @@ -22,7 +22,7 @@ package network import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/dropwizard/collector/collector.go b/metricbeat/module/dropwizard/collector/collector.go index dd1f922baf99..eb1f6439abaf 100644 --- a/metricbeat/module/dropwizard/collector/collector.go +++ b/metricbeat/module/dropwizard/collector/collector.go @@ -21,9 +21,9 @@ import ( "encoding/json" "strings" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/dropwizard/collector/collector_integration_test.go b/metricbeat/module/dropwizard/collector/collector_integration_test.go index fc09de69354d..470cabd18e83 100644 --- a/metricbeat/module/dropwizard/collector/collector_integration_test.go +++ b/metricbeat/module/dropwizard/collector/collector_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/dropwizard/collector/collector_test.go b/metricbeat/module/dropwizard/collector/collector_test.go index ff0e7a41e0d2..181b6e0812e0 100644 --- a/metricbeat/module/dropwizard/collector/collector_test.go +++ b/metricbeat/module/dropwizard/collector/collector_test.go @@ -22,9 +22,9 @@ package collector import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/dropwizard" + _ "github.com/elastic/beats/v7/metricbeat/module/dropwizard" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/dropwizard/collector/data.go b/metricbeat/module/dropwizard/collector/data.go index d191a35e4cff..59c8ad5a275b 100644 --- a/metricbeat/module/dropwizard/collector/data.go +++ b/metricbeat/module/dropwizard/collector/data.go @@ -21,7 +21,7 @@ import ( "encoding/json" "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type DropWizardEvent struct { diff --git a/metricbeat/module/dropwizard/collector/data_test.go b/metricbeat/module/dropwizard/collector/data_test.go index 959edd1df5ab..823b81b3131b 100644 --- a/metricbeat/module/dropwizard/collector/data_test.go +++ b/metricbeat/module/dropwizard/collector/data_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestSplitTagsFromMetricName(t *testing.T) { diff --git a/metricbeat/module/dropwizard/fields.go b/metricbeat/module/dropwizard/fields.go index 81235e54d5fe..3143c53ee41d 100644 --- a/metricbeat/module/dropwizard/fields.go +++ b/metricbeat/module/dropwizard/fields.go @@ -20,7 +20,7 @@ package dropwizard import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/elasticsearch/ccr/ccr.go b/metricbeat/module/elasticsearch/ccr/ccr.go index d67d3b01f3d4..20d5cc657796 100644 --- a/metricbeat/module/elasticsearch/ccr/ccr.go +++ b/metricbeat/module/elasticsearch/ccr/ccr.go @@ -20,13 +20,13 @@ package ccr import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func init() { diff --git a/metricbeat/module/elasticsearch/ccr/data.go b/metricbeat/module/elasticsearch/ccr/data.go index 748e42ca7033..8d7d11bffa39 100644 --- a/metricbeat/module/elasticsearch/ccr/data.go +++ b/metricbeat/module/elasticsearch/ccr/data.go @@ -23,11 +23,11 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/ccr/data_test.go b/metricbeat/module/elasticsearch/ccr/data_test.go index 45f7c89464fa..c75bcdda5044 100644 --- a/metricbeat/module/elasticsearch/ccr/data_test.go +++ b/metricbeat/module/elasticsearch/ccr/data_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var info = elasticsearch.Info{ diff --git a/metricbeat/module/elasticsearch/ccr/data_xpack.go b/metricbeat/module/elasticsearch/ccr/data_xpack.go index 990f5a4043f3..547397f18a0c 100644 --- a/metricbeat/module/elasticsearch/ccr/data_xpack.go +++ b/metricbeat/module/elasticsearch/ccr/data_xpack.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func eventsMappingXPack(r mb.ReporterV2, m *MetricSet, info elasticsearch.Info, content []byte) error { diff --git a/metricbeat/module/elasticsearch/cluster_stats/cluster_stats.go b/metricbeat/module/elasticsearch/cluster_stats/cluster_stats.go index d50def84528d..425ef0abacfc 100644 --- a/metricbeat/module/elasticsearch/cluster_stats/cluster_stats.go +++ b/metricbeat/module/elasticsearch/cluster_stats/cluster_stats.go @@ -20,8 +20,8 @@ package cluster_stats import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func init() { diff --git a/metricbeat/module/elasticsearch/cluster_stats/data.go b/metricbeat/module/elasticsearch/cluster_stats/data.go index 23c3cef1508d..281eb1410063 100644 --- a/metricbeat/module/elasticsearch/cluster_stats/data.go +++ b/metricbeat/module/elasticsearch/cluster_stats/data.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/cluster_stats/data_test.go b/metricbeat/module/elasticsearch/cluster_stats/data_test.go index 6a4c35ebad06..0078712d787e 100644 --- a/metricbeat/module/elasticsearch/cluster_stats/data_test.go +++ b/metricbeat/module/elasticsearch/cluster_stats/data_test.go @@ -22,7 +22,7 @@ package cluster_stats import ( "testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func TestMapper(t *testing.T) { diff --git a/metricbeat/module/elasticsearch/cluster_stats/data_xpack.go b/metricbeat/module/elasticsearch/cluster_stats/data_xpack.go index 0dacb45d56fb..37ec8018b0af 100644 --- a/metricbeat/module/elasticsearch/cluster_stats/data_xpack.go +++ b/metricbeat/module/elasticsearch/cluster_stats/data_xpack.go @@ -27,10 +27,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func clusterNeedsTLSEnabled(license *elasticsearch.License, stackStats common.MapStr) (bool, error) { diff --git a/metricbeat/module/elasticsearch/elasticsearch.go b/metricbeat/module/elasticsearch/elasticsearch.go index ca797c18402e..9698f6ce0037 100644 --- a/metricbeat/module/elasticsearch/elasticsearch.go +++ b/metricbeat/module/elasticsearch/elasticsearch.go @@ -25,13 +25,13 @@ import ( "sync" "time" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" ) func init() { diff --git a/metricbeat/module/elasticsearch/elasticsearch_integration_test.go b/metricbeat/module/elasticsearch/elasticsearch_integration_test.go index af75edb41ff4..ec302d68da88 100644 --- a/metricbeat/module/elasticsearch/elasticsearch_integration_test.go +++ b/metricbeat/module/elasticsearch/elasticsearch_integration_test.go @@ -32,21 +32,21 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - "github.com/elastic/beats/metricbeat/helper/elastic" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/ccr" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/cluster_stats" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/enrich" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/index" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/index_recovery" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/index_summary" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/ml_job" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/node" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/node_stats" - _ "github.com/elastic/beats/metricbeat/module/elasticsearch/shard" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/ccr" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/cluster_stats" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/enrich" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/index" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/index_recovery" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/index_summary" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/ml_job" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/node" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/node_stats" + _ "github.com/elastic/beats/v7/metricbeat/module/elasticsearch/shard" ) var metricSets = []string{ diff --git a/metricbeat/module/elasticsearch/enrich/data.go b/metricbeat/module/elasticsearch/enrich/data.go index cc4fb5a24eaf..722ff41d6c38 100644 --- a/metricbeat/module/elasticsearch/enrich/data.go +++ b/metricbeat/module/elasticsearch/enrich/data.go @@ -23,11 +23,11 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/enrich/data_test.go b/metricbeat/module/elasticsearch/enrich/data_test.go index 3d3f5f6017a3..3e7fcbb97341 100644 --- a/metricbeat/module/elasticsearch/enrich/data_test.go +++ b/metricbeat/module/elasticsearch/enrich/data_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var info = elasticsearch.Info{ diff --git a/metricbeat/module/elasticsearch/enrich/data_xpack.go b/metricbeat/module/elasticsearch/enrich/data_xpack.go index 6b3029f43612..39309fd79fca 100644 --- a/metricbeat/module/elasticsearch/enrich/data_xpack.go +++ b/metricbeat/module/elasticsearch/enrich/data_xpack.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func eventsMappingXPack(r mb.ReporterV2, m *MetricSet, info elasticsearch.Info, content []byte) error { diff --git a/metricbeat/module/elasticsearch/enrich/enrich.go b/metricbeat/module/elasticsearch/enrich/enrich.go index d2acf780b9ad..6b60394a23e8 100644 --- a/metricbeat/module/elasticsearch/enrich/enrich.go +++ b/metricbeat/module/elasticsearch/enrich/enrich.go @@ -22,10 +22,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func init() { diff --git a/metricbeat/module/elasticsearch/fields.go b/metricbeat/module/elasticsearch/fields.go index c107604bfb34..b08f0c8122cb 100644 --- a/metricbeat/module/elasticsearch/fields.go +++ b/metricbeat/module/elasticsearch/fields.go @@ -20,7 +20,7 @@ package elasticsearch import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/elasticsearch/index/data.go b/metricbeat/module/elasticsearch/index/data.go index 0d5bc4688dfb..d16d8ae21900 100644 --- a/metricbeat/module/elasticsearch/index/data.go +++ b/metricbeat/module/elasticsearch/index/data.go @@ -23,11 +23,11 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) type IndicesStruct struct { diff --git a/metricbeat/module/elasticsearch/index/data_test.go b/metricbeat/module/elasticsearch/index/data_test.go index 5040c7dac4f5..b0dd46cf96e1 100644 --- a/metricbeat/module/elasticsearch/index/data_test.go +++ b/metricbeat/module/elasticsearch/index/data_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var info = elasticsearch.Info{ diff --git a/metricbeat/module/elasticsearch/index/data_xpack.go b/metricbeat/module/elasticsearch/index/data_xpack.go index 2860d509d0b1..e70bf6adb764 100644 --- a/metricbeat/module/elasticsearch/index/data_xpack.go +++ b/metricbeat/module/elasticsearch/index/data_xpack.go @@ -26,12 +26,12 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/index/index.go b/metricbeat/module/elasticsearch/index/index.go index cdf7ddd02d82..6936b836b160 100644 --- a/metricbeat/module/elasticsearch/index/index.go +++ b/metricbeat/module/elasticsearch/index/index.go @@ -20,8 +20,8 @@ package index import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/elasticsearch/index_recovery/data.go b/metricbeat/module/elasticsearch/index_recovery/data.go index b71a4cecf46f..1aaa731bba1e 100644 --- a/metricbeat/module/elasticsearch/index_recovery/data.go +++ b/metricbeat/module/elasticsearch/index_recovery/data.go @@ -23,12 +23,12 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/index_recovery/data_test.go b/metricbeat/module/elasticsearch/index_recovery/data_test.go index c06e01ca23be..19194e3161d3 100644 --- a/metricbeat/module/elasticsearch/index_recovery/data_test.go +++ b/metricbeat/module/elasticsearch/index_recovery/data_test.go @@ -22,7 +22,7 @@ package index_recovery import ( "testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func TestMapper(t *testing.T) { diff --git a/metricbeat/module/elasticsearch/index_recovery/data_xpack.go b/metricbeat/module/elasticsearch/index_recovery/data_xpack.go index bbef1654a84c..e8bbc3dcad5d 100644 --- a/metricbeat/module/elasticsearch/index_recovery/data_xpack.go +++ b/metricbeat/module/elasticsearch/index_recovery/data_xpack.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func eventsMappingXPack(r mb.ReporterV2, m *MetricSet, info elasticsearch.Info, content []byte) error { diff --git a/metricbeat/module/elasticsearch/index_recovery/index_recovery.go b/metricbeat/module/elasticsearch/index_recovery/index_recovery.go index 86ed23adc00b..68d1ee295d34 100644 --- a/metricbeat/module/elasticsearch/index_recovery/index_recovery.go +++ b/metricbeat/module/elasticsearch/index_recovery/index_recovery.go @@ -20,8 +20,8 @@ package index_recovery import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func init() { diff --git a/metricbeat/module/elasticsearch/index_summary/data.go b/metricbeat/module/elasticsearch/index_summary/data.go index 8335f2cf018b..fe75162bf737 100644 --- a/metricbeat/module/elasticsearch/index_summary/data.go +++ b/metricbeat/module/elasticsearch/index_summary/data.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/index_summary/data_test.go b/metricbeat/module/elasticsearch/index_summary/data_test.go index 57bd8a43b28a..e96c72bce309 100644 --- a/metricbeat/module/elasticsearch/index_summary/data_test.go +++ b/metricbeat/module/elasticsearch/index_summary/data_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var info = elasticsearch.Info{ diff --git a/metricbeat/module/elasticsearch/index_summary/data_xpack.go b/metricbeat/module/elasticsearch/index_summary/data_xpack.go index 8cf8a5a7b06c..d1e00ea64b86 100644 --- a/metricbeat/module/elasticsearch/index_summary/data_xpack.go +++ b/metricbeat/module/elasticsearch/index_summary/data_xpack.go @@ -24,12 +24,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/index_summary/index_summary.go b/metricbeat/module/elasticsearch/index_summary/index_summary.go index 527e796ca5d2..569e23492cb3 100644 --- a/metricbeat/module/elasticsearch/index_summary/index_summary.go +++ b/metricbeat/module/elasticsearch/index_summary/index_summary.go @@ -20,9 +20,9 @@ package index_summary import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/elasticsearch/metricset.go b/metricbeat/module/elasticsearch/metricset.go index 7477337adf76..c1daae4f577c 100644 --- a/metricbeat/module/elasticsearch/metricset.go +++ b/metricbeat/module/elasticsearch/metricset.go @@ -18,9 +18,9 @@ package elasticsearch import ( - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/elasticsearch/ml_job/data.go b/metricbeat/module/elasticsearch/ml_job/data.go index 9f8fe74a1c87..b914a4bd5647 100644 --- a/metricbeat/module/elasticsearch/ml_job/data.go +++ b/metricbeat/module/elasticsearch/ml_job/data.go @@ -23,11 +23,11 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/ml_job/data_test.go b/metricbeat/module/elasticsearch/ml_job/data_test.go index b6081642b9f4..07198d996fcb 100644 --- a/metricbeat/module/elasticsearch/ml_job/data_test.go +++ b/metricbeat/module/elasticsearch/ml_job/data_test.go @@ -22,7 +22,7 @@ package ml_job import ( "testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func TestMapper(t *testing.T) { diff --git a/metricbeat/module/elasticsearch/ml_job/data_xpack.go b/metricbeat/module/elasticsearch/ml_job/data_xpack.go index 79e0703dff8c..04c4cec29332 100644 --- a/metricbeat/module/elasticsearch/ml_job/data_xpack.go +++ b/metricbeat/module/elasticsearch/ml_job/data_xpack.go @@ -25,10 +25,10 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func eventsMappingXPack(r mb.ReporterV2, m *MetricSet, info elasticsearch.Info, content []byte) error { diff --git a/metricbeat/module/elasticsearch/ml_job/ml_job.go b/metricbeat/module/elasticsearch/ml_job/ml_job.go index f6eac74f17e2..506b1fade852 100644 --- a/metricbeat/module/elasticsearch/ml_job/ml_job.go +++ b/metricbeat/module/elasticsearch/ml_job/ml_job.go @@ -20,8 +20,8 @@ package ml_job import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func init() { diff --git a/metricbeat/module/elasticsearch/node/data.go b/metricbeat/module/elasticsearch/node/data.go index 0670edfbcc75..56acc36752a5 100644 --- a/metricbeat/module/elasticsearch/node/data.go +++ b/metricbeat/module/elasticsearch/node/data.go @@ -23,11 +23,11 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/node/data_test.go b/metricbeat/module/elasticsearch/node/data_test.go index 9921a16fe08d..2d45181d48b4 100644 --- a/metricbeat/module/elasticsearch/node/data_test.go +++ b/metricbeat/module/elasticsearch/node/data_test.go @@ -25,9 +25,9 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var info = elasticsearch.Info{ diff --git a/metricbeat/module/elasticsearch/node/node.go b/metricbeat/module/elasticsearch/node/node.go index 17337553ce66..29587a1dd3e8 100644 --- a/metricbeat/module/elasticsearch/node/node.go +++ b/metricbeat/module/elasticsearch/node/node.go @@ -20,9 +20,9 @@ package node import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/elasticsearch/node/node_test.go b/metricbeat/module/elasticsearch/node/node_test.go index ca41c7b935fc..0b843fc04778 100644 --- a/metricbeat/module/elasticsearch/node/node_test.go +++ b/metricbeat/module/elasticsearch/node/node_test.go @@ -28,8 +28,8 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/elasticsearch/node_stats/data.go b/metricbeat/module/elasticsearch/node_stats/data.go index 94b6b965c2d6..4e860d0b52e6 100644 --- a/metricbeat/module/elasticsearch/node_stats/data.go +++ b/metricbeat/module/elasticsearch/node_stats/data.go @@ -21,16 +21,16 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/node_stats/data_test.go b/metricbeat/module/elasticsearch/node_stats/data_test.go index 670b67cf2891..043a1447f253 100644 --- a/metricbeat/module/elasticsearch/node_stats/data_test.go +++ b/metricbeat/module/elasticsearch/node_stats/data_test.go @@ -22,7 +22,7 @@ package node_stats import ( "testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func TestStats(t *testing.T) { diff --git a/metricbeat/module/elasticsearch/node_stats/data_xpack.go b/metricbeat/module/elasticsearch/node_stats/data_xpack.go index 4f0b34269eb3..f7f612b11eef 100644 --- a/metricbeat/module/elasticsearch/node_stats/data_xpack.go +++ b/metricbeat/module/elasticsearch/node_stats/data_xpack.go @@ -25,12 +25,12 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/node_stats/node_stats.go b/metricbeat/module/elasticsearch/node_stats/node_stats.go index 53dc8a6fd0c4..7498948fd76a 100644 --- a/metricbeat/module/elasticsearch/node_stats/node_stats.go +++ b/metricbeat/module/elasticsearch/node_stats/node_stats.go @@ -18,8 +18,8 @@ package node_stats import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/elasticsearch/pending_tasks/data.go b/metricbeat/module/elasticsearch/pending_tasks/data.go index 9a44852d7a9d..0f414750bd65 100644 --- a/metricbeat/module/elasticsearch/pending_tasks/data.go +++ b/metricbeat/module/elasticsearch/pending_tasks/data.go @@ -23,12 +23,12 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/pending_tasks/data_test.go b/metricbeat/module/elasticsearch/pending_tasks/data_test.go index 3d2cbfeefd2a..e38c202386cb 100644 --- a/metricbeat/module/elasticsearch/pending_tasks/data_test.go +++ b/metricbeat/module/elasticsearch/pending_tasks/data_test.go @@ -27,10 +27,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var info = elasticsearch.Info{ diff --git a/metricbeat/module/elasticsearch/pending_tasks/pending_tasks.go b/metricbeat/module/elasticsearch/pending_tasks/pending_tasks.go index 1dabb03da99b..01f11e763185 100644 --- a/metricbeat/module/elasticsearch/pending_tasks/pending_tasks.go +++ b/metricbeat/module/elasticsearch/pending_tasks/pending_tasks.go @@ -20,8 +20,8 @@ package pending_tasks import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/elasticsearch/shard/data.go b/metricbeat/module/elasticsearch/shard/data.go index b601aa3449fa..73486638f1b5 100644 --- a/metricbeat/module/elasticsearch/shard/data.go +++ b/metricbeat/module/elasticsearch/shard/data.go @@ -23,11 +23,11 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) var ( diff --git a/metricbeat/module/elasticsearch/shard/data_test.go b/metricbeat/module/elasticsearch/shard/data_test.go index 35b854688762..377b73617f35 100644 --- a/metricbeat/module/elasticsearch/shard/data_test.go +++ b/metricbeat/module/elasticsearch/shard/data_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestStats(t *testing.T) { diff --git a/metricbeat/module/elasticsearch/shard/data_xpack.go b/metricbeat/module/elasticsearch/shard/data_xpack.go index bf7b443fd599..30e0e92b4dc7 100644 --- a/metricbeat/module/elasticsearch/shard/data_xpack.go +++ b/metricbeat/module/elasticsearch/shard/data_xpack.go @@ -25,10 +25,10 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func eventsMappingXPack(r mb.ReporterV2, m *MetricSet, content []byte) error { diff --git a/metricbeat/module/elasticsearch/shard/shard.go b/metricbeat/module/elasticsearch/shard/shard.go index 43c032170c35..fa46777dffde 100644 --- a/metricbeat/module/elasticsearch/shard/shard.go +++ b/metricbeat/module/elasticsearch/shard/shard.go @@ -20,8 +20,8 @@ package shard import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/elasticsearch" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/elasticsearch" ) func init() { diff --git a/metricbeat/module/elasticsearch/testing.go b/metricbeat/module/elasticsearch/testing.go index 4ea87c120bdd..a68685dd62d3 100644 --- a/metricbeat/module/elasticsearch/testing.go +++ b/metricbeat/module/elasticsearch/testing.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) // TestMapper tests mapping methods diff --git a/metricbeat/module/envoyproxy/fields.go b/metricbeat/module/envoyproxy/fields.go index a9bde3cc50b0..06afeacdf12e 100644 --- a/metricbeat/module/envoyproxy/fields.go +++ b/metricbeat/module/envoyproxy/fields.go @@ -20,7 +20,7 @@ package envoyproxy import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/envoyproxy/server/data.go b/metricbeat/module/envoyproxy/server/data.go index 37db7e0405f1..850d8c53914d 100644 --- a/metricbeat/module/envoyproxy/server/data.go +++ b/metricbeat/module/envoyproxy/server/data.go @@ -21,9 +21,9 @@ import ( "regexp" "strings" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var ( diff --git a/metricbeat/module/envoyproxy/server/server.go b/metricbeat/module/envoyproxy/server/server.go index 4ae21ba062af..b37cd6dbcfd8 100644 --- a/metricbeat/module/envoyproxy/server/server.go +++ b/metricbeat/module/envoyproxy/server/server.go @@ -20,9 +20,9 @@ package server import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/envoyproxy/server/server_integration_test.go b/metricbeat/module/envoyproxy/server/server_integration_test.go index b7d8a235a8e6..24e331be8c01 100644 --- a/metricbeat/module/envoyproxy/server/server_integration_test.go +++ b/metricbeat/module/envoyproxy/server/server_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/envoyproxy/server/server_test.go b/metricbeat/module/envoyproxy/server/server_test.go index 4f0e3d43516d..c4f8eb775949 100644 --- a/metricbeat/module/envoyproxy/server/server_test.go +++ b/metricbeat/module/envoyproxy/server/server_test.go @@ -26,8 +26,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/etcd/fields.go b/metricbeat/module/etcd/fields.go index a5007b95794f..b2d735b99088 100644 --- a/metricbeat/module/etcd/fields.go +++ b/metricbeat/module/etcd/fields.go @@ -20,7 +20,7 @@ package etcd import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/etcd/leader/data.go b/metricbeat/module/etcd/leader/data.go index e2f2f6ed2bea..15322921b37a 100644 --- a/metricbeat/module/etcd/leader/data.go +++ b/metricbeat/module/etcd/leader/data.go @@ -20,7 +20,7 @@ package leader import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type Counts struct { diff --git a/metricbeat/module/etcd/leader/leader.go b/metricbeat/module/etcd/leader/leader.go index 16a635554109..940be4a0f795 100644 --- a/metricbeat/module/etcd/leader/leader.go +++ b/metricbeat/module/etcd/leader/leader.go @@ -25,12 +25,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/etcd/leader/leader_integration_test.go b/metricbeat/module/etcd/leader/leader_integration_test.go index cc6aaf29dee4..fb8814410457 100644 --- a/metricbeat/module/etcd/leader/leader_integration_test.go +++ b/metricbeat/module/etcd/leader/leader_integration_test.go @@ -24,10 +24,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/etcd/leader/leader_test.go b/metricbeat/module/etcd/leader/leader_test.go index 31dfa2e718ea..7fd42c3038a3 100644 --- a/metricbeat/module/etcd/leader/leader_test.go +++ b/metricbeat/module/etcd/leader/leader_test.go @@ -28,7 +28,7 @@ import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/etcd/metrics/metrics.go b/metricbeat/module/etcd/metrics/metrics.go index ce4e9591338b..e6c2c1fe96be 100644 --- a/metricbeat/module/etcd/metrics/metrics.go +++ b/metricbeat/module/etcd/metrics/metrics.go @@ -18,8 +18,8 @@ package metrics import ( - "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/etcd/metrics/metrics_integration_test.go b/metricbeat/module/etcd/metrics/metrics_integration_test.go index ff323c59b695..2faa820a7446 100644 --- a/metricbeat/module/etcd/metrics/metrics_integration_test.go +++ b/metricbeat/module/etcd/metrics/metrics_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/etcd/metrics/metrics_test.go b/metricbeat/module/etcd/metrics/metrics_test.go index 68198bdf49a2..9be6c8b95f3a 100644 --- a/metricbeat/module/etcd/metrics/metrics_test.go +++ b/metricbeat/module/etcd/metrics/metrics_test.go @@ -22,10 +22,10 @@ package metrics import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/etcd" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/etcd" ) const testFile = "_meta/test/metrics" diff --git a/metricbeat/module/etcd/self/data.go b/metricbeat/module/etcd/self/data.go index e6c655c1c2bc..fd3bfe23e05d 100644 --- a/metricbeat/module/etcd/self/data.go +++ b/metricbeat/module/etcd/self/data.go @@ -20,7 +20,7 @@ package self import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type LeaderInfo struct { diff --git a/metricbeat/module/etcd/self/self.go b/metricbeat/module/etcd/self/self.go index 39e42d32e0a6..30f649db4c8c 100644 --- a/metricbeat/module/etcd/self/self.go +++ b/metricbeat/module/etcd/self/self.go @@ -20,10 +20,10 @@ package self import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/etcd/self/self_integration_test.go b/metricbeat/module/etcd/self/self_integration_test.go index d83057859061..dfbfff22f154 100644 --- a/metricbeat/module/etcd/self/self_integration_test.go +++ b/metricbeat/module/etcd/self/self_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/etcd/self/self_test.go b/metricbeat/module/etcd/self/self_test.go index 2640107659cf..9d1b8f2d2664 100644 --- a/metricbeat/module/etcd/self/self_test.go +++ b/metricbeat/module/etcd/self/self_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "testing" ) diff --git a/metricbeat/module/etcd/store/data.go b/metricbeat/module/etcd/store/data.go index 202fcefea685..de8271d6f201 100644 --- a/metricbeat/module/etcd/store/data.go +++ b/metricbeat/module/etcd/store/data.go @@ -20,10 +20,10 @@ package store import ( "encoding/json" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/etcd/store/store.go b/metricbeat/module/etcd/store/store.go index 513cf2f42882..44baaf873fde 100644 --- a/metricbeat/module/etcd/store/store.go +++ b/metricbeat/module/etcd/store/store.go @@ -20,10 +20,10 @@ package store import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/etcd/store/store_integration_test.go b/metricbeat/module/etcd/store/store_integration_test.go index 20e954031289..ad455c4eafba 100644 --- a/metricbeat/module/etcd/store/store_integration_test.go +++ b/metricbeat/module/etcd/store/store_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/etcd/store/store_test.go b/metricbeat/module/etcd/store/store_test.go index 7d0353280fc7..cb1173e3eb4c 100644 --- a/metricbeat/module/etcd/store/store_test.go +++ b/metricbeat/module/etcd/store/store_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "testing" ) diff --git a/metricbeat/module/golang/expvar/expvar.go b/metricbeat/module/golang/expvar/expvar.go index 78fdbc0ff7b4..bf026f3f50ed 100644 --- a/metricbeat/module/golang/expvar/expvar.go +++ b/metricbeat/module/golang/expvar/expvar.go @@ -20,10 +20,10 @@ package expvar import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/golang" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/golang" ) const ( diff --git a/metricbeat/module/golang/expvar/expvar_integration_test.go b/metricbeat/module/golang/expvar/expvar_integration_test.go index a16b97fab42b..2e722225cbde 100644 --- a/metricbeat/module/golang/expvar/expvar_integration_test.go +++ b/metricbeat/module/golang/expvar/expvar_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/golang/fields.go b/metricbeat/module/golang/fields.go index 5f4b47833d74..3a81eac50236 100644 --- a/metricbeat/module/golang/fields.go +++ b/metricbeat/module/golang/fields.go @@ -20,7 +20,7 @@ package golang import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/golang/heap/data.go b/metricbeat/module/golang/heap/data.go index 8e6134d4879b..ad052e4348eb 100644 --- a/metricbeat/module/golang/heap/data.go +++ b/metricbeat/module/golang/heap/data.go @@ -20,8 +20,8 @@ package heap import ( "runtime" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/golang" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/golang" ) //Stats contains the memory info that we get from the fetch request diff --git a/metricbeat/module/golang/heap/heap.go b/metricbeat/module/golang/heap/heap.go index 206f84dd56d1..e30142b6c916 100644 --- a/metricbeat/module/golang/heap/heap.go +++ b/metricbeat/module/golang/heap/heap.go @@ -22,10 +22,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) var logger = logp.NewLogger("golang.heap") diff --git a/metricbeat/module/golang/heap/heap_integration_test.go b/metricbeat/module/golang/heap/heap_integration_test.go index 11fcff59ec1d..8214a11c686e 100644 --- a/metricbeat/module/golang/heap/heap_integration_test.go +++ b/metricbeat/module/golang/heap/heap_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/golang/util.go b/metricbeat/module/golang/util.go index 18a118d956bf..db04ae7e01ef 100644 --- a/metricbeat/module/golang/util.go +++ b/metricbeat/module/golang/util.go @@ -21,7 +21,7 @@ import ( "bytes" "strings" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) /** diff --git a/metricbeat/module/graphite/fields.go b/metricbeat/module/graphite/fields.go index c46a6148ef2b..a4845943868d 100644 --- a/metricbeat/module/graphite/fields.go +++ b/metricbeat/module/graphite/fields.go @@ -20,7 +20,7 @@ package graphite import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/graphite/server/data.go b/metricbeat/module/graphite/server/data.go index 6e6c164ea681..df6fb7ee515b 100644 --- a/metricbeat/module/graphite/server/data.go +++ b/metricbeat/module/graphite/server/data.go @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) type template struct { diff --git a/metricbeat/module/graphite/server/data_test.go b/metricbeat/module/graphite/server/data_test.go index 813b7e58805d..a29dbccf426d 100644 --- a/metricbeat/module/graphite/server/data_test.go +++ b/metricbeat/module/graphite/server/data_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func GetMetricProcessor() *metricProcessor { diff --git a/metricbeat/module/graphite/server/server.go b/metricbeat/module/graphite/server/server.go index 43007faac45f..cf29141c6835 100644 --- a/metricbeat/module/graphite/server/server.go +++ b/metricbeat/module/graphite/server/server.go @@ -20,11 +20,11 @@ package server import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - serverhelper "github.com/elastic/beats/metricbeat/helper/server" - "github.com/elastic/beats/metricbeat/helper/server/tcp" - "github.com/elastic/beats/metricbeat/helper/server/udp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/logp" + serverhelper "github.com/elastic/beats/v7/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/helper/server/tcp" + "github.com/elastic/beats/v7/metricbeat/helper/server/udp" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/haproxy/fields.go b/metricbeat/module/haproxy/fields.go index 1bee67c59051..531515409dc0 100644 --- a/metricbeat/module/haproxy/fields.go +++ b/metricbeat/module/haproxy/fields.go @@ -20,7 +20,7 @@ package haproxy import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/haproxy/haproxy.go b/metricbeat/module/haproxy/haproxy.go index b10fd522ee38..390c5a737e85 100644 --- a/metricbeat/module/haproxy/haproxy.go +++ b/metricbeat/module/haproxy/haproxy.go @@ -30,9 +30,9 @@ import ( "github.com/mitchellh/mapstructure" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) // HostParser is used for parsing the configured HAProxy hosts. diff --git a/metricbeat/module/haproxy/haproxy_test.go b/metricbeat/module/haproxy/haproxy_test.go index 149b89ecd90f..0eb921ccd3b6 100644 --- a/metricbeat/module/haproxy/haproxy_test.go +++ b/metricbeat/module/haproxy/haproxy_test.go @@ -20,7 +20,7 @@ package haproxy import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/haproxy/info/data.go b/metricbeat/module/haproxy/info/data.go index c66c90542de4..1503945cb447 100644 --- a/metricbeat/module/haproxy/info/data.go +++ b/metricbeat/module/haproxy/info/data.go @@ -20,11 +20,11 @@ package info import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/haproxy" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/haproxy" "reflect" "strconv" diff --git a/metricbeat/module/haproxy/info/info.go b/metricbeat/module/haproxy/info/info.go index 4e873b1a6e6d..1ddb13418911 100644 --- a/metricbeat/module/haproxy/info/info.go +++ b/metricbeat/module/haproxy/info/info.go @@ -20,10 +20,10 @@ package info import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/haproxy" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/haproxy" ) const ( diff --git a/metricbeat/module/haproxy/info/info_integration_test.go b/metricbeat/module/haproxy/info/info_integration_test.go index 209f3051f7db..aaa653e9791a 100644 --- a/metricbeat/module/haproxy/info/info_integration_test.go +++ b/metricbeat/module/haproxy/info/info_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/haproxy/stat/data.go b/metricbeat/module/haproxy/stat/data.go index 7a92d9ceb34b..5911180be4fb 100644 --- a/metricbeat/module/haproxy/stat/data.go +++ b/metricbeat/module/haproxy/stat/data.go @@ -20,11 +20,11 @@ package stat import ( "reflect" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/haproxy" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/haproxy" ) var ( diff --git a/metricbeat/module/haproxy/stat/stat.go b/metricbeat/module/haproxy/stat/stat.go index 15f6b61b27a2..692cd0f6a3b2 100644 --- a/metricbeat/module/haproxy/stat/stat.go +++ b/metricbeat/module/haproxy/stat/stat.go @@ -20,9 +20,9 @@ package stat import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/haproxy" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/haproxy" ) const ( diff --git a/metricbeat/module/haproxy/stat/stat_integration_test.go b/metricbeat/module/haproxy/stat/stat_integration_test.go index f50cd7b6f6c9..8edeece69cf7 100644 --- a/metricbeat/module/haproxy/stat/stat_integration_test.go +++ b/metricbeat/module/haproxy/stat/stat_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/http/fields.go b/metricbeat/module/http/fields.go index 68862c3e815a..d8c94f37f071 100644 --- a/metricbeat/module/http/fields.go +++ b/metricbeat/module/http/fields.go @@ -20,7 +20,7 @@ package http import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/http/json/data.go b/metricbeat/module/http/json/data.go index 235baf6cd145..feabe8657f57 100644 --- a/metricbeat/module/http/json/data.go +++ b/metricbeat/module/http/json/data.go @@ -22,8 +22,8 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) func (m *MetricSet) processBody(response *http.Response, jsonBody interface{}) mb.Event { diff --git a/metricbeat/module/http/json/json.go b/metricbeat/module/http/json/json.go index fdfdf500a031..7803efe2f1e9 100644 --- a/metricbeat/module/http/json/json.go +++ b/metricbeat/module/http/json/json.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/http/json/json_integration_test.go b/metricbeat/module/http/json/json_integration_test.go index 4f0645001e2d..597dca2c9b6a 100644 --- a/metricbeat/module/http/json/json_integration_test.go +++ b/metricbeat/module/http/json/json_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetchObject(t *testing.T) { diff --git a/metricbeat/module/http/json/json_test.go b/metricbeat/module/http/json/json_test.go index b8f21b4ae9e7..c39503e84708 100644 --- a/metricbeat/module/http/json/json_test.go +++ b/metricbeat/module/http/json/json_test.go @@ -22,9 +22,9 @@ package json import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/http" + _ "github.com/elastic/beats/v7/metricbeat/module/http" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/http/server/config.go b/metricbeat/module/http/server/config.go index cb601fc74f0c..065001b06dfc 100644 --- a/metricbeat/module/http/server/config.go +++ b/metricbeat/module/http/server/config.go @@ -20,7 +20,7 @@ package server import ( "errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type HttpServerConfig struct { diff --git a/metricbeat/module/http/server/data.go b/metricbeat/module/http/server/data.go index b3c4d6655b65..a65c95e3cae1 100644 --- a/metricbeat/module/http/server/data.go +++ b/metricbeat/module/http/server/data.go @@ -24,9 +24,9 @@ import ( "strings" "sync" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/server" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/mb" ) type metricProcessor struct { diff --git a/metricbeat/module/http/server/data_test.go b/metricbeat/module/http/server/data_test.go index 94ab3024e132..b4ef1be5e1a9 100644 --- a/metricbeat/module/http/server/data_test.go +++ b/metricbeat/module/http/server/data_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func GetMetricProcessor() *metricProcessor { diff --git a/metricbeat/module/http/server/server.go b/metricbeat/module/http/server/server.go index ab16bd060a97..a22857dfbcec 100644 --- a/metricbeat/module/http/server/server.go +++ b/metricbeat/module/http/server/server.go @@ -20,9 +20,9 @@ package server import ( "fmt" - serverhelper "github.com/elastic/beats/metricbeat/helper/server" - "github.com/elastic/beats/metricbeat/helper/server/http" - "github.com/elastic/beats/metricbeat/mb" + serverhelper "github.com/elastic/beats/v7/metricbeat/helper/server" + "github.com/elastic/beats/v7/metricbeat/helper/server/http" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/iis/application_pool/application_pool.go b/metricbeat/module/iis/application_pool/application_pool.go index 913ac03eea1f..aa469788074c 100644 --- a/metricbeat/module/iis/application_pool/application_pool.go +++ b/metricbeat/module/iis/application_pool/application_pool.go @@ -22,9 +22,9 @@ package application_pool import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/iis/application_pool/application_pool_test.go b/metricbeat/module/iis/application_pool/application_pool_test.go index f118d135c1f2..bbc94b23416a 100644 --- a/metricbeat/module/iis/application_pool/application_pool_test.go +++ b/metricbeat/module/iis/application_pool/application_pool_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestMetricsetNoErrors(t *testing.T) { diff --git a/metricbeat/module/iis/application_pool/reader.go b/metricbeat/module/iis/application_pool/reader.go index 11651d5e510b..d471e7b74561 100644 --- a/metricbeat/module/iis/application_pool/reader.go +++ b/metricbeat/module/iis/application_pool/reader.go @@ -26,10 +26,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper/windows/pdh" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper/windows/pdh" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Reader strucr will contain the pdh query and config options diff --git a/metricbeat/module/iis/application_pool/reader_test.go b/metricbeat/module/iis/application_pool/reader_test.go index 3fddd416dd98..f112e4431dc2 100644 --- a/metricbeat/module/iis/application_pool/reader_test.go +++ b/metricbeat/module/iis/application_pool/reader_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/metricbeat/helper/windows/pdh" + "github.com/elastic/beats/v7/metricbeat/helper/windows/pdh" ) // TestNewReaderValid should successfully instantiate the reader. diff --git a/metricbeat/module/iis/fields.go b/metricbeat/module/iis/fields.go index 20cec62b75e3..eeed74947c20 100644 --- a/metricbeat/module/iis/fields.go +++ b/metricbeat/module/iis/fields.go @@ -20,7 +20,7 @@ package iis import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/iis/webserver/webserver_integration_test.go b/metricbeat/module/iis/webserver/webserver_integration_test.go index 643b883bd835..5e775beb0b5b 100644 --- a/metricbeat/module/iis/webserver/webserver_integration_test.go +++ b/metricbeat/module/iis/webserver/webserver_integration_test.go @@ -25,11 +25,11 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/windows" - _ "github.com/elastic/beats/metricbeat/module/windows/perfmon" + _ "github.com/elastic/beats/v7/metricbeat/module/windows" + _ "github.com/elastic/beats/v7/metricbeat/module/windows/perfmon" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/iis/webserver/webserver_test.go b/metricbeat/module/iis/webserver/webserver_test.go index 4d639aadbe55..fa82f1ff181e 100644 --- a/metricbeat/module/iis/webserver/webserver_test.go +++ b/metricbeat/module/iis/webserver/webserver_test.go @@ -22,7 +22,7 @@ package webserver import ( "os" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/iis/website/website_integration_test.go b/metricbeat/module/iis/website/website_integration_test.go index 3b8bea6a5f37..7372dab47c00 100644 --- a/metricbeat/module/iis/website/website_integration_test.go +++ b/metricbeat/module/iis/website/website_integration_test.go @@ -25,11 +25,11 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/windows" - _ "github.com/elastic/beats/metricbeat/module/windows/perfmon" + _ "github.com/elastic/beats/v7/metricbeat/module/windows" + _ "github.com/elastic/beats/v7/metricbeat/module/windows/perfmon" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/iis/website/website_test.go b/metricbeat/module/iis/website/website_test.go index f9618fa3bfbb..10d5d27cce6d 100644 --- a/metricbeat/module/iis/website/website_test.go +++ b/metricbeat/module/iis/website/website_test.go @@ -22,7 +22,7 @@ package website import ( "os" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/jolokia/fields.go b/metricbeat/module/jolokia/fields.go index 62f2b0fd69ba..241a0320e411 100644 --- a/metricbeat/module/jolokia/fields.go +++ b/metricbeat/module/jolokia/fields.go @@ -20,7 +20,7 @@ package jolokia import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/jolokia/jmx/config.go b/metricbeat/module/jolokia/jmx/config.go index 60b9a60ff631..4925ee6a2937 100644 --- a/metricbeat/module/jolokia/jmx/config.go +++ b/metricbeat/module/jolokia/jmx/config.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type JMXMapping struct { diff --git a/metricbeat/module/jolokia/jmx/data.go b/metricbeat/module/jolokia/jmx/data.go index 2ce2c73a8627..b7e0913fec95 100644 --- a/metricbeat/module/jolokia/jmx/data.go +++ b/metricbeat/module/jolokia/jmx/data.go @@ -23,8 +23,8 @@ import ( "github.com/joeshaw/multierror" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/metricbeat/module/jolokia/jmx/data_test.go b/metricbeat/module/jolokia/jmx/data_test.go index 2fa8dd1429e9..b9b3c9d5275a 100644 --- a/metricbeat/module/jolokia/jmx/data_test.go +++ b/metricbeat/module/jolokia/jmx/data_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestEventMapper(t *testing.T) { diff --git a/metricbeat/module/jolokia/jmx/jmx.go b/metricbeat/module/jolokia/jmx/jmx.go index 187be18128a1..909a0db21665 100644 --- a/metricbeat/module/jolokia/jmx/jmx.go +++ b/metricbeat/module/jolokia/jmx/jmx.go @@ -18,12 +18,12 @@ package jmx import ( - "github.com/elastic/beats/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/helper" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) var ( diff --git a/metricbeat/module/jolokia/jmx/jmx_integration_test.go b/metricbeat/module/jolokia/jmx/jmx_integration_test.go index 3fe9c31f3d75..407ecd9f9700 100644 --- a/metricbeat/module/jolokia/jmx/jmx_integration_test.go +++ b/metricbeat/module/jolokia/jmx/jmx_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/kafka/broker.go b/metricbeat/module/kafka/broker.go index fa61b2dc0c51..b9e78c7dacc2 100644 --- a/metricbeat/module/kafka/broker.go +++ b/metricbeat/module/kafka/broker.go @@ -30,8 +30,8 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kafka" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kafka" ) // Version returns a kafka version from its string representation diff --git a/metricbeat/module/kafka/broker/broker_integration_test.go b/metricbeat/module/kafka/broker/broker_integration_test.go index decbe5c50c99..ed16252d3d52 100644 --- a/metricbeat/module/kafka/broker/broker_integration_test.go +++ b/metricbeat/module/kafka/broker/broker_integration_test.go @@ -25,12 +25,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/kafka/broker/broker_test.go b/metricbeat/module/kafka/broker/broker_test.go index baa751cafd06..a863a28e2e66 100644 --- a/metricbeat/module/kafka/broker/broker_test.go +++ b/metricbeat/module/kafka/broker/broker_test.go @@ -20,10 +20,10 @@ package broker import ( "os" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" ) func init() { diff --git a/metricbeat/module/kafka/config.go b/metricbeat/module/kafka/config.go index f3a9ae829fb1..8d42af9982b6 100644 --- a/metricbeat/module/kafka/config.go +++ b/metricbeat/module/kafka/config.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" ) type metricsetConfig struct { diff --git a/metricbeat/module/kafka/consumer/consumer_integration_test.go b/metricbeat/module/kafka/consumer/consumer_integration_test.go index c36555426f0f..aa4dd6d4dcc6 100644 --- a/metricbeat/module/kafka/consumer/consumer_integration_test.go +++ b/metricbeat/module/kafka/consumer/consumer_integration_test.go @@ -25,12 +25,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/kafka/consumer/consumer_test.go b/metricbeat/module/kafka/consumer/consumer_test.go index e3dd80155668..eafda045d0d4 100644 --- a/metricbeat/module/kafka/consumer/consumer_test.go +++ b/metricbeat/module/kafka/consumer/consumer_test.go @@ -20,10 +20,10 @@ package consumer import ( "os" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" ) func init() { diff --git a/metricbeat/module/kafka/consumergroup/consumergroup.go b/metricbeat/module/kafka/consumergroup/consumergroup.go index 045276ed9d5b..25c0205a9f3b 100644 --- a/metricbeat/module/kafka/consumergroup/consumergroup.go +++ b/metricbeat/module/kafka/consumergroup/consumergroup.go @@ -22,10 +22,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kafka" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kafka" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/kafka/consumergroup/consumergroup_integration_test.go b/metricbeat/module/kafka/consumergroup/consumergroup_integration_test.go index a30b5d108282..ee2ca076e231 100644 --- a/metricbeat/module/kafka/consumergroup/consumergroup_integration_test.go +++ b/metricbeat/module/kafka/consumergroup/consumergroup_integration_test.go @@ -27,9 +27,9 @@ import ( saramacluster "github.com/bsm/sarama-cluster" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/tests/compose" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) const ( diff --git a/metricbeat/module/kafka/consumergroup/mock_test.go b/metricbeat/module/kafka/consumergroup/mock_test.go index 030af091bff5..e25abf46a075 100644 --- a/metricbeat/module/kafka/consumergroup/mock_test.go +++ b/metricbeat/module/kafka/consumergroup/mock_test.go @@ -23,7 +23,7 @@ import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/metricbeat/module/kafka" + "github.com/elastic/beats/v7/metricbeat/module/kafka" ) type mockClient struct { diff --git a/metricbeat/module/kafka/consumergroup/query.go b/metricbeat/module/kafka/consumergroup/query.go index 8b9b98e3ec0b..cb200db83b50 100644 --- a/metricbeat/module/kafka/consumergroup/query.go +++ b/metricbeat/module/kafka/consumergroup/query.go @@ -20,9 +20,9 @@ package consumergroup import ( "github.com/Shopify/sarama" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/module/kafka" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/module/kafka" ) type client interface { diff --git a/metricbeat/module/kafka/consumergroup/query_test.go b/metricbeat/module/kafka/consumergroup/query_test.go index febf616b67e7..6c913fb9428e 100644 --- a/metricbeat/module/kafka/consumergroup/query_test.go +++ b/metricbeat/module/kafka/consumergroup/query_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestFetchGroupInfo(t *testing.T) { diff --git a/metricbeat/module/kafka/fields.go b/metricbeat/module/kafka/fields.go index 38e2bfb076b1..7920163da93d 100644 --- a/metricbeat/module/kafka/fields.go +++ b/metricbeat/module/kafka/fields.go @@ -20,7 +20,7 @@ package kafka import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/kafka/kafka.go b/metricbeat/module/kafka/kafka.go index fac3108470eb..c610c126f50f 100644 --- a/metricbeat/module/kafka/kafka.go +++ b/metricbeat/module/kafka/kafka.go @@ -17,6 +17,6 @@ package kafka -import "github.com/elastic/beats/libbeat/logp" +import "github.com/elastic/beats/v7/libbeat/logp" var debugf = logp.MakeDebug("kafka") diff --git a/metricbeat/module/kafka/metricset.go b/metricbeat/module/kafka/metricset.go index 624e1aa8d348..73c1be02218c 100644 --- a/metricbeat/module/kafka/metricset.go +++ b/metricbeat/module/kafka/metricset.go @@ -20,8 +20,8 @@ package kafka import ( "crypto/tls" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/metricbeat/mb" ) // MetricSet is the base metricset for all Kafka metricsets diff --git a/metricbeat/module/kafka/partition/partition.go b/metricbeat/module/kafka/partition/partition.go index 4aa5c3a5721a..7a1e8aeebf9d 100644 --- a/metricbeat/module/kafka/partition/partition.go +++ b/metricbeat/module/kafka/partition/partition.go @@ -24,11 +24,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kafka" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kafka" ) // init registers the partition MetricSet with the central registry. diff --git a/metricbeat/module/kafka/partition/partition_integration_test.go b/metricbeat/module/kafka/partition/partition_integration_test.go index af5b0f72ea5b..a78634cb59be 100644 --- a/metricbeat/module/kafka/partition/partition_integration_test.go +++ b/metricbeat/module/kafka/partition/partition_integration_test.go @@ -29,10 +29,10 @@ import ( "github.com/Shopify/sarama" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) const ( diff --git a/metricbeat/module/kafka/producer/producer_integration_test.go b/metricbeat/module/kafka/producer/producer_integration_test.go index 711b516e9f28..b66f58385438 100644 --- a/metricbeat/module/kafka/producer/producer_integration_test.go +++ b/metricbeat/module/kafka/producer/producer_integration_test.go @@ -25,12 +25,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/kafka/producer/producer_test.go b/metricbeat/module/kafka/producer/producer_test.go index 2cf33e994a56..0469ea57ced9 100644 --- a/metricbeat/module/kafka/producer/producer_test.go +++ b/metricbeat/module/kafka/producer/producer_test.go @@ -20,10 +20,10 @@ package producer import ( "os" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" // Register input module and metricset - _ "github.com/elastic/beats/metricbeat/module/jolokia" - _ "github.com/elastic/beats/metricbeat/module/jolokia/jmx" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia" + _ "github.com/elastic/beats/v7/metricbeat/module/jolokia/jmx" ) func init() { diff --git a/metricbeat/module/kibana/fields.go b/metricbeat/module/kibana/fields.go index 5fa5228de54e..eeddf8d856a3 100644 --- a/metricbeat/module/kibana/fields.go +++ b/metricbeat/module/kibana/fields.go @@ -20,7 +20,7 @@ package kibana import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/kibana/kibana.go b/metricbeat/module/kibana/kibana.go index 24a49559d51f..4acb124695be 100644 --- a/metricbeat/module/kibana/kibana.go +++ b/metricbeat/module/kibana/kibana.go @@ -25,11 +25,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kibana/kibana_integration_test.go b/metricbeat/module/kibana/kibana_integration_test.go index 301a5031a301..e04986fa6981 100644 --- a/metricbeat/module/kibana/kibana_integration_test.go +++ b/metricbeat/module/kibana/kibana_integration_test.go @@ -24,10 +24,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/kibana" - _ "github.com/elastic/beats/metricbeat/module/kibana/stats" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/kibana" + _ "github.com/elastic/beats/v7/metricbeat/module/kibana/stats" ) var xpackMetricSets = []string{ diff --git a/metricbeat/module/kibana/kibana_test.go b/metricbeat/module/kibana/kibana_test.go index ca4e2b562617..be2158019aae 100644 --- a/metricbeat/module/kibana/kibana_test.go +++ b/metricbeat/module/kibana/kibana_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestIsStatsAPIAvailable(t *testing.T) { diff --git a/metricbeat/module/kibana/metricset.go b/metricbeat/module/kibana/metricset.go index f099bd775753..1a68669fe58e 100644 --- a/metricbeat/module/kibana/metricset.go +++ b/metricbeat/module/kibana/metricset.go @@ -18,7 +18,7 @@ package kibana import ( - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) // MetricSet can be used to build other metricsets within the Kibana module. diff --git a/metricbeat/module/kibana/stats/data.go b/metricbeat/module/kibana/stats/data.go index 6f776e306a0e..e560e7d5cffe 100644 --- a/metricbeat/module/kibana/stats/data.go +++ b/metricbeat/module/kibana/stats/data.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kibana" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kibana" ) var ( diff --git a/metricbeat/module/kibana/stats/data_test.go b/metricbeat/module/kibana/stats/data_test.go index b5101c3349a8..98c38c44d3cd 100644 --- a/metricbeat/module/kibana/stats/data_test.go +++ b/metricbeat/module/kibana/stats/data_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kibana/stats/data_xpack.go b/metricbeat/module/kibana/stats/data_xpack.go index 5dc2cf8f241e..30c3c75190ad 100644 --- a/metricbeat/module/kibana/stats/data_xpack.go +++ b/metricbeat/module/kibana/stats/data_xpack.go @@ -23,11 +23,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/kibana/stats/data_xpack_test.go b/metricbeat/module/kibana/stats/data_xpack_test.go index db7605f8e23c..d5c36fef1f0d 100644 --- a/metricbeat/module/kibana/stats/data_xpack_test.go +++ b/metricbeat/module/kibana/stats/data_xpack_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMappingStatsXPack(t *testing.T) { diff --git a/metricbeat/module/kibana/stats/stats.go b/metricbeat/module/kibana/stats/stats.go index d84c1dfcfe74..526a525951c2 100644 --- a/metricbeat/module/kibana/stats/stats.go +++ b/metricbeat/module/kibana/stats/stats.go @@ -23,10 +23,10 @@ import ( "strings" "time" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kibana" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kibana" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/kibana/stats/stats_integration_test.go b/metricbeat/module/kibana/stats/stats_integration_test.go index c8c19e57e245..8bbf584000de 100644 --- a/metricbeat/module/kibana/stats/stats_integration_test.go +++ b/metricbeat/module/kibana/stats/stats_integration_test.go @@ -27,12 +27,12 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/kibana" - "github.com/elastic/beats/metricbeat/module/kibana/mtest" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/kibana" + "github.com/elastic/beats/v7/metricbeat/module/kibana/mtest" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/kibana/stats/stats_test.go b/metricbeat/module/kibana/stats/stats_test.go index 291f60352d2e..b6757e5ecb21 100644 --- a/metricbeat/module/kibana/stats/stats_test.go +++ b/metricbeat/module/kibana/stats/stats_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/kibana/mtest" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/kibana/mtest" ) func TestFetchUsage(t *testing.T) { diff --git a/metricbeat/module/kibana/status/data.go b/metricbeat/module/kibana/status/data.go index 9aa93cf72cff..93173165fb60 100644 --- a/metricbeat/module/kibana/status/data.go +++ b/metricbeat/module/kibana/status/data.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kibana" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kibana" ) var ( diff --git a/metricbeat/module/kibana/status/data_test.go b/metricbeat/module/kibana/status/data_test.go index 2acaf056e728..73cfcfd09106 100644 --- a/metricbeat/module/kibana/status/data_test.go +++ b/metricbeat/module/kibana/status/data_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kibana/status/status.go b/metricbeat/module/kibana/status/status.go index 3d9bae94c0c7..c386ccb00101 100644 --- a/metricbeat/module/kibana/status/status.go +++ b/metricbeat/module/kibana/status/status.go @@ -20,10 +20,10 @@ package status import ( "fmt" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kibana" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kibana" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/kibana/status/status_integration_test.go b/metricbeat/module/kibana/status/status_integration_test.go index b6413ea9b9aa..003dd34f4524 100644 --- a/metricbeat/module/kibana/status/status_integration_test.go +++ b/metricbeat/module/kibana/status/status_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/kibana/mtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/kibana/mtest" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/kibana/status/status_test.go b/metricbeat/module/kibana/status/status_test.go index 8bfb45fa6c6e..406619a4ccb2 100644 --- a/metricbeat/module/kibana/status/status_test.go +++ b/metricbeat/module/kibana/status/status_test.go @@ -22,9 +22,9 @@ package status import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kibana" + _ "github.com/elastic/beats/v7/metricbeat/module/kibana" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/kubernetes/apiserver/apiserver.go b/metricbeat/module/kubernetes/apiserver/apiserver.go index c14accf31236..c49f80c8b768 100644 --- a/metricbeat/module/kubernetes/apiserver/apiserver.go +++ b/metricbeat/module/kubernetes/apiserver/apiserver.go @@ -18,8 +18,8 @@ package apiserver import ( - "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/apiserver/apiserver_test.go b/metricbeat/module/kubernetes/apiserver/apiserver_test.go index 01ab59603ead..42d8b2231434 100644 --- a/metricbeat/module/kubernetes/apiserver/apiserver_test.go +++ b/metricbeat/module/kubernetes/apiserver/apiserver_test.go @@ -22,9 +22,9 @@ package apiserver import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) const testFile = "_meta/test/metrics" diff --git a/metricbeat/module/kubernetes/apiserver/metricset.go b/metricbeat/module/kubernetes/apiserver/metricset.go index 81a4c5e43c07..75cf428157c7 100644 --- a/metricbeat/module/kubernetes/apiserver/metricset.go +++ b/metricbeat/module/kubernetes/apiserver/metricset.go @@ -20,8 +20,8 @@ package apiserver import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Metricset for apiserver is a prometheus based metricset diff --git a/metricbeat/module/kubernetes/container/container.go b/metricbeat/module/kubernetes/container/container.go index acbf437163dd..718696a0a4f9 100644 --- a/metricbeat/module/kubernetes/container/container.go +++ b/metricbeat/module/kubernetes/container/container.go @@ -20,11 +20,11 @@ package container import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/container/container_test.go b/metricbeat/module/kubernetes/container/container_test.go index 5d622b3ffed2..42f1fe710f30 100644 --- a/metricbeat/module/kubernetes/container/container_test.go +++ b/metricbeat/module/kubernetes/container/container_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const testFile = "../_meta/test/stats_summary.json" diff --git a/metricbeat/module/kubernetes/container/data.go b/metricbeat/module/kubernetes/container/data.go index 93e6f9bc620c..53a795624d98 100644 --- a/metricbeat/module/kubernetes/container/data.go +++ b/metricbeat/module/kubernetes/container/data.go @@ -21,10 +21,10 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kubernetes" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) func eventMapping(content []byte, perfMetrics *util.PerfMetricsCache) ([]common.MapStr, error) { diff --git a/metricbeat/module/kubernetes/controllermanager/controllermanager.go b/metricbeat/module/kubernetes/controllermanager/controllermanager.go index db90b4dee712..dee40ebfcff4 100644 --- a/metricbeat/module/kubernetes/controllermanager/controllermanager.go +++ b/metricbeat/module/kubernetes/controllermanager/controllermanager.go @@ -18,8 +18,8 @@ package controllermanager import ( - "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/controllermanager/controllermanager_test.go b/metricbeat/module/kubernetes/controllermanager/controllermanager_test.go index c121a557d6ab..daa65789b756 100644 --- a/metricbeat/module/kubernetes/controllermanager/controllermanager_test.go +++ b/metricbeat/module/kubernetes/controllermanager/controllermanager_test.go @@ -22,7 +22,7 @@ package controllermanager import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) const testFile = "_meta/test/metrics" diff --git a/metricbeat/module/kubernetes/event/event.go b/metricbeat/module/kubernetes/event/event.go index 81f6b237697a..89be60274524 100644 --- a/metricbeat/module/kubernetes/event/event.go +++ b/metricbeat/module/kubernetes/event/event.go @@ -21,10 +21,10 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/common/safemapstr" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common/safemapstr" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/kubernetes/event/event_test.go b/metricbeat/module/kubernetes/event/event_test.go index 2086a2d03ef5..6b441f13b065 100644 --- a/metricbeat/module/kubernetes/event/event_test.go +++ b/metricbeat/module/kubernetes/event/event_test.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestGenerateMapStrFromEvent(t *testing.T) { diff --git a/metricbeat/module/kubernetes/fields.go b/metricbeat/module/kubernetes/fields.go index a45bbe916f6e..8042c638052a 100644 --- a/metricbeat/module/kubernetes/fields.go +++ b/metricbeat/module/kubernetes/fields.go @@ -20,7 +20,7 @@ package kubernetes import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/kubernetes/node/data.go b/metricbeat/module/kubernetes/node/data.go index 0d055880ee6d..9c2ab8eaec5a 100644 --- a/metricbeat/module/kubernetes/node/data.go +++ b/metricbeat/module/kubernetes/node/data.go @@ -21,8 +21,8 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func eventMapping(content []byte) (common.MapStr, error) { diff --git a/metricbeat/module/kubernetes/node/node.go b/metricbeat/module/kubernetes/node/node.go index 804600ecb690..9868f3ec2cde 100644 --- a/metricbeat/module/kubernetes/node/node.go +++ b/metricbeat/module/kubernetes/node/node.go @@ -20,13 +20,13 @@ package node import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/node/node_test.go b/metricbeat/module/kubernetes/node/node_test.go index 2a27f186fae6..e240c31d174f 100644 --- a/metricbeat/module/kubernetes/node/node_test.go +++ b/metricbeat/module/kubernetes/node/node_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const testFile = "../_meta/test/stats_summary.json" diff --git a/metricbeat/module/kubernetes/pod/data.go b/metricbeat/module/kubernetes/pod/data.go index ccfa3a8ef518..ff53f4dbb1dd 100644 --- a/metricbeat/module/kubernetes/pod/data.go +++ b/metricbeat/module/kubernetes/pod/data.go @@ -21,10 +21,10 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kubernetes" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) func eventMapping(content []byte, perfMetrics *util.PerfMetricsCache) ([]common.MapStr, error) { diff --git a/metricbeat/module/kubernetes/pod/pod.go b/metricbeat/module/kubernetes/pod/pod.go index 8762f6ad1dd7..4c47cb6863c8 100644 --- a/metricbeat/module/kubernetes/pod/pod.go +++ b/metricbeat/module/kubernetes/pod/pod.go @@ -20,12 +20,12 @@ package pod import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/pod/pod_test.go b/metricbeat/module/kubernetes/pod/pod_test.go index 6b0a5069c590..d6333b0776e6 100644 --- a/metricbeat/module/kubernetes/pod/pod_test.go +++ b/metricbeat/module/kubernetes/pod/pod_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const testFile = "../_meta/test/stats_summary.json" diff --git a/metricbeat/module/kubernetes/proxy/proxy.go b/metricbeat/module/kubernetes/proxy/proxy.go index c675f7a7110e..520a708f31d6 100644 --- a/metricbeat/module/kubernetes/proxy/proxy.go +++ b/metricbeat/module/kubernetes/proxy/proxy.go @@ -18,8 +18,8 @@ package proxy import ( - "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/proxy/proxy_test.go b/metricbeat/module/kubernetes/proxy/proxy_test.go index 99838d8562d3..79a940dced0c 100644 --- a/metricbeat/module/kubernetes/proxy/proxy_test.go +++ b/metricbeat/module/kubernetes/proxy/proxy_test.go @@ -22,7 +22,7 @@ package proxy import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) const testFile = "_meta/test/metrics" diff --git a/metricbeat/module/kubernetes/scheduler/scheduler.go b/metricbeat/module/kubernetes/scheduler/scheduler.go index 123b0f7eef1b..201e4fdb6d5a 100644 --- a/metricbeat/module/kubernetes/scheduler/scheduler.go +++ b/metricbeat/module/kubernetes/scheduler/scheduler.go @@ -18,8 +18,8 @@ package scheduler import ( - "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/scheduler/scheduler_test.go b/metricbeat/module/kubernetes/scheduler/scheduler_test.go index e3dbbf5d6769..301319d9d5ae 100644 --- a/metricbeat/module/kubernetes/scheduler/scheduler_test.go +++ b/metricbeat/module/kubernetes/scheduler/scheduler_test.go @@ -22,7 +22,7 @@ package scheduler import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) const testFile = "_meta/test/metrics" diff --git a/metricbeat/module/kubernetes/state_container/state_container.go b/metricbeat/module/kubernetes/state_container/state_container.go index e2771ac9cd6e..647fcff8b4fe 100644 --- a/metricbeat/module/kubernetes/state_container/state_container.go +++ b/metricbeat/module/kubernetes/state_container/state_container.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/state_container/state_container_test.go b/metricbeat/module/kubernetes/state_container/state_container_test.go index a74fc8836e9d..d3bbe08f92b6 100644 --- a/metricbeat/module/kubernetes/state_container/state_container_test.go +++ b/metricbeat/module/kubernetes/state_container/state_container_test.go @@ -22,10 +22,10 @@ package state_container import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_cronjob/state_cronjob.go b/metricbeat/module/kubernetes/state_cronjob/state_cronjob.go index 58d61d5ccccf..a0fc4f120c8f 100644 --- a/metricbeat/module/kubernetes/state_cronjob/state_cronjob.go +++ b/metricbeat/module/kubernetes/state_cronjob/state_cronjob.go @@ -20,9 +20,9 @@ package state_cronjob import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/state_cronjob/state_cronjob_test.go b/metricbeat/module/kubernetes/state_cronjob/state_cronjob_test.go index a767226c2799..c04acbce0d01 100644 --- a/metricbeat/module/kubernetes/state_cronjob/state_cronjob_test.go +++ b/metricbeat/module/kubernetes/state_cronjob/state_cronjob_test.go @@ -22,7 +22,7 @@ package state_cronjob import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_deployment/state_deployment.go b/metricbeat/module/kubernetes/state_deployment/state_deployment.go index 3ce8b7d382a6..ded9115d1cec 100644 --- a/metricbeat/module/kubernetes/state_deployment/state_deployment.go +++ b/metricbeat/module/kubernetes/state_deployment/state_deployment.go @@ -18,12 +18,12 @@ package state_deployment import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/state_deployment/state_deployment_test.go b/metricbeat/module/kubernetes/state_deployment/state_deployment_test.go index 98781161d20b..8d70c8ac3b18 100644 --- a/metricbeat/module/kubernetes/state_deployment/state_deployment_test.go +++ b/metricbeat/module/kubernetes/state_deployment/state_deployment_test.go @@ -22,9 +22,9 @@ package state_deployment import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_node/state_node.go b/metricbeat/module/kubernetes/state_node/state_node.go index 8835f3f09cd6..bd3349152402 100644 --- a/metricbeat/module/kubernetes/state_node/state_node.go +++ b/metricbeat/module/kubernetes/state_node/state_node.go @@ -20,11 +20,11 @@ package state_node import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/kubernetes" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/state_node/state_node_test.go b/metricbeat/module/kubernetes/state_node/state_node_test.go index 780617d13a0d..9cb46fa715b7 100644 --- a/metricbeat/module/kubernetes/state_node/state_node_test.go +++ b/metricbeat/module/kubernetes/state_node/state_node_test.go @@ -22,10 +22,10 @@ package state_node import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume.go b/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume.go index 7c55729374de..6505e1e0be63 100644 --- a/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume.go +++ b/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume.go @@ -18,8 +18,8 @@ package state_persistentvolume import ( - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume_test.go b/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume_test.go index f3f700a64c19..fc7f93507af6 100644 --- a/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume_test.go +++ b/metricbeat/module/kubernetes/state_persistentvolume/state_persistentvolume_test.go @@ -22,7 +22,7 @@ package state_persistentvolume import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim.go b/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim.go index 25b2c7616571..b7685089a83e 100644 --- a/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim.go +++ b/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim.go @@ -18,8 +18,8 @@ package state_persistentvolumeclaim import ( - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim_test.go b/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim_test.go index 210cd91826bd..71e3c282ddc0 100644 --- a/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim_test.go +++ b/metricbeat/module/kubernetes/state_persistentvolumeclaim/state_persistentvolumeclaim_test.go @@ -22,7 +22,7 @@ package state_persistentvolumeclaim import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_pod/state_pod.go b/metricbeat/module/kubernetes/state_pod/state_pod.go index 543fa946e2a3..7a531e0a5e80 100644 --- a/metricbeat/module/kubernetes/state_pod/state_pod.go +++ b/metricbeat/module/kubernetes/state_pod/state_pod.go @@ -18,12 +18,12 @@ package state_pod import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/state_pod/state_pod_test.go b/metricbeat/module/kubernetes/state_pod/state_pod_test.go index 2848865d59ae..068c5fdc9a7b 100644 --- a/metricbeat/module/kubernetes/state_pod/state_pod_test.go +++ b/metricbeat/module/kubernetes/state_pod/state_pod_test.go @@ -22,10 +22,10 @@ package state_pod import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_replicaset/state_replicaset.go b/metricbeat/module/kubernetes/state_replicaset/state_replicaset.go index fe387e7a53bd..cc24af630bd7 100644 --- a/metricbeat/module/kubernetes/state_replicaset/state_replicaset.go +++ b/metricbeat/module/kubernetes/state_replicaset/state_replicaset.go @@ -18,12 +18,12 @@ package state_replicaset import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/state_replicaset/state_replicaset_test.go b/metricbeat/module/kubernetes/state_replicaset/state_replicaset_test.go index f8311dcf932b..ea32d7257745 100644 --- a/metricbeat/module/kubernetes/state_replicaset/state_replicaset_test.go +++ b/metricbeat/module/kubernetes/state_replicaset/state_replicaset_test.go @@ -22,10 +22,10 @@ package state_replicaset import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota.go b/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota.go index 0cd31adf8ac1..8901714bf330 100644 --- a/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota.go +++ b/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota.go @@ -18,8 +18,8 @@ package state_resourcequota import ( - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota_test.go b/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota_test.go index 4f8f9a197a43..b32130eaa5d1 100644 --- a/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota_test.go +++ b/metricbeat/module/kubernetes/state_resourcequota/state_resourcequota_test.go @@ -22,7 +22,7 @@ package state_resourcequota import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_service/state_service.go b/metricbeat/module/kubernetes/state_service/state_service.go index 9de1bc270af8..4cadbb5aa747 100644 --- a/metricbeat/module/kubernetes/state_service/state_service.go +++ b/metricbeat/module/kubernetes/state_service/state_service.go @@ -18,8 +18,8 @@ package state_service import ( - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/state_service/state_service_test.go b/metricbeat/module/kubernetes/state_service/state_service_test.go index 8b2e9e42e7f6..cae6735c6e5c 100644 --- a/metricbeat/module/kubernetes/state_service/state_service_test.go +++ b/metricbeat/module/kubernetes/state_service/state_service_test.go @@ -22,7 +22,7 @@ package state_service import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_statefulset/state_statefulset.go b/metricbeat/module/kubernetes/state_statefulset/state_statefulset.go index 172069103a80..cadaf4a72383 100644 --- a/metricbeat/module/kubernetes/state_statefulset/state_statefulset.go +++ b/metricbeat/module/kubernetes/state_statefulset/state_statefulset.go @@ -18,12 +18,12 @@ package state_statefulset import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/kubernetes/util" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes/util" ) const ( diff --git a/metricbeat/module/kubernetes/state_statefulset/state_statefulset_test.go b/metricbeat/module/kubernetes/state_statefulset/state_statefulset_test.go index a618a8bdea14..119e4d16e4bb 100644 --- a/metricbeat/module/kubernetes/state_statefulset/state_statefulset_test.go +++ b/metricbeat/module/kubernetes/state_statefulset/state_statefulset_test.go @@ -22,11 +22,11 @@ package state_statefulset import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/kubernetes" + _ "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/state_storageclass/state_storageclass.go b/metricbeat/module/kubernetes/state_storageclass/state_storageclass.go index 356485d49a1d..98db701cfeb1 100644 --- a/metricbeat/module/kubernetes/state_storageclass/state_storageclass.go +++ b/metricbeat/module/kubernetes/state_storageclass/state_storageclass.go @@ -18,8 +18,8 @@ package state_storageclass import ( - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/kubernetes/state_storageclass/state_storageclass_test.go b/metricbeat/module/kubernetes/state_storageclass/state_storageclass_test.go index 524121ce6faa..c8552663dda6 100644 --- a/metricbeat/module/kubernetes/state_storageclass/state_storageclass_test.go +++ b/metricbeat/module/kubernetes/state_storageclass/state_storageclass_test.go @@ -22,7 +22,7 @@ package state_storageclass import ( "testing" - "github.com/elastic/beats/metricbeat/helper/prometheus/ptest" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus/ptest" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/kubernetes/system/data.go b/metricbeat/module/kubernetes/system/data.go index 6cf09f85335b..7e839211bfc7 100644 --- a/metricbeat/module/kubernetes/system/data.go +++ b/metricbeat/module/kubernetes/system/data.go @@ -21,9 +21,9 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func eventMapping(content []byte) ([]common.MapStr, error) { diff --git a/metricbeat/module/kubernetes/system/system.go b/metricbeat/module/kubernetes/system/system.go index fd9495b392e0..b10c9c4afb3b 100644 --- a/metricbeat/module/kubernetes/system/system.go +++ b/metricbeat/module/kubernetes/system/system.go @@ -20,10 +20,10 @@ package system import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/kubernetes/system/system_test.go b/metricbeat/module/kubernetes/system/system_test.go index 23db40d9973c..657c4c1903b8 100644 --- a/metricbeat/module/kubernetes/system/system_test.go +++ b/metricbeat/module/kubernetes/system/system_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const testFile = "../_meta/test/stats_summary.json" diff --git a/metricbeat/module/kubernetes/util/kubernetes.go b/metricbeat/module/kubernetes/util/kubernetes.go index df88096f810a..7f8317daa351 100644 --- a/metricbeat/module/kubernetes/util/kubernetes.go +++ b/metricbeat/module/kubernetes/util/kubernetes.go @@ -22,15 +22,15 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common/kubernetes/metadata" + "github.com/elastic/beats/v7/libbeat/common/kubernetes/metadata" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/resource" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Enricher takes Kubernetes events and enrich them with k8s metadata diff --git a/metricbeat/module/kubernetes/util/kubernetes_test.go b/metricbeat/module/kubernetes/util/kubernetes_test.go index 210baa3801cf..bab34ef6cd30 100644 --- a/metricbeat/module/kubernetes/util/kubernetes_test.go +++ b/metricbeat/module/kubernetes/util/kubernetes_test.go @@ -28,8 +28,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/kubernetes" ) func TestBuildMetadataEnricher(t *testing.T) { diff --git a/metricbeat/module/kubernetes/util/metrics_cache.go b/metricbeat/module/kubernetes/util/metrics_cache.go index 7ffff06edfea..3fdf59d8b16f 100644 --- a/metricbeat/module/kubernetes/util/metrics_cache.go +++ b/metricbeat/module/kubernetes/util/metrics_cache.go @@ -20,7 +20,7 @@ package util import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) // PerfMetrics stores known metrics from Kubernetes nodes and containers diff --git a/metricbeat/module/kubernetes/volume/data.go b/metricbeat/module/kubernetes/volume/data.go index 756d998a98d4..ae0f5d891f49 100644 --- a/metricbeat/module/kubernetes/volume/data.go +++ b/metricbeat/module/kubernetes/volume/data.go @@ -21,9 +21,9 @@ import ( "encoding/json" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/kubernetes" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/kubernetes" ) func eventMapping(content []byte) ([]common.MapStr, error) { diff --git a/metricbeat/module/kubernetes/volume/volume.go b/metricbeat/module/kubernetes/volume/volume.go index b4a9589ca9aa..102d8edfabca 100644 --- a/metricbeat/module/kubernetes/volume/volume.go +++ b/metricbeat/module/kubernetes/volume/volume.go @@ -20,10 +20,10 @@ package volume import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/kubernetes/volume/volume_test.go b/metricbeat/module/kubernetes/volume/volume_test.go index fea2d75e83b4..e527a64d452c 100644 --- a/metricbeat/module/kubernetes/volume/volume_test.go +++ b/metricbeat/module/kubernetes/volume/volume_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) const testFile = "../_meta/test/stats_summary.json" diff --git a/metricbeat/module/kvm/dommemstat/dommemstat.go b/metricbeat/module/kvm/dommemstat/dommemstat.go index b198719e8477..8beb22d433c7 100644 --- a/metricbeat/module/kvm/dommemstat/dommemstat.go +++ b/metricbeat/module/kvm/dommemstat/dommemstat.go @@ -22,15 +22,15 @@ import ( "net/url" "time" - "github.com/elastic/beats/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" "github.com/pkg/errors" "github.com/digitalocean/go-libvirt" "github.com/digitalocean/go-libvirt/libvirttest" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) const ( diff --git a/metricbeat/module/kvm/dommemstat/dommemstat_test.go b/metricbeat/module/kvm/dommemstat/dommemstat_test.go index 3aa4c0ff6377..087b941dbfa5 100644 --- a/metricbeat/module/kvm/dommemstat/dommemstat_test.go +++ b/metricbeat/module/kvm/dommemstat/dommemstat_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/digitalocean/go-libvirt/libvirttest" ) diff --git a/metricbeat/module/kvm/fields.go b/metricbeat/module/kvm/fields.go index 9b4f2e7e211d..7dd21356f954 100644 --- a/metricbeat/module/kvm/fields.go +++ b/metricbeat/module/kvm/fields.go @@ -20,7 +20,7 @@ package kvm import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/logstash/fields.go b/metricbeat/module/logstash/fields.go index 8bf468ea3718..a1f6963e9c00 100644 --- a/metricbeat/module/logstash/fields.go +++ b/metricbeat/module/logstash/fields.go @@ -20,7 +20,7 @@ package logstash import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/logstash/logstash.go b/metricbeat/module/logstash/logstash.go index d53933421243..3e5e57ac1c20 100644 --- a/metricbeat/module/logstash/logstash.go +++ b/metricbeat/module/logstash/logstash.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" ) func init() { diff --git a/metricbeat/module/logstash/logstash_integration_test.go b/metricbeat/module/logstash/logstash_integration_test.go index 379d6aabaf26..30dca909a1ea 100644 --- a/metricbeat/module/logstash/logstash_integration_test.go +++ b/metricbeat/module/logstash/logstash_integration_test.go @@ -24,11 +24,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/logstash" - _ "github.com/elastic/beats/metricbeat/module/logstash/node" - _ "github.com/elastic/beats/metricbeat/module/logstash/node_stats" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/logstash" + _ "github.com/elastic/beats/v7/metricbeat/module/logstash/node" + _ "github.com/elastic/beats/v7/metricbeat/module/logstash/node_stats" ) var metricSets = []string{ diff --git a/metricbeat/module/logstash/node/data.go b/metricbeat/module/logstash/node/data.go index 525ea1b014e7..b1a6ef97ae41 100644 --- a/metricbeat/module/logstash/node/data.go +++ b/metricbeat/module/logstash/node/data.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/logstash" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/logstash" ) var ( diff --git a/metricbeat/module/logstash/node/data_test.go b/metricbeat/module/logstash/node/data_test.go index d9f72a642d81..65539432d8a8 100644 --- a/metricbeat/module/logstash/node/data_test.go +++ b/metricbeat/module/logstash/node/data_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/logstash/node/data_xpack.go b/metricbeat/module/logstash/node/data_xpack.go index c076cf3a41ae..96fc252158c4 100644 --- a/metricbeat/module/logstash/node/data_xpack.go +++ b/metricbeat/module/logstash/node/data_xpack.go @@ -20,10 +20,10 @@ package node import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/logstash" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/logstash" ) func eventMappingXPack(r mb.ReporterV2, m *MetricSet, pipelines []logstash.PipelineState, overrideClusterUUID string) error { diff --git a/metricbeat/module/logstash/node/node.go b/metricbeat/module/logstash/node/node.go index e076e990ac24..025d013e7566 100644 --- a/metricbeat/module/logstash/node/node.go +++ b/metricbeat/module/logstash/node/node.go @@ -18,9 +18,9 @@ package node import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/logstash" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/logstash" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/logstash/node_stats/data.go b/metricbeat/module/logstash/node_stats/data.go index 052a5b4ad315..da2f2f3b7c36 100644 --- a/metricbeat/module/logstash/node_stats/data.go +++ b/metricbeat/module/logstash/node_stats/data.go @@ -22,12 +22,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/logstash" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/logstash" ) var ( diff --git a/metricbeat/module/logstash/node_stats/data_test.go b/metricbeat/module/logstash/node_stats/data_test.go index dc824ac68173..2ae2407ca9e6 100644 --- a/metricbeat/module/logstash/node_stats/data_test.go +++ b/metricbeat/module/logstash/node_stats/data_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/logstash/node_stats/data_xpack.go b/metricbeat/module/logstash/node_stats/data_xpack.go index 442bf43ebf22..a6a9867b7cde 100644 --- a/metricbeat/module/logstash/node_stats/data_xpack.go +++ b/metricbeat/module/logstash/node_stats/data_xpack.go @@ -21,13 +21,13 @@ import ( "encoding/json" "time" - "github.com/elastic/beats/metricbeat/module/logstash" + "github.com/elastic/beats/v7/metricbeat/module/logstash" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/elastic" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/elastic" + "github.com/elastic/beats/v7/metricbeat/mb" ) type jvm struct { diff --git a/metricbeat/module/logstash/node_stats/node_stats.go b/metricbeat/module/logstash/node_stats/node_stats.go index 7e212585b551..29a5a7d59c3b 100644 --- a/metricbeat/module/logstash/node_stats/node_stats.go +++ b/metricbeat/module/logstash/node_stats/node_stats.go @@ -20,9 +20,9 @@ package node_stats import ( "sync" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/logstash" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/logstash" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/memcached/fields.go b/metricbeat/module/memcached/fields.go index c675dce5afe9..d9fa12ddab89 100644 --- a/metricbeat/module/memcached/fields.go +++ b/metricbeat/module/memcached/fields.go @@ -20,7 +20,7 @@ package memcached import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/memcached/stats/data.go b/metricbeat/module/memcached/stats/data.go index e3b1b57ea0b5..9d7bf9fac6d7 100644 --- a/metricbeat/module/memcached/stats/data.go +++ b/metricbeat/module/memcached/stats/data.go @@ -18,8 +18,8 @@ package stats import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var ( diff --git a/metricbeat/module/memcached/stats/stats.go b/metricbeat/module/memcached/stats/stats.go index 52c938a63428..fc0e0f3d084a 100644 --- a/metricbeat/module/memcached/stats/stats.go +++ b/metricbeat/module/memcached/stats/stats.go @@ -25,8 +25,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) var hostParser = parse.URLHostParserBuilder{DefaultScheme: "tcp"}.Build() diff --git a/metricbeat/module/memcached/stats/stats_integration_test.go b/metricbeat/module/memcached/stats/stats_integration_test.go index cc3e21e028aa..7c3a6222ae66 100644 --- a/metricbeat/module/memcached/stats/stats_integration_test.go +++ b/metricbeat/module/memcached/stats/stats_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/mongodb/collstats/collstats.go b/metricbeat/module/mongodb/collstats/collstats.go index c39de01a18aa..ebf7db992cef 100644 --- a/metricbeat/module/mongodb/collstats/collstats.go +++ b/metricbeat/module/mongodb/collstats/collstats.go @@ -20,9 +20,9 @@ package collstats import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mongodb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mongodb" ) func init() { diff --git a/metricbeat/module/mongodb/collstats/collstats_integration_test.go b/metricbeat/module/mongodb/collstats/collstats_integration_test.go index 2ef510797dca..7d135fb51a35 100644 --- a/metricbeat/module/mongodb/collstats/collstats_integration_test.go +++ b/metricbeat/module/mongodb/collstats/collstats_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/mongodb/collstats/data.go b/metricbeat/module/mongodb/collstats/data.go index b07e9d8a6d80..5d70c68f7f36 100644 --- a/metricbeat/module/mongodb/collstats/data.go +++ b/metricbeat/module/mongodb/collstats/data.go @@ -21,7 +21,7 @@ import ( "errors" "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func eventMapping(key string, data common.MapStr) (common.MapStr, error) { diff --git a/metricbeat/module/mongodb/collstats/data_test.go b/metricbeat/module/mongodb/collstats/data_test.go index 8b0cbf220b22..5c2c7ae36d51 100644 --- a/metricbeat/module/mongodb/collstats/data_test.go +++ b/metricbeat/module/mongodb/collstats/data_test.go @@ -24,7 +24,7 @@ import ( "io/ioutil" "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/mongodb/dbstats/data.go b/metricbeat/module/mongodb/dbstats/data.go index 05514a0eca8a..15b57fef448a 100644 --- a/metricbeat/module/mongodb/dbstats/data.go +++ b/metricbeat/module/mongodb/dbstats/data.go @@ -18,8 +18,8 @@ package dbstats import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var schema = s.Schema{ diff --git a/metricbeat/module/mongodb/dbstats/dbstats.go b/metricbeat/module/mongodb/dbstats/dbstats.go index 6325b98342a8..4153793ed26b 100644 --- a/metricbeat/module/mongodb/dbstats/dbstats.go +++ b/metricbeat/module/mongodb/dbstats/dbstats.go @@ -20,10 +20,10 @@ package dbstats import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mongodb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mongodb" ) var logger = logp.NewLogger("mongodb.dbstats") diff --git a/metricbeat/module/mongodb/dbstats/dbstats_integration_test.go b/metricbeat/module/mongodb/dbstats/dbstats_integration_test.go index 6eb2b47d7f0f..70c34006ac8d 100644 --- a/metricbeat/module/mongodb/dbstats/dbstats_integration_test.go +++ b/metricbeat/module/mongodb/dbstats/dbstats_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/mongodb/fields.go b/metricbeat/module/mongodb/fields.go index d58cbd012548..ae38c9b87248 100644 --- a/metricbeat/module/mongodb/fields.go +++ b/metricbeat/module/mongodb/fields.go @@ -20,7 +20,7 @@ package mongodb import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/mongodb/metrics/data.go b/metricbeat/module/mongodb/metrics/data.go index 920cf6f07777..30f166e7d6eb 100644 --- a/metricbeat/module/mongodb/metrics/data.go +++ b/metricbeat/module/mongodb/metrics/data.go @@ -18,8 +18,8 @@ package metrics import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var schemaMetrics = s.Schema{ diff --git a/metricbeat/module/mongodb/metrics/metrics.go b/metricbeat/module/mongodb/metrics/metrics.go index 5681b160a2b6..da2b0ddb6759 100644 --- a/metricbeat/module/mongodb/metrics/metrics.go +++ b/metricbeat/module/mongodb/metrics/metrics.go @@ -21,9 +21,9 @@ import ( "github.com/pkg/errors" "gopkg.in/mgo.v2/bson" - "github.com/elastic/beats/libbeat/common/schema" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mongodb" + "github.com/elastic/beats/v7/libbeat/common/schema" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mongodb" ) func init() { diff --git a/metricbeat/module/mongodb/metrics/metrics_intergration_test.go b/metricbeat/module/mongodb/metrics/metrics_intergration_test.go index 8100c9adb17d..c5415356afbf 100644 --- a/metricbeat/module/mongodb/metrics/metrics_intergration_test.go +++ b/metricbeat/module/mongodb/metrics/metrics_intergration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/mongodb/metricset.go b/metricbeat/module/mongodb/metricset.go index cc75df8048ea..b1b09a7ac4da 100644 --- a/metricbeat/module/mongodb/metricset.go +++ b/metricbeat/module/mongodb/metricset.go @@ -23,9 +23,9 @@ import ( "gopkg.in/mgo.v2" - "github.com/elastic/beats/libbeat/common/transport/tlscommon" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/transport/tlscommon" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) // ModuleConfig contains the common configuration for this module diff --git a/metricbeat/module/mongodb/mongodb.go b/metricbeat/module/mongodb/mongodb.go index 57747684e399..23f9ceb5b225 100644 --- a/metricbeat/module/mongodb/mongodb.go +++ b/metricbeat/module/mongodb/mongodb.go @@ -22,9 +22,9 @@ import ( "net/url" "strings" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" mgo "gopkg.in/mgo.v2" ) diff --git a/metricbeat/module/mongodb/mongodb_test.go b/metricbeat/module/mongodb/mongodb_test.go index 6b5a46a036a2..61756b1e6bd8 100644 --- a/metricbeat/module/mongodb/mongodb_test.go +++ b/metricbeat/module/mongodb/mongodb_test.go @@ -20,7 +20,7 @@ package mongodb import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/mongodb/replstatus/data.go b/metricbeat/module/mongodb/replstatus/data.go index cf2539c1eecc..fdeeb2b53814 100644 --- a/metricbeat/module/mongodb/replstatus/data.go +++ b/metricbeat/module/mongodb/replstatus/data.go @@ -18,7 +18,7 @@ package replstatus import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func eventMapping(oplogInfo oplogInfo, replStatus MongoReplStatus) common.MapStr { diff --git a/metricbeat/module/mongodb/replstatus/replstatus.go b/metricbeat/module/mongodb/replstatus/replstatus.go index 8e693ea11176..fd734823490f 100644 --- a/metricbeat/module/mongodb/replstatus/replstatus.go +++ b/metricbeat/module/mongodb/replstatus/replstatus.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mongodb" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mongodb" ) func init() { diff --git a/metricbeat/module/mongodb/replstatus/replstatus_integration_test.go b/metricbeat/module/mongodb/replstatus/replstatus_integration_test.go index afb1b082b3ce..12f010ee3540 100644 --- a/metricbeat/module/mongodb/replstatus/replstatus_integration_test.go +++ b/metricbeat/module/mongodb/replstatus/replstatus_integration_test.go @@ -27,10 +27,10 @@ import ( mgo "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/mongodb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/mongodb" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/mongodb/status/data.go b/metricbeat/module/mongodb/status/data.go index 749a69768ca0..ef254eca56c2 100644 --- a/metricbeat/module/mongodb/status/data.go +++ b/metricbeat/module/mongodb/status/data.go @@ -18,8 +18,8 @@ package status import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var schema = s.Schema{ diff --git a/metricbeat/module/mongodb/status/status.go b/metricbeat/module/mongodb/status/status.go index c874ad3e9db6..8615d84e3582 100644 --- a/metricbeat/module/mongodb/status/status.go +++ b/metricbeat/module/mongodb/status/status.go @@ -20,9 +20,9 @@ package status import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mongodb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mongodb" "gopkg.in/mgo.v2/bson" ) diff --git a/metricbeat/module/mongodb/status/status_integration_test.go b/metricbeat/module/mongodb/status/status_integration_test.go index c13f47073ab1..0d69a03d3f74 100644 --- a/metricbeat/module/mongodb/status/status_integration_test.go +++ b/metricbeat/module/mongodb/status/status_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/munin/fields.go b/metricbeat/module/munin/fields.go index 3d879b85f9ed..4201760b3982 100644 --- a/metricbeat/module/munin/fields.go +++ b/metricbeat/module/munin/fields.go @@ -20,7 +20,7 @@ package munin import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/munin/munin.go b/metricbeat/module/munin/munin.go index 7c2fd40c0d82..39837a42bcd1 100644 --- a/metricbeat/module/munin/munin.go +++ b/metricbeat/module/munin/munin.go @@ -28,8 +28,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/metricbeat/module/munin/munin_test.go b/metricbeat/module/munin/munin_test.go index 1da93165ddb9..9ae6407d7ee8 100644 --- a/metricbeat/module/munin/munin_test.go +++ b/metricbeat/module/munin/munin_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func dummyNode(response string) *Node { diff --git a/metricbeat/module/munin/node/node.go b/metricbeat/module/munin/node/node.go index 62c15bd77e9d..529031a500c7 100644 --- a/metricbeat/module/munin/node/node.go +++ b/metricbeat/module/munin/node/node.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/munin" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/munin" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/munin/node/node_integration_test.go b/metricbeat/module/munin/node/node_integration_test.go index 72fe1bf38b69..2fd4f0396ae3 100644 --- a/metricbeat/module/munin/node/node_integration_test.go +++ b/metricbeat/module/munin/node/node_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/mysql/fields.go b/metricbeat/module/mysql/fields.go index 86d1346e1131..166d37fe7578 100644 --- a/metricbeat/module/mysql/fields.go +++ b/metricbeat/module/mysql/fields.go @@ -20,7 +20,7 @@ package mysql import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/mysql/galera_status/data.go b/metricbeat/module/mysql/galera_status/data.go index a15c010c85ae..82fa64c44b7c 100644 --- a/metricbeat/module/mysql/galera_status/data.go +++ b/metricbeat/module/mysql/galera_status/data.go @@ -18,9 +18,9 @@ package galera_status import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var ( diff --git a/metricbeat/module/mysql/galera_status/status.go b/metricbeat/module/mysql/galera_status/status.go index ba95a43f3a10..54b4d8a90d88 100644 --- a/metricbeat/module/mysql/galera_status/status.go +++ b/metricbeat/module/mysql/galera_status/status.go @@ -27,9 +27,9 @@ package galera_status import ( "database/sql" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mysql" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mysql" "github.com/pkg/errors" ) diff --git a/metricbeat/module/mysql/mysql.go b/metricbeat/module/mysql/mysql.go index 5497f92cc935..a98530ebd205 100644 --- a/metricbeat/module/mysql/mysql.go +++ b/metricbeat/module/mysql/mysql.go @@ -23,7 +23,7 @@ package mysql import ( "database/sql" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/go-sql-driver/mysql" "github.com/pkg/errors" diff --git a/metricbeat/module/mysql/mysql_integration_test.go b/metricbeat/module/mysql/mysql_integration_test.go index ff97f2d4ed8a..585cf011f9ea 100644 --- a/metricbeat/module/mysql/mysql_integration_test.go +++ b/metricbeat/module/mysql/mysql_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - _ "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + _ "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestNewDB(t *testing.T) { diff --git a/metricbeat/module/mysql/mysql_test.go b/metricbeat/module/mysql/mysql_test.go index 58f463d7f6de..1497dc78c355 100644 --- a/metricbeat/module/mysql/mysql_test.go +++ b/metricbeat/module/mysql/mysql_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/mysql/status/data.go b/metricbeat/module/mysql/status/data.go index 79a4bc17266f..de1f9579e952 100644 --- a/metricbeat/module/mysql/status/data.go +++ b/metricbeat/module/mysql/status/data.go @@ -18,9 +18,9 @@ package status import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var ( diff --git a/metricbeat/module/mysql/status/status.go b/metricbeat/module/mysql/status/status.go index e8fd6a9ee00e..b2da6ec3551e 100644 --- a/metricbeat/module/mysql/status/status.go +++ b/metricbeat/module/mysql/status/status.go @@ -26,8 +26,8 @@ package status import ( "database/sql" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/mysql" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/mysql" "github.com/pkg/errors" ) diff --git a/metricbeat/module/mysql/status/status_integration_test.go b/metricbeat/module/mysql/status/status_integration_test.go index 687d70337a88..2b0b2a510d99 100644 --- a/metricbeat/module/mysql/status/status_integration_test.go +++ b/metricbeat/module/mysql/status/status_integration_test.go @@ -22,10 +22,10 @@ package status import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/mysql" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/mysql" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/mysql/status/status_test.go b/metricbeat/module/mysql/status/status_test.go index f679f9eca3e2..f3e976ee0c5f 100644 --- a/metricbeat/module/mysql/status/status_test.go +++ b/metricbeat/module/mysql/status/status_test.go @@ -20,8 +20,8 @@ package status import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/nats/connections/connections.go b/metricbeat/module/nats/connections/connections.go index b331ec6e6283..4a158180bf4c 100644 --- a/metricbeat/module/nats/connections/connections.go +++ b/metricbeat/module/nats/connections/connections.go @@ -20,10 +20,10 @@ package connections import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/nats/connections/connections_integration_test.go b/metricbeat/module/nats/connections/connections_integration_test.go index d5ea5c8dc122..a9758e42e698 100644 --- a/metricbeat/module/nats/connections/connections_integration_test.go +++ b/metricbeat/module/nats/connections/connections_integration_test.go @@ -22,8 +22,8 @@ package connections import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/nats/connections/connections_test.go b/metricbeat/module/nats/connections/connections_test.go index 1261a1499f5d..8c32d6c92910 100644 --- a/metricbeat/module/nats/connections/connections_test.go +++ b/metricbeat/module/nats/connections/connections_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/nats/connections/data.go b/metricbeat/module/nats/connections/data.go index 2966f8afd8d5..1efe616cb766 100644 --- a/metricbeat/module/nats/connections/data.go +++ b/metricbeat/module/nats/connections/data.go @@ -20,12 +20,12 @@ package connections import ( "encoding/json" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/pkg/errors" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/nats/fields.go b/metricbeat/module/nats/fields.go index d18374ff8593..215ffc0c5d22 100644 --- a/metricbeat/module/nats/fields.go +++ b/metricbeat/module/nats/fields.go @@ -20,7 +20,7 @@ package nats import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/nats/routes/data.go b/metricbeat/module/nats/routes/data.go index b33c51dd5b90..83581a16a311 100644 --- a/metricbeat/module/nats/routes/data.go +++ b/metricbeat/module/nats/routes/data.go @@ -20,12 +20,12 @@ package routes import ( "encoding/json" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/pkg/errors" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/nats/routes/routes.go b/metricbeat/module/nats/routes/routes.go index ac3337b5a3a2..91b3ad33930f 100644 --- a/metricbeat/module/nats/routes/routes.go +++ b/metricbeat/module/nats/routes/routes.go @@ -20,10 +20,10 @@ package routes import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/nats/routes/routes_integration_test.go b/metricbeat/module/nats/routes/routes_integration_test.go index 306ee96a344c..a10e4be938ee 100644 --- a/metricbeat/module/nats/routes/routes_integration_test.go +++ b/metricbeat/module/nats/routes/routes_integration_test.go @@ -22,8 +22,8 @@ package routes import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/nats/routes/routes_test.go b/metricbeat/module/nats/routes/routes_test.go index eed113547fa5..a76b35c5e1d5 100644 --- a/metricbeat/module/nats/routes/routes_test.go +++ b/metricbeat/module/nats/routes/routes_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/nats/stats/data.go b/metricbeat/module/nats/stats/data.go index 3ec5865b8c58..594276d35bec 100644 --- a/metricbeat/module/nats/stats/data.go +++ b/metricbeat/module/nats/stats/data.go @@ -20,16 +20,16 @@ package stats import ( "encoding/json" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/pkg/errors" "strconv" "strings" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/nats/stats/stats.go b/metricbeat/module/nats/stats/stats.go index e571661e4b51..f146e3f64455 100644 --- a/metricbeat/module/nats/stats/stats.go +++ b/metricbeat/module/nats/stats/stats.go @@ -20,10 +20,10 @@ package stats import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/nats/stats/stats_integration_test.go b/metricbeat/module/nats/stats/stats_integration_test.go index 87585d8a17f0..b95447e9c9d9 100644 --- a/metricbeat/module/nats/stats/stats_integration_test.go +++ b/metricbeat/module/nats/stats/stats_integration_test.go @@ -22,8 +22,8 @@ package stats import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/nats/stats/stats_test.go b/metricbeat/module/nats/stats/stats_test.go index 42c3872df7e9..922ccaf65f40 100644 --- a/metricbeat/module/nats/stats/stats_test.go +++ b/metricbeat/module/nats/stats/stats_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/nats/subscriptions/data.go b/metricbeat/module/nats/subscriptions/data.go index 202faa3677da..a92bcae4b14c 100644 --- a/metricbeat/module/nats/subscriptions/data.go +++ b/metricbeat/module/nats/subscriptions/data.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/nats/subscriptions/subscriptions.go b/metricbeat/module/nats/subscriptions/subscriptions.go index 6333a295a6f1..f1cdfbaa0409 100644 --- a/metricbeat/module/nats/subscriptions/subscriptions.go +++ b/metricbeat/module/nats/subscriptions/subscriptions.go @@ -20,10 +20,10 @@ package subscriptions import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/nats/subscriptions/subscriptions_integration_test.go b/metricbeat/module/nats/subscriptions/subscriptions_integration_test.go index 3b67d32a3ecc..909537b34754 100644 --- a/metricbeat/module/nats/subscriptions/subscriptions_integration_test.go +++ b/metricbeat/module/nats/subscriptions/subscriptions_integration_test.go @@ -22,8 +22,8 @@ package subscriptions import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/nats/subscriptions/subscriptions_test.go b/metricbeat/module/nats/subscriptions/subscriptions_test.go index 434800913462..d0b7e567b4e3 100644 --- a/metricbeat/module/nats/subscriptions/subscriptions_test.go +++ b/metricbeat/module/nats/subscriptions/subscriptions_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestEventMapping(t *testing.T) { diff --git a/metricbeat/module/nginx/fields.go b/metricbeat/module/nginx/fields.go index 0cb1749cd560..3cd6e0856eeb 100644 --- a/metricbeat/module/nginx/fields.go +++ b/metricbeat/module/nginx/fields.go @@ -20,7 +20,7 @@ package nginx import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/nginx/stubstatus/data.go b/metricbeat/module/nginx/stubstatus/data.go index 76044507e21c..c58cabe43dab 100644 --- a/metricbeat/module/nginx/stubstatus/data.go +++ b/metricbeat/module/nginx/stubstatus/data.go @@ -23,7 +23,7 @@ import ( "regexp" "strconv" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var ( diff --git a/metricbeat/module/nginx/stubstatus/stubstatus.go b/metricbeat/module/nginx/stubstatus/stubstatus.go index df613b20453e..e9696b971663 100644 --- a/metricbeat/module/nginx/stubstatus/stubstatus.go +++ b/metricbeat/module/nginx/stubstatus/stubstatus.go @@ -21,10 +21,10 @@ package stubstatus import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/nginx/stubstatus/stubstatus_integration_test.go b/metricbeat/module/nginx/stubstatus/stubstatus_integration_test.go index 82d25943075f..c1024f918f04 100644 --- a/metricbeat/module/nginx/stubstatus/stubstatus_integration_test.go +++ b/metricbeat/module/nginx/stubstatus/stubstatus_integration_test.go @@ -22,8 +22,8 @@ package stubstatus import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/php_fpm/fields.go b/metricbeat/module/php_fpm/fields.go index 15f4d09fe511..7293bc9e2e2d 100644 --- a/metricbeat/module/php_fpm/fields.go +++ b/metricbeat/module/php_fpm/fields.go @@ -20,7 +20,7 @@ package php_fpm import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/php_fpm/pool/data.go b/metricbeat/module/php_fpm/pool/data.go index 356498116f55..a2d6c29a9dac 100644 --- a/metricbeat/module/php_fpm/pool/data.go +++ b/metricbeat/module/php_fpm/pool/data.go @@ -18,8 +18,8 @@ package pool import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/php_fpm/pool/pool.go b/metricbeat/module/php_fpm/pool/pool.go index ae346086d420..ec15fb46915a 100644 --- a/metricbeat/module/php_fpm/pool/pool.go +++ b/metricbeat/module/php_fpm/pool/pool.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/php_fpm" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/php_fpm" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/php_fpm/pool/pool_integration_test.go b/metricbeat/module/php_fpm/pool/pool_integration_test.go index caeaaa823a6d..84be99e00fb8 100644 --- a/metricbeat/module/php_fpm/pool/pool_integration_test.go +++ b/metricbeat/module/php_fpm/pool/pool_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/php_fpm/pool/pool_test.go b/metricbeat/module/php_fpm/pool/pool_test.go index 026cb72c04b8..ec3ea2f5a71e 100644 --- a/metricbeat/module/php_fpm/pool/pool_test.go +++ b/metricbeat/module/php_fpm/pool/pool_test.go @@ -22,9 +22,9 @@ package pool import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/php_fpm" + _ "github.com/elastic/beats/v7/metricbeat/module/php_fpm" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/php_fpm/process/data.go b/metricbeat/module/php_fpm/process/data.go index 705041b101b3..8a5d142ed051 100644 --- a/metricbeat/module/php_fpm/process/data.go +++ b/metricbeat/module/php_fpm/process/data.go @@ -21,9 +21,9 @@ import ( "encoding/json" "strings" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type phpFpmStatus struct { diff --git a/metricbeat/module/php_fpm/process/process.go b/metricbeat/module/php_fpm/process/process.go index 85dde711ae3e..73a78e4ff13e 100644 --- a/metricbeat/module/php_fpm/process/process.go +++ b/metricbeat/module/php_fpm/process/process.go @@ -20,10 +20,10 @@ package process import ( "net/url" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/php_fpm" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/php_fpm" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/php_fpm/process/process_integration_test.go b/metricbeat/module/php_fpm/process/process_integration_test.go index 6fed9acf0cf4..0cb8f3fa1a5f 100644 --- a/metricbeat/module/php_fpm/process/process_integration_test.go +++ b/metricbeat/module/php_fpm/process/process_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/php_fpm/process/process_test.go b/metricbeat/module/php_fpm/process/process_test.go index 490a3bd2c201..7726226a27de 100644 --- a/metricbeat/module/php_fpm/process/process_test.go +++ b/metricbeat/module/php_fpm/process/process_test.go @@ -22,9 +22,9 @@ package process import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/php_fpm" + _ "github.com/elastic/beats/v7/metricbeat/module/php_fpm" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/php_fpm/url.go b/metricbeat/module/php_fpm/url.go index 7cb590309f81..544f18a089a1 100644 --- a/metricbeat/module/php_fpm/url.go +++ b/metricbeat/module/php_fpm/url.go @@ -18,7 +18,7 @@ package php_fpm import ( - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/plugin.go b/metricbeat/module/plugin.go index e96175de6f63..a1c408a2388f 100644 --- a/metricbeat/module/plugin.go +++ b/metricbeat/module/plugin.go @@ -20,9 +20,9 @@ package module import ( "errors" - "github.com/elastic/beats/libbeat/plugin" + "github.com/elastic/beats/v7/libbeat/plugin" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) type modulePlugin struct { diff --git a/metricbeat/module/postgresql/activity/activity.go b/metricbeat/module/postgresql/activity/activity.go index ca519dc4442a..38c8f0ec6213 100644 --- a/metricbeat/module/postgresql/activity/activity.go +++ b/metricbeat/module/postgresql/activity/activity.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/postgresql/activity/activity_integration_test.go b/metricbeat/module/postgresql/activity/activity_integration_test.go index ab7c48d4fbd6..47a91c18ad40 100644 --- a/metricbeat/module/postgresql/activity/activity_integration_test.go +++ b/metricbeat/module/postgresql/activity/activity_integration_test.go @@ -22,10 +22,10 @@ package activity import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/postgresql/activity/data.go b/metricbeat/module/postgresql/activity/data.go index b410d1ada611..7307c4467bfe 100644 --- a/metricbeat/module/postgresql/activity/data.go +++ b/metricbeat/module/postgresql/activity/data.go @@ -20,8 +20,8 @@ package activity import ( "time" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) // Based on: https://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW diff --git a/metricbeat/module/postgresql/bgwriter/bgwriter.go b/metricbeat/module/postgresql/bgwriter/bgwriter.go index 464c87dd6d30..bb7dd702b936 100644 --- a/metricbeat/module/postgresql/bgwriter/bgwriter.go +++ b/metricbeat/module/postgresql/bgwriter/bgwriter.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/postgresql/bgwriter/bgwriter_integration_test.go b/metricbeat/module/postgresql/bgwriter/bgwriter_integration_test.go index d4d5c290e799..0302e6bf292c 100644 --- a/metricbeat/module/postgresql/bgwriter/bgwriter_integration_test.go +++ b/metricbeat/module/postgresql/bgwriter/bgwriter_integration_test.go @@ -22,10 +22,10 @@ package bgwriter import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/postgresql/bgwriter/data.go b/metricbeat/module/postgresql/bgwriter/data.go index a1ab39404e7f..998a558ecc5d 100644 --- a/metricbeat/module/postgresql/bgwriter/data.go +++ b/metricbeat/module/postgresql/bgwriter/data.go @@ -20,8 +20,8 @@ package bgwriter import ( "time" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) var schema = s.Schema{ diff --git a/metricbeat/module/postgresql/database/data.go b/metricbeat/module/postgresql/database/data.go index 90bee79f9763..99d2bdb643fb 100644 --- a/metricbeat/module/postgresql/database/data.go +++ b/metricbeat/module/postgresql/database/data.go @@ -20,8 +20,8 @@ package database import ( "time" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) // Based on https://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-DATABASE-VIEW diff --git a/metricbeat/module/postgresql/database/database.go b/metricbeat/module/postgresql/database/database.go index 4a960b81ead9..0b23a25d27b9 100644 --- a/metricbeat/module/postgresql/database/database.go +++ b/metricbeat/module/postgresql/database/database.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" // Register postgresql database/sql driver _ "github.com/lib/pq" diff --git a/metricbeat/module/postgresql/database/database_integration_test.go b/metricbeat/module/postgresql/database/database_integration_test.go index 9593ec2683c3..b64e410e73aa 100644 --- a/metricbeat/module/postgresql/database/database_integration_test.go +++ b/metricbeat/module/postgresql/database/database_integration_test.go @@ -22,10 +22,10 @@ package database import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/postgresql/fields.go b/metricbeat/module/postgresql/fields.go index 2ded1e5f4ec3..065acbda7230 100644 --- a/metricbeat/module/postgresql/fields.go +++ b/metricbeat/module/postgresql/fields.go @@ -20,7 +20,7 @@ package postgresql import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/postgresql/metricset.go b/metricbeat/module/postgresql/metricset.go index 07cd29f35049..0e591398cde5 100644 --- a/metricbeat/module/postgresql/metricset.go +++ b/metricbeat/module/postgresql/metricset.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" // Register postgresql database/sql driver _ "github.com/lib/pq" diff --git a/metricbeat/module/postgresql/postgresql.go b/metricbeat/module/postgresql/postgresql.go index 043aec486917..61bd5b1e9c41 100644 --- a/metricbeat/module/postgresql/postgresql.go +++ b/metricbeat/module/postgresql/postgresql.go @@ -28,8 +28,8 @@ import ( "github.com/lib/pq" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) func init() { diff --git a/metricbeat/module/postgresql/postgresql_test.go b/metricbeat/module/postgresql/postgresql_test.go index ff4f2ff63aee..85e3c7a332ee 100644 --- a/metricbeat/module/postgresql/postgresql_test.go +++ b/metricbeat/module/postgresql/postgresql_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/postgresql/statement/data.go b/metricbeat/module/postgresql/statement/data.go index bb1c9ac0b742..6dbb9959a0e5 100644 --- a/metricbeat/module/postgresql/statement/data.go +++ b/metricbeat/module/postgresql/statement/data.go @@ -18,8 +18,8 @@ package statement import ( - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" ) // Based on: https://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW diff --git a/metricbeat/module/postgresql/statement/statement.go b/metricbeat/module/postgresql/statement/statement.go index ed58361702d9..c874ec81adac 100644 --- a/metricbeat/module/postgresql/statement/statement.go +++ b/metricbeat/module/postgresql/statement/statement.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/postgresql/statement/statement_integration_test.go b/metricbeat/module/postgresql/statement/statement_integration_test.go index 3a707114cdc7..365a5acbdb87 100644 --- a/metricbeat/module/postgresql/statement/statement_integration_test.go +++ b/metricbeat/module/postgresql/statement/statement_integration_test.go @@ -22,10 +22,10 @@ package statement import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/postgresql" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/postgresql" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/prometheus/collector/collector.go b/metricbeat/module/prometheus/collector/collector.go index c23b08a1fa04..3a4ab55be3f5 100644 --- a/metricbeat/module/prometheus/collector/collector.go +++ b/metricbeat/module/prometheus/collector/collector.go @@ -23,10 +23,10 @@ import ( "github.com/pkg/errors" dto "github.com/prometheus/client_model/go" - "github.com/elastic/beats/libbeat/common" - p "github.com/elastic/beats/metricbeat/helper/prometheus" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + p "github.com/elastic/beats/v7/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( diff --git a/metricbeat/module/prometheus/collector/collector_test.go b/metricbeat/module/prometheus/collector/collector_test.go index 55bb2a9f1099..88a361c623e9 100644 --- a/metricbeat/module/prometheus/collector/collector_test.go +++ b/metricbeat/module/prometheus/collector/collector_test.go @@ -22,16 +22,16 @@ package collector import ( "testing" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/golang/protobuf/proto" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/prometheus" + _ "github.com/elastic/beats/v7/metricbeat/module/prometheus" ) func TestGetPromEventsFromMetricFamily(t *testing.T) { diff --git a/metricbeat/module/prometheus/collector/data.go b/metricbeat/module/prometheus/collector/data.go index 2ace395590e8..1651bf3752e9 100644 --- a/metricbeat/module/prometheus/collector/data.go +++ b/metricbeat/module/prometheus/collector/data.go @@ -21,8 +21,8 @@ import ( "math" "strconv" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper/prometheus" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper/prometheus" dto "github.com/prometheus/client_model/go" ) diff --git a/metricbeat/module/prometheus/fields.go b/metricbeat/module/prometheus/fields.go index 5123688cad5e..244b9b62dd6b 100644 --- a/metricbeat/module/prometheus/fields.go +++ b/metricbeat/module/prometheus/fields.go @@ -20,7 +20,7 @@ package prometheus import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/rabbitmq/connection/connection.go b/metricbeat/module/rabbitmq/connection/connection.go index 76773460a7f6..e9cb4bce96ef 100644 --- a/metricbeat/module/rabbitmq/connection/connection.go +++ b/metricbeat/module/rabbitmq/connection/connection.go @@ -20,8 +20,8 @@ package connection import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/rabbitmq" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq" ) func init() { diff --git a/metricbeat/module/rabbitmq/connection/connection_test.go b/metricbeat/module/rabbitmq/connection/connection_test.go index 9dac8fb0661d..d5acf1abbb69 100644 --- a/metricbeat/module/rabbitmq/connection/connection_test.go +++ b/metricbeat/module/rabbitmq/connection/connection_test.go @@ -20,13 +20,13 @@ package connection import ( "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/rabbitmq/mtest" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/mtest" "github.com/stretchr/testify/assert" - _ "github.com/elastic/beats/metricbeat/module/rabbitmq" + _ "github.com/elastic/beats/v7/metricbeat/module/rabbitmq" ) func TestFetchEventContents(t *testing.T) { diff --git a/metricbeat/module/rabbitmq/connection/data.go b/metricbeat/module/rabbitmq/connection/data.go index 955f44dac7bc..1649319acf52 100644 --- a/metricbeat/module/rabbitmq/connection/data.go +++ b/metricbeat/module/rabbitmq/connection/data.go @@ -22,10 +22,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/rabbitmq/exchange/data.go b/metricbeat/module/rabbitmq/exchange/data.go index 73c398ee2fef..1ccda5060638 100644 --- a/metricbeat/module/rabbitmq/exchange/data.go +++ b/metricbeat/module/rabbitmq/exchange/data.go @@ -22,10 +22,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/rabbitmq/exchange/exchange.go b/metricbeat/module/rabbitmq/exchange/exchange.go index 38353a89d827..969414b96222 100644 --- a/metricbeat/module/rabbitmq/exchange/exchange.go +++ b/metricbeat/module/rabbitmq/exchange/exchange.go @@ -20,8 +20,8 @@ package exchange import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/rabbitmq" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq" ) func init() { diff --git a/metricbeat/module/rabbitmq/exchange/exchange_test.go b/metricbeat/module/rabbitmq/exchange/exchange_test.go index cc550e34b597..6bb9136a634c 100644 --- a/metricbeat/module/rabbitmq/exchange/exchange_test.go +++ b/metricbeat/module/rabbitmq/exchange/exchange_test.go @@ -20,9 +20,9 @@ package exchange import ( "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/rabbitmq/mtest" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/mtest" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/rabbitmq/fields.go b/metricbeat/module/rabbitmq/fields.go index 5aec2be67281..e737f5f5808c 100644 --- a/metricbeat/module/rabbitmq/fields.go +++ b/metricbeat/module/rabbitmq/fields.go @@ -20,7 +20,7 @@ package rabbitmq import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/rabbitmq/metricset.go b/metricbeat/module/rabbitmq/metricset.go index e3de5c62104f..ab747dbc673e 100644 --- a/metricbeat/module/rabbitmq/metricset.go +++ b/metricbeat/module/rabbitmq/metricset.go @@ -18,8 +18,8 @@ package rabbitmq import ( - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" ) // MetricSet can be used to build other metric sets that query RabbitMQ diff --git a/metricbeat/module/rabbitmq/metricset_test.go b/metricbeat/module/rabbitmq/metricset_test.go index 0c34908660b1..2d9d0c51cb5f 100644 --- a/metricbeat/module/rabbitmq/metricset_test.go +++ b/metricbeat/module/rabbitmq/metricset_test.go @@ -20,11 +20,11 @@ package rabbitmq import ( "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/rabbitmq/mtest" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/mtest" ) var logger = logp.NewLogger("rabbitmq") diff --git a/metricbeat/module/rabbitmq/node/data.go b/metricbeat/module/rabbitmq/node/data.go index 4c5dc41d8701..2a84a1db029b 100644 --- a/metricbeat/module/rabbitmq/node/data.go +++ b/metricbeat/module/rabbitmq/node/data.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" - "github.com/elastic/beats/metricbeat/mb" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/rabbitmq/node/node.go b/metricbeat/module/rabbitmq/node/node.go index ac93f4d080bf..bd6a56f1b979 100644 --- a/metricbeat/module/rabbitmq/node/node.go +++ b/metricbeat/module/rabbitmq/node/node.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/rabbitmq" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq" ) func init() { diff --git a/metricbeat/module/rabbitmq/node/node_integration_test.go b/metricbeat/module/rabbitmq/node/node_integration_test.go index 3a0760a67723..76d13ce863fa 100644 --- a/metricbeat/module/rabbitmq/node/node_integration_test.go +++ b/metricbeat/module/rabbitmq/node/node_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/rabbitmq/mtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/mtest" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/rabbitmq/node/node_test.go b/metricbeat/module/rabbitmq/node/node_test.go index e8786aaa678f..bc68b824ebc7 100644 --- a/metricbeat/module/rabbitmq/node/node_test.go +++ b/metricbeat/module/rabbitmq/node/node_test.go @@ -20,9 +20,9 @@ package node import ( "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/rabbitmq/mtest" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/mtest" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/rabbitmq/queue/data.go b/metricbeat/module/rabbitmq/queue/data.go index 2399f48e013b..a1d4b15a5c1c 100644 --- a/metricbeat/module/rabbitmq/queue/data.go +++ b/metricbeat/module/rabbitmq/queue/data.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/rabbitmq/queue/queue.go b/metricbeat/module/rabbitmq/queue/queue.go index 36346ceab1e0..b10b0ca00106 100644 --- a/metricbeat/module/rabbitmq/queue/queue.go +++ b/metricbeat/module/rabbitmq/queue/queue.go @@ -20,8 +20,8 @@ package queue import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/rabbitmq" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq" ) func init() { diff --git a/metricbeat/module/rabbitmq/queue/queue_test.go b/metricbeat/module/rabbitmq/queue/queue_test.go index 41b5cd58b006..5c9438c2a641 100644 --- a/metricbeat/module/rabbitmq/queue/queue_test.go +++ b/metricbeat/module/rabbitmq/queue/queue_test.go @@ -20,9 +20,9 @@ package queue import ( "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/rabbitmq/mtest" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/rabbitmq/mtest" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/rabbitmq/url.go b/metricbeat/module/rabbitmq/url.go index a50f73acd7dc..299901811e86 100644 --- a/metricbeat/module/rabbitmq/url.go +++ b/metricbeat/module/rabbitmq/url.go @@ -18,7 +18,7 @@ package rabbitmq import ( - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) // Subpaths to management plugin endpoints diff --git a/metricbeat/module/redis/fields.go b/metricbeat/module/redis/fields.go index fd28937ec4b0..5ec77a243184 100644 --- a/metricbeat/module/redis/fields.go +++ b/metricbeat/module/redis/fields.go @@ -20,7 +20,7 @@ package redis import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/redis/info/data.go b/metricbeat/module/redis/info/data.go index d1ac1bcc0f57..2e3b4e4b32f2 100644 --- a/metricbeat/module/redis/info/data.go +++ b/metricbeat/module/redis/info/data.go @@ -18,10 +18,10 @@ package info import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/redis/info/info.go b/metricbeat/module/redis/info/info.go index 0570710b2019..2d1f88c775de 100644 --- a/metricbeat/module/redis/info/info.go +++ b/metricbeat/module/redis/info/info.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/redis" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/redis" ) var hostParser = parse.URLHostParserBuilder{DefaultScheme: "redis"}.Build() diff --git a/metricbeat/module/redis/info/info_integration_test.go b/metricbeat/module/redis/info/info_integration_test.go index 576103c75d31..044685d4885c 100644 --- a/metricbeat/module/redis/info/info_integration_test.go +++ b/metricbeat/module/redis/info/info_integration_test.go @@ -22,9 +22,9 @@ package info import ( "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/redis/info/info_test.go b/metricbeat/module/redis/info/info_test.go index bb02fc296922..99798bc95096 100644 --- a/metricbeat/module/redis/info/info_test.go +++ b/metricbeat/module/redis/info/info_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestNewMetricSet(t *testing.T) { diff --git a/metricbeat/module/redis/key/data.go b/metricbeat/module/redis/key/data.go index 076a5bce3490..d6fd8134d876 100644 --- a/metricbeat/module/redis/key/data.go +++ b/metricbeat/module/redis/key/data.go @@ -20,8 +20,8 @@ package key import ( "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) func eventMapping(keyspace uint, info map[string]interface{}) mb.Event { diff --git a/metricbeat/module/redis/key/key.go b/metricbeat/module/redis/key/key.go index 6eab8d0aeaaf..c01fe25a3185 100644 --- a/metricbeat/module/redis/key/key.go +++ b/metricbeat/module/redis/key/key.go @@ -22,9 +22,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/redis" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/redis" ) var hostParser = parse.URLHostParserBuilder{DefaultScheme: "redis"}.Build() diff --git a/metricbeat/module/redis/key/key_integration_test.go b/metricbeat/module/redis/key/key_integration_test.go index 2a804d9a63b6..bbe7b4831dca 100644 --- a/metricbeat/module/redis/key/key_integration_test.go +++ b/metricbeat/module/redis/key/key_integration_test.go @@ -26,9 +26,9 @@ import ( rd "github.com/garyburd/redigo/redis" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/redis/keyspace/data.go b/metricbeat/module/redis/keyspace/data.go index e5050e4f4004..91f181305a96 100644 --- a/metricbeat/module/redis/keyspace/data.go +++ b/metricbeat/module/redis/keyspace/data.go @@ -20,11 +20,11 @@ package keyspace import ( "strings" - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/redis" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/redis" ) // Map data to MapStr diff --git a/metricbeat/module/redis/keyspace/keyspace.go b/metricbeat/module/redis/keyspace/keyspace.go index fba7166341f2..a9710fa67f9b 100644 --- a/metricbeat/module/redis/keyspace/keyspace.go +++ b/metricbeat/module/redis/keyspace/keyspace.go @@ -20,9 +20,9 @@ package keyspace import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/redis" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/redis" ) var hostParser = parse.URLHostParserBuilder{DefaultScheme: "redis"}.Build() diff --git a/metricbeat/module/redis/keyspace/keyspace_integration_test.go b/metricbeat/module/redis/keyspace/keyspace_integration_test.go index e0b51c25dde7..239283f0f688 100644 --- a/metricbeat/module/redis/keyspace/keyspace_integration_test.go +++ b/metricbeat/module/redis/keyspace/keyspace_integration_test.go @@ -23,8 +23,8 @@ import ( "strings" "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" rd "github.com/garyburd/redigo/redis" "github.com/stretchr/testify/assert" diff --git a/metricbeat/module/redis/metricset.go b/metricbeat/module/redis/metricset.go index 72e3a9f1e5f6..dbd600f48389 100644 --- a/metricbeat/module/redis/metricset.go +++ b/metricbeat/module/redis/metricset.go @@ -26,7 +26,7 @@ import ( rd "github.com/garyburd/redigo/redis" "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) // MetricSet for fetching Redis server information and statistics. diff --git a/metricbeat/module/redis/metricset_integration_test.go b/metricbeat/module/redis/metricset_integration_test.go index 7d972030bb37..6f59508c323d 100644 --- a/metricbeat/module/redis/metricset_integration_test.go +++ b/metricbeat/module/redis/metricset_integration_test.go @@ -26,10 +26,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) const ( @@ -37,7 +37,7 @@ const ( ) func TestPasswords(t *testing.T) { - t.Skip("Changing password affects other tests, see https://github.com/elastic/beats/issues/10955") + t.Skip("Changing password affects other tests, see https://github.com/elastic/beats/v7/issues/10955") service := compose.EnsureUp(t, "redis") host := service.Host() diff --git a/metricbeat/module/redis/metricset_test.go b/metricbeat/module/redis/metricset_test.go index 9f9f5024f185..6e0235154068 100644 --- a/metricbeat/module/redis/metricset_test.go +++ b/metricbeat/module/redis/metricset_test.go @@ -22,7 +22,7 @@ package redis import ( "testing" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/redis/redis.go b/metricbeat/module/redis/redis.go index 11d55279f51d..2167a95fd7a5 100644 --- a/metricbeat/module/redis/redis.go +++ b/metricbeat/module/redis/redis.go @@ -26,7 +26,7 @@ import ( rd "github.com/garyburd/redigo/redis" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // Redis types diff --git a/metricbeat/module/redis/redis_integration_test.go b/metricbeat/module/redis/redis_integration_test.go index c33df1556f0d..ccf6e59d46f4 100644 --- a/metricbeat/module/redis/redis_integration_test.go +++ b/metricbeat/module/redis/redis_integration_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/tests/compose" - _ "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + _ "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetchRedisInfo(t *testing.T) { diff --git a/metricbeat/module/system/core/config.go b/metricbeat/module/system/core/config.go index 1e8e0e11be95..e47b7d7cd5cc 100644 --- a/metricbeat/module/system/core/config.go +++ b/metricbeat/module/system/core/config.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" ) // Core metric types. diff --git a/metricbeat/module/system/core/core.go b/metricbeat/module/system/core/core.go index 4c91b144cddc..9fdb3178a16c 100644 --- a/metricbeat/module/system/core/core.go +++ b/metricbeat/module/system/core/core.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/metric/system/cpu" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/metric/system/cpu" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) func init() { diff --git a/metricbeat/module/system/core/core_test.go b/metricbeat/module/system/core/core_test.go index c3c6c09a3b9c..3e8a66f7bd8a 100644 --- a/metricbeat/module/system/core/core_test.go +++ b/metricbeat/module/system/core/core_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/cpu/config.go b/metricbeat/module/system/cpu/config.go index 291ee7963ef0..4e19f25f512a 100644 --- a/metricbeat/module/system/cpu/config.go +++ b/metricbeat/module/system/cpu/config.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" ) // CPU metric types. diff --git a/metricbeat/module/system/cpu/cpu.go b/metricbeat/module/system/cpu/cpu.go index d743cb5a2524..8d017f0d3733 100644 --- a/metricbeat/module/system/cpu/cpu.go +++ b/metricbeat/module/system/cpu/cpu.go @@ -24,10 +24,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/metric/system/cpu" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/metric/system/cpu" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) func init() { diff --git a/metricbeat/module/system/cpu/cpu_test.go b/metricbeat/module/system/cpu/cpu_test.go index e218399c0356..e3b7ba6645cb 100644 --- a/metricbeat/module/system/cpu/cpu_test.go +++ b/metricbeat/module/system/cpu/cpu_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/diskio/diskio.go b/metricbeat/module/system/diskio/diskio.go index d60d6f8bd5b5..80c494409a3b 100644 --- a/metricbeat/module/system/diskio/diskio.go +++ b/metricbeat/module/system/diskio/diskio.go @@ -20,9 +20,9 @@ package diskio import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" "github.com/pkg/errors" ) diff --git a/metricbeat/module/system/diskio/diskio_test.go b/metricbeat/module/system/diskio/diskio_test.go index 945fbe63785f..aabc44c374b8 100644 --- a/metricbeat/module/system/diskio/diskio_test.go +++ b/metricbeat/module/system/diskio/diskio_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/diskio/diskstat_linux.go b/metricbeat/module/system/diskio/diskstat_linux.go index edff3df61a54..4ecfdf700ac6 100644 --- a/metricbeat/module/system/diskio/diskstat_linux.go +++ b/metricbeat/module/system/diskio/diskstat_linux.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/shirou/gopsutil/disk" - "github.com/elastic/beats/libbeat/metric/system/cpu" + "github.com/elastic/beats/v7/libbeat/metric/system/cpu" ) func Get_CLK_TCK() uint32 { diff --git a/metricbeat/module/system/diskio/diskstat_linux_test.go b/metricbeat/module/system/diskio/diskstat_linux_test.go index 9687f278b871..56a8d9dc7cce 100644 --- a/metricbeat/module/system/diskio/diskstat_linux_test.go +++ b/metricbeat/module/system/diskio/diskstat_linux_test.go @@ -28,8 +28,8 @@ import ( sigar "github.com/elastic/gosigar" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/system" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/system" ) func Test_Get_CLK_TCK(t *testing.T) { diff --git a/metricbeat/module/system/diskio/diskstat_windows_helper.go b/metricbeat/module/system/diskio/diskstat_windows_helper.go index 55b0d2d292fd..8f218b81b8c5 100644 --- a/metricbeat/module/system/diskio/diskstat_windows_helper.go +++ b/metricbeat/module/system/diskio/diskstat_windows_helper.go @@ -29,7 +29,7 @@ import ( "golang.org/x/sys/windows" "golang.org/x/sys/windows/registry" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/metricbeat/module/system/diskio/diskstat_windows_test.go b/metricbeat/module/system/diskio/diskstat_windows_test.go index c7536c4e7511..0f20f581212c 100644 --- a/metricbeat/module/system/diskio/diskstat_windows_test.go +++ b/metricbeat/module/system/diskio/diskstat_windows_test.go @@ -23,11 +23,11 @@ package diskio import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestCDriveFilterOnWindowsTestEnv(t *testing.T) { diff --git a/metricbeat/module/system/entropy/entropy.go b/metricbeat/module/system/entropy/entropy.go index 2e11973c0172..15792ae07efd 100644 --- a/metricbeat/module/system/entropy/entropy.go +++ b/metricbeat/module/system/entropy/entropy.go @@ -27,10 +27,10 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/system" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/system" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/system/entropy/entropy_test.go b/metricbeat/module/system/entropy/entropy_test.go index 4f5c85417177..ed4f94595ea7 100644 --- a/metricbeat/module/system/entropy/entropy_test.go +++ b/metricbeat/module/system/entropy/entropy_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/system" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/system" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/system/fields.go b/metricbeat/module/system/fields.go index f2800f92a1be..31eb04eb4e78 100644 --- a/metricbeat/module/system/fields.go +++ b/metricbeat/module/system/fields.go @@ -20,7 +20,7 @@ package system import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/system/filesystem/filesystem.go b/metricbeat/module/system/filesystem/filesystem.go index 0513e5d68d03..765a874cb75a 100644 --- a/metricbeat/module/system/filesystem/filesystem.go +++ b/metricbeat/module/system/filesystem/filesystem.go @@ -22,9 +22,9 @@ package filesystem import ( "strings" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" "github.com/pkg/errors" ) diff --git a/metricbeat/module/system/filesystem/filesystem_test.go b/metricbeat/module/system/filesystem/filesystem_test.go index 2baa16c3f492..87ea5c072f32 100644 --- a/metricbeat/module/system/filesystem/filesystem_test.go +++ b/metricbeat/module/system/filesystem/filesystem_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/filesystem/helper.go b/metricbeat/module/system/filesystem/helper.go index b9386188747c..d64ef95f5627 100644 --- a/metricbeat/module/system/filesystem/helper.go +++ b/metricbeat/module/system/filesystem/helper.go @@ -29,8 +29,8 @@ import ( "runtime" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/system" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/system" sigar "github.com/elastic/gosigar" ) diff --git a/metricbeat/module/system/fsstat/fsstat.go b/metricbeat/module/system/fsstat/fsstat.go index 84b08ab518a2..a8a1eaa0c94b 100644 --- a/metricbeat/module/system/fsstat/fsstat.go +++ b/metricbeat/module/system/fsstat/fsstat.go @@ -22,10 +22,10 @@ package fsstat import ( "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/system/filesystem" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/system/filesystem" "github.com/pkg/errors" ) diff --git a/metricbeat/module/system/fsstat/fsstat_test.go b/metricbeat/module/system/fsstat/fsstat_test.go index 8a69c6e21827..df591a108989 100644 --- a/metricbeat/module/system/fsstat/fsstat_test.go +++ b/metricbeat/module/system/fsstat/fsstat_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/load/load.go b/metricbeat/module/system/load/load.go index ead230272d5b..1e7a6fe2b3bc 100644 --- a/metricbeat/module/system/load/load.go +++ b/metricbeat/module/system/load/load.go @@ -22,10 +22,10 @@ package load import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/metric/system/cpu" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/metric/system/cpu" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) func init() { diff --git a/metricbeat/module/system/load/load_test.go b/metricbeat/module/system/load/load_test.go index 82e2d5d09302..6a8fadcc797e 100644 --- a/metricbeat/module/system/load/load_test.go +++ b/metricbeat/module/system/load/load_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/memory/memory.go b/metricbeat/module/system/memory/memory.go index 76b3e6c0541b..90283f801bef 100644 --- a/metricbeat/module/system/memory/memory.go +++ b/metricbeat/module/system/memory/memory.go @@ -20,10 +20,10 @@ package memory import ( - "github.com/elastic/beats/libbeat/common" - mem "github.com/elastic/beats/libbeat/metric/system/memory" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + mem "github.com/elastic/beats/v7/libbeat/metric/system/memory" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" "github.com/pkg/errors" ) diff --git a/metricbeat/module/system/memory/memory_test.go b/metricbeat/module/system/memory/memory_test.go index 9d91c38fe501..978d2de8ae1e 100644 --- a/metricbeat/module/system/memory/memory_test.go +++ b/metricbeat/module/system/memory/memory_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/network/network.go b/metricbeat/module/system/network/network.go index abdcda11a984..d9c04d834202 100644 --- a/metricbeat/module/system/network/network.go +++ b/metricbeat/module/system/network/network.go @@ -22,10 +22,10 @@ package network import ( "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" "github.com/pkg/errors" "github.com/shirou/gopsutil/net" diff --git a/metricbeat/module/system/network/network_test.go b/metricbeat/module/system/network/network_test.go index 28fb3aca809f..999a1b91cde8 100644 --- a/metricbeat/module/system/network/network_test.go +++ b/metricbeat/module/system/network/network_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/network_summary/data.go b/metricbeat/module/system/network_summary/data.go index 883f0c0d3170..95b530c93252 100644 --- a/metricbeat/module/system/network_summary/data.go +++ b/metricbeat/module/system/network_summary/data.go @@ -18,7 +18,7 @@ package network_summary import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" sysinfotypes "github.com/elastic/go-sysinfo/types" ) diff --git a/metricbeat/module/system/network_summary/network_summary.go b/metricbeat/module/system/network_summary/network_summary.go index ff2c7e163bff..bbb27d589b04 100644 --- a/metricbeat/module/system/network_summary/network_summary.go +++ b/metricbeat/module/system/network_summary/network_summary.go @@ -20,8 +20,8 @@ package network_summary import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" sysinfo "github.com/elastic/go-sysinfo" sysinfotypes "github.com/elastic/go-sysinfo/types" ) diff --git a/metricbeat/module/system/network_summary/network_summary_test.go b/metricbeat/module/system/network_summary/network_summary_test.go index 85eef635b7ca..bd2ba95d0068 100644 --- a/metricbeat/module/system/network_summary/network_summary_test.go +++ b/metricbeat/module/system/network_summary/network_summary_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/elastic/go-sysinfo/types" ) diff --git a/metricbeat/module/system/process/cgroup.go b/metricbeat/module/system/process/cgroup.go index bd46e1addea1..c71dc7fe34d3 100644 --- a/metricbeat/module/system/process/cgroup.go +++ b/metricbeat/module/system/process/cgroup.go @@ -20,7 +20,7 @@ package process import ( "strconv" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/gosigar/cgroup" ) diff --git a/metricbeat/module/system/process/config.go b/metricbeat/module/system/process/config.go index 43caeb8b22ef..317515b93f08 100644 --- a/metricbeat/module/system/process/config.go +++ b/metricbeat/module/system/process/config.go @@ -18,8 +18,8 @@ package process import ( - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/metric/system/process" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/metric/system/process" ) // Config stores the system/process config options diff --git a/metricbeat/module/system/process/process.go b/metricbeat/module/system/process/process.go index 98d941cc4f87..9c7541773726 100644 --- a/metricbeat/module/system/process/process.go +++ b/metricbeat/module/system/process/process.go @@ -25,12 +25,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/metric/system/process" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/system" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/metric/system/process" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/system" "github.com/elastic/gosigar/cgroup" ) diff --git a/metricbeat/module/system/process/process_test.go b/metricbeat/module/system/process/process_test.go index 0ee4c76e00a3..c997410a4bb3 100644 --- a/metricbeat/module/system/process/process_test.go +++ b/metricbeat/module/system/process/process_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/system/process_summary/process_summary.go b/metricbeat/module/system/process_summary/process_summary.go index 4759869a2343..071a7b2a6608 100644 --- a/metricbeat/module/system/process_summary/process_summary.go +++ b/metricbeat/module/system/process_summary/process_summary.go @@ -22,11 +22,11 @@ package process_summary import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/metric/system/process" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/metric/system/process" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" sigar "github.com/elastic/gosigar" ) diff --git a/metricbeat/module/system/process_summary/process_summary_test.go b/metricbeat/module/system/process_summary/process_summary_test.go index 868ccf9542c1..55afce8f190e 100644 --- a/metricbeat/module/system/process_summary/process_summary_test.go +++ b/metricbeat/module/system/process_summary/process_summary_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/system/raid/blockinfo/blockinfo.go b/metricbeat/module/system/raid/blockinfo/blockinfo.go index cb5a62b6067c..f0dbd982238f 100644 --- a/metricbeat/module/system/raid/blockinfo/blockinfo.go +++ b/metricbeat/module/system/raid/blockinfo/blockinfo.go @@ -17,7 +17,7 @@ package blockinfo -import "github.com/elastic/beats/libbeat/common" +import "github.com/elastic/beats/v7/libbeat/common" // SyncStatus represents the status of a sync action as Complete/Total. Will be 0/0 if no sync action is going on type SyncStatus struct { diff --git a/metricbeat/module/system/raid/blockinfo/parser.go b/metricbeat/module/system/raid/blockinfo/parser.go index 35dff46bd891..7d0eb7561dba 100644 --- a/metricbeat/module/system/raid/blockinfo/parser.go +++ b/metricbeat/module/system/raid/blockinfo/parser.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var debugf = logp.MakeDebug("system.raid") diff --git a/metricbeat/module/system/raid/raid.go b/metricbeat/module/system/raid/raid.go index 78f497ba0f01..bf542dbb93b9 100644 --- a/metricbeat/module/system/raid/raid.go +++ b/metricbeat/module/system/raid/raid.go @@ -23,11 +23,11 @@ import ( "github.com/pkg/errors" "github.com/prometheus/procfs" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/system" - "github.com/elastic/beats/metricbeat/module/system/raid/blockinfo" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/system" + "github.com/elastic/beats/v7/metricbeat/module/system/raid/blockinfo" ) func init() { diff --git a/metricbeat/module/system/raid/raid_test.go b/metricbeat/module/system/raid/raid_test.go index cfbd2881d64e..f1ebaa97270b 100644 --- a/metricbeat/module/system/raid/raid_test.go +++ b/metricbeat/module/system/raid/raid_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/system/service/data.go b/metricbeat/module/system/service/data.go index 36c143df63c8..eda9eae0f6ab 100644 --- a/metricbeat/module/system/service/data.go +++ b/metricbeat/module/system/service/data.go @@ -22,11 +22,11 @@ package service import ( "time" - "github.com/coreos/go-systemd/dbus" + "github.com/coreos/go-systemd/v22/dbus" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Properties is a struct representation of the dbus returns from GetAllProperties diff --git a/metricbeat/module/system/service/service.go b/metricbeat/module/system/service/service.go index ca5db61319b2..d29859418943 100644 --- a/metricbeat/module/system/service/service.go +++ b/metricbeat/module/system/service/service.go @@ -20,12 +20,12 @@ package service import ( - "github.com/coreos/go-systemd/dbus" + "github.com/coreos/go-systemd/v22/dbus" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" ) // Config stores the config object diff --git a/metricbeat/module/system/service/service_test.go b/metricbeat/module/system/service/service_test.go index 0335bc11129c..53f4343981dc 100644 --- a/metricbeat/module/system/service/service_test.go +++ b/metricbeat/module/system/service/service_test.go @@ -23,10 +23,10 @@ import ( "testing" "time" - "github.com/coreos/go-systemd/dbus" + "github.com/coreos/go-systemd/v22/dbus" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func TestFormProps(t *testing.T) { diff --git a/metricbeat/module/system/socket/socket.go b/metricbeat/module/system/socket/socket.go index 72d6b31184c6..bca2b795af19 100644 --- a/metricbeat/module/system/socket/socket.go +++ b/metricbeat/module/system/socket/socket.go @@ -30,12 +30,12 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - sock "github.com/elastic/beats/metricbeat/helper/socket" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/system" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + sock "github.com/elastic/beats/v7/metricbeat/helper/socket" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/system" "github.com/elastic/gosigar/sys/linux" ) diff --git a/metricbeat/module/system/socket/socket_test.go b/metricbeat/module/system/socket/socket_test.go index 7430e7f2c37d..ccf23d99d7ab 100644 --- a/metricbeat/module/system/socket/socket_test.go +++ b/metricbeat/module/system/socket/socket_test.go @@ -31,9 +31,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/elastic/beats/libbeat/common" - sock "github.com/elastic/beats/metricbeat/helper/socket" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + sock "github.com/elastic/beats/v7/metricbeat/helper/socket" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/system/socket_summary/socket_summary.go b/metricbeat/module/system/socket_summary/socket_summary.go index 6a1e3f73411f..928b5fe91f16 100644 --- a/metricbeat/module/system/socket_summary/socket_summary.go +++ b/metricbeat/module/system/socket_summary/socket_summary.go @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" "github.com/shirou/gopsutil/net" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/system/socket_summary/sockstat_linux.go b/metricbeat/module/system/socket_summary/sockstat_linux.go index 799456b66705..60836b6c1c28 100644 --- a/metricbeat/module/system/socket_summary/sockstat_linux.go +++ b/metricbeat/module/system/socket_summary/sockstat_linux.go @@ -28,8 +28,8 @@ import ( "github.com/pkg/errors" "github.com/shirou/gopsutil/net" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/module/system" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/module/system" ) // SockStat contains data from /proc/net/sockstat diff --git a/metricbeat/module/system/socket_summary/sockstat_other.go b/metricbeat/module/system/socket_summary/sockstat_other.go index eabaa26ead8b..495c7d31c7b3 100644 --- a/metricbeat/module/system/socket_summary/sockstat_other.go +++ b/metricbeat/module/system/socket_summary/sockstat_other.go @@ -22,7 +22,7 @@ package socket_summary import ( "github.com/shirou/gopsutil/net" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) //a stub function for non-linux systems diff --git a/metricbeat/module/system/system.go b/metricbeat/module/system/system.go index 6f0ac639694e..edb9f55bf6b4 100644 --- a/metricbeat/module/system/system.go +++ b/metricbeat/module/system/system.go @@ -21,7 +21,7 @@ import ( "flag" "sync" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/system/system_windows.go b/metricbeat/module/system/system_windows.go index b59e6c94bbba..154481eb657e 100644 --- a/metricbeat/module/system/system_windows.go +++ b/metricbeat/module/system/system_windows.go @@ -18,8 +18,8 @@ package system import ( - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" ) func initModule() { diff --git a/metricbeat/module/system/uptime/uptime.go b/metricbeat/module/system/uptime/uptime.go index 1e4ebeada431..cbefa8bd4b46 100644 --- a/metricbeat/module/system/uptime/uptime.go +++ b/metricbeat/module/system/uptime/uptime.go @@ -22,9 +22,9 @@ package uptime import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" sigar "github.com/elastic/gosigar" ) diff --git a/metricbeat/module/system/uptime/uptime_test.go b/metricbeat/module/system/uptime/uptime_test.go index f7262b51003f..d0542c50db09 100644 --- a/metricbeat/module/system/uptime/uptime_test.go +++ b/metricbeat/module/system/uptime/uptime_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/traefik/fields.go b/metricbeat/module/traefik/fields.go index 435d812f901d..d18ad7398e8c 100644 --- a/metricbeat/module/traefik/fields.go +++ b/metricbeat/module/traefik/fields.go @@ -20,7 +20,7 @@ package traefik import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/traefik/health/data.go b/metricbeat/module/traefik/health/data.go index 5cc5bc5020d9..5d00a02399da 100644 --- a/metricbeat/module/traefik/health/data.go +++ b/metricbeat/module/traefik/health/data.go @@ -18,9 +18,9 @@ package health import ( - "github.com/elastic/beats/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstriface" + "github.com/elastic/beats/v7/libbeat/common" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstriface" ) var ( diff --git a/metricbeat/module/traefik/health/data_test.go b/metricbeat/module/traefik/health/data_test.go index 1b0d2731ad11..ad710e43d2ed 100644 --- a/metricbeat/module/traefik/health/data_test.go +++ b/metricbeat/module/traefik/health/data_test.go @@ -22,7 +22,7 @@ package health import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/traefik/health/health.go b/metricbeat/module/traefik/health/health.go index 619d4444db9b..23e94e9619c8 100644 --- a/metricbeat/module/traefik/health/health.go +++ b/metricbeat/module/traefik/health/health.go @@ -20,10 +20,10 @@ package health import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/traefik/health/health_integration_test.go b/metricbeat/module/traefik/health/health_integration_test.go index cb97424ce293..6f9aa36f48b4 100644 --- a/metricbeat/module/traefik/health/health_integration_test.go +++ b/metricbeat/module/traefik/health/health_integration_test.go @@ -23,9 +23,9 @@ import ( "net/http" "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" - "github.com/elastic/beats/metricbeat/module/traefik/mtest" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/module/traefik/mtest" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/traefik/health/health_test.go b/metricbeat/module/traefik/health/health_test.go index a0de08d6a7fa..7d96d7d88fa0 100644 --- a/metricbeat/module/traefik/health/health_test.go +++ b/metricbeat/module/traefik/health/health_test.go @@ -28,10 +28,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" - _ "github.com/elastic/beats/metricbeat/module/traefik" + _ "github.com/elastic/beats/v7/metricbeat/module/traefik" ) func TestFetchEventContents(t *testing.T) { diff --git a/metricbeat/module/uwsgi/fields.go b/metricbeat/module/uwsgi/fields.go index ae4bbd43f230..120cb4a8a24d 100644 --- a/metricbeat/module/uwsgi/fields.go +++ b/metricbeat/module/uwsgi/fields.go @@ -20,7 +20,7 @@ package uwsgi import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/uwsgi/status/data.go b/metricbeat/module/uwsgi/status/data.go index 437fdcbb0ee9..7b371a44b780 100644 --- a/metricbeat/module/uwsgi/status/data.go +++ b/metricbeat/module/uwsgi/status/data.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" ) type uwsgiCore struct { diff --git a/metricbeat/module/uwsgi/status/status.go b/metricbeat/module/uwsgi/status/status.go index 84971e553999..334662d89794 100644 --- a/metricbeat/module/uwsgi/status/status.go +++ b/metricbeat/module/uwsgi/status/status.go @@ -28,9 +28,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/module/uwsgi" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/module/uwsgi" ) func init() { diff --git a/metricbeat/module/uwsgi/status/status_integration_test.go b/metricbeat/module/uwsgi/status/status_integration_test.go index 97b869f4a3e5..cfcf9271dc6e 100644 --- a/metricbeat/module/uwsgi/status/status_integration_test.go +++ b/metricbeat/module/uwsgi/status/status_integration_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetchTCP(t *testing.T) { diff --git a/metricbeat/module/uwsgi/status/status_linux_test.go b/metricbeat/module/uwsgi/status/status_linux_test.go index 68934f4d6f3a..bbd84faf85a7 100644 --- a/metricbeat/module/uwsgi/status/status_linux_test.go +++ b/metricbeat/module/uwsgi/status/status_linux_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetchDataUnixSock(t *testing.T) { diff --git a/metricbeat/module/uwsgi/status/status_test.go b/metricbeat/module/uwsgi/status/status_test.go index 9bb4b55dfb4d..30fc0867a47d 100644 --- a/metricbeat/module/uwsgi/status/status_test.go +++ b/metricbeat/module/uwsgi/status/status_test.go @@ -28,9 +28,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func testData(t *testing.T) (data []byte) { diff --git a/metricbeat/module/uwsgi/uwsgi.go b/metricbeat/module/uwsgi/uwsgi.go index 4455955cc342..42f8be1eabf9 100644 --- a/metricbeat/module/uwsgi/uwsgi.go +++ b/metricbeat/module/uwsgi/uwsgi.go @@ -18,8 +18,8 @@ package uwsgi import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" ) // HostParser is used for parsing the configured uWSGI hosts. diff --git a/metricbeat/module/uwsgi/uwsgi_test.go b/metricbeat/module/uwsgi/uwsgi_test.go index af19fe437e98..79ebf0eac667 100644 --- a/metricbeat/module/uwsgi/uwsgi_test.go +++ b/metricbeat/module/uwsgi/uwsgi_test.go @@ -20,7 +20,7 @@ package uwsgi import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/vsphere/datastore/datastore.go b/metricbeat/module/vsphere/datastore/datastore.go index e3e87ffebb1b..44ddb1ac65bd 100644 --- a/metricbeat/module/vsphere/datastore/datastore.go +++ b/metricbeat/module/vsphere/datastore/datastore.go @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/vmware/govmomi" "github.com/vmware/govmomi/view" diff --git a/metricbeat/module/vsphere/datastore/datastore_test.go b/metricbeat/module/vsphere/datastore/datastore_test.go index c8891fdfc466..30f1d32e8e37 100644 --- a/metricbeat/module/vsphere/datastore/datastore_test.go +++ b/metricbeat/module/vsphere/datastore/datastore_test.go @@ -20,7 +20,7 @@ package datastore import ( "testing" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" "github.com/vmware/govmomi/simulator" diff --git a/metricbeat/module/vsphere/fields.go b/metricbeat/module/vsphere/fields.go index 22e671f12f5d..cf49cbee27ff 100644 --- a/metricbeat/module/vsphere/fields.go +++ b/metricbeat/module/vsphere/fields.go @@ -20,7 +20,7 @@ package vsphere import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/vsphere/host/data.go b/metricbeat/module/vsphere/host/data.go index 642f1230298f..81ceba8c43a5 100644 --- a/metricbeat/module/vsphere/host/data.go +++ b/metricbeat/module/vsphere/host/data.go @@ -18,7 +18,7 @@ package host import ( - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/vmware/govmomi/vim25/mo" ) diff --git a/metricbeat/module/vsphere/host/host.go b/metricbeat/module/vsphere/host/host.go index 1a2f7f69c86a..90f5e89a6f77 100644 --- a/metricbeat/module/vsphere/host/host.go +++ b/metricbeat/module/vsphere/host/host.go @@ -25,9 +25,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/vmware/govmomi" "github.com/vmware/govmomi/property" diff --git a/metricbeat/module/vsphere/host/host_test.go b/metricbeat/module/vsphere/host/host_test.go index da5b97f799e2..ce9ee1ba80f1 100644 --- a/metricbeat/module/vsphere/host/host_test.go +++ b/metricbeat/module/vsphere/host/host_test.go @@ -20,8 +20,8 @@ package host import ( "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" "github.com/vmware/govmomi/simulator" diff --git a/metricbeat/module/vsphere/virtualmachine/virtualmachine.go b/metricbeat/module/vsphere/virtualmachine/virtualmachine.go index fae77b32fe88..5dd2a99675fc 100644 --- a/metricbeat/module/vsphere/virtualmachine/virtualmachine.go +++ b/metricbeat/module/vsphere/virtualmachine/virtualmachine.go @@ -23,9 +23,9 @@ import ( "net/url" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" "github.com/pkg/errors" "github.com/vmware/govmomi" diff --git a/metricbeat/module/vsphere/virtualmachine/virtualmachine_test.go b/metricbeat/module/vsphere/virtualmachine/virtualmachine_test.go index fb640c48fdce..e3b12feaf4b7 100644 --- a/metricbeat/module/vsphere/virtualmachine/virtualmachine_test.go +++ b/metricbeat/module/vsphere/virtualmachine/virtualmachine_test.go @@ -21,8 +21,8 @@ import ( "strings" "testing" - "github.com/elastic/beats/libbeat/common" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" "github.com/stretchr/testify/assert" "github.com/vmware/govmomi/simulator" diff --git a/metricbeat/module/windows/fields.go b/metricbeat/module/windows/fields.go index db3aaeccc64c..34f9f8b78612 100644 --- a/metricbeat/module/windows/fields.go +++ b/metricbeat/module/windows/fields.go @@ -20,7 +20,7 @@ package windows import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/windows/perfmon/perfmon.go b/metricbeat/module/windows/perfmon/perfmon.go index fffd5d6cfb59..76f8833b3f04 100644 --- a/metricbeat/module/windows/perfmon/perfmon.go +++ b/metricbeat/module/windows/perfmon/perfmon.go @@ -22,13 +22,13 @@ package perfmon import ( "strings" - "github.com/elastic/beats/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/mb/parse" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) // CounterConfig for perfmon counters. diff --git a/metricbeat/module/windows/perfmon/perfmon_test.go b/metricbeat/module/windows/perfmon/perfmon_test.go index 1d43286e1517..cd882131b541 100644 --- a/metricbeat/module/windows/perfmon/perfmon_test.go +++ b/metricbeat/module/windows/perfmon/perfmon_test.go @@ -25,15 +25,15 @@ import ( "testing" "time" - "github.com/elastic/beats/metricbeat/helper/windows/pdh" + "github.com/elastic/beats/v7/metricbeat/helper/windows/pdh" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/metricbeat/mb" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/metricbeat/mb" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) const processorTimeCounter = `\Processor Information(_Total)\% Processor Time` diff --git a/metricbeat/module/windows/perfmon/reader.go b/metricbeat/module/windows/perfmon/reader.go index 22b6b5f89ddd..a7ecd6663621 100644 --- a/metricbeat/module/windows/perfmon/reader.go +++ b/metricbeat/module/windows/perfmon/reader.go @@ -25,13 +25,13 @@ import ( "strconv" "strings" - "github.com/elastic/beats/metricbeat/helper/windows/pdh" + "github.com/elastic/beats/v7/metricbeat/helper/windows/pdh" "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) var processRegexp = regexp.MustCompile(`(.+?)#[1-9]+`) diff --git a/metricbeat/module/windows/service/doc.go b/metricbeat/module/windows/service/doc.go index 1bcbc98e250c..a766843e5042 100644 --- a/metricbeat/module/windows/service/doc.go +++ b/metricbeat/module/windows/service/doc.go @@ -21,4 +21,4 @@ package service //go:generate go run ../../../helper/windows/run.go -cmd "go tool cgo -godefs defs_service_windows.go" -goarch amd64 -output defs_service_windows_amd64.go //go:generate go run ../../../helper/windows/run.go -cmd "go tool cgo -godefs defs_service_windows.go" -goarch 386 -output defs_service_windows_386.go //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zservice_windows.go service_windows.go -//go:generate gofmt -w defs_service_windows_amd64.go defs_service_windows_386.go +//go:generate goimports -w defs_service_windows_amd64.go defs_service_windows_386.go diff --git a/metricbeat/module/windows/service/service.go b/metricbeat/module/windows/service/service.go index 628ec8d35c73..fce48ab6cff6 100644 --- a/metricbeat/module/windows/service/service.go +++ b/metricbeat/module/windows/service/service.go @@ -20,7 +20,7 @@ package service import ( - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry. diff --git a/metricbeat/module/windows/service/service_integration_windows_test.go b/metricbeat/module/windows/service/service_integration_windows_test.go index c3ac032c03b1..51306fe5c37e 100644 --- a/metricbeat/module/windows/service/service_integration_windows_test.go +++ b/metricbeat/module/windows/service/service_integration_windows_test.go @@ -22,12 +22,12 @@ package service import ( "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/StackExchange/wmi" "github.com/stretchr/testify/assert" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) type Win32Service struct { diff --git a/metricbeat/module/windows/service/service_windows.go b/metricbeat/module/windows/service/service_windows.go index a96b1c386868..877be4e854f2 100644 --- a/metricbeat/module/windows/service/service_windows.go +++ b/metricbeat/module/windows/service/service_windows.go @@ -33,9 +33,9 @@ import ( "golang.org/x/sys/windows" "golang.org/x/sys/windows/registry" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/winlogbeat/sys" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/winlogbeat/sys" "github.com/elastic/gosigar" ) diff --git a/metricbeat/module/windows/windows.go b/metricbeat/module/windows/windows.go index 6629e00ecc6d..584817e6a369 100644 --- a/metricbeat/module/windows/windows.go +++ b/metricbeat/module/windows/windows.go @@ -22,9 +22,9 @@ package windows import ( "sync" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/helper" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/helper" + "github.com/elastic/beats/v7/metricbeat/mb" ) var once sync.Once diff --git a/metricbeat/module/zookeeper/connection/connection.go b/metricbeat/module/zookeeper/connection/connection.go index 31540d00b880..dea21844c7ca 100644 --- a/metricbeat/module/zookeeper/connection/connection.go +++ b/metricbeat/module/zookeeper/connection/connection.go @@ -20,10 +20,10 @@ package connection import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/zookeeper" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/zookeeper" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/module/zookeeper/connection/connection_integration_test.go b/metricbeat/module/zookeeper/connection/connection_integration_test.go index 257268f26b18..f774f36c202f 100644 --- a/metricbeat/module/zookeeper/connection/connection_integration_test.go +++ b/metricbeat/module/zookeeper/connection/connection_integration_test.go @@ -22,8 +22,8 @@ package connection import ( "testing" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestData(t *testing.T) { diff --git a/metricbeat/module/zookeeper/connection/connection_test.go b/metricbeat/module/zookeeper/connection/connection_test.go index 253153d3422e..6477a7776320 100644 --- a/metricbeat/module/zookeeper/connection/connection_test.go +++ b/metricbeat/module/zookeeper/connection/connection_test.go @@ -21,7 +21,7 @@ import ( "bytes" "testing" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" ) diff --git a/metricbeat/module/zookeeper/connection/data.go b/metricbeat/module/zookeeper/connection/data.go index a30c61e62ba8..e205ba8594f9 100644 --- a/metricbeat/module/zookeeper/connection/data.go +++ b/metricbeat/module/zookeeper/connection/data.go @@ -25,9 +25,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var capturer = regexp.MustCompile(`/(?P.*):(?P\d+)\[(?P\d*)]\(queued=(?P\d*),recved=(?P\d*),sent=(?P\d*)\)`) diff --git a/metricbeat/module/zookeeper/fields.go b/metricbeat/module/zookeeper/fields.go index 41a234d28608..c275c78c4798 100644 --- a/metricbeat/module/zookeeper/fields.go +++ b/metricbeat/module/zookeeper/fields.go @@ -20,7 +20,7 @@ package zookeeper import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/metricbeat/module/zookeeper/mntr/data.go b/metricbeat/module/zookeeper/mntr/data.go index f116984eb898..5dc2dd3b4725 100644 --- a/metricbeat/module/zookeeper/mntr/data.go +++ b/metricbeat/module/zookeeper/mntr/data.go @@ -22,12 +22,12 @@ import ( "io" "regexp" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" - s "github.com/elastic/beats/libbeat/common/schema" - c "github.com/elastic/beats/libbeat/common/schema/mapstrstr" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/metricbeat/mb" + s "github.com/elastic/beats/v7/libbeat/common/schema" + c "github.com/elastic/beats/v7/libbeat/common/schema/mapstrstr" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/metricbeat/mb" ) var ( diff --git a/metricbeat/module/zookeeper/mntr/mntr.go b/metricbeat/module/zookeeper/mntr/mntr.go index 13fd8770afa2..af5831b8007f 100644 --- a/metricbeat/module/zookeeper/mntr/mntr.go +++ b/metricbeat/module/zookeeper/mntr/mntr.go @@ -44,9 +44,9 @@ ZooKeeper mntr Command Output package mntr import ( - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/zookeeper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/zookeeper" "github.com/pkg/errors" ) diff --git a/metricbeat/module/zookeeper/mntr/mntr_integration_test.go b/metricbeat/module/zookeeper/mntr/mntr_integration_test.go index 7e530c802ce4..34e36321a5df 100644 --- a/metricbeat/module/zookeeper/mntr/mntr_integration_test.go +++ b/metricbeat/module/zookeeper/mntr/mntr_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/zookeeper/server/data.go b/metricbeat/module/zookeeper/server/data.go index ef74f1aee3ba..9f185e3a218d 100644 --- a/metricbeat/module/zookeeper/server/data.go +++ b/metricbeat/module/zookeeper/server/data.go @@ -28,8 +28,8 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var latencyCapturer = regexp.MustCompile(`(\d+)/(\d+)/(\d+)`) diff --git a/metricbeat/module/zookeeper/server/server.go b/metricbeat/module/zookeeper/server/server.go index 7b9d275382db..af57d4e77b82 100644 --- a/metricbeat/module/zookeeper/server/server.go +++ b/metricbeat/module/zookeeper/server/server.go @@ -42,11 +42,11 @@ package server import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/mb/parse" - "github.com/elastic/beats/metricbeat/module/zookeeper" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb/parse" + "github.com/elastic/beats/v7/metricbeat/module/zookeeper" ) func init() { diff --git a/metricbeat/module/zookeeper/server/server_integration_test.go b/metricbeat/module/zookeeper/server/server_integration_test.go index 4cd1764ad168..6f23559033bc 100644 --- a/metricbeat/module/zookeeper/server/server_integration_test.go +++ b/metricbeat/module/zookeeper/server/server_integration_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/tests/compose" - mbtest "github.com/elastic/beats/metricbeat/mb/testing" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/tests/compose" + mbtest "github.com/elastic/beats/v7/metricbeat/mb/testing" ) func TestFetch(t *testing.T) { diff --git a/metricbeat/module/zookeeper/server/server_test.go b/metricbeat/module/zookeeper/server/server_test.go index 0ac31050f013..442770ce613e 100644 --- a/metricbeat/module/zookeeper/server/server_test.go +++ b/metricbeat/module/zookeeper/server/server_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var srvrTestInput = `Zookeeper version: 3.5.5-390fe37ea45dee01bf87dc1c042b5e3dcce88653, built on 05/03/2019 12:07 GMT diff --git a/metricbeat/processor/add_kubernetes_metadata/indexers.go b/metricbeat/processor/add_kubernetes_metadata/indexers.go index a86b4b8f211d..b169b93f481a 100644 --- a/metricbeat/processor/add_kubernetes_metadata/indexers.go +++ b/metricbeat/processor/add_kubernetes_metadata/indexers.go @@ -18,8 +18,8 @@ package add_kubernetes_metadata import ( - "github.com/elastic/beats/libbeat/common" - kubernetes "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata" + "github.com/elastic/beats/v7/libbeat/common" + kubernetes "github.com/elastic/beats/v7/libbeat/processors/add_kubernetes_metadata" ) func init() { diff --git a/metricbeat/scripts/assets/assets.go b/metricbeat/scripts/assets/assets.go index 45ebfe46969b..51c24afe4528 100644 --- a/metricbeat/scripts/assets/assets.go +++ b/metricbeat/scripts/assets/assets.go @@ -24,9 +24,9 @@ import ( "os" "path" - "github.com/elastic/beats/libbeat/asset" - "github.com/elastic/beats/libbeat/generator/fields" - "github.com/elastic/beats/licenses" + "github.com/elastic/beats/v7/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/generator/fields" + "github.com/elastic/beats/v7/licenses" ) func main() { diff --git a/metricbeat/scripts/mage/config.go b/metricbeat/scripts/mage/config.go index d9e8c5fc581a..ffa30d27bad3 100644 --- a/metricbeat/scripts/mage/config.go +++ b/metricbeat/scripts/mage/config.go @@ -18,7 +18,7 @@ package mage import ( - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) const modulesConfigYml = "build/config.modules.yml" diff --git a/metricbeat/scripts/mage/docs_collector.go b/metricbeat/scripts/mage/docs_collector.go index 21c99aceb50b..427975a7cf10 100644 --- a/metricbeat/scripts/mage/docs_collector.go +++ b/metricbeat/scripts/mage/docs_collector.go @@ -32,7 +32,7 @@ import ( "github.com/pkg/errors" "gopkg.in/yaml.v2" - "github.com/elastic/beats/dev-tools/mage" + "github.com/elastic/beats/v7/dev-tools/mage" ) // moduleData provides module-level data that will be used to populate the module list @@ -146,8 +146,12 @@ func getDefaultMetricsets() (map[string][]string, error) { return masterMap, nil } + cmd := []string{"run"} + if mage.UseVendor { + cmd = append(cmd, "-mod", "vendor") + } for _, dir := range runpaths { - rawMap, err := sh.OutCmd("go", "run", dir)() + rawMap, err := sh.OutCmd("go", append(cmd, dir)...)() if err != nil { return nil, errors.Wrap(err, "Error running subcommand to get metricsets") } diff --git a/metricbeat/scripts/mage/fields.go b/metricbeat/scripts/mage/fields.go index df3441ecf861..a46110fee928 100644 --- a/metricbeat/scripts/mage/fields.go +++ b/metricbeat/scripts/mage/fields.go @@ -18,7 +18,7 @@ package mage import ( - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) // GenerateOSSMetricbeatModuleIncludeListGo generates include/list_{suffix}.go files containing diff --git a/metricbeat/scripts/mage/package.go b/metricbeat/scripts/mage/package.go index 1f527114f02d..15498e8028f7 100644 --- a/metricbeat/scripts/mage/package.go +++ b/metricbeat/scripts/mage/package.go @@ -28,7 +28,7 @@ import ( "github.com/magefile/mage/mg" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) const ( diff --git a/metricbeat/scripts/module/metricset/metricset.go.tmpl b/metricbeat/scripts/module/metricset/metricset.go.tmpl index e2c455cb6497..a156abd916f0 100644 --- a/metricbeat/scripts/module/metricset/metricset.go.tmpl +++ b/metricbeat/scripts/module/metricset/metricset.go.tmpl @@ -1,9 +1,9 @@ package {metricset} import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/metricbeat/mb" ) // init registers the MetricSet with the central registry as soon as the program diff --git a/metricbeat/scripts/msetlists/cmd/main.go b/metricbeat/scripts/msetlists/cmd/main.go index d964f79b0d2b..fec8aa0f1e1d 100644 --- a/metricbeat/scripts/msetlists/cmd/main.go +++ b/metricbeat/scripts/msetlists/cmd/main.go @@ -22,10 +22,10 @@ import ( "fmt" "os" - "github.com/elastic/beats/libbeat/paths" - _ "github.com/elastic/beats/metricbeat/include" - "github.com/elastic/beats/metricbeat/mb" - "github.com/elastic/beats/metricbeat/scripts/msetlists" + "github.com/elastic/beats/v7/libbeat/paths" + _ "github.com/elastic/beats/v7/metricbeat/include" + "github.com/elastic/beats/v7/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/scripts/msetlists" ) func main() { diff --git a/metricbeat/scripts/msetlists/msetlists.go b/metricbeat/scripts/msetlists/msetlists.go index 7ede799ab10e..2280bcf2b6db 100644 --- a/metricbeat/scripts/msetlists/msetlists.go +++ b/metricbeat/scripts/msetlists/msetlists.go @@ -20,7 +20,7 @@ package msetlists import ( "strings" - "github.com/elastic/beats/metricbeat/mb" + "github.com/elastic/beats/v7/metricbeat/mb" ) // DefaultMetricsets returns a JSON array of all registered default metricsets diff --git a/packetbeat/beater/packetbeat.go b/packetbeat/beater/packetbeat.go index c7c6d53046fd..b862bd3ee112 100644 --- a/packetbeat/beater/packetbeat.go +++ b/packetbeat/beater/packetbeat.go @@ -26,25 +26,25 @@ import ( "github.com/tsg/gopacket/layers" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/libbeat/service" - - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/decoder" - "github.com/elastic/beats/packetbeat/flows" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/icmp" - "github.com/elastic/beats/packetbeat/protos/tcp" - "github.com/elastic/beats/packetbeat/protos/udp" - "github.com/elastic/beats/packetbeat/publish" - "github.com/elastic/beats/packetbeat/sniffer" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/libbeat/service" + + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/decoder" + "github.com/elastic/beats/v7/packetbeat/flows" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/icmp" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/protos/udp" + "github.com/elastic/beats/v7/packetbeat/publish" + "github.com/elastic/beats/v7/packetbeat/sniffer" // Add packetbeat default processors - _ "github.com/elastic/beats/packetbeat/processor/add_kubernetes_metadata" + _ "github.com/elastic/beats/v7/packetbeat/processor/add_kubernetes_metadata" ) // Beater object. Contains all objects needed to run the beat diff --git a/packetbeat/cmd/devices.go b/packetbeat/cmd/devices.go index 388232064c24..4635b822ab4b 100644 --- a/packetbeat/cmd/devices.go +++ b/packetbeat/cmd/devices.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" - "github.com/elastic/beats/packetbeat/sniffer" + "github.com/elastic/beats/v7/packetbeat/sniffer" ) func genDevicesCommand() *cobra.Command { diff --git a/packetbeat/cmd/root.go b/packetbeat/cmd/root.go index bb8479f5e5f6..addc5fe5ad67 100644 --- a/packetbeat/cmd/root.go +++ b/packetbeat/cmd/root.go @@ -23,11 +23,11 @@ import ( "github.com/spf13/pflag" // import protocol modules - _ "github.com/elastic/beats/packetbeat/include" + _ "github.com/elastic/beats/v7/packetbeat/include" - cmd "github.com/elastic/beats/libbeat/cmd" - "github.com/elastic/beats/libbeat/cmd/instance" - "github.com/elastic/beats/packetbeat/beater" + cmd "github.com/elastic/beats/v7/libbeat/cmd" + "github.com/elastic/beats/v7/libbeat/cmd/instance" + "github.com/elastic/beats/v7/packetbeat/beater" ) // Name of this beat diff --git a/packetbeat/config/config.go b/packetbeat/config/config.go index 45d79efd1d28..893e4828ab8f 100644 --- a/packetbeat/config/config.go +++ b/packetbeat/config/config.go @@ -20,9 +20,9 @@ package config import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/packetbeat/procs" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/packetbeat/procs" ) type Config struct { diff --git a/packetbeat/decoder/decoder.go b/packetbeat/decoder/decoder.go index 3aba33b7f88a..50e8f5954818 100644 --- a/packetbeat/decoder/decoder.go +++ b/packetbeat/decoder/decoder.go @@ -20,12 +20,12 @@ package decoder import ( "fmt" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/flows" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/icmp" - "github.com/elastic/beats/packetbeat/protos/tcp" - "github.com/elastic/beats/packetbeat/protos/udp" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/flows" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/icmp" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/protos/udp" "github.com/tsg/gopacket" "github.com/tsg/gopacket/layers" diff --git a/packetbeat/decoder/decoder_test.go b/packetbeat/decoder/decoder_test.go index 90a33024fff4..954be381da03 100644 --- a/packetbeat/decoder/decoder_test.go +++ b/packetbeat/decoder/decoder_test.go @@ -23,9 +23,9 @@ import ( "strings" "testing" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/flows" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/flows" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/stretchr/testify/assert" "github.com/tsg/gopacket" diff --git a/packetbeat/flows/flows.go b/packetbeat/flows/flows.go index e3efb1a8ef8e..fb292b92bf2e 100644 --- a/packetbeat/flows/flows.go +++ b/packetbeat/flows/flows.go @@ -20,9 +20,9 @@ package flows import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/config" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/config" ) type Flows struct { diff --git a/packetbeat/flows/flows_test.go b/packetbeat/flows/flows_test.go index 06c903bd2a42..b1c3a5b83b93 100644 --- a/packetbeat/flows/flows_test.go +++ b/packetbeat/flows/flows_test.go @@ -26,10 +26,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/config" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/config" ) type flowsChan struct { diff --git a/packetbeat/flows/util.go b/packetbeat/flows/util.go index ab68c6ac446c..c5b928fae426 100644 --- a/packetbeat/flows/util.go +++ b/packetbeat/flows/util.go @@ -21,8 +21,8 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" ) type worker struct { diff --git a/packetbeat/flows/worker.go b/packetbeat/flows/worker.go index 80fbeb025654..8bfce02084a3 100644 --- a/packetbeat/flows/worker.go +++ b/packetbeat/flows/worker.go @@ -23,11 +23,11 @@ import ( "net" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/flowhash" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/flowhash" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) type flowsProcessor struct { diff --git a/packetbeat/flows/worker_test.go b/packetbeat/flows/worker_test.go index c6d59c849a64..dab0d11eb14d 100644 --- a/packetbeat/flows/worker_test.go +++ b/packetbeat/flows/worker_test.go @@ -28,8 +28,8 @@ import ( "github.com/elastic/go-lookslike" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) var ( diff --git a/packetbeat/include/fields.go b/packetbeat/include/fields.go index 7edd0216bd9f..1a8b22f1572d 100644 --- a/packetbeat/include/fields.go +++ b/packetbeat/include/fields.go @@ -20,7 +20,7 @@ package include import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/include/list.go b/packetbeat/include/list.go index b5210f59448d..0dc1f0bd053c 100644 --- a/packetbeat/include/list.go +++ b/packetbeat/include/list.go @@ -21,18 +21,18 @@ package include import ( // Import packages that need to register themselves. - _ "github.com/elastic/beats/packetbeat/protos/amqp" - _ "github.com/elastic/beats/packetbeat/protos/cassandra" - _ "github.com/elastic/beats/packetbeat/protos/dhcpv4" - _ "github.com/elastic/beats/packetbeat/protos/dns" - _ "github.com/elastic/beats/packetbeat/protos/http" - _ "github.com/elastic/beats/packetbeat/protos/icmp" - _ "github.com/elastic/beats/packetbeat/protos/memcache" - _ "github.com/elastic/beats/packetbeat/protos/mongodb" - _ "github.com/elastic/beats/packetbeat/protos/mysql" - _ "github.com/elastic/beats/packetbeat/protos/nfs" - _ "github.com/elastic/beats/packetbeat/protos/pgsql" - _ "github.com/elastic/beats/packetbeat/protos/redis" - _ "github.com/elastic/beats/packetbeat/protos/thrift" - _ "github.com/elastic/beats/packetbeat/protos/tls" + _ "github.com/elastic/beats/v7/packetbeat/protos/amqp" + _ "github.com/elastic/beats/v7/packetbeat/protos/cassandra" + _ "github.com/elastic/beats/v7/packetbeat/protos/dhcpv4" + _ "github.com/elastic/beats/v7/packetbeat/protos/dns" + _ "github.com/elastic/beats/v7/packetbeat/protos/http" + _ "github.com/elastic/beats/v7/packetbeat/protos/icmp" + _ "github.com/elastic/beats/v7/packetbeat/protos/memcache" + _ "github.com/elastic/beats/v7/packetbeat/protos/mongodb" + _ "github.com/elastic/beats/v7/packetbeat/protos/mysql" + _ "github.com/elastic/beats/v7/packetbeat/protos/nfs" + _ "github.com/elastic/beats/v7/packetbeat/protos/pgsql" + _ "github.com/elastic/beats/v7/packetbeat/protos/redis" + _ "github.com/elastic/beats/v7/packetbeat/protos/thrift" + _ "github.com/elastic/beats/v7/packetbeat/protos/tls" ) diff --git a/packetbeat/magefile.go b/packetbeat/magefile.go index e7a3afd24314..7793ed32ec07 100644 --- a/packetbeat/magefile.go +++ b/packetbeat/magefile.go @@ -31,13 +31,13 @@ import ( "github.com/magefile/mage/sh" "github.com/pkg/errors" - devtools "github.com/elastic/beats/dev-tools/mage" - packetbeat "github.com/elastic/beats/packetbeat/scripts/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" + packetbeat "github.com/elastic/beats/v7/packetbeat/scripts/mage" // mage:import - "github.com/elastic/beats/dev-tools/mage/target/common" + "github.com/elastic/beats/v7/dev-tools/mage/target/common" // mage:import - _ "github.com/elastic/beats/dev-tools/mage/target/integtest/notests" + _ "github.com/elastic/beats/v7/dev-tools/mage/target/integtest/notests" ) func init() { @@ -280,7 +280,7 @@ var crossBuildDeps = map[string]func() error{ // buildLibpcapFromSource builds libpcap from source because the library needs // to be compiled with -fPIC. -// See https://github.com/elastic/beats/pull/4217. +// See https://github.com/elastic/beats/v7/pull/4217. func buildLibpcapFromSource(params map[string]string) error { tarFile, err := devtools.DownloadFile(libpcapURL, "/libpcap") if err != nil { @@ -422,7 +422,7 @@ func generateWin64StaticWinpcap() error { // Notes: We are using absolute path to make sure the files // are available for x-pack build. - // Ref: https://github.com/elastic/beats/issues/1259 + // Ref: https://github.com/elastic/beats/v7/issues/1259 defer devtools.DockerChown(devtools.MustExpand("{{elastic_beats_dir}}/{{.BeatName}}/lib")) return devtools.RunCmds( // Requires mingw-w64-tools. diff --git a/packetbeat/main.go b/packetbeat/main.go index aa6ec0921494..c2b064f21881 100644 --- a/packetbeat/main.go +++ b/packetbeat/main.go @@ -20,7 +20,7 @@ package main import ( "os" - "github.com/elastic/beats/packetbeat/cmd" + "github.com/elastic/beats/v7/packetbeat/cmd" ) var Name = "packetbeat" diff --git a/packetbeat/main_test.go b/packetbeat/main_test.go index 93697593f25d..80c9d76920d4 100644 --- a/packetbeat/main_test.go +++ b/packetbeat/main_test.go @@ -23,8 +23,8 @@ import ( "flag" "testing" - "github.com/elastic/beats/libbeat/tests/system/template" - "github.com/elastic/beats/packetbeat/cmd" + "github.com/elastic/beats/v7/libbeat/tests/system/template" + "github.com/elastic/beats/v7/packetbeat/cmd" ) var systemTest *bool diff --git a/packetbeat/pb/event.go b/packetbeat/pb/event.go index ebed6ebb708d..d4330b542eac 100644 --- a/packetbeat/pb/event.go +++ b/packetbeat/pb/event.go @@ -24,9 +24,9 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/flowhash" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/flowhash" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/packetbeat/pb/event_test.go b/packetbeat/pb/event_test.go index 788003d7691d..b44bd4c5c4c3 100644 --- a/packetbeat/pb/event_test.go +++ b/packetbeat/pb/event_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/packetbeat/processor/add_kubernetes_metadata/indexers.go b/packetbeat/processor/add_kubernetes_metadata/indexers.go index 5283f299e619..474f111e97fe 100644 --- a/packetbeat/processor/add_kubernetes_metadata/indexers.go +++ b/packetbeat/processor/add_kubernetes_metadata/indexers.go @@ -18,8 +18,8 @@ package add_kubernetes_metadata import ( - "github.com/elastic/beats/libbeat/common" - kubernetes "github.com/elastic/beats/libbeat/processors/add_kubernetes_metadata" + "github.com/elastic/beats/v7/libbeat/common" + kubernetes "github.com/elastic/beats/v7/libbeat/processors/add_kubernetes_metadata" ) func init() { diff --git a/packetbeat/procs/procs.go b/packetbeat/procs/procs.go index b94cdaa5b825..dfead47d93cb 100644 --- a/packetbeat/procs/procs.go +++ b/packetbeat/procs/procs.go @@ -23,9 +23,9 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" "github.com/elastic/go-sysinfo" ) diff --git a/packetbeat/procs/procs_linux.go b/packetbeat/procs/procs_linux.go index e9a48ccfdada..944924c88b16 100644 --- a/packetbeat/procs/procs_linux.go +++ b/packetbeat/procs/procs_linux.go @@ -31,8 +31,8 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" "github.com/elastic/gosigar" ) diff --git a/packetbeat/procs/procs_linux_test.go b/packetbeat/procs/procs_linux_test.go index 72fdd4c0fb5e..25a856ed2f8b 100644 --- a/packetbeat/procs/procs_linux_test.go +++ b/packetbeat/procs/procs_linux_test.go @@ -25,7 +25,7 @@ import ( "path/filepath" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type testProcFile struct { diff --git a/packetbeat/procs/procs_other.go b/packetbeat/procs/procs_other.go index 50c7d1e100fd..0e401806aba7 100644 --- a/packetbeat/procs/procs_other.go +++ b/packetbeat/procs/procs_other.go @@ -19,7 +19,7 @@ package procs -import "github.com/elastic/beats/packetbeat/protos/applayer" +import "github.com/elastic/beats/v7/packetbeat/protos/applayer" // GetLocalPortToPIDMapping returns the list of local port numbers and the PID // that owns them. diff --git a/packetbeat/procs/procs_test.go b/packetbeat/procs/procs_test.go index ca71152c8233..359640d0bcb6 100644 --- a/packetbeat/procs/procs_test.go +++ b/packetbeat/procs/procs_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) type testingImpl struct { diff --git a/packetbeat/procs/procs_windows.go b/packetbeat/procs/procs_windows.go index 87919d18af99..b18bd792841c 100644 --- a/packetbeat/procs/procs_windows.go +++ b/packetbeat/procs/procs_windows.go @@ -29,7 +29,7 @@ import ( "golang.org/x/sys/windows" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) var machineEndiannes = getMachineEndiannes() diff --git a/packetbeat/protocols/plugin.go b/packetbeat/protocols/plugin.go index 565850981814..46fd784e64b0 100644 --- a/packetbeat/protocols/plugin.go +++ b/packetbeat/protocols/plugin.go @@ -20,8 +20,8 @@ package protocols import ( "errors" - "github.com/elastic/beats/libbeat/plugin" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/plugin" + "github.com/elastic/beats/v7/packetbeat/protos" ) type protocolPlugin struct { diff --git a/packetbeat/protos/amqp/amqp.go b/packetbeat/protos/amqp/amqp.go index f2a2ca026012..8b5689e4f2e7 100644 --- a/packetbeat/protos/amqp/amqp.go +++ b/packetbeat/protos/amqp/amqp.go @@ -22,13 +22,13 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) var ( diff --git a/packetbeat/protos/amqp/amqp_fields.go b/packetbeat/protos/amqp/amqp_fields.go index 1926e734558e..ff4f7c382b5c 100644 --- a/packetbeat/protos/amqp/amqp_fields.go +++ b/packetbeat/protos/amqp/amqp_fields.go @@ -24,8 +24,8 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func getTable(fields common.MapStr, data []byte, offset uint32) (next uint32, err bool, exists bool) { diff --git a/packetbeat/protos/amqp/amqp_methods.go b/packetbeat/protos/amqp/amqp_methods.go index b3936e973828..93cec5f27474 100644 --- a/packetbeat/protos/amqp/amqp_methods.go +++ b/packetbeat/protos/amqp/amqp_methods.go @@ -22,8 +22,8 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) func connectionStartMethod(m *amqpMessage, args []byte) (bool, bool) { diff --git a/packetbeat/protos/amqp/amqp_parser.go b/packetbeat/protos/amqp/amqp_parser.go index 2e59641bd903..eeaaf2a94646 100644 --- a/packetbeat/protos/amqp/amqp_parser.go +++ b/packetbeat/protos/amqp/amqp_parser.go @@ -21,9 +21,9 @@ import ( "encoding/binary" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/procs" ) func (amqp *amqpPlugin) amqpMessageParser(s *amqpStream) (ok bool, complete bool) { diff --git a/packetbeat/protos/amqp/amqp_structs.go b/packetbeat/protos/amqp/amqp_structs.go index 17d253994e72..387e8df6fcb4 100644 --- a/packetbeat/protos/amqp/amqp_structs.go +++ b/packetbeat/protos/amqp/amqp_structs.go @@ -20,7 +20,7 @@ package amqp import ( "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type amqpMethod func(*amqpMessage, []byte) (bool, bool) diff --git a/packetbeat/protos/amqp/amqp_test.go b/packetbeat/protos/amqp/amqp_test.go index 6a17068ac4c0..d9f583cdc22b 100644 --- a/packetbeat/protos/amqp/amqp_test.go +++ b/packetbeat/protos/amqp/amqp_test.go @@ -24,12 +24,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/publish" ) type eventStore struct { diff --git a/packetbeat/protos/amqp/config.go b/packetbeat/protos/amqp/config.go index 67db3ec2b541..2939530046ee 100644 --- a/packetbeat/protos/amqp/config.go +++ b/packetbeat/protos/amqp/config.go @@ -18,8 +18,8 @@ package amqp import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type amqpConfig struct { diff --git a/packetbeat/protos/amqp/fields.go b/packetbeat/protos/amqp/fields.go index 863436c0a293..d8f3457a9afa 100644 --- a/packetbeat/protos/amqp/fields.go +++ b/packetbeat/protos/amqp/fields.go @@ -20,7 +20,7 @@ package amqp import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/applayer/applayer.go b/packetbeat/protos/applayer/applayer.go index 21b740c73e12..597edb0d0eb2 100644 --- a/packetbeat/protos/applayer/applayer.go +++ b/packetbeat/protos/applayer/applayer.go @@ -23,11 +23,11 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" - "github.com/elastic/beats/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/pb" ) // A Message its direction indicator diff --git a/packetbeat/protos/cassandra/cassandra.go b/packetbeat/protos/cassandra/cassandra.go index 495095ae9e4f..ed0f48e91a44 100644 --- a/packetbeat/protos/cassandra/cassandra.go +++ b/packetbeat/protos/cassandra/cassandra.go @@ -20,13 +20,13 @@ package cassandra import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" - gocql "github.com/elastic/beats/packetbeat/protos/cassandra/internal/gocql" + gocql "github.com/elastic/beats/v7/packetbeat/protos/cassandra/internal/gocql" ) // cassandra application level protocol analyzer plugin diff --git a/packetbeat/protos/cassandra/config.go b/packetbeat/protos/cassandra/config.go index 74262631c40e..0eafddcd1ee0 100644 --- a/packetbeat/protos/cassandra/config.go +++ b/packetbeat/protos/cassandra/config.go @@ -20,10 +20,10 @@ package cassandra import ( "fmt" - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" - gocql "github.com/elastic/beats/packetbeat/protos/cassandra/internal/gocql" + gocql "github.com/elastic/beats/v7/packetbeat/protos/cassandra/internal/gocql" ) type cassandraConfig struct { diff --git a/packetbeat/protos/cassandra/fields.go b/packetbeat/protos/cassandra/fields.go index 8fbec81bde79..f8730fd902e3 100644 --- a/packetbeat/protos/cassandra/fields.go +++ b/packetbeat/protos/cassandra/fields.go @@ -20,7 +20,7 @@ package cassandra import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/cassandra/internal/gocql/frame.go b/packetbeat/protos/cassandra/internal/gocql/frame.go index 52ded24d5ccb..25e7df5bac88 100644 --- a/packetbeat/protos/cassandra/internal/gocql/frame.go +++ b/packetbeat/protos/cassandra/internal/gocql/frame.go @@ -23,8 +23,8 @@ import ( "runtime" "sync" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" ) var ( diff --git a/packetbeat/protos/cassandra/internal/gocql/marshal.go b/packetbeat/protos/cassandra/internal/gocql/marshal.go index 207d52928390..2061bb2f11e8 100644 --- a/packetbeat/protos/cassandra/internal/gocql/marshal.go +++ b/packetbeat/protos/cassandra/internal/gocql/marshal.go @@ -28,7 +28,7 @@ import ( "gopkg.in/inf.v0" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // TypeInfo describes a Cassandra specific data type. diff --git a/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go b/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go index 0450b5368789..ae107a95e9ed 100644 --- a/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go +++ b/packetbeat/protos/cassandra/internal/gocql/stream_decoder.go @@ -21,7 +21,7 @@ import ( "fmt" "net" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) type StreamDecoder struct { diff --git a/packetbeat/protos/cassandra/parser.go b/packetbeat/protos/cassandra/parser.go index 7729b1ee619f..f699187b03f3 100644 --- a/packetbeat/protos/cassandra/parser.go +++ b/packetbeat/protos/cassandra/parser.go @@ -21,11 +21,11 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" - gocql "github.com/elastic/beats/packetbeat/protos/cassandra/internal/gocql" + gocql "github.com/elastic/beats/v7/packetbeat/protos/cassandra/internal/gocql" ) type parser struct { diff --git a/packetbeat/protos/cassandra/pub.go b/packetbeat/protos/cassandra/pub.go index 2f79295ee03b..c4d0164310e4 100644 --- a/packetbeat/protos/cassandra/pub.go +++ b/packetbeat/protos/cassandra/pub.go @@ -20,11 +20,11 @@ package cassandra import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/protos" ) // Transaction Publisher. diff --git a/packetbeat/protos/cassandra/trans.go b/packetbeat/protos/cassandra/trans.go index 49eb7be7cafd..62d36ee36955 100644 --- a/packetbeat/protos/cassandra/trans.go +++ b/packetbeat/protos/cassandra/trans.go @@ -20,10 +20,10 @@ package cassandra import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) type transactions struct { diff --git a/packetbeat/protos/dhcpv4/config.go b/packetbeat/protos/dhcpv4/config.go index 7f2825de9637..4121ee66ba75 100644 --- a/packetbeat/protos/dhcpv4/config.go +++ b/packetbeat/protos/dhcpv4/config.go @@ -18,7 +18,7 @@ package dhcpv4 import ( - "github.com/elastic/beats/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/config" ) type dhcpv4Config struct { diff --git a/packetbeat/protos/dhcpv4/dhcpv4.go b/packetbeat/protos/dhcpv4/dhcpv4.go index 19b81c0717e1..a50108a83c6b 100644 --- a/packetbeat/protos/dhcpv4/dhcpv4.go +++ b/packetbeat/protos/dhcpv4/dhcpv4.go @@ -23,12 +23,12 @@ import ( "github.com/insomniacslk/dhcp/dhcpv4" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/packetbeat/protos/dhcpv4/dhcpv4_test.go b/packetbeat/protos/dhcpv4/dhcpv4_test.go index 56d9428ebe2b..72aade5014e3 100644 --- a/packetbeat/protos/dhcpv4/dhcpv4_test.go +++ b/packetbeat/protos/dhcpv4/dhcpv4_test.go @@ -26,11 +26,11 @@ import ( "github.com/insomniacslk/dhcp/dhcpv4" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/publish" ) var _ protos.UDPPlugin = &dhcpv4Plugin{} diff --git a/packetbeat/protos/dhcpv4/fields.go b/packetbeat/protos/dhcpv4/fields.go index b63c2a7e4c4e..19fae17fd5fd 100644 --- a/packetbeat/protos/dhcpv4/fields.go +++ b/packetbeat/protos/dhcpv4/fields.go @@ -20,7 +20,7 @@ package dhcpv4 import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/dhcpv4/options.go b/packetbeat/protos/dhcpv4/options.go index fcee2bc3c3b1..68ec4e8c32ce 100644 --- a/packetbeat/protos/dhcpv4/options.go +++ b/packetbeat/protos/dhcpv4/options.go @@ -26,7 +26,7 @@ import ( "github.com/insomniacslk/dhcp/dhcpv4" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) func optionsToMap(options []dhcpv4.Option) (common.MapStr, error) { diff --git a/packetbeat/protos/dns/config.go b/packetbeat/protos/dns/config.go index d8e43be7e105..c98d52f8257f 100644 --- a/packetbeat/protos/dns/config.go +++ b/packetbeat/protos/dns/config.go @@ -18,8 +18,8 @@ package dns import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type dnsConfig struct { diff --git a/packetbeat/protos/dns/dns.go b/packetbeat/protos/dns/dns.go index 83720dad92e0..29efcc9bcdcc 100644 --- a/packetbeat/protos/dns/dns.go +++ b/packetbeat/protos/dns/dns.go @@ -34,11 +34,11 @@ import ( mkdns "github.com/miekg/dns" "golang.org/x/net/publicsuffix" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/protos" ) type dnsPlugin struct { diff --git a/packetbeat/protos/dns/dns_tcp.go b/packetbeat/protos/dns/dns_tcp.go index bce95d6c7660..310cf43553e3 100644 --- a/packetbeat/protos/dns/dns_tcp.go +++ b/packetbeat/protos/dns/dns_tcp.go @@ -20,12 +20,12 @@ package dns import ( "encoding/binary" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" mkdns "github.com/miekg/dns" ) diff --git a/packetbeat/protos/dns/dns_tcp_test.go b/packetbeat/protos/dns/dns_tcp_test.go index a3a66965514c..826ba451c32f 100644 --- a/packetbeat/protos/dns/dns_tcp_test.go +++ b/packetbeat/protos/dns/dns_tcp_test.go @@ -33,9 +33,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) // Verify that the interface TCP has been satisfied. diff --git a/packetbeat/protos/dns/dns_test.go b/packetbeat/protos/dns/dns_test.go index edb5f48368e6..c5ee52eb5ebd 100644 --- a/packetbeat/protos/dns/dns_test.go +++ b/packetbeat/protos/dns/dns_test.go @@ -31,11 +31,11 @@ import ( mkdns "github.com/miekg/dns" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/publish" ) // Test Constants diff --git a/packetbeat/protos/dns/dns_udp.go b/packetbeat/protos/dns/dns_udp.go index d563a97837b7..652e03bb7174 100644 --- a/packetbeat/protos/dns/dns_udp.go +++ b/packetbeat/protos/dns/dns_udp.go @@ -18,10 +18,10 @@ package dns import ( - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" ) // Only EDNS packets should have their size beyond this value diff --git a/packetbeat/protos/dns/dns_udp_test.go b/packetbeat/protos/dns/dns_udp_test.go index 0861f0a5ba17..fb482b556767 100644 --- a/packetbeat/protos/dns/dns_udp_test.go +++ b/packetbeat/protos/dns/dns_udp_test.go @@ -40,8 +40,8 @@ import ( mkdns "github.com/miekg/dns" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/packetbeat/protos" ) // Verify that the interface for UDP has been satisfied. diff --git a/packetbeat/protos/dns/fields.go b/packetbeat/protos/dns/fields.go index ac3d950bea21..2c20d2faa00d 100644 --- a/packetbeat/protos/dns/fields.go +++ b/packetbeat/protos/dns/fields.go @@ -20,7 +20,7 @@ package dns import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/dns/names_test.go b/packetbeat/protos/dns/names_test.go index 25c31881016a..9066082cab8a 100644 --- a/packetbeat/protos/dns/names_test.go +++ b/packetbeat/protos/dns/names_test.go @@ -31,7 +31,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type dnsTestMsg struct { diff --git a/packetbeat/protos/http/config.go b/packetbeat/protos/http/config.go index 14b3f55e359e..86f59fb36b1f 100644 --- a/packetbeat/protos/http/config.go +++ b/packetbeat/protos/http/config.go @@ -18,9 +18,9 @@ package http import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) type httpConfig struct { diff --git a/packetbeat/protos/http/event.go b/packetbeat/protos/http/event.go index f02aae421623..691f8b1d1560 100644 --- a/packetbeat/protos/http/event.go +++ b/packetbeat/protos/http/event.go @@ -23,7 +23,7 @@ import ( "strconv" "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/packetbeat/protos/http/fields.go b/packetbeat/protos/http/fields.go index 1c4efb516d26..079579e89b01 100644 --- a/packetbeat/protos/http/fields.go +++ b/packetbeat/protos/http/fields.go @@ -20,7 +20,7 @@ package http import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/http/http.go b/packetbeat/protos/http/http.go index dbc76badfd8f..efa344ab163b 100644 --- a/packetbeat/protos/http/http.go +++ b/packetbeat/protos/http/http.go @@ -28,13 +28,13 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/packetbeat/protos/http/http_parser.go b/packetbeat/protos/http/http_parser.go index 8548d0ecf7c7..748ea9dc712b 100644 --- a/packetbeat/protos/http/http_parser.go +++ b/packetbeat/protos/http/http_parser.go @@ -25,10 +25,10 @@ import ( "time" "unicode" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) // Http Message diff --git a/packetbeat/protos/http/http_test.go b/packetbeat/protos/http/http_test.go index f07af54008d7..69c8cd792ed7 100644 --- a/packetbeat/protos/http/http_test.go +++ b/packetbeat/protos/http/http_test.go @@ -30,11 +30,11 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/publish" ) type testParser struct { diff --git a/packetbeat/protos/icmp/config.go b/packetbeat/protos/icmp/config.go index 6e4113cd52ea..cb3ee28d7f92 100644 --- a/packetbeat/protos/icmp/config.go +++ b/packetbeat/protos/icmp/config.go @@ -20,7 +20,7 @@ package icmp import ( "time" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos" ) type icmpConfig struct { diff --git a/packetbeat/protos/icmp/fields.go b/packetbeat/protos/icmp/fields.go index 7d01789a7be2..a2feb6509e2a 100644 --- a/packetbeat/protos/icmp/fields.go +++ b/packetbeat/protos/icmp/fields.go @@ -20,7 +20,7 @@ package icmp import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/icmp/icmp.go b/packetbeat/protos/icmp/icmp.go index 82b8481df923..3c4b692ca828 100644 --- a/packetbeat/protos/icmp/icmp.go +++ b/packetbeat/protos/icmp/icmp.go @@ -21,14 +21,14 @@ import ( "net" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" "github.com/elastic/ecs/code/go/ecs" - "github.com/elastic/beats/packetbeat/flows" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/flows" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/tsg/gopacket/layers" ) diff --git a/packetbeat/protos/icmp/icmp_test.go b/packetbeat/protos/icmp/icmp_test.go index 0a8e7750b353..3ad537fa7d4a 100644 --- a/packetbeat/protos/icmp/icmp_test.go +++ b/packetbeat/protos/icmp/icmp_test.go @@ -24,11 +24,11 @@ import ( "net" "testing" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/tsg/gopacket" "github.com/tsg/gopacket/layers" diff --git a/packetbeat/protos/icmp/message.go b/packetbeat/protos/icmp/message.go index 0a8b857c2df8..873809a212a9 100644 --- a/packetbeat/protos/icmp/message.go +++ b/packetbeat/protos/icmp/message.go @@ -23,7 +23,7 @@ import ( "github.com/tsg/gopacket/layers" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) // TODO: more types (that are not provided as constants in gopacket) diff --git a/packetbeat/protos/memcache/binary.go b/packetbeat/protos/memcache/binary.go index 0ec929995e36..f9db915ce8a9 100644 --- a/packetbeat/protos/memcache/binary.go +++ b/packetbeat/protos/memcache/binary.go @@ -24,8 +24,8 @@ package memcache // init function. import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) type memcacheMagic uint8 diff --git a/packetbeat/protos/memcache/commands.go b/packetbeat/protos/memcache/commands.go index 8afe3ca1795f..399647bac5a9 100644 --- a/packetbeat/protos/memcache/commands.go +++ b/packetbeat/protos/memcache/commands.go @@ -21,8 +21,8 @@ package memcache // binary/text protocol based commands with setters and serializers. import ( - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) type commandType struct { diff --git a/packetbeat/protos/memcache/config.go b/packetbeat/protos/memcache/config.go index cc0863fbe690..e558c84153dd 100644 --- a/packetbeat/protos/memcache/config.go +++ b/packetbeat/protos/memcache/config.go @@ -20,8 +20,8 @@ package memcache import ( "time" - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type memcacheConfig struct { diff --git a/packetbeat/protos/memcache/fields.go b/packetbeat/protos/memcache/fields.go index 8e886384959a..a346cddbd4f8 100644 --- a/packetbeat/protos/memcache/fields.go +++ b/packetbeat/protos/memcache/fields.go @@ -20,7 +20,7 @@ package memcache import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/memcache/memcache.go b/packetbeat/protos/memcache/memcache.go index 96676a4a7f18..74bbd0f3f89c 100644 --- a/packetbeat/protos/memcache/memcache.go +++ b/packetbeat/protos/memcache/memcache.go @@ -24,13 +24,13 @@ import ( "math" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) // memcache types diff --git a/packetbeat/protos/memcache/memcache_test.go b/packetbeat/protos/memcache/memcache_test.go index 63cfadc463e3..7e6f61cd67e0 100644 --- a/packetbeat/protos/memcache/memcache_test.go +++ b/packetbeat/protos/memcache/memcache_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type memcacheTest struct { diff --git a/packetbeat/protos/memcache/parse.go b/packetbeat/protos/memcache/parse.go index 64e1486a70df..2fe774c19e5c 100644 --- a/packetbeat/protos/memcache/parse.go +++ b/packetbeat/protos/memcache/parse.go @@ -22,7 +22,7 @@ package memcache import ( "time" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) const ( diff --git a/packetbeat/protos/memcache/parse_test.go b/packetbeat/protos/memcache/parse_test.go index c61e7875cffd..f50b156a789c 100644 --- a/packetbeat/protos/memcache/parse_test.go +++ b/packetbeat/protos/memcache/parse_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) type testParser struct { diff --git a/packetbeat/protos/memcache/plugin_tcp.go b/packetbeat/protos/memcache/plugin_tcp.go index ff9f15f266b7..e9dded17dd65 100644 --- a/packetbeat/protos/memcache/plugin_tcp.go +++ b/packetbeat/protos/memcache/plugin_tcp.go @@ -22,13 +22,13 @@ package memcache import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/applayer" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) type tcpMemcache struct { diff --git a/packetbeat/protos/memcache/plugin_udp.go b/packetbeat/protos/memcache/plugin_udp.go index e0041ccf83f1..850c6e421fb2 100644 --- a/packetbeat/protos/memcache/plugin_udp.go +++ b/packetbeat/protos/memcache/plugin_udp.go @@ -23,13 +23,13 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) type udpMemcache struct { diff --git a/packetbeat/protos/memcache/text.go b/packetbeat/protos/memcache/text.go index 769ccbf08e98..72b36442c9a5 100644 --- a/packetbeat/protos/memcache/text.go +++ b/packetbeat/protos/memcache/text.go @@ -29,8 +29,8 @@ import ( "bytes" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) type textCommandType struct { diff --git a/packetbeat/protos/mongodb/config.go b/packetbeat/protos/mongodb/config.go index 76e1fc998c18..e7e2143b6474 100644 --- a/packetbeat/protos/mongodb/config.go +++ b/packetbeat/protos/mongodb/config.go @@ -18,8 +18,8 @@ package mongodb import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type mongodbConfig struct { diff --git a/packetbeat/protos/mongodb/fields.go b/packetbeat/protos/mongodb/fields.go index 4a84b24f29fb..5293efdece9a 100644 --- a/packetbeat/protos/mongodb/fields.go +++ b/packetbeat/protos/mongodb/fields.go @@ -20,7 +20,7 @@ package mongodb import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/mongodb/mongodb.go b/packetbeat/protos/mongodb/mongodb.go index c3690944325f..ac3e66dca5ee 100644 --- a/packetbeat/protos/mongodb/mongodb.go +++ b/packetbeat/protos/mongodb/mongodb.go @@ -22,14 +22,14 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) var debugf = logp.MakeDebug("mongodb") diff --git a/packetbeat/protos/mongodb/mongodb_parser.go b/packetbeat/protos/mongodb/mongodb_parser.go index cbbeca800ebb..a5ff5fa06253 100644 --- a/packetbeat/protos/mongodb/mongodb_parser.go +++ b/packetbeat/protos/mongodb/mongodb_parser.go @@ -23,8 +23,8 @@ import ( "strings" "sync" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" "gopkg.in/mgo.v2/bson" ) diff --git a/packetbeat/protos/mongodb/mongodb_structs.go b/packetbeat/protos/mongodb/mongodb_structs.go index b3366f0b97bb..6bd66b4570f8 100644 --- a/packetbeat/protos/mongodb/mongodb_structs.go +++ b/packetbeat/protos/mongodb/mongodb_structs.go @@ -22,7 +22,7 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) type mongodbMessage struct { diff --git a/packetbeat/protos/mongodb/mongodb_test.go b/packetbeat/protos/mongodb/mongodb_test.go index 09cc2a1ef4f9..4bd16ec121d0 100644 --- a/packetbeat/protos/mongodb/mongodb_test.go +++ b/packetbeat/protos/mongodb/mongodb_test.go @@ -26,10 +26,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" ) type eventStore struct { diff --git a/packetbeat/protos/mysql/config.go b/packetbeat/protos/mysql/config.go index 4429946f7f34..d53429c3a2cd 100644 --- a/packetbeat/protos/mysql/config.go +++ b/packetbeat/protos/mysql/config.go @@ -20,8 +20,8 @@ package mysql import ( "time" - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type mysqlConfig struct { diff --git a/packetbeat/protos/mysql/fields.go b/packetbeat/protos/mysql/fields.go index 609b5d029623..05c415aebd8a 100644 --- a/packetbeat/protos/mysql/fields.go +++ b/packetbeat/protos/mysql/fields.go @@ -20,7 +20,7 @@ package mysql import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/mysql/mysql.go b/packetbeat/protos/mysql/mysql.go index 1e6fc5179def..4d08debf9767 100644 --- a/packetbeat/protos/mysql/mysql.go +++ b/packetbeat/protos/mysql/mysql.go @@ -25,14 +25,14 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) // Packet types diff --git a/packetbeat/protos/mysql/mysql_test.go b/packetbeat/protos/mysql/mysql_test.go index 20332a08cc1a..9bdfdb2cf072 100644 --- a/packetbeat/protos/mysql/mysql_test.go +++ b/packetbeat/protos/mysql/mysql_test.go @@ -27,13 +27,13 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/publish" ) const serverPort = 3306 diff --git a/packetbeat/protos/nfs/config.go b/packetbeat/protos/nfs/config.go index 70f9cef0a0e6..639bdad525d6 100644 --- a/packetbeat/protos/nfs/config.go +++ b/packetbeat/protos/nfs/config.go @@ -20,7 +20,7 @@ package nfs import ( "time" - "github.com/elastic/beats/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/config" ) type rpcConfig struct { diff --git a/packetbeat/protos/nfs/fields.go b/packetbeat/protos/nfs/fields.go index d195b065d791..7ebf9023bbc8 100644 --- a/packetbeat/protos/nfs/fields.go +++ b/packetbeat/protos/nfs/fields.go @@ -20,7 +20,7 @@ package nfs import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/nfs/nfs.go b/packetbeat/protos/nfs/nfs.go index cb207cf8f9d3..9537f9924ec3 100644 --- a/packetbeat/protos/nfs/nfs.go +++ b/packetbeat/protos/nfs/nfs.go @@ -18,9 +18,9 @@ package nfs import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/packetbeat/pb" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/packetbeat/pb" ) type nfs struct { diff --git a/packetbeat/protos/nfs/request_handler.go b/packetbeat/protos/nfs/request_handler.go index bd56466197d1..241e0dca482c 100644 --- a/packetbeat/protos/nfs/request_handler.go +++ b/packetbeat/protos/nfs/request_handler.go @@ -23,11 +23,11 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) const nfsProgramNumber = 100003 diff --git a/packetbeat/protos/nfs/rpc.go b/packetbeat/protos/nfs/rpc.go index 7607bb507b85..f115cf19fba0 100644 --- a/packetbeat/protos/nfs/rpc.go +++ b/packetbeat/protos/nfs/rpc.go @@ -26,11 +26,11 @@ import ( "fmt" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) var debugf = logp.MakeDebug("rpc") diff --git a/packetbeat/protos/pgsql/config.go b/packetbeat/protos/pgsql/config.go index 4a647483f4fa..54a9a1b9e2eb 100644 --- a/packetbeat/protos/pgsql/config.go +++ b/packetbeat/protos/pgsql/config.go @@ -18,8 +18,8 @@ package pgsql import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type pgsqlConfig struct { diff --git a/packetbeat/protos/pgsql/fields.go b/packetbeat/protos/pgsql/fields.go index f01c41c8bd51..9e6dd8c6a8ad 100644 --- a/packetbeat/protos/pgsql/fields.go +++ b/packetbeat/protos/pgsql/fields.go @@ -20,7 +20,7 @@ package pgsql import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/pgsql/parse.go b/packetbeat/protos/pgsql/parse.go index cf7d9f72d97e..a7bcdb44770a 100644 --- a/packetbeat/protos/pgsql/parse.go +++ b/packetbeat/protos/pgsql/parse.go @@ -21,7 +21,7 @@ import ( "errors" "strings" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" ) var ( diff --git a/packetbeat/protos/pgsql/pgsql.go b/packetbeat/protos/pgsql/pgsql.go index a16c07d64b9a..69bfb4688879 100644 --- a/packetbeat/protos/pgsql/pgsql.go +++ b/packetbeat/protos/pgsql/pgsql.go @@ -22,14 +22,14 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" "go.uber.org/zap" ) diff --git a/packetbeat/protos/pgsql/pgsql_test.go b/packetbeat/protos/pgsql/pgsql_test.go index 259f727adc43..356d367c3911 100644 --- a/packetbeat/protos/pgsql/pgsql_test.go +++ b/packetbeat/protos/pgsql/pgsql_test.go @@ -27,12 +27,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/publish" ) type eventStore struct { diff --git a/packetbeat/protos/protos.go b/packetbeat/protos/protos.go index fe801f96c616..9991458eb2b8 100644 --- a/packetbeat/protos/protos.go +++ b/packetbeat/protos/protos.go @@ -24,10 +24,10 @@ import ( "strings" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/packetbeat/protos/protos_test.go b/packetbeat/protos/protos_test.go index 2d482d7179b0..4d61d20038e0 100644 --- a/packetbeat/protos/protos_test.go +++ b/packetbeat/protos/protos_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common" "github.com/stretchr/testify/assert" ) diff --git a/packetbeat/protos/redis/config.go b/packetbeat/protos/redis/config.go index 0450923ca898..beb1caed2e2f 100644 --- a/packetbeat/protos/redis/config.go +++ b/packetbeat/protos/redis/config.go @@ -18,8 +18,8 @@ package redis import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type redisConfig struct { diff --git a/packetbeat/protos/redis/fields.go b/packetbeat/protos/redis/fields.go index 7e816a6ac811..6c6bb66c0e3e 100644 --- a/packetbeat/protos/redis/fields.go +++ b/packetbeat/protos/redis/fields.go @@ -20,7 +20,7 @@ package redis import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/redis/redis.go b/packetbeat/protos/redis/redis.go index 3962c199a8e8..e7feac645c53 100644 --- a/packetbeat/protos/redis/redis.go +++ b/packetbeat/protos/redis/redis.go @@ -21,16 +21,16 @@ import ( "bytes" "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/applayer" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) type stream struct { diff --git a/packetbeat/protos/redis/redis_parse.go b/packetbeat/protos/redis/redis_parse.go index 5ec9c3a7c286..c99679a1ba6f 100644 --- a/packetbeat/protos/redis/redis_parse.go +++ b/packetbeat/protos/redis/redis_parse.go @@ -20,9 +20,9 @@ package redis import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" ) type parser struct { diff --git a/packetbeat/protos/registry.go b/packetbeat/protos/registry.go index c8b5ad56517a..f1fc17b70740 100644 --- a/packetbeat/protos/registry.go +++ b/packetbeat/protos/registry.go @@ -20,8 +20,8 @@ package protos import ( "time" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) type ProtocolPlugin func( diff --git a/packetbeat/protos/tcp/tcp.go b/packetbeat/protos/tcp/tcp.go index 215b0cd0d80b..e9db7b948972 100644 --- a/packetbeat/protos/tcp/tcp.go +++ b/packetbeat/protos/tcp/tcp.go @@ -22,12 +22,12 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" - "github.com/elastic/beats/packetbeat/flows" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/flows" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/tsg/gopacket/layers" ) diff --git a/packetbeat/protos/tcp/tcp_test.go b/packetbeat/protos/tcp/tcp_test.go index 879921022300..c34611729376 100644 --- a/packetbeat/protos/tcp/tcp_test.go +++ b/packetbeat/protos/tcp/tcp_test.go @@ -25,8 +25,8 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/stretchr/testify/assert" "github.com/tsg/gopacket/layers" diff --git a/packetbeat/protos/thrift/config.go b/packetbeat/protos/thrift/config.go index 4f770fa79ee0..f687da9ac0c1 100644 --- a/packetbeat/protos/thrift/config.go +++ b/packetbeat/protos/thrift/config.go @@ -18,8 +18,8 @@ package thrift import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type thriftConfig struct { diff --git a/packetbeat/protos/thrift/fields.go b/packetbeat/protos/thrift/fields.go index 3fdd330f1887..29347f3b1f31 100644 --- a/packetbeat/protos/thrift/fields.go +++ b/packetbeat/protos/thrift/fields.go @@ -20,7 +20,7 @@ package thrift import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/thrift/thrift.go b/packetbeat/protos/thrift/thrift.go index 8241f4001084..8c15b9bdf9c6 100644 --- a/packetbeat/protos/thrift/thrift.go +++ b/packetbeat/protos/thrift/thrift.go @@ -27,14 +27,14 @@ import ( "time" "unicode/utf8" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/monitoring" - - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/monitoring" + + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) type thriftPlugin struct { diff --git a/packetbeat/protos/thrift/thrift_idl.go b/packetbeat/protos/thrift/thrift_idl.go index 8d4d891bc86e..82d8dedbe939 100644 --- a/packetbeat/protos/thrift/thrift_idl.go +++ b/packetbeat/protos/thrift/thrift_idl.go @@ -20,7 +20,7 @@ package thrift import ( "fmt" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/samuel/go-thrift/parser" ) diff --git a/packetbeat/protos/thrift/thrift_idl_test.go b/packetbeat/protos/thrift/thrift_idl_test.go index 3120abe9ef0c..e1d5a334b87a 100644 --- a/packetbeat/protos/thrift/thrift_idl_test.go +++ b/packetbeat/protos/thrift/thrift_idl_test.go @@ -22,7 +22,7 @@ import ( "os" "testing" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) func thriftIdlForTesting(t *testing.T, content string) *thriftIdl { diff --git a/packetbeat/protos/thrift/thrift_test.go b/packetbeat/protos/thrift/thrift_test.go index 58cf9a26f24f..2c6618bab770 100644 --- a/packetbeat/protos/thrift/thrift_test.go +++ b/packetbeat/protos/thrift/thrift_test.go @@ -24,9 +24,9 @@ import ( "net" "testing" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" ) func thriftForTests() *thriftPlugin { diff --git a/packetbeat/protos/tls/alerts.go b/packetbeat/protos/tls/alerts.go index 1ff6cbb8cc05..4713e7e81f60 100644 --- a/packetbeat/protos/tls/alerts.go +++ b/packetbeat/protos/tls/alerts.go @@ -21,8 +21,8 @@ import ( "errors" "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) type alertSeverity uint8 diff --git a/packetbeat/protos/tls/alerts_test.go b/packetbeat/protos/tls/alerts_test.go index 5a33704eb66d..5c35d3bbf28d 100644 --- a/packetbeat/protos/tls/alerts_test.go +++ b/packetbeat/protos/tls/alerts_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" ) func getParser() *parser { diff --git a/packetbeat/protos/tls/buffer.go b/packetbeat/protos/tls/buffer.go index 30864f803123..55205fd6fd41 100644 --- a/packetbeat/protos/tls/buffer.go +++ b/packetbeat/protos/tls/buffer.go @@ -20,7 +20,7 @@ package tls import ( "fmt" - "github.com/elastic/beats/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/common/streambuf" ) type bufferView struct { diff --git a/packetbeat/protos/tls/config.go b/packetbeat/protos/tls/config.go index 5f35d4e54362..775a8f69cc10 100644 --- a/packetbeat/protos/tls/config.go +++ b/packetbeat/protos/tls/config.go @@ -18,8 +18,8 @@ package tls import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type tlsConfig struct { diff --git a/packetbeat/protos/tls/extensions.go b/packetbeat/protos/tls/extensions.go index 50a5ddf23b2b..0021705c7f7f 100644 --- a/packetbeat/protos/tls/extensions.go +++ b/packetbeat/protos/tls/extensions.go @@ -21,8 +21,8 @@ import ( "fmt" "strconv" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" ) // ExtensionID is the 16-bit identifier for an extension diff --git a/packetbeat/protos/tls/fields.go b/packetbeat/protos/tls/fields.go index f25aabd7bf5e..f56f6af273aa 100644 --- a/packetbeat/protos/tls/fields.go +++ b/packetbeat/protos/tls/fields.go @@ -20,7 +20,7 @@ package tls import ( - "github.com/elastic/beats/libbeat/asset" + "github.com/elastic/beats/v7/libbeat/asset" ) func init() { diff --git a/packetbeat/protos/tls/ja3_test.go b/packetbeat/protos/tls/ja3_test.go index c8f58333063d..b71ef35f4654 100644 --- a/packetbeat/protos/tls/ja3_test.go +++ b/packetbeat/protos/tls/ja3_test.go @@ -23,7 +23,7 @@ import ( "encoding/hex" "testing" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos" "github.com/stretchr/testify/assert" ) diff --git a/packetbeat/protos/tls/parse.go b/packetbeat/protos/tls/parse.go index 2191a7a8afde..d6714a76784a 100644 --- a/packetbeat/protos/tls/parse.go +++ b/packetbeat/protos/tls/parse.go @@ -27,9 +27,9 @@ import ( "fmt" "strings" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" ) type direction uint8 diff --git a/packetbeat/protos/tls/parse_test.go b/packetbeat/protos/tls/parse_test.go index aaad54f30bf0..f8635371494d 100644 --- a/packetbeat/protos/tls/parse_test.go +++ b/packetbeat/protos/tls/parse_test.go @@ -28,9 +28,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/libbeat/logp" ) const ( diff --git a/packetbeat/protos/tls/tls.go b/packetbeat/protos/tls/tls.go index b8b5431f1ee8..ab068884b615 100644 --- a/packetbeat/protos/tls/tls.go +++ b/packetbeat/protos/tls/tls.go @@ -24,15 +24,15 @@ import ( "github.com/elastic/ecs/code/go/ecs" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/x509util" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/pb" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/applayer" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/common/x509util" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/pb" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) type stream struct { diff --git a/packetbeat/protos/tls/tls_test.go b/packetbeat/protos/tls/tls_test.go index 0fc9cc501e4a..608e87738837 100644 --- a/packetbeat/protos/tls/tls_test.go +++ b/packetbeat/protos/tls/tls_test.go @@ -27,11 +27,11 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/publish" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/publish" ) type eventStore struct { diff --git a/packetbeat/protos/udp/udp.go b/packetbeat/protos/udp/udp.go index 8e05691d95c3..1d26fbf0c877 100644 --- a/packetbeat/protos/udp/udp.go +++ b/packetbeat/protos/udp/udp.go @@ -20,11 +20,11 @@ package udp import ( "fmt" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/flows" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/flows" + "github.com/elastic/beats/v7/packetbeat/protos" ) type UDP struct { diff --git a/packetbeat/protos/udp/udp_test.go b/packetbeat/protos/udp/udp_test.go index 32b4503945a4..32eae60308ac 100644 --- a/packetbeat/protos/udp/udp_test.go +++ b/packetbeat/protos/udp/udp_test.go @@ -24,14 +24,14 @@ import ( "testing" "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/protos" // import plugins for testing - _ "github.com/elastic/beats/packetbeat/protos/http" - _ "github.com/elastic/beats/packetbeat/protos/mysql" - _ "github.com/elastic/beats/packetbeat/protos/redis" + _ "github.com/elastic/beats/v7/packetbeat/protos/http" + _ "github.com/elastic/beats/v7/packetbeat/protos/mysql" + _ "github.com/elastic/beats/v7/packetbeat/protos/redis" "github.com/stretchr/testify/assert" ) diff --git a/packetbeat/publish/publish.go b/packetbeat/publish/publish.go index 844f6d4e9b07..7890a1c173d9 100644 --- a/packetbeat/publish/publish.go +++ b/packetbeat/publish/publish.go @@ -22,11 +22,11 @@ import ( "github.com/pkg/errors" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/libbeat/processors" - "github.com/elastic/beats/packetbeat/pb" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/processors" + "github.com/elastic/beats/v7/packetbeat/pb" ) type TransactionPublisher struct { diff --git a/packetbeat/publish/publish_test.go b/packetbeat/publish/publish_test.go index 895d8247bdab..711758187b0c 100644 --- a/packetbeat/publish/publish_test.go +++ b/packetbeat/publish/publish_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/packetbeat/pb" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/packetbeat/pb" "github.com/elastic/ecs/code/go/ecs" ) diff --git a/packetbeat/scripts/mage/config.go b/packetbeat/scripts/mage/config.go index d1b695e97b33..fac457cd7efd 100644 --- a/packetbeat/scripts/mage/config.go +++ b/packetbeat/scripts/mage/config.go @@ -18,7 +18,7 @@ package mage import ( - devtools "github.com/elastic/beats/dev-tools/mage" + devtools "github.com/elastic/beats/v7/dev-tools/mage" ) const ( diff --git a/packetbeat/scripts/tcp-protocol/README.md b/packetbeat/scripts/tcp-protocol/README.md index 28c7c679b30e..b593a182237f 100644 --- a/packetbeat/scripts/tcp-protocol/README.md +++ b/packetbeat/scripts/tcp-protocol/README.md @@ -107,7 +107,7 @@ Create analyzer skeleton from code generator template. ``` Load plugin into packetbeat by running `make update`. Or add `_ -"github.com/elastic/beats/packetbeat/protos/echo"` to the import list in +"github.com/elastic/beats/v7/packetbeat/protos/echo"` to the import list in `$GOPATH/src/github.com/elastic/beats/packetbeat/include/list.go`. ### 2.2 Standalone beat with protocol analyzer (echo): @@ -132,8 +132,8 @@ package main import ( "os" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/packetbeat/beater" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/packetbeat/beater" // import supported protocol modules _ "github.com/urso/pb_echo/protos/echo" diff --git a/packetbeat/scripts/tcp-protocol/{protocol}/config.go.tmpl b/packetbeat/scripts/tcp-protocol/{protocol}/config.go.tmpl index 4e8ff9702841..66ca38c28360 100644 --- a/packetbeat/scripts/tcp-protocol/{protocol}/config.go.tmpl +++ b/packetbeat/scripts/tcp-protocol/{protocol}/config.go.tmpl @@ -1,8 +1,8 @@ package {protocol} import ( - "github.com/elastic/beats/packetbeat/config" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/protos" ) type {protocol}Config struct { diff --git a/packetbeat/scripts/tcp-protocol/{protocol}/parser.go.tmpl b/packetbeat/scripts/tcp-protocol/{protocol}/parser.go.tmpl index dc114289482a..00c64cf15dc3 100644 --- a/packetbeat/scripts/tcp-protocol/{protocol}/parser.go.tmpl +++ b/packetbeat/scripts/tcp-protocol/{protocol}/parser.go.tmpl @@ -4,8 +4,8 @@ import ( "errors" "time" - "github.com/elastic/beats/libbeat/common/streambuf" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/common/streambuf" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) type parser struct { diff --git a/packetbeat/scripts/tcp-protocol/{protocol}/pub.go.tmpl b/packetbeat/scripts/tcp-protocol/{protocol}/pub.go.tmpl index a6cdb7ff73e9..cf69faac9c90 100644 --- a/packetbeat/scripts/tcp-protocol/{protocol}/pub.go.tmpl +++ b/packetbeat/scripts/tcp-protocol/{protocol}/pub.go.tmpl @@ -1,10 +1,10 @@ package {protocol} import ( - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" - "github.com/elastic/beats/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos" ) // Transaction Publisher. diff --git a/packetbeat/scripts/tcp-protocol/{protocol}/trans.go.tmpl b/packetbeat/scripts/tcp-protocol/{protocol}/trans.go.tmpl index e234d01ceb66..4f7ad362bfed 100644 --- a/packetbeat/scripts/tcp-protocol/{protocol}/trans.go.tmpl +++ b/packetbeat/scripts/tcp-protocol/{protocol}/trans.go.tmpl @@ -3,10 +3,10 @@ package {protocol} import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" - "github.com/elastic/beats/packetbeat/procs" - "github.com/elastic/beats/packetbeat/protos/applayer" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/packetbeat/procs" + "github.com/elastic/beats/v7/packetbeat/protos/applayer" ) type transactions struct { diff --git a/packetbeat/scripts/tcp-protocol/{protocol}/{protocol}.go.tmpl b/packetbeat/scripts/tcp-protocol/{protocol}/{protocol}.go.tmpl index 98f5758283d9..f783e8403018 100644 --- a/packetbeat/scripts/tcp-protocol/{protocol}/{protocol}.go.tmpl +++ b/packetbeat/scripts/tcp-protocol/{protocol}/{protocol}.go.tmpl @@ -3,11 +3,11 @@ package {protocol} import ( "time" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/protos" - "github.com/elastic/beats/packetbeat/protos/tcp" + "github.com/elastic/beats/v7/packetbeat/protos" + "github.com/elastic/beats/v7/packetbeat/protos/tcp" ) // {plugin_type} application level protocol analyzer plugin diff --git a/packetbeat/sniffer/afpacket_linux.go b/packetbeat/sniffer/afpacket_linux.go index 005254a4ff4c..c95e7a377975 100644 --- a/packetbeat/sniffer/afpacket_linux.go +++ b/packetbeat/sniffer/afpacket_linux.go @@ -25,7 +25,7 @@ import ( "time" "unsafe" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/tsg/gopacket" "github.com/tsg/gopacket/afpacket" diff --git a/packetbeat/sniffer/device.go b/packetbeat/sniffer/device.go index 29fc4cbe69cb..52ff220309dc 100644 --- a/packetbeat/sniffer/device.go +++ b/packetbeat/sniffer/device.go @@ -24,7 +24,7 @@ import ( "github.com/tsg/gopacket/pcap" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) var deviceAnySupported = runtime.GOOS == "linux" diff --git a/packetbeat/sniffer/file.go b/packetbeat/sniffer/file.go index 1d6913b92b13..b112e4c90edb 100644 --- a/packetbeat/sniffer/file.go +++ b/packetbeat/sniffer/file.go @@ -26,7 +26,7 @@ import ( "github.com/tsg/gopacket/layers" "github.com/tsg/gopacket/pcap" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/logp" ) type fileHandler struct { diff --git a/packetbeat/sniffer/sniffer.go b/packetbeat/sniffer/sniffer.go index d38101c4b20a..bfe720c7b985 100644 --- a/packetbeat/sniffer/sniffer.go +++ b/packetbeat/sniffer/sniffer.go @@ -29,10 +29,10 @@ import ( "github.com/tsg/gopacket/layers" "github.com/tsg/gopacket/pcap" - "github.com/elastic/beats/libbeat/common/atomic" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/libbeat/common/atomic" + "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/packetbeat/config" + "github.com/elastic/beats/v7/packetbeat/config" ) // Sniffer provides packet sniffing capabilities, forwarding packets read diff --git a/script/clean_vendor.sh b/script/clean_vendor.sh deleted file mode 100755 index e03e8083e84b..000000000000 --- a/script/clean_vendor.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -# Removes unnecessary files from the vendor directories -# -# A list for files to be removed is used instead of excluding files. -# The reason is that this makes the setup simpler and prevents -# from removing files by accident -# -# In general it should always be checked manually which files were removed. -# For example some projects like stretchr/testify have two LICENSE files -# with different names, where it is ok that one is removed. -# -# We keep the CHANGELOG in as this makes it easy visible when updating dependencies -# on what has changed. - -# In general the following files should be kept: -# * .go -# * LICENSE* CHANGELOG*, PATENT*, CONTRIBUTORS*, README* -# * `.s`, `.c`, `.cpp`, `.cc`, `.c++` -# * `.m`, `.mm`, `.m++` - -# Finds all vendor directories -DIR_LIST=`find . -type d -name vendor` - -# Remove directories used for versioning -find $DIR_LIST -type d -name ".bzr" -o -name ".git" -exec rm -rf {} \; - -## Removing all yaml files which are normally config files (travis.yml) -find $DIR_LIST -type f -name "*.yml" -exec rm -r {} \; - -## Removing all golang test files -find $DIR_LIST -type f -name "*_test.go" -exec rm -r {} \; - -## Removing all files starting with a dot (like .gitignore) -find $DIR_LIST -type f -name ".*" -exec rm -r {} \; - -## Removing all .txt files which are normally test data or docs -## Excluding files mentioned above as e.x. nranchev/go-libGeoIP has the license in a .txt file -find $DIR_LIST -type f -name "*.txt" -a ! \( -iname "LICENSE.*" -o -iname "CHANGELOG.*" -o -iname "PATENT.*" -o -iname "CONTRIBUTORS.*" -o -iname "README.*" \) -exec rm -r {} \; - -## Removing all *.cfg files -find $DIR_LIST -type f -name "*.cfg" -exec rm -r {} \; - -## Removing all *.bat files -find $DIR_LIST -type f -name "*.bat" -exec rm -r {} \; - -## Removing all *.tar files -find $DIR_LIST -type f -name "*.tar" -exec rm -r {} \; diff --git a/script/update_golang_x.py b/script/update_golang_x.py deleted file mode 100644 index 3d9cdee7f07f..000000000000 --- a/script/update_golang_x.py +++ /dev/null @@ -1,39 +0,0 @@ -import json -import os -import argparse -import subprocess - - -def update(pkg_name): - """Call govendor on the targeted golang/x packages""" - - vendor_file = os.path.join('vendor', 'vendor.json') - target = 'golang.org/x/{}'.format(pkg_name) - - with open(vendor_file) as content: - deps = json.load(content) - packages = [dep['path'] for dep in deps['package'] if dep['path'].startswith(target)] - revision = '@{revision}'.format(revision=args.revision) if args.revision else '' - packages = ['{pkg}{revision}'.format(pkg=pkg, revision=revision) for pkg in packages] - cmd = ['govendor', 'fetch'] + packages - if args.verbose: - print(' '.join(cmd)) - subprocess.check_call(cmd) - - -def get_parser(): - """Creates parser to parse script params - """ - parser = argparse.ArgumentParser(description="Update golang.org/x/ in vendor folder") - parser.add_argument('-q', '--quiet', dest='verbose', action='store_false', help='work quietly') - parser.add_argument('--revision', help='update deps to this revision', default='') - parser.add_argument('name', help='name of the golang.org/x/ package. Can be empty', default='', nargs='?') - return parser - - -if __name__ == "__main__": - - parser = get_parser() - args = parser.parse_args() - - update(args.name) diff --git a/tools/tools.go b/tools/tools.go new file mode 100644 index 000000000000..8e2135946d85 --- /dev/null +++ b/tools/tools.go @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +// +build tools + +// This package contains the tool dependencies of the project. + +package tools + +import ( + _ "github.com/magefile/mage" + _ "github.com/pierrre/gotestcover" + _ "github.com/stretchr/testify/assert" + _ "github.com/tsg/go-daemon" + _ "golang.org/x/tools/cmd/goimports" + _ "golang.org/x/tools/cmd/stringer" + + _ "github.com/mitchellh/gox" + _ "github.com/reviewdog/reviewdog/cmd/reviewdog" + _ "golang.org/x/lint/golint" + + _ "github.com/elastic/go-licenser" +) diff --git a/vendor/4d63.com/embedfiles/LICENSE b/vendor/4d63.com/embedfiles/LICENSE new file mode 100644 index 000000000000..3ce2f074404d --- /dev/null +++ b/vendor/4d63.com/embedfiles/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2017, Leigh McCulloch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/4d63.com/embedfiles/README.md b/vendor/4d63.com/embedfiles/README.md new file mode 100644 index 000000000000..1c08e21ce417 --- /dev/null +++ b/vendor/4d63.com/embedfiles/README.md @@ -0,0 +1,69 @@ +# embedfiles +[![Go Report Card](https://goreportcard.com/badge/github.com/leighmcculloch/embedfiles)](https://goreportcard.com/report/github.com/leighmcculloch/embedfiles) + +Embedfiles is a tool for embedding files into Go code. + +Files are stored in a map of filenames to file data. + +## Install + +### Source + +``` +go get 4d63.com/embedfiles +``` + +## Usage + +``` +$ embedfiles +Embedfiles embeds files into a map in a go file. + +Usage: + + embedfiles -out=files.go -pkg=main + +Flags: + + -out file + output go file (default "files.go") + -pkg package + package name of the go file (default "main") +``` + +## Example + +Given files: +``` +$ echo "hello world" > file1 +$ mkdir morefiles +$ echo "who are you?" > morefiles/file2 +``` + +Embed with `embedfiles`: +``` +$ embedfiles file1 morefiles +``` + +A new file `files.go` is created: +``` +$ cat files.go +// Generated by 4d63.com/embedfiles. + +package main + +var fileNames = []string{ + "file1", "morefiles/file2", +} + +var files = map[string][]byte{ + + "file1": []byte{ + 31, 139, 8, 0, 0, 0, 0, 0, 2, 255, 202, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 225, 2, 4, 0, 0, 255, 255, 45, 59, 8, 175, 12, 0, 0, 0, + }, + + "morefiles/file2": []byte{ + 31, 139, 8, 0, 0, 0, 0, 0, 2, 255, 42, 207, 200, 87, 72, 44, 74, 85, 168, 204, 47, 181, 231, 2, 4, 0, 0, 255, 255, 138, 46, 37, 108, 13, 0, 0, 0, + }, +} +``` diff --git a/vendor/4d63.com/embedfiles/main.go b/vendor/4d63.com/embedfiles/main.go new file mode 100644 index 000000000000..2df56b7de5f2 --- /dev/null +++ b/vendor/4d63.com/embedfiles/main.go @@ -0,0 +1,121 @@ +package main // import "4d63.com/embedfiles" + +import ( + "bytes" + "flag" + "fmt" + "go/format" + "io/ioutil" + "os" + "path/filepath" + "text/template" +) + +const tmpl = ` +// Generated by 4d63.com/embedfiles. + +package {{.Package}} + +var fileNames = []string{ {{range $name, $bytes := .Files}}"{{$name}}",{{end}} } + +var files = map[string][]byte{ +{{range $name, $bytes := .Files}} + "{{$name}}": []byte{ {{range $bytes}}{{.}},{{end}} }, +{{end}} +} +` + +type tmplData struct { + Package string + Files map[string][]byte +} + +func main() { + out := flag.String("out", "files.go", "output go `file`") + pkg := flag.String("pkg", "main", "`package` name of the go file") + verbose := flag.Bool("verbose", false, "") + flag.Usage = func() { + fmt.Fprintf(os.Stderr, "Embedfiles embeds files in the paths into a map in a go file.\n\n") + fmt.Fprintf(os.Stderr, "Usage:\n\n") + fmt.Fprintf(os.Stderr, " embedfiles -out=files.go -pkg=main \n\n") + fmt.Fprintf(os.Stderr, "Flags:\n\n") + flag.PrintDefaults() + } + flag.Parse() + + inputPaths := flag.Args() + + if len(inputPaths) == 0 { + flag.Usage() + return + } + + f, err := os.Create(*out) + if err != nil { + printErr("creating file", err) + return + } + + files := map[string][]byte{} + for _, inputPath := range inputPaths { + err = filepath.Walk(inputPath, func(path string, info os.FileInfo, err error) error { + if err != nil { + return fmt.Errorf("walking: %s", err) + } + + if info.IsDir() { + return nil + } + + if *verbose { + fmt.Printf("%s ", path) + } + + contents, err := ioutil.ReadFile(path) + if err != nil { + return fmt.Errorf("reading file: %s", err) + } + if *verbose { + fmt.Printf("(%d bytes)\n", len(contents)) + } + + path = filepath.ToSlash(path) + files[path] = contents + return nil + }) + if err != nil { + printErr("walking", err) + return + } + } + + t, err := template.New("").Parse(tmpl) + if err != nil { + printErr("parsing template", err) + return + } + + buf := bytes.Buffer{} + err = t.Execute(&buf, tmplData{Package: *pkg, Files: files}) + if err != nil { + printErr("generating code", err) + return + } + + formatted, err := format.Source(buf.Bytes()) + if err != nil { + printErr("formatting code", err) + return + } + + f.Write(formatted) + err = f.Close() + if err != nil { + printErr("finalizing file", err) + return + } +} + +func printErr(doing string, err error) { + fmt.Fprintf(os.Stderr, "Error %s: %s\n", doing, err) +} diff --git a/vendor/4d63.com/tz/.gitignore b/vendor/4d63.com/tz/.gitignore new file mode 100644 index 000000000000..e7036a00469b --- /dev/null +++ b/vendor/4d63.com/tz/.gitignore @@ -0,0 +1 @@ +zoneinfo/ diff --git a/vendor/4d63.com/tz/tools.go b/vendor/4d63.com/tz/tools.go new file mode 100644 index 000000000000..94669479aac7 --- /dev/null +++ b/vendor/4d63.com/tz/tools.go @@ -0,0 +1,5 @@ +// +build tools + +package tz + +import _ "4d63.com/embedfiles" diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md new file mode 100644 index 000000000000..82e0db440c7f --- /dev/null +++ b/vendor/cloud.google.com/go/CHANGES.md @@ -0,0 +1,1419 @@ +# Changes + +## v0.51.0 + +- secretmanager: + - add IAM helper for generic resource IAM handle +- cloudbuild: + - migrate to microgen in a major version +- Various updates to autogenerated clients. + +## v0.50.0 + +- profiler: + - Support disabling CPU profile collection. + - Log when a profile creation attempt begins. +- compute/metadata: + - Fix panic on malformed URLs. + - InstanceName returns actual instance name. +- Various updates to autogenerated clients. + +## v0.49.0 + +- functions/metadata: + - Handle string resources in JSON unmarshaller. +- Various updates to autogenerated clients. + +## v0.48.0 + +- Various updates to autogenerated clients + +## v0.47.0 + +This release drops support for Go 1.9 and Go 1.10: we continue to officially +support Go 1.11, Go 1.12, and Go 1.13. + +- Various updates to autogenerated clients. +- Add cloudbuild/apiv1 client. + +## v0.46.3 + +This is an empty release that was created solely to aid in storage's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.46.2 + +This is an empty release that was created solely to aid in spanner's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.46.1 + +This is an empty release that was created solely to aid in firestore's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.46.0 + +- spanner: + - Retry "Session not found" for read-only transactions. + - Retry aborted PDMLs. +- spanner/spannertest: + - Fix a bug that was causing 0X-prefixed number to be parsed incorrectly. +- storage: + - Add HMACKeyOptions. + - Remove *REGIONAL from StorageClass documentation. Using MULTI_REGIONAL, + DURABLE_REDUCED_AVAILABILITY, and REGIONAL are no longer best practice + StorageClasses but they are still acceptable values. +- trace: + - Remove cloud.google.com/go/trace. Package cloud.google.com/go/trace has been + marked OBSOLETE for several years: it is now no longer provided. If you + relied on this package, please vendor it or switch to using + https://cloud.google.com/trace/docs/setup/go (which obsoleted it). + +## v0.45.1 + +This is an empty release that was created solely to aid in pubsub's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.45.0 + +- compute/metadata: + - Add Email method. +- storage: + - Fix duplicated retry logic. + - Add ReaderObjectAttrs.StartOffset. + - Support reading last N bytes of a file when a negative range is given, such + as `obj.NewRangeReader(ctx, -10, -1)`. + - Add HMACKey listing functionality. +- spanner/spannertest: + - Support primary keys with no columns. + - Fix MinInt64 parsing. + - Implement deletion of key ranges. + - Handle reads during a read-write transaction. + - Handle returning DATE values. +- pubsub: + - Fix Ack/Modack request size calculation. +- logging: + - Add auto-detection of monitored resources on GAE Standard. + +## v0.44.3 + +This is an empty release that was created solely to aid in bigtable's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.44.2 + +This is an empty release that was created solely to aid in bigquery's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.44.1 + +This is an empty release that was created solely to aid in datastore's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.44.0 + +- datastore: + - Interface elements whose underlying types are supported, are now supported. + - Reduce time to initial retry from 1s to 100ms. +- firestore: + - Add Increment transformation. +- storage: + - Allow emulator with STORAGE_EMULATOR_HOST. + - Add methods for HMAC key management. +- pubsub: + - Add PublishCount and PublishLatency measurements. + - Add DefaultPublishViews and DefaultSubscribeViews for convenience of + importing all views. + - Add add Subscription.PushConfig.AuthenticationMethod. +- spanner: + - Allow emulator usage with SPANNER_EMULATOR_HOST. + - Add cloud.google.com/go/spanner/spannertest, a spanner emulator. + - Add cloud.google.com/go/spanner/spansql which contains types and a parser + for the Cloud Spanner SQL dialect. +- asset: + - Add apiv1p2beta1 client. + +## v0.43.0 + +This is an empty release that was created solely to aid in logging's module +carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. + +## v0.42.0 + +- bigtable: + - Add an admin method to update an instance and clusters. + - Fix bttest regex matching behavior for alternations (things like `|a`). + - Expose BlockAllFilter filter. +- bigquery: + - Add Routines API support. +- storage: + - Add read-only Bucket.LocationType. +- logging: + - Add TraceSampled to Entry. + - Fix to properly extract {Trace, Span}Id from X-Cloud-Trace-Context. +- pubsub: + - Add Cloud Key Management to TopicConfig. + - Change ExpirationPolicy to optional.Duration. +- automl: + - Add apiv1beta1 client. +- iam: + - Fix compilation problem with iam/credentials/apiv1. + +## v0.41.0 + +- bigtable: + - Check results from PredicateFilter in bttest, which fixes certain false matches. +- profiler: + - debugLog checks user defined logging options before logging. +- spanner: + - PartitionedUpdates respect query parameters. + - StartInstance allows specifying cloud API access scopes. +- bigquery: + - Use empty slice instead of nil for ValueSaver, fixing an issue with zero-length, repeated, nested fields causing panics. +- firestore: + - Return same number of snapshots as doc refs (in the form of duplicate records) during GetAll. +- replay: + - Change references to IPv4 addresses to localhost, making replay compatible with IPv6. + +## v0.40.0 + +- all: + - Update to protobuf-golang v1.3.1. +- datastore: + - Attempt to decode GAE-encoded keys if initial decoding attempt fails. + - Support integer time conversion. +- pubsub: + - Add PublishSettings.BundlerByteLimit. If users receive pubsub.ErrOverflow, + this value should be adjusted higher. + - Use IPv6 compatible target in testutil. +- bigtable: + - Fix Latin-1 regexp filters in bttest, allowing \C. + - Expose PassAllFilter. +- profiler: + - Add log messages for slow path in start. + - Fix start to allow retry until success. +- firestore: + - Add admin client. +- containeranalysis: + - Add apiv1 client. +- grafeas: + - Add apiv1 client. + +## 0.39.0 + +- bigtable: + - Implement DeleteInstance in bttest. + - Return an error on invalid ReadRowsRequest.RowRange key ranges in bttest. +- bigquery: + - Move RequirePartitionFilter outside of TimePartioning. + - Expose models API. +- firestore: + - Allow array values in create and update calls. + - Add CollectionGroup method. +- pubsub: + - Add ExpirationPolicy to Subscription. +- storage: + - Add V4 signing. +- rpcreplay: + - Match streams by first sent request. This further improves rpcreplay's + ability to distinguish streams. +- httpreplay: + - Set up Man-In-The-Middle config only once. This should improve proxy + creation when multiple proxies are used in a single process. + - Remove error on empty Content-Type, allowing requests with no Content-Type + header but a non-empty body. +- all: + - Fix an edge case bug in auto-generated library pagination by properly + propagating pagetoken. + +## 0.38.0 + +This update includes a substantial reduction in our transitive dependency list +by way of updating to opencensus@v0.21.0. + +- spanner: + - Error implements GRPCStatus, allowing status.Convert. +- bigtable: + - Fix a bug in bttest that prevents single column queries returning results + that match other filters. + - Remove verbose retry logging. +- logging: + - Ensure RequestUrl has proper UTF-8, removing the need for users to wrap and + rune replace manually. +- recaptchaenterprise: + - Add v1beta1 client. +- phishingprotection: + - Add v1beta1 client. + +## 0.37.4 + +This patch releases re-builds the go.sum. This was not possible in the +previous release. + +- firestore: + - Add sentinel value DetectProjectID for auto-detecting project ID. + - Add OpenCensus tracing for public methods. + - Marked stable. All future changes come with a backwards compatibility + guarantee. + - Removed firestore/apiv1beta1. All users relying on this low-level library + should migrate to firestore/apiv1. Note that most users should use the + high-level firestore package instead. +- pubsub: + - Allow large messages in synchronous pull case. + - Cap bundler byte limit. This should prevent OOM conditions when there are + a very large number of message publishes occurring. +- storage: + - Add ETag to BucketAttrs and ObjectAttrs. +- datastore: + - Removed some non-sensical OpenCensus traces. +- webrisk: + - Add v1 client. +- asset: + - Add v1 client. +- cloudtasks: + - Add v2 client. + +## 0.37.3 + +This patch release removes github.com/golang/lint from the transitive +dependency list, resolving `go get -u` problems. + +Note: this release intentionally has a broken go.sum. Please use v0.37.4. + +## 0.37.2 + +This patch release is mostly intended to bring in v0.3.0 of +google.golang.org/api, which fixes a GCF deployment issue. + +Note: we had to-date accidentally marked Redis as stable. In this release, we've +fixed it by downgrading its documentation to alpha, as it is in other languages +and docs. + +- all: + - Document context in generated libraries. + +## 0.37.1 + +Small go.mod version bumps to bring in v0.2.0 of google.golang.org/api, which +introduces a new oauth2 url. + +## 0.37.0 + +- spanner: + - Add BatchDML method. + - Reduced initial time between retries. +- bigquery: + - Produce better error messages for InferSchema. + - Add logical type control for avro loads. + - Add support for the GEOGRAPHY type. +- datastore: + - Add sentinel value DetectProjectID for auto-detecting project ID. + - Allow flatten tag on struct pointers. + - Fixed a bug that caused queries to panic with invalid queries. Instead they + will now return an error. +- profiler: + - Add ability to override GCE zone and instance. +- pubsub: + - BEHAVIOR CHANGE: Refactor error code retry logic. RPCs should now more + consistently retry specific error codes based on whether they're idempotent + or non-idempotent. +- httpreplay: Fixed a bug when a non-GET request had a zero-length body causing + the Content-Length header to be dropped. +- iot: + - Add new apiv1 client. +- securitycenter: + - Add new apiv1 client. +- cloudscheduler: + - Add new apiv1 client. + +## 0.36.0 + +- spanner: + - Reduce minimum retry backoff from 1s to 100ms. This makes time between + retries much faster and should improve latency. +- storage: + - Add support for Bucket Policy Only. +- kms: + - Add ResourceIAM helper method. + - Deprecate KeyRingIAM and CryptoKeyIAM. Please use ResourceIAM. +- firestore: + - Switch from v1beta1 API to v1 API. + - Allow emulator with FIRESTORE_EMULATOR_HOST. +- bigquery: + - Add NumLongTermBytes to Table. + - Add TotalBytesProcessedAccuracy to QueryStatistics. +- irm: + - Add new v1alpha2 client. +- talent: + - Add new v4beta1 client. +- rpcreplay: + - Fix connection to work with grpc >= 1.17. + - It is now required for an actual gRPC server to be running for Dial to + succeed. + +## 0.35.1 + +- spanner: + - Adds OpenCensus views back to public API. + +## v0.35.0 + +- all: + - Add go.mod and go.sum. + - Switch usage of gax-go to gax-go/v2. +- bigquery: + - Fix bug where time partitioning could not be removed from a table. + - Fix panic that occurred with empty query parameters. +- bttest: + - Fix bug where deleted rows were returned by ReadRows. +- bigtable/emulator: + - Configure max message size to 256 MiB. +- firestore: + - Allow non-transactional queries in transactions. + - Allow StartAt/EndBefore on direct children at any depth. + - QuerySnapshotIterator.Stop may be called in an error state. + - Fix bug the prevented reset of transaction write state in between retries. +- functions/metadata: + - Make Metadata.Resource a pointer. +- logging: + - Make SpanID available in logging.Entry. +- metadata: + - Wrap !200 error code in a typed err. +- profiler: + - Add function to check if function name is within a particular file in the + profile. + - Set parent field in create profile request. + - Return kubernetes client to start cluster, so client can be used to poll + cluster. + - Add function for checking if filename is in profile. +- pubsub: + - Fix bug where messages expired without an initial modack in + synchronous=true mode. + - Receive does not retry ResourceExhausted errors. +- spanner: + - client.Close now cancels existing requests and should be much faster for + large amounts of sessions. + - Correctly allow MinOpened sessions to be spun up. + +## v0.34.0 + +- functions/metadata: + - Switch to using JSON in context. + - Make Resource a value. +- vision: Fix ProductSearch return type. +- datastore: Add an example for how to handle MultiError. + +## v0.33.1 + +- compute: Removes an erroneously added go.mod. +- logging: Populate source location in fromLogEntry. + +## v0.33.0 + +- bttest: + - Add support for apply_label_transformer. +- expr: + - Add expr library. +- firestore: + - Support retrieval of missing documents. +- kms: + - Add IAM methods. +- pubsub: + - Clarify extension documentation. +- scheduler: + - Add v1beta1 client. +- vision: + - Add product search helper. + - Add new product search client. + +## v0.32.0 + +Note: This release is the last to support Go 1.6 and 1.8. + +- bigquery: + - Add support for removing an expiration. + - Ignore NeverExpire in Table.Create. + - Validate table expiration time. +- cbt: + - Add note about not supporting arbitrary bytes. +- datastore: + - Align key checks. +- firestore: + - Return an error when using Start/End without providing values. +- pubsub: + - Add pstest Close method. + - Clarify MaxExtension documentation. +- securitycenter: + - Add v1beta1 client. +- spanner: + - Allow nil in mutations. + - Improve doc of SessionPoolConfig.MaxOpened. + - Increase session deletion timeout from 5s to 15s. + +## v0.31.0 + +- bigtable: + - Group mutations across multiple requests. +- bigquery: + - Link to bigquery troubleshooting errors page in bigquery.Error comment. +- cbt: + - Fix go generate command. + - Document usage of both maxage + maxversions. +- datastore: + - Passing nil keys results in ErrInvalidKey. +- firestore: + - Clarify what Document.DataTo does with untouched struct fields. +- profile: + - Validate service name in agent. +- pubsub: + - Fix deadlock with pstest and ctx.Cancel. + - Fix a possible deadlock in pstest. +- trace: + - Update doc URL with new fragment. + +Special thanks to @fastest963 for going above and beyond helping us to debug +hard-to-reproduce Pub/Sub issues. + +## v0.30.0 + +- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information. +- bigtable: bttest supports row sample filter. +- functions: metadata package added for accessing Cloud Functions resource metadata. + +## v0.29.0 + +- bigtable: + - Add retry to all idempotent RPCs. + - cbt supports complex GC policies. + - Emulator supports arbitrary bytes in regex filters. +- firestore: Add ArrayUnion and ArrayRemove. +- logging: Add the ContextFunc option to supply the context used for + asynchronous RPCs. +- profiler: Ignore NotDefinedError when fetching the instance name +- pubsub: + - BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled. + - BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning. + - Fix deadlock. + - Restore Ack/Nack/Modacks metrics. + - Improve context handling in iterator. + - Implement synchronous mode for Receive. + - pstest: add Pull. +- spanner: Add a metric for the number of sessions currently opened. +- storage: + - Canceling the context releases all resources. + - Add additional RetentionPolicy attributes. +- vision/apiv1: Add LocalizeObjects method. + +## v0.28.0 + +- bigtable: + - Emulator returns Unimplemented for snapshot RPCs. +- bigquery: + - Support zero-length repeated, nested fields. +- cloud assets: + - Add v1beta client. +- datastore: + - Don't nil out transaction ID on retry. +- firestore: + - BREAKING CHANGE: When watching a query with Query.Snapshots, QuerySnapshotIterator.Next + returns a QuerySnapshot which contains read time, result size, change list and the DocumentIterator + (previously, QuerySnapshotIterator.Next returned just the DocumentIterator). See: https://godoc.org/cloud.google.com/go/firestore#Query.Snapshots. + - Add array-contains operator. +- IAM: + - Add iam/credentials/apiv1 client. +- pubsub: + - Canceling the context passed to Subscription.Receive causes Receive to return when + processing finishes on all messages currently in progress, even if new messages are arriving. +- redis: + - Add redis/apiv1 client. +- storage: + - Add Reader.Attrs. + - Deprecate several Reader getter methods: please use Reader.Attrs for these instead. + - Add ObjectHandle.Bucket and ObjectHandle.Object methods. + +## v0.27.0 + +- bigquery: + - Allow modification of encryption configuration and partitioning options to a table via the Update call. + - Add a SchemaFromJSON function that converts a JSON table schema. +- bigtable: + - Restore cbt count functionality. +- containeranalysis: + - Add v1beta client. +- spanner: + - Fix a case where an iterator might not be closed correctly. +- storage: + - Add ServiceAccount method https://godoc.org/cloud.google.com/go/storage#Client.ServiceAccount. + - Add a method to Reader that returns the parsed value of the Last-Modified header. + +## v0.26.0 + +- bigquery: + - Support filtering listed jobs by min/max creation time. + - Support data clustering (https://godoc.org/cloud.google.com/go/bigquery#Clustering). + - Include job creator email in Job struct. +- bigtable: + - Add `RowSampleFilter`. + - emulator: BREAKING BEHAVIOR CHANGE: Regexps in row, family, column and value filters + must match the entire target string to succeed. Previously, the emulator was + succeeding on partial matches. + NOTE: As of this release, this change only affects the emulator when run + from this repo (bigtable/cmd/emulator/cbtemulator.go). The version launched + from `gcloud` will be updated in a subsequent `gcloud` release. +- dataproc: Add apiv1beta2 client. +- datastore: Save non-nil pointer fields on omitempty. +- logging: populate Entry.Trace from the HTTP X-Cloud-Trace-Context header. +- logging/logadmin: Support writer_identity and include_children. +- pubsub: + - Support labels on topics and subscriptions. + - Support message storage policy for topics. + - Use the distribution of ack times to determine when to extend ack deadlines. + The only user-visible effect of this change should be that programs that + call only `Subscription.Receive` need no IAM permissions other than `Pub/Sub + Subscriber`. +- storage: + - Support predefined ACLs. + - Support additional ACL fields other than Entity and Role. + - Support bucket websites. + - Support bucket logging. + + +## v0.25.0 + +- Added [Code of Conduct](https://github.com/googleapis/google-cloud-go/blob/master/CODE_OF_CONDUCT.md) +- bigtable: + - cbt: Support a GC policy of "never". +- errorreporting: + - Support User. + - Close now calls Flush. + - Use OnError (previously ignored). + - Pass through the RPC error as-is to OnError. +- httpreplay: A tool for recording and replaying HTTP requests + (for the bigquery and storage clients in this repo). +- kms: v1 client added +- logging: add SourceLocation to Entry. +- storage: improve CRC checking on read. + +## v0.24.0 + +- bigquery: Support for the NUMERIC type. +- bigtable: + - cbt: Optionally specify columns for read/lookup + - Support instance-level administration. +- oslogin: New client for the OS Login API. +- pubsub: + - The package is now stable. There will be no further breaking changes. + - Internal changes to improve Subscription.Receive behavior. +- storage: Support updating bucket lifecycle config. +- spanner: Support struct-typed parameter bindings. +- texttospeech: New client for the Text-to-Speech API. + +## v0.23.0 + +- bigquery: Add DDL stats to query statistics. +- bigtable: + - cbt: Add cells-per-column limit for row lookup. + - cbt: Make it possible to combine read filters. +- dlp: v2beta2 client removed. Use the v2 client instead. +- firestore, spanner: Fix compilation errors due to protobuf changes. + +## v0.22.0 + +- bigtable: + - cbt: Support cells per column limit for row read. + - bttest: Correctly handle empty RowSet. + - Fix ReadModifyWrite operation in emulator. + - Fix API path in GetCluster. + +- bigquery: + - BEHAVIOR CHANGE: Retry on 503 status code. + - Add dataset.DeleteWithContents. + - Add SchemaUpdateOptions for query jobs. + - Add Timeline to QueryStatistics. + - Add more stats to ExplainQueryStage. + - Support Parquet data format. + +- datastore: + - Support omitempty for times. + +- dlp: + - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client, + which is now out of beta. + - Add v2 client. + +- firestore: + - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid. + +- iam: + - Support JWT signing via SignJwt callopt. + +- profiler: + - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done. + - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute. + - Avoid returning empty serial port output. + +- pubsub: + - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy. + - BEHAVIOR CHANGE: Don't backoff on EOF. + - pstest: Support Acknowledge and ModifyAckDeadline RPCs. + +- redis: + - Add v1 beta Redis client. + +- spanner: + - Support SessionLabels. + +- speech: + - Add api v1 beta1 client. + +- storage: + - BEHAVIOR CHANGE: Retry reads when retryable error occurs. + - Fix delete of object in requester-pays bucket. + - Support KMS integration. + +## v0.21.0 + +- bigquery: + - Add OpenCensus tracing. + +- firestore: + - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot + whose Exists method returns false. DocumentRef.Get and Transaction.Get + return the non-nil DocumentSnapshot in addition to a NotFound error. + **DocumentRef.GetAll and Transaction.GetAll return a non-nil + DocumentSnapshot instead of nil.** + - Add DocumentIterator.Stop. **Call Stop whenever you are done with a + DocumentIterator.** + - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime + notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen. + - Canceling an RPC now always returns a grpc.Status with codes.Canceled. + +- spanner: + - Add `CommitTimestamp`, which supports inserting the commit timestamp of a + transaction into a column. + +## v0.20.0 + +- bigquery: Support SchemaUpdateOptions for load jobs. + +- bigtable: + - Add SampleRowKeys. + - cbt: Support union, intersection GCPolicy. + - Retry admin RPCS. + - Add trace spans to retries. + +- datastore: Add OpenCensus tracing. + +- firestore: + - Fix queries involving Null and NaN. + - Allow Timestamp protobuffers for time values. + +- logging: Add a WriteTimeout option. + +- spanner: Support Batch API. + +- storage: Add OpenCensus tracing. + +## v0.19.0 + +- bigquery: + - Support customer-managed encryption keys. + +- bigtable: + - Improved emulator support. + - Support GetCluster. + +- datastore: + - Add general mutations. + - Support pointer struct fields. + - Support transaction options. + +- firestore: + - Add Transaction.GetAll. + - Support document cursors. + +- logging: + - Support concurrent RPCs to the service. + - Support per-entry resources. + +- profiler: + - Add config options to disable heap and thread profiling. + - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set. + +- pubsub: + - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the + callback returns). + - Add SubscriptionInProject. + - Add OpenCensus instrumentation for streaming pull. + +- storage: + - Support CORS. + +## v0.18.0 + +- bigquery: + - Marked stable. + - Schema inference of nullable fields supported. + - Added TimePartitioning to QueryConfig. + +- firestore: Data provided to DocumentRef.Set with a Merge option can contain + Delete sentinels. + +- logging: Clients can accept parent resources other than projects. + +- pubsub: + - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome. + - Support updating more subscription metadata: AckDeadline, + RetainAckedMessages and RetentionDuration. + +- oslogin/apiv1beta: New client for the Cloud OS Login API. + +- rpcreplay: A package for recording and replaying gRPC traffic. + +- spanner: + - Add a ReadWithOptions that supports a row limit, as well as an index. + - Support query plan and execution statistics. + - Added [OpenCensus](http://opencensus.io) support. + +- storage: Clarify checksum validation for gzipped files (it is not validated + when the file is served uncompressed). + + +## v0.17.0 + +- firestore BREAKING CHANGES: + - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update. + Change + `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})` + to + `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})` + + Change + `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)` + to + `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})` + - Rename MergePaths to Merge; require args to be FieldPaths + - A value stored as an integer can be read into a floating-point field, and vice versa. +- bigtable/cmd/cbt: + - Support deleting a column. + - Add regex option for row read. +- spanner: Mark stable. +- storage: + - Add Reader.ContentEncoding method. + - Fix handling of SignedURL headers. +- bigquery: + - If Uploader.Put is called with no rows, it returns nil without making a + call. + - Schema inference supports the "nullable" option in struct tags for + non-required fields. + - TimePartitioning supports "Field". + + +## v0.16.0 + +- Other bigquery changes: + - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE). + - UseStandardSQL is deprecated; set UseLegacySQL to true if you need + Legacy SQL. + - Uploader.Put will generate a random insert ID if you do not provide one. + - Support time partitioning for load jobs. + - Support dry-run queries. + - A `Job` remembers its last retrieved status. + - Support retrieving job configuration. + - Support labels for jobs and tables. + - Support dataset access lists. + - Improve support for external data sources, including data from Bigtable and + Google Sheets, and tables with external data. + - Support updating a table's view configuration. + - Fix uploading civil times with nanoseconds. + +- storage: + - Support PubSub notifications. + - Support Requester Pays buckets. + +- profiler: Support goroutine and mutex profile types. + +## v0.15.0 + +- firestore: beta release. See the + [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html). + +- errorreporting: The existing package has been redesigned. + +- errors: This package has been removed. Use errorreporting. + + +## v0.14.0 + +- bigquery BREAKING CHANGES: + - Standard SQL is the default for queries and views. + - `Table.Create` takes `TableMetadata` as a second argument, instead of + options. + - `Dataset.Create` takes `DatasetMetadata` as a second argument. + - `DatasetMetadata` field `ID` renamed to `FullID` + - `TableMetadata` field `ID` renamed to `FullID` + +- Other bigquery changes: + - The client will append a random suffix to a provided job ID if you set + `AddJobIDSuffix` to true in a job config. + - Listing jobs is supported. + - Better retry logic. + +- vision, language, speech: clients are now stable + +- monitoring: client is now beta + +- profiler: + - Rename InstanceName to Instance, ZoneName to Zone + - Auto-detect service name and version on AppEngine. + +## v0.13.0 + +- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these + options to continue using Legacy SQL after the client switches its default + to Standard SQL. + +- bigquery: Support for updating dataset labels. + +- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other + than the client's. DatasetsInProject is no longer needed and is deprecated. + +- bigtable: Fail ListInstances when any zones fail. + +- spanner: support decoding of slices of basic types (e.g. []string, []int64, + etc.) + +- logging/logadmin: UpdateSink no longer creates a sink if it is missing + (actually a change to the underlying service, not the client) + +- profiler: Service and ServiceVersion replace Target in Config. + +## v0.12.0 + +- pubsub: Subscription.Receive now uses streaming pull. + +- pubsub: add Client.TopicInProject to access topics in a different project + than the client. + +- errors: renamed errorreporting. The errors package will be removed shortly. + +- datastore: improved retry behavior. + +- bigquery: support updates to dataset metadata, with etags. + +- bigquery: add etag support to Table.Update (BREAKING: etag argument added). + +- bigquery: generate all job IDs on the client. + +- storage: support bucket lifecycle configurations. + + +## v0.11.0 + +- Clients for spanner, pubsub and video are now in beta. + +- New client for DLP. + +- spanner: performance and testing improvements. + +- storage: requester-pays buckets are supported. + +- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements. + +- pubsub: bug fixes and other minor improvements + +## v0.10.0 + +- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update. + +- pubsub: Subscription.Receive now runs concurrently for higher throughput. + +- vision: cloud.google.com/go/vision is deprecated. Use +cloud.google.com/go/vision/apiv1 instead. + +- translation: now stable. + +- trace: several changes to the surface. See the link below. + +### Code changes required from v0.9.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 { + ... + } + ``` + + +## v0.9.0 + +- Breaking changes to some autogenerated clients. +- rpcreplay package added. + +## v0.8.0 + +- profiler package added. +- storage: + - Retry Objects.Insert call. + - Add ProgressFunc to WRiter. +- pubsub: breaking 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. + +## v0.7.0 + +- 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. + +## v0.6.0 + +- Beta release of BigQuery, DataStore, Logging and Storage. See the +[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html). + +- bigquery: + - struct support. 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. + + - 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. + +## v0.5.0 + +- bigquery: + - 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. + - Support for query parameters. + - Support deleting a dataset. + - Values from INTEGER columns will now be returned as int64, not int. This + will avoid errors arising from large values on 32-bit systems. +- datastore: + - Nested Go structs encoded 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. + - 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. + +## v0.4.0 + +- bigquery: + -`NewGCSReference` is now a function, not a method on `Client`. + - `Table.LoaderFrom` now accepts a `ReaderSource`, enabling + loading data into a table from a file or any `io.Reader`. + * Client.Table and Client.OpenTable have been removed. + Replace + ```go + client.OpenTable("project", "dataset", "table") + ``` + with + ```go + client.DatasetInProject("project", "dataset").Table("table") + ``` + + * Client.CreateTable has been removed. + Replace + ```go + client.CreateTable(ctx, "project", "dataset", "table") + ``` + with + ```go + client.DatasetInProject("project", "dataset").Table("table").Create(ctx) + ``` + + * Dataset.ListTables have been replaced with Dataset.Tables. + Replace + ```go + tables, err := ds.ListTables(ctx) + ``` + with + ```go + it := ds.Tables(ctx) + for { + table, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: use table. + } + ``` + + * Client.Read has been replaced with Job.Read, Table.Read and Query.Read. + Replace + ```go + it, err := client.Read(ctx, job) + ``` + with + ```go + it, err := job.Read(ctx) + ``` + and similarly for reading from tables or queries. + + * The iterator returned from the Read methods is now named RowIterator. Its + behavior is closer to the other iterators in these libraries. It no longer + supports the Schema method; see the next item. + Replace + ```go + for it.Next(ctx) { + var vals ValueList + if err := it.Get(&vals); err != nil { + // TODO: Handle error. + } + // TODO: use vals. + } + if err := it.Err(); err != nil { + // TODO: Handle error. + } + ``` + with + ``` + for { + var vals ValueList + err := it.Next(&vals) + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: use vals. + } + ``` + Instead of the `RecordsPerRequest(n)` option, write + ```go + it.PageInfo().MaxSize = n + ``` + Instead of the `StartIndex(i)` option, write + ```go + it.StartIndex = i + ``` + + * ValueLoader.Load now takes a Schema in addition to a slice of Values. + Replace + ```go + func (vl *myValueLoader) Load(v []bigquery.Value) + ``` + with + ```go + func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema) + ``` + + + * Table.Patch is replace by Table.Update. + Replace + ```go + p := table.Patch() + p.Description("new description") + metadata, err := p.Apply(ctx) + ``` + with + ```go + metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{ + Description: "new description", + }) + ``` + + * Client.Copy is replaced by separate methods for each of its four functions. + All options have been replaced by struct fields. + + * To load data from Google Cloud Storage into a table, use Table.LoaderFrom. + + Replace + ```go + client.Copy(ctx, table, gcsRef) + ``` + with + ```go + table.LoaderFrom(gcsRef).Run(ctx) + ``` + Instead of passing options to Copy, set fields on the Loader: + ```go + loader := table.LoaderFrom(gcsRef) + loader.WriteDisposition = bigquery.WriteTruncate + ``` + + * To extract data from a table into Google Cloud Storage, use + Table.ExtractorTo. Set fields on the returned Extractor instead of + passing options. + + Replace + ```go + client.Copy(ctx, gcsRef, table) + ``` + with + ```go + table.ExtractorTo(gcsRef).Run(ctx) + ``` + + * To copy data into a table from one or more other tables, use + Table.CopierFrom. Set fields on the returned Copier instead of passing options. + + Replace + ```go + client.Copy(ctx, dstTable, srcTable) + ``` + with + ```go + dst.Table.CopierFrom(srcTable).Run(ctx) + ``` + + * To start a query job, create a Query and call its Run method. Set fields + on the query instead of passing options. + + Replace + ```go + client.Copy(ctx, table, query) + ``` + with + ```go + query.Run(ctx) + ``` + + * Table.NewUploader has been renamed to Table.Uploader. Instead of options, + configure an Uploader by setting its fields. + Replace + ```go + u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) + ``` + with + ```go + u := table.NewUploader(bigquery.UploadIgnoreUnknownValues()) + u.IgnoreUnknownValues = true + ``` + +- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where `iterator` is the package +`google.golang.org/api/iterator`. + +## v0.3.0 + +- storage: + * AdminClient replaced by methods on Client. + Replace + ```go + adminClient.CreateBucket(ctx, bucketName, attrs) + ``` + with + ```go + client.Bucket(bucketName).Create(ctx, projectID, attrs) + ``` + + * BucketHandle.List replaced by BucketHandle.Objects. + Replace + ```go + for query != nil { + objs, err := bucket.List(d.ctx, query) + if err != nil { ... } + query = objs.Next + for _, obj := range objs.Results { + fmt.Println(obj) + } + } + ``` + with + ```go + iter := bucket.Objects(d.ctx, query) + for { + obj, err := iter.Next() + if err == iterator.Done { + break + } + if err != nil { ... } + fmt.Println(obj) + } + ``` + (The `iterator` package is at `google.golang.org/api/iterator`.) + + Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`. + + Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`. + + + * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom. + Replace + ```go + attrs, err := src.CopyTo(ctx, dst, nil) + ``` + with + ```go + attrs, err := dst.CopierFrom(src).Run(ctx) + ``` + + Replace + ```go + attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"}) + ``` + with + ```go + c := dst.CopierFrom(src) + c.ContextType = "text/html" + attrs, err := c.Run(ctx) + ``` + + * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom. + Replace + ```go + attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil) + ``` + with + ```go + attrs, err := dst.ComposerFrom(src1, src2).Run(ctx) + ``` + + * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate. + Replace + ```go + attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"}) + ``` + with + ```go + attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"}) + ``` + + * ObjectHandle.WithConditions replaced by ObjectHandle.If. + Replace + ```go + obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen)) + ``` + with + ```go + obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen}) + ``` + + Replace + ```go + obj.WithConditions(storage.IfGenerationMatch(0)) + ``` + with + ```go + obj.If(storage.Conditions{DoesNotExist: true}) + ``` + + * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`). + +- Package preview/logging deleted. Use logging instead. + +## v0.2.0 + +- Logging client replaced with preview version (see below). + +- New clients for some of Google's Machine Learning APIs: Vision, Speech, and +Natural Language. + +- Preview version of a new [Stackdriver Logging][cloud-logging] client in +[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging). +This client uses gRPC as its transport layer, and supports log reading, sinks +and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly. + + diff --git a/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md b/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..8fd1bc9c22bd --- /dev/null +++ b/vendor/cloud.google.com/go/CODE_OF_CONDUCT.md @@ -0,0 +1,44 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) + diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md new file mode 100644 index 000000000000..fe82c7c38a01 --- /dev/null +++ b/vendor/cloud.google.com/go/CONTRIBUTING.md @@ -0,0 +1,306 @@ +# Contributing + +1. [Install Go](https://golang.org/dl/). + 1. Ensure that your `GOBIN` directory (by default `$(go env GOPATH)/bin`) + is in your `PATH`. + 1. Check it's working by running `go version`. + * If it doesn't work, check the install location, usually + `/usr/local/go`, is on your `PATH`. + +1. Sign one of the +[contributor license agreements](#contributor-license-agreements) below. + +1. Run `go get golang.org/x/review/git-codereview && go install golang.org/x/review/git-codereview` +to install the code reviewing tool. + + 1. Ensure it's working by running `git codereview` (check your `PATH` if + not). + + 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. + + * 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. Change to a directory of your choosing and clone the repo. + + ``` + cd ~/code + git clone https://code.googlesource.com/gocloud + ``` + + * If you have already checked out the source, make sure that the remote + `git` `origin` is https://code.googlesource.com/gocloud: + + ``` + git remote -v + # ... + git remote set-url origin https://code.googlesource.com/gocloud + ``` + + * The project uses [Go Modules](https://blog.golang.org/using-go-modules) + for dependency management See + [`gopls`](https://github.com/golang/go/wiki/gopls) for making your editor + work with modules. + +1. Change to the project directory: + + ``` + cd ~/code/gocloud + ``` + +1. Make sure your `git` auth is configured correctly by visiting +https://code.googlesource.com, clicking "Generate Password" at the top-right, +and following the directions. Otherwise, `git codereview mail` in the next step +will fail. + +1. Now you are ready to make changes. Don't create a new branch or make commits in the traditional +way. Use the following`git codereview` commands to create a commit and create a Gerrit CL: + + ``` + git codereview change # Use this instead of git checkout -b + # Make changes. + git add ... + git codereview change # Use this instead of git commit + git codereview mail # If this fails, the error message will contain instructions to fix it. + ``` + + * This will create a new `git` branch for you to develop on. Once your + change is merged, you can delete this branch. + +1. As you make changes for code review, ammend the commit and re-mail the +change: + + ``` + # Make more changes. + git add ... + git codereview change + git codereview mail + ``` + + * **Warning**: do not change the `Change-Id` at the bottom of the commit + message - it's how Gerrit knows which change this is (or if it's new). + + * When you fixes issues from code review, respond to each code review + message then click **Reply** at the top of the page. + + * Each new mailed amendment will create a new patch set for + your change in Gerrit. Patch sets can be compared and reviewed. + + * **Note**: if your change includes a breaking change, our breaking change + detector will cause CI/CD to fail. If your breaking change is acceptable + in some way, add a `BREAKING_CHANGE_ACCEPTABLE=` line to the commit + message to cause the detector not to be run and to make it clear why that is + acceptable. + +1. Finally, add reviewers to your CL when it's ready for review. Reviewers will +not be added automatically. If you're not sure who to add for your code review, +add deklerk@, tbp@, cbro@, and codyoss@. + + +## Integration Tests + +In addition to the unit tests, you may run the integration test suite. These +directions describe setting up your environment to run integration tests for +_all_ packages: note that many of these instructions may be redundant if you +intend only to run integration tests on a single package. + +#### GCP Setup + +To run the integrations tests, creation and configuration of two projects in +the Google Developers Console is required: one specifically for Firestore +integration tests, and another for all other integration tests. We'll refer to +these projects as "general project" and "Firestore project". + +After creating each project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) +for each project. Ensure the project-level **Owner** +[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to +each service account. During the creation of the service account, you should +download the JSON credential file for use later. + +Next, ensure the following APIs are enabled in the general project: + +- BigQuery API +- BigQuery Data Transfer API +- Cloud Dataproc API +- Cloud Dataproc Control API Private +- Cloud Datastore API +- Cloud Firestore API +- Cloud Key Management Service (KMS) API +- Cloud Natural Language API +- Cloud OS Login API +- Cloud Pub/Sub API +- Cloud Resource Manager API +- Cloud Spanner API +- Cloud Speech API +- Cloud Translation API +- Cloud Video Intelligence API +- Cloud Vision API +- Compute Engine API +- Compute Engine Instance Group Manager API +- Container Registry API +- Firebase Rules API +- Google Cloud APIs +- Google Cloud Deployment Manager V2 API +- Google Cloud SQL +- Google Cloud Storage +- Google Cloud Storage JSON API +- Google Compute Engine Instance Group Updater API +- Google Compute Engine Instance Groups API +- Kubernetes Engine API +- Stackdriver Error Reporting API + +Next, create a Datastore database in the general project, and a Firestore +database in the Firestore project. + +Finally, in the general project, create an API key for the translate API: + +- Go to GCP Developer Console. +- Navigate to APIs & Services > Credentials. +- Click Create Credentials > API Key. +- Save this key for use in `GCLOUD_TESTS_API_KEY` as described below. + +#### Local Setup + +Once the two projects are created and configured, set the following environment +variables: + +- `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g. +bamboo-shift-455) for the general project. +- `GCLOUD_TESTS_GOLANG_KEY`: The path to the JSON key file of the general +project's service account. +- `GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID`: Developers Console project's ID +(e.g. doorway-cliff-677) for the Firestore project. +- `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the +Firestore project's service account. +- `GCLOUD_TESTS_GOLANG_KEYRING`: The full name of the keyring for the tests, +in the form +"projects/P/locations/L/keyRings/R". The creation of this is described below. +- `GCLOUD_TESTS_API_KEY`: API key for using the Translate API. +- `GCLOUD_TESTS_GOLANG_ZONE`: Compute Engine zone. + +Install the [gcloud command-line tool][gcloudcli] to your machine and use it to +create some resources used in integration tests. + +From the project's root directory: + +``` sh +# Sets the default project in your env. +$ gcloud config set project $GCLOUD_TESTS_GOLANG_PROJECT_ID + +# Authenticates the gcloud tool with your account. +$ gcloud auth login + +# Create the indexes used in the datastore integration tests. +$ gcloud datastore indexes create datastore/testdata/index.yaml + +# Creates a Google Cloud storage bucket with the same name as your test project, +# and with the Stackdriver Logging service account as owner, for the sink +# integration tests in logging. +$ gsutil mb gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID +$ gsutil acl ch -g cloud-logs@google.com:O gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID + +# Creates a PubSub topic for integration tests of storage notifications. +$ gcloud beta pubsub topics create go-storage-notification-test +# Next, go to the Pub/Sub dashboard in GCP console. Authorize the user +# "service-@gs-project-accounts.iam.gserviceaccount.com" +# as a publisher to that topic. + +# Creates a Spanner instance for the spanner integration tests. +$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 10 --description 'Instance for go client test' +# NOTE: Spanner instances are priced by the node-hour, so you may want to +# delete the instance after testing with 'gcloud beta spanner instances delete'. + +$ export MY_KEYRING=some-keyring-name +$ export MY_LOCATION=global +# Creates a KMS keyring, in the same location as the default location for your +# project's buckets. +$ gcloud kms keyrings create $MY_KEYRING --location $MY_LOCATION +# Creates two keys in the keyring, named key1 and key2. +$ gcloud kms keys create key1 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption +$ gcloud kms keys create key2 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption +# Sets the GCLOUD_TESTS_GOLANG_KEYRING environment variable. +$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_LOCATION/keyRings/$MY_KEYRING +# Authorizes Google Cloud Storage to encrypt and decrypt using key1. +gsutil kms authorize -p $GCLOUD_TESTS_GOLANG_PROJECT_ID -k $GCLOUD_TESTS_GOLANG_KEYRING/cryptoKeys/key1 +``` + +#### Running + +Once you've done the necessary setup, you can run the integration tests by +running: + +``` sh +$ go test -v cloud.google.com/go/... +``` + +#### Replay + +Some packages can record the RPCs during integration tests to a file for +subsequent replay. To record, pass the `-record` flag to `go test`. The +recording will be saved to the _package_`.replay` file. To replay integration +tests from a saved recording, the replay file must be present, the `-short` +flag must be passed to `go test`, and the `GCLOUD_TESTS_GOLANG_ENABLE_REPLAY` +environment variable must have a non-empty value. + +## Contributor License Agreements + +Before we can accept your pull requests you'll need to sign a Contributor +License Agreement (CLA): + +- **If you are an individual writing original source code** and **you own the +intellectual property**, then you'll need to sign an [individual CLA][indvcla]. +- **If you work for a company that wants to allow you to contribute your +work**, then you'll need to sign a [corporate CLA][corpcla]. + +You can sign these electronically (just scroll to the bottom). After that, +we'll be able to accept your pull requests. + +## Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) + +[gcloudcli]: https://developers.google.com/cloud/sdk/gcloud/ +[indvcla]: https://developers.google.com/open-source/cla/individual +[corpcla]: https://developers.google.com/open-source/cla/corporate diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md new file mode 100644 index 000000000000..69ac0046e023 --- /dev/null +++ b/vendor/cloud.google.com/go/README.md @@ -0,0 +1,179 @@ +# Google Cloud Client Libraries for 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" +``` + +To install the packages on your system, *do not clone the repo*. Instead: + +1. Change to your project directory: + + ``` + cd /my/cloud/project + ``` +1. Get the package you want to use. Some products have their own module, so it's + best to `go get` the package(s) you want to use: + + ``` + $ go get cloud.google.com/go/firestore # Replace with the package you want to use. + ``` + +**NOTE:** Some of these packages are under development, and may occasionally +make backwards-incompatible changes. + +**NOTE:** Github repo is a mirror of [https://code.googlesource.com/gocloud](https://code.googlesource.com/gocloud). + +## Supported APIs + +Google API | Status | Package +------------------------------------------------|--------------|----------------------------------------------------------- +[Asset][cloud-asset] | alpha | [`cloud.google.com/go/asset/v1beta`](https://godoc.org/cloud.google.com/go/asset/v1beta) +[Automl][cloud-automl] | stable | [`cloud.google.com/go/automl/apiv1`](https://godoc.org/cloud.google.com/go/automl/apiv1) +[BigQuery][cloud-bigquery] | stable | [`cloud.google.com/go/bigquery`](https://godoc.org/cloud.google.com/go/bigquery) +[Bigtable][cloud-bigtable] | stable | [`cloud.google.com/go/bigtable`](https://godoc.org/cloud.google.com/go/bigtable) +[Cloudbuild][cloud-build] | stable | [`cloud.google.com/go/cloudbuild/apiv1`](https://godoc.org/cloud.google.com/go/cloudbuild/apiv1) +[Cloudtasks][cloud-tasks] | stable | [`cloud.google.com/go/cloudtasks/apiv2`](https://godoc.org/cloud.google.com/go/cloudtasks/apiv2) +[Container][cloud-container] | stable | [`cloud.google.com/go/container/apiv1`](https://godoc.org/cloud.google.com/go/container/apiv1) +[ContainerAnalysis][cloud-containeranalysis] | beta | [`cloud.google.com/go/containeranalysis/apiv1`](https://godoc.org/cloud.google.com/go/containeranalysis/apiv1) +[Dataproc][cloud-dataproc] | stable | [`cloud.google.com/go/dataproc/apiv1`](https://godoc.org/cloud.google.com/go/dataproc/apiv1) +[Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`](https://godoc.org/cloud.google.com/go/datastore) +[Debugger][cloud-debugger] | stable | [`cloud.google.com/go/debugger/apiv2`](https://godoc.org/cloud.google.com/go/debugger/apiv2) +[Dialogflow][cloud-dialogflow] | stable | [`cloud.google.com/go/dialogflow/apiv2`](https://godoc.org/cloud.google.com/go/dialogflow/apiv2) +[Data Loss Prevention][cloud-dlp] | stable | [`cloud.google.com/go/dlp/apiv2`](https://godoc.org/cloud.google.com/go/dlp/apiv2) +[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`](https://godoc.org/cloud.google.com/go/errorreporting) +[Firestore][cloud-firestore] | stable | [`cloud.google.com/go/firestore`](https://godoc.org/cloud.google.com/go/firestore) +[IAM][cloud-iam] | stable | [`cloud.google.com/go/iam`](https://godoc.org/cloud.google.com/go/iam) +[IoT][cloud-iot] | stable | [`cloud.google.com/go/iot/apiv1`](https://godoc.org/cloud.google.com/go/iot/apiv1) +[IRM][cloud-irm] | alpha | [`cloud.google.com/go/irm/apiv1alpha2`](https://godoc.org/cloud.google.com/go/irm/apiv1alpha2) +[KMS][cloud-kms] | stable | [`cloud.google.com/go/kms`](https://godoc.org/cloud.google.com/go/kms) +[Natural Language][cloud-natural-language] | stable | [`cloud.google.com/go/language/apiv1`](https://godoc.org/cloud.google.com/go/language/apiv1) +[Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`](https://godoc.org/cloud.google.com/go/logging) +[Memorystore][cloud-memorystore] | alpha | [`cloud.google.com/go/redis/apiv1`](https://godoc.org/cloud.google.com/go/redis/apiv1) +[Monitoring][cloud-monitoring] | alpha | [`cloud.google.com/go/monitoring/apiv3`](https://godoc.org/cloud.google.com/go/monitoring/apiv3) +[OS Login][cloud-oslogin] | alpha | [`cloud.google.com/go/oslogin/apiv1`](https://godoc.org/cloud.google.com/go/oslogin/apiv1) +[Pub/Sub][cloud-pubsub] | stable | [`cloud.google.com/go/pubsub`](https://godoc.org/cloud.google.com/go/pubsub) +[Phishing Protection][cloud-phishingprotection] | alpha | [`cloud.google.com/go/phishingprotection/apiv1beta1`](https://godoc.org/cloud.google.com/go/phishingprotection/apiv1beta1) +[reCAPTCHA Enterprise][cloud-recaptcha] | alpha | [`cloud.google.com/go/recaptchaenterprise/apiv1beta1`](https://godoc.org/cloud.google.com/go/recaptchaenterprise/apiv1beta1) +[Recommender][cloud-recommender] | beta | [`cloud.google.com/go/recommender/apiv1beta1`](https://godoc.org/cloud.google.com/go/recommender/apiv1beta1) +[Scheduler][cloud-scheduler] | stable | [`cloud.google.com/go/scheduler/apiv1`](https://godoc.org/cloud.google.com/go/scheduler/apiv1) +[Securitycenter][cloud-securitycenter] | alpha | [`cloud.google.com/go/securitycenter/apiv1`](https://godoc.org/cloud.google.com/go/securitycenter/apiv1) +[Spanner][cloud-spanner] | stable | [`cloud.google.com/go/spanner`](https://godoc.org/cloud.google.com/go/spanner) +[Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`](https://godoc.org/cloud.google.com/go/speech/apiv1) +[Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`](https://godoc.org/cloud.google.com/go/storage) +[Talent][cloud-talent] | alpha | [`cloud.google.com/go/talent/apiv4beta1`](https://godoc.org/cloud.google.com/go/talent/apiv4beta1) +[Text To Speech][cloud-texttospeech] | alpha | [`cloud.google.com/go/texttospeech/apiv1`](https://godoc.org/cloud.google.com/go/texttospeech/apiv1) +[Trace][cloud-trace] | alpha | [`cloud.google.com/go/trace/apiv2`](https://godoc.org/cloud.google.com/go/trace/apiv2) +[Translate][cloud-translate] | stable | [`cloud.google.com/go/translate`](https://godoc.org/cloud.google.com/go/translate) +[Video Intelligence][cloud-video] | alpha | [`cloud.google.com/go/videointelligence/apiv1beta1`](https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1) +[Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`](https://godoc.org/cloud.google.com/go/vision/apiv1) +[Webrisk][cloud-webrisk] | alpha | [`cloud.google.com/go/webrisk/apiv1beta1`](https://godoc.org/cloud.google.com/go/webrisk/apiv1beta1) + +> **Alpha status**: the API is still being actively developed. As a +> result, it might change in backward-incompatible ways and is not recommended +> for production use. +> +> **Beta status**: the API is largely complete, but still has outstanding +> features and bugs to be addressed. There may be minor backwards-incompatible +> changes where necessary. +> +> **Stable status**: the API is mature and ready for production use. We will +> continue addressing bugs and feature requests. + +Documentation and examples are available at [godoc.org/cloud.google.com/go](https://godoc.org/cloud.google.com/go) + +## Go Versions Supported + +We support the two most recent major versions of Go. If Google App Engine uses +an older version, we support that as well. + +## Authorization + +By default, each API will use [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials) +for authorization credentials used in calling the API endpoints. This will allow your +application to run in many environments without requiring explicit configuration. + +[snip]:# (auth) +```go +client, err := storage.NewClient(ctx) +``` + +To authorize using a +[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys), +pass +[`option.WithCredentialsFile`](https://godoc.org/google.golang.org/api/option#WithCredentialsFile) +to the `NewClient` function of the desired package. For example: + +[snip]:# (auth-JSON) +```go +client, err := storage.NewClient(ctx, option.WithCredentialsFile("path/to/keyfile.json")) +``` + +You can exert more control over authorization by using the +[`golang.org/x/oauth2`](https://godoc.org/golang.org/x/oauth2) package to +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)) +``` + +## Contributing + +Contributions are welcome. Please, see the +[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md) +document for details. We're using Gerrit for our code reviews. Please don't open pull +requests against this repo, new pull requests will be automatically closed. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. +See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. + +[cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory +[cloud-automl]: https://cloud.google.com/automl +[cloud-build]: https://cloud.google.com/cloud-build/ +[cloud-bigquery]: https://cloud.google.com/bigquery/ +[cloud-bigtable]: https://cloud.google.com/bigtable/ +[cloud-container]: https://cloud.google.com/containers/ +[cloud-containeranalysis]: https://cloud.google.com/container-registry/docs/container-analysis +[cloud-dataproc]: https://cloud.google.com/dataproc/ +[cloud-datastore]: https://cloud.google.com/datastore/ +[cloud-dialogflow]: https://cloud.google.com/dialogflow-enterprise/ +[cloud-debugger]: https://cloud.google.com/debugger/ +[cloud-dlp]: https://cloud.google.com/dlp/ +[cloud-errors]: https://cloud.google.com/error-reporting/ +[cloud-firestore]: https://cloud.google.com/firestore/ +[cloud-iam]: https://cloud.google.com/iam/ +[cloud-iot]: https://cloud.google.com/iot-core/ +[cloud-irm]: https://cloud.google.com/incident-response/docs/concepts +[cloud-kms]: https://cloud.google.com/kms/ +[cloud-pubsub]: https://cloud.google.com/pubsub/ +[cloud-storage]: https://cloud.google.com/storage/ +[cloud-language]: https://cloud.google.com/natural-language +[cloud-logging]: https://cloud.google.com/logging/ +[cloud-natural-language]: https://cloud.google.com/natural-language/ +[cloud-memorystore]: https://cloud.google.com/memorystore/ +[cloud-monitoring]: https://cloud.google.com/monitoring/ +[cloud-oslogin]: https://cloud.google.com/compute/docs/oslogin/rest +[cloud-phishingprotection]: https://cloud.google.com/phishing-protection/ +[cloud-securitycenter]: https://cloud.google.com/security-command-center/ +[cloud-scheduler]: https://cloud.google.com/scheduler +[cloud-spanner]: https://cloud.google.com/spanner/ +[cloud-speech]: https://cloud.google.com/speech +[cloud-talent]: https://cloud.google.com/solutions/talent-solution/ +[cloud-tasks]: https://cloud.google.com/tasks/ +[cloud-texttospeech]: https://cloud.google.com/texttospeech/ +[cloud-talent]: https://cloud.google.com/solutions/talent-solution/ +[cloud-trace]: https://cloud.google.com/trace/ +[cloud-translate]: https://cloud.google.com/translate +[cloud-recaptcha]: https://cloud.google.com/recaptcha-enterprise/ +[cloud-recommender]: https://cloud.google.com/recommendations/ +[cloud-video]: https://cloud.google.com/video-intelligence/ +[cloud-vision]: https://cloud.google.com/vision +[cloud-webrisk]: https://cloud.google.com/web-risk/ diff --git a/vendor/cloud.google.com/go/RELEASING.md b/vendor/cloud.google.com/go/RELEASING.md new file mode 100644 index 000000000000..02added7992f --- /dev/null +++ b/vendor/cloud.google.com/go/RELEASING.md @@ -0,0 +1,153 @@ +# Setup from scratch + +1. [Install Go](https://golang.org/dl/). + 1. Ensure that your `GOBIN` directory (by default `$(go env GOPATH)/bin`) + is in your `PATH`. + 1. Check it's working by running `go version`. + * If it doesn't work, check the install location, usually + `/usr/local/go`, is on your `PATH`. + +1. Sign one of the +[contributor license agreements](#contributor-license-agreements) below. + +1. Run `go get golang.org/x/review/git-codereview && go install golang.org/x/review/git-codereview` +to install the code reviewing tool. + + 1. Ensure it's working by running `git codereview` (check your `PATH` if + not). + + 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. + + * 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. Change to a directory of your choosing and clone the repo. + + ``` + cd ~/code + git clone https://code.googlesource.com/gocloud + ``` + + * If you have already checked out the source, make sure that the remote + `git` `origin` is https://code.googlesource.com/gocloud: + + ``` + git remote -v + # ... + git remote set-url origin https://code.googlesource.com/gocloud + ``` + + * The project uses [Go Modules](https://blog.golang.org/using-go-modules) + for dependency management See + [`gopls`](https://github.com/golang/go/wiki/gopls) for making your editor + work with modules. + +1. Change to the project directory and add the github remote: + + ``` + cd ~/code/gocloud + git remote add github https://github.com/googleapis/google-cloud-go + ``` + +1. Make sure your `git` auth is configured correctly by visiting +https://code.googlesource.com, clicking "Generate Password" at the top-right, +and following the directions. Otherwise, `git codereview mail` in the next step +will fail. + +# Which module to release? + +The Go client libraries have several modules. Each module does not strictly +correspond to a single library - they correspond to trees of directories. If a +file needs to be released, you must release the closest ancestor module. + +To see all modules: + +``` +$ cat `find . -name go.mod` | grep module +module cloud.google.com/go +module cloud.google.com/go/bigtable +module cloud.google.com/go/firestore +module cloud.google.com/go/bigquery +module cloud.google.com/go/storage +module cloud.google.com/go/datastore +module cloud.google.com/go/pubsub +module cloud.google.com/go/spanner +module cloud.google.com/go/logging +``` + +The `cloud.google.com/go` is the repository root module. Each other module is +a submodule. + +So, if you need to release a change in `bigtable/bttest/inmem.go`, the closest +ancestor module is `cloud.google.com/go/bigtable` - so you should release a new +version of the `cloud.google.com/go/bigtable` submodule. + +If you need to release a change in `asset/apiv1/asset_client.go`, the closest +ancestor module is `cloud.google.com/go` - so you should release a new version +of the `cloud.google.com/go` repository root module. Note: releasing +`cloud.google.com/go` has no impact on any of the submodules, and vice-versa. +They are released entirely independently. + +# How to release `cloud.google.com/go` + +1. Navigate to `~/code/gocloud/` and switch to master. +1. `git pull` +1. Run `git tag -l | grep -v beta | grep -v alpha` to see all existing releases. + The current latest tag `$CV` is the largest tag. It should look something + like `vX.Y.Z` (note: ignore all `LIB/vX.Y.Z` tags - these are tags for a + specific library, not the module root). 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. NOTE: You must manually visually parse out changes to submodules [1] + (the `git log` is going to show you things in submodules, which are not going + to be part of your release). +1. Edit `CHANGES.md` to include a summary of the changes. +1. `cd internal/version && go generate && cd -` +1. Mail the CL: `git add -A && git change && git mail` +1. Wait for the CL to be submitted. Once it's submitted, and without submitting + any other CLs in the meantime: + a. Switch to master. + b. `git pull` + c. Tag the repo with the next version: `git tag $NV`. + d. Push the tag to both remotes: + `git push origin $NV` + `git push github $NV` +1. Update [the releases page](https://github.com/googleapis/google-cloud-go/releases) + with the new release, copying the contents of `CHANGES.md`. + +# How to release a submodule + +We have several submodules, including `cloud.google.com/go/logging`, +`cloud.google.com/go/datastore`, and so on. + +To release a submodule: + +(these instructions assume we're releasing `cloud.google.com/go/datastore` - adjust accordingly) + +1. Navigate to `~/code/gocloud/` and switch to master. +1. `git pull` +1. Run `git tag -l | grep datastore | grep -v beta | grep -v alpha` to see all + existing releases. The current latest tag `$CV` is the largest tag. It + should look something like `datastore/vX.Y.Z`. We'll call the current version + `$CV` and the new version `$NV`. +1. On master, run `git log $CV.. -- datastore/` to list all the changes to the + submodule directory since the last release. +1. Edit `datastore/CHANGES.md` to include a summary of the changes. +1. `cd internal/version && go generate && cd -` +1. Mail the CL: `git add -A && git change && git mail` +1. Wait for the CL to be submitted. Once it's submitted, and without submitting + any other CLs in the meantime: + a. Switch to master. + b. `git pull` + c. Tag the repo with the next version: `git tag $NV`. + d. Push the tag to both remotes: + `git push origin $NV` + `git push github $NV` +1. Update [the releases page](https://github.com/googleapis/google-cloud-go/releases) + with the new release, copying the contents of `datastore/CHANGES.md`. + +# Appendix + +1: This should get better as submodule tooling matures. diff --git a/vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json b/vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json new file mode 100644 index 000000000000..ca022ccc41a0 --- /dev/null +++ b/vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "metadata", + "name_pretty": "Google Compute Engine Metadata API", + "product_documentation": "https://cloud.google.com/compute/docs/storing-retrieving-metadata", + "client_documentation": "https://godoc.org/cloud.google.com/go/compute/metadata", + "release_level": "ga", + "language": "go", + "repo": "googleapis/google-cloud-go", + "distribution_name": "cloud.google.com/go/compute/metadata", + "api_id": "compute:metadata", + "requires_billing": false +} diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go index 125b7033c96b..0b50c2a7a6c2 100644 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go @@ -227,6 +227,9 @@ func InternalIP() (string, error) { return defaultClient.InternalIP() } // ExternalIP returns the instance's primary external (public) IP address. func ExternalIP() (string, error) { return defaultClient.ExternalIP() } +// Email calls Client.Email on the default client. +func Email(serviceAccount string) (string, error) { return defaultClient.Email(serviceAccount) } + // Hostname returns the instance's hostname. This will be of the form // ".c..internal". func Hostname() (string, error) { return defaultClient.Hostname() } @@ -301,7 +304,10 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { host = metadataIP } u := "http://" + host + "/computeMetadata/v1/" + suffix - req, _ := http.NewRequest("GET", u, nil) + req, err := http.NewRequest("GET", u, nil) + if err != nil { + return "", "", err + } req.Header.Set("Metadata-Flavor", "Google") req.Header.Set("User-Agent", userAgent) res, err := c.hc.Do(req) @@ -367,6 +373,16 @@ func (c *Client) InternalIP() (string, error) { return c.getTrimmed("instance/network-interfaces/0/ip") } +// Email returns the email address associated with the service account. +// The account may be empty or the string "default" to use the instance's +// main account. +func (c *Client) Email(serviceAccount string) (string, error) { + if serviceAccount == "" { + serviceAccount = "default" + } + return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email") +} + // ExternalIP returns the instance's primary external (public) IP address. func (c *Client) ExternalIP() (string, error) { return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip") @@ -394,11 +410,7 @@ func (c *Client) InstanceTags() ([]string, error) { // InstanceName returns the current VM's instance ID string. func (c *Client) InstanceName() (string, error) { - host, err := c.Hostname() - if err != nil { - return "", err - } - return strings.Split(host, ".")[0], nil + return c.getTrimmed("instance/name") } // Zone returns the current VM's zone, such as "us-central1-b". diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE b/vendor/cloud.google.com/go/datastore/LICENSE similarity index 100% rename from vendor/github.com/census-instrumentation/opencensus-proto/LICENSE rename to vendor/cloud.google.com/go/datastore/LICENSE diff --git a/vendor/cloud.google.com/go/datastore/README.md b/vendor/cloud.google.com/go/datastore/README.md new file mode 100644 index 000000000000..298895763eb3 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/README.md @@ -0,0 +1,41 @@ +## Cloud Datastore [![GoDoc](https://godoc.org/cloud.google.com/go/datastore?status.svg)](https://godoc.org/cloud.google.com/go/datastore) + +- [About Cloud Datastore](https://cloud.google.com/datastore/) +- [Activating the API for your project](https://cloud.google.com/datastore/docs/activate) +- [API documentation](https://cloud.google.com/datastore/docs) +- [Go client documentation](https://godoc.org/cloud.google.com/go/datastore) +- [Complete sample program](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/datastore/tasks) + +### Example Usage + +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 { + log.Fatal(err) +} +``` + +Then use that client to interact with the API: + +[snip]:# (datastore-2) +```go +type Post struct { + Title string + Body string `datastore:",noindex"` + PublishedAt time.Time +} +keys := []*datastore.Key{ + datastore.NameKey("Post", "post1", nil), + datastore.NameKey("Post", "post2", nil), +} +posts := []*Post{ + {Title: "Post 1", Body: "...", PublishedAt: time.Now()}, + {Title: "Post 2", Body: "...", PublishedAt: time.Now()}, +} +if _, err := client.PutMulti(ctx, keys, posts); err != nil { + log.Fatal(err) +} +``` \ No newline at end of file diff --git a/vendor/cloud.google.com/go/datastore/client.go b/vendor/cloud.google.com/go/datastore/client.go new file mode 100644 index 000000000000..3eba4d5c575c --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/client.go @@ -0,0 +1,118 @@ +// Copyright 2017 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 datastore + +import ( + "context" + "fmt" + "time" + + "cloud.google.com/go/internal" + "cloud.google.com/go/internal/version" + gax "github.com/googleapis/gax-go/v2" + pb "google.golang.org/genproto/googleapis/datastore/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// datastoreClient is a wrapper for the pb.DatastoreClient that includes gRPC +// metadata to be sent in each request for server-side traffic management. +type datastoreClient struct { + // Embed so we still implement the DatastoreClient interface, + // if the interface adds more methods. + pb.DatastoreClient + + c pb.DatastoreClient + md metadata.MD +} + +func newDatastoreClient(conn *grpc.ClientConn, projectID string) pb.DatastoreClient { + return &datastoreClient{ + c: pb.NewDatastoreClient(conn), + md: metadata.Pairs( + resourcePrefixHeader, "projects/"+projectID, + "x-goog-api-client", fmt.Sprintf("gl-go/%s gccl/%s grpc/", version.Go(), version.Repo)), + } +} + +func (dc *datastoreClient) Lookup(ctx context.Context, in *pb.LookupRequest, opts ...grpc.CallOption) (res *pb.LookupResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.Lookup(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) RunQuery(ctx context.Context, in *pb.RunQueryRequest, opts ...grpc.CallOption) (res *pb.RunQueryResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.RunQuery(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) BeginTransaction(ctx context.Context, in *pb.BeginTransactionRequest, opts ...grpc.CallOption) (res *pb.BeginTransactionResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.BeginTransaction(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) Commit(ctx context.Context, in *pb.CommitRequest, opts ...grpc.CallOption) (res *pb.CommitResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.Commit(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) Rollback(ctx context.Context, in *pb.RollbackRequest, opts ...grpc.CallOption) (res *pb.RollbackResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.Rollback(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) AllocateIds(ctx context.Context, in *pb.AllocateIdsRequest, opts ...grpc.CallOption) (res *pb.AllocateIdsResponse, err error) { + err = dc.invoke(ctx, func(ctx context.Context) error { + res, err = dc.c.AllocateIds(ctx, in, opts...) + return err + }) + return res, err +} + +func (dc *datastoreClient) invoke(ctx context.Context, f func(ctx context.Context) error) error { + ctx = metadata.NewOutgoingContext(ctx, dc.md) + return internal.Retry(ctx, gax.Backoff{Initial: 100 * time.Millisecond}, func() (stop bool, err error) { + err = f(ctx) + return !shouldRetry(err), err + }) +} + +func shouldRetry(err error) bool { + if err == nil { + return false + } + s, ok := status.FromError(err) + if !ok { + return false + } + // See https://cloud.google.com/datastore/docs/concepts/errors. + return s.Code() == codes.Unavailable || s.Code() == codes.DeadlineExceeded +} diff --git a/vendor/cloud.google.com/go/datastore/datastore.go b/vendor/cloud.google.com/go/datastore/datastore.go new file mode 100644 index 000000000000..dbf085c04ef4 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/datastore.go @@ -0,0 +1,670 @@ +// Copyright 2014 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 datastore + +import ( + "context" + "errors" + "fmt" + "log" + "os" + "reflect" + + "cloud.google.com/go/internal/trace" + "google.golang.org/api/option" + "google.golang.org/api/transport" + gtransport "google.golang.org/api/transport/grpc" + pb "google.golang.org/genproto/googleapis/datastore/v1" + "google.golang.org/grpc" +) + +const ( + prodAddr = "datastore.googleapis.com:443" + userAgent = "gcloud-golang-datastore/20160401" +) + +// ScopeDatastore grants permissions to view and/or manage datastore entities +const ScopeDatastore = "https://www.googleapis.com/auth/datastore" + +// DetectProjectID is a sentinel value that instructs NewClient to detect the +// project ID. It is given in place of the projectID argument. NewClient will +// use the project ID from the given credentials or the default credentials +// (https://developers.google.com/accounts/docs/application-default-credentials) +// if no credentials were provided. When providing credentials, not all +// options will allow NewClient to extract the project ID. Specifically a JWT +// does not have the project ID encoded. +const DetectProjectID = "*detect-project-id*" + +// resourcePrefixHeader is the name of the metadata header used to indicate +// the resource being operated on. +const resourcePrefixHeader = "google-cloud-resource-prefix" + +// Client is a client for reading and writing data in a datastore dataset. +type Client struct { + conn *grpc.ClientConn + client pb.DatastoreClient + dataset string // Called dataset by the datastore API, synonym for project ID. +} + +// NewClient creates a new Client for a given dataset. If the project ID is +// empty, it is derived from the DATASTORE_PROJECT_ID environment variable. +// If the DATASTORE_EMULATOR_HOST environment variable is set, client will use +// its value to connect to a locally-running datastore emulator. +// DetectProjectID can be passed as the projectID argument to instruct +// NewClient to detect the project ID from the credentials. +func NewClient(ctx context.Context, projectID string, opts ...option.ClientOption) (*Client, error) { + var o []option.ClientOption + // Environment variables for gcd emulator: + // https://cloud.google.com/datastore/docs/tools/datastore-emulator + // If the emulator is available, dial it without passing any credentials. + if addr := os.Getenv("DATASTORE_EMULATOR_HOST"); addr != "" { + o = []option.ClientOption{ + option.WithEndpoint(addr), + option.WithoutAuthentication(), + option.WithGRPCDialOption(grpc.WithInsecure()), + } + } else { + o = []option.ClientOption{ + option.WithEndpoint(prodAddr), + option.WithScopes(ScopeDatastore), + option.WithUserAgent(userAgent), + } + } + // Warn if we see the legacy emulator environment variables. + if os.Getenv("DATASTORE_HOST") != "" && os.Getenv("DATASTORE_EMULATOR_HOST") == "" { + log.Print("WARNING: legacy environment variable DATASTORE_HOST is ignored. Use DATASTORE_EMULATOR_HOST instead.") + } + if os.Getenv("DATASTORE_DATASET") != "" && os.Getenv("DATASTORE_PROJECT_ID") == "" { + log.Print("WARNING: legacy environment variable DATASTORE_DATASET is ignored. Use DATASTORE_PROJECT_ID instead.") + } + if projectID == "" { + projectID = os.Getenv("DATASTORE_PROJECT_ID") + } + + o = append(o, opts...) + + if projectID == DetectProjectID { + creds, err := transport.Creds(ctx, o...) + if err != nil { + return nil, fmt.Errorf("fetching creds: %v", err) + } + + if creds.ProjectID == "" { + return nil, errors.New("datastore: see the docs on DetectProjectID") + } + + projectID = creds.ProjectID + } + + if projectID == "" { + return nil, errors.New("datastore: missing project/dataset id") + } + conn, err := gtransport.Dial(ctx, o...) + if err != nil { + return nil, fmt.Errorf("dialing: %v", err) + } + return &Client{ + conn: conn, + client: newDatastoreClient(conn, projectID), + dataset: projectID, + }, nil +} + +var ( + // ErrInvalidEntityType is returned when functions like Get or Next are + // passed a dst or src argument of invalid type. + ErrInvalidEntityType = errors.New("datastore: invalid entity type") + // ErrInvalidKey is returned when an invalid key is presented. + ErrInvalidKey = errors.New("datastore: invalid key") + // ErrNoSuchEntity is returned when no entity was found for a given key. + ErrNoSuchEntity = errors.New("datastore: no such entity") +) + +type multiArgType int + +const ( + multiArgTypeInvalid multiArgType = iota + multiArgTypePropertyLoadSaver + multiArgTypeStruct + multiArgTypeStructPtr + multiArgTypeInterface +) + +// ErrFieldMismatch is returned when a field is to be loaded into a different +// type than the one it was stored from, or when a field is missing or +// unexported in the destination struct. +// StructType is the type of the struct pointed to by the destination argument +// passed to Get or to Iterator.Next. +type ErrFieldMismatch struct { + StructType reflect.Type + FieldName string + Reason string +} + +func (e *ErrFieldMismatch) Error() string { + return fmt.Sprintf("datastore: cannot load field %q into a %q: %s", + e.FieldName, e.StructType, e.Reason) +} + +// GeoPoint represents a location as latitude/longitude in degrees. +type GeoPoint struct { + Lat, Lng float64 +} + +// Valid returns whether a GeoPoint is within [-90, 90] latitude and [-180, 180] longitude. +func (g GeoPoint) Valid() bool { + return -90 <= g.Lat && g.Lat <= 90 && -180 <= g.Lng && g.Lng <= 180 +} + +func keyToProto(k *Key) *pb.Key { + if k == nil { + return nil + } + + var path []*pb.Key_PathElement + for { + el := &pb.Key_PathElement{Kind: k.Kind} + if k.ID != 0 { + el.IdType = &pb.Key_PathElement_Id{Id: k.ID} + } else if k.Name != "" { + el.IdType = &pb.Key_PathElement_Name{Name: k.Name} + } + path = append(path, el) + if k.Parent == nil { + break + } + k = k.Parent + } + + // The path should be in order [grandparent, parent, child] + // We did it backward above, so reverse back. + for i := 0; i < len(path)/2; i++ { + path[i], path[len(path)-i-1] = path[len(path)-i-1], path[i] + } + + key := &pb.Key{Path: path} + if k.Namespace != "" { + key.PartitionId = &pb.PartitionId{ + NamespaceId: k.Namespace, + } + } + return key +} + +// protoToKey decodes a protocol buffer representation of a key into an +// equivalent *Key object. If the key is invalid, protoToKey will return the +// invalid key along with ErrInvalidKey. +func protoToKey(p *pb.Key) (*Key, error) { + var key *Key + var namespace string + if partition := p.PartitionId; partition != nil { + namespace = partition.NamespaceId + } + for _, el := range p.Path { + key = &Key{ + Namespace: namespace, + Kind: el.Kind, + ID: el.GetId(), + Name: el.GetName(), + Parent: key, + } + } + if !key.valid() { // Also detects key == nil. + return key, ErrInvalidKey + } + return key, nil +} + +// multiKeyToProto is a batch version of keyToProto. +func multiKeyToProto(keys []*Key) []*pb.Key { + ret := make([]*pb.Key, len(keys)) + for i, k := range keys { + ret[i] = keyToProto(k) + } + return ret +} + +// multiKeyToProto is a batch version of keyToProto. +func multiProtoToKey(keys []*pb.Key) ([]*Key, error) { + hasErr := false + ret := make([]*Key, len(keys)) + err := make(MultiError, len(keys)) + for i, k := range keys { + ret[i], err[i] = protoToKey(k) + if err[i] != nil { + hasErr = true + } + } + if hasErr { + return nil, err + } + return ret, nil +} + +// multiValid is a batch version of Key.valid. It returns an error, not a +// []bool. +func multiValid(key []*Key) error { + invalid := false + for _, k := range key { + if !k.valid() { + invalid = true + break + } + } + if !invalid { + return nil + } + err := make(MultiError, len(key)) + for i, k := range key { + if !k.valid() { + err[i] = ErrInvalidKey + } + } + return err +} + +// checkMultiArg checks that v has type []S, []*S, []I, or []P, for some struct +// type S, for some interface type I, or some non-interface non-pointer type P +// such that P or *P implements PropertyLoadSaver. +// +// It returns what category the slice's elements are, and the reflect.Type +// that represents S, I or P. +// +// As a special case, PropertyList is an invalid type for v. +func checkMultiArg(v reflect.Value) (m multiArgType, elemType reflect.Type) { + // TODO(djd): multiArg is very confusing. Fold this logic into the + // relevant Put/Get methods to make the logic less opaque. + if v.Kind() != reflect.Slice { + return multiArgTypeInvalid, nil + } + if v.Type() == typeOfPropertyList { + return multiArgTypeInvalid, nil + } + elemType = v.Type().Elem() + if reflect.PtrTo(elemType).Implements(typeOfPropertyLoadSaver) { + return multiArgTypePropertyLoadSaver, elemType + } + switch elemType.Kind() { + case reflect.Struct: + return multiArgTypeStruct, elemType + case reflect.Interface: + return multiArgTypeInterface, elemType + case reflect.Ptr: + elemType = elemType.Elem() + if elemType.Kind() == reflect.Struct { + return multiArgTypeStructPtr, elemType + } + } + return multiArgTypeInvalid, nil +} + +// Close closes the Client. +func (c *Client) Close() error { + return c.conn.Close() +} + +// Get loads the entity stored for key into dst, which must be a struct pointer +// or implement PropertyLoadSaver. If there is no such entity for the key, Get +// returns ErrNoSuchEntity. +// +// The values of dst's unmatched struct fields are not modified, and matching +// slice-typed fields are not reset before appending to them. In particular, it +// is recommended to pass a pointer to a zero valued struct on each Get call. +// +// ErrFieldMismatch is returned when a field is to be loaded into a different +// type than the one it was stored from, or when a field is missing or +// unexported in the destination struct. ErrFieldMismatch is only returned if +// dst is a struct pointer. +func (c *Client) Get(ctx context.Context, key *Key, dst interface{}) (err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.Get") + defer func() { trace.EndSpan(ctx, err) }() + + if dst == nil { // get catches nil interfaces; we need to catch nil ptr here + return ErrInvalidEntityType + } + err = c.get(ctx, []*Key{key}, []interface{}{dst}, nil) + if me, ok := err.(MultiError); ok { + return me[0] + } + return err +} + +// GetMulti is a batch version of Get. +// +// dst must be a []S, []*S, []I or []P, for some struct type S, some interface +// type I, or some non-interface non-pointer type P such that P or *P +// implements PropertyLoadSaver. If an []I, each element must be a valid dst +// for Get: it must be a struct pointer or implement PropertyLoadSaver. +// +// As a special case, PropertyList is an invalid type for dst, even though a +// PropertyList is a slice of structs. It is treated as invalid to avoid being +// mistakenly passed when []PropertyList was intended. +// +// err may be a MultiError. See ExampleMultiError to check it. +func (c *Client) GetMulti(ctx context.Context, keys []*Key, dst interface{}) (err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.GetMulti") + defer func() { trace.EndSpan(ctx, err) }() + + return c.get(ctx, keys, dst, nil) +} + +func (c *Client) get(ctx context.Context, keys []*Key, dst interface{}, opts *pb.ReadOptions) error { + v := reflect.ValueOf(dst) + multiArgType, _ := checkMultiArg(v) + + // Sanity checks + if multiArgType == multiArgTypeInvalid { + return errors.New("datastore: dst has invalid type") + } + if len(keys) != v.Len() { + return errors.New("datastore: keys and dst slices have different length") + } + if len(keys) == 0 { + return nil + } + + // Go through keys, validate them, serialize then, and create a dict mapping them to their indices. + // Equal keys are deduped. + multiErr, any := make(MultiError, len(keys)), false + keyMap := make(map[string][]int, len(keys)) + pbKeys := make([]*pb.Key, 0, len(keys)) + for i, k := range keys { + if !k.valid() { + multiErr[i] = ErrInvalidKey + any = true + } else if k.Incomplete() { + multiErr[i] = fmt.Errorf("datastore: can't get the incomplete key: %v", k) + any = true + } else { + ks := k.String() + if _, ok := keyMap[ks]; !ok { + pbKeys = append(pbKeys, keyToProto(k)) + } + keyMap[ks] = append(keyMap[ks], i) + } + } + if any { + return multiErr + } + req := &pb.LookupRequest{ + ProjectId: c.dataset, + Keys: pbKeys, + ReadOptions: opts, + } + resp, err := c.client.Lookup(ctx, req) + if err != nil { + return err + } + found := resp.Found + missing := resp.Missing + // Upper bound 100 iterations to prevent infinite loop. + // We choose 100 iterations somewhat logically: + // Max number of Entities you can request from Datastore is 1,000. + // Max size for a Datastore Entity is 1 MiB. + // Max request size is 10 MiB, so we assume max response size is also 10 MiB. + // 1,000 / 10 = 100. + // Note that if ctx has a deadline, the deadline will probably + // be hit before we reach 100 iterations. + for i := 0; len(resp.Deferred) > 0 && i < 100; i++ { + req.Keys = resp.Deferred + resp, err = c.client.Lookup(ctx, req) + if err != nil { + return err + } + found = append(found, resp.Found...) + missing = append(missing, resp.Missing...) + } + + filled := 0 + for _, e := range found { + k, err := protoToKey(e.Entity.Key) + if err != nil { + return errors.New("datastore: internal error: server returned an invalid key") + } + filled += len(keyMap[k.String()]) + for _, index := range keyMap[k.String()] { + elem := v.Index(index) + if multiArgType == multiArgTypePropertyLoadSaver || multiArgType == multiArgTypeStruct { + elem = elem.Addr() + } + if multiArgType == multiArgTypeStructPtr && elem.IsNil() { + elem.Set(reflect.New(elem.Type().Elem())) + } + if err := loadEntityProto(elem.Interface(), e.Entity); err != nil { + multiErr[index] = err + any = true + } + } + } + for _, e := range missing { + k, err := protoToKey(e.Entity.Key) + if err != nil { + return errors.New("datastore: internal error: server returned an invalid key") + } + filled += len(keyMap[k.String()]) + for _, index := range keyMap[k.String()] { + multiErr[index] = ErrNoSuchEntity + } + any = true + } + + if filled != len(keys) { + return errors.New("datastore: internal error: server returned the wrong number of entities") + } + + if any { + return multiErr + } + return nil +} + +// Put saves the entity src into the datastore with the given key. src must be +// a struct pointer or implement PropertyLoadSaver; if the struct pointer has +// any unexported fields they will be skipped. If the key is incomplete, the +// returned key will be a unique key generated by the datastore. +func (c *Client) Put(ctx context.Context, key *Key, src interface{}) (*Key, error) { + k, err := c.PutMulti(ctx, []*Key{key}, []interface{}{src}) + if err != nil { + if me, ok := err.(MultiError); ok { + return nil, me[0] + } + return nil, err + } + return k[0], nil +} + +// PutMulti is a batch version of Put. +// +// src must satisfy the same conditions as the dst argument to GetMulti. +// err may be a MultiError. See ExampleMultiError to check it. +func (c *Client) PutMulti(ctx context.Context, keys []*Key, src interface{}) (ret []*Key, err error) { + // TODO(jba): rewrite in terms of Mutate. + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.PutMulti") + defer func() { trace.EndSpan(ctx, err) }() + + mutations, err := putMutations(keys, src) + if err != nil { + return nil, err + } + + // Make the request. + req := &pb.CommitRequest{ + ProjectId: c.dataset, + Mutations: mutations, + Mode: pb.CommitRequest_NON_TRANSACTIONAL, + } + resp, err := c.client.Commit(ctx, req) + if err != nil { + return nil, err + } + + // Copy any newly minted keys into the returned keys. + ret = make([]*Key, len(keys)) + for i, key := range keys { + if key.Incomplete() { + // This key is in the mutation results. + ret[i], err = protoToKey(resp.MutationResults[i].Key) + if err != nil { + return nil, errors.New("datastore: internal error: server returned an invalid key") + } + } else { + ret[i] = key + } + } + return ret, nil +} + +func putMutations(keys []*Key, src interface{}) ([]*pb.Mutation, error) { + v := reflect.ValueOf(src) + multiArgType, _ := checkMultiArg(v) + if multiArgType == multiArgTypeInvalid { + return nil, errors.New("datastore: src has invalid type") + } + if len(keys) != v.Len() { + return nil, errors.New("datastore: key and src slices have different length") + } + if len(keys) == 0 { + return nil, nil + } + if err := multiValid(keys); err != nil { + return nil, err + } + mutations := make([]*pb.Mutation, 0, len(keys)) + multiErr := make(MultiError, len(keys)) + hasErr := false + for i, k := range keys { + elem := v.Index(i) + // Two cases where we need to take the address: + // 1) multiArgTypePropertyLoadSaver => &elem implements PLS + // 2) multiArgTypeStruct => saveEntity needs *struct + if multiArgType == multiArgTypePropertyLoadSaver || multiArgType == multiArgTypeStruct { + elem = elem.Addr() + } + p, err := saveEntity(k, elem.Interface()) + if err != nil { + multiErr[i] = err + hasErr = true + } + var mut *pb.Mutation + if k.Incomplete() { + mut = &pb.Mutation{Operation: &pb.Mutation_Insert{Insert: p}} + } else { + mut = &pb.Mutation{Operation: &pb.Mutation_Upsert{Upsert: p}} + } + mutations = append(mutations, mut) + } + if hasErr { + return nil, multiErr + } + return mutations, nil +} + +// Delete deletes the entity for the given key. +func (c *Client) Delete(ctx context.Context, key *Key) error { + err := c.DeleteMulti(ctx, []*Key{key}) + if me, ok := err.(MultiError); ok { + return me[0] + } + return err +} + +// DeleteMulti is a batch version of Delete. +// +// err may be a MultiError. See ExampleMultiError to check it. +func (c *Client) DeleteMulti(ctx context.Context, keys []*Key) (err error) { + // TODO(jba): rewrite in terms of Mutate. + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.DeleteMulti") + defer func() { trace.EndSpan(ctx, err) }() + + mutations, err := deleteMutations(keys) + if err != nil { + return err + } + + req := &pb.CommitRequest{ + ProjectId: c.dataset, + Mutations: mutations, + Mode: pb.CommitRequest_NON_TRANSACTIONAL, + } + _, err = c.client.Commit(ctx, req) + return err +} + +func deleteMutations(keys []*Key) ([]*pb.Mutation, error) { + mutations := make([]*pb.Mutation, 0, len(keys)) + set := make(map[string]bool, len(keys)) + multiErr := make(MultiError, len(keys)) + hasErr := false + for i, k := range keys { + if !k.valid() { + multiErr[i] = ErrInvalidKey + hasErr = true + } else if k.Incomplete() { + multiErr[i] = fmt.Errorf("datastore: can't delete the incomplete key: %v", k) + hasErr = true + } else { + ks := k.String() + if !set[ks] { + mutations = append(mutations, &pb.Mutation{ + Operation: &pb.Mutation_Delete{Delete: keyToProto(k)}, + }) + } + set[ks] = true + } + } + if hasErr { + return nil, multiErr + } + return mutations, nil +} + +// Mutate applies one or more mutations atomically. +// It returns the keys of the argument Mutations, in the same order. +// +// If any of the mutations are invalid, Mutate returns a MultiError with the errors. +// Mutate returns a MultiError in this case even if there is only one Mutation. +// See ExampleMultiError to check it. +func (c *Client) Mutate(ctx context.Context, muts ...*Mutation) (ret []*Key, err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.Mutate") + defer func() { trace.EndSpan(ctx, err) }() + + pmuts, err := mutationProtos(muts) + if err != nil { + return nil, err + } + req := &pb.CommitRequest{ + ProjectId: c.dataset, + Mutations: pmuts, + Mode: pb.CommitRequest_NON_TRANSACTIONAL, + } + resp, err := c.client.Commit(ctx, req) + if err != nil { + return nil, err + } + // Copy any newly minted keys into the returned keys. + ret = make([]*Key, len(muts)) + for i, mut := range muts { + if mut.key.Incomplete() { + // This key is in the mutation results. + ret[i], err = protoToKey(resp.MutationResults[i].Key) + if err != nil { + return nil, errors.New("datastore: internal error: server returned an invalid key") + } + } else { + ret[i] = mut.key + } + } + return ret, nil +} diff --git a/vendor/cloud.google.com/go/datastore/datastore.replay b/vendor/cloud.google.com/go/datastore/datastore.replay new file mode 100644 index 000000000000..bc38d3e85d48 Binary files /dev/null and b/vendor/cloud.google.com/go/datastore/datastore.replay differ diff --git a/vendor/cloud.google.com/go/datastore/doc.go b/vendor/cloud.google.com/go/datastore/doc.go new file mode 100644 index 000000000000..7cf890f039c4 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/doc.go @@ -0,0 +1,497 @@ +// Copyright 2016 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 datastore provides a client for Google Cloud Datastore. + +See https://godoc.org/cloud.google.com/go for authentication, timeouts, +connection pooling and similar aspects of this package. + + +Basic Operations + +Entities are the unit of storage and are associated with a key. A key +consists of an optional parent key, a string application ID, a string kind +(also known as an entity type), and either a StringID or an IntID. A +StringID is also known as an entity name or key name. + +It is valid to create a key with a zero StringID and a zero IntID; this is +called an incomplete key, and does not refer to any saved entity. Putting an +entity into the datastore under an incomplete key will cause a unique key +to be generated for that entity, with a non-zero IntID. + +An entity's contents are a mapping from case-sensitive field names to values. +Valid value types are: + - Signed integers (int, int8, int16, int32 and int64) + - bool + - string + - float32 and float64 + - []byte (up to 1 megabyte in length) + - Any type whose underlying type is one of the above predeclared types + - *Key + - GeoPoint + - time.Time (stored with microsecond precision, retrieved as local time) + - Structs whose fields are all valid value types + - Pointers to structs whose fields are all valid value types + - Slices of any of the above + - Pointers to a signed integer, bool, string, float32, or float64 + +Slices of structs are valid, as are structs that contain slices. + +The Get and Put functions load and save an entity's contents. An entity's +contents are typically represented by a struct pointer. + +Example code: + + type Entity struct { + Value string + } + + func main() { + ctx := context.Background() + + // Create a datastore client. In a typical application, you would create + // a single client which is reused for every datastore operation. + dsClient, err := datastore.NewClient(ctx, "my-project") + if err != nil { + // Handle error. + } + + k := datastore.NameKey("Entity", "stringID", nil) + e := new(Entity) + if err := dsClient.Get(ctx, k, e); err != nil { + // Handle error. + } + + old := e.Value + e.Value = "Hello World!" + + if _, err := dsClient.Put(ctx, k, e); err != nil { + // Handle error. + } + + fmt.Printf("Updated value from %q to %q\n", old, e.Value) + } + +GetMulti, PutMulti and DeleteMulti are batch versions of the Get, Put and +Delete functions. They take a []*Key instead of a *Key, and may return a +datastore.MultiError when encountering partial failure. + +Mutate generalizes PutMulti and DeleteMulti to a sequence of any Datastore mutations. +It takes a series of mutations created with NewInsert, NewUpdate, NewUpsert and +NewDelete and applies them atomically. + + +Properties + +An entity's contents can be represented by a variety of types. These are +typically struct pointers, but can also be any type that implements the +PropertyLoadSaver interface. If using a struct pointer, you do not have to +explicitly implement the PropertyLoadSaver interface; the datastore will +automatically convert via reflection. If a struct pointer does implement +PropertyLoadSaver then those methods will be used in preference to the default +behavior for struct pointers. Struct pointers are more strongly typed and are +easier to use; PropertyLoadSavers are more flexible. + +The actual types passed do not have to match between Get and Put calls or even +across different calls to datastore. It is valid to put a *PropertyList and +get that same entity as a *myStruct, or put a *myStruct0 and get a *myStruct1. +Conceptually, any entity is saved as a sequence of properties, and is loaded +into the destination value on a property-by-property basis. When loading into +a struct pointer, an entity that cannot be completely represented (such as a +missing field) will result in an ErrFieldMismatch error but it is up to the +caller whether this error is fatal, recoverable or ignorable. + +By default, for struct pointers, all properties are potentially indexed, and +the property name is the same as the field name (and hence must start with an +upper case letter). + +Fields may have a `datastore:"name,options"` tag. The tag name is the +property name, which must be one or more valid Go identifiers joined by ".", +but may start with a lower case letter. An empty tag name means to just use the +field name. A "-" tag name means that the datastore will ignore that field. + +The only valid options are "omitempty", "noindex" and "flatten". + +If the options include "omitempty" and the value of the field is a zero value, +then the field will be omitted on Save. Zero values are best defined in the +golang spec (https://golang.org/ref/spec#The_zero_value). Struct field values +will never be empty, except for nil pointers. + +If options include "noindex" then the field will not be indexed. All fields +are indexed by default. Strings or byte slices longer than 1500 bytes cannot +be indexed; fields used to store long strings and byte slices must be tagged +with "noindex" or they will cause Put operations to fail. + +For a nested struct field, the options may also include "flatten". This +indicates that the immediate fields and any nested substruct fields of the +nested struct should be flattened. See below for examples. + +To use multiple options together, separate them by a comma. +The order does not matter. + +If the options is "" then the comma may be omitted. + +Example code: + + // A and B are renamed to a and b. + // A, C and J are not indexed. + // D's tag is equivalent to having no tag at all (E). + // I is ignored entirely by the datastore. + // J has tag information for both the datastore and json packages. + type TaggedStruct struct { + A int `datastore:"a,noindex"` + B int `datastore:"b"` + C int `datastore:",noindex"` + D int `datastore:""` + E int + I int `datastore:"-"` + J int `datastore:",noindex" json:"j"` + } + + +Slice Fields + +A field of slice type corresponds to a Datastore array property, except for []byte, which corresponds +to a Datastore blob. + +Zero-length slice fields are not saved. Slice fields of length 1 or greater are saved +as Datastore arrays. When a zero-length Datastore array is loaded into a slice field, +the slice field remains unchanged. + +If a non-array value is loaded into a slice field, the result will be a slice with +one element, containing the value. + +Loading Nulls + +Loading a Datastore Null into a basic type (int, float, etc.) results in a zero value. +Loading a Null into a slice of basic type results in a slice of size 1 containing the zero value. +Loading a Null into a pointer field results in nil. +Loading a Null into a field of struct type is an error. + +Pointer Fields + +A struct field can be a pointer to a signed integer, floating-point number, string or +bool. Putting a non-nil pointer will store its dereferenced value. Putting a nil +pointer will store a Datastore Null property, unless the field is marked omitempty, +in which case no property will be stored. + +Loading a Null into a pointer field sets the pointer to nil. Loading any other value +allocates new storage with the value, and sets the field to point to it. + + +Key Field + +If the struct contains a *datastore.Key field tagged with the name "__key__", +its value will be ignored on Put. When reading the Entity back into the Go struct, +the field will be populated with the *datastore.Key value used to query for +the Entity. + +Example code: + + type MyEntity struct { + A int + K *datastore.Key `datastore:"__key__"` + } + + func main() { + ctx := context.Background() + dsClient, err := datastore.NewClient(ctx, "my-project") + if err != nil { + // Handle error. + } + + k := datastore.NameKey("Entity", "stringID", nil) + e := MyEntity{A: 12} + if _, err := dsClient.Put(ctx, k, &e); err != nil { + // Handle error. + } + + var entities []MyEntity + q := datastore.NewQuery("Entity").Filter("A =", 12).Limit(1) + if _, err := dsClient.GetAll(ctx, q, &entities); err != nil { + // Handle error + } + + log.Println(entities[0]) + // Prints {12 /Entity,stringID} + } + + + +Structured Properties + +If the struct pointed to contains other structs, then the nested or embedded +structs are themselves saved as Entity values. For example, given these definitions: + + type Inner struct { + W int32 + X string + } + + type Outer struct { + I Inner + } + +then an Outer would have one property, Inner, encoded as an Entity value. + +If an outer struct is tagged "noindex" then all of its implicit flattened +fields are effectively "noindex". + +If the Inner struct contains a *Key field with the name "__key__", like so: + + type Inner struct { + W int32 + X string + K *datastore.Key `datastore:"__key__"` + } + + type Outer struct { + I Inner + } + +then the value of K will be used as the Key for Inner, represented +as an Entity value in datastore. + +If any nested struct fields should be flattened, instead of encoded as +Entity values, the nested struct field should be tagged with the "flatten" +option. For example, given the following: + + type Inner1 struct { + W int32 + X string + } + + type Inner2 struct { + Y float64 + } + + type Inner3 struct { + Z bool + } + + type Inner4 struct { + WW int + } + + type Inner5 struct { + X Inner4 + } + + type Outer struct { + A int16 + I []Inner1 `datastore:",flatten"` + J Inner2 `datastore:",flatten"` + K Inner5 `datastore:",flatten"` + Inner3 `datastore:",flatten"` + } + +an Outer's properties would be equivalent to those of: + + type OuterEquivalent struct { + A int16 + IDotW []int32 `datastore:"I.W"` + IDotX []string `datastore:"I.X"` + JDotY float64 `datastore:"J.Y"` + KDotXDotWW int `datastore:"K.X.WW"` + Z bool + } + +Note that the "flatten" option cannot be used for Entity value fields or +PropertyLoadSaver implementers. The server will reject any dotted field names +for an Entity value. + + +The PropertyLoadSaver Interface + +An entity's contents can also be represented by any type that implements the +PropertyLoadSaver interface. This type may be a struct pointer, but it does +not have to be. The datastore package will call Load when getting the entity's +contents, and Save when putting the entity's contents. +Possible uses include deriving non-stored fields, verifying fields, or indexing +a field only if its value is positive. + +Example code: + + type CustomPropsExample struct { + I, J int + // Sum is not stored, but should always be equal to I + J. + Sum int `datastore:"-"` + } + + func (x *CustomPropsExample) Load(ps []datastore.Property) error { + // Load I and J as usual. + if err := datastore.LoadStruct(x, ps); err != nil { + return err + } + // Derive the Sum field. + x.Sum = x.I + x.J + return nil + } + + func (x *CustomPropsExample) Save() ([]datastore.Property, error) { + // Validate the Sum field. + if x.Sum != x.I + x.J { + return nil, errors.New("CustomPropsExample has inconsistent sum") + } + // Save I and J as usual. The code below is equivalent to calling + // "return datastore.SaveStruct(x)", but is done manually for + // demonstration purposes. + return []datastore.Property{ + { + Name: "I", + Value: int64(x.I), + }, + { + Name: "J", + Value: int64(x.J), + }, + }, nil + } + +The *PropertyList type implements PropertyLoadSaver, and can therefore hold an +arbitrary entity's contents. + +The KeyLoader Interface + +If a type implements the PropertyLoadSaver interface, it may +also want to implement the KeyLoader interface. +The KeyLoader interface exists to allow implementations of PropertyLoadSaver +to also load an Entity's Key into the Go type. This type may be a struct +pointer, but it does not have to be. The datastore package will call LoadKey +when getting the entity's contents, after calling Load. + +Example code: + + type WithKeyExample struct { + I int + Key *datastore.Key + } + + func (x *WithKeyExample) LoadKey(k *datastore.Key) error { + x.Key = k + return nil + } + + func (x *WithKeyExample) Load(ps []datastore.Property) error { + // Load I as usual. + return datastore.LoadStruct(x, ps) + } + + func (x *WithKeyExample) Save() ([]datastore.Property, error) { + // Save I as usual. + return datastore.SaveStruct(x) + } + +To load a Key into a struct which does not implement the PropertyLoadSaver +interface, see the "Key Field" section above. + + +Queries + +Queries retrieve entities based on their properties or key's ancestry. Running +a query yields an iterator of results: either keys or (key, entity) pairs. +Queries are re-usable and it is safe to call Query.Run from concurrent +goroutines. Iterators are not safe for concurrent use. + +Queries are immutable, and are either created by calling NewQuery, or derived +from an existing query by calling a method like Filter or Order that returns a +new query value. A query is typically constructed by calling NewQuery followed +by a chain of zero or more such methods. These methods are: + - Ancestor and Filter constrain the entities returned by running a query. + - Order affects the order in which they are returned. + - Project constrains the fields returned. + - Distinct de-duplicates projected entities. + - KeysOnly makes the iterator return only keys, not (key, entity) pairs. + - Start, End, Offset and Limit define which sub-sequence of matching entities + to return. Start and End take cursors, Offset and Limit take integers. Start + and Offset affect the first result, End and Limit affect the last result. + If both Start and Offset are set, then the offset is relative to Start. + If both End and Limit are set, then the earliest constraint wins. Limit is + relative to Start+Offset, not relative to End. As a special case, a + negative limit means unlimited. + +Example code: + + type Widget struct { + Description string + Price int + } + + func printWidgets(ctx context.Context, client *datastore.Client) { + q := datastore.NewQuery("Widget"). + Filter("Price <", 1000). + Order("-Price") + + t := client.Run(ctx, q) + for { + var x Widget + key, err := t.Next(&x) + if err == iterator.Done { + break + } + if err != nil { + // Handle error. + } + fmt.Printf("Key=%v\nWidget=%#v\n\n", key, x) + } + } + + +Transactions + +Client.RunInTransaction runs a function in a transaction. + +Example code: + + type Counter struct { + Count int + } + + func incCount(ctx context.Context, client *datastore.Client) { + var count int + key := datastore.NameKey("Counter", "singleton", nil) + _, err := client.RunInTransaction(ctx, func(tx *datastore.Transaction) error { + var x Counter + if err := tx.Get(key, &x); err != nil && err != datastore.ErrNoSuchEntity { + return err + } + x.Count++ + if _, err := tx.Put(key, &x); err != nil { + return err + } + count = x.Count + return nil + }) + if err != nil { + // Handle error. + } + // The value of count is only valid once the transaction is successful + // (RunInTransaction has returned nil). + fmt.Printf("Count=%d\n", count) + } + +Pass the ReadOnly option to RunInTransaction if your transaction is used only for Get, +GetMulti or queries. Read-only transactions are more efficient. + +Google Cloud Datastore Emulator + +This package supports the Cloud Datastore emulator, which is useful for testing and +development. Environment variables are used to indicate that datastore traffic should be +directed to the emulator instead of the production Datastore service. + +To install and set up the emulator and its environment variables, see the documentation +at https://cloud.google.com/datastore/docs/tools/datastore-emulator. +*/ +package datastore // import "cloud.google.com/go/datastore" diff --git a/vendor/cloud.google.com/go/datastore/errors.go b/vendor/cloud.google.com/go/datastore/errors.go new file mode 100644 index 000000000000..ee1f0022145b --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/errors.go @@ -0,0 +1,47 @@ +// Copyright 2014 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. + +// This file provides error functions for common API failure modes. + +package datastore + +import ( + "fmt" +) + +// MultiError is returned by batch operations when there are errors with +// particular elements. Errors will be in a one-to-one correspondence with +// the input elements; successful elements will have a nil entry. +type MultiError []error + +func (m MultiError) Error() string { + s, n := "", 0 + for _, e := range m { + if e != nil { + if n == 0 { + s = e.Error() + } + n++ + } + } + switch n { + case 0: + return "(0 errors)" + case 1: + return s + case 2: + return s + " (and 1 other error)" + } + return fmt.Sprintf("%s (and %d other errors)", s, n-1) +} diff --git a/vendor/cloud.google.com/go/datastore/go.mod b/vendor/cloud.google.com/go/datastore/go.mod new file mode 100644 index 000000000000..c05506d5548d --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/go.mod @@ -0,0 +1,15 @@ +module cloud.google.com/go/datastore + +go 1.9 + +require ( + cloud.google.com/go v0.44.1 + github.com/golang/protobuf v1.3.2 + github.com/google/go-cmp v0.3.0 + github.com/googleapis/gax-go/v2 v2.0.5 + golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 // indirect + google.golang.org/api v0.7.0 + google.golang.org/appengine v1.6.1 // indirect + google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 + google.golang.org/grpc v1.21.1 +) diff --git a/vendor/cloud.google.com/go/datastore/go.sum b/vendor/cloud.google.com/go/datastore/go.sum new file mode 100644 index 000000000000..b0be1069457c --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/go.sum @@ -0,0 +1,116 @@ +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/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +cloud.google.com/go/logging v1.0.0/go.mod h1:V1cc3ogwobYzQq5f2R7DS/GvRIrI4FKj01Gs5glwAls= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +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/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/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/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +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/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +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/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/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/time v0.0.0-20190308202827-9d24e82272b4/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0 h1:9sdfJOzWlkqPltHAuzT2Cp+yrBeY1KRVYgms8soxMwM= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +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/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +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-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 h1:iKtrH9Y8mcbADOP0YFaEMth7OfuHY9xHOwNj4znpM1A= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +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/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/cloud.google.com/go/datastore/go_mod_tidy_hack.go b/vendor/cloud.google.com/go/datastore/go_mod_tidy_hack.go new file mode 100644 index 000000000000..376c51850677 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/go_mod_tidy_hack.go @@ -0,0 +1,22 @@ +// 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. + +// This file, and the cloud.google.com/go import, won't actually become part of +// the resultant binary. +// +build modhack + +package datastore + +// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "cloud.google.com/go" diff --git a/vendor/cloud.google.com/go/datastore/internal/gaepb/datastore_v3.pb.go b/vendor/cloud.google.com/go/datastore/internal/gaepb/datastore_v3.pb.go new file mode 100644 index 000000000000..b3c937cefb70 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/internal/gaepb/datastore_v3.pb.go @@ -0,0 +1,432 @@ +// 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 gaepb is a subset of protobufs, copied from google.golang.org/appengine/internal/datastore. +// It includes the Reference, Path, and Path_Element protos. +// +// They are copied here to provide compatibility to decode keys generated by the google.golang.org/appengine/datastore package. +// Copying the minimal amount of protos to support key decoding means we don't need to add a dependency on the appengine/datastore package. +package gaepb + +import "github.com/golang/protobuf/proto" + +type Path struct { + Element []*Path_Element `protobuf:"group,1,rep,name=Element,json=element" json:"element,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Path) Reset() { *m = Path{} } +func (m *Path) String() string { return proto.CompactTextString(m) } +func (*Path) ProtoMessage() {} +func (*Path) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3} +} +func (m *Path) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Path.Unmarshal(m, b) +} +func (m *Path) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Path.Marshal(b, m, deterministic) +} +func (dst *Path) XXX_Merge(src proto.Message) { + xxx_messageInfo_Path.Merge(dst, src) +} +func (m *Path) XXX_Size() int { + return xxx_messageInfo_Path.Size(m) +} +func (m *Path) XXX_DiscardUnknown() { + xxx_messageInfo_Path.DiscardUnknown(m) +} + +var xxx_messageInfo_Path proto.InternalMessageInfo + +func (m *Path) GetElement() []*Path_Element { + if m != nil { + return m.Element + } + return nil +} + +type Path_Element struct { + Type *string `protobuf:"bytes,2,req,name=type" json:"type,omitempty"` + Id *int64 `protobuf:"varint,3,opt,name=id" json:"id,omitempty"` + Name *string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Path_Element) Reset() { *m = Path_Element{} } +func (m *Path_Element) String() string { return proto.CompactTextString(m) } +func (*Path_Element) ProtoMessage() {} +func (*Path_Element) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{3, 0} +} +func (m *Path_Element) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Path_Element.Unmarshal(m, b) +} +func (m *Path_Element) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Path_Element.Marshal(b, m, deterministic) +} +func (dst *Path_Element) XXX_Merge(src proto.Message) { + xxx_messageInfo_Path_Element.Merge(dst, src) +} +func (m *Path_Element) XXX_Size() int { + return xxx_messageInfo_Path_Element.Size(m) +} +func (m *Path_Element) XXX_DiscardUnknown() { + xxx_messageInfo_Path_Element.DiscardUnknown(m) +} + +var xxx_messageInfo_Path_Element proto.InternalMessageInfo + +func (m *Path_Element) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +func (m *Path_Element) GetId() int64 { + if m != nil && m.Id != nil { + return *m.Id + } + return 0 +} + +func (m *Path_Element) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type Reference struct { + App *string `protobuf:"bytes,13,req,name=app" json:"app,omitempty"` + NameSpace *string `protobuf:"bytes,20,opt,name=name_space,json=nameSpace" json:"name_space,omitempty"` + Path *Path `protobuf:"bytes,14,req,name=path" json:"path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Reference) Reset() { *m = Reference{} } +func (m *Reference) String() string { return proto.CompactTextString(m) } +func (*Reference) ProtoMessage() {} +func (*Reference) Descriptor() ([]byte, []int) { + return fileDescriptor_datastore_v3_83b17b80c34f6179, []int{4} +} +func (m *Reference) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reference.Unmarshal(m, b) +} +func (m *Reference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reference.Marshal(b, m, deterministic) +} +func (dst *Reference) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reference.Merge(dst, src) +} +func (m *Reference) XXX_Size() int { + return xxx_messageInfo_Reference.Size(m) +} +func (m *Reference) XXX_DiscardUnknown() { + xxx_messageInfo_Reference.DiscardUnknown(m) +} + +var xxx_messageInfo_Reference proto.InternalMessageInfo + +func (m *Reference) GetApp() string { + if m != nil && m.App != nil { + return *m.App + } + return "" +} + +func (m *Reference) GetNameSpace() string { + if m != nil && m.NameSpace != nil { + return *m.NameSpace + } + return "" +} + +func (m *Reference) GetPath() *Path { + if m != nil { + return m.Path + } + return nil +} + +var fileDescriptor_datastore_v3_83b17b80c34f6179 = []byte{ + // 4156 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0xe3, 0x46, + 0x76, 0x37, 0xc1, 0xef, 0x47, 0x89, 0x82, 0x5a, 0xf3, 0xc1, 0xa1, 0x3f, 0x46, 0xc6, 0xac, 0x6d, + 0xd9, 0x6b, 0x73, 0x6c, 0xf9, 0x23, 0x5b, 0x4a, 0x76, 0x1d, 0x4a, 0xc4, 0x68, 0x90, 0xa1, 0x48, + 0xb9, 0x09, 0xd9, 0x9e, 0x5c, 0x50, 0x18, 0xa2, 0x29, 0x21, 0x43, 0x02, 0x30, 0x00, 0x6a, 0x46, + 0x93, 0xe4, 0x90, 0x4b, 0x2a, 0x55, 0x5b, 0xa9, 0x1c, 0x92, 0x4a, 0x25, 0xf9, 0x07, 0x72, 0xc8, + 0x39, 0x95, 0xaa, 0x54, 0xf6, 0x98, 0x5b, 0x0e, 0x7b, 0xc9, 0x31, 0x95, 0x73, 0xf2, 0x27, 0x24, + 0x39, 0xa4, 0xfa, 0x75, 0x03, 0x02, 0x28, 0x4a, 0x23, 0x6d, 0xf6, 0x90, 0x13, 0xd1, 0xef, 0xfd, + 0xba, 0xf1, 0xfa, 0xf5, 0xfb, 0x6c, 0x10, 0xba, 0xc7, 0xbe, 0x7f, 0x3c, 0x65, 0x9d, 0x63, 0x7f, + 0x6a, 0x7b, 0xc7, 0x1d, 0x3f, 0x3c, 0x7e, 0x68, 0x07, 0x01, 0xf3, 0x8e, 0x5d, 0x8f, 0x3d, 0x74, + 0xbd, 0x98, 0x85, 0x9e, 0x3d, 0x7d, 0xe8, 0xd8, 0xb1, 0x1d, 0xc5, 0x7e, 0xc8, 0xce, 0x9f, 0xac, + 0xd3, 0xcf, 0x3b, 0x41, 0xe8, 0xc7, 0x3e, 0xa9, 0xa7, 0x13, 0xb4, 0x1a, 0x54, 0xba, 0xe3, 0xd8, + 0xf5, 0x3d, 0xed, 0x1f, 0x2b, 0xb0, 0x7a, 0x18, 0xfa, 0x01, 0x0b, 0xe3, 0xb3, 0x6f, 0xed, 0xe9, + 0x9c, 0x91, 0x77, 0x00, 0x5c, 0x2f, 0xfe, 0xea, 0x0b, 0x1c, 0xb5, 0x0a, 0x9b, 0x85, 0xad, 0x22, + 0xcd, 0x50, 0x88, 0x06, 0x2b, 0xcf, 0x7c, 0x7f, 0xca, 0x6c, 0x4f, 0x20, 0x94, 0xcd, 0xc2, 0x56, + 0x8d, 0xe6, 0x68, 0x64, 0x13, 0x1a, 0x51, 0x1c, 0xba, 0xde, 0xb1, 0x80, 0x14, 0x37, 0x0b, 0x5b, + 0x75, 0x9a, 0x25, 0x71, 0x84, 0xe3, 0xcf, 0x9f, 0x4d, 0x99, 0x40, 0x94, 0x36, 0x0b, 0x5b, 0x05, + 0x9a, 0x25, 0x91, 0x3d, 0x80, 0xc0, 0x77, 0xbd, 0xf8, 0x14, 0x01, 0xe5, 0xcd, 0xc2, 0x16, 0x6c, + 0x3f, 0xe8, 0xa4, 0x7b, 0xe8, 0xe4, 0xa4, 0xee, 0x1c, 0x72, 0x28, 0x3e, 0xd2, 0xcc, 0x34, 0xf2, + 0xdb, 0x50, 0x9f, 0x47, 0x2c, 0x14, 0x6b, 0xd4, 0x70, 0x0d, 0xed, 0xd2, 0x35, 0x8e, 0x22, 0x16, + 0x8a, 0x25, 0xce, 0x27, 0x91, 0x21, 0x34, 0x43, 0x36, 0x61, 0x21, 0xf3, 0xc6, 0x4c, 0x2c, 0xb3, + 0x82, 0xcb, 0x7c, 0x70, 0xe9, 0x32, 0x34, 0x81, 0x8b, 0xb5, 0x16, 0xa6, 0xb7, 0xb7, 0x00, 0xce, + 0x85, 0x25, 0x2b, 0x50, 0x78, 0xd9, 0xaa, 0x6c, 0x2a, 0x5b, 0x05, 0x5a, 0x78, 0xc9, 0x47, 0x67, + 0xad, 0xaa, 0x18, 0x9d, 0xb5, 0xff, 0xa9, 0x00, 0xf5, 0x54, 0x26, 0x72, 0x0b, 0xca, 0x6c, 0x66, + 0xbb, 0xd3, 0x56, 0x7d, 0x53, 0xd9, 0xaa, 0x53, 0x31, 0x20, 0xf7, 0xa1, 0x61, 0xcf, 0xe3, 0x13, + 0xcb, 0xf1, 0x67, 0xb6, 0xeb, 0xb5, 0x00, 0x79, 0xc0, 0x49, 0x3d, 0xa4, 0x90, 0x36, 0xd4, 0x3c, + 0x77, 0xfc, 0xdc, 0xb3, 0x67, 0xac, 0xd5, 0xc0, 0x73, 0x48, 0xc7, 0xe4, 0x13, 0x20, 0x13, 0xe6, + 0xb0, 0xd0, 0x8e, 0x99, 0x63, 0xb9, 0x0e, 0xf3, 0x62, 0x37, 0x3e, 0x6b, 0xdd, 0x46, 0xd4, 0x7a, + 0xca, 0x31, 0x24, 0x23, 0x0f, 0x0f, 0x42, 0xff, 0xd4, 0x75, 0x58, 0xd8, 0xba, 0xb3, 0x00, 0x3f, + 0x94, 0x8c, 0xf6, 0xbf, 0x17, 0xa0, 0x99, 0xd7, 0x05, 0x51, 0xa1, 0x68, 0x07, 0x41, 0x6b, 0x15, + 0xa5, 0xe4, 0x8f, 0xe4, 0x6d, 0x00, 0x2e, 0x8a, 0x15, 0x05, 0xf6, 0x98, 0xb5, 0x6e, 0xe1, 0x5a, + 0x75, 0x4e, 0x19, 0x71, 0x02, 0x39, 0x82, 0x46, 0x60, 0xc7, 0x27, 0x6c, 0xca, 0x66, 0xcc, 0x8b, + 0x5b, 0xcd, 0xcd, 0xe2, 0x16, 0x6c, 0x7f, 0x7e, 0x4d, 0xd5, 0x77, 0x0e, 0xed, 0xf8, 0x44, 0x17, + 0x53, 0x69, 0x76, 0x9d, 0xb6, 0x0e, 0x8d, 0x0c, 0x8f, 0x10, 0x28, 0xc5, 0x67, 0x01, 0x6b, 0xad, + 0xa1, 0x5c, 0xf8, 0x4c, 0x9a, 0xa0, 0xb8, 0x4e, 0x4b, 0x45, 0xf3, 0x57, 0x5c, 0x87, 0x63, 0x50, + 0x87, 0xeb, 0x28, 0x22, 0x3e, 0x6b, 0xff, 0x51, 0x86, 0x5a, 0x22, 0x00, 0xe9, 0x42, 0x75, 0xc6, + 0x6c, 0xcf, 0xf5, 0x8e, 0xd1, 0x69, 0x9a, 0xdb, 0x6f, 0x2e, 0x11, 0xb3, 0x73, 0x20, 0x20, 0x3b, + 0x30, 0x18, 0x5a, 0x07, 0x7a, 0x77, 0x60, 0x0c, 0xf6, 0x69, 0x32, 0x8f, 0x1f, 0xa6, 0x7c, 0xb4, + 0xe6, 0xa1, 0x8b, 0x9e, 0x55, 0xa7, 0x20, 0x49, 0x47, 0xa1, 0x9b, 0x0a, 0x51, 0x14, 0x82, 0xe2, + 0x21, 0x76, 0xa0, 0x9c, 0xb8, 0x88, 0xb2, 0xd5, 0xd8, 0x6e, 0x5d, 0xa6, 0x1c, 0x2a, 0x60, 0xdc, + 0x20, 0x66, 0xf3, 0x69, 0xec, 0x06, 0x53, 0xee, 0x76, 0xca, 0x56, 0x8d, 0xa6, 0x63, 0xf2, 0x1e, + 0x40, 0xc4, 0xec, 0x70, 0x7c, 0x62, 0x3f, 0x9b, 0xb2, 0x56, 0x85, 0x7b, 0xf6, 0x4e, 0x79, 0x62, + 0x4f, 0x23, 0x46, 0x33, 0x0c, 0x62, 0xc3, 0xdd, 0x49, 0x1c, 0x59, 0xb1, 0xff, 0x9c, 0x79, 0xee, + 0x2b, 0x9b, 0x07, 0x12, 0xcb, 0x0f, 0xf8, 0x0f, 0xfa, 0x58, 0x73, 0xfb, 0xc3, 0x65, 0x5b, 0x7f, + 0x14, 0x47, 0x66, 0x66, 0xc6, 0x10, 0x27, 0xd0, 0xdb, 0x93, 0x65, 0x64, 0xd2, 0x86, 0xca, 0xd4, + 0x1f, 0xdb, 0x53, 0xd6, 0xaa, 0x73, 0x2d, 0xec, 0x28, 0xcc, 0xa3, 0x92, 0xa2, 0xfd, 0xb3, 0x02, + 0x55, 0xa9, 0x47, 0xd2, 0x84, 0x8c, 0x26, 0xd5, 0x37, 0x48, 0x0d, 0x4a, 0xbb, 0xfd, 0xe1, 0xae, + 0xda, 0xe4, 0x4f, 0xa6, 0xfe, 0xbd, 0xa9, 0xae, 0x71, 0xcc, 0xee, 0x53, 0x53, 0x1f, 0x99, 0x94, + 0x63, 0x54, 0xb2, 0x0e, 0xab, 0x5d, 0x73, 0x78, 0x60, 0xed, 0x75, 0x4d, 0x7d, 0x7f, 0x48, 0x9f, + 0xaa, 0x05, 0xb2, 0x0a, 0x75, 0x24, 0xf5, 0x8d, 0xc1, 0x13, 0x55, 0xe1, 0x33, 0x70, 0x68, 0x1a, + 0x66, 0x5f, 0x57, 0x8b, 0x44, 0x85, 0x15, 0x31, 0x63, 0x38, 0x30, 0xf5, 0x81, 0xa9, 0x96, 0x52, + 0xca, 0xe8, 0xe8, 0xe0, 0xa0, 0x4b, 0x9f, 0xaa, 0x65, 0xb2, 0x06, 0x0d, 0xa4, 0x74, 0x8f, 0xcc, + 0xc7, 0x43, 0xaa, 0x56, 0x48, 0x03, 0xaa, 0xfb, 0x3d, 0xeb, 0xbb, 0xc7, 0xfa, 0x40, 0xad, 0x92, + 0x15, 0xa8, 0xed, 0xf7, 0x2c, 0xfd, 0xa0, 0x6b, 0xf4, 0xd5, 0x1a, 0x9f, 0xbd, 0xaf, 0x0f, 0xe9, + 0x68, 0x64, 0x1d, 0x0e, 0x8d, 0x81, 0xa9, 0xd6, 0x49, 0x1d, 0xca, 0xfb, 0x3d, 0xcb, 0x38, 0x50, + 0x81, 0x10, 0x68, 0xee, 0xf7, 0xac, 0xc3, 0xc7, 0xc3, 0x81, 0x3e, 0x38, 0x3a, 0xd8, 0xd5, 0xa9, + 0xda, 0x20, 0xb7, 0x40, 0xe5, 0xb4, 0xe1, 0xc8, 0xec, 0xf6, 0xbb, 0xbd, 0x1e, 0xd5, 0x47, 0x23, + 0x75, 0x85, 0x4b, 0xbd, 0xdf, 0xb3, 0x68, 0xd7, 0xe4, 0xfb, 0x5a, 0xe5, 0x2f, 0xe4, 0x7b, 0x7f, + 0xa2, 0x3f, 0x55, 0xd7, 0xf9, 0x2b, 0xf4, 0x81, 0x69, 0x98, 0x4f, 0xad, 0x43, 0x3a, 0x34, 0x87, + 0xea, 0x06, 0x17, 0xd0, 0x18, 0xf4, 0xf4, 0xef, 0xad, 0x6f, 0xbb, 0xfd, 0x23, 0x5d, 0x25, 0xda, + 0x8f, 0xe1, 0xf6, 0xd2, 0x33, 0xe1, 0xaa, 0x7b, 0x6c, 0x1e, 0xf4, 0xd5, 0x02, 0x7f, 0xe2, 0x9b, + 0x52, 0x15, 0xed, 0x0f, 0xa0, 0xc4, 0x5d, 0x86, 0x7c, 0x06, 0xd5, 0xc4, 0x1b, 0x0b, 0xe8, 0x8d, + 0x77, 0xb3, 0x67, 0x6d, 0xc7, 0x27, 0x9d, 0xc4, 0xe3, 0x12, 0x5c, 0xbb, 0x0b, 0xd5, 0x45, 0x4f, + 0x53, 0x2e, 0x78, 0x5a, 0xf1, 0x82, 0xa7, 0x95, 0x32, 0x9e, 0x66, 0x43, 0x3d, 0xf5, 0xed, 0x9b, + 0x47, 0x91, 0x07, 0x50, 0xe2, 0xde, 0xdf, 0x6a, 0xa2, 0x87, 0xac, 0x2d, 0x08, 0x4c, 0x91, 0xa9, + 0xfd, 0x43, 0x01, 0x4a, 0x3c, 0xda, 0x9e, 0x07, 0xda, 0xc2, 0x15, 0x81, 0x56, 0xb9, 0x32, 0xd0, + 0x16, 0xaf, 0x15, 0x68, 0x2b, 0x37, 0x0b, 0xb4, 0xd5, 0x4b, 0x02, 0xad, 0xf6, 0x67, 0x45, 0x68, + 0xe8, 0x38, 0xf3, 0x10, 0x13, 0xfd, 0xfb, 0x50, 0x7c, 0xce, 0xce, 0x50, 0x3f, 0x8d, 0xed, 0x5b, + 0x99, 0xdd, 0xa6, 0x2a, 0xa4, 0x1c, 0x40, 0xb6, 0x61, 0x45, 0xbc, 0xd0, 0x3a, 0x0e, 0xfd, 0x79, + 0xd0, 0x52, 0x97, 0xab, 0xa7, 0x21, 0x40, 0xfb, 0x1c, 0x43, 0xde, 0x83, 0xb2, 0xff, 0xc2, 0x63, + 0x21, 0xc6, 0xc1, 0x3c, 0x98, 0x2b, 0x8f, 0x0a, 0x2e, 0x79, 0x08, 0xa5, 0xe7, 0xae, 0xe7, 0xe0, + 0x19, 0xe6, 0x23, 0x61, 0x46, 0xd0, 0xce, 0x13, 0xd7, 0x73, 0x28, 0x02, 0xc9, 0x3d, 0xa8, 0xf1, + 0x5f, 0x8c, 0x7b, 0x65, 0xdc, 0x68, 0x95, 0x8f, 0x79, 0xd0, 0x7b, 0x08, 0xb5, 0x40, 0xc6, 0x10, + 0x4c, 0x00, 0x8d, 0xed, 0x8d, 0x25, 0xe1, 0x85, 0xa6, 0x20, 0xf2, 0x15, 0xac, 0x84, 0xf6, 0x0b, + 0x2b, 0x9d, 0xb4, 0x76, 0xf9, 0xa4, 0x46, 0x68, 0xbf, 0x48, 0x23, 0x38, 0x81, 0x52, 0x68, 0x7b, + 0xcf, 0x5b, 0x64, 0xb3, 0xb0, 0x55, 0xa6, 0xf8, 0xac, 0x7d, 0x01, 0x25, 0x2e, 0x25, 0x8f, 0x08, + 0xfb, 0x3d, 0xf4, 0xff, 0xee, 0x9e, 0xa9, 0x16, 0x12, 0x7f, 0xfe, 0x96, 0x47, 0x03, 0x45, 0x72, + 0x0f, 0xf4, 0xd1, 0xa8, 0xbb, 0xaf, 0xab, 0x45, 0xad, 0x07, 0xeb, 0x7b, 0xfe, 0x2c, 0xf0, 0x23, + 0x37, 0x66, 0xe9, 0xf2, 0xf7, 0xa0, 0xe6, 0x7a, 0x0e, 0x7b, 0x69, 0xb9, 0x0e, 0x9a, 0x56, 0x91, + 0x56, 0x71, 0x6c, 0x38, 0xdc, 0xe4, 0x4e, 0x65, 0x31, 0x55, 0xe4, 0x26, 0x87, 0x03, 0xed, 0x2f, + 0x15, 0x28, 0x1b, 0x1c, 0xc1, 0x8d, 0x4f, 0x9e, 0x14, 0x7a, 0x8f, 0x30, 0x4c, 0x10, 0x24, 0x93, + 0xfb, 0x50, 0x1b, 0x6a, 0xb6, 0x37, 0x66, 0xbc, 0xe2, 0xc3, 0x3c, 0x50, 0xa3, 0xe9, 0x98, 0x7c, + 0x99, 0xd1, 0x9f, 0x82, 0x2e, 0x7b, 0x2f, 0xa3, 0x0a, 0x7c, 0xc1, 0x12, 0x2d, 0xb6, 0xff, 0xaa, + 0x90, 0x49, 0x6e, 0xcb, 0x12, 0x4f, 0x1f, 0xea, 0x8e, 0x1b, 0x32, 0xac, 0x23, 0xe5, 0x41, 0x3f, + 0xb8, 0x74, 0xe1, 0x4e, 0x2f, 0x81, 0xee, 0xd4, 0xbb, 0xa3, 0x3d, 0x7d, 0xd0, 0xe3, 0x99, 0xef, + 0x7c, 0x01, 0xed, 0x23, 0xa8, 0xa7, 0x10, 0x0c, 0xc7, 0x09, 0x48, 0x2d, 0x70, 0xf5, 0xf6, 0xf4, + 0x74, 0xac, 0x68, 0x7f, 0xad, 0x40, 0x33, 0xd5, 0xaf, 0xd0, 0xd0, 0x6d, 0xa8, 0xd8, 0x41, 0x90, + 0xa8, 0xb6, 0x4e, 0xcb, 0x76, 0x10, 0x18, 0x8e, 0x8c, 0x2d, 0x0a, 0x6a, 0x9b, 0xc7, 0x96, 0x4f, + 0x01, 0x1c, 0x36, 0x71, 0x3d, 0x17, 0x85, 0x2e, 0xa2, 0xc1, 0xab, 0x8b, 0x42, 0xd3, 0x0c, 0x86, + 0x7c, 0x09, 0xe5, 0x28, 0xb6, 0x63, 0x91, 0x2b, 0x9b, 0xdb, 0xf7, 0x33, 0xe0, 0xbc, 0x08, 0x9d, + 0x11, 0x87, 0x51, 0x81, 0x26, 0x5f, 0xc1, 0x2d, 0xdf, 0x9b, 0x9e, 0x59, 0xf3, 0x88, 0x59, 0xee, + 0xc4, 0x0a, 0xd9, 0x0f, 0x73, 0x37, 0x64, 0x4e, 0x3e, 0xa7, 0xae, 0x73, 0xc8, 0x51, 0xc4, 0x8c, + 0x09, 0x95, 0x7c, 0xed, 0x6b, 0x28, 0xe3, 0x3a, 0x7c, 0xcf, 0xdf, 0x51, 0xc3, 0xd4, 0xad, 0xe1, + 0xa0, 0xff, 0x54, 0xe8, 0x80, 0xea, 0xdd, 0x9e, 0x85, 0x44, 0x55, 0xe1, 0xc1, 0xbe, 0xa7, 0xf7, + 0x75, 0x53, 0xef, 0xa9, 0x45, 0x9e, 0x3d, 0x74, 0x4a, 0x87, 0x54, 0x2d, 0x69, 0xff, 0x53, 0x80, + 0x15, 0x94, 0xe7, 0xd0, 0x8f, 0xe2, 0x89, 0xfb, 0x92, 0xec, 0x41, 0x43, 0x98, 0xdd, 0xa9, 0x2c, + 0xe8, 0xb9, 0x33, 0x68, 0x8b, 0x7b, 0x96, 0x68, 0x31, 0x90, 0x75, 0xb4, 0x9b, 0x3e, 0x27, 0x21, + 0x45, 0x41, 0xa7, 0xbf, 0x22, 0xa4, 0xbc, 0x05, 0x95, 0x67, 0x6c, 0xe2, 0x87, 0x22, 0x04, 0xd6, + 0x76, 0x4a, 0x71, 0x38, 0x67, 0x54, 0xd2, 0xda, 0x36, 0xc0, 0xf9, 0xfa, 0xe4, 0x01, 0xac, 0x26, + 0xc6, 0x66, 0xa1, 0x71, 0x89, 0x93, 0x5b, 0x49, 0x88, 0x83, 0x5c, 0x75, 0xa3, 0x5c, 0xab, 0xba, + 0xd1, 0xbe, 0x86, 0xd5, 0x64, 0x3f, 0xe2, 0xfc, 0x54, 0x21, 0x79, 0x01, 0x63, 0xca, 0x82, 0x8c, + 0xca, 0x45, 0x19, 0xb5, 0x9f, 0x41, 0x6d, 0xe4, 0xd9, 0x41, 0x74, 0xe2, 0xc7, 0xdc, 0x7a, 0xe2, + 0x48, 0xfa, 0xaa, 0x12, 0x47, 0x9a, 0x06, 0x15, 0x7e, 0x38, 0xf3, 0x88, 0xbb, 0xbf, 0x31, 0xe8, + 0xee, 0x99, 0xc6, 0xb7, 0xba, 0xfa, 0x06, 0x01, 0xa8, 0xc8, 0xe7, 0x82, 0xa6, 0x41, 0xd3, 0x90, + 0xed, 0xd8, 0x63, 0x66, 0x3b, 0x2c, 0xe4, 0x12, 0xfc, 0xe0, 0x47, 0x89, 0x04, 0x3f, 0xf8, 0x91, + 0xf6, 0x17, 0x05, 0x68, 0x98, 0xa1, 0xed, 0x45, 0xb6, 0x30, 0xf7, 0xcf, 0xa0, 0x72, 0x82, 0x58, + 0x74, 0xa3, 0xc6, 0x82, 0x7f, 0x66, 0x17, 0xa3, 0x12, 0x48, 0xee, 0x40, 0xe5, 0xc4, 0xf6, 0x9c, + 0xa9, 0xd0, 0x5a, 0x85, 0xca, 0x51, 0x92, 0x1b, 0x95, 0xf3, 0xdc, 0xb8, 0x05, 0x2b, 0x33, 0x3b, + 0x7c, 0x6e, 0x8d, 0x4f, 0x6c, 0xef, 0x98, 0x45, 0xf2, 0x60, 0xa4, 0x05, 0x36, 0x38, 0x6b, 0x4f, + 0x70, 0xb4, 0xbf, 0x5f, 0x81, 0xf2, 0x37, 0x73, 0x16, 0x9e, 0x65, 0x04, 0xfa, 0xe0, 0xba, 0x02, + 0xc9, 0x17, 0x17, 0x2e, 0x4b, 0xca, 0x6f, 0x2f, 0x26, 0x65, 0x22, 0x53, 0x84, 0xc8, 0x95, 0x22, + 0x0b, 0x7c, 0x9a, 0x09, 0x63, 0xeb, 0x57, 0xd8, 0xda, 0x79, 0x70, 0x7b, 0x08, 0x95, 0x89, 0x3b, + 0x8d, 0x51, 0x75, 0x8b, 0xd5, 0x08, 0xee, 0xa5, 0xf3, 0x08, 0xd9, 0x54, 0xc2, 0xc8, 0xbb, 0xb0, + 0x22, 0x2a, 0x59, 0xeb, 0x07, 0xce, 0xc6, 0x82, 0x95, 0xf7, 0xa6, 0x48, 0x13, 0xbb, 0xff, 0x18, + 0xca, 0x7e, 0xc8, 0x37, 0x5f, 0xc7, 0x25, 0xef, 0x5c, 0x58, 0x72, 0xc8, 0xb9, 0x54, 0x80, 0xc8, + 0x87, 0x50, 0x3a, 0x71, 0xbd, 0x18, 0xb3, 0x46, 0x73, 0xfb, 0xf6, 0x05, 0xf0, 0x63, 0xd7, 0x8b, + 0x29, 0x42, 0x78, 0x98, 0x1f, 0xfb, 0x73, 0x2f, 0x6e, 0xdd, 0xc5, 0x0c, 0x23, 0x06, 0xe4, 0x1e, + 0x54, 0xfc, 0xc9, 0x24, 0x62, 0x31, 0x76, 0x96, 0xe5, 0x9d, 0xc2, 0xa7, 0x54, 0x12, 0xf8, 0x84, + 0xa9, 0x3b, 0x73, 0x63, 0xec, 0x43, 0xca, 0x54, 0x0c, 0xc8, 0x2e, 0xac, 0x8d, 0xfd, 0x59, 0xe0, + 0x4e, 0x99, 0x63, 0x8d, 0xe7, 0x61, 0xe4, 0x87, 0xad, 0x77, 0x2e, 0x1c, 0xd3, 0x9e, 0x44, 0xec, + 0x21, 0x80, 0x36, 0xc7, 0xb9, 0x31, 0x31, 0x60, 0x83, 0x79, 0x8e, 0xb5, 0xb8, 0xce, 0xfd, 0xd7, + 0xad, 0xb3, 0xce, 0x3c, 0x27, 0x4f, 0x4a, 0xc4, 0xc1, 0x48, 0x68, 0x61, 0xcc, 0x68, 0x6d, 0x60, + 0x90, 0xb9, 0x77, 0x69, 0xac, 0x14, 0xe2, 0x64, 0xc2, 0xf7, 0x6f, 0xc0, 0x2d, 0x19, 0x22, 0xad, + 0x80, 0x85, 0x13, 0x36, 0x8e, 0xad, 0x60, 0x6a, 0x7b, 0x58, 0xca, 0xa5, 0xc6, 0x4a, 0x24, 0xe4, + 0x50, 0x20, 0x0e, 0xa7, 0xb6, 0x47, 0x34, 0xa8, 0x3f, 0x67, 0x67, 0x91, 0xc5, 0x23, 0x29, 0x76, + 0xae, 0x29, 0xba, 0xc6, 0xe9, 0x43, 0x6f, 0x7a, 0x46, 0x7e, 0x02, 0x8d, 0xf8, 0xdc, 0xdb, 0xb0, + 0x61, 0x6d, 0xe4, 0x4e, 0x35, 0xe3, 0x8b, 0x34, 0x0b, 0x25, 0xf7, 0xa1, 0x2a, 0x35, 0xd4, 0xba, + 0x97, 0x5d, 0x3b, 0xa1, 0xf2, 0xc4, 0x3c, 0xb1, 0xdd, 0xa9, 0x7f, 0xca, 0x42, 0x6b, 0x16, 0xb5, + 0xda, 0xe2, 0xb6, 0x24, 0x21, 0x1d, 0x44, 0xdc, 0x4f, 0xa3, 0x38, 0xf4, 0xbd, 0xe3, 0xd6, 0x26, + 0xde, 0x93, 0xc8, 0xd1, 0xc5, 0xe0, 0xf7, 0x2e, 0x66, 0xfe, 0x7c, 0xf0, 0xfb, 0x1c, 0xee, 0x60, + 0x65, 0x66, 0x3d, 0x3b, 0xb3, 0xf2, 0x68, 0x0d, 0xd1, 0x1b, 0xc8, 0xdd, 0x3d, 0x3b, 0xcc, 0x4e, + 0x6a, 0x43, 0xcd, 0x71, 0xa3, 0xd8, 0xf5, 0xc6, 0x71, 0xab, 0x85, 0xef, 0x4c, 0xc7, 0xe4, 0x33, + 0xb8, 0x3d, 0x73, 0x3d, 0x2b, 0xb2, 0x27, 0xcc, 0x8a, 0x5d, 0xee, 0x9b, 0x6c, 0xec, 0x7b, 0x4e, + 0xd4, 0x7a, 0x80, 0x82, 0x93, 0x99, 0xeb, 0x8d, 0xec, 0x09, 0x33, 0xdd, 0x19, 0x1b, 0x09, 0x0e, + 0xf9, 0x08, 0xd6, 0x11, 0x1e, 0xb2, 0x60, 0xea, 0x8e, 0x6d, 0xf1, 0xfa, 0x1f, 0xe1, 0xeb, 0xd7, + 0x38, 0x83, 0x0a, 0x3a, 0xbe, 0xfa, 0x63, 0x68, 0x06, 0x2c, 0x8c, 0xdc, 0x28, 0xb6, 0xa4, 0x45, + 0xbf, 0x97, 0xd5, 0xda, 0xaa, 0x64, 0x0e, 0x91, 0xd7, 0xfe, 0xcf, 0x02, 0x54, 0x84, 0x73, 0x92, + 0x4f, 0x41, 0xf1, 0x03, 0xbc, 0x06, 0x69, 0x6e, 0x6f, 0x5e, 0xe2, 0xc1, 0x9d, 0x61, 0xc0, 0xeb, + 0x5e, 0x3f, 0xa4, 0x8a, 0x1f, 0xdc, 0xb8, 0x28, 0xd4, 0xfe, 0x10, 0x6a, 0xc9, 0x02, 0xbc, 0xbc, + 0xe8, 0xeb, 0xa3, 0x91, 0x65, 0x3e, 0xee, 0x0e, 0xd4, 0x02, 0xb9, 0x03, 0x24, 0x1d, 0x5a, 0x43, + 0x6a, 0xe9, 0xdf, 0x1c, 0x75, 0xfb, 0xaa, 0x82, 0x5d, 0x1a, 0xd5, 0xbb, 0xa6, 0x4e, 0x05, 0xb2, + 0x48, 0xee, 0xc1, 0xed, 0x2c, 0xe5, 0x1c, 0x5c, 0xc2, 0x14, 0x8c, 0x8f, 0x65, 0x52, 0x01, 0xc5, + 0x18, 0xa8, 0x15, 0x9e, 0x16, 0xf4, 0xef, 0x8d, 0x91, 0x39, 0x52, 0xab, 0xed, 0xbf, 0x29, 0x40, + 0x19, 0xc3, 0x06, 0x3f, 0x9f, 0x54, 0x72, 0x71, 0x5d, 0x73, 0x5e, 0xb9, 0x1a, 0xd9, 0x92, 0xaa, + 0x81, 0x01, 0x65, 0x73, 0x79, 0xf4, 0xf9, 0xb5, 0xd6, 0x53, 0x3f, 0x85, 0x12, 0x8f, 0x52, 0xbc, + 0x43, 0x1c, 0xd2, 0x9e, 0x4e, 0xad, 0x47, 0x06, 0x1d, 0xf1, 0x2a, 0x97, 0x40, 0xb3, 0x3b, 0xd8, + 0xd3, 0x47, 0xe6, 0x30, 0xa1, 0xa1, 0x56, 0x1e, 0x19, 0x7d, 0x33, 0x45, 0x15, 0xb5, 0x9f, 0xd7, + 0x60, 0x35, 0x89, 0x09, 0x22, 0x82, 0x3e, 0x82, 0x46, 0x10, 0xba, 0x33, 0x3b, 0x3c, 0x8b, 0xc6, + 0xb6, 0x87, 0x49, 0x01, 0xb6, 0x7f, 0xb4, 0x24, 0xaa, 0x88, 0x1d, 0x1d, 0x0a, 0xec, 0x68, 0x6c, + 0x7b, 0x34, 0x3b, 0x91, 0xf4, 0x61, 0x75, 0xc6, 0xc2, 0x63, 0xf6, 0x7b, 0xbe, 0xeb, 0xe1, 0x4a, + 0x55, 0x8c, 0xc8, 0xef, 0x5f, 0xba, 0xd2, 0x01, 0x47, 0xff, 0x8e, 0xef, 0x7a, 0xb8, 0x56, 0x7e, + 0x32, 0xf9, 0x04, 0xea, 0xa2, 0x12, 0x72, 0xd8, 0x04, 0x63, 0xc5, 0xb2, 0xda, 0x4f, 0xd4, 0xe8, + 0x3d, 0x36, 0xc9, 0xc4, 0x65, 0xb8, 0x34, 0x2e, 0x37, 0xb2, 0x71, 0xf9, 0xcd, 0x6c, 0x2c, 0x5a, + 0x11, 0x55, 0x78, 0x1a, 0x84, 0x2e, 0x38, 0x7c, 0x6b, 0x89, 0xc3, 0x77, 0x60, 0x23, 0xf1, 0x55, + 0xcb, 0xf5, 0x26, 0xee, 0x4b, 0x2b, 0x72, 0x5f, 0x89, 0xd8, 0x53, 0xa6, 0xeb, 0x09, 0xcb, 0xe0, + 0x9c, 0x91, 0xfb, 0x8a, 0x11, 0x23, 0xe9, 0xe0, 0x64, 0x0e, 0x5c, 0xc5, 0xab, 0xc9, 0xf7, 0x2e, + 0x55, 0x8f, 0x68, 0xbe, 0x64, 0x46, 0xcc, 0x4d, 0x6d, 0xff, 0x52, 0x81, 0x46, 0xe6, 0x1c, 0x78, + 0xf6, 0x16, 0xca, 0x42, 0x61, 0xc5, 0x55, 0x94, 0x50, 0x1f, 0x4a, 0xfa, 0x26, 0xd4, 0xa3, 0xd8, + 0x0e, 0x63, 0x8b, 0x17, 0x57, 0xb2, 0xdd, 0x45, 0xc2, 0x13, 0x76, 0x46, 0x3e, 0x80, 0x35, 0xc1, + 0x74, 0xbd, 0xf1, 0x74, 0x1e, 0xb9, 0xa7, 0xa2, 0x99, 0xaf, 0xd1, 0x26, 0x92, 0x8d, 0x84, 0x4a, + 0xee, 0x42, 0x95, 0x67, 0x21, 0xbe, 0x86, 0x68, 0xfa, 0x2a, 0xcc, 0x73, 0xf8, 0x0a, 0x0f, 0x60, + 0x95, 0x33, 0xce, 0xe7, 0x57, 0xc4, 0x2d, 0x33, 0xf3, 0x9c, 0xf3, 0xd9, 0x1d, 0xd8, 0x10, 0xaf, + 0x09, 0x44, 0xf1, 0x2a, 0x2b, 0xdc, 0x3b, 0xa8, 0xd8, 0x75, 0x64, 0xc9, 0xb2, 0x56, 0x14, 0x9c, + 0x1f, 0x01, 0xcf, 0x5e, 0x0b, 0xe8, 0xbb, 0x22, 0x94, 0x31, 0xcf, 0xc9, 0x61, 0x77, 0xe1, 0x1d, + 0x8e, 0x9d, 0x7b, 0x76, 0x10, 0x4c, 0x5d, 0xe6, 0x58, 0x53, 0xff, 0x18, 0x43, 0x66, 0x14, 0xdb, + 0xb3, 0xc0, 0x9a, 0x47, 0xad, 0x0d, 0x0c, 0x99, 0x6d, 0xe6, 0x39, 0x47, 0x09, 0xa8, 0xef, 0x1f, + 0x9b, 0x09, 0xe4, 0x28, 0x6a, 0xff, 0x3e, 0xac, 0xe6, 0xec, 0x71, 0x41, 0xa7, 0x35, 0x74, 0xfe, + 0x8c, 0x4e, 0xdf, 0x85, 0x95, 0x20, 0x64, 0xe7, 0xa2, 0xd5, 0x51, 0xb4, 0x86, 0xa0, 0x09, 0xb1, + 0xb6, 0x60, 0x05, 0x79, 0x96, 0x20, 0xe6, 0xf3, 0x63, 0x03, 0x59, 0x87, 0xc8, 0x69, 0xbf, 0x80, + 0x95, 0xec, 0x69, 0x93, 0x77, 0x33, 0x69, 0xa1, 0x99, 0xcb, 0x93, 0x69, 0x76, 0x48, 0x2a, 0xb2, + 0xf5, 0x4b, 0x2a, 0x32, 0x72, 0x9d, 0x8a, 0x4c, 0xfb, 0x2f, 0xd9, 0x9c, 0x65, 0x2a, 0x84, 0x9f, + 0x41, 0x2d, 0x90, 0xf5, 0x38, 0x5a, 0x52, 0xfe, 0x12, 0x3e, 0x0f, 0xee, 0x24, 0x95, 0x3b, 0x4d, + 0xe7, 0xb4, 0xff, 0x56, 0x81, 0x5a, 0x5a, 0xd0, 0xe7, 0x2c, 0xef, 0xcd, 0x05, 0xcb, 0x3b, 0x90, + 0x1a, 0x16, 0x0a, 0x7c, 0x1b, 0xa3, 0xc5, 0x27, 0xaf, 0x7f, 0xd7, 0xc5, 0xb6, 0xe7, 0x34, 0xdb, + 0xf6, 0x6c, 0xbe, 0xae, 0xed, 0xf9, 0xe4, 0xa2, 0xc1, 0xbf, 0x95, 0xe9, 0x2d, 0x16, 0xcc, 0xbe, + 0xfd, 0x7d, 0xae, 0x0f, 0xca, 0x26, 0x84, 0x77, 0xc4, 0x7e, 0xd2, 0x84, 0x90, 0xb6, 0x3f, 0xf7, + 0xaf, 0xd7, 0xfe, 0x6c, 0x43, 0x45, 0xea, 0xfc, 0x0e, 0x54, 0x64, 0x4d, 0x27, 0x1b, 0x04, 0x31, + 0x3a, 0x6f, 0x10, 0x0a, 0xb2, 0x4e, 0xd7, 0x7e, 0xae, 0x40, 0x59, 0x0f, 0x43, 0x3f, 0xd4, 0xfe, + 0x48, 0x81, 0x3a, 0x3e, 0xed, 0xf9, 0x0e, 0xe3, 0xd9, 0x60, 0xb7, 0xdb, 0xb3, 0xa8, 0xfe, 0xcd, + 0x91, 0x8e, 0xd9, 0xa0, 0x0d, 0x77, 0xf6, 0x86, 0x83, 0xbd, 0x23, 0x4a, 0xf5, 0x81, 0x69, 0x99, + 0xb4, 0x3b, 0x18, 0xf1, 0xb6, 0x67, 0x38, 0x50, 0x15, 0x9e, 0x29, 0x8c, 0x81, 0xa9, 0xd3, 0x41, + 0xb7, 0x6f, 0x89, 0x56, 0xb4, 0x88, 0x77, 0xb3, 0xba, 0xde, 0xb3, 0xf0, 0xd6, 0x51, 0x2d, 0xf1, + 0x96, 0xd5, 0x34, 0x0e, 0xf4, 0xe1, 0x91, 0xa9, 0x96, 0xc9, 0x6d, 0x58, 0x3f, 0xd4, 0xe9, 0x81, + 0x31, 0x1a, 0x19, 0xc3, 0x81, 0xd5, 0xd3, 0x07, 0x86, 0xde, 0x53, 0x2b, 0x7c, 0x9d, 0x5d, 0x63, + 0xdf, 0xec, 0xee, 0xf6, 0x75, 0xb9, 0x4e, 0x95, 0x6c, 0xc2, 0x5b, 0x7b, 0xc3, 0x83, 0x03, 0xc3, + 0x34, 0xf5, 0x9e, 0xb5, 0x7b, 0x64, 0x5a, 0x23, 0xd3, 0xe8, 0xf7, 0xad, 0xee, 0xe1, 0x61, 0xff, + 0x29, 0x4f, 0x60, 0x35, 0x72, 0x17, 0x36, 0xf6, 0xba, 0x87, 0xdd, 0x5d, 0xa3, 0x6f, 0x98, 0x4f, + 0xad, 0x9e, 0x31, 0xe2, 0xf3, 0x7b, 0x6a, 0x9d, 0x27, 0x6c, 0x93, 0x3e, 0xb5, 0xba, 0x7d, 0x14, + 0xcd, 0xd4, 0xad, 0xdd, 0xee, 0xde, 0x13, 0x7d, 0xd0, 0x53, 0x81, 0x0b, 0x30, 0xea, 0x3e, 0xd2, + 0x2d, 0x2e, 0x92, 0x65, 0x0e, 0x87, 0xd6, 0xb0, 0xdf, 0x53, 0x1b, 0xda, 0xbf, 0x14, 0xa1, 0xb4, + 0xe7, 0x47, 0x31, 0xf7, 0x46, 0xe1, 0xac, 0x2f, 0x42, 0x37, 0x66, 0xa2, 0x7f, 0x2b, 0x53, 0xd1, + 0x4b, 0x7f, 0x87, 0x24, 0x1e, 0x50, 0x32, 0x10, 0xeb, 0xd9, 0x19, 0xc7, 0x29, 0x88, 0x5b, 0x3b, + 0xc7, 0xed, 0x72, 0xb2, 0x88, 0x68, 0x78, 0x85, 0x23, 0xd7, 0x2b, 0x22, 0x4e, 0x06, 0x61, 0xb9, + 0xe0, 0xc7, 0x40, 0xb2, 0x20, 0xb9, 0x62, 0x09, 0x91, 0x6a, 0x06, 0x29, 0x96, 0xdc, 0x01, 0x18, + 0xfb, 0xb3, 0x99, 0x1b, 0x8f, 0xfd, 0x28, 0x96, 0x5f, 0xc8, 0xda, 0x39, 0x63, 0x8f, 0x62, 0x6e, + 0xf1, 0x33, 0x37, 0xe6, 0x8f, 0x34, 0x83, 0x26, 0x3b, 0x70, 0xcf, 0x0e, 0x82, 0xd0, 0x7f, 0xe9, + 0xce, 0xec, 0x98, 0x59, 0xdc, 0x73, 0xed, 0x63, 0x66, 0x39, 0x6c, 0x1a, 0xdb, 0xd8, 0x13, 0x95, + 0xe9, 0xdd, 0x0c, 0x60, 0x24, 0xf8, 0x3d, 0xce, 0xe6, 0x71, 0xd7, 0x75, 0xac, 0x88, 0xfd, 0x30, + 0xe7, 0x1e, 0x60, 0xcd, 0x03, 0xc7, 0xe6, 0x62, 0xd6, 0x45, 0x96, 0x72, 0x9d, 0x91, 0xe4, 0x1c, + 0x09, 0x46, 0xfb, 0x15, 0xc0, 0xb9, 0x14, 0x64, 0x1b, 0x6e, 0xf3, 0x3a, 0x9e, 0x45, 0x31, 0x73, + 0x2c, 0xb9, 0xdb, 0x60, 0x1e, 0x47, 0x18, 0xe2, 0xcb, 0x74, 0x23, 0x65, 0xca, 0x9b, 0xc2, 0x79, + 0x1c, 0x91, 0x9f, 0x40, 0xeb, 0xc2, 0x1c, 0x87, 0x4d, 0x19, 0x7f, 0x6d, 0x15, 0xa7, 0xdd, 0x59, + 0x98, 0xd6, 0x13, 0x5c, 0xed, 0x4f, 0x14, 0x80, 0x7d, 0x16, 0x53, 0xc1, 0xcd, 0x34, 0xb6, 0x95, + 0xeb, 0x36, 0xb6, 0xef, 0x27, 0x17, 0x08, 0xc5, 0xab, 0x63, 0xc0, 0x42, 0x97, 0xa1, 0xdc, 0xa4, + 0xcb, 0xc8, 0x35, 0x11, 0xc5, 0x2b, 0x9a, 0x88, 0x52, 0xae, 0x89, 0xf8, 0x18, 0x9a, 0xf6, 0x74, + 0xea, 0xbf, 0xe0, 0x05, 0x0d, 0x0b, 0x43, 0xe6, 0xa0, 0x11, 0x9c, 0xd7, 0xdb, 0xc8, 0xec, 0x49, + 0x9e, 0xf6, 0xe7, 0x0a, 0x34, 0x50, 0x15, 0x51, 0xe0, 0x7b, 0x11, 0x23, 0x5f, 0x42, 0x45, 0x5e, + 0x44, 0x8b, 0x8b, 0xfc, 0xb7, 0x33, 0xb2, 0x66, 0x70, 0xb2, 0x68, 0xa0, 0x12, 0xcc, 0x33, 0x42, + 0xe6, 0x75, 0x97, 0x2b, 0x25, 0x45, 0x91, 0xfb, 0x50, 0x73, 0x3d, 0x4b, 0xb4, 0xd4, 0x95, 0x4c, + 0x58, 0xac, 0xba, 0x1e, 0xd6, 0xb2, 0xed, 0x57, 0x50, 0x11, 0x2f, 0x21, 0x9d, 0x54, 0xa6, 0x8b, + 0xfa, 0xcb, 0xdc, 0x1c, 0xa7, 0xc2, 0xc8, 0xc3, 0x29, 0xbd, 0x2e, 0x40, 0xb7, 0xa0, 0x7a, 0xca, + 0x9b, 0x0f, 0xbc, 0xf4, 0xe3, 0xea, 0x4d, 0x86, 0xda, 0x1f, 0x97, 0x00, 0x0e, 0xe7, 0x4b, 0x0c, + 0xa4, 0x71, 0x5d, 0x03, 0xe9, 0xe4, 0xf4, 0xf8, 0x7a, 0x99, 0x7f, 0x75, 0x43, 0x59, 0xd2, 0x69, + 0x17, 0x6f, 0xda, 0x69, 0xdf, 0x87, 0x6a, 0x1c, 0xce, 0xb9, 0xa3, 0x08, 0x63, 0x4a, 0x5b, 0x5a, + 0x49, 0x25, 0x6f, 0x42, 0x79, 0xe2, 0x87, 0x63, 0x86, 0x8e, 0x95, 0xb2, 0x05, 0xed, 0xc2, 0x65, + 0x52, 0xed, 0xb2, 0xcb, 0x24, 0xde, 0xa0, 0x45, 0xf2, 0x1e, 0x0d, 0x0b, 0x99, 0x7c, 0x83, 0x96, + 0x5c, 0xb1, 0xd1, 0x14, 0x44, 0xbe, 0x81, 0xa6, 0x3d, 0x8f, 0x7d, 0xcb, 0xe5, 0x15, 0xda, 0xd4, + 0x1d, 0x9f, 0x61, 0xd9, 0xdd, 0xcc, 0x7f, 0xaf, 0x4f, 0x0f, 0xaa, 0xd3, 0x9d, 0xc7, 0xbe, 0xe1, + 0x1c, 0x22, 0x72, 0xa7, 0x2a, 0x93, 0x12, 0x5d, 0xb1, 0x33, 0x64, 0xed, 0xc7, 0xb0, 0x92, 0x85, + 0xf1, 0x04, 0x24, 0x81, 0xea, 0x1b, 0x3c, 0x3b, 0x8d, 0x78, 0x6a, 0x1b, 0x98, 0x46, 0xb7, 0xaf, + 0x16, 0xb4, 0x18, 0x1a, 0xb8, 0xbc, 0xf4, 0x8e, 0xeb, 0xba, 0xfd, 0x03, 0x28, 0x61, 0xf8, 0x55, + 0x2e, 0x7c, 0x0f, 0xc1, 0x98, 0x8b, 0xcc, 0xbc, 0xf9, 0x15, 0xb3, 0xe6, 0xf7, 0xdf, 0x05, 0x58, + 0x31, 0xfd, 0xf9, 0xf8, 0xe4, 0xa2, 0x01, 0xc2, 0xaf, 0x3b, 0x42, 0x2d, 0x31, 0x1f, 0xe5, 0xa6, + 0xe6, 0x93, 0x5a, 0x47, 0x71, 0x89, 0x75, 0xdc, 0xf4, 0xcc, 0xb5, 0x2f, 0x60, 0x55, 0x6e, 0x5e, + 0x6a, 0x3d, 0xd1, 0x66, 0xe1, 0x0a, 0x6d, 0x6a, 0xbf, 0x50, 0x60, 0x55, 0xc4, 0xf7, 0xff, 0xbb, + 0xd2, 0x2a, 0x37, 0x0c, 0xeb, 0xe5, 0x1b, 0x5d, 0x1e, 0xfd, 0xbf, 0xf4, 0x34, 0x6d, 0x08, 0xcd, + 0x44, 0x7d, 0x37, 0x50, 0xfb, 0x15, 0x46, 0xfc, 0x8b, 0x02, 0x34, 0x06, 0xec, 0xe5, 0x92, 0x20, + 0x5a, 0xbe, 0xee, 0x71, 0x7c, 0x98, 0x2b, 0x57, 0x1b, 0xdb, 0xeb, 0x59, 0x19, 0xc4, 0xd5, 0x63, + 0x52, 0xc1, 0xa6, 0xb7, 0xa8, 0xca, 0xf2, 0x5b, 0xd4, 0xd2, 0x62, 0xb7, 0x9e, 0xb9, 0xc5, 0x2b, + 0x2e, 0xbb, 0xc5, 0xd3, 0xfe, 0xad, 0x08, 0x0d, 0x6c, 0x90, 0x29, 0x8b, 0xe6, 0xd3, 0x38, 0x27, + 0x4c, 0xe1, 0x6a, 0x61, 0x3a, 0x50, 0x09, 0x71, 0x92, 0x74, 0xa5, 0x4b, 0x83, 0xbf, 0x40, 0x61, + 0x6b, 0xfc, 0xdc, 0x0d, 0x02, 0xe6, 0x58, 0x82, 0x92, 0x14, 0x30, 0x4d, 0x49, 0x16, 0x22, 0x44, + 0xbc, 0xfc, 0x9c, 0xf9, 0x21, 0x4b, 0x51, 0x45, 0xbc, 0x4f, 0x68, 0x70, 0x5a, 0x02, 0xc9, 0xdd, + 0x37, 0x88, 0xca, 0xe0, 0xfc, 0xbe, 0x21, 0xed, 0x35, 0x91, 0x5b, 0x47, 0xae, 0xe8, 0x35, 0x91, + 0xcd, 0xbb, 0xa8, 0x99, 0x3d, 0x9d, 0x5a, 0x7e, 0x10, 0xa1, 0xd3, 0xd4, 0x68, 0x0d, 0x09, 0xc3, + 0x20, 0x22, 0x5f, 0x43, 0x7a, 0x5d, 0x2c, 0x6f, 0xc9, 0xc5, 0x39, 0xb6, 0x2e, 0xbb, 0x58, 0xa0, + 0xab, 0xe3, 0xdc, 0xfd, 0xcf, 0x92, 0x1b, 0xea, 0xca, 0x4d, 0x6f, 0xa8, 0x1f, 0x42, 0x59, 0xc4, + 0xa8, 0xda, 0xeb, 0x62, 0x94, 0xc0, 0x65, 0xed, 0xb3, 0x91, 0xb7, 0xcf, 0x5f, 0x16, 0x80, 0x74, + 0xa7, 0x53, 0x7f, 0x6c, 0xc7, 0xcc, 0x70, 0xa2, 0x8b, 0x66, 0x7a, 0xed, 0xcf, 0x2e, 0x9f, 0x41, + 0x7d, 0xe6, 0x3b, 0x6c, 0x6a, 0x25, 0xdf, 0x94, 0x2e, 0xad, 0x7e, 0x10, 0xc6, 0x5b, 0x52, 0x02, + 0x25, 0xbc, 0xc4, 0x51, 0xb0, 0xee, 0xc0, 0x67, 0xde, 0x84, 0xcd, 0xec, 0x97, 0xb2, 0x14, 0xe1, + 0x8f, 0xa4, 0x03, 0xd5, 0x90, 0x45, 0x2c, 0x3c, 0x65, 0x57, 0x16, 0x55, 0x09, 0x48, 0x7b, 0x06, + 0x1b, 0xb9, 0x1d, 0x49, 0x47, 0xbe, 0x85, 0x5f, 0x2b, 0xc3, 0x58, 0x7e, 0xb4, 0x12, 0x03, 0xfe, + 0x3a, 0xe6, 0x25, 0x9f, 0x41, 0xf9, 0x63, 0xea, 0xf0, 0xc5, 0xab, 0xe2, 0xec, 0x1e, 0xa8, 0x59, + 0x4d, 0xbb, 0x63, 0x0c, 0x36, 0xf2, 0x54, 0x0a, 0xd7, 0x3b, 0x15, 0xed, 0xef, 0x0a, 0xb0, 0xde, + 0x75, 0x1c, 0xf1, 0x77, 0xc3, 0x25, 0xaa, 0x2f, 0x5e, 0x57, 0xf5, 0x0b, 0x81, 0x58, 0x84, 0x89, + 0x6b, 0x05, 0xe2, 0x0f, 0xa1, 0x92, 0xd6, 0x5a, 0xc5, 0x05, 0x77, 0x16, 0x72, 0x51, 0x09, 0xd0, + 0x6e, 0x01, 0xc9, 0x0a, 0x2b, 0xb4, 0xaa, 0xfd, 0x69, 0x11, 0xee, 0xee, 0xb2, 0x63, 0xd7, 0xcb, + 0xbe, 0xe2, 0x57, 0xdf, 0xc9, 0xc5, 0x4f, 0x65, 0x9f, 0xc1, 0xba, 0x28, 0xe4, 0x93, 0x7f, 0x62, + 0x59, 0xec, 0x58, 0x7e, 0x9d, 0x94, 0xb1, 0x6a, 0x0d, 0xf9, 0x07, 0x92, 0xad, 0xe3, 0x7f, 0xc5, + 0x1c, 0x3b, 0xb6, 0x9f, 0xd9, 0x11, 0xb3, 0x5c, 0x47, 0xfe, 0x59, 0x06, 0x12, 0x92, 0xe1, 0x90, + 0x21, 0x94, 0xb8, 0x0d, 0xa2, 0xeb, 0x36, 0xb7, 0xb7, 0x33, 0x62, 0x5d, 0xb2, 0x95, 0xac, 0x02, + 0x0f, 0x7c, 0x87, 0xed, 0x54, 0x8f, 0x06, 0x4f, 0x06, 0xc3, 0xef, 0x06, 0x14, 0x17, 0x22, 0x06, + 0xdc, 0x0a, 0x42, 0x76, 0xea, 0xfa, 0xf3, 0xc8, 0xca, 0x9e, 0x44, 0xf5, 0xca, 0x94, 0xb8, 0x91, + 0xcc, 0xc9, 0x10, 0xb5, 0x9f, 0xc2, 0xda, 0xc2, 0xcb, 0x78, 0x6d, 0x26, 0x5f, 0xa7, 0xbe, 0x41, + 0x56, 0xa1, 0x8e, 0x1f, 0xbb, 0x97, 0x7f, 0xfb, 0xd6, 0xfe, 0xb5, 0x80, 0x57, 0x4c, 0x33, 0x37, + 0xbe, 0x59, 0x06, 0xfb, 0xcd, 0x7c, 0x06, 0x83, 0xed, 0x77, 0xf3, 0xe6, 0x9b, 0x59, 0xb0, 0xf3, + 0xad, 0x00, 0xa6, 0x41, 0xa4, 0x6d, 0x43, 0x55, 0xd2, 0xc8, 0x6f, 0xc1, 0x5a, 0xe8, 0xfb, 0x71, + 0xd2, 0x89, 0x8a, 0x0e, 0xe4, 0xf2, 0x3f, 0xdb, 0xac, 0x72, 0xb0, 0x48, 0x06, 0x4f, 0xf2, 0xbd, + 0x48, 0x59, 0xfc, 0x0d, 0x44, 0x0e, 0x77, 0x1b, 0xbf, 0x5b, 0x4f, 0xff, 0xb7, 0xfb, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x35, 0x9f, 0x30, 0x98, 0xf2, 0x2b, 0x00, 0x00, +} diff --git a/vendor/cloud.google.com/go/datastore/key.go b/vendor/cloud.google.com/go/datastore/key.go new file mode 100644 index 000000000000..a25edc88fd94 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/key.go @@ -0,0 +1,293 @@ +// Copyright 2014 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 datastore + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/gob" + "errors" + "strconv" + "strings" + + "github.com/golang/protobuf/proto" + pb "google.golang.org/genproto/googleapis/datastore/v1" +) + +// Key represents the datastore key for a stored entity. +type Key struct { + // Kind cannot be empty. + Kind string + // Either ID or Name must be zero for the Key to be valid. + // If both are zero, the Key is incomplete. + ID int64 + Name string + // Parent must either be a complete Key or nil. + Parent *Key + + // Namespace provides the ability to partition your data for multiple + // tenants. In most cases, it is not necessary to specify a namespace. + // See docs on datastore multitenancy for details: + // https://cloud.google.com/datastore/docs/concepts/multitenancy + Namespace string +} + +// Incomplete reports whether the key does not refer to a stored entity. +func (k *Key) Incomplete() bool { + return k.Name == "" && k.ID == 0 +} + +// valid returns whether the key is valid. +func (k *Key) valid() bool { + if k == nil { + return false + } + for ; k != nil; k = k.Parent { + if k.Kind == "" { + return false + } + if k.Name != "" && k.ID != 0 { + return false + } + if k.Parent != nil { + if k.Parent.Incomplete() { + return false + } + if k.Parent.Namespace != k.Namespace { + return false + } + } + } + return true +} + +// Equal reports whether two keys are equal. Two keys are equal if they are +// both nil, or if their kinds, IDs, names, namespaces and parents are equal. +func (k *Key) Equal(o *Key) bool { + for { + if k == nil || o == nil { + return k == o // if either is nil, both must be nil + } + if k.Namespace != o.Namespace || k.Name != o.Name || k.ID != o.ID || k.Kind != o.Kind { + return false + } + if k.Parent == nil && o.Parent == nil { + return true + } + k = k.Parent + o = o.Parent + } +} + +// marshal marshals the key's string representation to the buffer. +func (k *Key) marshal(b *bytes.Buffer) { + if k.Parent != nil { + k.Parent.marshal(b) + } + b.WriteByte('/') + b.WriteString(k.Kind) + b.WriteByte(',') + if k.Name != "" { + b.WriteString(k.Name) + } else { + b.WriteString(strconv.FormatInt(k.ID, 10)) + } +} + +// String returns a string representation of the key. +func (k *Key) String() string { + if k == nil { + return "" + } + b := bytes.NewBuffer(make([]byte, 0, 512)) + k.marshal(b) + return b.String() +} + +// Note: Fields not renamed compared to appengine gobKey struct +// This ensures gobs created by appengine can be read here, and vice/versa +type gobKey struct { + Kind string + StringID string + IntID int64 + Parent *gobKey + AppID string + Namespace string +} + +func keyToGobKey(k *Key) *gobKey { + if k == nil { + return nil + } + return &gobKey{ + Kind: k.Kind, + StringID: k.Name, + IntID: k.ID, + Parent: keyToGobKey(k.Parent), + Namespace: k.Namespace, + } +} + +func gobKeyToKey(gk *gobKey) *Key { + if gk == nil { + return nil + } + return &Key{ + Kind: gk.Kind, + Name: gk.StringID, + ID: gk.IntID, + Parent: gobKeyToKey(gk.Parent), + Namespace: gk.Namespace, + } +} + +// GobEncode marshals the key into a sequence of bytes +// using an encoding/gob.Encoder. +func (k *Key) GobEncode() ([]byte, error) { + buf := new(bytes.Buffer) + if err := gob.NewEncoder(buf).Encode(keyToGobKey(k)); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +// GobDecode unmarshals a sequence of bytes using an encoding/gob.Decoder. +func (k *Key) GobDecode(buf []byte) error { + gk := new(gobKey) + if err := gob.NewDecoder(bytes.NewBuffer(buf)).Decode(gk); err != nil { + return err + } + *k = *gobKeyToKey(gk) + return nil +} + +// MarshalJSON marshals the key into JSON. +func (k *Key) MarshalJSON() ([]byte, error) { + return []byte(`"` + k.Encode() + `"`), nil +} + +// UnmarshalJSON unmarshals a key JSON object into a Key. +func (k *Key) UnmarshalJSON(buf []byte) error { + if len(buf) < 2 || buf[0] != '"' || buf[len(buf)-1] != '"' { + return errors.New("datastore: bad JSON key") + } + k2, err := DecodeKey(string(buf[1 : len(buf)-1])) + if err != nil { + return err + } + *k = *k2 + return nil +} + +// Encode returns an opaque representation of the key +// suitable for use in HTML and URLs. +// This is compatible with the Python and Java runtimes. +func (k *Key) Encode() string { + pKey := keyToProto(k) + + b, err := proto.Marshal(pKey) + if err != nil { + panic(err) + } + + // Trailing padding is stripped. + return strings.TrimRight(base64.URLEncoding.EncodeToString(b), "=") +} + +// DecodeKey decodes a key from the opaque representation returned by Encode. +func DecodeKey(encoded string) (*Key, error) { + k, err := decodeCloudKey(encoded) + if err != nil { + // Couldn't decode it as a Cloud Datastore key, try decoding it as a key encoded by google.golang.org/appengine/datastore. + if k := decodeGAEKey(encoded); k != nil { + return k, nil + } + // Return original error. + return nil, err + } + return k, nil +} + +func decodeCloudKey(encoded string) (*Key, error) { + // Re-add padding. + if m := len(encoded) % 4; m != 0 { + encoded += strings.Repeat("=", 4-m) + } + + b, err := base64.URLEncoding.DecodeString(encoded) + if err != nil { + return nil, err + } + + pKey := new(pb.Key) + if err := proto.Unmarshal(b, pKey); err != nil { + return nil, err + } + return protoToKey(pKey) +} + +// AllocateIDs accepts a slice of incomplete keys and returns a +// slice of complete keys that are guaranteed to be valid in the datastore. +func (c *Client) AllocateIDs(ctx context.Context, keys []*Key) ([]*Key, error) { + if keys == nil { + return nil, nil + } + + req := &pb.AllocateIdsRequest{ + ProjectId: c.dataset, + Keys: multiKeyToProto(keys), + } + resp, err := c.client.AllocateIds(ctx, req) + if err != nil { + return nil, err + } + + return multiProtoToKey(resp.Keys) +} + +// IncompleteKey creates a new incomplete key. +// The supplied kind cannot be empty. +// The namespace of the new key is empty. +func IncompleteKey(kind string, parent *Key) *Key { + return &Key{ + Kind: kind, + Parent: parent, + } +} + +// NameKey creates a new key with a name. +// The supplied kind cannot be empty. +// The supplied parent must either be a complete key or nil. +// The namespace of the new key is empty. +func NameKey(kind, name string, parent *Key) *Key { + return &Key{ + Kind: kind, + Name: name, + Parent: parent, + } +} + +// IDKey creates a new key with an ID. +// The supplied kind cannot be empty. +// The supplied parent must either be a complete key or nil. +// The namespace of the new key is empty. +func IDKey(kind string, id int64, parent *Key) *Key { + return &Key{ + Kind: kind, + ID: id, + Parent: parent, + } +} diff --git a/vendor/cloud.google.com/go/datastore/keycompat.go b/vendor/cloud.google.com/go/datastore/keycompat.go new file mode 100644 index 000000000000..0464fe7e6815 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/keycompat.go @@ -0,0 +1,66 @@ +// 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 datastore + +import ( + "encoding/base64" + "strings" + + "cloud.google.com/go/datastore/internal/gaepb" + "github.com/golang/protobuf/proto" +) + +// decodeGAEKey attempts to decode the given encoded key generated by the +// GAE Datastore package (google.golang.org/appengine/datastore), returning nil +// if the key couldn't be decoded. +func decodeGAEKey(encoded string) *Key { + // Re-add padding. + if m := len(encoded) % 4; m != 0 { + encoded += strings.Repeat("=", 4-m) + } + + b, err := base64.URLEncoding.DecodeString(encoded) + if err != nil { + return nil + } + ref := new(gaepb.Reference) + if err := proto.Unmarshal(b, ref); err != nil { + return nil + } + return gaeProtoToKey(ref) +} + +// gaeProtoToKey accepts a GAE Datastore key and converts it to a Cloud Datastore key. +// This is adapted from the "protoToKey" function in the appengine/datastore package. +// +// NOTE(cbro): this is a lossy operation, as GAE Datastore keys include the project/app ID, +// but Cloud Datastore keys do not. +func gaeProtoToKey(r *gaepb.Reference) *Key { + namespace := r.GetNameSpace() + var k *Key + for _, e := range r.Path.Element { + k = &Key{ + Kind: e.GetType(), + Name: e.GetName(), + ID: e.GetId(), + Parent: k, + Namespace: namespace, + } + } + if !k.valid() { + return nil + } + return k +} diff --git a/vendor/cloud.google.com/go/datastore/load.go b/vendor/cloud.google.com/go/datastore/load.go new file mode 100644 index 000000000000..ffed38bb443a --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/load.go @@ -0,0 +1,545 @@ +// Copyright 2014 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 datastore + +import ( + "fmt" + "reflect" + "strings" + "time" + + "cloud.google.com/go/internal/fields" + pb "google.golang.org/genproto/googleapis/datastore/v1" +) + +var ( + typeOfByteSlice = reflect.TypeOf([]byte(nil)) + typeOfTime = reflect.TypeOf(time.Time{}) + typeOfGeoPoint = reflect.TypeOf(GeoPoint{}) + typeOfKeyPtr = reflect.TypeOf(&Key{}) +) + +// typeMismatchReason returns a string explaining why the property p could not +// be stored in an entity field of type v.Type(). +func typeMismatchReason(p Property, v reflect.Value) string { + entityType := "empty" + switch p.Value.(type) { + case int64: + entityType = "int" + case bool: + entityType = "bool" + case string: + entityType = "string" + case float64: + entityType = "float" + case *Key: + entityType = "*datastore.Key" + case *Entity: + entityType = "*datastore.Entity" + case GeoPoint: + entityType = "GeoPoint" + case time.Time: + entityType = "time.Time" + case []byte: + entityType = "[]byte" + } + + return fmt.Sprintf("type mismatch: %s versus %v", entityType, v.Type()) +} + +func overflowReason(x interface{}, v reflect.Value) string { + return fmt.Sprintf("value %v overflows struct field of type %v", x, v.Type()) +} + +type propertyLoader struct { + // m holds the number of times a substruct field like "Foo.Bar.Baz" has + // been seen so far. The map is constructed lazily. + m map[string]int +} + +func (l *propertyLoader) load(codec fields.List, structValue reflect.Value, p Property, prev map[string]struct{}) string { + sl, ok := p.Value.([]interface{}) + if !ok { + return l.loadOneElement(codec, structValue, p, prev) + } + for _, val := range sl { + p.Value = val + if errStr := l.loadOneElement(codec, structValue, p, prev); errStr != "" { + return errStr + } + } + return "" +} + +// loadOneElement loads the value of Property p into structValue based on the provided +// codec. codec is used to find the field in structValue into which p should be loaded. +// prev is the set of property names already seen for structValue. +func (l *propertyLoader) loadOneElement(codec fields.List, structValue reflect.Value, p Property, prev map[string]struct{}) string { + var sliceOk bool + var sliceIndex int + var v reflect.Value + + name := p.Name + fieldNames := strings.Split(name, ".") + + for len(fieldNames) > 0 { + var field *fields.Field + + // Start by trying to find a field with name. If none found, + // cut off the last field (delimited by ".") and find its parent + // in the codec. + // eg. for name "A.B.C.D", split off "A.B.C" and try to + // find a field in the codec with this name. + // Loop again with "A.B", etc. + for i := len(fieldNames); i > 0; i-- { + parent := strings.Join(fieldNames[:i], ".") + field = codec.Match(parent) + if field != nil { + fieldNames = fieldNames[i:] + break + } + } + + // If we never found a matching field in the codec, return + // error message. + if field == nil { + return "no such struct field" + } + + v = initField(structValue, field.Index) + if !v.IsValid() { + return "no such struct field" + } + if !v.CanSet() { + return "cannot set struct field" + } + + // If field implements PLS, we delegate loading to the PLS's Load early, + // and stop iterating through fields. + ok, err := plsFieldLoad(v, p, fieldNames) + if err != nil { + return err.Error() + } + if ok { + return "" + } + + if field.Type.Kind() == reflect.Ptr && field.Type.Elem().Kind() == reflect.Struct { + codec, err = structCache.Fields(field.Type.Elem()) + if err != nil { + return err.Error() + } + + // Init value if its nil + if v.IsNil() { + v.Set(reflect.New(field.Type.Elem())) + } + structValue = v.Elem() + } + + if field.Type.Kind() == reflect.Struct { + codec, err = structCache.Fields(field.Type) + if err != nil { + return err.Error() + } + structValue = v + } + + // If the element is a slice, we need to accommodate it. + if v.Kind() == reflect.Slice && v.Type() != typeOfByteSlice { + if l.m == nil { + l.m = make(map[string]int) + } + sliceIndex = l.m[p.Name] + l.m[p.Name] = sliceIndex + 1 + for v.Len() <= sliceIndex { + v.Set(reflect.Append(v, reflect.New(v.Type().Elem()).Elem())) + } + structValue = v.Index(sliceIndex) + + // If structValue implements PLS, we delegate loading to the PLS's + // Load early, and stop iterating through fields. + ok, err := plsFieldLoad(structValue, p, fieldNames) + if err != nil { + return err.Error() + } + if ok { + return "" + } + + if structValue.Type().Kind() == reflect.Struct { + codec, err = structCache.Fields(structValue.Type()) + if err != nil { + return err.Error() + } + } + sliceOk = true + } + } + + var slice reflect.Value + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { + slice = v + v = reflect.New(v.Type().Elem()).Elem() + } else if _, ok := prev[p.Name]; ok && !sliceOk { + // Zero the field back out that was set previously, turns out + // it's a slice and we don't know what to do with it + v.Set(reflect.Zero(v.Type())) + return "multiple-valued property requires a slice field type" + } + + prev[p.Name] = struct{}{} + + if errReason := setVal(v, p); errReason != "" { + // Set the slice back to its zero value. + if slice.IsValid() { + slice.Set(reflect.Zero(slice.Type())) + } + return errReason + } + + if slice.IsValid() { + slice.Index(sliceIndex).Set(v) + } + + return "" +} + +// plsFieldLoad first tries to converts v's value to a PLS, then v's addressed +// value to a PLS. If neither succeeds, plsFieldLoad returns false for first return +// value. Otherwise, the first return value will be true. +// If v is successfully converted to a PLS, plsFieldLoad will then try to Load +// the property p into v (by way of the PLS's Load method). +// +// If the field v has been flattened, the Property's name must be altered +// before calling Load to reflect the field v. +// For example, if our original field name was "A.B.C.D", +// and at this point in iteration we had initialized the field +// corresponding to "A" and have moved into the struct, so that now +// v corresponds to the field named "B", then we want to let the +// PLS handle this field (B)'s subfields ("C", "D"), +// so we send the property to the PLS's Load, renamed to "C.D". +// +// If subfields are present, the field v has been flattened. +func plsFieldLoad(v reflect.Value, p Property, subfields []string) (ok bool, err error) { + vpls, err := plsForLoad(v) + if err != nil { + return false, err + } + + if vpls == nil { + return false, nil + } + + // If Entity, load properties as well as key. + if e, ok := p.Value.(*Entity); ok { + err = loadEntity(vpls, e) + return true, err + } + + // If flattened, we must alter the property's name to reflect + // the field v. + if len(subfields) > 0 { + p.Name = strings.Join(subfields, ".") + } + + return true, vpls.Load([]Property{p}) +} + +// setVal sets 'v' to the value of the Property 'p'. +func setVal(v reflect.Value, p Property) (s string) { + pValue := p.Value + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x, ok := pValue.(int64) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + if v.OverflowInt(x) { + return overflowReason(x, v) + } + v.SetInt(x) + case reflect.Bool: + x, ok := pValue.(bool) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + v.SetBool(x) + case reflect.String: + x, ok := pValue.(string) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + v.SetString(x) + case reflect.Float32, reflect.Float64: + x, ok := pValue.(float64) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + if v.OverflowFloat(x) { + return overflowReason(x, v) + } + v.SetFloat(x) + + case reflect.Interface: + if !v.CanSet() { + return fmt.Sprintf("%v is unsettable", v.Type()) + } + + rpValue := reflect.ValueOf(pValue) + if !rpValue.Type().AssignableTo(v.Type()) { + return fmt.Sprintf("%q is not assignable to %q", rpValue.Type(), v.Type()) + } + v.Set(rpValue) + + case reflect.Ptr: + // v must be a pointer to either a Key, an Entity, or one of the supported basic types. + if v.Type() != typeOfKeyPtr && v.Type().Elem().Kind() != reflect.Struct && !isValidPointerType(v.Type().Elem()) { + return typeMismatchReason(p, v) + } + + if pValue == nil { + // If v is populated already, set it to nil. + if !v.IsNil() { + v.Set(reflect.New(v.Type()).Elem()) + } + return "" + } + + if x, ok := p.Value.(*Key); ok { + if _, ok := v.Interface().(*Key); !ok { + return typeMismatchReason(p, v) + } + v.Set(reflect.ValueOf(x)) + return "" + } + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + switch x := pValue.(type) { + case *Entity: + err := loadEntity(v.Interface(), x) + if err != nil { + return err.Error() + } + case int64: + if v.Elem().OverflowInt(x) { + return overflowReason(x, v.Elem()) + } + v.Elem().SetInt(x) + case float64: + if v.Elem().OverflowFloat(x) { + return overflowReason(x, v.Elem()) + } + v.Elem().SetFloat(x) + case bool: + v.Elem().SetBool(x) + case string: + v.Elem().SetString(x) + case GeoPoint, time.Time: + v.Elem().Set(reflect.ValueOf(x)) + default: + return typeMismatchReason(p, v) + } + case reflect.Struct: + switch v.Type() { + case typeOfTime: + // Some time values are converted into microsecond integer values + // (for example when used with projects). So, here we check first + // whether this value is an int64, and next whether it's time. + // + // See more at https://cloud.google.com/datastore/docs/concepts/queries#limitations_on_projections + micros, ok := pValue.(int64) + if ok { + s := micros / 1e6 + ns := micros % 1e6 + v.Set(reflect.ValueOf(time.Unix(s, ns))) + break + } + x, ok := pValue.(time.Time) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + v.Set(reflect.ValueOf(x)) + case typeOfGeoPoint: + x, ok := pValue.(GeoPoint) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + v.Set(reflect.ValueOf(x)) + default: + ent, ok := pValue.(*Entity) + if !ok { + return typeMismatchReason(p, v) + } + err := loadEntity(v.Addr().Interface(), ent) + if err != nil { + return err.Error() + } + } + case reflect.Slice: + x, ok := pValue.([]byte) + if !ok && pValue != nil { + return typeMismatchReason(p, v) + } + if v.Type().Elem().Kind() != reflect.Uint8 { + return typeMismatchReason(p, v) + } + v.SetBytes(x) + default: + return typeMismatchReason(p, v) + } + return "" +} + +// initField is similar to reflect's Value.FieldByIndex, in that it +// returns the nested struct field corresponding to index, but it +// initialises any nil pointers encountered when traversing the structure. +func initField(val reflect.Value, index []int) reflect.Value { + for _, i := range index[:len(index)-1] { + val = val.Field(i) + if val.Kind() == reflect.Ptr { + if val.IsNil() { + val.Set(reflect.New(val.Type().Elem())) + } + val = val.Elem() + } + } + return val.Field(index[len(index)-1]) +} + +// loadEntityProto loads an EntityProto into PropertyLoadSaver or struct pointer. +func loadEntityProto(dst interface{}, src *pb.Entity) error { + ent, err := protoToEntity(src) + if err != nil { + return err + } + return loadEntity(dst, ent) +} + +func loadEntity(dst interface{}, ent *Entity) error { + if pls, ok := dst.(PropertyLoadSaver); ok { + err := pls.Load(ent.Properties) + if err != nil { + return err + } + if e, ok := dst.(KeyLoader); ok { + err = e.LoadKey(ent.Key) + } + return err + } + return loadEntityToStruct(dst, ent) +} + +func loadEntityToStruct(dst interface{}, ent *Entity) error { + pls, err := newStructPLS(dst) + if err != nil { + return err + } + + // Try and load key. + keyField := pls.codec.Match(keyFieldName) + if keyField != nil && ent.Key != nil { + pls.v.FieldByIndex(keyField.Index).Set(reflect.ValueOf(ent.Key)) + } + + // Load properties. + return pls.Load(ent.Properties) +} + +func (s structPLS) Load(props []Property) error { + var fieldName, errReason string + var l propertyLoader + + prev := make(map[string]struct{}) + for _, p := range props { + if errStr := l.load(s.codec, s.v, p, prev); errStr != "" { + // We don't return early, as we try to load as many properties as possible. + // It is valid to load an entity into a struct that cannot fully represent it. + // That case returns an error, but the caller is free to ignore it. + fieldName, errReason = p.Name, errStr + } + } + if errReason != "" { + return &ErrFieldMismatch{ + StructType: s.v.Type(), + FieldName: fieldName, + Reason: errReason, + } + } + return nil +} + +func protoToEntity(src *pb.Entity) (*Entity, error) { + props := make([]Property, 0, len(src.Properties)) + for name, val := range src.Properties { + v, err := propToValue(val) + if err != nil { + return nil, err + } + props = append(props, Property{ + Name: name, + Value: v, + NoIndex: val.ExcludeFromIndexes, + }) + } + var key *Key + if src.Key != nil { + // Ignore any error, since nested entity values + // are allowed to have an invalid key. + key, _ = protoToKey(src.Key) + } + + return &Entity{key, props}, nil +} + +// propToValue returns a Go value that represents the PropertyValue. For +// example, a TimestampValue becomes a time.Time. +func propToValue(v *pb.Value) (interface{}, error) { + switch v := v.ValueType.(type) { + case *pb.Value_NullValue: + return nil, nil + case *pb.Value_BooleanValue: + return v.BooleanValue, nil + case *pb.Value_IntegerValue: + return v.IntegerValue, nil + case *pb.Value_DoubleValue: + return v.DoubleValue, nil + case *pb.Value_TimestampValue: + return time.Unix(v.TimestampValue.Seconds, int64(v.TimestampValue.Nanos)), nil + case *pb.Value_KeyValue: + return protoToKey(v.KeyValue) + case *pb.Value_StringValue: + return v.StringValue, nil + case *pb.Value_BlobValue: + return []byte(v.BlobValue), nil + case *pb.Value_GeoPointValue: + return GeoPoint{Lat: v.GeoPointValue.Latitude, Lng: v.GeoPointValue.Longitude}, nil + case *pb.Value_EntityValue: + return protoToEntity(v.EntityValue) + case *pb.Value_ArrayValue: + arr := make([]interface{}, 0, len(v.ArrayValue.Values)) + for _, v := range v.ArrayValue.Values { + vv, err := propToValue(v) + if err != nil { + return nil, err + } + arr = append(arr, vv) + } + return arr, nil + default: + return nil, nil + } +} diff --git a/vendor/cloud.google.com/go/datastore/mutation.go b/vendor/cloud.google.com/go/datastore/mutation.go new file mode 100644 index 000000000000..f80f96465395 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/mutation.go @@ -0,0 +1,129 @@ +// Copyright 2018 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 datastore + +import ( + "fmt" + + pb "google.golang.org/genproto/googleapis/datastore/v1" +) + +// A Mutation represents a change to a Datastore entity. +type Mutation struct { + key *Key // needed for transaction PendingKeys and to dedup deletions + mut *pb.Mutation + err error +} + +func (m *Mutation) isDelete() bool { + _, ok := m.mut.Operation.(*pb.Mutation_Delete) + return ok +} + +// NewInsert creates a mutation that will save the entity src into the datastore with +// key k, returning an error if k already exists. +// See Client.Put for valid values of src. +func NewInsert(k *Key, src interface{}) *Mutation { + if !k.valid() { + return &Mutation{err: ErrInvalidKey} + } + p, err := saveEntity(k, src) + if err != nil { + return &Mutation{err: err} + } + return &Mutation{ + key: k, + mut: &pb.Mutation{Operation: &pb.Mutation_Insert{Insert: p}}, + } +} + +// NewUpsert creates a mutation that saves the entity src into the datastore with key +// k, whether or not k exists. See Client.Put for valid values of src. +func NewUpsert(k *Key, src interface{}) *Mutation { + if !k.valid() { + return &Mutation{err: ErrInvalidKey} + } + p, err := saveEntity(k, src) + if err != nil { + return &Mutation{err: err} + } + return &Mutation{ + key: k, + mut: &pb.Mutation{Operation: &pb.Mutation_Upsert{Upsert: p}}, + } +} + +// NewUpdate creates a mutation that replaces the entity in the datastore with key k, +// returning an error if k does not exist. See Client.Put for valid values of src. +func NewUpdate(k *Key, src interface{}) *Mutation { + if !k.valid() { + return &Mutation{err: ErrInvalidKey} + } + if k.Incomplete() { + return &Mutation{err: fmt.Errorf("datastore: can't update the incomplete key: %v", k)} + } + p, err := saveEntity(k, src) + if err != nil { + return &Mutation{err: err} + } + return &Mutation{ + key: k, + mut: &pb.Mutation{Operation: &pb.Mutation_Update{Update: p}}, + } +} + +// NewDelete creates a mutation that deletes the entity with key k. +func NewDelete(k *Key) *Mutation { + if !k.valid() { + return &Mutation{err: ErrInvalidKey} + } + if k.Incomplete() { + return &Mutation{err: fmt.Errorf("datastore: can't delete the incomplete key: %v", k)} + } + return &Mutation{ + key: k, + mut: &pb.Mutation{Operation: &pb.Mutation_Delete{Delete: keyToProto(k)}}, + } +} + +func mutationProtos(muts []*Mutation) ([]*pb.Mutation, error) { + // If any of the mutations have errors, collect and return them. + var merr MultiError + for i, m := range muts { + if m.err != nil { + if merr == nil { + merr = make(MultiError, len(muts)) + } + merr[i] = m.err + } + } + if merr != nil { + return nil, merr + } + var protos []*pb.Mutation + // Collect protos. Remove duplicate deletions (see deleteMutations). + seen := map[string]bool{} + for _, m := range muts { + if m.isDelete() { + ks := m.key.String() + if seen[ks] { + continue + } + seen[ks] = true + } + protos = append(protos, m.mut) + } + return protos, nil +} diff --git a/vendor/cloud.google.com/go/datastore/prop.go b/vendor/cloud.google.com/go/datastore/prop.go new file mode 100644 index 000000000000..645b99a465bc --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/prop.go @@ -0,0 +1,339 @@ +// Copyright 2014 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 datastore + +import ( + "fmt" + "reflect" + "strings" + "unicode" + + "cloud.google.com/go/internal/fields" +) + +// Entities with more than this many indexed properties will not be saved. +const maxIndexedProperties = 20000 + +// Property is a name/value pair plus some metadata. A datastore entity's +// contents are loaded and saved as a sequence of Properties. Each property +// name must be unique within an entity. +type Property struct { + // Name is the property name. + Name string + // Value is the property value. The valid types are: + // - int64 + // - bool + // - string + // - float64 + // - *Key + // - time.Time (retrieved as local time) + // - GeoPoint + // - []byte (up to 1 megabyte in length) + // - *Entity (representing a nested struct) + // Value can also be: + // - []interface{} where each element is one of the above types + // This set is smaller than the set of valid struct field types that the + // datastore can load and save. A Value's type must be explicitly on + // the list above; it is not sufficient for the underlying type to be + // on that list. For example, a Value of "type myInt64 int64" is + // invalid. Smaller-width integers and floats are also invalid. Again, + // this is more restrictive than the set of valid struct field types. + // + // A Value will have an opaque type when loading entities from an index, + // such as via a projection query. Load entities into a struct instead + // of a PropertyLoadSaver when using a projection query. + // + // A Value may also be the nil interface value; this is equivalent to + // Python's None but not directly representable by a Go struct. Loading + // a nil-valued property into a struct will set that field to the zero + // value. + Value interface{} + // NoIndex is whether the datastore cannot index this property. + // If NoIndex is set to false, []byte and string values are limited to + // 1500 bytes. + NoIndex bool +} + +// An Entity is the value type for a nested struct. +// This type is only used for a Property's Value. +type Entity struct { + Key *Key + Properties []Property +} + +// PropertyLoadSaver can be converted from and to a slice of Properties. +type PropertyLoadSaver interface { + Load([]Property) error + Save() ([]Property, error) +} + +// KeyLoader can store a Key. +type KeyLoader interface { + // PropertyLoadSaver is embedded because a KeyLoader + // must also always implement PropertyLoadSaver. + PropertyLoadSaver + LoadKey(k *Key) error +} + +// PropertyList converts a []Property to implement PropertyLoadSaver. +type PropertyList []Property + +var ( + typeOfPropertyLoadSaver = reflect.TypeOf((*PropertyLoadSaver)(nil)).Elem() + typeOfPropertyList = reflect.TypeOf(PropertyList(nil)) +) + +// Load loads all of the provided properties into l. +// It does not first reset *l to an empty slice. +func (l *PropertyList) Load(p []Property) error { + *l = append(*l, p...) + return nil +} + +// Save saves all of l's properties as a slice of Properties. +func (l *PropertyList) Save() ([]Property, error) { + return *l, nil +} + +// validPropertyName returns whether name consists of one or more valid Go +// identifiers joined by ".". +func validPropertyName(name string) bool { + if name == "" { + return false + } + for _, s := range strings.Split(name, ".") { + if s == "" { + return false + } + first := true + for _, c := range s { + if first { + first = false + if c != '_' && !unicode.IsLetter(c) { + return false + } + } else { + if c != '_' && !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + } + return true +} + +// parseTag interprets datastore struct field tags +func parseTag(t reflect.StructTag) (name string, keep bool, other interface{}, err error) { + s := t.Get("datastore") + parts := strings.Split(s, ",") + if parts[0] == "-" && len(parts) == 1 { + return "", false, nil, nil + } + if parts[0] != "" && !validPropertyName(parts[0]) { + err = fmt.Errorf("datastore: struct tag has invalid property name: %q", parts[0]) + return "", false, nil, err + } + + var opts saveOpts + if len(parts) > 1 { + for _, p := range parts[1:] { + switch p { + case "flatten": + opts.flatten = true + case "omitempty": + opts.omitEmpty = true + case "noindex": + opts.noIndex = true + default: + err = fmt.Errorf("datastore: struct tag has invalid option: %q", p) + return "", false, nil, err + } + } + other = opts + } + return parts[0], true, other, nil +} + +func validateType(t reflect.Type) error { + if t.Kind() != reflect.Struct { + return fmt.Errorf("datastore: validate called with non-struct type %s", t) + } + + return validateChildType(t, "", false, false, map[reflect.Type]bool{}) +} + +// validateChildType is a recursion helper func for validateType +func validateChildType(t reflect.Type, fieldName string, flatten, prevSlice bool, prevTypes map[reflect.Type]bool) error { + if prevTypes[t] { + return nil + } + prevTypes[t] = true + + switch t.Kind() { + case reflect.Slice: + if flatten && prevSlice { + return fmt.Errorf("datastore: flattening nested structs leads to a slice of slices: field %q", fieldName) + } + return validateChildType(t.Elem(), fieldName, flatten, true, prevTypes) + case reflect.Struct: + if t == typeOfTime || t == typeOfGeoPoint { + return nil + } + + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + + // If a named field is unexported, ignore it. An anonymous + // unexported field is processed, because it may contain + // exported fields, which are visible. + exported := (f.PkgPath == "") + if !exported && !f.Anonymous { + continue + } + + _, keep, other, err := parseTag(f.Tag) + // Handle error from parseTag now instead of later (in cache.Fields call). + if err != nil { + return err + } + if !keep { + continue + } + if other != nil { + opts := other.(saveOpts) + flatten = flatten || opts.flatten + } + if err := validateChildType(f.Type, f.Name, flatten, prevSlice, prevTypes); err != nil { + return err + } + } + case reflect.Ptr: + if t == typeOfKeyPtr { + return nil + } + return validateChildType(t.Elem(), fieldName, flatten, prevSlice, prevTypes) + } + return nil +} + +// isLeafType determines whether or not a type is a 'leaf type' +// and should not be recursed into, but considered one field. +func isLeafType(t reflect.Type) bool { + return t == typeOfTime || t == typeOfGeoPoint +} + +// structCache collects the structs whose fields have already been calculated. +var structCache = fields.NewCache(parseTag, validateType, isLeafType) + +// structPLS adapts a struct to be a PropertyLoadSaver. +type structPLS struct { + v reflect.Value + codec fields.List +} + +// newStructPLS returns a structPLS, which implements the +// PropertyLoadSaver interface, for the struct pointer p. +func newStructPLS(p interface{}) (*structPLS, error) { + v := reflect.ValueOf(p) + if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { + return nil, ErrInvalidEntityType + } + v = v.Elem() + f, err := structCache.Fields(v.Type()) + if err != nil { + return nil, err + } + return &structPLS{v, f}, nil +} + +// LoadStruct loads the properties from p to dst. +// dst must be a struct pointer. +// +// The values of dst's unmatched struct fields are not modified, +// and matching slice-typed fields are not reset before appending to +// them. In particular, it is recommended to pass a pointer to a zero +// valued struct on each LoadStruct call. +func LoadStruct(dst interface{}, p []Property) error { + x, err := newStructPLS(dst) + if err != nil { + return err + } + return x.Load(p) +} + +// SaveStruct returns the properties from src as a slice of Properties. +// src must be a struct pointer. +func SaveStruct(src interface{}) ([]Property, error) { + x, err := newStructPLS(src) + if err != nil { + return nil, err + } + return x.Save() +} + +// plsForLoad tries to convert v to a PropertyLoadSaver. +// If successful, plsForLoad returns a settable v as a PropertyLoadSaver. +// +// plsForLoad is intended to be used with nested struct fields which +// may implement PropertyLoadSaver. +// +// v must be settable. +func plsForLoad(v reflect.Value) (PropertyLoadSaver, error) { + var nilPtr bool + if v.Kind() == reflect.Ptr && v.IsNil() { + nilPtr = true + v.Set(reflect.New(v.Type().Elem())) + } + + vpls, err := pls(v) + if nilPtr && (vpls == nil || err != nil) { + // unset v + v.Set(reflect.Zero(v.Type())) + } + + return vpls, err +} + +// plsForSave tries to convert v to a PropertyLoadSaver. +// If successful, plsForSave returns v as a PropertyLoadSaver. +// +// plsForSave is intended to be used with nested struct fields which +// may implement PropertyLoadSaver. +// +// v must be settable. +func plsForSave(v reflect.Value) (PropertyLoadSaver, error) { + switch v.Kind() { + case reflect.Ptr, reflect.Slice, reflect.Map, reflect.Interface, reflect.Chan, reflect.Func: + // If v is nil, return early. v contains no data to save. + if v.IsNil() { + return nil, nil + } + } + + return pls(v) +} + +func pls(v reflect.Value) (PropertyLoadSaver, error) { + if v.Kind() != reflect.Ptr { + if _, ok := v.Interface().(PropertyLoadSaver); ok { + return nil, fmt.Errorf("datastore: PropertyLoadSaver methods must be implemented on a pointer to %T", v.Interface()) + } + + v = v.Addr() + } + + vpls, _ := v.Interface().(PropertyLoadSaver) + return vpls, nil +} diff --git a/vendor/cloud.google.com/go/datastore/query.go b/vendor/cloud.google.com/go/datastore/query.go new file mode 100644 index 000000000000..5851662d66db --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/query.go @@ -0,0 +1,786 @@ +// Copyright 2014 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 datastore + +import ( + "context" + "encoding/base64" + "errors" + "fmt" + "math" + "reflect" + "strconv" + "strings" + + "cloud.google.com/go/internal/trace" + wrapperspb "github.com/golang/protobuf/ptypes/wrappers" + "google.golang.org/api/iterator" + pb "google.golang.org/genproto/googleapis/datastore/v1" +) + +type operator int + +const ( + lessThan operator = iota + 1 + lessEq + equal + greaterEq + greaterThan + + keyFieldName = "__key__" +) + +var operatorToProto = map[operator]pb.PropertyFilter_Operator{ + lessThan: pb.PropertyFilter_LESS_THAN, + lessEq: pb.PropertyFilter_LESS_THAN_OR_EQUAL, + equal: pb.PropertyFilter_EQUAL, + greaterEq: pb.PropertyFilter_GREATER_THAN_OR_EQUAL, + greaterThan: pb.PropertyFilter_GREATER_THAN, +} + +// filter is a conditional filter on query results. +type filter struct { + FieldName string + Op operator + Value interface{} +} + +type sortDirection bool + +const ( + ascending sortDirection = false + descending sortDirection = true +) + +var sortDirectionToProto = map[sortDirection]pb.PropertyOrder_Direction{ + ascending: pb.PropertyOrder_ASCENDING, + descending: pb.PropertyOrder_DESCENDING, +} + +// order is a sort order on query results. +type order struct { + FieldName string + Direction sortDirection +} + +// NewQuery creates a new Query for a specific entity kind. +// +// An empty kind means to return all entities, including entities created and +// managed by other App Engine features, and is called a kindless query. +// Kindless queries cannot include filters or sort orders on property values. +func NewQuery(kind string) *Query { + return &Query{ + kind: kind, + limit: -1, + } +} + +// Query represents a datastore query. +type Query struct { + kind string + ancestor *Key + filter []filter + order []order + projection []string + + distinct bool + distinctOn []string + keysOnly bool + eventual bool + limit int32 + offset int32 + start []byte + end []byte + + namespace string + + trans *Transaction + + err error +} + +func (q *Query) clone() *Query { + x := *q + // Copy the contents of the slice-typed fields to a new backing store. + if len(q.filter) > 0 { + x.filter = make([]filter, len(q.filter)) + copy(x.filter, q.filter) + } + if len(q.order) > 0 { + x.order = make([]order, len(q.order)) + copy(x.order, q.order) + } + return &x +} + +// Ancestor returns a derivative query with an ancestor filter. +// The ancestor should not be nil. +func (q *Query) Ancestor(ancestor *Key) *Query { + q = q.clone() + if ancestor == nil { + q.err = errors.New("datastore: nil query ancestor") + return q + } + q.ancestor = ancestor + return q +} + +// EventualConsistency returns a derivative query that returns eventually +// consistent results. +// It only has an effect on ancestor queries. +func (q *Query) EventualConsistency() *Query { + q = q.clone() + q.eventual = true + return q +} + +// Namespace returns a derivative query that is associated with the given +// namespace. +// +// A namespace may be used to partition data for multi-tenant applications. +// For details, see https://cloud.google.com/datastore/docs/concepts/multitenancy. +func (q *Query) Namespace(ns string) *Query { + q = q.clone() + q.namespace = ns + return q +} + +// Transaction returns a derivative query that is associated with the given +// transaction. +// +// All reads performed as part of the transaction will come from a single +// consistent snapshot. Furthermore, if the transaction is set to a +// serializable isolation level, another transaction cannot concurrently modify +// the data that is read or modified by this transaction. +func (q *Query) Transaction(t *Transaction) *Query { + q = q.clone() + q.trans = t + return q +} + +// Filter returns a derivative query with a field-based filter. +// The filterStr argument must be a field name followed by optional space, +// followed by an operator, one of ">", "<", ">=", "<=", or "=". +// Fields are compared against the provided value using the operator. +// Multiple filters are AND'ed together. +// Field names which contain spaces, quote marks, or operator characters +// should be passed as quoted Go string literals as returned by strconv.Quote +// or the fmt package's %q verb. +func (q *Query) Filter(filterStr string, value interface{}) *Query { + q = q.clone() + filterStr = strings.TrimSpace(filterStr) + if filterStr == "" { + q.err = fmt.Errorf("datastore: invalid filter %q", filterStr) + return q + } + f := filter{ + FieldName: strings.TrimRight(filterStr, " ><=!"), + Value: value, + } + switch op := strings.TrimSpace(filterStr[len(f.FieldName):]); op { + case "<=": + f.Op = lessEq + case ">=": + f.Op = greaterEq + case "<": + f.Op = lessThan + case ">": + f.Op = greaterThan + case "=": + f.Op = equal + default: + q.err = fmt.Errorf("datastore: invalid operator %q in filter %q", op, filterStr) + return q + } + var err error + f.FieldName, err = unquote(f.FieldName) + if err != nil { + q.err = fmt.Errorf("datastore: invalid syntax for quoted field name %q", f.FieldName) + return q + } + q.filter = append(q.filter, f) + return q +} + +// Order returns a derivative query with a field-based sort order. Orders are +// applied in the order they are added. The default order is ascending; to sort +// in descending order prefix the fieldName with a minus sign (-). +// Field names which contain spaces, quote marks, or the minus sign +// should be passed as quoted Go string literals as returned by strconv.Quote +// or the fmt package's %q verb. +func (q *Query) Order(fieldName string) *Query { + q = q.clone() + fieldName, dir := strings.TrimSpace(fieldName), ascending + if strings.HasPrefix(fieldName, "-") { + fieldName, dir = strings.TrimSpace(fieldName[1:]), descending + } else if strings.HasPrefix(fieldName, "+") { + q.err = fmt.Errorf("datastore: invalid order: %q", fieldName) + return q + } + fieldName, err := unquote(fieldName) + if err != nil { + q.err = fmt.Errorf("datastore: invalid syntax for quoted field name %q", fieldName) + return q + } + if fieldName == "" { + q.err = errors.New("datastore: empty order") + return q + } + q.order = append(q.order, order{ + Direction: dir, + FieldName: fieldName, + }) + return q +} + +// unquote optionally interprets s as a double-quoted or backquoted Go +// string literal if it begins with the relevant character. +func unquote(s string) (string, error) { + if s == "" || (s[0] != '`' && s[0] != '"') { + return s, nil + } + return strconv.Unquote(s) +} + +// Project returns a derivative query that yields only the given fields. It +// cannot be used with KeysOnly. +func (q *Query) Project(fieldNames ...string) *Query { + q = q.clone() + q.projection = append([]string(nil), fieldNames...) + return q +} + +// Distinct returns a derivative query that yields de-duplicated entities with +// respect to the set of projected fields. It is only used for projection +// queries. Distinct cannot be used with DistinctOn. +func (q *Query) Distinct() *Query { + q = q.clone() + q.distinct = true + return q +} + +// DistinctOn returns a derivative query that yields de-duplicated entities with +// respect to the set of the specified fields. It is only used for projection +// queries. The field list should be a subset of the projected field list. +// DistinctOn cannot be used with Distinct. +func (q *Query) DistinctOn(fieldNames ...string) *Query { + q = q.clone() + q.distinctOn = fieldNames + return q +} + +// KeysOnly returns a derivative query that yields only keys, not keys and +// entities. It cannot be used with projection queries. +func (q *Query) KeysOnly() *Query { + q = q.clone() + q.keysOnly = true + return q +} + +// Limit returns a derivative query that has a limit on the number of results +// returned. A negative value means unlimited. +func (q *Query) Limit(limit int) *Query { + q = q.clone() + if limit < math.MinInt32 || limit > math.MaxInt32 { + q.err = errors.New("datastore: query limit overflow") + return q + } + q.limit = int32(limit) + return q +} + +// Offset returns a derivative query that has an offset of how many keys to +// skip over before returning results. A negative value is invalid. +func (q *Query) Offset(offset int) *Query { + q = q.clone() + if offset < 0 { + q.err = errors.New("datastore: negative query offset") + return q + } + if offset > math.MaxInt32 { + q.err = errors.New("datastore: query offset overflow") + return q + } + q.offset = int32(offset) + return q +} + +// Start returns a derivative query with the given start point. +func (q *Query) Start(c Cursor) *Query { + q = q.clone() + q.start = c.cc + return q +} + +// End returns a derivative query with the given end point. +func (q *Query) End(c Cursor) *Query { + q = q.clone() + q.end = c.cc + return q +} + +// toProto converts the query to a protocol buffer. +func (q *Query) toProto(req *pb.RunQueryRequest) error { + if len(q.projection) != 0 && q.keysOnly { + return errors.New("datastore: query cannot both project and be keys-only") + } + if len(q.distinctOn) != 0 && q.distinct { + return errors.New("datastore: query cannot be both distinct and distinct-on") + } + dst := &pb.Query{} + if q.kind != "" { + dst.Kind = []*pb.KindExpression{{Name: q.kind}} + } + if q.projection != nil { + for _, propertyName := range q.projection { + dst.Projection = append(dst.Projection, &pb.Projection{Property: &pb.PropertyReference{Name: propertyName}}) + } + + for _, propertyName := range q.distinctOn { + dst.DistinctOn = append(dst.DistinctOn, &pb.PropertyReference{Name: propertyName}) + } + + if q.distinct { + for _, propertyName := range q.projection { + dst.DistinctOn = append(dst.DistinctOn, &pb.PropertyReference{Name: propertyName}) + } + } + } + if q.keysOnly { + dst.Projection = []*pb.Projection{{Property: &pb.PropertyReference{Name: keyFieldName}}} + } + + var filters []*pb.Filter + for _, qf := range q.filter { + if qf.FieldName == "" { + return errors.New("datastore: empty query filter field name") + } + v, err := interfaceToProto(reflect.ValueOf(qf.Value).Interface(), false) + if err != nil { + return fmt.Errorf("datastore: bad query filter value type: %v", err) + } + op, ok := operatorToProto[qf.Op] + if !ok { + return errors.New("datastore: unknown query filter operator") + } + xf := &pb.PropertyFilter{ + Op: op, + Property: &pb.PropertyReference{Name: qf.FieldName}, + Value: v, + } + filters = append(filters, &pb.Filter{ + FilterType: &pb.Filter_PropertyFilter{PropertyFilter: xf}, + }) + } + + if q.ancestor != nil { + filters = append(filters, &pb.Filter{ + FilterType: &pb.Filter_PropertyFilter{PropertyFilter: &pb.PropertyFilter{ + Property: &pb.PropertyReference{Name: keyFieldName}, + Op: pb.PropertyFilter_HAS_ANCESTOR, + Value: &pb.Value{ValueType: &pb.Value_KeyValue{KeyValue: keyToProto(q.ancestor)}}, + }}}) + } + + if len(filters) == 1 { + dst.Filter = filters[0] + } else if len(filters) > 1 { + dst.Filter = &pb.Filter{FilterType: &pb.Filter_CompositeFilter{CompositeFilter: &pb.CompositeFilter{ + Op: pb.CompositeFilter_AND, + Filters: filters, + }}} + } + + for _, qo := range q.order { + if qo.FieldName == "" { + return errors.New("datastore: empty query order field name") + } + xo := &pb.PropertyOrder{ + Property: &pb.PropertyReference{Name: qo.FieldName}, + Direction: sortDirectionToProto[qo.Direction], + } + dst.Order = append(dst.Order, xo) + } + if q.limit >= 0 { + dst.Limit = &wrapperspb.Int32Value{Value: q.limit} + } + dst.Offset = q.offset + dst.StartCursor = q.start + dst.EndCursor = q.end + + if t := q.trans; t != nil { + if t.id == nil { + return errExpiredTransaction + } + if q.eventual { + return errors.New("datastore: cannot use EventualConsistency query in a transaction") + } + req.ReadOptions = &pb.ReadOptions{ + ConsistencyType: &pb.ReadOptions_Transaction{Transaction: t.id}, + } + } + + if q.eventual { + req.ReadOptions = &pb.ReadOptions{ConsistencyType: &pb.ReadOptions_ReadConsistency_{ReadConsistency: pb.ReadOptions_EVENTUAL}} + } + + req.QueryType = &pb.RunQueryRequest_Query{Query: dst} + return nil +} + +// Count returns the number of results for the given query. +// +// The running time and number of API calls made by Count scale linearly with +// the sum of the query's offset and limit. Unless the result count is +// expected to be small, it is best to specify a limit; otherwise Count will +// continue until it finishes counting or the provided context expires. +func (c *Client) Count(ctx context.Context, q *Query) (n int, err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.Query.Count") + defer func() { trace.EndSpan(ctx, err) }() + + // Check that the query is well-formed. + if q.err != nil { + return 0, q.err + } + + // Create a copy of the query, with keysOnly true (if we're not a projection, + // since the two are incompatible). + newQ := q.clone() + newQ.keysOnly = len(newQ.projection) == 0 + + // Create an iterator and use it to walk through the batches of results + // directly. + it := c.Run(ctx, newQ) + for { + err := it.nextBatch() + if err == iterator.Done { + return n, nil + } + if err != nil { + return 0, err + } + n += len(it.results) + } +} + +// GetAll runs the provided query in the given context and returns all keys +// that match that query, as well as appending the values to dst. +// +// dst must have type *[]S or *[]*S or *[]P, for some struct type S or some non- +// interface, non-pointer type P such that P or *P implements PropertyLoadSaver. +// +// As a special case, *PropertyList is an invalid type for dst, even though a +// PropertyList is a slice of structs. It is treated as invalid to avoid being +// mistakenly passed when *[]PropertyList was intended. +// +// The keys returned by GetAll will be in a 1-1 correspondence with the entities +// added to dst. +// +// If q is a ``keys-only'' query, GetAll ignores dst and only returns the keys. +// +// The running time and number of API calls made by GetAll scale linearly with +// with the sum of the query's offset and limit. Unless the result count is +// expected to be small, it is best to specify a limit; otherwise GetAll will +// continue until it finishes collecting results or the provided context +// expires. +func (c *Client) GetAll(ctx context.Context, q *Query, dst interface{}) (keys []*Key, err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.Query.GetAll") + defer func() { trace.EndSpan(ctx, err) }() + + var ( + dv reflect.Value + mat multiArgType + elemType reflect.Type + errFieldMismatch error + ) + if !q.keysOnly { + dv = reflect.ValueOf(dst) + if dv.Kind() != reflect.Ptr || dv.IsNil() { + return nil, ErrInvalidEntityType + } + dv = dv.Elem() + mat, elemType = checkMultiArg(dv) + if mat == multiArgTypeInvalid || mat == multiArgTypeInterface { + return nil, ErrInvalidEntityType + } + } + + for t := c.Run(ctx, q); ; { + k, e, err := t.next() + if err == iterator.Done { + break + } + if err != nil { + return keys, err + } + if !q.keysOnly { + ev := reflect.New(elemType) + if elemType.Kind() == reflect.Map { + // This is a special case. The zero values of a map type are + // not immediately useful; they have to be make'd. + // + // Funcs and channels are similar, in that a zero value is not useful, + // but even a freshly make'd channel isn't useful: there's no fixed + // channel buffer size that is always going to be large enough, and + // there's no goroutine to drain the other end. Theoretically, these + // types could be supported, for example by sniffing for a constructor + // method or requiring prior registration, but for now it's not a + // frequent enough concern to be worth it. Programmers can work around + // it by explicitly using Iterator.Next instead of the Query.GetAll + // convenience method. + x := reflect.MakeMap(elemType) + ev.Elem().Set(x) + } + if err = loadEntityProto(ev.Interface(), e); err != nil { + if _, ok := err.(*ErrFieldMismatch); ok { + // We continue loading entities even in the face of field mismatch errors. + // If we encounter any other error, that other error is returned. Otherwise, + // an ErrFieldMismatch is returned. + errFieldMismatch = err + } else { + return keys, err + } + } + if mat != multiArgTypeStructPtr { + ev = ev.Elem() + } + dv.Set(reflect.Append(dv, ev)) + } + keys = append(keys, k) + } + return keys, errFieldMismatch +} + +// Run runs the given query in the given context. +func (c *Client) Run(ctx context.Context, q *Query) *Iterator { + if q.err != nil { + return &Iterator{err: q.err} + } + t := &Iterator{ + ctx: ctx, + client: c, + limit: q.limit, + offset: q.offset, + keysOnly: q.keysOnly, + pageCursor: q.start, + entityCursor: q.start, + req: &pb.RunQueryRequest{ + ProjectId: c.dataset, + }, + } + + if q.namespace != "" { + t.req.PartitionId = &pb.PartitionId{ + NamespaceId: q.namespace, + } + } + + if err := q.toProto(t.req); err != nil { + t.err = err + } + return t +} + +// Iterator is the result of running a query. +type Iterator struct { + ctx context.Context + client *Client + err error + + // results is the list of EntityResults still to be iterated over from the + // most recent API call. It will be nil if no requests have yet been issued. + results []*pb.EntityResult + // req is the request to send. It may be modified and used multiple times. + req *pb.RunQueryRequest + + // limit is the limit on the number of results this iterator should return. + // The zero value is used to prevent further fetches from the server. + // A negative value means unlimited. + limit int32 + // offset is the number of results that still need to be skipped. + offset int32 + // keysOnly records whether the query was keys-only (skip entity loading). + keysOnly bool + + // pageCursor is the compiled cursor for the next batch/page of result. + // TODO(djd): Can we delete this in favour of paging with the last + // entityCursor from each batch? + pageCursor []byte + // entityCursor is the compiled cursor of the next result. + entityCursor []byte +} + +// Next returns the key of the next result. When there are no more results, +// iterator.Done is returned as the error. +// +// If the query is not keys only and dst is non-nil, it also loads the entity +// stored for that key into the struct pointer or PropertyLoadSaver dst, with +// the same semantics and possible errors as for the Get function. +func (t *Iterator) Next(dst interface{}) (k *Key, err error) { + k, e, err := t.next() + if err != nil { + return nil, err + } + if dst != nil && !t.keysOnly { + err = loadEntityProto(dst, e) + } + return k, err +} + +func (t *Iterator) next() (*Key, *pb.Entity, error) { + // Fetch additional batches while there are no more results. + for t.err == nil && len(t.results) == 0 { + t.err = t.nextBatch() + } + if t.err != nil { + return nil, nil, t.err + } + + // Extract the next result, update cursors, and parse the entity's key. + e := t.results[0] + t.results = t.results[1:] + t.entityCursor = e.Cursor + if len(t.results) == 0 { + t.entityCursor = t.pageCursor // At the end of the batch. + } + if e.Entity.Key == nil { + return nil, nil, errors.New("datastore: internal error: server did not return a key") + } + k, err := protoToKey(e.Entity.Key) + if err != nil || k.Incomplete() { + return nil, nil, errors.New("datastore: internal error: server returned an invalid key") + } + + return k, e.Entity, nil +} + +// nextBatch makes a single call to the server for a batch of results. +func (t *Iterator) nextBatch() error { + if t.err != nil { + return t.err + } + + if t.limit == 0 { + return iterator.Done // Short-circuits the zero-item response. + } + + // Adjust the query with the latest start cursor, limit and offset. + q := t.req.GetQuery() + q.StartCursor = t.pageCursor + q.Offset = t.offset + if t.limit >= 0 { + q.Limit = &wrapperspb.Int32Value{Value: t.limit} + } else { + q.Limit = nil + } + + // Run the query. + resp, err := t.client.client.RunQuery(t.ctx, t.req) + if err != nil { + return err + } + + // Adjust any offset from skipped results. + skip := resp.Batch.SkippedResults + if skip < 0 { + return errors.New("datastore: internal error: negative number of skipped_results") + } + t.offset -= skip + if t.offset < 0 { + return errors.New("datastore: internal error: query skipped too many results") + } + if t.offset > 0 && len(resp.Batch.EntityResults) > 0 { + return errors.New("datastore: internal error: query returned results before requested offset") + } + + // Adjust the limit. + if t.limit >= 0 { + t.limit -= int32(len(resp.Batch.EntityResults)) + if t.limit < 0 { + return errors.New("datastore: internal error: query returned more results than the limit") + } + } + + // If there are no more results available, set limit to zero to prevent + // further fetches. Otherwise, check that there is a next page cursor available. + if resp.Batch.MoreResults != pb.QueryResultBatch_NOT_FINISHED { + t.limit = 0 + } else if resp.Batch.EndCursor == nil { + return errors.New("datastore: internal error: server did not return a cursor") + } + + // Update cursors. + // If any results were skipped, use the SkippedCursor as the next entity cursor. + if skip > 0 { + t.entityCursor = resp.Batch.SkippedCursor + } else { + t.entityCursor = q.StartCursor + } + t.pageCursor = resp.Batch.EndCursor + + t.results = resp.Batch.EntityResults + return nil +} + +// Cursor returns a cursor for the iterator's current location. +func (t *Iterator) Cursor() (c Cursor, err error) { + t.ctx = trace.StartSpan(t.ctx, "cloud.google.com/go/datastore.Query.Cursor") + defer func() { trace.EndSpan(t.ctx, err) }() + + // If there is still an offset, we need to the skip those results first. + for t.err == nil && t.offset > 0 { + t.err = t.nextBatch() + } + + if t.err != nil && t.err != iterator.Done { + return Cursor{}, t.err + } + + return Cursor{t.entityCursor}, nil +} + +// Cursor is an iterator's position. It can be converted to and from an opaque +// string. A cursor can be used from different HTTP requests, but only with a +// query with the same kind, ancestor, filter and order constraints. +// +// The zero Cursor can be used to indicate that there is no start and/or end +// constraint for a query. +type Cursor struct { + cc []byte +} + +// String returns a base-64 string representation of a cursor. +func (c Cursor) String() string { + if c.cc == nil { + return "" + } + + return strings.TrimRight(base64.URLEncoding.EncodeToString(c.cc), "=") +} + +// DecodeCursor decodes a cursor from its base-64 string representation. +func DecodeCursor(s string) (Cursor, error) { + if s == "" { + return Cursor{}, nil + } + if n := len(s) % 4; n != 0 { + s += strings.Repeat("=", 4-n) + } + b, err := base64.URLEncoding.DecodeString(s) + if err != nil { + return Cursor{}, err + } + return Cursor{b}, nil +} diff --git a/vendor/cloud.google.com/go/datastore/save.go b/vendor/cloud.google.com/go/datastore/save.go new file mode 100644 index 000000000000..d92aeff5ae18 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/save.go @@ -0,0 +1,484 @@ +// Copyright 2014 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 datastore + +import ( + "errors" + "fmt" + "reflect" + "time" + "unicode/utf8" + + timepb "github.com/golang/protobuf/ptypes/timestamp" + pb "google.golang.org/genproto/googleapis/datastore/v1" + llpb "google.golang.org/genproto/googleapis/type/latlng" +) + +type saveOpts struct { + noIndex bool + flatten bool + omitEmpty bool +} + +// saveEntity saves an EntityProto into a PropertyLoadSaver or struct pointer. +func saveEntity(key *Key, src interface{}) (*pb.Entity, error) { + var err error + var props []Property + if e, ok := src.(PropertyLoadSaver); ok { + props, err = e.Save() + } else { + props, err = SaveStruct(src) + } + if err != nil { + return nil, err + } + return propertiesToProto(key, props) +} + +// reflectFieldSave extracts the underlying value of v by reflection, +// and tries to extract a Property that'll be appended to props. +func reflectFieldSave(props *[]Property, p Property, name string, opts saveOpts, v reflect.Value) error { + switch x := v.Interface().(type) { + case *Key, time.Time, GeoPoint: + p.Value = x + default: + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + p.Value = v.Int() + case reflect.Bool: + p.Value = v.Bool() + case reflect.String: + p.Value = v.String() + case reflect.Float32, reflect.Float64: + p.Value = v.Float() + + case reflect.Interface: + // Extract the interface's underlying value and then retry the save. + // See issue https://github.com/googleapis/google-cloud-go/issues/1474. + v = v.Elem() + return reflectFieldSave(props, p, name, opts, v) + + case reflect.Slice: + if v.Type().Elem().Kind() == reflect.Uint8 { + p.Value = v.Bytes() + } else { + return saveSliceProperty(props, name, opts, v) + } + case reflect.Ptr: + if isValidPointerType(v.Type().Elem()) { + if v.IsNil() { + // Nil pointer becomes a nil property value (unless omitempty, handled above). + p.Value = nil + *props = append(*props, p) + return nil + } + // When we recurse on the derefenced pointer, omitempty no longer applies: + // we already know the pointer is not empty, it doesn't matter if its referent + // is empty or not. + opts.omitEmpty = false + return saveStructProperty(props, name, opts, v.Elem()) + } + if v.Type().Elem().Kind() != reflect.Struct { + return fmt.Errorf("datastore: unsupported struct field type: %s", v.Type()) + } + // Pointer to struct is a special case. + if v.IsNil() { + return nil + } + v = v.Elem() + fallthrough + case reflect.Struct: + if !v.CanAddr() { + return fmt.Errorf("datastore: unsupported struct field: value is unaddressable") + } + vi := v.Addr().Interface() + + sub, err := newStructPLS(vi) + if err != nil { + return fmt.Errorf("datastore: unsupported struct field: %v", err) + } + + if opts.flatten { + return sub.save(props, opts, name+".") + } + + var subProps []Property + err = sub.save(&subProps, opts, "") + if err != nil { + return err + } + subKey, err := sub.key(v) + if err != nil { + return err + } + + p.Value = &Entity{ + Key: subKey, + Properties: subProps, + } + } + } + + if p.Value == nil { + return fmt.Errorf("datastore: unsupported struct field type: %v", v.Type()) + } + *props = append(*props, p) + return nil +} + +// TODO(djd): Convert this and below to return ([]Property, error). +func saveStructProperty(props *[]Property, name string, opts saveOpts, v reflect.Value) error { + p := Property{ + Name: name, + NoIndex: opts.noIndex, + } + + if opts.omitEmpty && isEmptyValue(v) { + return nil + } + + // First check if field type implements PLS. If so, use PLS to + // save. + ok, err := plsFieldSave(props, p, name, opts, v) + if err != nil { + return err + } + if ok { + return nil + } + + return reflectFieldSave(props, p, name, opts, v) +} + +// plsFieldSave first tries to converts v's value to a PLS, then v's addressed +// value to a PLS. If neither succeeds, plsFieldSave returns false for first return +// value. +// If v is successfully converted to a PLS, plsFieldSave will then add the +// Value to property p by way of the PLS's Save method, and append it to props. +// +// If the flatten option is present in opts, name must be prepended to each property's +// name before it is appended to props. Eg. if name were "A" and a subproperty's name +// were "B", the resultant name of the property to be appended to props would be "A.B". +func plsFieldSave(props *[]Property, p Property, name string, opts saveOpts, v reflect.Value) (ok bool, err error) { + vpls, err := plsForSave(v) + if err != nil { + return false, err + } + + if vpls == nil { + return false, nil + } + + subProps, err := vpls.Save() + if err != nil { + return true, err + } + + if opts.flatten { + for _, subp := range subProps { + subp.Name = name + "." + subp.Name + *props = append(*props, subp) + } + return true, nil + } + + p.Value = &Entity{Properties: subProps} + *props = append(*props, p) + + return true, nil +} + +// key extracts the *Key struct field from struct v based on the structCodec of s. +func (s structPLS) key(v reflect.Value) (*Key, error) { + if v.Kind() != reflect.Struct { + return nil, errors.New("datastore: cannot save key of non-struct type") + } + + keyField := s.codec.Match(keyFieldName) + + if keyField == nil { + return nil, nil + } + + f := v.FieldByIndex(keyField.Index) + k, ok := f.Interface().(*Key) + if !ok { + return nil, fmt.Errorf("datastore: %s field on struct %T is not a *datastore.Key", keyFieldName, v.Interface()) + } + + return k, nil +} + +func saveSliceProperty(props *[]Property, name string, opts saveOpts, v reflect.Value) error { + // Easy case: if the slice is empty, we're done. + if v.Len() == 0 { + return nil + } + // Work out the properties generated by the first element in the slice. This will + // usually be a single property, but will be more if this is a slice of structs. + var headProps []Property + if err := saveStructProperty(&headProps, name, opts, v.Index(0)); err != nil { + return err + } + + // Convert the first element's properties into slice properties, and + // keep track of the values in a map. + values := make(map[string][]interface{}, len(headProps)) + for _, p := range headProps { + values[p.Name] = append(make([]interface{}, 0, v.Len()), p.Value) + } + + // Find the elements for the subsequent elements. + for i := 1; i < v.Len(); i++ { + elemProps := make([]Property, 0, len(headProps)) + if err := saveStructProperty(&elemProps, name, opts, v.Index(i)); err != nil { + return err + } + for _, p := range elemProps { + v, ok := values[p.Name] + if !ok { + return fmt.Errorf("datastore: unexpected property %q in elem %d of slice", p.Name, i) + } + values[p.Name] = append(v, p.Value) + } + } + + // Convert to the final properties. + for _, p := range headProps { + p.Value = values[p.Name] + *props = append(*props, p) + } + return nil +} + +func (s structPLS) Save() ([]Property, error) { + var props []Property + if err := s.save(&props, saveOpts{}, ""); err != nil { + return nil, err + } + return props, nil +} + +func (s structPLS) save(props *[]Property, opts saveOpts, prefix string) error { + for _, f := range s.codec { + name := prefix + f.Name + v := getField(s.v, f.Index) + if !v.IsValid() || !v.CanSet() { + continue + } + + var tagOpts saveOpts + if f.ParsedTag != nil { + tagOpts = f.ParsedTag.(saveOpts) + } + + var opts1 saveOpts + opts1.noIndex = opts.noIndex || tagOpts.noIndex + opts1.flatten = opts.flatten || tagOpts.flatten + opts1.omitEmpty = tagOpts.omitEmpty // don't propagate + if err := saveStructProperty(props, name, opts1, v); err != nil { + return err + } + } + return nil +} + +// getField returns the field from v at the given index path. +// If it encounters a nil-valued field in the path, getField +// stops and returns a zero-valued reflect.Value, preventing the +// panic that would have been caused by reflect's FieldByIndex. +func getField(v reflect.Value, index []int) reflect.Value { + var zero reflect.Value + if v.Type().Kind() != reflect.Struct { + return zero + } + + for _, i := range index { + if v.Kind() == reflect.Ptr && v.Type().Elem().Kind() == reflect.Struct { + if v.IsNil() { + return zero + } + v = v.Elem() + } + v = v.Field(i) + } + return v +} + +func propertiesToProto(key *Key, props []Property) (*pb.Entity, error) { + e := &pb.Entity{ + Key: keyToProto(key), + Properties: map[string]*pb.Value{}, + } + indexedProps := 0 + for _, p := range props { + // Do not send a Key value a field to datastore. + if p.Name == keyFieldName { + continue + } + + val, err := interfaceToProto(p.Value, p.NoIndex) + if err != nil { + return nil, fmt.Errorf("datastore: %v for a Property with Name %q", err, p.Name) + } + if !p.NoIndex { + rVal := reflect.ValueOf(p.Value) + if rVal.Kind() == reflect.Slice && rVal.Type().Elem().Kind() != reflect.Uint8 { + indexedProps += rVal.Len() + } else { + indexedProps++ + } + } + if indexedProps > maxIndexedProperties { + return nil, errors.New("datastore: too many indexed properties") + } + + if _, ok := e.Properties[p.Name]; ok { + return nil, fmt.Errorf("datastore: duplicate Property with Name %q", p.Name) + } + e.Properties[p.Name] = val + } + return e, nil +} + +func interfaceToProto(iv interface{}, noIndex bool) (*pb.Value, error) { + val := &pb.Value{ExcludeFromIndexes: noIndex} + switch v := iv.(type) { + case int: + val.ValueType = &pb.Value_IntegerValue{IntegerValue: int64(v)} + case int32: + val.ValueType = &pb.Value_IntegerValue{IntegerValue: int64(v)} + case int64: + val.ValueType = &pb.Value_IntegerValue{IntegerValue: v} + case bool: + val.ValueType = &pb.Value_BooleanValue{BooleanValue: v} + case string: + if len(v) > 1500 && !noIndex { + return nil, errors.New("string property too long to index") + } + if !utf8.ValidString(v) { + return nil, fmt.Errorf("string is not valid utf8: %q", v) + } + val.ValueType = &pb.Value_StringValue{StringValue: v} + case float32: + val.ValueType = &pb.Value_DoubleValue{DoubleValue: float64(v)} + case float64: + val.ValueType = &pb.Value_DoubleValue{DoubleValue: v} + case *Key: + if v == nil { + val.ValueType = &pb.Value_NullValue{} + } else { + val.ValueType = &pb.Value_KeyValue{KeyValue: keyToProto(v)} + } + case GeoPoint: + if !v.Valid() { + return nil, errors.New("invalid GeoPoint value") + } + val.ValueType = &pb.Value_GeoPointValue{GeoPointValue: &llpb.LatLng{ + Latitude: v.Lat, + Longitude: v.Lng, + }} + case time.Time: + if v.Before(minTime) || v.After(maxTime) { + return nil, errors.New("time value out of range") + } + val.ValueType = &pb.Value_TimestampValue{TimestampValue: &timepb.Timestamp{ + Seconds: v.Unix(), + Nanos: int32(v.Nanosecond()), + }} + case []byte: + if len(v) > 1500 && !noIndex { + return nil, errors.New("[]byte property too long to index") + } + val.ValueType = &pb.Value_BlobValue{BlobValue: v} + case *Entity: + e, err := propertiesToProto(v.Key, v.Properties) + if err != nil { + return nil, err + } + val.ValueType = &pb.Value_EntityValue{EntityValue: e} + case []interface{}: + arr := make([]*pb.Value, 0, len(v)) + for i, v := range v { + elem, err := interfaceToProto(v, noIndex) + if err != nil { + return nil, fmt.Errorf("%v at index %d", err, i) + } + arr = append(arr, elem) + } + val.ValueType = &pb.Value_ArrayValue{ArrayValue: &pb.ArrayValue{Values: arr}} + // ArrayValues have ExcludeFromIndexes set on the individual items, rather + // than the top-level value. + val.ExcludeFromIndexes = false + default: + rv := reflect.ValueOf(iv) + if !rv.IsValid() { + val.ValueType = &pb.Value_NullValue{} + } else if rv.Kind() == reflect.Ptr { // non-nil pointer: dereference + if rv.IsNil() { + val.ValueType = &pb.Value_NullValue{} + return val, nil + } + return interfaceToProto(rv.Elem().Interface(), noIndex) + } else { + return nil, fmt.Errorf("invalid Value type %T", iv) + } + } + // TODO(jbd): Support EntityValue. + return val, nil +} + +// isEmptyValue is taken from the encoding/json package in the +// standard library. +func isEmptyValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Struct: + if t, ok := v.Interface().(time.Time); ok { + return t.IsZero() + } + } + return false +} + +// isValidPointerType reports whether a struct field can be a pointer to type t +// for the purposes of saving and loading. +func isValidPointerType(t reflect.Type) bool { + if t == typeOfTime || t == typeOfGeoPoint { + return true + } + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return true + case reflect.Bool: + return true + case reflect.String: + return true + case reflect.Float32, reflect.Float64: + return true + } + return false +} diff --git a/vendor/cloud.google.com/go/datastore/time.go b/vendor/cloud.google.com/go/datastore/time.go new file mode 100644 index 000000000000..da6c780daa77 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/time.go @@ -0,0 +1,36 @@ +// Copyright 2014 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 datastore + +import ( + "math" + "time" +) + +var ( + minTime = time.Unix(int64(math.MinInt64)/1e6, (int64(math.MinInt64)%1e6)*1e3) + maxTime = time.Unix(int64(math.MaxInt64)/1e6, (int64(math.MaxInt64)%1e6)*1e3) +) + +func toUnixMicro(t time.Time) int64 { + // We cannot use t.UnixNano() / 1e3 because we want to handle times more than + // 2^63 nanoseconds (which is about 292 years) away from 1970, and those cannot + // be represented in the numerator of a single int64 divide. + return t.Unix()*1e6 + int64(t.Nanosecond()/1e3) +} + +func fromUnixMicro(t int64) time.Time { + return time.Unix(t/1e6, (t%1e6)*1e3) +} diff --git a/vendor/cloud.google.com/go/datastore/transaction.go b/vendor/cloud.google.com/go/datastore/transaction.go new file mode 100644 index 000000000000..328e58f303f8 --- /dev/null +++ b/vendor/cloud.google.com/go/datastore/transaction.go @@ -0,0 +1,402 @@ +// Copyright 2014 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 datastore + +import ( + "context" + "errors" + + "cloud.google.com/go/internal/trace" + pb "google.golang.org/genproto/googleapis/datastore/v1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ErrConcurrentTransaction is returned when a transaction is rolled back due +// to a conflict with a concurrent transaction. +var ErrConcurrentTransaction = errors.New("datastore: concurrent transaction") + +var errExpiredTransaction = errors.New("datastore: transaction expired") + +type transactionSettings struct { + attempts int + readOnly bool + prevID []byte // ID of the transaction to retry +} + +// newTransactionSettings creates a transactionSettings with a given TransactionOption slice. +// Unconfigured options will be set to default values. +func newTransactionSettings(opts []TransactionOption) *transactionSettings { + s := &transactionSettings{attempts: 3} + for _, o := range opts { + o.apply(s) + } + return s +} + +// TransactionOption configures the way a transaction is executed. +type TransactionOption interface { + apply(*transactionSettings) +} + +// MaxAttempts returns a TransactionOption that overrides the default 3 attempt times. +func MaxAttempts(attempts int) TransactionOption { + return maxAttempts(attempts) +} + +type maxAttempts int + +func (w maxAttempts) apply(s *transactionSettings) { + if w > 0 { + s.attempts = int(w) + } +} + +// ReadOnly is a TransactionOption that marks the transaction as read-only. +var ReadOnly TransactionOption + +func init() { + ReadOnly = readOnly{} +} + +type readOnly struct{} + +func (readOnly) apply(s *transactionSettings) { + s.readOnly = true +} + +// Transaction represents a set of datastore operations to be committed atomically. +// +// Operations are enqueued by calling the Put and Delete methods on Transaction +// (or their Multi-equivalents). These operations are only committed when the +// Commit method is invoked. To ensure consistency, reads must be performed by +// using Transaction's Get method or by using the Transaction method when +// building a query. +// +// A Transaction must be committed or rolled back exactly once. +type Transaction struct { + id []byte + client *Client + ctx context.Context + mutations []*pb.Mutation // The mutations to apply. + pending map[int]*PendingKey // Map from mutation index to incomplete keys pending transaction completion. +} + +// NewTransaction starts a new transaction. +func (c *Client) NewTransaction(ctx context.Context, opts ...TransactionOption) (t *Transaction, err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.NewTransaction") + defer func() { trace.EndSpan(ctx, err) }() + + for _, o := range opts { + if _, ok := o.(maxAttempts); ok { + return nil, errors.New("datastore: NewTransaction does not accept MaxAttempts option") + } + } + return c.newTransaction(ctx, newTransactionSettings(opts)) +} + +func (c *Client) newTransaction(ctx context.Context, s *transactionSettings) (*Transaction, error) { + req := &pb.BeginTransactionRequest{ProjectId: c.dataset} + if s.readOnly { + req.TransactionOptions = &pb.TransactionOptions{ + Mode: &pb.TransactionOptions_ReadOnly_{ReadOnly: &pb.TransactionOptions_ReadOnly{}}, + } + } else if s.prevID != nil { + req.TransactionOptions = &pb.TransactionOptions{ + Mode: &pb.TransactionOptions_ReadWrite_{ReadWrite: &pb.TransactionOptions_ReadWrite{ + PreviousTransaction: s.prevID, + }}, + } + } + resp, err := c.client.BeginTransaction(ctx, req) + if err != nil { + return nil, err + } + return &Transaction{ + id: resp.Transaction, + ctx: ctx, + client: c, + mutations: nil, + pending: make(map[int]*PendingKey), + }, nil +} + +// RunInTransaction runs f in a transaction. f is invoked with a Transaction +// that f should use for all the transaction's datastore operations. +// +// f must not call Commit or Rollback on the provided Transaction. +// +// If f returns nil, RunInTransaction commits the transaction, +// returning the Commit and a nil error if it succeeds. If the commit fails due +// to a conflicting transaction, RunInTransaction retries f with a new +// Transaction. It gives up and returns ErrConcurrentTransaction after three +// failed attempts (or as configured with MaxAttempts). +// +// If f returns non-nil, then the transaction will be rolled back and +// RunInTransaction will return the same error. The function f is not retried. +// +// Note that when f returns, the transaction is not committed. Calling code +// must not assume that any of f's changes have been committed until +// RunInTransaction returns nil. +// +// Since f may be called multiple times, f should usually be idempotent – that +// is, it should have the same result when called multiple times. Note that +// Transaction.Get will append when unmarshalling slice fields, so it is not +// necessarily idempotent. +func (c *Client) RunInTransaction(ctx context.Context, f func(tx *Transaction) error, opts ...TransactionOption) (cmt *Commit, err error) { + ctx = trace.StartSpan(ctx, "cloud.google.com/go/datastore.RunInTransaction") + defer func() { trace.EndSpan(ctx, err) }() + + settings := newTransactionSettings(opts) + for n := 0; n < settings.attempts; n++ { + tx, err := c.newTransaction(ctx, settings) + if err != nil { + return nil, err + } + if err := f(tx); err != nil { + _ = tx.Rollback() + return nil, err + } + if cmt, err := tx.Commit(); err != ErrConcurrentTransaction { + return cmt, err + } + // Pass this transaction's ID to the retry transaction to preserve + // transaction priority. + if !settings.readOnly { + settings.prevID = tx.id + } + } + return nil, ErrConcurrentTransaction +} + +// Commit applies the enqueued operations atomically. +func (t *Transaction) Commit() (c *Commit, err error) { + t.ctx = trace.StartSpan(t.ctx, "cloud.google.com/go/datastore.Transaction.Commit") + defer func() { trace.EndSpan(t.ctx, err) }() + + if t.id == nil { + return nil, errExpiredTransaction + } + req := &pb.CommitRequest{ + ProjectId: t.client.dataset, + TransactionSelector: &pb.CommitRequest_Transaction{Transaction: t.id}, + Mutations: t.mutations, + Mode: pb.CommitRequest_TRANSACTIONAL, + } + resp, err := t.client.client.Commit(t.ctx, req) + if status.Code(err) == codes.Aborted { + return nil, ErrConcurrentTransaction + } + t.id = nil // mark the transaction as expired + if err != nil { + return nil, err + } + + // Copy any newly minted keys into the returned keys. + for i, p := range t.pending { + if i >= len(resp.MutationResults) || resp.MutationResults[i].Key == nil { + return nil, errors.New("datastore: internal error: server returned the wrong mutation results") + } + key, err := protoToKey(resp.MutationResults[i].Key) + if err != nil { + return nil, errors.New("datastore: internal error: server returned an invalid key") + } + p.key = key + p.commit = c + } + + return c, nil +} + +// Rollback abandons a pending transaction. +func (t *Transaction) Rollback() (err error) { + t.ctx = trace.StartSpan(t.ctx, "cloud.google.com/go/datastore.Transaction.Rollback") + defer func() { trace.EndSpan(t.ctx, err) }() + + if t.id == nil { + return errExpiredTransaction + } + id := t.id + t.id = nil + _, err = t.client.client.Rollback(t.ctx, &pb.RollbackRequest{ + ProjectId: t.client.dataset, + Transaction: id, + }) + return err +} + +// Get is the transaction-specific version of the package function Get. +// All reads performed during the transaction will come from a single consistent +// snapshot. Furthermore, if the transaction is set to a serializable isolation +// level, another transaction cannot concurrently modify the data that is read +// or modified by this transaction. +func (t *Transaction) Get(key *Key, dst interface{}) (err error) { + t.ctx = trace.StartSpan(t.ctx, "cloud.google.com/go/datastore.Transaction.Get") + defer func() { trace.EndSpan(t.ctx, err) }() + + opts := &pb.ReadOptions{ + ConsistencyType: &pb.ReadOptions_Transaction{Transaction: t.id}, + } + err = t.client.get(t.ctx, []*Key{key}, []interface{}{dst}, opts) + if me, ok := err.(MultiError); ok { + return me[0] + } + return err +} + +// GetMulti is a batch version of Get. +func (t *Transaction) GetMulti(keys []*Key, dst interface{}) (err error) { + t.ctx = trace.StartSpan(t.ctx, "cloud.google.com/go/datastore.Transaction.GetMulti") + defer func() { trace.EndSpan(t.ctx, err) }() + + if t.id == nil { + return errExpiredTransaction + } + opts := &pb.ReadOptions{ + ConsistencyType: &pb.ReadOptions_Transaction{Transaction: t.id}, + } + return t.client.get(t.ctx, keys, dst, opts) +} + +// Put is the transaction-specific version of the package function Put. +// +// Put returns a PendingKey which can be resolved into a Key using the +// return value from a successful Commit. If key is an incomplete key, the +// returned pending key will resolve to a unique key generated by the +// datastore. +func (t *Transaction) Put(key *Key, src interface{}) (*PendingKey, error) { + h, err := t.PutMulti([]*Key{key}, []interface{}{src}) + if err != nil { + if me, ok := err.(MultiError); ok { + return nil, me[0] + } + return nil, err + } + return h[0], nil +} + +// PutMulti is a batch version of Put. One PendingKey is returned for each +// element of src in the same order. +// TODO(jba): rewrite in terms of Mutate. +func (t *Transaction) PutMulti(keys []*Key, src interface{}) (ret []*PendingKey, err error) { + if t.id == nil { + return nil, errExpiredTransaction + } + mutations, err := putMutations(keys, src) + if err != nil { + return nil, err + } + origin := len(t.mutations) + t.mutations = append(t.mutations, mutations...) + + // Prepare the returned handles, pre-populating where possible. + ret = make([]*PendingKey, len(keys)) + for i, key := range keys { + p := &PendingKey{} + if key.Incomplete() { + // This key will be in the final commit result. + t.pending[origin+i] = p + } else { + p.key = key + } + ret[i] = p + } + + return ret, nil +} + +// Delete is the transaction-specific version of the package function Delete. +// Delete enqueues the deletion of the entity for the given key, to be +// committed atomically upon calling Commit. +func (t *Transaction) Delete(key *Key) error { + err := t.DeleteMulti([]*Key{key}) + if me, ok := err.(MultiError); ok { + return me[0] + } + return err +} + +// DeleteMulti is a batch version of Delete. +// TODO(jba): rewrite in terms of Mutate. +func (t *Transaction) DeleteMulti(keys []*Key) (err error) { + if t.id == nil { + return errExpiredTransaction + } + mutations, err := deleteMutations(keys) + if err != nil { + return err + } + t.mutations = append(t.mutations, mutations...) + return nil +} + +// Mutate adds the mutations to the transaction. They will all be applied atomically +// upon calling Commit. Mutate returns a PendingKey for each Mutation in the argument +// list, in the same order. PendingKeys for Delete mutations are always nil. +// +// If any of the mutations are invalid, Mutate returns a MultiError with the errors. +// Mutate returns a MultiError in this case even if there is only one Mutation. +// +// For an example, see Client.Mutate. +func (t *Transaction) Mutate(muts ...*Mutation) ([]*PendingKey, error) { + if t.id == nil { + return nil, errExpiredTransaction + } + pmuts, err := mutationProtos(muts) + if err != nil { + return nil, err + } + origin := len(t.mutations) + t.mutations = append(t.mutations, pmuts...) + // Prepare the returned handles, pre-populating where possible. + ret := make([]*PendingKey, len(muts)) + for i, mut := range muts { + if mut.isDelete() { + continue + } + p := &PendingKey{} + if mut.key.Incomplete() { + // This key will be in the final commit result. + t.pending[origin+i] = p + } else { + p.key = mut.key + } + ret[i] = p + } + return ret, nil +} + +// Commit represents the result of a committed transaction. +type Commit struct{} + +// Key resolves a pending key handle into a final key. +func (c *Commit) Key(p *PendingKey) *Key { + if p == nil { // if called on a *PendingKey from a Delete mutation + return nil + } + // If p.commit is nil, the PendingKey did not come from an incomplete key, + // so p.key is valid. + if p.commit != nil && c != p.commit { + panic("PendingKey was not created by corresponding transaction") + } + return p.key +} + +// PendingKey represents the key for newly-inserted entity. It can be +// resolved into a Key by calling the Key method of Commit. +type PendingKey struct { + key *Key + commit *Commit +} diff --git a/vendor/cloud.google.com/go/doc.go b/vendor/cloud.google.com/go/doc.go new file mode 100644 index 000000000000..237d84561ce0 --- /dev/null +++ b/vendor/cloud.google.com/go/doc.go @@ -0,0 +1,100 @@ +// Copyright 2014 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 is the root of the packages used to access Google Cloud +Services. See https://godoc.org/cloud.google.com/go for a full list +of sub-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 this package for details. + + +Timeouts and Cancellation + +By default, all requests in sub-packages will run indefinitely, retrying on transient +errors when correctness allows. To set timeouts or arrange for cancellation, use +contexts. See the examples for details. + +Do not attempt to control the initial connection (dialing) of a service by setting a +timeout on the context passed to NewClient. Dialing is non-blocking, so timeouts +would be ineffective and would only interfere with credential refreshing, which uses +the same context. + + +Connection Pooling + +Connection pooling differs in clients based on their transport. Cloud +clients either rely on HTTP or gRPC transports to communicate +with Google Cloud. + +Cloud clients that use HTTP (bigquery, compute, storage, and translate) rely on the +underlying HTTP transport to cache connections for later re-use. These are cached to +the default http.MaxIdleConns and http.MaxIdleConnsPerHost settings in +http.DefaultTransport. + +For gRPC clients (all others in this repo), connection pooling is configurable. Users +of cloud client libraries may specify option.WithGRPCConnectionPool(n) as a client +option to NewClient calls. This configures the underlying gRPC connections to be +pooled and addressed in a round robin fashion. + + +Using the Libraries with Docker + +Minimal docker images like Alpine lack CA certificates. This causes RPCs to appear to +hang, because gRPC retries indefinitely. See https://github.com/googleapis/google-cloud-go/issues/928 +for more information. + + +Debugging + +To see gRPC logs, set the environment variable GRPC_GO_LOG_SEVERITY_LEVEL. See +https://godoc.org/google.golang.org/grpc/grpclog for more information. + +For HTTP logging, set the GODEBUG environment variable to "http2debug=1" or "http2debug=2". + + +Client Stability + +Clients in this repository are considered alpha or beta unless otherwise +marked as stable in the README.md. Semver is not used to communicate stability +of clients. + +Alpha and beta clients may change or go away without notice. + +Clients marked stable will maintain compatibility with future versions for as +long as we can reasonably sustain. Incompatible changes might be made in some +situations, including: + +- Security bugs may prompt backwards-incompatible changes. + +- Situations in which components are no longer feasible to maintain without +making breaking changes, including removal. + +- Parts of the client surface may be outright unstable and subject to change. +These parts of the surface will be labeled with the note, "It is EXPERIMENTAL +and subject to change or removal without notice." +*/ +package cloud // import "cloud.google.com/go" diff --git a/vendor/cloud.google.com/go/functions/metadata/.repo-metadata.json b/vendor/cloud.google.com/go/functions/metadata/.repo-metadata.json new file mode 100644 index 000000000000..f525bdc73028 --- /dev/null +++ b/vendor/cloud.google.com/go/functions/metadata/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "metadata", + "name_pretty": "Cloud Functions", + "product_documentation": "http://cloud.google.com/functions", + "client_documentation": "https://godoc.org/cloud.google.com/go/functions/metadata", + "release_level": "alpha", + "language": "go", + "repo": "googleapis/google-cloud-go", + "distribution_name": "cloud.google.com/go/functions/metadata", + "api_id": "functions:metadata", + "requires_billing": true +} diff --git a/vendor/cloud.google.com/go/functions/metadata/metadata.go b/vendor/cloud.google.com/go/functions/metadata/metadata.go index a5dfd32557f9..1a08f392c4fa 100644 --- a/vendor/cloud.google.com/go/functions/metadata/metadata.go +++ b/vendor/cloud.google.com/go/functions/metadata/metadata.go @@ -43,6 +43,38 @@ type Resource struct { Name string `json:"name"` // Type is the type of event. Type string `json:"type"` + // Path is the path to the resource type (deprecated). + // This is the case for some deprecated GCS + // notifications, which populate the resource field as a string containing the topic + // rather than as the expected dictionary. + // See the Attributes section of https://cloud.google.com/storage/docs/pubsub-notifications + // for more details. + RawPath string `json:"-"` +} + +// UnmarshalJSON specializes the Resource unmarshalling to handle the case where the +// value is a string instead of a map. See the comment above on RawPath for why this +// needs to be handled. +func (r *Resource) UnmarshalJSON(data []byte) error { + // Try to unmarshal the resource into a string. + var path string + if err := json.Unmarshal(data, &path); err == nil { + r.RawPath = path + return nil + } + + // Otherwise, accept whatever the result of the normal unmarshal would be. + // Need to define a new type, otherwise it infinitely recurses and panics. + type resource Resource + var res resource + if err := json.Unmarshal(data, &res); err != nil { + return err + } + + r.Service = res.Service + r.Name = res.Name + r.Type = res.Type + return nil } type contextKey string diff --git a/vendor/cloud.google.com/go/go.mod b/vendor/cloud.google.com/go/go.mod new file mode 100644 index 000000000000..593298b5ff45 --- /dev/null +++ b/vendor/cloud.google.com/go/go.mod @@ -0,0 +1,32 @@ +module cloud.google.com/go + +go 1.11 + +require ( + cloud.google.com/go/bigquery v1.0.1 + cloud.google.com/go/datastore v1.0.0 + cloud.google.com/go/pubsub v1.0.1 + cloud.google.com/go/storage v1.0.0 + github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 // indirect + github.com/golang/mock v1.3.1 + github.com/golang/protobuf v1.3.2 + github.com/google/go-cmp v0.3.1 + github.com/google/martian v2.1.0+incompatible + github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc + github.com/googleapis/gax-go/v2 v2.0.5 + github.com/jstemmer/go-junit-report v0.9.1 + go.opencensus.io v0.22.2 + golang.org/x/exp v0.0.0-20191227195350-da58074b4299 + golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f + golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 + golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect + golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 // indirect + golang.org/x/text v0.3.2 + golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4 + google.golang.org/api v0.15.0 + google.golang.org/appengine v1.6.5 // indirect + google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb + google.golang.org/grpc v1.26.0 + honnef.co/go/tools v0.0.1-2019.2.3 +) diff --git a/vendor/cloud.google.com/go/go.sum b/vendor/cloud.google.com/go/go.sum new file mode 100644 index 000000000000..2aebf8d5aa18 --- /dev/null +++ b/vendor/cloud.google.com/go/go.sum @@ -0,0 +1,257 @@ +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/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +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/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +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/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +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/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57 h1:eqyIo2HjKhKe/mJzTG8n4VqvLXIOEG+SLdDqX7xGtkY= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc h1:DLpL8pWq0v4JYoRpEhDfsJhhJyGKCcQM2WPW2TJs31c= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4 h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522 h1:OeRHuibLsmZkFj773W4LcfAGsSxJgfPONhr8cmO+eLA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979 h1:Agxu5KLo8o7Bb634SVDnhIfpTvxmzUwhbYAzBvXt6h4= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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 h1:hX65Cu3JDlGH3uEdK7I99Ii+9kjD6mvnnpfLdEAH0x4= +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/lint v0.0.0-20190909230951-414d861bb4ac h1:8R1esu+8QioDxo4E4mX6bFztO+dMTM49DNAaWfO5OeY= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +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 h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/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/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI= +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/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/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 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +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/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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 h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 h1:JA8d3MPx/IToSyXZG/RhwYEtfrKO1Fxrqe8KrkiLXKM= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/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 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= +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 h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138 h1:H3uGjxCR/6Ds0Mjgyp7LMK81+LvmbvWWEnJhzk1Pi9E= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c h1:97SnQk1GYRXJgvwZ8fadnxDOWfKvkNQHH3CtZntPSrM= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 h1:Dh6fw+p6FyRl5x/FvNswO1ji0lIGzm3KP8Y9VkS9PTE= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4 h1:Toz2IK7k8rbltAXwNAxKcn9OzqyNfMUhUNjz3sL0NMk= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0 h1:VGGbLNyPF7dvYHhcUGYBBGCRDDK0RRJAI6KCvo0CL+E= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0 h1:jbyannxz0XFD3zdjgrSUsaJbgpH4eTrkdhRChkHPfO8= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +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/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= +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-20190425155659-357c62f0e4bb/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/genproto v0.0.0-20190801165951-fa694d86fc64 h1:iKtrH9Y8mcbADOP0YFaEMth7OfuHY9xHOwNj4znpM1A= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51 h1:Ex1mq5jaJof+kRnYi3SlYJ8KKa9Ao3NHyIT5XJ1gF6U= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb h1:ADPHZzpzM4tk4V4S5cnCrr5SwzvlrPRmqqCuJDB8UTs= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +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= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a h1:/8zB6iBfHCl1qAnEAWwGPNrUvapuy6CPla1VM0k8hQw= +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= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/cloud.google.com/go/iam/.repo-metadata.json b/vendor/cloud.google.com/go/iam/.repo-metadata.json new file mode 100644 index 000000000000..0edb2d8b454c --- /dev/null +++ b/vendor/cloud.google.com/go/iam/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "iam", + "name_pretty": "Cloud Identify and Access Management API", + "product_documentation": "https://cloud.google.com/iam", + "client_documentation": "https://godoc.org/cloud.google.com/go/iam", + "release_level": "ga", + "language": "go", + "repo": "googleapis/google-cloud-go", + "distribution_name": "cloud.google.com/go/iam", + "api_id": "iam.googleapis.com", + "requires_billing": true +} diff --git a/vendor/cloud.google.com/go/internal/fields/fields.go b/vendor/cloud.google.com/go/internal/fields/fields.go new file mode 100644 index 000000000000..6d7cabb1811f --- /dev/null +++ b/vendor/cloud.google.com/go/internal/fields/fields.go @@ -0,0 +1,480 @@ +// Copyright 2016 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 fields provides a view of the fields of a struct that follows the Go +// rules, amended to consider tags and case insensitivity. +// +// Usage +// +// First define a function that interprets tags: +// +// func parseTag(st reflect.StructTag) (name string, keep bool, other interface{}, err error) { ... } +// +// The function's return values describe whether to ignore the field +// completely or provide an alternate name, as well as other data from the +// parse that is stored to avoid re-parsing. +// +// Then define a function to validate the type: +// +// func validate(t reflect.Type) error { ... } +// +// Then, if necessary, define a function to specify leaf types - types +// which should be considered one field and not be recursed into: +// +// func isLeafType(t reflect.Type) bool { ... } +// +// eg: +// +// func isLeafType(t reflect.Type) bool { +// return t == reflect.TypeOf(time.Time{}) +// } +// +// Next, construct a Cache, passing your functions. As its name suggests, a +// Cache remembers validation and field information for a type, so subsequent +// calls with the same type are very fast. +// +// cache := fields.NewCache(parseTag, validate, isLeafType) +// +// To get the fields of a struct type as determined by the above rules, call +// the Fields method: +// +// fields, err := cache.Fields(reflect.TypeOf(MyStruct{})) +// +// The return value can be treated as a slice of Fields. +// +// Given a string, such as a key or column name obtained during unmarshalling, +// call Match on the list of fields to find a field whose name is the best +// match: +// +// field := fields.Match(name) +// +// Match looks for an exact match first, then falls back to a case-insensitive +// comparison. +package fields + +import ( + "bytes" + "errors" + "reflect" + "sort" + "strings" + "sync" +) + +// A Field records information about a struct field. +type Field struct { + Name string // effective field name + NameFromTag bool // did Name come from a tag? + Type reflect.Type // field type + Index []int // index sequence, for reflect.Value.FieldByIndex + ParsedTag interface{} // third return value of the parseTag function + + nameBytes []byte + equalFold func(s, t []byte) bool +} + +// ParseTagFunc is a function that accepts a struct tag and returns four values: an alternative name for the field +// extracted from the tag, a boolean saying whether to keep the field or ignore it, additional data that is stored +// with the field information to avoid having to parse the tag again, and an error. +type ParseTagFunc func(reflect.StructTag) (name string, keep bool, other interface{}, err error) + +// ValidateFunc is a function that accepts a reflect.Type and returns an error if the struct type is invalid in any +// way. +type ValidateFunc func(reflect.Type) error + +// LeafTypesFunc is a function that accepts a reflect.Type and returns true if the struct type a leaf, or false if not. +// TODO(deklerk): is this description accurate? +type LeafTypesFunc func(reflect.Type) bool + +// A Cache records information about the fields of struct types. +// +// A Cache is safe for use by multiple goroutines. +type Cache struct { + parseTag ParseTagFunc + validate ValidateFunc + leafTypes LeafTypesFunc + cache sync.Map // from reflect.Type to cacheValue +} + +// NewCache constructs a Cache. +// +// Its first argument should be a function that accepts +// a struct tag and returns four values: an alternative name for the field +// extracted from the tag, a boolean saying whether to keep the field or ignore +// it, additional data that is stored with the field information to avoid +// having to parse the tag again, and an error. +// +// Its second argument should be a function that accepts a reflect.Type and +// returns an error if the struct type is invalid in any way. For example, it +// may check that all of the struct field tags are valid, or that all fields +// are of an appropriate type. +func NewCache(parseTag ParseTagFunc, validate ValidateFunc, leafTypes LeafTypesFunc) *Cache { + if parseTag == nil { + parseTag = func(reflect.StructTag) (string, bool, interface{}, error) { + return "", true, nil, nil + } + } + if validate == nil { + validate = func(reflect.Type) error { + return nil + } + } + if leafTypes == nil { + leafTypes = func(reflect.Type) bool { + return false + } + } + + return &Cache{ + parseTag: parseTag, + validate: validate, + leafTypes: leafTypes, + } +} + +// A fieldScan represents an item on the fieldByNameFunc scan work list. +type fieldScan struct { + typ reflect.Type + index []int +} + +// Fields returns all the exported fields of t, which must be a struct type. It +// follows the standard Go rules for embedded fields, modified by the presence +// of tags. The result is sorted lexicographically by index. +// +// These rules apply in the absence of tags: +// Anonymous struct fields are treated as if their inner exported fields were +// fields in the outer struct (embedding). The result includes all fields that +// aren't shadowed by fields at higher level of embedding. If more than one +// field with the same name exists at the same level of embedding, it is +// excluded. An anonymous field that is not of struct type is treated as having +// its type as its name. +// +// Tags modify these rules as follows: +// A field's tag is used as its name. +// An anonymous struct field with a name given in its tag is treated as +// a field having that name, rather than an embedded struct (the struct's +// fields will not be returned). +// If more than one field with the same name exists at the same level of embedding, +// but exactly one of them is tagged, then the tagged field is reported and the others +// are ignored. +func (c *Cache) Fields(t reflect.Type) (List, error) { + if t.Kind() != reflect.Struct { + panic("fields: Fields of non-struct type") + } + return c.cachedTypeFields(t) +} + +// A List is a list of Fields. +type List []Field + +// Match returns the field in the list whose name best matches the supplied +// name, nor nil if no field does. If there is a field with the exact name, it +// is returned. Otherwise the first field (sorted by index) whose name matches +// case-insensitively is returned. +func (l List) Match(name string) *Field { + return l.MatchBytes([]byte(name)) +} + +// MatchBytes is identical to Match, except that the argument is a byte slice. +func (l List) MatchBytes(name []byte) *Field { + var f *Field + for i := range l { + ff := &l[i] + if bytes.Equal(ff.nameBytes, name) { + return ff + } + if f == nil && ff.equalFold(ff.nameBytes, name) { + f = ff + } + } + return f +} + +type cacheValue struct { + fields List + err error +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +// This code has been copied and modified from +// https://go.googlesource.com/go/+/go1.7.3/src/encoding/json/encode.go. +func (c *Cache) cachedTypeFields(t reflect.Type) (List, error) { + var cv cacheValue + x, ok := c.cache.Load(t) + if ok { + cv = x.(cacheValue) + } else { + if err := c.validate(t); err != nil { + cv = cacheValue{nil, err} + } else { + f, err := c.typeFields(t) + cv = cacheValue{List(f), err} + } + c.cache.Store(t, cv) + } + return cv.fields, cv.err +} + +func (c *Cache) typeFields(t reflect.Type) ([]Field, error) { + fields, err := c.listFields(t) + if err != nil { + return nil, err + } + sort.Sort(byName(fields)) + // Delete all fields that are hidden by the Go rules for embedded fields. + + // The fields are sorted in primary order of name, secondary order of field + // index length. So the first field with a given name is the dominant one. + var out []Field + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.Name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.Name != name { + break + } + } + // Find the dominant field, if any, out of all fields that have the same name. + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + sort.Sort(byIndex(out)) + return out, nil +} + +func (c *Cache) listFields(t reflect.Type) ([]Field, error) { + // This uses the same condition that the Go language does: there must be a unique instance + // of the match at a given depth level. If there are multiple instances of a match at the + // same depth, they annihilate each other and inhibit any possible match at a lower level. + // The algorithm is breadth first search, one depth level at a time. + + // The current and next slices are work queues: + // current lists the fields to visit on this depth level, + // and next lists the fields on the next lower level. + current := []fieldScan{} + next := []fieldScan{{typ: t}} + + // nextCount records the number of times an embedded type has been + // encountered and considered for queueing in the 'next' slice. + // We only queue the first one, but we increment the count on each. + // If a struct type T can be reached more than once at a given depth level, + // then it annihilates itself and need not be considered at all when we + // process that next depth level. + var nextCount map[reflect.Type]int + + // visited records the structs that have been considered already. + // Embedded pointer fields can create cycles in the graph of + // reachable embedded types; visited avoids following those cycles. + // It also avoids duplicated effort: if we didn't find the field in an + // embedded type T at level 2, we won't find it in one at level 4 either. + visited := map[reflect.Type]bool{} + + var fields []Field // Fields found. + + for len(next) > 0 { + current, next = next, current[:0] + count := nextCount + nextCount = nil + + // Process all the fields at this depth, now listed in 'current'. + // The loop queues embedded fields found in 'next', for processing during the next + // iteration. The multiplicity of the 'current' field counts is recorded + // in 'count'; the multiplicity of the 'next' field counts is recorded in 'nextCount'. + for _, scan := range current { + t := scan.typ + if visited[t] { + // We've looked through this type before, at a higher level. + // That higher level would shadow the lower level we're now at, + // so this one can't be useful to us. Ignore it. + continue + } + visited[t] = true + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + + exported := (f.PkgPath == "") + + // If a named field is unexported, ignore it. An anonymous + // unexported field is processed, because it may contain + // exported fields, which are visible. + if !exported && !f.Anonymous { + continue + } + + // Examine the tag. + tagName, keep, other, err := c.parseTag(f.Tag) + if err != nil { + return nil, err + } + if !keep { + continue + } + if c.leafTypes(f.Type) { + fields = append(fields, newField(f, tagName, other, scan.index, i)) + continue + } + + var ntyp reflect.Type + if f.Anonymous { + // Anonymous field of type T or *T. + ntyp = f.Type + if ntyp.Kind() == reflect.Ptr { + ntyp = ntyp.Elem() + } + } + + // Record fields with a tag name, non-anonymous fields, or + // anonymous non-struct fields. + if tagName != "" || ntyp == nil || ntyp.Kind() != reflect.Struct { + if !exported { + continue + } + fields = append(fields, newField(f, tagName, other, scan.index, i)) + if count[t] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Queue embedded struct fields for processing with next level, + // but only if the embedded types haven't already been queued. + if nextCount[ntyp] > 0 { + nextCount[ntyp] = 2 // exact multiple doesn't matter + continue + } + if nextCount == nil { + nextCount = map[reflect.Type]int{} + } + nextCount[ntyp] = 1 + if count[t] > 1 { + nextCount[ntyp] = 2 // exact multiple doesn't matter + } + var index []int + index = append(index, scan.index...) + index = append(index, i) + next = append(next, fieldScan{ntyp, index}) + } + } + } + return fields, nil +} + +func newField(f reflect.StructField, tagName string, other interface{}, index []int, i int) Field { + name := tagName + if name == "" { + name = f.Name + } + sf := Field{ + Name: name, + NameFromTag: tagName != "", + Type: f.Type, + ParsedTag: other, + nameBytes: []byte(name), + } + sf.equalFold = foldFunc(sf.nameBytes) + sf.Index = append(sf.Index, index...) + sf.Index = append(sf.Index, i) + return sf +} + +// byName sorts fields using the following criteria, in order: +// 1. name +// 2. embedding depth +// 3. tag presence (preferring a tagged field) +// 4. index sequence. +type byName []Field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].Name != x[j].Name { + return x[i].Name < x[j].Name + } + if len(x[i].Index) != len(x[j].Index) { + return len(x[i].Index) < len(x[j].Index) + } + if x[i].NameFromTag != x[j].NameFromTag { + return x[i].NameFromTag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []Field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + xi := x[i].Index + xj := x[j].Index + ln := len(xi) + if l := len(xj); l < ln { + ln = l + } + for k := 0; k < ln; k++ { + if xi[k] != xj[k] { + return xi[k] < xj[k] + } + } + return len(xi) < len(xj) +} + +// dominantField looks through the fields, all of which are known to have the +// same name, to find the single field that dominates the others using Go's +// embedding rules, modified by the presence of tags. If there are multiple +// top-level fields, the boolean will be false: This condition is an error in +// Go and we skip all the fields. +func dominantField(fs []Field) (Field, bool) { + // The fields are sorted in increasing index-length order, then by presence of tag. + // That means that the first field is the dominant one. We need only check + // for error cases: two fields at top level, either both tagged or neither tagged. + if len(fs) > 1 && len(fs[0].Index) == len(fs[1].Index) && fs[0].NameFromTag == fs[1].NameFromTag { + return Field{}, false + } + return fs[0], true +} + +// ParseStandardTag extracts the sub-tag named by key, then parses it using the +// de facto standard format introduced in encoding/json: +// "-" means "ignore this tag". It must occur by itself. (parseStandardTag returns an error +// in this case, whereas encoding/json accepts the "-" even if it is not alone.) +// "" provides an alternative name for the field +// ",opt1,opt2,..." specifies options after the name. +// The options are returned as a []string. +func ParseStandardTag(key string, t reflect.StructTag) (name string, keep bool, options []string, err error) { + s := t.Get(key) + parts := strings.Split(s, ",") + if parts[0] == "-" { + if len(parts) > 1 { + return "", false, nil, errors.New(`"-" field tag with options`) + } + return "", false, nil, nil + } + if len(parts) > 1 { + options = parts[1:] + } + return parts[0], true, options, nil +} diff --git a/vendor/cloud.google.com/go/internal/fields/fold.go b/vendor/cloud.google.com/go/internal/fields/fold.go new file mode 100644 index 000000000000..68e2588c4257 --- /dev/null +++ b/vendor/cloud.google.com/go/internal/fields/fold.go @@ -0,0 +1,156 @@ +// Copyright 2016 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 fields + +// This file was copied from https://go.googlesource.com/go/+/go1.7.3/src/encoding/json/fold.go. +// Only the license and package were changed. + +import ( + "bytes" + "unicode/utf8" +) + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// foldFunc returns one of four different case folding equivalence +// functions, from most general (and slow) to fastest: +// +// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8 +// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S') +// 3) asciiEqualFold, no special, but includes non-letters (including _) +// 4) simpleLetterEqualFold, no specials, no non-letters. +// +// The letters S and K are special because they map to 3 runes, not just 2: +// * S maps to s and to U+017F 'ſ' Latin small letter long s +// * k maps to K and to U+212A 'K' Kelvin sign +// See https://play.golang.org/p/tTxjOc0OGo +// +// The returned function is specialized for matching against s and +// should only be given s. It's not curried for performance reasons. +func foldFunc(s []byte) func(s, t []byte) bool { + nonLetter := false + special := false // special letter + for _, b := range s { + if b >= utf8.RuneSelf { + return bytes.EqualFold + } + upper := b & caseMask + if upper < 'A' || upper > 'Z' { + nonLetter = true + } else if upper == 'K' || upper == 'S' { + // See above for why these letters are special. + special = true + } + } + if special { + return equalFoldRight + } + if nonLetter { + return asciiEqualFold + } + return simpleLetterEqualFold +} + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func equalFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func asciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func simpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} diff --git a/vendor/cloud.google.com/go/internal/version/update_version.sh b/vendor/cloud.google.com/go/internal/version/update_version.sh old mode 100755 new mode 100644 index fecf1f03fdeb..d7c5a3e219c9 --- a/vendor/cloud.google.com/go/internal/version/update_version.sh +++ b/vendor/cloud.google.com/go/internal/version/update_version.sh @@ -1,4 +1,17 @@ #!/bin/bash +# 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. today=$(date +%Y%m%d) diff --git a/vendor/cloud.google.com/go/internal/version/version.go b/vendor/cloud.google.com/go/internal/version/version.go index 4a2a8c19ff19..f817afb7301b 100644 --- a/vendor/cloud.google.com/go/internal/version/version.go +++ b/vendor/cloud.google.com/go/internal/version/version.go @@ -26,7 +26,7 @@ import ( // Repo is the current version of the client libraries in this // repo. It should be a date in YYYYMMDD format. -const Repo = "20180226" +const Repo = "20191119" // Go returns the Go runtime version. The returned string // has no whitespace. diff --git a/vendor/cloud.google.com/go/issue_template.md b/vendor/cloud.google.com/go/issue_template.md new file mode 100644 index 000000000000..e2ccef3e78df --- /dev/null +++ b/vendor/cloud.google.com/go/issue_template.md @@ -0,0 +1,17 @@ +(delete this for feature requests) + +## Client + +e.g. PubSub + +## Describe Your Environment + +e.g. Alpine Docker on GKE + +## Expected Behavior + +e.g. Messages arrive really fast. + +## Actual Behavior + +e.g. Messages arrive really slowly. \ No newline at end of file diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/.repo-metadata.json b/vendor/cloud.google.com/go/monitoring/apiv3/.repo-metadata.json new file mode 100644 index 000000000000..ec9a49c44fdc --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "monitoring", + "name_pretty": "Stackdriver Monitoring API", + "product_documentation": "https://cloud.google.com/monitoring", + "client_documentation": "https://godoc.org/cloud.google.com/go/monitoring/apiv3", + "release_level": "alpha", + "language": "go", + "repo": "googleapis/google-cloud-go", + "distribution_name": "cloud.google.com/go", + "api_id": "monitoring.googleapis.com", + "requires_billing": true +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/doc.go b/vendor/cloud.google.com/go/monitoring/apiv3/doc.go index e6ecf8f7e55d..45c925ebad5e 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/doc.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/doc.go @@ -105,4 +105,4 @@ func versionGo() string { return "UNKNOWN" } -const versionClient = "20191115" +const versionClient = "20191229" diff --git a/vendor/cloud.google.com/go/pubsub/CHANGES.md b/vendor/cloud.google.com/go/pubsub/CHANGES.md new file mode 100644 index 000000000000..1b45c6572a51 --- /dev/null +++ b/vendor/cloud.google.com/go/pubsub/CHANGES.md @@ -0,0 +1,6 @@ +# Changes + +## v1.0.0 + +This is the first tag to carve out pubsub as its own module. See: +https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. \ No newline at end of file diff --git a/vendor/github.com/coreos/etcd/LICENSE b/vendor/cloud.google.com/go/pubsub/LICENSE similarity index 100% rename from vendor/github.com/coreos/etcd/LICENSE rename to vendor/cloud.google.com/go/pubsub/LICENSE diff --git a/vendor/cloud.google.com/go/pubsub/README.md b/vendor/cloud.google.com/go/pubsub/README.md new file mode 100644 index 000000000000..59f4cf66d9d2 --- /dev/null +++ b/vendor/cloud.google.com/go/pubsub/README.md @@ -0,0 +1,46 @@ +## Cloud Pub/Sub [![GoDoc](https://godoc.org/cloud.google.com/go/pubsub?status.svg)](https://godoc.org/cloud.google.com/go/pubsub) + +- [About Cloud Pubsub](https://cloud.google.com/pubsub/) +- [API documentation](https://cloud.google.com/pubsub/docs) +- [Go client documentation](https://godoc.org/cloud.google.com/go/pubsub) +- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/pubsub) + +### Example Usage + +First create a `pubsub.Client` to use throughout your application: + +[snip]:# (pubsub-1) +```go +client, err := pubsub.NewClient(ctx, "project-id") +if err != nil { + log.Fatal(err) +} +``` + +Then use the client to publish and subscribe: + +[snip]:# (pubsub-2) +```go +// Publish "hello world" on topic1. +topic := client.Topic("topic1") +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) +} + +// 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) +} +``` \ No newline at end of file diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/doc.go b/vendor/cloud.google.com/go/pubsub/apiv1/doc.go index 20562a54121b..e897795649df 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/doc.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/doc.go @@ -100,4 +100,4 @@ func versionGo() string { return "UNKNOWN" } -const versionClient = "20190528" +const versionClient = "20190819" diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go b/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go index 1f605146eb1e..b99214db0f3d 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/publisher_client.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "math" + "net/url" "time" "github.com/golang/protobuf/proto" @@ -48,6 +49,8 @@ func defaultPublisherClientOptions() []option.ClientOption { return []option.ClientOption{ option.WithEndpoint("pubsub.googleapis.com:443"), option.WithScopes(DefaultAuthScopes()...), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), } } @@ -166,7 +169,7 @@ func (c *PublisherClient) SetGoogleClientInfo(keyval ...string) { // // resource name rules. func (c *PublisherClient) CreateTopic(ctx context.Context, req *pubsubpb.Topic, opts ...gax.CallOption) (*pubsubpb.Topic, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", req.GetName())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.CreateTopic[0:len(c.CallOptions.CreateTopic):len(c.CallOptions.CreateTopic)], opts...) var resp *pubsubpb.Topic @@ -184,7 +187,7 @@ func (c *PublisherClient) CreateTopic(ctx context.Context, req *pubsubpb.Topic, // UpdateTopic updates an existing topic. Note that certain properties of a // topic are not modifiable. func (c *PublisherClient) UpdateTopic(ctx context.Context, req *pubsubpb.UpdateTopicRequest, opts ...gax.CallOption) (*pubsubpb.Topic, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic.name", req.GetTopic().GetName())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic.name", url.QueryEscape(req.GetTopic().GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.UpdateTopic[0:len(c.CallOptions.UpdateTopic):len(c.CallOptions.UpdateTopic)], opts...) var resp *pubsubpb.Topic @@ -202,7 +205,7 @@ func (c *PublisherClient) UpdateTopic(ctx context.Context, req *pubsubpb.UpdateT // Publish adds one or more messages to the topic. Returns NOT_FOUND if the topic // does not exist. func (c *PublisherClient) Publish(ctx context.Context, req *pubsubpb.PublishRequest, opts ...gax.CallOption) (*pubsubpb.PublishResponse, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", req.GetTopic())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", url.QueryEscape(req.GetTopic()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.Publish[0:len(c.CallOptions.Publish):len(c.CallOptions.Publish)], opts...) var resp *pubsubpb.PublishResponse @@ -219,7 +222,7 @@ func (c *PublisherClient) Publish(ctx context.Context, req *pubsubpb.PublishRequ // GetTopic gets the configuration of a topic. func (c *PublisherClient) GetTopic(ctx context.Context, req *pubsubpb.GetTopicRequest, opts ...gax.CallOption) (*pubsubpb.Topic, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", req.GetTopic())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", url.QueryEscape(req.GetTopic()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.GetTopic[0:len(c.CallOptions.GetTopic):len(c.CallOptions.GetTopic)], opts...) var resp *pubsubpb.Topic @@ -236,7 +239,7 @@ func (c *PublisherClient) GetTopic(ctx context.Context, req *pubsubpb.GetTopicRe // ListTopics lists matching topics. func (c *PublisherClient) ListTopics(ctx context.Context, req *pubsubpb.ListTopicsRequest, opts ...gax.CallOption) *TopicIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project", req.GetProject())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project", url.QueryEscape(req.GetProject()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.ListTopics[0:len(c.CallOptions.ListTopics):len(c.CallOptions.ListTopics)], opts...) it := &TopicIterator{} @@ -275,7 +278,7 @@ func (c *PublisherClient) ListTopics(ctx context.Context, req *pubsubpb.ListTopi // ListTopicSubscriptions lists the names of the subscriptions on this topic. func (c *PublisherClient) ListTopicSubscriptions(ctx context.Context, req *pubsubpb.ListTopicSubscriptionsRequest, opts ...gax.CallOption) *StringIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", req.GetTopic())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", url.QueryEscape(req.GetTopic()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.ListTopicSubscriptions[0:len(c.CallOptions.ListTopicSubscriptions):len(c.CallOptions.ListTopicSubscriptions)], opts...) it := &StringIterator{} @@ -318,7 +321,7 @@ func (c *PublisherClient) ListTopicSubscriptions(ctx context.Context, req *pubsu // configuration or subscriptions. Existing subscriptions to this topic are // not deleted, but their topic field is set to _deleted-topic_. func (c *PublisherClient) DeleteTopic(ctx context.Context, req *pubsubpb.DeleteTopicRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", req.GetTopic())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "topic", url.QueryEscape(req.GetTopic()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.DeleteTopic[0:len(c.CallOptions.DeleteTopic):len(c.CallOptions.DeleteTopic)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { diff --git a/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go b/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go index 7cd8447a91e0..260615b07922 100644 --- a/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go +++ b/vendor/cloud.google.com/go/pubsub/apiv1/subscriber_client.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "math" + "net/url" "time" "github.com/golang/protobuf/proto" @@ -56,6 +57,8 @@ func defaultSubscriberClientOptions() []option.ClientOption { return []option.ClientOption{ option.WithEndpoint("pubsub.googleapis.com:443"), option.WithScopes(DefaultAuthScopes()...), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), } } @@ -200,7 +203,7 @@ func (c *SubscriberClient) SetGoogleClientInfo(keyval ...string) { // generated name is populated in the returned Subscription object. Note that // for REST API requests, you must specify a name in the request. func (c *SubscriberClient) CreateSubscription(ctx context.Context, req *pubsubpb.Subscription, opts ...gax.CallOption) (*pubsubpb.Subscription, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", req.GetName())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.CreateSubscription[0:len(c.CallOptions.CreateSubscription):len(c.CallOptions.CreateSubscription)], opts...) var resp *pubsubpb.Subscription @@ -217,7 +220,7 @@ func (c *SubscriberClient) CreateSubscription(ctx context.Context, req *pubsubpb // GetSubscription gets the configuration details of a subscription. func (c *SubscriberClient) GetSubscription(ctx context.Context, req *pubsubpb.GetSubscriptionRequest, opts ...gax.CallOption) (*pubsubpb.Subscription, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.GetSubscription[0:len(c.CallOptions.GetSubscription):len(c.CallOptions.GetSubscription)], opts...) var resp *pubsubpb.Subscription @@ -235,7 +238,7 @@ func (c *SubscriberClient) GetSubscription(ctx context.Context, req *pubsubpb.Ge // UpdateSubscription updates an existing subscription. Note that certain properties of a // subscription, such as its topic, are not modifiable. func (c *SubscriberClient) UpdateSubscription(ctx context.Context, req *pubsubpb.UpdateSubscriptionRequest, opts ...gax.CallOption) (*pubsubpb.Subscription, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription.name", req.GetSubscription().GetName())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription.name", url.QueryEscape(req.GetSubscription().GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.UpdateSubscription[0:len(c.CallOptions.UpdateSubscription):len(c.CallOptions.UpdateSubscription)], opts...) var resp *pubsubpb.Subscription @@ -252,7 +255,7 @@ func (c *SubscriberClient) UpdateSubscription(ctx context.Context, req *pubsubpb // ListSubscriptions lists matching subscriptions. func (c *SubscriberClient) ListSubscriptions(ctx context.Context, req *pubsubpb.ListSubscriptionsRequest, opts ...gax.CallOption) *SubscriptionIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project", req.GetProject())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project", url.QueryEscape(req.GetProject()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.ListSubscriptions[0:len(c.CallOptions.ListSubscriptions):len(c.CallOptions.ListSubscriptions)], opts...) it := &SubscriptionIterator{} @@ -295,7 +298,7 @@ func (c *SubscriberClient) ListSubscriptions(ctx context.Context, req *pubsubpb. // the same name, but the new one has no association with the old // subscription or its topic unless the same topic is specified. func (c *SubscriberClient) DeleteSubscription(ctx context.Context, req *pubsubpb.DeleteSubscriptionRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.DeleteSubscription[0:len(c.CallOptions.DeleteSubscription):len(c.CallOptions.DeleteSubscription)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -312,7 +315,7 @@ func (c *SubscriberClient) DeleteSubscription(ctx context.Context, req *pubsubpb // processing was interrupted. Note that this does not modify the // subscription-level ackDeadlineSeconds used for subsequent messages. func (c *SubscriberClient) ModifyAckDeadline(ctx context.Context, req *pubsubpb.ModifyAckDeadlineRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.ModifyAckDeadline[0:len(c.CallOptions.ModifyAckDeadline):len(c.CallOptions.ModifyAckDeadline)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -331,7 +334,7 @@ func (c *SubscriberClient) ModifyAckDeadline(ctx context.Context, req *pubsubpb. // but such a message may be redelivered later. Acknowledging a message more // than once will not result in an error. func (c *SubscriberClient) Acknowledge(ctx context.Context, req *pubsubpb.AcknowledgeRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.Acknowledge[0:len(c.CallOptions.Acknowledge):len(c.CallOptions.Acknowledge)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -346,7 +349,7 @@ func (c *SubscriberClient) Acknowledge(ctx context.Context, req *pubsubpb.Acknow // there are too many concurrent pull requests pending for the given // subscription. func (c *SubscriberClient) Pull(ctx context.Context, req *pubsubpb.PullRequest, opts ...gax.CallOption) (*pubsubpb.PullResponse, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.Pull[0:len(c.CallOptions.Pull):len(c.CallOptions.Pull)], opts...) var resp *pubsubpb.PullResponse @@ -390,7 +393,7 @@ func (c *SubscriberClient) StreamingPull(ctx context.Context, opts ...gax.CallOp // attributes of a push subscription. Messages will accumulate for delivery // continuously through the call regardless of changes to the PushConfig. func (c *SubscriberClient) ModifyPushConfig(ctx context.Context, req *pubsubpb.ModifyPushConfigRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.ModifyPushConfig[0:len(c.CallOptions.ModifyPushConfig):len(c.CallOptions.ModifyPushConfig)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -408,7 +411,7 @@ func (c *SubscriberClient) ModifyPushConfig(ctx context.Context, req *pubsubpb.M // acknowledgment state of messages in an existing subscription to the state // captured by a snapshot. func (c *SubscriberClient) ListSnapshots(ctx context.Context, req *pubsubpb.ListSnapshotsRequest, opts ...gax.CallOption) *SnapshotIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project", req.GetProject())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project", url.QueryEscape(req.GetProject()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.ListSnapshots[0:len(c.CallOptions.ListSnapshots):len(c.CallOptions.ListSnapshots)], opts...) it := &SnapshotIterator{} @@ -464,7 +467,7 @@ func (c *SubscriberClient) ListSnapshots(ctx context.Context, req *pubsubpb.List // generated name is populated in the returned Snapshot object. Note that for // REST API requests, you must specify a name in the request. func (c *SubscriberClient) CreateSnapshot(ctx context.Context, req *pubsubpb.CreateSnapshotRequest, opts ...gax.CallOption) (*pubsubpb.Snapshot, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", req.GetName())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.CreateSnapshot[0:len(c.CallOptions.CreateSnapshot):len(c.CallOptions.CreateSnapshot)], opts...) var resp *pubsubpb.Snapshot @@ -486,7 +489,7 @@ func (c *SubscriberClient) CreateSnapshot(ctx context.Context, req *pubsubpb.Cre // acknowledgment state of messages in an existing subscription to the state // captured by a snapshot. func (c *SubscriberClient) UpdateSnapshot(ctx context.Context, req *pubsubpb.UpdateSnapshotRequest, opts ...gax.CallOption) (*pubsubpb.Snapshot, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "snapshot.name", req.GetSnapshot().GetName())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "snapshot.name", url.QueryEscape(req.GetSnapshot().GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.UpdateSnapshot[0:len(c.CallOptions.UpdateSnapshot):len(c.CallOptions.UpdateSnapshot)], opts...) var resp *pubsubpb.Snapshot @@ -512,7 +515,7 @@ func (c *SubscriberClient) UpdateSnapshot(ctx context.Context, req *pubsubpb.Upd // created with the same name, but the new one has no association with the old // snapshot or its subscription, unless the same subscription is specified. func (c *SubscriberClient) DeleteSnapshot(ctx context.Context, req *pubsubpb.DeleteSnapshotRequest, opts ...gax.CallOption) error { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "snapshot", req.GetSnapshot())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "snapshot", url.QueryEscape(req.GetSnapshot()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.DeleteSnapshot[0:len(c.CallOptions.DeleteSnapshot):len(c.CallOptions.DeleteSnapshot)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -532,7 +535,7 @@ func (c *SubscriberClient) DeleteSnapshot(ctx context.Context, req *pubsubpb.Del // captured by a snapshot. Note that both the subscription and the snapshot // must be on the same topic. func (c *SubscriberClient) Seek(ctx context.Context, req *pubsubpb.SeekRequest, opts ...gax.CallOption) (*pubsubpb.SeekResponse, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", req.GetSubscription())) + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "subscription", url.QueryEscape(req.GetSubscription()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) opts = append(c.CallOptions.Seek[0:len(c.CallOptions.Seek):len(c.CallOptions.Seek)], opts...) var resp *pubsubpb.SeekResponse diff --git a/vendor/cloud.google.com/go/pubsub/doc.go b/vendor/cloud.google.com/go/pubsub/doc.go index cd9b06d2ee90..a86fc3d4a594 100644 --- a/vendor/cloud.google.com/go/pubsub/doc.go +++ b/vendor/cloud.google.com/go/pubsub/doc.go @@ -48,6 +48,7 @@ background. To clean up these goroutines, call Stop: topic.Stop() + Receiving To receive messages published to a topic, clients create subscriptions @@ -72,10 +73,10 @@ Messages are then consumed from a subscription via callback. The callback is invoked concurrently by multiple goroutines, maximizing throughput. To terminate a call to Receive, cancel its context. -Once client code has processed the message, it must call Message.Ack, otherwise -the message will eventually be redelivered. As an optimization, if the client -cannot or doesn't want to process the message, it can call Message.Nack to -speed redelivery. For more information and configuration options, see +Once client code has processed the message, it must call Message.Ack or +message.Nack, otherwise the message will eventually be redelivered. If the +client cannot or doesn't want to process the message, it can call Message.Nack +to speed redelivery. For more information and configuration options, see "Deadlines" below. Note: It is possible for Messages to be redelivered, even if Message.Ack has @@ -86,6 +87,7 @@ may be surprising. Please take a look at https://cloud.google.com/pubsub/docs/pu for more details on how streaming pull behaves compared to the synchronous pull method. + Deadlines The default pubsub deadlines are suitable for most use cases, but may be @@ -128,6 +130,7 @@ subscription's AckDeadline: sub.ReceiveSettings.MaxExtension = cfg.AckDeadline + Slow Message Processing For use cases where message processing exceeds 30 minutes, we recommend using diff --git a/vendor/cloud.google.com/go/pubsub/go.mod b/vendor/cloud.google.com/go/pubsub/go.mod new file mode 100644 index 000000000000..a5567f788a9f --- /dev/null +++ b/vendor/cloud.google.com/go/pubsub/go.mod @@ -0,0 +1,17 @@ +module cloud.google.com/go/pubsub + +go 1.13 + +require ( + cloud.google.com/go v0.45.1 + github.com/golang/protobuf v1.3.2 + github.com/google/go-cmp v0.3.0 + github.com/googleapis/gax-go/v2 v2.0.5 + go.opencensus.io v0.22.0 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 + golang.org/x/sync v0.0.0-20190423024810-112230192c58 + golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 + google.golang.org/api v0.9.0 + google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 + google.golang.org/grpc v1.21.1 +) diff --git a/vendor/cloud.google.com/go/pubsub/go.sum b/vendor/cloud.google.com/go/pubsub/go.sum new file mode 100644 index 000000000000..a31819b8aa36 --- /dev/null +++ b/vendor/cloud.google.com/go/pubsub/go.sum @@ -0,0 +1,121 @@ +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/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +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/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/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/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +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/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +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/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/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/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0 h1:jbyannxz0XFD3zdjgrSUsaJbgpH4eTrkdhRChkHPfO8= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +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/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +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-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +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/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/cloud.google.com/go/pubsub/go_mod_tidy_hack.go b/vendor/cloud.google.com/go/pubsub/go_mod_tidy_hack.go new file mode 100644 index 000000000000..20b865930b9c --- /dev/null +++ b/vendor/cloud.google.com/go/pubsub/go_mod_tidy_hack.go @@ -0,0 +1,22 @@ +// 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. + +// This file, and the cloud.google.com/go import, won't actually become part of +// the resultant binary. +// +build modhack + +package pubsub + +// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "cloud.google.com/go" diff --git a/vendor/cloud.google.com/go/pubsub/internal/distribution/distribution.go b/vendor/cloud.google.com/go/pubsub/internal/distribution/distribution.go index 6571c90ac078..3c061fb1d8b4 100644 --- a/vendor/cloud.google.com/go/pubsub/internal/distribution/distribution.go +++ b/vendor/cloud.google.com/go/pubsub/internal/distribution/distribution.go @@ -18,6 +18,7 @@ import ( "log" "math" "sort" + "sync" "sync/atomic" ) @@ -25,12 +26,19 @@ import ( // goroutines. type D struct { buckets []uint64 + // sumsReuse is the scratch space that is reused + // to store sums during invocations of Percentile. + // After an invocation of New(n): + // len(buckets) == len(sumsReuse) == n + sumsReuse []uint64 + mu sync.Mutex } // New creates a new distribution capable of holding values from 0 to n-1. func New(n int) *D { return &D{ - buckets: make([]uint64, n), + buckets: make([]uint64, n), + sumsReuse: make([]uint64, n), } } @@ -48,7 +56,7 @@ func (d *D) Record(v int) { } // Percentile computes the p-th percentile of the distribution where -// p is between 0 and 1. This method is thread-safe. +// p is between 0 and 1. This method may be called by multiple goroutines. func (d *D) Percentile(p float64) int { // NOTE: This implementation uses the nearest-rank method. // https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method @@ -57,13 +65,15 @@ func (d *D) Percentile(p float64) int { log.Panicf("Percentile: percentile out of range: %f", p) } - sums := make([]uint64, len(d.buckets)) + d.mu.Lock() + defer d.mu.Unlock() + var sum uint64 - for i := range sums { + for i := range d.sumsReuse { sum += atomic.LoadUint64(&d.buckets[i]) - sums[i] = sum + d.sumsReuse[i] = sum } target := uint64(math.Ceil(float64(sum) * p)) - return sort.Search(len(sums), func(i int) bool { return sums[i] >= target }) + return sort.Search(len(d.sumsReuse), func(i int) bool { return d.sumsReuse[i] >= target }) } diff --git a/vendor/cloud.google.com/go/pubsub/iterator.go b/vendor/cloud.google.com/go/pubsub/iterator.go index 7cffa25ee071..b2455777d8eb 100644 --- a/vendor/cloud.google.com/go/pubsub/iterator.go +++ b/vendor/cloud.google.com/go/pubsub/iterator.go @@ -22,6 +22,7 @@ import ( vkit "cloud.google.com/go/pubsub/apiv1" "cloud.google.com/go/pubsub/internal/distribution" + "github.com/golang/protobuf/proto" gax "github.com/googleapis/gax-go/v2" pb "google.golang.org/genproto/googleapis/pubsub/v1" "google.golang.org/grpc" @@ -375,7 +376,9 @@ func (it *messageIterator) handleKeepAlives() { } func (it *messageIterator) sendAck(m map[string]bool) bool { - return it.sendAckIDRPC(m, func(ids []string) error { + // Account for the Subscription field. + overhead := calcFieldSizeString(it.subName) + return it.sendAckIDRPC(m, maxPayload-overhead, func(ids []string) error { recordStat(it.ctx, AckCount, int64(len(ids))) addAcks(ids) // Use context.Background() as the call's context, not it.ctx. We don't @@ -392,13 +395,16 @@ func (it *messageIterator) sendAck(m map[string]bool) bool { // percentile in order to capture the highest amount of time necessary without // considering 1% outliers. func (it *messageIterator) sendModAck(m map[string]bool, deadline time.Duration) bool { - return it.sendAckIDRPC(m, func(ids []string) error { + deadlineSec := int32(deadline / time.Second) + // Account for the Subscription and AckDeadlineSeconds fields. + overhead := calcFieldSizeString(it.subName) + calcFieldSizeInt(int(deadlineSec)) + return it.sendAckIDRPC(m, maxPayload-overhead, func(ids []string) error { if deadline == 0 { recordStat(it.ctx, NackCount, int64(len(ids))) } else { recordStat(it.ctx, ModAckCount, int64(len(ids))) } - addModAcks(ids, int32(deadline/time.Second)) + addModAcks(ids, deadlineSec) // Retry this RPC on Unavailable for a short amount of time, then give up // without returning a fatal error. The utility of this RPC is by nature // transient (since the deadline is relative to the current time) and it @@ -414,7 +420,7 @@ func (it *messageIterator) sendModAck(m map[string]bool, deadline time.Duration) for { err := it.subc.ModifyAckDeadline(cctx, &pb.ModifyAckDeadlineRequest{ Subscription: it.subName, - AckDeadlineSeconds: int32(deadline / time.Second), + AckDeadlineSeconds: deadlineSec, AckIds: ids, }) switch status.Code(err) { @@ -436,14 +442,14 @@ func (it *messageIterator) sendModAck(m map[string]bool, deadline time.Duration) }) } -func (it *messageIterator) sendAckIDRPC(ackIDSet map[string]bool, call func([]string) error) bool { +func (it *messageIterator) sendAckIDRPC(ackIDSet map[string]bool, maxSize int, call func([]string) error) bool { ackIDs := make([]string, 0, len(ackIDSet)) for k := range ackIDSet { ackIDs = append(ackIDs, k) } var toSend []string for len(ackIDs) > 0 { - toSend, ackIDs = splitRequestIDs(ackIDs, maxPayload) + toSend, ackIDs = splitRequestIDs(ackIDs, maxSize) if err := call(toSend); err != nil { // The underlying client handles retries, so any error is fatal to the // iterator. @@ -465,11 +471,35 @@ func (it *messageIterator) pingStream() { _ = it.ps.Send(&pb.StreamingPullRequest{}) } +// calcFieldSizeString returns the number of bytes string fields +// will take up in an encoded proto message. +func calcFieldSizeString(fields ...string) int { + overhead := 0 + for _, field := range fields { + overhead += 1 + len(field) + proto.SizeVarint(uint64(len(field))) + } + return overhead +} + +// calcFieldSizeInt returns the number of bytes int fields +// will take up in an encoded proto message. +func calcFieldSizeInt(fields ...int) int { + overhead := 0 + for _, field := range fields { + overhead += 1 + proto.SizeVarint(uint64(field)) + } + return overhead +} + +// splitRequestIDs takes a slice of ackIDs and returns two slices such that the first +// ackID slice can be used in a request where the payload does not exceed maxSize. func splitRequestIDs(ids []string, maxSize int) (prefix, remainder []string) { - size := reqFixedOverhead + size := 0 i := 0 + // TODO(hongalex): Use binary search to find split index, since ackIDs are + // fairly constant. for size < maxSize && i < len(ids) { - size += overheadPerID + len(ids[i]) + size += calcFieldSizeString(ids[i]) i++ } if size > maxSize { diff --git a/vendor/cloud.google.com/go/pubsub/pubsub.go b/vendor/cloud.google.com/go/pubsub/pubsub.go index cce9d6b25046..9dead694b997 100644 --- a/vendor/cloud.google.com/go/pubsub/pubsub.go +++ b/vendor/cloud.google.com/go/pubsub/pubsub.go @@ -84,7 +84,6 @@ func NewClient(ctx context.Context, projectID string, opts ...option.ClientOptio return nil, fmt.Errorf("pubsub: %v", err) } pubc.SetGoogleClientInfo("gccl", version.Repo) - subc.SetGoogleClientInfo("gccl", version.Repo) return &Client{ projectID: projectID, pubc: pubc, diff --git a/vendor/cloud.google.com/go/pubsub/service.go b/vendor/cloud.google.com/go/pubsub/service.go index b7358fe67ddf..a22b9147fccc 100644 --- a/vendor/cloud.google.com/go/pubsub/service.go +++ b/vendor/cloud.google.com/go/pubsub/service.go @@ -26,21 +26,14 @@ import ( "google.golang.org/grpc/status" ) -// maxPayload is the maximum number of bytes to devote to actual ids in -// acknowledgement or modifyAckDeadline requests. A serialized -// AcknowledgeRequest proto has a small constant overhead, plus the size of the -// subscription name, plus 3 bytes per ID (a tag byte and two size bytes). A -// ModifyAckDeadlineRequest has an additional few bytes for the deadline. We -// don't know the subscription name here, so we just assume the size exclusive -// of ids is 100 bytes. +// maxPayload is the maximum number of bytes to devote to the +// encoded AcknowledgementRequest / ModifyAckDeadline proto message. // // With gRPC there is no way for the client to know the server's max message size (it is // configurable on the server). We know from experience that it // it 512K. const ( maxPayload = 512 * 1024 - reqFixedOverhead = 100 - overheadPerID = 3 maxSendRecvBytes = 20 * 1024 * 1024 // 20M ) diff --git a/vendor/cloud.google.com/go/pubsub/snapshot.go b/vendor/cloud.google.com/go/pubsub/snapshot.go index d662f0d20e0f..c2a28d781990 100644 --- a/vendor/cloud.google.com/go/pubsub/snapshot.go +++ b/vendor/cloud.google.com/go/pubsub/snapshot.go @@ -106,7 +106,7 @@ func (s *Subscription) SeekToTime(ctx context.Context, t time.Time) error { } _, err = s.c.subc.Seek(ctx, &pb.SeekRequest{ Subscription: s.name, - Target: &pb.SeekRequest_Time{ts}, + Target: &pb.SeekRequest_Time{Time: ts}, }) return err } @@ -142,7 +142,7 @@ func (s *Subscription) CreateSnapshot(ctx context.Context, name string) (*Snapsh func (s *Subscription) SeekToSnapshot(ctx context.Context, snap *Snapshot) error { _, err := s.c.subc.Seek(ctx, &pb.SeekRequest{ Subscription: s.name, - Target: &pb.SeekRequest_Snapshot{snap.name}, + Target: &pb.SeekRequest_Snapshot{Snapshot: snap.name}, }) return err } diff --git a/vendor/cloud.google.com/go/pubsub/subscription.go b/vendor/cloud.google.com/go/pubsub/subscription.go index 1b65ea277640..bfd9dfb9279b 100644 --- a/vendor/cloud.google.com/go/pubsub/subscription.go +++ b/vendor/cloud.google.com/go/pubsub/subscription.go @@ -31,8 +31,8 @@ import ( "golang.org/x/sync/errgroup" pb "google.golang.org/genproto/googleapis/pubsub/v1" fmpb "google.golang.org/genproto/protobuf/field_mask" - "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // Subscription is a reference to a PubSub subscription. @@ -116,13 +116,80 @@ type PushConfig struct { // Endpoint configuration attributes. See https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions#pushconfig for more details. Attributes map[string]string + + // AuthenticationMethod is used by push endpoints to verify the source + // of push requests. + // It can be used with push endpoints that are private by default to + // allow requests only from the Cloud Pub/Sub system, for example. + // This field is optional and should be set only by users interested in + // authenticated push. + // + // It is EXPERIMENTAL and a part of a closed alpha that may not be + // accessible to all users. This field is subject to change or removal + // without notice. + AuthenticationMethod AuthenticationMethod } func (pc *PushConfig) toProto() *pb.PushConfig { - return &pb.PushConfig{ + if pc == nil { + return nil + } + pbCfg := &pb.PushConfig{ Attributes: pc.Attributes, PushEndpoint: pc.Endpoint, } + if authMethod := pc.AuthenticationMethod; authMethod != nil { + switch am := authMethod.(type) { + case *OIDCToken: + pbCfg.AuthenticationMethod = am.toProto() + default: // TODO: add others here when GAIC adds more definitions. + } + } + return pbCfg +} + +// AuthenticationMethod is used by push points to verify the source of push requests. +// This interface defines fields that are part of a closed alpha that may not be accessible +// to all users. +type AuthenticationMethod interface { + isAuthMethod() bool +} + +// OIDCToken allows PushConfigs to be authenticated using +// the OpenID Connect protocol https://openid.net/connect/ +type OIDCToken struct { + // Audience to be used when generating OIDC token. The audience claim + // identifies the recipients that the JWT is intended for. The audience + // value is a single case-sensitive string. Having multiple values (array) + // for the audience field is not supported. More info about the OIDC JWT + // token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 + // Note: if not specified, the Push endpoint URL will be used. + Audience string + + // The service account email to be used for generating the OpenID Connect token. + // The caller of: + // * CreateSubscription + // * UpdateSubscription + // * ModifyPushConfig + // calls must have the iam.serviceAccounts.actAs permission for the service account. + // See https://cloud.google.com/iam/docs/understanding-roles#service-accounts-roles. + ServiceAccountEmail string +} + +var _ AuthenticationMethod = (*OIDCToken)(nil) + +func (oidcToken *OIDCToken) isAuthMethod() bool { return true } + +func (oidcToken *OIDCToken) toProto() *pb.PushConfig_OidcToken_ { + if oidcToken == nil { + return nil + } + return &pb.PushConfig_OidcToken_{ + OidcToken: &pb.PushConfig_OidcToken{ + Audience: oidcToken.Audience, + ServiceAccountEmail: oidcToken.ServiceAccountEmail, + }, + } } // SubscriptionConfig describes the configuration of a subscription. @@ -153,8 +220,10 @@ type SubscriptionConfig struct { // *default policy* with `ttl` of 31 days will be used. The minimum allowed // value for `expiration_policy.ttl` is 1 day. // + // Use time.Duration(0) to indicate that the subscription should never expire. + // // It is EXPERIMENTAL and subject to change or removal without notice. - ExpirationPolicy time.Duration + ExpirationPolicy optional.Duration // The set of labels for the subscription. Labels map[string]string @@ -162,11 +231,8 @@ type SubscriptionConfig struct { func (cfg *SubscriptionConfig) toProto(name string) *pb.Subscription { var pbPushConfig *pb.PushConfig - if cfg.PushConfig.Endpoint != "" || len(cfg.PushConfig.Attributes) != 0 { - pbPushConfig = &pb.PushConfig{ - Attributes: cfg.PushConfig.Attributes, - PushEndpoint: cfg.PushConfig.Endpoint, - } + if cfg.PushConfig.Endpoint != "" || len(cfg.PushConfig.Attributes) != 0 || cfg.PushConfig.AuthenticationMethod != nil { + pbPushConfig = cfg.PushConfig.toProto() } var retentionDuration *durpb.Duration if cfg.RetentionDuration != 0 { @@ -200,18 +266,38 @@ func protoToSubscriptionConfig(pbSub *pb.Subscription, c *Client) (SubscriptionC return SubscriptionConfig{}, err } } - return SubscriptionConfig{ - Topic: newTopic(c, pbSub.Topic), - AckDeadline: time.Second * time.Duration(pbSub.AckDeadlineSeconds), - PushConfig: PushConfig{ - Endpoint: pbSub.PushConfig.PushEndpoint, - Attributes: pbSub.PushConfig.Attributes, - }, + subC := SubscriptionConfig{ + Topic: newTopic(c, pbSub.Topic), + AckDeadline: time.Second * time.Duration(pbSub.AckDeadlineSeconds), RetainAckedMessages: pbSub.RetainAckedMessages, RetentionDuration: rd, Labels: pbSub.Labels, ExpirationPolicy: expirationPolicy, - }, nil + } + pc := protoToPushConfig(pbSub.PushConfig) + if pc != nil { + subC.PushConfig = *pc + } + return subC, nil +} + +func protoToPushConfig(pbPc *pb.PushConfig) *PushConfig { + if pbPc == nil { + return nil + } + pc := &PushConfig{ + Endpoint: pbPc.PushEndpoint, + Attributes: pbPc.Attributes, + } + if am := pbPc.AuthenticationMethod; am != nil { + if oidcToken, ok := am.(*pb.PushConfig_OidcToken_); ok && oidcToken != nil && oidcToken.OidcToken != nil { + pc.AuthenticationMethod = &OIDCToken{ + Audience: oidcToken.OidcToken.GetAudience(), + ServiceAccountEmail: oidcToken.OidcToken.GetServiceAccountEmail(), + } + } + } + return pc } // ReceiveSettings configure the Receive method. @@ -301,7 +387,7 @@ func (s *Subscription) Exists(ctx context.Context) (bool, error) { if err == nil { return true, nil } - if grpc.Code(err) == codes.NotFound { + if status.Code(err) == codes.NotFound { return false, nil } return false, err @@ -335,7 +421,7 @@ type SubscriptionConfigToUpdate struct { RetentionDuration time.Duration // If non-zero, Expiration is changed. - ExpirationPolicy time.Duration + ExpirationPolicy optional.Duration // If non-nil, the current set of labels is completely // replaced by the new set. @@ -382,7 +468,7 @@ func (s *Subscription) updateRequest(cfg *SubscriptionConfigToUpdate) *pb.Update psub.MessageRetentionDuration = ptypes.DurationProto(cfg.RetentionDuration) paths = append(paths, "message_retention_duration") } - if cfg.ExpirationPolicy != 0 { + if cfg.ExpirationPolicy != nil { psub.ExpirationPolicy = expirationPolicyToProto(cfg.ExpirationPolicy) paths = append(paths, "expiration_policy") } @@ -407,21 +493,31 @@ const ( ) func (cfg *SubscriptionConfigToUpdate) validate() error { - if cfg == nil || cfg.ExpirationPolicy == 0 { + if cfg == nil || cfg.ExpirationPolicy == nil { return nil } - if policy, min := cfg.ExpirationPolicy, minExpirationPolicy; policy < min { - return fmt.Errorf("invalid expiration policy(%q) < minimum(%q)", policy, min) + policy, min := optional.ToDuration(cfg.ExpirationPolicy), minExpirationPolicy + if policy == 0 || policy >= min { + return nil } - return nil + return fmt.Errorf("invalid expiration policy(%q) < minimum(%q)", policy, min) } -func expirationPolicyToProto(expirationPolicy time.Duration) *pb.ExpirationPolicy { - if expirationPolicy == 0 { +func expirationPolicyToProto(expirationPolicy optional.Duration) *pb.ExpirationPolicy { + if expirationPolicy == nil { return nil } + + dur := optional.ToDuration(expirationPolicy) + var ttl *durpb.Duration + // As per: + // https://godoc.org/google.golang.org/genproto/googleapis/pubsub/v1#ExpirationPolicy.Ttl + // if ExpirationPolicy.Ttl is set to nil, the expirationPolicy is toggled to NEVER expire. + if dur != 0 { + ttl = ptypes.DurationProto(dur) + } return &pb.ExpirationPolicy{ - Ttl: ptypes.DurationProto(expirationPolicy), + Ttl: ttl, } } diff --git a/vendor/cloud.google.com/go/pubsub/topic.go b/vendor/cloud.google.com/go/pubsub/topic.go index 7c3af3561f38..2b31431ed93d 100644 --- a/vendor/cloud.google.com/go/pubsub/topic.go +++ b/vendor/cloud.google.com/go/pubsub/topic.go @@ -18,6 +18,7 @@ import ( "context" "errors" "fmt" + "log" "runtime" "strings" "sync" @@ -26,11 +27,14 @@ import ( "cloud.google.com/go/iam" "github.com/golang/protobuf/proto" gax "github.com/googleapis/gax-go/v2" + "go.opencensus.io/stats" + "go.opencensus.io/tag" "google.golang.org/api/support/bundler" pb "google.golang.org/genproto/googleapis/pubsub/v1" fmpb "google.golang.org/genproto/protobuf/field_mask" "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) const ( @@ -104,13 +108,16 @@ var DefaultPublishSettings = PublishSettings{ } // CreateTopic creates a new topic. +// // The specified topic ID must start with a letter, and contain only letters // ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), // tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 -// characters in length, and must not start with "goog". +// characters in length, and must not start with "goog". For more information, +// see: https://cloud.google.com/pubsub/docs/admin#resource_names +// // If the topic already exists an error will be returned. -func (c *Client) CreateTopic(ctx context.Context, id string) (*Topic, error) { - t := c.Topic(id) +func (c *Client) CreateTopic(ctx context.Context, topicID string) (*Topic, error) { + t := c.Topic(topicID) _, err := c.pubc.CreateTopic(ctx, &pb.Topic{Name: t.name}) if err != nil { return nil, err @@ -118,6 +125,29 @@ func (c *Client) CreateTopic(ctx context.Context, id string) (*Topic, error) { return t, nil } +// CreateTopicWithConfig creates a topic from TopicConfig. +// +// The specified topic ID must start with a letter, and contain only letters +// ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), +// tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 +// characters in length, and must not start with "goog". For more information, +// see: https://cloud.google.com/pubsub/docs/admin#resource_names. +// +// If the topic already exists, an error will be returned. +func (c *Client) CreateTopicWithConfig(ctx context.Context, topicID string, tc *TopicConfig) (*Topic, error) { + t := c.Topic(topicID) + _, err := c.pubc.CreateTopic(ctx, &pb.Topic{ + Name: t.name, + Labels: tc.Labels, + MessageStoragePolicy: messageStoragePolicyToProto(&tc.MessageStoragePolicy), + KmsKeyName: tc.KMSKeyName, + }) + if err != nil { + return nil, err + } + return t, nil +} + // Topic creates a reference to a topic in the client's project. // // If a Topic's Publish method is called, it has background goroutines @@ -150,23 +180,40 @@ func newTopic(c *Client, name string) *Topic { type TopicConfig struct { // The set of labels for the topic. Labels map[string]string + // The topic's message storage policy. MessageStoragePolicy MessageStoragePolicy + + // The name of the Cloud KMS key to be used to protect access to messages + // published to this topic, in the format + // "projects/P/locations/L/keyRings/R/cryptoKeys/K". + KMSKeyName string } // TopicConfigToUpdate describes how to update a topic. type TopicConfigToUpdate struct { // If non-nil, the current set of labels is completely // replaced by the new set. + Labels map[string]string + + // If non-nil, the existing policy (containing the list of regions) + // is completely replaced by the new policy. + // + // Use the zero value &MessageStoragePolicy{} to reset the topic back to + // using the organization's Resource Location Restriction policy. + // + // If nil, the policy remains unchanged. + // // This field has beta status. It is not subject to the stability guarantee // and may change. - Labels map[string]string + MessageStoragePolicy *MessageStoragePolicy } func protoToTopicConfig(pbt *pb.Topic) TopicConfig { return TopicConfig{ Labels: pbt.Labels, MessageStoragePolicy: protoToMessageStoragePolicy(pbt.MessageStoragePolicy), + KMSKeyName: pbt.KmsKeyName, } } @@ -174,12 +221,19 @@ func protoToTopicConfig(pbt *pb.Topic) TopicConfig { // is determined when the topic is created based on the policy configured at // the project level. type MessageStoragePolicy struct { - // The list of GCP regions where messages that are published to the topic may - // be persisted in storage. Messages published by publishers running in + // AllowedPersistenceRegions is the list of GCP regions where messages that are published + // to the topic may be persisted in storage. Messages published by publishers running in // non-allowed GCP regions (or running outside of GCP altogether) will be - // routed for storage in one of the allowed regions. An empty list indicates a - // misconfiguration at the project or organization level, which will result in - // all Publish operations failing. + // routed for storage in one of the allowed regions. + // + // If empty, it indicates a misconfiguration at the project or organization level, which + // will result in all Publish operations failing. This field cannot be empty in updates. + // + // If nil, then the policy is not defined on a topic level. When used in updates, it resets + // the regions back to the organization level Resource Location Restriction policy. + // + // For more information, see + // https://cloud.google.com/pubsub/docs/resource-location-restriction#pubsub-storage-locations. AllowedPersistenceRegions []string } @@ -190,6 +244,13 @@ func protoToMessageStoragePolicy(msp *pb.MessageStoragePolicy) MessageStoragePol return MessageStoragePolicy{AllowedPersistenceRegions: msp.AllowedPersistenceRegions} } +func messageStoragePolicyToProto(msp *MessageStoragePolicy) *pb.MessageStoragePolicy { + if msp == nil || msp.AllowedPersistenceRegions == nil { + return nil + } + return &pb.MessageStoragePolicy{AllowedPersistenceRegions: msp.AllowedPersistenceRegions} +} + // Config returns the TopicConfig for the topic. func (t *Topic) Config(ctx context.Context) (TopicConfig, error) { pbt, err := t.c.pubc.GetTopic(ctx, &pb.GetTopicRequest{Topic: t.name}) @@ -201,9 +262,6 @@ func (t *Topic) Config(ctx context.Context) (TopicConfig, error) { // Update changes an existing topic according to the fields set in cfg. It returns // the new TopicConfig. -// -// Any call to Update (even with an empty TopicConfigToUpdate) will update the -// MessageStoragePolicy for the topic from the organization's settings. func (t *Topic) Update(ctx context.Context, cfg TopicConfigToUpdate) (TopicConfig, error) { req := t.updateRequest(cfg) if len(req.UpdateMask.Paths) == 0 { @@ -218,11 +276,15 @@ func (t *Topic) Update(ctx context.Context, cfg TopicConfigToUpdate) (TopicConfi func (t *Topic) updateRequest(cfg TopicConfigToUpdate) *pb.UpdateTopicRequest { pt := &pb.Topic{Name: t.name} - paths := []string{"message_storage_policy"} // always fetch + var paths []string if cfg.Labels != nil { pt.Labels = cfg.Labels paths = append(paths, "labels") } + if cfg.MessageStoragePolicy != nil { + pt.MessageStoragePolicy = messageStoragePolicyToProto(cfg.MessageStoragePolicy) + paths = append(paths, "message_storage_policy") + } return &pb.UpdateTopicRequest{ Topic: pt, UpdateMask: &fmpb.FieldMask{Paths: paths}, @@ -288,7 +350,7 @@ func (t *Topic) Exists(ctx context.Context) (bool, error) { if err == nil { return true, nil } - if grpc.Code(err) == codes.NotFound { + if status.Code(err) == codes.NotFound { return false, nil } return false, err @@ -451,6 +513,10 @@ func (t *Topic) initBundler() { } func (t *Topic) publishMessageBundle(ctx context.Context, bms []*bundledMessage) { + ctx, err := tag.New(ctx, tag.Insert(keyStatus, "OK"), tag.Upsert(keyTopic, t.name)) + if err != nil { + log.Printf("pubsub: cannot create context with tag in publishMessageBundle: %v", err) + } pbMsgs := make([]*pb.PubsubMessage, len(bms)) for i, bm := range bms { pbMsgs[i] = &pb.PubsubMessage{ @@ -459,10 +525,21 @@ func (t *Topic) publishMessageBundle(ctx context.Context, bms []*bundledMessage) } bm.msg = nil // release bm.msg for GC } + start := time.Now() res, err := t.c.pubc.Publish(ctx, &pb.PublishRequest{ Topic: t.name, Messages: pbMsgs, }, gax.WithGRPCOptions(grpc.MaxCallSendMsgSize(maxSendRecvBytes))) + end := time.Now() + if err != nil { + // Update context with error tag for OpenCensus, + // using same stats.Record() call as success case. + ctx, _ = tag.New(ctx, tag.Upsert(keyStatus, "ERROR"), + tag.Upsert(keyError, err.Error())) + } + stats.Record(ctx, + PublishLatency.M(float64(end.Sub(start)/time.Millisecond)), + PublishedMessages.M(int64(len(bms)))) for i, bm := range bms { if err != nil { bm.res.set("", err) diff --git a/vendor/cloud.google.com/go/pubsub/trace.go b/vendor/cloud.google.com/go/pubsub/trace.go index 06965c2a2d11..d21d37c84345 100644 --- a/vendor/cloud.google.com/go/pubsub/trace.go +++ b/vendor/cloud.google.com/go/pubsub/trace.go @@ -33,18 +33,31 @@ func openCensusOptions() []option.ClientOption { } } -var subscriptionKey tag.Key +// The following keys are used to tag requests with a specific topic/subscription ID. +var ( + keyTopic = tag.MustNewKey("topic") + keySubscription = tag.MustNewKey("subscription") +) -func init() { - var err error - if subscriptionKey, err = tag.NewKey("subscription"); err != nil { - log.Fatal("cannot create 'subscription' key") - } -} +// In the following, errors are used if status is not "OK". +var ( + keyStatus = tag.MustNewKey("status") + keyError = tag.MustNewKey("error") +) const statsPrefix = "cloud.google.com/go/pubsub/" +// The following are measures recorded in publish/subscribe flows. var ( + // PublishedMessages is a measure of the number of messages published, which may include errors. + // It is EXPERIMENTAL and subject to change or removal without notice. + PublishedMessages = stats.Int64(statsPrefix+"published_messages", "Number of PubSub message published", stats.UnitDimensionless) + + // PublishLatency is a measure of the number of milliseconds it took to publish a bundle, + // which may consist of one or more messages. + // It is EXPERIMENTAL and subject to change or removal without notice. + PublishLatency = stats.Float64(statsPrefix+"publish_roundtrip_latency", "The latency in milliseconds per publish batch", stats.UnitMilliseconds) + // PullCount is a measure of the number of messages pulled. // It is EXPERIMENTAL and subject to change or removal without notice. PullCount = stats.Int64(statsPrefix+"pull_count", "Number of PubSub messages pulled", stats.UnitDimensionless) @@ -80,6 +93,16 @@ var ( // StreamResponseCount is a measure of the number of responses received on a streaming-pull stream. // It is EXPERIMENTAL and subject to change or removal without notice. StreamResponseCount = stats.Int64(statsPrefix+"stream_response_count", "Number of gRPC StreamingPull response messages received", stats.UnitDimensionless) +) + +var ( + // PublishedMessagesView is a cumulative sum of PublishedMessages. + // It is EXPERIMENTAL and subject to change or removal without notice. + PublishedMessagesView *view.View + + // PublishLatencyView is a distribution of PublishLatency. + // It is EXPERIMENTAL and subject to change or removal without notice. + PublishLatencyView *view.View // PullCountView is a cumulative sum of PullCount. // It is EXPERIMENTAL and subject to change or removal without notice. @@ -119,34 +142,71 @@ var ( ) func init() { - PullCountView = countView(PullCount) - AckCountView = countView(AckCount) - NackCountView = countView(NackCount) - ModAckCountView = countView(ModAckCount) - ModAckTimeoutCountView = countView(ModAckTimeoutCount) - StreamOpenCountView = countView(StreamOpenCount) - StreamRetryCountView = countView(StreamRetryCount) - StreamRequestCountView = countView(StreamRequestCount) - StreamResponseCountView = countView(StreamResponseCount) + PublishedMessagesView = createCountView(stats.Measure(PublishedMessages), keyTopic, keyStatus, keyError) + PublishLatencyView = createDistView(PublishLatency, keyTopic, keyStatus, keyError) + PullCountView = createCountView(PullCount, keySubscription) + AckCountView = createCountView(AckCount, keySubscription) + NackCountView = createCountView(NackCount, keySubscription) + ModAckCountView = createCountView(ModAckCount, keySubscription) + ModAckTimeoutCountView = createCountView(ModAckTimeoutCount, keySubscription) + StreamOpenCountView = createCountView(StreamOpenCount, keySubscription) + StreamRetryCountView = createCountView(StreamRetryCount, keySubscription) + StreamRequestCountView = createCountView(StreamRequestCount, keySubscription) + StreamResponseCountView = createCountView(StreamResponseCount, keySubscription) + + DefaultPublishViews = []*view.View{ + PublishedMessagesView, + PublishLatencyView, + } + + DefaultSubscribeViews = []*view.View{ + PullCountView, + AckCountView, + NackCountView, + ModAckCountView, + ModAckTimeoutCountView, + StreamOpenCountView, + StreamRetryCountView, + StreamRequestCountView, + StreamResponseCountView, + } } -func countView(m *stats.Int64Measure) *view.View { +// The following arrays are the default views related to publish/subscribe operations provided by this package. +// It is EXPERIMENTAL and subject to change or removal without notice. +var ( + DefaultPublishViews []*view.View + DefaultSubscribeViews []*view.View +) + +func createCountView(m stats.Measure, keys ...tag.Key) *view.View { return &view.View{ Name: m.Name(), Description: m.Description(), - TagKeys: []tag.Key{subscriptionKey}, + TagKeys: keys, Measure: m, Aggregation: view.Sum(), } } +func createDistView(m stats.Measure, keys ...tag.Key) *view.View { + return &view.View{ + Name: m.Name(), + Description: m.Description(), + TagKeys: keys, + Measure: m, + Aggregation: view.Distribution(0, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000, 6000), + } +} + var logOnce sync.Once +// withSubscriptionKey returns a new context modified with the subscriptionKey tag map. func withSubscriptionKey(ctx context.Context, subName string) context.Context { - ctx, err := tag.New(ctx, tag.Upsert(subscriptionKey, subName)) + ctx, err := tag.New(ctx, tag.Upsert(keySubscription, subName)) if err != nil { logOnce.Do(func() { - log.Printf("pubsub: error creating tag map: %v", err) + log.Printf("pubsub: error creating tag map for 'subscribe' key: %v", err) }) } return ctx diff --git a/vendor/cloud.google.com/go/storage/.repo-metadata.json b/vendor/cloud.google.com/go/storage/.repo-metadata.json new file mode 100644 index 000000000000..a42f91cd35f1 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "storage", + "name_pretty": "storage", + "product_documentation": "https://cloud.google.com/storage", + "client_documentation": "https://godoc.org/cloud.google.com/go/storage", + "release_level": "ga", + "language": "go", + "repo": "googleapis/google-cloud-go", + "distribution_name": "cloud.google.com/go/storage", + "api_id": "storage:v2", + "requires_billing": true +} diff --git a/vendor/cloud.google.com/go/storage/CHANGES.md b/vendor/cloud.google.com/go/storage/CHANGES.md new file mode 100644 index 000000000000..952fff68e8e3 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/CHANGES.md @@ -0,0 +1,6 @@ +# Changes + +## v1.0.0 + +This is the first tag to carve out storage as its own module. See: +https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. \ No newline at end of file diff --git a/vendor/github.com/google/certificate-transparency-go/LICENSE b/vendor/cloud.google.com/go/storage/LICENSE similarity index 100% rename from vendor/github.com/google/certificate-transparency-go/LICENSE rename to vendor/cloud.google.com/go/storage/LICENSE diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go index 07c470d3e0d4..0ba45e8f8e71 100644 --- a/vendor/cloud.google.com/go/storage/bucket.go +++ b/vendor/cloud.google.com/go/storage/bucket.go @@ -267,14 +267,8 @@ type BucketAttrs struct { // StorageClass is the default storage class of the bucket. This defines // how objects in the bucket are stored and determines the SLA - // and the cost of storage. Typical values are "MULTI_REGIONAL", - // "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD" and - // "DURABLE_REDUCED_AVAILABILITY". Defaults to "STANDARD", which - // is equivalent to "MULTI_REGIONAL" or "REGIONAL" depending on - // the bucket's location settings. - // - // "DURABLE_REDUCED_AVAILABILITY", "MULTI_REGIONAL" and "REGIONAL" - // are considered legacy storage classes. + // and the cost of storage. Typical values are "NEARLINE", "COLDLINE" and + // "STANDARD". Defaults to "STANDARD". StorageClass string // Created is the creation time of the bucket. @@ -446,8 +440,7 @@ type LifecycleCondition struct { // MatchesStorageClasses is the condition matching the object's storage // class. // - // Values include "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE", - // "STANDARD", and "DURABLE_REDUCED_AVAILABILITY". + // Values include "NEARLINE", "COLDLINE" and "STANDARD". MatchesStorageClasses []string // NumNewerVersions is the condition matching objects with a number of newer versions. diff --git a/vendor/cloud.google.com/go/storage/go.mod b/vendor/cloud.google.com/go/storage/go.mod new file mode 100644 index 000000000000..ce68c9daaaaa --- /dev/null +++ b/vendor/cloud.google.com/go/storage/go.mod @@ -0,0 +1,14 @@ +module cloud.google.com/go/storage + +go 1.9 + +require ( + cloud.google.com/go v0.46.3 + github.com/golang/protobuf v1.3.2 + github.com/google/go-cmp v0.3.0 + github.com/googleapis/gax-go/v2 v2.0.5 + golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 + google.golang.org/api v0.9.0 + google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51 + google.golang.org/grpc v1.21.1 +) diff --git a/vendor/cloud.google.com/go/storage/go.sum b/vendor/cloud.google.com/go/storage/go.sum new file mode 100644 index 000000000000..96d9ee7c0dac --- /dev/null +++ b/vendor/cloud.google.com/go/storage/go.sum @@ -0,0 +1,156 @@ +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/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.1/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.0.0/go.mod h1:SdFEKccng5n2jTXm5x01uXEvi4MBzxWFR6YI781XSJI= +cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +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/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/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 h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +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/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +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 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979 h1:Agxu5KLo8o7Bb634SVDnhIfpTvxmzUwhbYAzBvXt6h4= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac h1:8R1esu+8QioDxo4E4mX6bFztO+dMTM49DNAaWfO5OeY= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/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/time v0.0.0-20190308202827-9d24e82272b4/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0 h1:jbyannxz0XFD3zdjgrSUsaJbgpH4eTrkdhRChkHPfO8= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +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/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +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-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51 h1:Ex1mq5jaJof+kRnYi3SlYJ8KKa9Ao3NHyIT5XJ1gF6U= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +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/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/cloud.google.com/go/storage/go_mod_tidy_hack.go b/vendor/cloud.google.com/go/storage/go_mod_tidy_hack.go new file mode 100644 index 000000000000..7df7a1d7155a --- /dev/null +++ b/vendor/cloud.google.com/go/storage/go_mod_tidy_hack.go @@ -0,0 +1,22 @@ +// 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. + +// This file, and the cloud.google.com/go import, won't actually become part of +// the resultant binary. +// +build modhack + +package storage + +// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "cloud.google.com/go" diff --git a/vendor/cloud.google.com/go/storage/hmac.go b/vendor/cloud.google.com/go/storage/hmac.go index a906d44fe013..c39632740e35 100644 --- a/vendor/cloud.google.com/go/storage/hmac.go +++ b/vendor/cloud.google.com/go/storage/hmac.go @@ -20,6 +20,7 @@ import ( "fmt" "time" + "google.golang.org/api/iterator" raw "google.golang.org/api/storage/v1" ) @@ -47,7 +48,7 @@ const ( // HMAC keys are used to authenticate signed access to objects. To enable HMAC key // authentication, please visit https://cloud.google.com/storage/docs/migrating. // -// This type is experimental and subject to change. +// This type is EXPERIMENTAL and subject to change or removal without notice. type HMACKey struct { // The HMAC's secret key. Secret string @@ -82,7 +83,7 @@ type HMACKey struct { // HMACKeyHandle helps provide access and management for HMAC keys. // -// This type is experimental and subject to change. +// This type is EXPERIMENTAL and subject to change or removal without notice. type HMACKeyHandle struct { projectID string accessID string @@ -91,6 +92,8 @@ type HMACKeyHandle struct { } // HMACKeyHandle creates a handle that will be used for HMACKey operations. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. func (c *Client) HMACKeyHandle(projectID, accessID string) *HMACKeyHandle { return &HMACKeyHandle{ projectID: projectID, @@ -101,6 +104,8 @@ func (c *Client) HMACKeyHandle(projectID, accessID string) *HMACKeyHandle { // Get invokes an RPC to retrieve the HMAC key referenced by the // HMACKeyHandle's accessID. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. func (hkh *HMACKeyHandle) Get(ctx context.Context) (*HMACKey, error) { call := hkh.raw.Get(hkh.projectID, hkh.accessID) setClientHeader(call.Header()) @@ -124,6 +129,8 @@ func (hkh *HMACKeyHandle) Get(ctx context.Context) (*HMACKey, error) { // Delete invokes an RPC to delete the key referenced by accessID, on Google Cloud Storage. // Only inactive HMAC keys can be deleted. // After deletion, a key cannot be used to authenticate requests. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. func (hkh *HMACKeyHandle) Delete(ctx context.Context) error { delCall := hkh.raw.Delete(hkh.projectID, hkh.accessID) setClientHeader(delCall.Header()) @@ -133,7 +140,7 @@ func (hkh *HMACKeyHandle) Delete(ctx context.Context) error { }) } -func pbHmacKeyToHMACKey(pb *raw.HmacKey, isCreate bool) (*HMACKey, error) { +func pbHmacKeyToHMACKey(pb *raw.HmacKey, updatedTimeCanBeNil bool) (*HMACKey, error) { pbmd := pb.Metadata if pbmd == nil { return nil, errors.New("field Metadata cannot be nil") @@ -143,7 +150,7 @@ func pbHmacKeyToHMACKey(pb *raw.HmacKey, isCreate bool) (*HMACKey, error) { return nil, fmt.Errorf("field CreatedTime: %v", err) } updatedTime, err := time.Parse(time.RFC3339, pbmd.Updated) - if err != nil && !isCreate { + if err != nil && !updatedTimeCanBeNil { return nil, fmt.Errorf("field UpdatedTime: %v", err) } @@ -164,6 +171,8 @@ func pbHmacKeyToHMACKey(pb *raw.HmacKey, isCreate bool) (*HMACKey, error) { } // CreateHMACKey invokes an RPC for Google Cloud Storage to create a new HMACKey. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. func (c *Client) CreateHMACKey(ctx context.Context, projectID, serviceAccountEmail string) (*HMACKey, error) { if projectID == "" { return nil, errors.New("storage: expecting a non-blank projectID") @@ -190,6 +199,8 @@ func (c *Client) CreateHMACKey(ctx context.Context, projectID, serviceAccountEma } // HMACKeyAttrsToUpdate defines the attributes of an HMACKey that will be updated. +// +// This type is EXPERIMENTAL and subject to change or removal without notice. type HMACKeyAttrsToUpdate struct { // State is required and must be either StateActive or StateInactive. State HMACState @@ -199,6 +210,8 @@ type HMACKeyAttrsToUpdate struct { } // Update mutates the HMACKey referred to by accessID. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. func (h *HMACKeyHandle) Update(ctx context.Context, au HMACKeyAttrsToUpdate) (*HMACKey, error) { if au.State != Active && au.State != Inactive { return nil, fmt.Errorf("storage: invalid state %q for update, must be either %q or %q", au.State, Active, Inactive) @@ -225,3 +238,150 @@ func (h *HMACKeyHandle) Update(ctx context.Context, au HMACKeyAttrsToUpdate) (*H } return pbHmacKeyToHMACKey(hkPb, false) } + +// An HMACKeysIterator is an iterator over HMACKeys. +// +// This type is EXPERIMENTAL and subject to change or removal without notice. +type HMACKeysIterator struct { + ctx context.Context + raw *raw.ProjectsHmacKeysService + projectID string + hmacKeys []*HMACKey + pageInfo *iterator.PageInfo + nextFunc func() error + index int + desc hmacKeyDesc +} + +// ListHMACKeys returns an iterator for listing HMACKeys. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. +func (c *Client) ListHMACKeys(ctx context.Context, projectID string, opts ...HMACKeyOption) *HMACKeysIterator { + it := &HMACKeysIterator{ + ctx: ctx, + raw: raw.NewProjectsHmacKeysService(c.raw), + projectID: projectID, + } + + for _, opt := range opts { + opt.withHMACKeyDesc(&it.desc) + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo( + it.fetch, + func() int { return len(it.hmacKeys) - it.index }, + func() interface{} { + prev := it.hmacKeys + it.hmacKeys = it.hmacKeys[:0] + it.index = 0 + return prev + }) + return it +} + +// Next returns the next result. Its second return value is iterator.Done if +// there are no more results. Once Next returns iterator.Done, all subsequent +// calls will return iterator.Done. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. +func (it *HMACKeysIterator) Next() (*HMACKey, error) { + if err := it.nextFunc(); err != nil { + return nil, err + } + + key := it.hmacKeys[it.index] + it.index++ + + return key, nil +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +// +// This method is EXPERIMENTAL and subject to change or removal without notice. +func (it *HMACKeysIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } + +func (it *HMACKeysIterator) fetch(pageSize int, pageToken string) (token string, err error) { + call := it.raw.List(it.projectID) + setClientHeader(call.Header()) + if pageToken != "" { + call = call.PageToken(pageToken) + } + if it.desc.showDeletedKeys { + call = call.ShowDeletedKeys(true) + } + if it.desc.userProjectID != "" { + call = call.UserProject(it.desc.userProjectID) + } + if it.desc.forServiceAccountEmail != "" { + call = call.ServiceAccountEmail(it.desc.forServiceAccountEmail) + } + if pageSize > 0 { + call = call.MaxResults(int64(pageSize)) + } + + ctx := it.ctx + var resp *raw.HmacKeysMetadata + err = runWithRetry(it.ctx, func() error { + resp, err = call.Context(ctx).Do() + return err + }) + if err != nil { + return "", err + } + + for _, metadata := range resp.Items { + hkPb := &raw.HmacKey{ + Metadata: metadata, + } + hkey, err := pbHmacKeyToHMACKey(hkPb, true) + if err != nil { + return "", err + } + it.hmacKeys = append(it.hmacKeys, hkey) + } + return resp.NextPageToken, nil +} + +type hmacKeyDesc struct { + forServiceAccountEmail string + showDeletedKeys bool + userProjectID string +} + +// HMACKeyOption configures the behavior of HMACKey related methods and actions. +type HMACKeyOption interface { + withHMACKeyDesc(*hmacKeyDesc) +} + +type hmacKeyDescFunc func(*hmacKeyDesc) + +func (hkdf hmacKeyDescFunc) withHMACKeyDesc(hkd *hmacKeyDesc) { + hkdf(hkd) +} + +// ForHMACKeyServiceAccountEmail returns HMAC Keys that are +// associated with the email address of a service account in the project. +// +// Only one service account email can be used as a filter, so if multiple +// of these options are applied, the last email to be set will be used. +func ForHMACKeyServiceAccountEmail(serviceAccountEmail string) HMACKeyOption { + return hmacKeyDescFunc(func(hkd *hmacKeyDesc) { + hkd.forServiceAccountEmail = serviceAccountEmail + }) +} + +// ShowDeletedHMACKeys will also list keys whose state is "DELETED". +func ShowDeletedHMACKeys() HMACKeyOption { + return hmacKeyDescFunc(func(hkd *hmacKeyDesc) { + hkd.showDeletedKeys = true + }) +} + +// HMACKeysForUserProject will bill the request against userProjectID. +// +// Note: This is a noop right now and only provided for API compatibility. +func HMACKeysForUserProject(userProjectID string) HMACKeyOption { + return hmacKeyDescFunc(func(hkd *hmacKeyDesc) { + hkd.userProjectID = userProjectID + }) +} diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go index dbed8ac1bc99..5c83651bd9b7 100644 --- a/vendor/cloud.google.com/go/storage/reader.go +++ b/vendor/cloud.google.com/go/storage/reader.go @@ -43,6 +43,11 @@ type ReaderObjectAttrs struct { // Size is the length of the object's content. Size int64 + // StartOffset is the byte offset within the object + // from which reading begins. + // This value is only non-zero for range requests. + StartOffset int64 + // ContentType is the MIME type of the object's content. ContentType string @@ -78,7 +83,9 @@ func (o *ObjectHandle) NewReader(ctx context.Context) (*Reader, error) { // NewRangeReader reads part of an object, reading at most length bytes // starting at the given offset. If length is negative, the object is read -// until the end. +// until the end. If offset is negative, the object is read abs(offset) bytes +// from the end, and length must also be negative to indicate all remaining +// bytes will be read. func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) (r *Reader, err error) { ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.NewRangeReader") defer func() { trace.EndSpan(ctx, err) }() @@ -86,8 +93,8 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) if err := o.validate(); err != nil { return nil, err } - if offset < 0 { - return nil, fmt.Errorf("storage: invalid offset %d < 0", offset) + if offset < 0 && length >= 0 { + return nil, fmt.Errorf("storage: invalid offset %d < 0 requires negative length", offset) } if o.conds != nil { if err := o.conds.validate("NewRangeReader"); err != nil { @@ -124,7 +131,9 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) // have already read seen bytes. reopen := func(seen int64) (*http.Response, error) { start := offset + seen - if length < 0 && start > 0 { + if length < 0 && start < 0 { + req.Header.Set("Range", fmt.Sprintf("bytes=%d", start)) + } else if length < 0 && start > 0 { req.Header.Set("Range", fmt.Sprintf("bytes=%d-", start)) } else if length > 0 { // The end character isn't affected by how many bytes we've seen. @@ -177,20 +186,28 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) return nil, err } var ( - size int64 // total size of object, even if a range was requested. - checkCRC bool - crc uint32 + size int64 // total size of object, even if a range was requested. + checkCRC bool + crc uint32 + startOffset int64 // non-zero if range request. ) if res.StatusCode == http.StatusPartialContent { cr := strings.TrimSpace(res.Header.Get("Content-Range")) if !strings.HasPrefix(cr, "bytes ") || !strings.Contains(cr, "/") { - return nil, fmt.Errorf("storage: invalid Content-Range %q", cr) } size, err = strconv.ParseInt(cr[strings.LastIndex(cr, "/")+1:], 10, 64) if err != nil { return nil, fmt.Errorf("storage: invalid Content-Range %q", cr) } + + dashIndex := strings.Index(cr, "-") + if dashIndex >= 0 { + startOffset, err = strconv.ParseInt(cr[len("bytes="):dashIndex], 10, 64) + if err != nil { + return nil, fmt.Errorf("storage: invalid Content-Range %q: %v", cr, err) + } + } } else { size = res.ContentLength // Check the CRC iff all of the following hold: @@ -236,6 +253,7 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) ContentEncoding: res.Header.Get("Content-Encoding"), CacheControl: res.Header.Get("Cache-Control"), LastModified: lm, + StartOffset: startOffset, Generation: gen, Metageneration: metaGen, } diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go index d35bd7568e79..1ffb10f6446e 100644 --- a/vendor/cloud.google.com/go/storage/storage.go +++ b/vendor/cloud.google.com/go/storage/storage.go @@ -992,10 +992,8 @@ type ObjectAttrs struct { // StorageClass is the storage class of the object. // This value defines how objects in the bucket are stored and // determines the SLA and the cost of storage. Typical values are - // "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD" - // and "DURABLE_REDUCED_AVAILABILITY". - // It defaults to "STANDARD", which is equivalent to "MULTI_REGIONAL" - // or "REGIONAL" depending on the bucket's location settings. + // "NEARLINE", "COLDLINE" and "STANDARD". + // It defaults to "STANDARD". StorageClass string // Created is the time the object was created. This field is read-only. diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go index 0f52414b84c7..a11659212870 100644 --- a/vendor/cloud.google.com/go/storage/writer.go +++ b/vendor/cloud.google.com/go/storage/writer.go @@ -148,21 +148,16 @@ func (w *Writer) open() error { call.UserProject(w.o.userProject) } setClientHeader(call.Header()) - // If the chunk size is zero, then no chunking is done on the Reader, - // which means we cannot retry: the first call will read the data, and if - // it fails, there is no way to re-read. - if w.ChunkSize == 0 { - resp, err = call.Do() - } else { - // We will only retry here if the initial POST, which obtains a URI for - // the resumable upload, fails with a retryable error. The upload itself - // has its own retry logic. - err = runWithRetry(w.ctx, func() error { - var err2 error - resp, err2 = call.Do() - return err2 - }) - } + + // The internals that perform call.Do automatically retry + // uploading chunks, hence no need to add retries here. + // See issue https://github.com/googleapis/google-cloud-go/issues/1507. + // + // However, since this whole call's internals involve making the initial + // resumable upload session, the first HTTP request is not retried. + // TODO: Follow-up with google.golang.org/gensupport to solve + // https://github.com/googleapis/google-api-go-client/issues/392. + resp, err = call.Do() } if err != nil { w.mu.Lock() @@ -231,7 +226,7 @@ func (w *Writer) Close() error { } // monitorCancel is intended to be used as a background goroutine. It monitors the -// the context, and when it observes that the context has been canceled, it manually +// context, and when it observes that the context has been canceled, it manually // closes things that do not take a context. func (w *Writer) monitorCancel() { select { diff --git a/vendor/cloud.google.com/go/tools.go b/vendor/cloud.google.com/go/tools.go new file mode 100644 index 000000000000..fa01cc44ccc4 --- /dev/null +++ b/vendor/cloud.google.com/go/tools.go @@ -0,0 +1,33 @@ +// +build tools + +// Copyright 2018 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. + +// This package exists to cause `go mod` and `go get` to believe these tools +// are dependencies, even though they are not runtime dependencies of any +// package (these are tools used by our CI builds). This means they will appear +// in our `go.mod` file, but will not be a part of the build. Also, since the +// build target is something non-existent, these should not be included in any +// binaries. + +package cloud + +import ( + _ "github.com/golang/protobuf/protoc-gen-go" + _ "github.com/jstemmer/go-junit-report" + _ "golang.org/x/exp/cmd/apidiff" + _ "golang.org/x/lint/golint" + _ "golang.org/x/tools/cmd/goimports" + _ "honnef.co/go/tools/cmd/staticcheck" +) diff --git a/vendor/code.cloudfoundry.org/go-diodes/.travis.yml b/vendor/code.cloudfoundry.org/go-diodes/.travis.yml new file mode 100644 index 000000000000..a9992c4da7a6 --- /dev/null +++ b/vendor/code.cloudfoundry.org/go-diodes/.travis.yml @@ -0,0 +1,17 @@ +language: go + +go: + - 1.x + - master + +install: | + mkdir -p $HOME/gopath/src/code.cloudfoundry.org/go-diodes + rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/code.cloudfoundry.org/go-diodes/ + export TRAVIS_BUILD_DIR=$GOPATH/src/code.cloudfoundry.org/go-diodes + go get -t -d -v code.cloudfoundry.org/go-diodes/... + +script: go test code.cloudfoundry.org/go-diodes/... --race + +matrix: + allow_failures: + - go: master diff --git a/vendor/code.cloudfoundry.org/go-loggregator/.gitignore b/vendor/code.cloudfoundry.org/go-loggregator/.gitignore new file mode 100644 index 000000000000..723ef36f4e4f --- /dev/null +++ b/vendor/code.cloudfoundry.org/go-loggregator/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/go-loggregator/.travis.yml b/vendor/code.cloudfoundry.org/go-loggregator/.travis.yml new file mode 100644 index 000000000000..7034555ad27d --- /dev/null +++ b/vendor/code.cloudfoundry.org/go-loggregator/.travis.yml @@ -0,0 +1,21 @@ +language: go + +go: +- 1.10.x +- 1.11.x +- master + +install: | + mkdir -p $HOME/gopath/src/code.cloudfoundry.org/go-loggregator + rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/code.cloudfoundry.org/go-loggregator/ + export TRAVIS_BUILD_DIR=$GOPATH/src/code.cloudfoundry.org/go-loggregator + go get -t -d -v code.cloudfoundry.org/go-loggregator/... + +script: | + cd $GOPATH + cd src/code.cloudfoundry.org/go-loggregator + go test ./... + +matrix: + allow_failures: + - go: master diff --git a/vendor/code.cloudfoundry.org/go-loggregator/go.mod b/vendor/code.cloudfoundry.org/go-loggregator/go.mod deleted file mode 100644 index 753f656bb9cf..000000000000 --- a/vendor/code.cloudfoundry.org/go-loggregator/go.mod +++ /dev/null @@ -1,33 +0,0 @@ -module code.cloudfoundry.org/go-loggregator - -go 1.12 - -require ( - code.cloudfoundry.org/go-diodes v0.0.0-20180905200951-72629b5276e3 - code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a - github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 // indirect - github.com/cloudfoundry/dropsonde v1.0.0 - github.com/cloudfoundry/gosteno v0.0.0-20150423193413-0c8581caea35 // indirect - github.com/cloudfoundry/loggregatorlib v0.0.0-20170823162133-36eddf15ef12 // indirect - github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 - github.com/gogo/protobuf v1.2.1 - github.com/golang/protobuf v1.3.2 - github.com/kr/pretty v0.1.0 // indirect - github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect - github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect - github.com/onsi/ginkgo v1.8.0 - github.com/onsi/gomega v1.5.0 - github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 // indirect - github.com/prometheus/client_golang v1.0.0 - github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 - github.com/prometheus/common v0.6.0 - github.com/prometheus/procfs v0.0.3 // indirect - golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 - golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 // indirect - golang.org/x/text v0.3.2 // indirect - google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 // indirect - google.golang.org/grpc v1.22.1 - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect - gopkg.in/yaml.v2 v2.2.2 // indirect - launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect -) diff --git a/vendor/code.cloudfoundry.org/go-loggregator/go.sum b/vendor/code.cloudfoundry.org/go-loggregator/go.sum deleted file mode 100644 index 4ce889217e4b..000000000000 --- a/vendor/code.cloudfoundry.org/go-loggregator/go.sum +++ /dev/null @@ -1,158 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -code.cloudfoundry.org/go-diodes v0.0.0-20180905200951-72629b5276e3 h1:oHsfl5AaineZubAUOXg2Vxcdu/TzgN/Q+/65lN70LZk= -code.cloudfoundry.org/go-diodes v0.0.0-20180905200951-72629b5276e3/go.mod h1:Jzi+ccHgo/V/PLQUaQ6hnZcC1c4BS790gx21LRRui4g= -code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= -code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77 h1:afT88tB6u9JCKQZVAAaa9ICz/uGn5Uw9ekn6P22mYKM= -github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:bXvGk6IkT1Agy7qzJ+DjIw/SJ1AaB3AvAuMDVV+Vkoo= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudfoundry/dropsonde v1.0.0 h1:9MT6WFmhU96fQjhTiglx4b1X3ObNjk/Sze7KPntNitE= -github.com/cloudfoundry/dropsonde v1.0.0/go.mod h1:6zwvrWK5TpxBVYi1cdkE5WDsIO8E0n7qAJg3wR9B67c= -github.com/cloudfoundry/gosteno v0.0.0-20150423193413-0c8581caea35 h1:HdAWGlVEbFxuALqHXYu14XvAbRbyWZLd817ojygGnk0= -github.com/cloudfoundry/gosteno v0.0.0-20150423193413-0c8581caea35/go.mod h1:3YBPUR85RIrvaUTdA1dL38YSp6s3OHu1xrWLkGt2Mog= -github.com/cloudfoundry/loggregatorlib v0.0.0-20170823162133-36eddf15ef12 h1:A+SRy/ndY6QSrN+bVWIhKDLU4t7OLFWVlLPxUWL/oGE= -github.com/cloudfoundry/loggregatorlib v0.0.0-20170823162133-36eddf15ef12/go.mod h1:ucj7+svyACshmxV3Zze2NAcEcdbBf9scZYR+QKCX9/w= -github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 h1:cWfya7mo/zbnwYVio6eWGsFJHqYw4/k/uhwIJ1eqRPI= -github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -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/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/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= -github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/poy/eachers v0.0.0-20181020210610-23942921fe77 h1:SNdqPRvRsVmYR0gKqFvrUKhFizPJ6yDiGQ++VAJIoDg= -github.com/poy/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:x1vqpbcMW9T/KRcQ4b48diSiSVtYgvwQ5xzDByEg4WE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -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-20190313153728-d0100b6bd8b3/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/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-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -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-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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/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/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -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/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 h1:Ygq9/SRJX9+dU0WCIICM8RkWvDw03lvB77hrhJnpxfU= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.22.1 h1:/7cs52RnTJmD43s3uxzlq2U7nqVTd/37viQwMrMNlOM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= diff --git a/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/generate.sh b/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/generate.sh old mode 100755 new mode 100644 diff --git a/vendor/code.cloudfoundry.org/rfc5424/.travis.yml b/vendor/code.cloudfoundry.org/rfc5424/.travis.yml new file mode 100644 index 000000000000..d15fd7c0f860 --- /dev/null +++ b/vendor/code.cloudfoundry.org/rfc5424/.travis.yml @@ -0,0 +1,5 @@ +language: go + +go: + - 1.10 + - 1.11 diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md b/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md deleted file mode 100644 index 0786fdf43468..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md +++ /dev/null @@ -1,24 +0,0 @@ -# How to contribute - -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution, -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - -## Code reviews - -All submissions, including submissions by project members, require review. We -use GitHub pull requests for this purpose. Consult [GitHub Help] for more -information on using pull requests. - -[GitHub Help]: https://help.github.com/articles/about-pull-requests/ diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE b/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE deleted file mode 100644 index 261eeb9e9f8b..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md b/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md deleted file mode 100644 index 3b9e908f5967..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# OpenCensus Agent Go Exporter - -[![Build Status][travis-image]][travis-url] [![GoDoc][godoc-image]][godoc-url] - - -This repository contains the Go implementation of the OpenCensus Agent (OC-Agent) Exporter. -OC-Agent is a deamon process running in a VM that can retrieve spans/stats/metrics from -OpenCensus Library, export them to other backends and possibly push configurations back to -Library. See more details on [OC-Agent Readme][OCAgentReadme]. - -Note: This is an experimental repository and is likely to get backwards-incompatible changes. -Ultimately we may want to move the OC-Agent Go Exporter to [OpenCensus Go core library][OpenCensusGo]. - -## Installation - -```bash -$ go get -u contrib.go.opencensus.io/exporter/ocagent -``` - -## Usage - -```go -import ( - "context" - "fmt" - "log" - "time" - - "contrib.go.opencensus.io/exporter/ocagent" - "go.opencensus.io/trace" -) - -func Example() { - exp, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithServiceName("your-service-name")) - if err != nil { - log.Fatalf("Failed to create the agent exporter: %v", err) - } - defer exp.Stop() - - // Now register it as a trace exporter. - trace.RegisterExporter(exp) - - // Then use the OpenCensus tracing library, like we normally would. - ctx, span := trace.StartSpan(context.Background(), "AgentExporter-Example") - defer span.End() - - for i := 0; i < 10; i++ { - _, iSpan := trace.StartSpan(ctx, fmt.Sprintf("Sample-%d", i)) - <-time.After(6 * time.Millisecond) - iSpan.End() - } -} -``` - -[OCAgentReadme]: https://github.com/census-instrumentation/opencensus-proto/tree/master/opencensus/proto/agent#opencensus-agent-proto -[OpenCensusGo]: https://github.com/census-instrumentation/opencensus-go -[godoc-image]: https://godoc.org/contrib.go.opencensus.io/exporter/ocagent?status.svg -[godoc-url]: https://godoc.org/contrib.go.opencensus.io/exporter/ocagent -[travis-image]: https://travis-ci.org/census-ecosystem/opencensus-go-exporter-ocagent.svg?branch=master -[travis-url]: https://travis-ci.org/census-ecosystem/opencensus-go-exporter-ocagent - diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go deleted file mode 100644 index 297e44b6e76d..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2018, OpenCensus Authors -// -// 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 ocagent - -import ( - "math/rand" - "time" -) - -var randSrc = rand.New(rand.NewSource(time.Now().UnixNano())) - -// retries function fn upto n times, if fn returns an error lest it returns nil early. -// It applies exponential backoff in units of (1< 0 { - ctx = metadata.NewOutgoingContext(ctx, metadata.New(ae.headers)) - } - traceExporter, err := traceSvcClient.Export(ctx) - if err != nil { - return fmt.Errorf("Exporter.Start:: TraceServiceClient: %v", err) - } - - firstTraceMessage := &agenttracepb.ExportTraceServiceRequest{ - Node: node, - Resource: ae.resource, - } - if err := traceExporter.Send(firstTraceMessage); err != nil { - return fmt.Errorf("Exporter.Start:: Failed to initiate the Config service: %v", err) - } - - ae.mu.Lock() - ae.traceExporter = traceExporter - ae.mu.Unlock() - - // Initiate the config service by sending over node identifier info. - configStream, err := traceSvcClient.Config(context.Background()) - if err != nil { - return fmt.Errorf("Exporter.Start:: ConfigStream: %v", err) - } - firstCfgMessage := &agenttracepb.CurrentLibraryConfig{Node: node} - if err := configStream.Send(firstCfgMessage); err != nil { - return fmt.Errorf("Exporter.Start:: Failed to initiate the Config service: %v", err) - } - - // In the background, handle trace configurations that are beamed down - // by the agent, but also reply to it with the applied configuration. - go ae.handleConfigStreaming(configStream) - - return nil -} - -func (ae *Exporter) createMetricsServiceConnection(cc *grpc.ClientConn, node *commonpb.Node) error { - metricsSvcClient := agentmetricspb.NewMetricsServiceClient(cc) - metricsExporter, err := metricsSvcClient.Export(context.Background()) - if err != nil { - return fmt.Errorf("MetricsExporter: failed to start the service client: %v", err) - } - // Initiate the metrics service by sending over the first message just containing the Node and Resource. - firstMetricsMessage := &agentmetricspb.ExportMetricsServiceRequest{ - Node: node, - Resource: ae.resource, - } - if err := metricsExporter.Send(firstMetricsMessage); err != nil { - return fmt.Errorf("MetricsExporter:: failed to send the first message: %v", err) - } - - ae.mu.Lock() - ae.metricsExporter = metricsExporter - ae.mu.Unlock() - - // With that we are good to go and can start sending metrics - return nil -} - -func (ae *Exporter) dialToAgent() (*grpc.ClientConn, error) { - addr := ae.prepareAgentAddress() - var dialOpts []grpc.DialOption - if ae.clientTransportCredentials != nil { - dialOpts = append(dialOpts, grpc.WithTransportCredentials(ae.clientTransportCredentials)) - } else if ae.canDialInsecure { - dialOpts = append(dialOpts, grpc.WithInsecure()) - } - if ae.compressor != "" { - dialOpts = append(dialOpts, grpc.WithDefaultCallOptions(grpc.UseCompressor(ae.compressor))) - } - dialOpts = append(dialOpts, grpc.WithStatsHandler(&ocgrpc.ClientHandler{})) - if len(ae.grpcDialOptions) != 0 { - dialOpts = append(dialOpts, ae.grpcDialOptions...) - } - - ctx := context.Background() - if len(ae.headers) > 0 { - ctx = metadata.NewOutgoingContext(ctx, metadata.New(ae.headers)) - } - return grpc.DialContext(ctx, addr, dialOpts...) -} - -func (ae *Exporter) handleConfigStreaming(configStream agenttracepb.TraceService_ConfigClient) error { - // Note: We haven't yet implemented configuration sending so we - // should NOT be changing connection states within this function for now. - for { - recv, err := configStream.Recv() - if err != nil { - // TODO: Check if this is a transient error or exponential backoff-able. - return err - } - cfg := recv.Config - if cfg == nil { - continue - } - - // Otherwise now apply the trace configuration sent down from the agent - if psamp := cfg.GetProbabilitySampler(); psamp != nil { - trace.ApplyConfig(trace.Config{DefaultSampler: trace.ProbabilitySampler(psamp.SamplingProbability)}) - } else if csamp := cfg.GetConstantSampler(); csamp != nil { - alwaysSample := csamp.Decision == tracepb.ConstantSampler_ALWAYS_ON - if alwaysSample { - trace.ApplyConfig(trace.Config{DefaultSampler: trace.AlwaysSample()}) - } else { - trace.ApplyConfig(trace.Config{DefaultSampler: trace.NeverSample()}) - } - } else { // TODO: Add the rate limiting sampler here - } - - // Then finally send back to upstream the newly applied configuration - err = configStream.Send(&agenttracepb.CurrentLibraryConfig{Config: &tracepb.TraceConfig{Sampler: cfg.Sampler}}) - if err != nil { - return err - } - } -} - -// Stop shuts down all the connections and resources -// related to the exporter. -func (ae *Exporter) Stop() error { - ae.mu.RLock() - cc := ae.grpcClientConn - started := ae.started - stopped := ae.stopped - ae.mu.RUnlock() - - if !started { - return errNotStarted - } - if stopped { - // TODO: tell the user that we've already stopped, so perhaps a sentinel error? - return nil - } - - ae.Flush() - - // Now close the underlying gRPC connection. - var err error - if cc != nil { - err = cc.Close() - } - - // At this point we can change the state variables: started and stopped - ae.mu.Lock() - ae.started = false - ae.stopped = true - ae.mu.Unlock() - close(ae.stopCh) - - // Ensure that the backgroundConnector returns - <-ae.backgroundConnectionDoneCh - - return err -} - -func (ae *Exporter) ExportSpan(sd *trace.SpanData) { - if sd == nil { - return - } - _ = ae.traceBundler.Add(sd, 1) -} - -func (ae *Exporter) ExportTraceServiceRequest(batch *agenttracepb.ExportTraceServiceRequest) error { - if batch == nil || len(batch.Spans) == 0 { - return nil - } - - select { - case <-ae.stopCh: - return errStopped - - default: - if lastConnectErr := ae.lastConnectError(); lastConnectErr != nil { - return fmt.Errorf("ExportTraceServiceRequest: no active connection, last connection error: %v", lastConnectErr) - } - - ae.senderMu.Lock() - err := ae.traceExporter.Send(batch) - ae.senderMu.Unlock() - if err != nil { - if err == io.EOF { - ae.recvMu.Lock() - // Perform a .Recv to try to find out why the RPC actually ended. - // See: - // * https://github.com/grpc/grpc-go/blob/d389f9fac68eea0dcc49957d0b4cca5b3a0a7171/stream.go#L98-L100 - // * https://groups.google.com/forum/#!msg/grpc-io/XcN4hA9HonI/F_UDiejTAwAJ - for { - _, err = ae.traceExporter.Recv() - if err != nil { - break - } - } - ae.recvMu.Unlock() - } - - ae.setStateDisconnected(err) - if err != io.EOF { - return err - } - } - return nil - } -} - -func (ae *Exporter) ExportView(vd *view.Data) { - if vd == nil { - return - } - _ = ae.viewDataBundler.Add(vd, 1) -} - -func ocSpanDataToPbSpans(sdl []*trace.SpanData) []*tracepb.Span { - if len(sdl) == 0 { - return nil - } - protoSpans := make([]*tracepb.Span, 0, len(sdl)) - for _, sd := range sdl { - if sd != nil { - protoSpans = append(protoSpans, ocSpanToProtoSpan(sd)) - } - } - return protoSpans -} - -func (ae *Exporter) uploadTraces(sdl []*trace.SpanData) { - select { - case <-ae.stopCh: - return - - default: - if !ae.connected() { - return - } - - protoSpans := ocSpanDataToPbSpans(sdl) - if len(protoSpans) == 0 { - return - } - ae.senderMu.Lock() - err := ae.traceExporter.Send(&agenttracepb.ExportTraceServiceRequest{ - Spans: protoSpans, - }) - ae.senderMu.Unlock() - if err != nil { - ae.setStateDisconnected(err) - } - } -} - -func ocViewDataToPbMetrics(vdl []*view.Data) []*metricspb.Metric { - if len(vdl) == 0 { - return nil - } - metrics := make([]*metricspb.Metric, 0, len(vdl)) - for _, vd := range vdl { - if vd != nil { - vmetric, err := viewDataToMetric(vd) - // TODO: (@odeke-em) somehow report this error, if it is non-nil. - if err == nil && vmetric != nil { - metrics = append(metrics, vmetric) - } - } - } - return metrics -} - -func (ae *Exporter) uploadViewData(vdl []*view.Data) { - select { - case <-ae.stopCh: - return - - default: - if !ae.connected() { - return - } - - protoMetrics := ocViewDataToPbMetrics(vdl) - if len(protoMetrics) == 0 { - return - } - err := ae.metricsExporter.Send(&agentmetricspb.ExportMetricsServiceRequest{ - Metrics: protoMetrics, - // TODO:(@odeke-em) - // a) Figure out how to derive a Node from the environment - // b) Figure out how to derive a Resource from the environment - // or better letting users of the exporter configure it. - }) - if err != nil { - ae.setStateDisconnected(err) - } - } -} - -func (ae *Exporter) Flush() { - ae.traceBundler.Flush() - ae.viewDataBundler.Flush() -} - -func resourceProtoFromEnv() *resourcepb.Resource { - rs, _ := resource.FromEnv(context.Background()) - if rs == nil { - return nil - } - return resourceToResourcePb(rs) -} - -func resourceToResourcePb(rs *resource.Resource) *resourcepb.Resource { - rprs := &resourcepb.Resource{ - Type: rs.Type, - } - if rs.Labels != nil { - rprs.Labels = make(map[string]string) - for k, v := range rs.Labels { - rprs.Labels[k] = v - } - } - return rprs -} diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/options.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/options.go deleted file mode 100644 index 6820216f3bce..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/options.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2018, OpenCensus Authors -// -// 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 ocagent - -import ( - "time" - - "go.opencensus.io/resource" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" -) - -const ( - DefaultAgentPort uint16 = 55678 - DefaultAgentHost string = "localhost" -) - -type ExporterOption interface { - withExporter(e *Exporter) -} - -type resourceDetector resource.Detector - -var _ ExporterOption = (*resourceDetector)(nil) - -func (rd resourceDetector) withExporter(e *Exporter) { - e.resourceDetector = resource.Detector(rd) -} - -// WithResourceDetector allows one to register a resource detector. Resource Detector is used -// to detect resources associated with the application. Detected resource is exported -// along with the metrics. If the detector fails then it panics. -// If a resource detector is not provided then by default it detects from the environment. -func WithResourceDetector(rd resource.Detector) ExporterOption { - return resourceDetector(rd) -} - -type insecureGrpcConnection int - -var _ ExporterOption = (*insecureGrpcConnection)(nil) - -func (igc *insecureGrpcConnection) withExporter(e *Exporter) { - e.canDialInsecure = true -} - -// WithInsecure disables client transport security for the exporter's gRPC connection -// just like grpc.WithInsecure() https://godoc.org/google.golang.org/grpc#WithInsecure -// does. Note, by default, client security is required unless WithInsecure is used. -func WithInsecure() ExporterOption { return new(insecureGrpcConnection) } - -type addressSetter string - -func (as addressSetter) withExporter(e *Exporter) { - e.agentAddress = string(as) -} - -var _ ExporterOption = (*addressSetter)(nil) - -// WithAddress allows one to set the address that the exporter will -// connect to the agent on. If unset, it will instead try to use -// connect to DefaultAgentHost:DefaultAgentPort -func WithAddress(addr string) ExporterOption { - return addressSetter(addr) -} - -type serviceNameSetter string - -func (sns serviceNameSetter) withExporter(e *Exporter) { - e.serviceName = string(sns) -} - -var _ ExporterOption = (*serviceNameSetter)(nil) - -// WithServiceName allows one to set/override the service name -// that the exporter will report to the agent. -func WithServiceName(serviceName string) ExporterOption { - return serviceNameSetter(serviceName) -} - -type reconnectionPeriod time.Duration - -func (rp reconnectionPeriod) withExporter(e *Exporter) { - e.reconnectionPeriod = time.Duration(rp) -} - -func WithReconnectionPeriod(rp time.Duration) ExporterOption { - return reconnectionPeriod(rp) -} - -type compressorSetter string - -func (c compressorSetter) withExporter(e *Exporter) { - e.compressor = string(c) -} - -// UseCompressor will set the compressor for the gRPC client to use when sending requests. -// It is the responsibility of the caller to ensure that the compressor set has been registered -// with google.golang.org/grpc/encoding. This can be done by encoding.RegisterCompressor. Some -// compressors auto-register on import, such as gzip, which can be registered by calling -// `import _ "google.golang.org/grpc/encoding/gzip"` -func UseCompressor(compressorName string) ExporterOption { - return compressorSetter(compressorName) -} - -type headerSetter map[string]string - -func (h headerSetter) withExporter(e *Exporter) { - e.headers = map[string]string(h) -} - -// WithHeaders will send the provided headers when the gRPC stream connection -// is instantiated -func WithHeaders(headers map[string]string) ExporterOption { - return headerSetter(headers) -} - -type clientCredentials struct { - credentials.TransportCredentials -} - -var _ ExporterOption = (*clientCredentials)(nil) - -// WithTLSCredentials allows the connection to use TLS credentials -// when talking to the server. It takes in grpc.TransportCredentials instead -// of say a Certificate file or a tls.Certificate, because the retrieving -// these credentials can be done in many ways e.g. plain file, in code tls.Config -// or by certificate rotation, so it is up to the caller to decide what to use. -func WithTLSCredentials(creds credentials.TransportCredentials) ExporterOption { - return &clientCredentials{TransportCredentials: creds} -} - -func (cc *clientCredentials) withExporter(e *Exporter) { - e.clientTransportCredentials = cc.TransportCredentials -} - -type grpcDialOptions []grpc.DialOption - -var _ ExporterOption = (*grpcDialOptions)(nil) - -// WithGRPCDialOption opens support to any grpc.DialOption to be used. If it conflicts -// with some other configuration the GRPC specified via the agent the ones here will -// take preference since they are set last. -func WithGRPCDialOption(opts ...grpc.DialOption) ExporterOption { - return grpcDialOptions(opts) -} - -func (opts grpcDialOptions) withExporter(e *Exporter) { - e.grpcDialOptions = opts -} diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_spans.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_spans.go deleted file mode 100644 index 983ebe7b70f2..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_spans.go +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright 2018, OpenCensus Authors -// -// 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 ocagent - -import ( - "math" - "time" - - "go.opencensus.io/trace" - "go.opencensus.io/trace/tracestate" - - tracepb "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" - "github.com/golang/protobuf/ptypes/timestamp" -) - -const ( - maxAnnotationEventsPerSpan = 32 - maxMessageEventsPerSpan = 128 -) - -func ocSpanToProtoSpan(sd *trace.SpanData) *tracepb.Span { - if sd == nil { - return nil - } - var namePtr *tracepb.TruncatableString - if sd.Name != "" { - namePtr = &tracepb.TruncatableString{Value: sd.Name} - } - return &tracepb.Span{ - TraceId: sd.TraceID[:], - SpanId: sd.SpanID[:], - ParentSpanId: sd.ParentSpanID[:], - Status: ocStatusToProtoStatus(sd.Status), - StartTime: timeToTimestamp(sd.StartTime), - EndTime: timeToTimestamp(sd.EndTime), - Links: ocLinksToProtoLinks(sd.Links), - Kind: ocSpanKindToProtoSpanKind(sd.SpanKind), - Name: namePtr, - Attributes: ocAttributesToProtoAttributes(sd.Attributes), - TimeEvents: ocTimeEventsToProtoTimeEvents(sd.Annotations, sd.MessageEvents), - Tracestate: ocTracestateToProtoTracestate(sd.Tracestate), - } -} - -var blankStatus trace.Status - -func ocStatusToProtoStatus(status trace.Status) *tracepb.Status { - if status == blankStatus { - return nil - } - return &tracepb.Status{ - Code: status.Code, - Message: status.Message, - } -} - -func ocLinksToProtoLinks(links []trace.Link) *tracepb.Span_Links { - if len(links) == 0 { - return nil - } - - sl := make([]*tracepb.Span_Link, 0, len(links)) - for _, ocLink := range links { - // This redefinition is necessary to prevent ocLink.*ID[:] copies - // being reused -- in short we need a new ocLink per iteration. - ocLink := ocLink - - sl = append(sl, &tracepb.Span_Link{ - TraceId: ocLink.TraceID[:], - SpanId: ocLink.SpanID[:], - Type: ocLinkTypeToProtoLinkType(ocLink.Type), - }) - } - - return &tracepb.Span_Links{ - Link: sl, - } -} - -func ocLinkTypeToProtoLinkType(oct trace.LinkType) tracepb.Span_Link_Type { - switch oct { - case trace.LinkTypeChild: - return tracepb.Span_Link_CHILD_LINKED_SPAN - case trace.LinkTypeParent: - return tracepb.Span_Link_PARENT_LINKED_SPAN - default: - return tracepb.Span_Link_TYPE_UNSPECIFIED - } -} - -func ocAttributesToProtoAttributes(attrs map[string]interface{}) *tracepb.Span_Attributes { - if len(attrs) == 0 { - return nil - } - outMap := make(map[string]*tracepb.AttributeValue) - for k, v := range attrs { - switch v := v.(type) { - case bool: - outMap[k] = &tracepb.AttributeValue{Value: &tracepb.AttributeValue_BoolValue{BoolValue: v}} - - case int: - outMap[k] = &tracepb.AttributeValue{Value: &tracepb.AttributeValue_IntValue{IntValue: int64(v)}} - - case int64: - outMap[k] = &tracepb.AttributeValue{Value: &tracepb.AttributeValue_IntValue{IntValue: v}} - - case string: - outMap[k] = &tracepb.AttributeValue{ - Value: &tracepb.AttributeValue_StringValue{ - StringValue: &tracepb.TruncatableString{Value: v}, - }, - } - } - } - return &tracepb.Span_Attributes{ - AttributeMap: outMap, - } -} - -// This code is mostly copied from -// https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/blob/master/trace_proto.go#L46 -func ocTimeEventsToProtoTimeEvents(as []trace.Annotation, es []trace.MessageEvent) *tracepb.Span_TimeEvents { - if len(as) == 0 && len(es) == 0 { - return nil - } - - timeEvents := &tracepb.Span_TimeEvents{} - var annotations, droppedAnnotationsCount int - var messageEvents, droppedMessageEventsCount int - - // Transform annotations - for i, a := range as { - if annotations >= maxAnnotationEventsPerSpan { - droppedAnnotationsCount = len(as) - i - break - } - annotations++ - timeEvents.TimeEvent = append(timeEvents.TimeEvent, - &tracepb.Span_TimeEvent{ - Time: timeToTimestamp(a.Time), - Value: transformAnnotationToTimeEvent(&a), - }, - ) - } - - // Transform message events - for i, e := range es { - if messageEvents >= maxMessageEventsPerSpan { - droppedMessageEventsCount = len(es) - i - break - } - messageEvents++ - timeEvents.TimeEvent = append(timeEvents.TimeEvent, - &tracepb.Span_TimeEvent{ - Time: timeToTimestamp(e.Time), - Value: transformMessageEventToTimeEvent(&e), - }, - ) - } - - // Process dropped counter - timeEvents.DroppedAnnotationsCount = clip32(droppedAnnotationsCount) - timeEvents.DroppedMessageEventsCount = clip32(droppedMessageEventsCount) - - return timeEvents -} - -func transformAnnotationToTimeEvent(a *trace.Annotation) *tracepb.Span_TimeEvent_Annotation_ { - return &tracepb.Span_TimeEvent_Annotation_{ - Annotation: &tracepb.Span_TimeEvent_Annotation{ - Description: &tracepb.TruncatableString{Value: a.Message}, - Attributes: ocAttributesToProtoAttributes(a.Attributes), - }, - } -} - -func transformMessageEventToTimeEvent(e *trace.MessageEvent) *tracepb.Span_TimeEvent_MessageEvent_ { - return &tracepb.Span_TimeEvent_MessageEvent_{ - MessageEvent: &tracepb.Span_TimeEvent_MessageEvent{ - Type: tracepb.Span_TimeEvent_MessageEvent_Type(e.EventType), - Id: uint64(e.MessageID), - UncompressedSize: uint64(e.UncompressedByteSize), - CompressedSize: uint64(e.CompressedByteSize), - }, - } -} - -// clip32 clips an int to the range of an int32. -func clip32(x int) int32 { - if x < math.MinInt32 { - return math.MinInt32 - } - if x > math.MaxInt32 { - return math.MaxInt32 - } - return int32(x) -} - -func timeToTimestamp(t time.Time) *timestamp.Timestamp { - nanoTime := t.UnixNano() - return ×tamp.Timestamp{ - Seconds: nanoTime / 1e9, - Nanos: int32(nanoTime % 1e9), - } -} - -func ocSpanKindToProtoSpanKind(kind int) tracepb.Span_SpanKind { - switch kind { - case trace.SpanKindClient: - return tracepb.Span_CLIENT - case trace.SpanKindServer: - return tracepb.Span_SERVER - default: - return tracepb.Span_SPAN_KIND_UNSPECIFIED - } -} - -func ocTracestateToProtoTracestate(ts *tracestate.Tracestate) *tracepb.Span_Tracestate { - if ts == nil { - return nil - } - return &tracepb.Span_Tracestate{ - Entries: ocTracestateEntriesToProtoTracestateEntries(ts.Entries()), - } -} - -func ocTracestateEntriesToProtoTracestateEntries(entries []tracestate.Entry) []*tracepb.Span_Tracestate_Entry { - protoEntries := make([]*tracepb.Span_Tracestate_Entry, 0, len(entries)) - for _, entry := range entries { - protoEntries = append(protoEntries, &tracepb.Span_Tracestate_Entry{ - Key: entry.Key, - Value: entry.Value, - }) - } - return protoEntries -} diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go deleted file mode 100644 index 43f18dec1938..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2018, OpenCensus Authors -// -// 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 ocagent - -import ( - "errors" - "time" - - "go.opencensus.io/stats" - "go.opencensus.io/stats/view" - "go.opencensus.io/tag" - - "github.com/golang/protobuf/ptypes/timestamp" - - metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" -) - -var ( - errNilMeasure = errors.New("expecting a non-nil stats.Measure") - errNilView = errors.New("expecting a non-nil view.View") - errNilViewData = errors.New("expecting a non-nil view.Data") -) - -func viewDataToMetric(vd *view.Data) (*metricspb.Metric, error) { - if vd == nil { - return nil, errNilViewData - } - - descriptor, err := viewToMetricDescriptor(vd.View) - if err != nil { - return nil, err - } - - timeseries, err := viewDataToTimeseries(vd) - if err != nil { - return nil, err - } - - metric := &metricspb.Metric{ - MetricDescriptor: descriptor, - Timeseries: timeseries, - } - return metric, nil -} - -func viewToMetricDescriptor(v *view.View) (*metricspb.MetricDescriptor, error) { - if v == nil { - return nil, errNilView - } - if v.Measure == nil { - return nil, errNilMeasure - } - - desc := &metricspb.MetricDescriptor{ - Name: stringOrCall(v.Name, v.Measure.Name), - Description: stringOrCall(v.Description, v.Measure.Description), - Unit: v.Measure.Unit(), - Type: aggregationToMetricDescriptorType(v), - LabelKeys: tagKeysToLabelKeys(v.TagKeys), - } - return desc, nil -} - -func stringOrCall(first string, call func() string) string { - if first != "" { - return first - } - return call() -} - -type measureType uint - -const ( - measureUnknown measureType = iota - measureInt64 - measureFloat64 -) - -func measureTypeFromMeasure(m stats.Measure) measureType { - switch m.(type) { - default: - return measureUnknown - case *stats.Float64Measure: - return measureFloat64 - case *stats.Int64Measure: - return measureInt64 - } -} - -func aggregationToMetricDescriptorType(v *view.View) metricspb.MetricDescriptor_Type { - if v == nil || v.Aggregation == nil { - return metricspb.MetricDescriptor_UNSPECIFIED - } - if v.Measure == nil { - return metricspb.MetricDescriptor_UNSPECIFIED - } - - switch v.Aggregation.Type { - case view.AggTypeCount: - // Cumulative on int64 - return metricspb.MetricDescriptor_CUMULATIVE_INT64 - - case view.AggTypeDistribution: - // Cumulative types - return metricspb.MetricDescriptor_CUMULATIVE_DISTRIBUTION - - case view.AggTypeLastValue: - // Gauge types - switch measureTypeFromMeasure(v.Measure) { - case measureFloat64: - return metricspb.MetricDescriptor_GAUGE_DOUBLE - case measureInt64: - return metricspb.MetricDescriptor_GAUGE_INT64 - } - - case view.AggTypeSum: - // Cumulative types - switch measureTypeFromMeasure(v.Measure) { - case measureFloat64: - return metricspb.MetricDescriptor_CUMULATIVE_DOUBLE - case measureInt64: - return metricspb.MetricDescriptor_CUMULATIVE_INT64 - } - } - - // For all other cases, return unspecified. - return metricspb.MetricDescriptor_UNSPECIFIED -} - -func tagKeysToLabelKeys(tagKeys []tag.Key) []*metricspb.LabelKey { - labelKeys := make([]*metricspb.LabelKey, 0, len(tagKeys)) - for _, tagKey := range tagKeys { - labelKeys = append(labelKeys, &metricspb.LabelKey{ - Key: tagKey.Name(), - }) - } - return labelKeys -} - -func viewDataToTimeseries(vd *view.Data) ([]*metricspb.TimeSeries, error) { - if vd == nil || len(vd.Rows) == 0 { - return nil, nil - } - - // Given that view.Data only contains Start, End - // the timestamps for all the row data will be the exact same - // per aggregation. However, the values will differ. - // Each row has its own tags. - startTimestamp := timeToProtoTimestamp(vd.Start) - endTimestamp := timeToProtoTimestamp(vd.End) - - mType := measureTypeFromMeasure(vd.View.Measure) - timeseries := make([]*metricspb.TimeSeries, 0, len(vd.Rows)) - // It is imperative that the ordering of "LabelValues" matches those - // of the Label keys in the metric descriptor. - for _, row := range vd.Rows { - labelValues := labelValuesFromTags(row.Tags) - point := rowToPoint(vd.View, row, endTimestamp, mType) - timeseries = append(timeseries, &metricspb.TimeSeries{ - StartTimestamp: startTimestamp, - LabelValues: labelValues, - Points: []*metricspb.Point{point}, - }) - } - - if len(timeseries) == 0 { - return nil, nil - } - - return timeseries, nil -} - -func timeToProtoTimestamp(t time.Time) *timestamp.Timestamp { - unixNano := t.UnixNano() - return ×tamp.Timestamp{ - Seconds: int64(unixNano / 1e9), - Nanos: int32(unixNano % 1e9), - } -} - -func rowToPoint(v *view.View, row *view.Row, endTimestamp *timestamp.Timestamp, mType measureType) *metricspb.Point { - pt := &metricspb.Point{ - Timestamp: endTimestamp, - } - - switch data := row.Data.(type) { - case *view.CountData: - pt.Value = &metricspb.Point_Int64Value{Int64Value: data.Value} - - case *view.DistributionData: - pt.Value = &metricspb.Point_DistributionValue{ - DistributionValue: &metricspb.DistributionValue{ - Count: data.Count, - Sum: float64(data.Count) * data.Mean, // because Mean := Sum/Count - // TODO: Add Exemplar - Buckets: bucketsToProtoBuckets(data.CountPerBucket), - BucketOptions: &metricspb.DistributionValue_BucketOptions{ - Type: &metricspb.DistributionValue_BucketOptions_Explicit_{ - Explicit: &metricspb.DistributionValue_BucketOptions_Explicit{ - Bounds: v.Aggregation.Buckets, - }, - }, - }, - SumOfSquaredDeviation: data.SumOfSquaredDev, - }} - - case *view.LastValueData: - setPointValue(pt, data.Value, mType) - - case *view.SumData: - setPointValue(pt, data.Value, mType) - } - - return pt -} - -// Not returning anything from this function because metricspb.Point.is_Value is an unexported -// interface hence we just have to set its value by pointer. -func setPointValue(pt *metricspb.Point, value float64, mType measureType) { - if mType == measureInt64 { - pt.Value = &metricspb.Point_Int64Value{Int64Value: int64(value)} - } else { - pt.Value = &metricspb.Point_DoubleValue{DoubleValue: value} - } -} - -func bucketsToProtoBuckets(countPerBucket []int64) []*metricspb.DistributionValue_Bucket { - distBuckets := make([]*metricspb.DistributionValue_Bucket, len(countPerBucket)) - for i := 0; i < len(countPerBucket); i++ { - count := countPerBucket[i] - - distBuckets[i] = &metricspb.DistributionValue_Bucket{ - Count: count, - } - } - - return distBuckets -} - -func labelValuesFromTags(tags []tag.Tag) []*metricspb.LabelValue { - if len(tags) == 0 { - return nil - } - - labelValues := make([]*metricspb.LabelValue, 0, len(tags)) - for _, tag_ := range tags { - labelValues = append(labelValues, &metricspb.LabelValue{ - Value: tag_.Value, - - // It is imperative that we set the "HasValue" attribute, - // in order to distinguish missing a label from the empty string. - // https://godoc.org/github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1#LabelValue.HasValue - // - // OpenCensus-Go uses non-pointers for tags as seen by this function's arguments, - // so the best case that we can use to distinguish missing labels/tags from the - // empty string is by checking if the Tag.Key.Name() != "" to indicate that we have - // a value. - HasValue: tag_.Key.Name() != "", - }) - } - return labelValues -} diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go deleted file mode 100644 index 68be4c75bde7..000000000000 --- a/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2018, OpenCensus Authors -// -// 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 ocagent - -const Version = "0.0.1" diff --git a/vendor/github.com/Azure/azure-amqp-common-go/v3/.gitignore b/vendor/github.com/Azure/azure-amqp-common-go/v3/.gitignore new file mode 100644 index 000000000000..c805fdabe459 --- /dev/null +++ b/vendor/github.com/Azure/azure-amqp-common-go/v3/.gitignore @@ -0,0 +1,19 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +vendor +.idea + +.DS_Store diff --git a/vendor/github.com/Azure/azure-amqp-common-go/v3/.travis.yml b/vendor/github.com/Azure/azure-amqp-common-go/v3/.travis.yml new file mode 100644 index 000000000000..bb9bfb18a8af --- /dev/null +++ b/vendor/github.com/Azure/azure-amqp-common-go/v3/.travis.yml @@ -0,0 +1,20 @@ +language: go +sudo: false +go: + - 1.x + - 1.11.x + +matrix: + fast_finish: true + +before_install: + - cd ${TRAVIS_HOME} + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover + - go get github.com/fzipp/gocyclo + - go get golang.org/x/lint/golint + - cd ${TRAVIS_BUILD_DIR} + +script: + - export GO111MODULE=on + - make test \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/.gitignore b/vendor/github.com/Azure/azure-event-hubs-go/v3/.gitignore new file mode 100644 index 000000000000..8d18833bfb51 --- /dev/null +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/.gitignore @@ -0,0 +1,29 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +vendor +.idea + +.DS_Store + +.env + +# Test Infrastructure +terraform.tfvars +*.auto.tfvars +*.tfstate +*.tfstate.backup +.terraform/ +.terraform.tfstate.lock.info \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/.travis.yml b/vendor/github.com/Azure/azure-event-hubs-go/v3/.travis.yml new file mode 100644 index 000000000000..7f86919b3c05 --- /dev/null +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/.travis.yml @@ -0,0 +1,36 @@ +language: go +sudo: false +go: +- 1.x +- 1.11.x +before_install: +- cd ${TRAVIS_HOME} +- export GO111MODULE=auto +- go get -u github.com/mattn/goveralls +- go get -u golang.org/x/tools/cmd/cover +- go get -u github.com/fzipp/gocyclo +- go get -u golang.org/x/lint/golint +- cd ${TRAVIS_BUILD_DIR} +jobs: + include: + - stage: integration tests + if: type IN (push, cron) + env: + - TF_VAR_resource_group_name=eh-travis + - secure: Gytv/BG8PzkBU845teKJdci1RbYzuHn4slhYIQEEZ8r0hvb57YtPD1NUBLWzndj3qrmhJceRkDyKd3gfAIrvLFEp0rD+4E5S2lTjOST4OZRaN8HKKA8dtc1PYlcF1Hr4wA4rx69oKVBncdQYZXE2Sdnx3QwuWnT1G2B3PYvnb1Ess16/4Z4PDZL4Jp2KTubV5nZd70zBJzEkaem4FE/x8pAqKsaNLNuabYRjywzNwcrKqUAYuiy1BaYD/XxKDQ/dNfGEK3gXitNqWqNURghGBlE3e0x++mwIWvW3b8wP+JyvUv3vM6FS7+Rw8qz8XhaG820Sqs8eM4GUxX9BttOOR5KpzbBYH0KgygE3Axo5saktpqImBB0gKi2fNqT7YvdU+peMLIVipsxPHdO0CEgvgFPLIkMdpaXYyjQJWNDDukcRpu+/LVCQRb5Fh8jTS1z8U59sdgW3Ld5YVw6Jt0vO4mNfA799o7yzWlO3a5ZLJotQtXm6WCwOq7IE5m3ObQYbi1YWAlBXuTuHPk4fCSTQJDUkFi4jDSnN4xqlItk+URilyAt+Vs5OuRAztfM/o4/TEjdkXx0T/veZ3eibksdSnYAgHQPCQ6MqeWAk4AKrIJysPQuyPhNo2ye5jh/aozL6VYE9dcft3+RAwp6jQAtP/pv8SpsTkWuC7LnSeJvMa6c= + - secure: eVK61SdkKa+KeIs7iJ0tCWnVlj/BSdc6Yepk42chtRdmikzaXSSvyoRplKJoFutpkSLd0TPIR6GleaXf76RAIarxtSfOuZ5cKtCXQ84W8e+nAdeeOyByYHm75SfJzbbDR5L0pTfeiBfjYndeV176fRRZJprDwRSLQ2NfTYhqaliI1sjVQV2if5fe/oR99UL5Ocvr2ubmXAt3KOk+RZ0WyPQAjRIpIc1VziYZ1uwHVyIqkD7g76yfHy+ENvTVT48jv+3HpC120h7aufeirsbo1zBYrIdIE/Y02ISdUWWc+uXn1qbQnpwOtyjksUNVvzQyBicI8FGKhQSxMzkLZyvBXon7Pbkr6BVmSXX916QyvigqAeDDHIBkbHO/oNaKgtxBHiM2yymfYG9HkUzM/bKIA7+g2eVGHiPPn7tk5Ytgf10Q7ZPH1epvhaHnQduw2sDVWybOfw9h+hwgkUYWBsyo7xlvwM5eyCX7Nntg6K2vu8fCiSNAPlZLhex89H8DBb2BlhXQDEGX7QTRo+SYuY/JKhW9HeWiDcRLPxGEeTkh4ZrLdjZeKpFF9Bcuxqk3iaD3+CsCnqI/542Y2HT5zw7qCMbXZYwaXW90VYFysuOh1pgRoZ5kwSyH1mD/o+xLXfuV0AJlzyraZZes/83TsKF611AlynPbEQD5BGv/Noo9JAE= + - secure: ja4Qu9OkHPzpGTSbsMf7WyBT5b1uYtdfLH7ehCzsPXUBbOqsJw1f4Nzgmzh0xvNMbL2AlOGqWwU6HJXb3Cn3ehTTsaiQz6BrBW6A1OmNOuup6m2nQ8BeuFD8lPTj6DcHTEldIn6aOP5ZcIp5OnUxIluxj4Nh3BR495L+YF3X07VCgH4G+RwcSiRMorrDinkwHjDozHZcMaQJ7HD/TYW6uaqcWzmJTaFFlUK2pMPvh9jgQ5L+xQwpi09t2J5mPcSL2HptlSkSnNISzYp3qT33dNGJcj+4zM7NGsYSCBDII6G/wOIdNhNKFb4lKSXUdg/5uWDESAkKK9vveDGwdPVGZXXx16fcQ2QTsQbTSLBfGT4nTYadiNvSJgUSLykZitg4RppdYHHBiQu7UYUk03KpbSJjQct4Lqbnhw9uLEk68rXzis/MayOuGpL1bimB3+13h3/QoXEaHOGiOVsE9/UUYmpYQZYbdnkzBiEF7oPkoxTNjuzdYt2SQLvQeOah4qkHy3oH83c8EcU+aPMEWCc3yTkqY75VATyIa/TP3rySAFcogq/Kd4aDUWwcxO4u1B2TD8UNE5YqftWo97Heo6lE+kAr1FfhxS6cwuWMTfQ5KwgFv+Qlgb71zlP3T/Yn5kPdGY0kwoqiEmq5hjcjOHLLYYvBsYPfAmtQMKSe2fFZ53Q= + - secure: SPYzI+Fyzbf0blXoX7vSCWcgPfTQnkNy1jSNps68a0dy1yE3WAc/AEgV4wcwgFjV7WkMIX9ik0q5ggbiVgMw1nQA4U6K8n7yJsqI+s0GGEdE1Y1HBCWIMJw1JazTHI2qRg69UiVj2xI1LPvTFGgxClGnZoPCh9dxlMPO6M2f90mJUKVNxkjuLe1BWnLyzyGZnhB/EEam39ijOVnkfXdwcN4nGUjMsEwi5rOQLeZsymgKqN2aMeXtZltTeertO4ob8K2hGinNHjkYzjyFSCZvGaubnVr22F777YDCvh0cq7CTRQiMm1KiHT9QZ/0JbvsfC+0TPl0lXnLx6NnMvlKL5sA6xpFcarO4nGB4jON5SnVPF+3VW0BSyfypFHAn/fSSmftqg8TI7uSGuOJauG2ld/1e1v9WPkY56frC2ULVWt7eZFOpIm9JoosCjKgwQjx320VwJgKW8xJ4ynAPqFVVlZCdQEs+NJGOOJi1NkDpd++QolgKFkPdkBNFmVYRPdVe/iRzaipZ2WOX94sg+5CfA5TcZTz2fvDJHyNgqEkVUS9VHWDB75nkJ8vq1b8G9+wM/ulAsdepjaPlatd0pGeVJzt1IwJFDUgddCEXHub0HXuJk2kE7V/i1h0E4kcfQq8HFEJaG1tsWe2kA+OBX58pCZWXmDB2KshGWW9tlWzwRlo= + script: + - curl -sLo /tmp/terraform.zip https://releases.hashicorp.com/terraform/0.12.8/terraform_0.12.8_linux_amd64.zip + - unzip /tmp/terraform.zip -d /tmp + - mkdir -p ~/bin + - mv /tmp/terraform ~/bin + - export PATH="~/bin:$PATH" + - export GO111MODULE=on + - make test-cover + - goveralls -coverprofile=cover.out -service=travis-ci + - make destroy +script: +- export GO111MODULE=on +- make diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md b/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md index 0b92dd381586..2b901924a562 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md @@ -2,6 +2,8 @@ ## `head` +- add support for websocket connections with eph with `eph.WithWebSocketConnection()` + ## `v2.0.4` - add comment on the `PartitionID` field in `SystemProperties` to clarify that it will always return a nil value [#131](https://github.com/Azure/azure-event-hubs-go/issues/131) diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go index 1d14df5a12dc..38d05a146e54 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go @@ -74,6 +74,7 @@ type ( handlersMu sync.Mutex partitionIDs []string noBanner bool + webSocketConnection bool env *azure.Environment } @@ -117,6 +118,14 @@ func WithEnvironment(env azure.Environment) EventProcessorHostOption { } } +// WithWebSocketConnection will configure an EventProcessorHost to use websockets +func WithWebSocketConnection() EventProcessorHostOption { + return func(host *EventProcessorHost) error { + host.webSocketConnection = true + return nil + } +} + // NewFromConnectionString builds a new Event Processor Host from an Event Hub connection string which can be found in // the Azure portal func NewFromConnectionString(ctx context.Context, connStr string, leaser Leaser, checkpointer Checkpointer, opts ...EventProcessorHostOption) (*EventProcessorHost, error) { @@ -165,6 +174,10 @@ func NewFromConnectionString(ctx context.Context, connStr string, leaser Leaser, hubOpts = append(hubOpts, eventhub.HubWithEnvironment(*host.env)) } + if host.webSocketConnection { + hubOpts = append(hubOpts, eventhub.HubWithWebSocketConnection()) + } + client, err := eventhub.NewHubFromConnectionString(connStr, hubOpts...) if err != nil { tab.For(ctx).Error(err) @@ -217,6 +230,10 @@ func New(ctx context.Context, namespace, hubName string, tokenProvider auth.Toke hubOpts = append(hubOpts, eventhub.HubWithEnvironment(*host.env)) } + if host.webSocketConnection { + hubOpts = append(hubOpts, eventhub.HubWithWebSocketConnection()) + } + client, err := eventhub.NewHub(namespace, hubName, tokenProvider, hubOpts...) if err != nil { return nil, err diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go index 81e7ecfb69f1..3c676a70e3fd 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go @@ -2,5 +2,5 @@ package eventhub const ( // Version is the semantic version number - Version = "3.0.0" + Version = "3.1.0" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index 33f4f8b2f36a..4dd760880816 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -67,7 +67,8 @@ func (client ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -165,7 +166,8 @@ func (client ConsumerGroupsClient) Delete(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -260,7 +262,8 @@ func (client ConsumerGroupsClient) Get(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -360,16 +363,17 @@ func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("eventhub.ConsumerGroupsClient", "ListByEventHub", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index 8a8b3ac8ef5e..d9b70ccb444a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -66,21 +66,22 @@ func (client EventHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.Properties.PartitionCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.Properties.CaptureDescription", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(900), Chain: nil}, - {Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 60, Chain: nil}, + {Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(60), Chain: nil}, }}, {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMaximum, Rule: int64(524288000), Chain: nil}, - {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMinimum, Rule: 10485760, Chain: nil}, + {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMinimum, Rule: int64(10485760), Chain: nil}, }}, }}, }}}}}); err != nil { @@ -178,7 +179,8 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRule(ctx context.Contex Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, @@ -277,7 +279,8 @@ func (client EventHubsClient) Delete(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "Delete", err.Error()) } @@ -368,7 +371,8 @@ func (client EventHubsClient) DeleteAuthorizationRule(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "DeleteAuthorizationRule", err.Error()) @@ -461,7 +465,8 @@ func (client EventHubsClient) Get(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "Get", err.Error()) } @@ -553,7 +558,8 @@ func (client EventHubsClient) GetAuthorizationRule(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "GetAuthorizationRule", err.Error()) @@ -647,7 +653,8 @@ func (client EventHubsClient) ListAuthorizationRules(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListAuthorizationRules", err.Error()) } @@ -781,12 +788,12 @@ func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroup {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListByNamespace", err.Error()) } @@ -922,7 +929,8 @@ func (client EventHubsClient) ListKeys(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListKeys", err.Error()) @@ -1018,7 +1026,8 @@ func (client EventHubsClient) RegenerateKeys(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "RegenerateKeys", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go index 92e4987c2429..919bea875af1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go @@ -151,13 +151,13 @@ func (client NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.EHNamespaceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("eventhub.NamespacesClient", "CreateOrUpdate", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go index 47edc33ed436..b65dff16bbd3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go @@ -41,6 +41,78 @@ func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) Depl return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } +// CalculateTemplateHash calculate the hash of the given template. +// Parameters: +// templateParameter - the template provided to calculate hash. +func (client DeploymentsClient) CalculateTemplateHash(ctx context.Context, templateParameter interface{}) (result TemplateHashResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CalculateTemplateHash") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CalculateTemplateHashPreparer(ctx, templateParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", nil, "Failure preparing request") + return + } + + resp, err := client.CalculateTemplateHashSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure sending request") + return + } + + result, err = client.CalculateTemplateHashResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure responding to request") + } + + return +} + +// CalculateTemplateHashPreparer prepares the CalculateTemplateHash request. +func (client DeploymentsClient) CalculateTemplateHashPreparer(ctx context.Context, templateParameter interface{}) (*http.Request, error) { + const APIVersion = "2019-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Resources/calculateTemplateHash"), + autorest.WithJSON(templateParameter), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CalculateTemplateHashSender sends the CalculateTemplateHash request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CalculateTemplateHashResponder handles the response to the CalculateTemplateHash request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) CalculateTemplateHashResponder(resp *http.Response) (result TemplateHashResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // Cancel you can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is // canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running // template deployment and leaves the resource group partially deployed. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go index 194aabca5a8a..5a354d589684 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go @@ -106,6 +106,11 @@ type BasicDependency struct { ResourceName *string `json:"resourceName,omitempty"` } +// CloudError an error response for a resource management request. +type CloudError struct { + Error *ErrorResponse `json:"error,omitempty"` +} + // CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type CreateOrUpdateByIDFuture struct { @@ -747,6 +752,28 @@ type DeploymentValidateResult struct { Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` } +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// ErrorResponse the resource management error response. +type ErrorResponse struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]ErrorResponse `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` +} + // ExportTemplateRequest export resource group template request parameters. type ExportTemplateRequest struct { // ResourcesProperty - The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. @@ -1963,6 +1990,16 @@ type TargetResource struct { ResourceType *string `json:"resourceType,omitempty"` } +// TemplateHashResult result of the request to calculate template hash. It contains a string of minified +// template and its hash. +type TemplateHashResult struct { + autorest.Response `json:"-"` + // MinifiedTemplate - The minified template string. + MinifiedTemplate *string `json:"minifiedTemplate,omitempty"` + // TemplateHash - The template hash. + TemplateHash *string `json:"templateHash,omitempty"` +} + // TemplateLink entity representing the reference to the template. type TemplateLink struct { // URI - The URI of the template to deploy. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index 1fc8748fa479..672e7e77a9bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v32.1.0" +const Number = "v37.1.0" diff --git a/vendor/github.com/Azure/go-amqp/.gitattributes b/vendor/github.com/Azure/go-amqp/.gitattributes new file mode 100644 index 000000000000..854069f01fe5 --- /dev/null +++ b/vendor/github.com/Azure/go-amqp/.gitattributes @@ -0,0 +1,3 @@ +# Binary files (no line-ending conversions), diff using hexdump +*.bin binary diff=hex + diff --git a/vendor/github.com/Azure/go-amqp/.gitignore b/vendor/github.com/Azure/go-amqp/.gitignore new file mode 100644 index 000000000000..d59ea0da9db1 --- /dev/null +++ b/vendor/github.com/Azure/go-amqp/.gitignore @@ -0,0 +1,11 @@ +amqp.test +/fuzz/*/* +!/fuzz/*/corpus +/fuzz/*.zip +*.log +/cmd +cover.out +.envrc +recordings +.vscode +.idea diff --git a/vendor/github.com/Azure/go-amqp/CODE_OF_CONDUCT.md b/vendor/github.com/Azure/go-amqp/CODE_OF_CONDUCT.md index f9ba8cf65f3e..c72a5749c52a 100644 --- a/vendor/github.com/Azure/go-amqp/CODE_OF_CONDUCT.md +++ b/vendor/github.com/Azure/go-amqp/CODE_OF_CONDUCT.md @@ -1,9 +1,9 @@ -# Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). - -Resources: - -- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) -- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns diff --git a/vendor/github.com/Azure/go-amqp/LICENSE b/vendor/github.com/Azure/go-amqp/LICENSE index 9e841e7a26e4..3d8b93bc7987 100644 --- a/vendor/github.com/Azure/go-amqp/LICENSE +++ b/vendor/github.com/Azure/go-amqp/LICENSE @@ -1,21 +1,21 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/vendor/github.com/Azure/go-amqp/README.md b/vendor/github.com/Azure/go-amqp/README.md index 81884b434653..c50bc2c5b6b1 100644 --- a/vendor/github.com/Azure/go-amqp/README.md +++ b/vendor/github.com/Azure/go-amqp/README.md @@ -1,144 +1,144 @@ -# **github.com/Azure/go-amqp** - -[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/go/Azure.go-amqp?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=1292&branchName=master) -[![Go Report Card](https://goreportcard.com/badge/github.com/Azure/go-amqp)](https://goreportcard.com/report/github.com/Azure/go-amqp) -[![GoDoc](https://godoc.org/github.com/Azure/go-amqp?status.svg)](http://godoc.org/github.com/Azure/go-amqp) -[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Azure/go-amqp/master/LICENSE) - -github.com/Azure/go-amqp is an AMQP 1.0 client implementation for Go. - -[AMQP 1.0](http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html) is not compatible with AMQP 0-9-1 or 0-10, which are -the most common AMQP protocols in use today. A list of AMQP 1.0 brokers and other -AMQP 1.0 resources can be found at [github.com/xinchen10/awesome-amqp](https://github.com/xinchen10/awesome-amqp). - -This library aims to be stable and worthy of production usage, but the API is still subject to change. To conform with SemVer, the major version will remain 0 until the API is deemed stable. During this period breaking changes will be indicated by bumping the minor version. Non-breaking changes will bump the patch version. - -## Install - -``` -go get -u github.com/Azure/go-amqp -``` - -## Contributing - -Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md). - -## Example Usage - -``` go -package main - -import ( - "context" - "fmt" - "log" - "time" - - "github.com/Azure/go-amqp" -) - -func main() { - // Create client - client, err := amqp.Dial("amqps://my-namespace.servicebus.windows.net", - amqp.ConnSASLPlain("access-key-name", "access-key"), - ) - if err != nil { - log.Fatal("Dialing AMQP server:", err) - } - defer client.Close() - - // Open a session - session, err := client.NewSession() - if err != nil { - log.Fatal("Creating AMQP session:", err) - } - - ctx := context.Background() - - // Send a message - { - // Create a sender - sender, err := session.NewSender( - amqp.LinkTargetAddress("/queue-name"), - ) - if err != nil { - log.Fatal("Creating sender link:", err) - } - - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) - - // Send message - err = sender.Send(ctx, amqp.NewMessage([]byte("Hello!"))) - if err != nil { - log.Fatal("Sending message:", err) - } - - sender.Close(ctx) - cancel() - } - - // Continuously read messages - { - // Create a receiver - receiver, err := session.NewReceiver( - amqp.LinkSourceAddress("/queue-name"), - amqp.LinkCredit(10), - ) - if err != nil { - log.Fatal("Creating receiver link:", err) - } - defer func() { - ctx, cancel := context.WithTimeout(ctx, 1*time.Second) - receiver.Close(ctx) - cancel() - }() - - for { - // Receive next message - msg, err := receiver.Receive(ctx) - if err != nil { - log.Fatal("Reading message from AMQP:", err) - } - - // Accept message - msg.Accept() - - fmt.Printf("Message received: %s\n", msg.GetData()) - } - } -} -``` - -## Related Projects - -| Project | Description | -|---------|-------------| -| [github.com/Azure/azure-event-hubs-go](https://github.com/Azure/azure-event-hubs-go) * | Library for interacting with Microsoft Azure Event Hubs. | -| [github.com/Azure/azure-service-bus-go](https://github.com/Azure/azure-service-bus-go) * | Library for interacting with Microsoft Azure Service Bus. | -| [gocloud.dev/pubsub](https://gocloud.dev/pubsub) * | Library for portably interacting with Pub/Sub systems. | -| [qpid-proton](https://github.com/apache/qpid-proton/tree/go1) | AMQP 1.0 library using the Qpid Proton C bindings. | - -`*` indicates that the project uses this library. - -Feel free to send PRs adding additional projects. Listed projects are not limited to those that use this library as long as they are potentially useful to people who are looking at an AMQP library. - -### Other Notes - -By default, this package depends only on the standard library. Building with the -`pkgerrors` tag will cause errors to be created/wrapped by the github.com/pkg/errors -library. This can be useful for debugging and when used in a project using -github.com/pkg/errors. - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require you to agree to a -Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us -the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. - -When you submit a pull request, a CLA bot will automatically determine whether you need to provide -a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions -provided by the bot. You will only need to do this once across all repos using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or -contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +# **github.com/Azure/go-amqp** + +[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/go/Azure.go-amqp?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=1292&branchName=master) +[![Go Report Card](https://goreportcard.com/badge/github.com/Azure/go-amqp)](https://goreportcard.com/report/github.com/Azure/go-amqp) +[![GoDoc](https://godoc.org/github.com/Azure/go-amqp?status.svg)](http://godoc.org/github.com/Azure/go-amqp) +[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Azure/go-amqp/master/LICENSE) + +github.com/Azure/go-amqp is an AMQP 1.0 client implementation for Go. + +[AMQP 1.0](http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html) is not compatible with AMQP 0-9-1 or 0-10, which are +the most common AMQP protocols in use today. A list of AMQP 1.0 brokers and other +AMQP 1.0 resources can be found at [github.com/xinchen10/awesome-amqp](https://github.com/xinchen10/awesome-amqp). + +This library aims to be stable and worthy of production usage, but the API is still subject to change. To conform with SemVer, the major version will remain 0 until the API is deemed stable. During this period breaking changes will be indicated by bumping the minor version. Non-breaking changes will bump the patch version. + +## Install + +``` +go get -u github.com/Azure/go-amqp +``` + +## Contributing + +Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md). + +## Example Usage + +``` go +package main + +import ( + "context" + "fmt" + "log" + "time" + + "github.com/Azure/go-amqp" +) + +func main() { + // Create client + client, err := amqp.Dial("amqps://my-namespace.servicebus.windows.net", + amqp.ConnSASLPlain("access-key-name", "access-key"), + ) + if err != nil { + log.Fatal("Dialing AMQP server:", err) + } + defer client.Close() + + // Open a session + session, err := client.NewSession() + if err != nil { + log.Fatal("Creating AMQP session:", err) + } + + ctx := context.Background() + + // Send a message + { + // Create a sender + sender, err := session.NewSender( + amqp.LinkTargetAddress("/queue-name"), + ) + if err != nil { + log.Fatal("Creating sender link:", err) + } + + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) + + // Send message + err = sender.Send(ctx, amqp.NewMessage([]byte("Hello!"))) + if err != nil { + log.Fatal("Sending message:", err) + } + + sender.Close(ctx) + cancel() + } + + // Continuously read messages + { + // Create a receiver + receiver, err := session.NewReceiver( + amqp.LinkSourceAddress("/queue-name"), + amqp.LinkCredit(10), + ) + if err != nil { + log.Fatal("Creating receiver link:", err) + } + defer func() { + ctx, cancel := context.WithTimeout(ctx, 1*time.Second) + receiver.Close(ctx) + cancel() + }() + + for { + // Receive next message + msg, err := receiver.Receive(ctx) + if err != nil { + log.Fatal("Reading message from AMQP:", err) + } + + // Accept message + msg.Accept() + + fmt.Printf("Message received: %s\n", msg.GetData()) + } + } +} +``` + +## Related Projects + +| Project | Description | +|---------|-------------| +| [github.com/Azure/azure-event-hubs-go](https://github.com/Azure/azure-event-hubs-go) * | Library for interacting with Microsoft Azure Event Hubs. | +| [github.com/Azure/azure-service-bus-go](https://github.com/Azure/azure-service-bus-go) * | Library for interacting with Microsoft Azure Service Bus. | +| [gocloud.dev/pubsub](https://gocloud.dev/pubsub) * | Library for portably interacting with Pub/Sub systems. | +| [qpid-proton](https://github.com/apache/qpid-proton/tree/go1) | AMQP 1.0 library using the Qpid Proton C bindings. | + +`*` indicates that the project uses this library. + +Feel free to send PRs adding additional projects. Listed projects are not limited to those that use this library as long as they are potentially useful to people who are looking at an AMQP library. + +### Other Notes + +By default, this package depends only on the standard library. Building with the +`pkgerrors` tag will cause errors to be created/wrapped by the github.com/pkg/errors +library. This can be useful for debugging and when used in a project using +github.com/pkg/errors. + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. + +When you submit a pull request, a CLA bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/vendor/github.com/Azure/go-amqp/SECURITY.md b/vendor/github.com/Azure/go-amqp/SECURITY.md index e0dfff56a956..7ab49eb82964 100644 --- a/vendor/github.com/Azure/go-amqp/SECURITY.md +++ b/vendor/github.com/Azure/go-amqp/SECURITY.md @@ -1,41 +1,41 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). - - + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + diff --git a/vendor/github.com/Azure/go-autorest/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/LICENSE similarity index 100% rename from vendor/github.com/Azure/go-autorest/LICENSE rename to vendor/github.com/Azure/go-autorest/autorest/LICENSE diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go index b38f4c245897..914f8af5e4ea 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go @@ -24,6 +24,7 @@ package adal */ import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -101,7 +102,14 @@ type deviceToken struct { // InitiateDeviceAuth initiates a device auth flow. It returns a DeviceCode // that can be used with CheckForUserCompletion or WaitForUserCompletion. +// Deprecated: use InitiateDeviceAuthWithContext() instead. func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { + return InitiateDeviceAuthWithContext(context.Background(), sender, oauthConfig, clientID, resource) +} + +// InitiateDeviceAuthWithContext initiates a device auth flow. It returns a DeviceCode +// that can be used with CheckForUserCompletion or WaitForUserCompletion. +func InitiateDeviceAuthWithContext(ctx context.Context, sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { v := url.Values{ "client_id": []string{clientID}, "resource": []string{resource}, @@ -117,7 +125,7 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req) + resp, err := sender.Do(req.WithContext(ctx)) if err != nil { return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err.Error()) } @@ -151,7 +159,14 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour // CheckForUserCompletion takes a DeviceCode and checks with the Azure AD OAuth endpoint // to see if the device flow has: been completed, timed out, or otherwise failed +// Deprecated: use CheckForUserCompletionWithContext() instead. func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { + return CheckForUserCompletionWithContext(context.Background(), sender, code) +} + +// CheckForUserCompletionWithContext takes a DeviceCode and checks with the Azure AD OAuth endpoint +// to see if the device flow has: been completed, timed out, or otherwise failed +func CheckForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { v := url.Values{ "client_id": []string{code.ClientID}, "code": []string{*code.DeviceCode}, @@ -169,7 +184,7 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req) + resp, err := sender.Do(req.WithContext(ctx)) if err != nil { return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenSendingFails, err.Error()) } @@ -213,12 +228,19 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { // WaitForUserCompletion calls CheckForUserCompletion repeatedly until a token is granted or an error state occurs. // This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. +// Deprecated: use WaitForUserCompletionWithContext() instead. func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { + return WaitForUserCompletionWithContext(context.Background(), sender, code) +} + +// WaitForUserCompletionWithContext calls CheckForUserCompletion repeatedly until a token is granted or an error +// state occurs. This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. +func WaitForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { intervalDuration := time.Duration(*code.Interval) * time.Second waitDuration := intervalDuration for { - token, err := CheckForUserCompletion(sender, code) + token, err := CheckForUserCompletionWithContext(ctx, sender, code) if err == nil { return token, nil @@ -237,6 +259,11 @@ func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { return nil, fmt.Errorf("%s Error waiting for user to complete device flow. Server told us to slow_down too much", logPrefix) } - time.Sleep(waitDuration) + select { + case <-time.After(waitDuration): + // noop + case <-ctx.Done(): + return nil, ctx.Err() + } } } diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod index 5c95dbfea4b9..a030eb42da8b 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod @@ -3,9 +3,10 @@ module github.com/Azure/go-autorest/autorest/adal go 1.12 require ( - github.com/Azure/go-autorest/autorest/date v0.1.0 - github.com/Azure/go-autorest/autorest/mocks v0.1.0 - github.com/Azure/go-autorest/tracing v0.1.0 + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/Azure/go-autorest/autorest/date v0.2.0 + github.com/Azure/go-autorest/autorest/mocks v0.3.0 + github.com/Azure/go-autorest/tracing v0.5.0 github.com/dgrijalva/jwt-go v3.2.0+incompatible - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 ) diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum index ef9d101618fc..e43cf6498d0d 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum @@ -1,139 +1,28 @@ -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= -contrib.go.opencensus.io/exporter/ocagent v0.4.12 h1:jGFvw3l57ViIVEPKKEUXPcLYIXJmQxLUh6ey1eJhwyc= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -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/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/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2 h1:NAfh7zF0/3/HqtMvJNZ/RFrSlCE6ZTlHmKfhL/Dm1Jk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= 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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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 h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/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/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 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go new file mode 100644 index 000000000000..28a4bfc4c437 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package adal + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go index 834401e00dec..d7e4372bbc5a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go @@ -15,7 +15,12 @@ package adal // limitations under the License. import ( + "crypto/tls" "net/http" + "net/http/cookiejar" + "sync" + + "github.com/Azure/go-autorest/tracing" ) const ( @@ -23,6 +28,9 @@ const ( mimeTypeFormPost = "application/x-www-form-urlencoded" ) +var defaultSender Sender +var defaultSenderInit = &sync.Once{} + // Sender is the interface that wraps the Do method to send HTTP requests. // // The standard http.Client conforms to this interface. @@ -45,7 +53,7 @@ type SendDecorator func(Sender) Sender // CreateSender creates, decorates, and returns, as a Sender, the default http.Client. func CreateSender(decorators ...SendDecorator) Sender { - return DecorateSender(&http.Client{}, decorators...) + return DecorateSender(sender(), decorators...) } // DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to @@ -58,3 +66,30 @@ func DecorateSender(s Sender, decorators ...SendDecorator) Sender { } return s } + +func sender() Sender { + // note that we can't init defaultSender in init() since it will + // execute before calling code has had a chance to enable tracing + defaultSenderInit.Do(func() { + // Use behaviour compatible with DefaultTransport, but require TLS minimum version. + defaultTransport := http.DefaultTransport.(*http.Transport) + transport := &http.Transport{ + Proxy: defaultTransport.Proxy, + DialContext: defaultTransport.DialContext, + MaxIdleConns: defaultTransport.MaxIdleConns, + IdleConnTimeout: defaultTransport.IdleConnTimeout, + TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout, + ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout, + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + }, + } + var roundTripper http.RoundTripper = transport + if tracing.IsEnabled() { + roundTripper = tracing.NewTransport(transport) + } + j, _ := cookiejar.New(nil) + defaultSender = &http.Client{Jar: j, Transport: roundTripper} + }) + return defaultSender +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index 4083e76e693b..33bbd6ea1505 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -26,15 +26,14 @@ import ( "fmt" "io/ioutil" "math" - "net" "net/http" "net/url" + "os" "strings" "sync" "time" "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/tracing" "github.com/dgrijalva/jwt-go" ) @@ -64,6 +63,12 @@ const ( // the default number of attempts to refresh an MSI authentication token defaultMaxMSIRefreshAttempts = 5 + + // asMSIEndpointEnv is the environment variable used to store the endpoint on App Service and Functions + asMSIEndpointEnv = "MSI_ENDPOINT" + + // asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions + asMSISecretEnv = "MSI_SECRET" ) // OAuthTokenProvider is an interface which should be implemented by an access token retriever @@ -101,6 +106,9 @@ type RefresherWithContext interface { // a successful token refresh type TokenRefreshCallback func(Token) error +// TokenRefresh is a type representing a custom callback to refresh a token +type TokenRefresh func(ctx context.Context, resource string) (*Token, error) + // Token encapsulates the access token used to authorize Azure requests. // https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response type Token struct { @@ -339,10 +347,11 @@ func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, err // ServicePrincipalToken encapsulates a Token created for a Service Principal. type ServicePrincipalToken struct { - inner servicePrincipalToken - refreshLock *sync.RWMutex - sender Sender - refreshCallbacks []TokenRefreshCallback + inner servicePrincipalToken + refreshLock *sync.RWMutex + sender Sender + customRefreshFunc TokenRefresh + refreshCallbacks []TokenRefreshCallback // MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token. MaxMSIRefreshAttempts int } @@ -357,6 +366,11 @@ func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCa spt.refreshCallbacks = callbacks } +// SetCustomRefreshFunc sets a custom refresh function used to refresh the token. +func (spt *ServicePrincipalToken) SetCustomRefreshFunc(customRefreshFunc TokenRefresh) { + spt.customRefreshFunc = customRefreshFunc +} + // MarshalJSON implements the json.Marshaler interface. func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) { return json.Marshal(spt.inner) @@ -396,7 +410,7 @@ func (spt *ServicePrincipalToken) UnmarshalJSON(data []byte) error { spt.refreshLock = &sync.RWMutex{} } if spt.sender == nil { - spt.sender = &http.Client{Transport: tracing.Transport} + spt.sender = sender() } return nil } @@ -444,7 +458,7 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso RefreshWithin: defaultRefresh, }, refreshLock: &sync.RWMutex{}, - sender: &http.Client{Transport: tracing.Transport}, + sender: sender(), refreshCallbacks: callbacks, } return spt, nil @@ -635,6 +649,31 @@ func GetMSIVMEndpoint() (string, error) { return msiEndpoint, nil } +func isAppService() bool { + _, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv) + _, asMSISecretEnvExists := os.LookupEnv(asMSISecretEnv) + + return asMSIEndpointEnvExists && asMSISecretEnvExists +} + +// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions +func GetMSIAppServiceEndpoint() (string, error) { + asMSIEndpoint, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv) + + if asMSIEndpointEnvExists { + return asMSIEndpoint, nil + } + return "", errors.New("MSI endpoint not found") +} + +// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment +func GetMSIEndpoint() (string, error) { + if isAppService() { + return GetMSIAppServiceEndpoint() + } + return GetMSIVMEndpoint() +} + // NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension. // It will use the system assigned identity when creating the token. func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { @@ -667,7 +706,12 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI v := url.Values{} v.Set("resource", resource) - v.Set("api-version", "2018-02-01") + // App Service MSI currently only supports token API version 2017-09-01 + if isAppService() { + v.Set("api-version", "2017-09-01") + } else { + v.Set("api-version", "2018-02-01") + } if userAssignedID != nil { v.Set("client_id", *userAssignedID) } @@ -685,7 +729,7 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI RefreshWithin: defaultRefresh, }, refreshLock: &sync.RWMutex{}, - sender: &http.Client{Transport: tracing.Transport}, + sender: sender(), refreshCallbacks: callbacks, MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts, } @@ -751,13 +795,13 @@ func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { } // Refresh obtains a fresh token for the Service Principal. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) Refresh() error { return spt.RefreshWithContext(context.Background()) } // RefreshWithContext obtains a fresh token for the Service Principal. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error { spt.refreshLock.Lock() defer spt.refreshLock.Unlock() @@ -765,13 +809,13 @@ func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error } // RefreshExchange refreshes the token, but for a different resource. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshExchange(resource string) error { return spt.RefreshExchangeWithContext(context.Background(), resource) } // RefreshExchangeWithContext refreshes the token, but for a different resource. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { spt.refreshLock.Lock() defer spt.refreshLock.Unlock() @@ -794,15 +838,29 @@ func isIMDS(u url.URL) bool { if err != nil { return false } - return u.Host == imds.Host && u.Path == imds.Path + return (u.Host == imds.Host && u.Path == imds.Path) || isAppService() } func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error { + if spt.customRefreshFunc != nil { + token, err := spt.customRefreshFunc(ctx, resource) + if err != nil { + return err + } + spt.inner.Token = *token + return spt.InvokeRefreshCallbacks(spt.inner.Token) + } + req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil) if err != nil { return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err) } req.Header.Add("User-Agent", UserAgent()) + // Add header when runtime is on App Service or Functions + if isAppService() { + asMSISecret, _ := os.LookupEnv(asMSISecretEnv) + req.Header.Add("Secret", asMSISecret) + } req = req.WithContext(ctx) if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) { v := url.Values{} @@ -847,7 +905,8 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource resp, err = spt.sender.Do(req) } if err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: Failed to execute the refresh request. Error = '%v'", err), nil) + // don't return a TokenRefreshError here; this will allow retry logic to apply + return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err) } defer resp.Body.Close() @@ -914,10 +973,8 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http for attempt < maxAttempts { resp, err = sender.Do(req) - // retry on temporary network errors, e.g. transient network failures. - // if we don't receive a response then assume we can't connect to the - // endpoint so we're likely not running on an Azure VM so don't retry. - if (err != nil && !isTemporaryNetworkError(err)) || resp == nil || resp.StatusCode == http.StatusOK || !containsInt(retries, resp.StatusCode) { + // we want to retry if err is not nil or the status code is in the list of retry codes + if err == nil && !responseHasStatusCode(resp, retries...) { return } @@ -941,20 +998,12 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http return } -// returns true if the specified error is a temporary network error or false if it's not. -// if the error doesn't implement the net.Error interface the return value is true. -func isTemporaryNetworkError(err error) bool { - if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) { - return true - } - return false -} - -// returns true if slice ints contains the value n -func containsInt(ints []int, n int) bool { - for _, i := range ints { - if i == n { - return true +func responseHasStatusCode(resp *http.Response, codes ...int) bool { + if resp != nil { + for _, i := range codes { + if i == resp.StatusCode { + return true + } } } return false @@ -1024,6 +1073,32 @@ func (mt *MultiTenantServicePrincipalToken) EnsureFreshWithContext(ctx context.C return nil } +// RefreshWithContext obtains a fresh token for the Service Principal. +func (mt *MultiTenantServicePrincipalToken) RefreshWithContext(ctx context.Context) error { + if err := mt.PrimaryToken.RefreshWithContext(ctx); err != nil { + return fmt.Errorf("failed to refresh primary token: %v", err) + } + for _, aux := range mt.AuxiliaryTokens { + if err := aux.RefreshWithContext(ctx); err != nil { + return fmt.Errorf("failed to refresh auxiliary token: %v", err) + } + } + return nil +} + +// RefreshExchangeWithContext refreshes the token, but for a different resource. +func (mt *MultiTenantServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { + if err := mt.PrimaryToken.RefreshExchangeWithContext(ctx, resource); err != nil { + return fmt.Errorf("failed to refresh primary token: %v", err) + } + for _, aux := range mt.AuxiliaryTokens { + if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil { + return fmt.Errorf("failed to refresh auxiliary token: %v", err) + } + } + return nil +} + // NewMultiTenantServicePrincipalToken creates a new MultiTenantServicePrincipalToken with the specified credentials and resource. func NewMultiTenantServicePrincipalToken(multiTenantCfg MultiTenantOAuthConfig, clientID string, secret string, resource string) (*MultiTenantServicePrincipalToken, error) { if err := validateStringParam(clientID, "clientID"); err != nil { diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go index 380865cd6afb..54e87b5b648c 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go @@ -15,6 +15,7 @@ package autorest // limitations under the License. import ( + "crypto/tls" "encoding/base64" "fmt" "net/http" @@ -22,7 +23,6 @@ import ( "strings" "github.com/Azure/go-autorest/autorest/adal" - "github.com/Azure/go-autorest/tracing" ) const ( @@ -149,11 +149,11 @@ type BearerAuthorizerCallback struct { // NewBearerAuthorizerCallback creates a bearer authorization callback. The callback // is invoked when the HTTP request is submitted. -func NewBearerAuthorizerCallback(sender Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback { - if sender == nil { - sender = &http.Client{Transport: tracing.Transport} +func NewBearerAuthorizerCallback(s Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback { + if s == nil { + s = sender(tls.RenegotiateNever) } - return &BearerAuthorizerCallback{sender: sender, callback: callback} + return &BearerAuthorizerCallback{sender: s, callback: callback} } // WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose value diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go new file mode 100644 index 000000000000..89a659cb6646 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go @@ -0,0 +1,67 @@ +package autorest + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "fmt" + "net/http" + "strings" +) + +// SASTokenAuthorizer implements an authorization for SAS Token Authentication +// this can be used for interaction with Blob Storage Endpoints +type SASTokenAuthorizer struct { + sasToken string +} + +// NewSASTokenAuthorizer creates a SASTokenAuthorizer using the given credentials +func NewSASTokenAuthorizer(sasToken string) (*SASTokenAuthorizer, error) { + if strings.TrimSpace(sasToken) == "" { + return nil, fmt.Errorf("sasToken cannot be empty") + } + + token := sasToken + if strings.HasPrefix(sasToken, "?") { + token = strings.TrimPrefix(sasToken, "?") + } + + return &SASTokenAuthorizer{ + sasToken: token, + }, nil +} + +// WithAuthorization returns a PrepareDecorator that adds a shared access signature token to the +// URI's query parameters. This can be used for the Blob, Queue, and File Services. +// +// See https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature +func (sas *SASTokenAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + + if r.URL.RawQuery != "" { + r.URL.RawQuery = fmt.Sprintf("%s&%s", r.URL.RawQuery, sas.sasToken) + } else { + r.URL.RawQuery = sas.sasToken + } + + r.RequestURI = r.URL.String() + return Prepare(r) + }) + } +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go new file mode 100644 index 000000000000..33e5f1270174 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go @@ -0,0 +1,301 @@ +package autorest + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "bytes" + "crypto/hmac" + "crypto/sha256" + "encoding/base64" + "fmt" + "net/http" + "net/url" + "sort" + "strings" + "time" +) + +// SharedKeyType defines the enumeration for the various shared key types. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key for details on the shared key types. +type SharedKeyType string + +const ( + // SharedKey is used to authorize against blobs, files and queues services. + SharedKey SharedKeyType = "sharedKey" + + // SharedKeyForTable is used to authorize against the table service. + SharedKeyForTable SharedKeyType = "sharedKeyTable" + + // SharedKeyLite is used to authorize against blobs, files and queues services. It's provided for + // backwards compatibility with API versions before 2009-09-19. Prefer SharedKey instead. + SharedKeyLite SharedKeyType = "sharedKeyLite" + + // SharedKeyLiteForTable is used to authorize against the table service. It's provided for + // backwards compatibility with older table API versions. Prefer SharedKeyForTable instead. + SharedKeyLiteForTable SharedKeyType = "sharedKeyLiteTable" +) + +const ( + headerAccept = "Accept" + headerAcceptCharset = "Accept-Charset" + headerContentEncoding = "Content-Encoding" + headerContentLength = "Content-Length" + headerContentMD5 = "Content-MD5" + headerContentLanguage = "Content-Language" + headerIfModifiedSince = "If-Modified-Since" + headerIfMatch = "If-Match" + headerIfNoneMatch = "If-None-Match" + headerIfUnmodifiedSince = "If-Unmodified-Since" + headerDate = "Date" + headerXMSDate = "X-Ms-Date" + headerXMSVersion = "x-ms-version" + headerRange = "Range" +) + +const storageEmulatorAccountName = "devstoreaccount1" + +// SharedKeyAuthorizer implements an authorization for Shared Key +// this can be used for interaction with Blob, File and Queue Storage Endpoints +type SharedKeyAuthorizer struct { + accountName string + accountKey []byte + keyType SharedKeyType +} + +// NewSharedKeyAuthorizer creates a SharedKeyAuthorizer using the provided credentials and shared key type. +func NewSharedKeyAuthorizer(accountName, accountKey string, keyType SharedKeyType) (*SharedKeyAuthorizer, error) { + key, err := base64.StdEncoding.DecodeString(accountKey) + if err != nil { + return nil, fmt.Errorf("malformed storage account key: %v", err) + } + return &SharedKeyAuthorizer{ + accountName: accountName, + accountKey: key, + keyType: keyType, + }, nil +} + +// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose +// value is " " followed by the computed key. +// This can be used for the Blob, Queue, and File Services +// +// from: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key +// You may use Shared Key authorization to authorize a request made against the +// 2009-09-19 version and later of the Blob and Queue services, +// and version 2014-02-14 and later of the File services. +func (sk *SharedKeyAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + + sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType) + return Prepare(r, WithHeader(headerAuthorization, sk)) + }) + } +} + +func buildSharedKey(accName string, accKey []byte, req *http.Request, keyType SharedKeyType) (string, error) { + canRes, err := buildCanonicalizedResource(accName, req.URL.String(), keyType) + if err != nil { + return "", err + } + + if req.Header == nil { + req.Header = http.Header{} + } + + // ensure date is set + if req.Header.Get(headerDate) == "" && req.Header.Get(headerXMSDate) == "" { + date := time.Now().UTC().Format(http.TimeFormat) + req.Header.Set(headerXMSDate, date) + } + canString, err := buildCanonicalizedString(req.Method, req.Header, canRes, keyType) + if err != nil { + return "", err + } + return createAuthorizationHeader(accName, accKey, canString, keyType), nil +} + +func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) (string, error) { + errMsg := "buildCanonicalizedResource error: %s" + u, err := url.Parse(uri) + if err != nil { + return "", fmt.Errorf(errMsg, err.Error()) + } + + cr := bytes.NewBufferString("") + if accountName != storageEmulatorAccountName { + cr.WriteString("/") + cr.WriteString(getCanonicalizedAccountName(accountName)) + } + + if len(u.Path) > 0 { + // Any portion of the CanonicalizedResource string that is derived from + // the resource's URI should be encoded exactly as it is in the URI. + // -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx + cr.WriteString(u.EscapedPath()) + } + + params, err := url.ParseQuery(u.RawQuery) + if err != nil { + return "", fmt.Errorf(errMsg, err.Error()) + } + + // See https://github.com/Azure/azure-storage-net/blob/master/Lib/Common/Core/Util/AuthenticationUtility.cs#L277 + if keyType == SharedKey { + if len(params) > 0 { + cr.WriteString("\n") + + keys := []string{} + for key := range params { + keys = append(keys, key) + } + sort.Strings(keys) + + completeParams := []string{} + for _, key := range keys { + if len(params[key]) > 1 { + sort.Strings(params[key]) + } + + completeParams = append(completeParams, fmt.Sprintf("%s:%s", key, strings.Join(params[key], ","))) + } + cr.WriteString(strings.Join(completeParams, "\n")) + } + } else { + // search for "comp" parameter, if exists then add it to canonicalizedresource + if v, ok := params["comp"]; ok { + cr.WriteString("?comp=" + v[0]) + } + } + + return string(cr.Bytes()), nil +} + +func getCanonicalizedAccountName(accountName string) string { + // since we may be trying to access a secondary storage account, we need to + // remove the -secondary part of the storage name + return strings.TrimSuffix(accountName, "-secondary") +} + +func buildCanonicalizedString(verb string, headers http.Header, canonicalizedResource string, keyType SharedKeyType) (string, error) { + contentLength := headers.Get(headerContentLength) + if contentLength == "0" { + contentLength = "" + } + date := headers.Get(headerDate) + if v := headers.Get(headerXMSDate); v != "" { + if keyType == SharedKey || keyType == SharedKeyLite { + date = "" + } else { + date = v + } + } + var canString string + switch keyType { + case SharedKey: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentEncoding), + headers.Get(headerContentLanguage), + contentLength, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + headers.Get(headerIfModifiedSince), + headers.Get(headerIfMatch), + headers.Get(headerIfNoneMatch), + headers.Get(headerIfUnmodifiedSince), + headers.Get(headerRange), + buildCanonicalizedHeader(headers), + canonicalizedResource, + }, "\n") + case SharedKeyForTable: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + canonicalizedResource, + }, "\n") + case SharedKeyLite: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + buildCanonicalizedHeader(headers), + canonicalizedResource, + }, "\n") + case SharedKeyLiteForTable: + canString = strings.Join([]string{ + date, + canonicalizedResource, + }, "\n") + default: + return "", fmt.Errorf("key type '%s' is not supported", keyType) + } + return canString, nil +} + +func buildCanonicalizedHeader(headers http.Header) string { + cm := make(map[string]string) + + for k := range headers { + headerName := strings.TrimSpace(strings.ToLower(k)) + if strings.HasPrefix(headerName, "x-ms-") { + cm[headerName] = headers.Get(k) + } + } + + if len(cm) == 0 { + return "" + } + + keys := []string{} + for key := range cm { + keys = append(keys, key) + } + + sort.Strings(keys) + + ch := bytes.NewBufferString("") + + for _, key := range keys { + ch.WriteString(key) + ch.WriteRune(':') + ch.WriteString(cm[key]) + ch.WriteRune('\n') + } + + return strings.TrimSuffix(string(ch.Bytes()), "\n") +} + +func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string { + h := hmac.New(sha256.New, accountKey) + h.Write([]byte(canonicalizedString)) + signature := base64.StdEncoding.EncodeToString(h.Sum(nil)) + var key string + switch keyType { + case SharedKey, SharedKeyForTable: + key = "SharedKey" + case SharedKeyLite, SharedKeyLiteForTable: + key = "SharedKeyLite" + } + return fmt.Sprintf("%s %s:%s", key, getCanonicalizedAccountName(accountName), signature) +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go index b6ef128396eb..5f02026b391c 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go @@ -715,7 +715,7 @@ type MSIConfig struct { // Authorizer gets the authorizer from MSI. func (mc MSIConfig) Authorizer() (autorest.Authorizer, error) { - msiEndpoint, err := adal.GetMSIVMEndpoint() + msiEndpoint, err := adal.GetMSIEndpoint() if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod index 9605c97117ec..4bebbdc242af 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.mod @@ -3,9 +3,9 @@ module github.com/Azure/go-autorest/autorest/azure/auth go 1.12 require ( - github.com/Azure/go-autorest/autorest v0.1.0 - github.com/Azure/go-autorest/autorest/adal v0.1.0 - github.com/Azure/go-autorest/autorest/azure/cli v0.1.0 + github.com/Azure/go-autorest/autorest v0.9.3 + github.com/Azure/go-autorest/autorest/adal v0.8.1 + github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 github.com/dimchansky/utfbom v1.1.0 - golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 ) diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum index 39f37022a6a3..9ea3fa575190 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go.sum @@ -1,153 +1,39 @@ -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= -contrib.go.opencensus.io/exporter/ocagent v0.4.12 h1:jGFvw3l57ViIVEPKKEUXPcLYIXJmQxLUh6ey1eJhwyc= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= -github.com/Azure/go-autorest/autorest v0.1.0 h1:z68s0uL7bVfplrwwCUsYoMezUVQdym6EPOllAT02BtU= -github.com/Azure/go-autorest/autorest v0.1.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= -github.com/Azure/go-autorest/autorest/adal v0.1.0 h1:RSw/7EAullliqwkZvgIGDYZWQm1PGKXI8c4aY/87yuU= -github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= -github.com/Azure/go-autorest/autorest/azure/cli v0.1.0 h1:YTtBrcb6mhA+PoSW8WxFDoIIyjp13XqJeX80ssQtri4= -github.com/Azure/go-autorest/autorest/azure/cli v0.1.0/go.mod h1:Dk8CUAt/b/PzkfeRsWzVG9Yj3ps8mS8ECztu43rdU8U= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6yDJ+PSwsgi4= +github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -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/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/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2 h1:NAfh7zF0/3/HqtMvJNZ/RFrSlCE6ZTlHmKfhL/Dm1Jk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 h1:O5YqonU5IWby+w98jVUG9h7zlCWCcH4RHyPVReBmhzk= -golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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 h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/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/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 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e h1:nFYrTHrdrAOpShe27kaFHjsqYSEQ0KWqdWLu3xuZJts= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go new file mode 100644 index 000000000000..2f09cd177aa5 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package auth + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go index 3a0a439ff930..26be936b7e5f 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go @@ -17,6 +17,7 @@ package azure // limitations under the License. import ( + "bytes" "encoding/json" "fmt" "io/ioutil" @@ -143,7 +144,7 @@ type RequestError struct { autorest.DetailedError // The error returned by the Azure service. - ServiceError *ServiceError `json:"error"` + ServiceError *ServiceError `json:"error" xml:"Error"` // The request id (from the x-ms-request-id-header) of the request. RequestID string @@ -285,26 +286,34 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator { var e RequestError defer resp.Body.Close() + encodedAs := autorest.EncodedAsJSON + if strings.Contains(resp.Header.Get("Content-Type"), "xml") { + encodedAs = autorest.EncodedAsXML + } + // Copy and replace the Body in case it does not contain an error object. // This will leave the Body available to the caller. - b, decodeErr := autorest.CopyAndDecode(autorest.EncodedAsJSON, resp.Body, &e) + b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e) resp.Body = ioutil.NopCloser(&b) if decodeErr != nil { return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), decodeErr) } if e.ServiceError == nil { // Check if error is unwrapped ServiceError - if err := json.Unmarshal(b.Bytes(), &e.ServiceError); err != nil { + decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) + if err := decoder.Decode(&e.ServiceError); err != nil { return err } } if e.ServiceError.Message == "" { // if we're here it means the returned error wasn't OData v4 compliant. - // try to unmarshal the body as raw JSON in hopes of getting something. + // try to unmarshal the body in hopes of getting something. rawBody := map[string]interface{}{} - if err := json.Unmarshal(b.Bytes(), &rawBody); err != nil { + decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) + if err := decoder.Decode(&rawBody); err != nil { return err } + e.ServiceError = &ServiceError{ Code: "Unknown", Message: "Unknown service error", diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod index a147222b4e39..a58302914dc5 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod @@ -3,8 +3,9 @@ module github.com/Azure/go-autorest/autorest/azure/cli go 1.12 require ( - github.com/Azure/go-autorest/autorest/adal v0.1.0 - github.com/Azure/go-autorest/autorest/date v0.1.0 + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/Azure/go-autorest/autorest/adal v0.8.0 + github.com/Azure/go-autorest/autorest/date v0.2.0 github.com/dimchansky/utfbom v1.1.0 github.com/mitchellh/go-homedir v1.1.0 ) diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum index 1d098cff2136..542806b94711 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum @@ -1,144 +1,29 @@ -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= -contrib.go.opencensus.io/exporter/ocagent v0.4.12 h1:jGFvw3l57ViIVEPKKEUXPcLYIXJmQxLUh6ey1eJhwyc= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= -github.com/Azure/go-autorest/autorest/adal v0.1.0 h1:RSw/7EAullliqwkZvgIGDYZWQm1PGKXI8c4aY/87yuU= -github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -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/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/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2 h1:NAfh7zF0/3/HqtMvJNZ/RFrSlCE6ZTlHmKfhL/Dm1Jk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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 h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/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/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 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go new file mode 100644 index 000000000000..618bed392fc5 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package cli + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go index a336b958d463..f45c3a516d9f 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go @@ -51,9 +51,13 @@ type User struct { const azureProfileJSON = "azureProfile.json" +func configDir() string { + return os.Getenv("AZURE_CONFIG_DIR") +} + // ProfilePath returns the path where the Azure Profile is stored from the Azure CLI func ProfilePath() (string, error) { - if cfgDir := os.Getenv("AZURE_CONFIG_DIR"); cfgDir != "" { + if cfgDir := configDir(); cfgDir != "" { return filepath.Join(cfgDir, azureProfileJSON), nil } return homedir.Expand("~/.azure/" + azureProfileJSON) diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go index 810075ba61f8..44ff446f6697 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go @@ -20,6 +20,7 @@ import ( "fmt" "os" "os/exec" + "path/filepath" "regexp" "runtime" "strconv" @@ -44,6 +45,8 @@ type Token struct { UserID string `json:"userId"` } +const accessTokensJSON = "accessTokens.json" + // ToADALToken converts an Azure CLI `Token`` to an `adal.Token`` func (t Token) ToADALToken() (converted adal.Token, err error) { tokenExpirationDate, err := ParseExpirationDate(t.ExpiresOn) @@ -68,17 +71,19 @@ func (t Token) ToADALToken() (converted adal.Token, err error) { // AccessTokensPath returns the path where access tokens are stored from the Azure CLI // TODO(#199): add unit test. func AccessTokensPath() (string, error) { - // Azure-CLI allows user to customize the path of access tokens thorugh environment variable. - var accessTokenPath = os.Getenv("AZURE_ACCESS_TOKEN_FILE") - var err error + // Azure-CLI allows user to customize the path of access tokens through environment variable. + if accessTokenPath := os.Getenv("AZURE_ACCESS_TOKEN_FILE"); accessTokenPath != "" { + return accessTokenPath, nil + } - // Fallback logic to default path on non-cloud-shell environment. - // TODO(#200): remove the dependency on hard-coding path. - if accessTokenPath == "" { - accessTokenPath, err = homedir.Expand("~/.azure/accessTokens.json") + // Azure-CLI allows user to customize the path to Azure config directory through environment variable. + if cfgDir := configDir(); cfgDir != "" { + return filepath.Join(cfgDir, accessTokensJSON), nil } - return accessTokenPath, err + // Fallback logic to default path on non-cloud-shell environment. + // TODO(#200): remove the dependency on hard-coding path. + return homedir.Expand("~/.azure/" + accessTokensJSON) } // ParseExpirationDate parses either a Azure CLI or CloudShell date into a time object diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go index 86ce9f2b5b1e..c6d39f686655 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go @@ -47,11 +47,15 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator { if resp.StatusCode != http.StatusConflict || client.SkipResourceProviderRegistration { return resp, err } + var re RequestError - err = autorest.Respond( - resp, - autorest.ByUnmarshallingJSON(&re), - ) + if strings.Contains(r.Header.Get("Content-Type"), "xml") { + // XML errors (e.g. Storage Data Plane) only return the inner object + err = autorest.Respond(resp, autorest.ByUnmarshallingXML(&re.ServiceError)) + } else { + err = autorest.Respond(resp, autorest.ByUnmarshallingJSON(&re)) + } + if err != nil { return resp, err } diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go index 92da6adb2c7d..1c6a0617a1fe 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -22,12 +22,10 @@ import ( "io/ioutil" "log" "net/http" - "net/http/cookiejar" "strings" "time" "github.com/Azure/go-autorest/logger" - "github.com/Azure/go-autorest/tracing" ) const ( @@ -264,30 +262,8 @@ func (c Client) Do(r *http.Request) (*http.Response, error) { // sender returns the Sender to which to send requests. func (c Client) sender(renengotiation tls.RenegotiationSupport) Sender { if c.Sender == nil { - // Use behaviour compatible with DefaultTransport, but require TLS minimum version. - var defaultTransport = http.DefaultTransport.(*http.Transport) - transport := tracing.Transport - // for non-default values of TLS renegotiation create a new tracing transport. - // updating tracing.Transport affects all clients which is not what we want. - if renengotiation != tls.RenegotiateNever { - transport = tracing.NewTransport() - } - transport.Base = &http.Transport{ - Proxy: defaultTransport.Proxy, - DialContext: defaultTransport.DialContext, - MaxIdleConns: defaultTransport.MaxIdleConns, - IdleConnTimeout: defaultTransport.IdleConnTimeout, - TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout, - ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout, - TLSClientConfig: &tls.Config{ - MinVersion: tls.VersionTLS12, - Renegotiation: renengotiation, - }, - } - j, _ := cookiejar.New(nil) - return &http.Client{Jar: j, Transport: transport} + return sender(renengotiation) } - return c.Sender } diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod index 13a1e9803386..3adc4804c3d2 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod @@ -1,3 +1,5 @@ module github.com/Azure/go-autorest/autorest/date go 1.12 + +require github.com/Azure/go-autorest/autorest v0.9.0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.sum b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum new file mode 100644 index 000000000000..9e2ee7a94844 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum @@ -0,0 +1,16 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go new file mode 100644 index 000000000000..55adf930f4ab --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package date + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod index 6b7c7f2762b7..6f1fcd4a4dbd 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/go.mod @@ -3,10 +3,9 @@ module github.com/Azure/go-autorest/autorest go 1.12 require ( - github.com/Azure/go-autorest/autorest/adal v0.2.0 - github.com/Azure/go-autorest/autorest/mocks v0.1.0 + github.com/Azure/go-autorest/autorest/adal v0.8.0 + github.com/Azure/go-autorest/autorest/mocks v0.3.0 github.com/Azure/go-autorest/logger v0.1.0 - github.com/Azure/go-autorest/tracing v0.1.0 - go.opencensus.io v0.20.2 - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + github.com/Azure/go-autorest/tracing v0.5.0 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 ) diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum index a6848303f437..e0d94da0a253 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/go.sum @@ -1,143 +1,30 @@ -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= -contrib.go.opencensus.io/exporter/ocagent v0.4.12 h1:jGFvw3l57ViIVEPKKEUXPcLYIXJmQxLUh6ey1eJhwyc= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= -github.com/Azure/go-autorest/autorest/adal v0.2.0 h1:7IBDu1jgh+ADHXnEYExkV9RE/ztOOlxdACkkPRthGKw= -github.com/Azure/go-autorest/autorest/adal v0.2.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -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/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/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2 h1:NAfh7zF0/3/HqtMvJNZ/RFrSlCE6ZTlHmKfhL/Dm1Jk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= 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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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 h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/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/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 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/Azure/go-autorest/autorest/preparer.go index 9f864ab1a15f..6e8ed64eba1c 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/preparer.go +++ b/vendor/github.com/Azure/go-autorest/autorest/preparer.go @@ -523,7 +523,7 @@ func parseURL(u *url.URL, path string) (*url.URL, error) { // WithQueryParameters returns a PrepareDecorators that encodes and applies the query parameters // given in the supplied map (i.e., key=value). func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorator { - parameters := ensureValueStrings(queryParameters) + parameters := MapToValues(queryParameters) return func(p Preparer) Preparer { return PreparerFunc(func(r *http.Request) (*http.Request, error) { r, err := p.Prepare(r) @@ -531,14 +531,16 @@ func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorato if r.URL == nil { return r, NewError("autorest", "WithQueryParameters", "Invoked with a nil URL") } - v := r.URL.Query() for key, value := range parameters { - d, err := url.QueryUnescape(value) - if err != nil { - return r, err + for i := range value { + d, err := url.QueryUnescape(value[i]) + if err != nil { + return r, err + } + value[i] = d } - v.Add(key, d) + v[key] = value } r.URL.RawQuery = v.Encode() } diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go index 92a55404af19..5e595d7b1a34 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go @@ -16,10 +16,12 @@ package autorest import ( "context" + "crypto/tls" "fmt" "log" "math" "net/http" + "net/http/cookiejar" "strconv" "time" @@ -69,7 +71,7 @@ type SendDecorator func(Sender) Sender // CreateSender creates, decorates, and returns, as a Sender, the default http.Client. func CreateSender(decorators ...SendDecorator) Sender { - return DecorateSender(&http.Client{}, decorators...) + return DecorateSender(sender(tls.RenegotiateNever), decorators...) } // DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to @@ -92,7 +94,7 @@ func DecorateSender(s Sender, decorators ...SendDecorator) Sender { // // Send will not poll or retry requests. func Send(r *http.Request, decorators ...SendDecorator) (*http.Response, error) { - return SendWithSender(&http.Client{Transport: tracing.Transport}, r, decorators...) + return SendWithSender(sender(tls.RenegotiateNever), r, decorators...) } // SendWithSender sends the passed http.Request, through the provided Sender, returning the @@ -104,6 +106,29 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht return DecorateSender(s, decorators...).Do(r) } +func sender(renengotiation tls.RenegotiationSupport) Sender { + // Use behaviour compatible with DefaultTransport, but require TLS minimum version. + defaultTransport := http.DefaultTransport.(*http.Transport) + transport := &http.Transport{ + Proxy: defaultTransport.Proxy, + DialContext: defaultTransport.DialContext, + MaxIdleConns: defaultTransport.MaxIdleConns, + IdleConnTimeout: defaultTransport.IdleConnTimeout, + TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout, + ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout, + TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS12, + Renegotiation: renengotiation, + }, + } + var roundTripper http.RoundTripper = transport + if tracing.IsEnabled() { + roundTripper = tracing.NewTransport(transport) + } + j, _ := cookiejar.New(nil) + return &http.Client{Jar: j, Transport: roundTripper} +} + // AfterDelay returns a SendDecorator that delays for the passed time.Duration before // invoking the Sender. The delay may be terminated by closing the optional channel on the // http.Request. If canceled, no further Senders are invoked. @@ -264,10 +289,6 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt return } resp, err = s.Do(rr.Request()) - // if the error isn't temporary don't bother retrying - if err != nil && !IsTemporaryNetworkError(err) { - return - } // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) { diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go.mod b/vendor/github.com/Azure/go-autorest/autorest/to/go.mod index a2054be36cd8..48fd8c6e57b4 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/to/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/to/go.mod @@ -1,3 +1,5 @@ module github.com/Azure/go-autorest/autorest/to go 1.12 + +require github.com/Azure/go-autorest/autorest v0.9.0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go.sum b/vendor/github.com/Azure/go-autorest/autorest/to/go.sum new file mode 100644 index 000000000000..d7ee6b462311 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/to/go.sum @@ -0,0 +1,17 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go new file mode 100644 index 000000000000..8e8292107071 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/to/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package to + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go index 08cf11c11898..27f824f544bc 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go @@ -140,18 +140,18 @@ func MapToValues(m map[string]interface{}) url.Values { return v } -// AsStringSlice method converts interface{} to []string. This expects a -//that the parameter passed to be a slice or array of a type that has the underlying -//type a string. +// AsStringSlice method converts interface{} to []string. +// s must be of type slice or array or an error is returned. +// Each element of s will be converted to its string representation. func AsStringSlice(s interface{}) ([]string, error) { v := reflect.ValueOf(s) if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, NewError("autorest", "AsStringSlice", "the value's type is not an array.") + return nil, NewError("autorest", "AsStringSlice", "the value's type is not a slice or array.") } stringSlice := make([]string, 0, v.Len()) for i := 0; i < v.Len(); i++ { - stringSlice = append(stringSlice, v.Index(i).String()) + stringSlice = append(stringSlice, fmt.Sprintf("%v", v.Index(i))) } return stringSlice, nil } diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/validation/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod index c44c51ff60c2..b3f9b6a09609 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod @@ -2,4 +2,7 @@ module github.com/Azure/go-autorest/autorest/validation go 1.12 -require github.com/stretchr/testify v1.3.0 +require ( + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/stretchr/testify v1.3.0 +) diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum b/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum index 4347755afe82..6b9010a736d3 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum @@ -1,7 +1,24 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go new file mode 100644 index 000000000000..2b2668581e87 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package validation + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go index c446516968f4..6c1d865668d3 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/version.go +++ b/vendor/github.com/Azure/go-autorest/autorest/version.go @@ -19,7 +19,7 @@ import ( "runtime" ) -const number = "v12.4.1" +const number = "v13.3.2" var ( userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", diff --git a/vendor/github.com/Azure/go-autorest/logger/LICENSE b/vendor/github.com/Azure/go-autorest/logger/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/logger/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/tracing/LICENSE b/vendor/github.com/Azure/go-autorest/tracing/LICENSE new file mode 100644 index 000000000000..b9d6a27ea92e --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/tracing/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Microsoft Corporation + + 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. diff --git a/vendor/github.com/Azure/go-autorest/tracing/go.mod b/vendor/github.com/Azure/go-autorest/tracing/go.mod index 6a9394c513f7..25c34c1085a7 100644 --- a/vendor/github.com/Azure/go-autorest/tracing/go.mod +++ b/vendor/github.com/Azure/go-autorest/tracing/go.mod @@ -1,13 +1,3 @@ module github.com/Azure/go-autorest/tracing go 1.12 - -require ( - // later releases of ocagent aren't compatible with our version of opencensus - contrib.go.opencensus.io/exporter/ocagent v0.3.0 - // keep this pre-v0.22.0 to avoid dependency on protobuf v1.3+ - go.opencensus.io v0.21.0 -) - -// pin this to v0.1.0 to avoid breaking changes incompatible with our version of ocagent -replace github.com/census-instrumentation/opencensus-proto => github.com/census-instrumentation/opencensus-proto v0.1.0 diff --git a/vendor/github.com/Azure/go-autorest/tracing/go.sum b/vendor/github.com/Azure/go-autorest/tracing/go.sum deleted file mode 100644 index 736a4f4f2864..000000000000 --- a/vendor/github.com/Azure/go-autorest/tracing/go.sum +++ /dev/null @@ -1,68 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -contrib.go.opencensus.io/exporter/ocagent v0.3.0 h1:fyqPXp7d+BBV3tXa7EE1CYrObJr7R9jTAOO/AsdcQBg= -contrib.go.opencensus.io/exporter/ocagent v0.3.0/go.mod h1:0fnkYHF+ORKj7HWzOExKkUHeFX79gXSKUQbpnAM+wzo= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/census-instrumentation/opencensus-proto v0.1.0 h1:VwZ9smxzX8u14/125wHIX7ARV+YhR+L4JADswwxWK0Y= -github.com/census-instrumentation/opencensus-proto v0.1.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI= -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-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -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/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-20180906233101-161cd47e91fd/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 h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -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-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/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= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf h1:rjxqQmxjyqerRKEj+tZW+MCm4LgpFXu18bsEoCMgDsk= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.15.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/Azure/go-autorest/tracing/tracing.go b/vendor/github.com/Azure/go-autorest/tracing/tracing.go index 28951c2848c6..0e7a6e96254a 100644 --- a/vendor/github.com/Azure/go-autorest/tracing/tracing.go +++ b/vendor/github.com/Azure/go-autorest/tracing/tracing.go @@ -16,180 +16,52 @@ package tracing import ( "context" - "fmt" "net/http" - "os" - - "contrib.go.opencensus.io/exporter/ocagent" - "go.opencensus.io/plugin/ochttp" - "go.opencensus.io/plugin/ochttp/propagation/tracecontext" - "go.opencensus.io/stats/view" - "go.opencensus.io/trace" -) - -var ( - // Transport is the default tracing RoundTripper. The custom options setter will control - // if traces are being emitted or not. - Transport = NewTransport() - - // enabled is the flag for marking if tracing is enabled. - enabled = false - - // Sampler is the tracing sampler. If tracing is disabled it will never sample. Otherwise - // it will be using the parent sampler or the default. - sampler = trace.NeverSample() - - // Views for metric instrumentation. - views = map[string]*view.View{} - - // the trace exporter - traceExporter trace.Exporter ) -func init() { - enableFromEnv() +// Tracer represents an HTTP tracing facility. +type Tracer interface { + NewTransport(base *http.Transport) http.RoundTripper + StartSpan(ctx context.Context, name string) context.Context + EndSpan(ctx context.Context, httpStatusCode int, err error) } -func enableFromEnv() { - _, ok := os.LookupEnv("AZURE_SDK_TRACING_ENABLED") - _, legacyOk := os.LookupEnv("AZURE_SDK_TRACING_ENABELD") - if ok || legacyOk { - agentEndpoint, ok := os.LookupEnv("OCAGENT_TRACE_EXPORTER_ENDPOINT") - - if ok { - EnableWithAIForwarding(agentEndpoint) - } else { - Enable() - } - } -} +var ( + tracer Tracer +) -// NewTransport returns a new instance of a tracing-aware RoundTripper. -func NewTransport() *ochttp.Transport { - return &ochttp.Transport{ - Propagation: &tracecontext.HTTPFormat{}, - GetStartOptions: getStartOptions, - } +// Register will register the provided Tracer. Pass nil to unregister a Tracer. +func Register(t Tracer) { + tracer = t } -// IsEnabled returns true if monitoring is enabled for the sdk. +// IsEnabled returns true if a Tracer has been registered. func IsEnabled() bool { - return enabled -} - -// Enable will start instrumentation for metrics and traces. -func Enable() error { - enabled = true - sampler = nil - - err := initStats() - return err + return tracer != nil } -// Disable will disable instrumentation for metrics and traces. -func Disable() { - disableStats() - sampler = trace.NeverSample() - if traceExporter != nil { - trace.UnregisterExporter(traceExporter) +// NewTransport creates a new instrumenting http.RoundTripper for the +// registered Tracer. If no Tracer has been registered it returns nil. +func NewTransport(base *http.Transport) http.RoundTripper { + if tracer != nil { + return tracer.NewTransport(base) } - enabled = false + return nil } -// EnableWithAIForwarding will start instrumentation and will connect to app insights forwarder -// exporter making the metrics and traces available in app insights. -func EnableWithAIForwarding(agentEndpoint string) (err error) { - err = Enable() - if err != nil { - return err - } - - traceExporter, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithAddress(agentEndpoint)) - if err != nil { - return err - } - trace.RegisterExporter(traceExporter) - return -} - -// getStartOptions is the custom options setter for the ochttp package. -func getStartOptions(*http.Request) trace.StartOptions { - return trace.StartOptions{ - Sampler: sampler, - } -} - -// initStats registers the views for the http metrics -func initStats() (err error) { - clientViews := []*view.View{ - ochttp.ClientCompletedCount, - ochttp.ClientRoundtripLatencyDistribution, - ochttp.ClientReceivedBytesDistribution, - ochttp.ClientSentBytesDistribution, - } - for _, cv := range clientViews { - vn := fmt.Sprintf("Azure/go-autorest/tracing-%s", cv.Name) - views[vn] = cv.WithName(vn) - err = view.Register(views[vn]) - if err != nil { - return err - } - } - return -} - -// disableStats will unregister the previously registered metrics -func disableStats() { - for _, v := range views { - view.Unregister(v) - } -} - -// StartSpan starts a trace span +// StartSpan starts a trace span with the specified name, associating it with the +// provided context. Has no effect if a Tracer has not been registered. func StartSpan(ctx context.Context, name string) context.Context { - ctx, _ = trace.StartSpan(ctx, name, trace.WithSampler(sampler)) + if tracer != nil { + return tracer.StartSpan(ctx, name) + } return ctx } -// EndSpan ends a previously started span stored in the context +// EndSpan ends a previously started span stored in the context. +// Has no effect if a Tracer has not been registered. func EndSpan(ctx context.Context, httpStatusCode int, err error) { - span := trace.FromContext(ctx) - - if span == nil { - return - } - - if err != nil { - span.SetStatus(trace.Status{Message: err.Error(), Code: toTraceStatusCode(httpStatusCode)}) - } - span.End() -} - -// toTraceStatusCode converts HTTP Codes to OpenCensus codes as defined -// at https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/HTTP.md#status -func toTraceStatusCode(httpStatusCode int) int32 { - switch { - case http.StatusOK <= httpStatusCode && httpStatusCode < http.StatusBadRequest: - return trace.StatusCodeOK - case httpStatusCode == http.StatusBadRequest: - return trace.StatusCodeInvalidArgument - case httpStatusCode == http.StatusUnauthorized: // 401 is actually unauthenticated. - return trace.StatusCodeUnauthenticated - case httpStatusCode == http.StatusForbidden: - return trace.StatusCodePermissionDenied - case httpStatusCode == http.StatusNotFound: - return trace.StatusCodeNotFound - case httpStatusCode == http.StatusTooManyRequests: - return trace.StatusCodeResourceExhausted - case httpStatusCode == 499: - return trace.StatusCodeCancelled - case httpStatusCode == http.StatusNotImplemented: - return trace.StatusCodeUnimplemented - case httpStatusCode == http.StatusServiceUnavailable: - return trace.StatusCodeUnavailable - case httpStatusCode == http.StatusGatewayTimeout: - return trace.StatusCodeDeadlineExceeded - default: - return trace.StatusCodeUnknown + if tracer != nil { + tracer.EndSpan(ctx, httpStatusCode, err) } } diff --git a/vendor/github.com/BurntSushi/toml/.gitignore b/vendor/github.com/BurntSushi/toml/.gitignore new file mode 100644 index 000000000000..0cd3800377d4 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.gitignore @@ -0,0 +1,5 @@ +TAGS +tags +.*.swp +tomlcheck/tomlcheck +toml.test diff --git a/vendor/github.com/BurntSushi/toml/.travis.yml b/vendor/github.com/BurntSushi/toml/.travis.yml new file mode 100644 index 000000000000..8b8afc4f0e00 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.travis.yml @@ -0,0 +1,15 @@ +language: go +go: + - 1.1 + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - tip +install: + - go install ./... + - go get github.com/BurntSushi/toml-test +script: + - export PATH="$PATH:$HOME/gopath/bin" + - make test diff --git a/vendor/github.com/BurntSushi/toml/COMPATIBLE b/vendor/github.com/BurntSushi/toml/COMPATIBLE new file mode 100644 index 000000000000..6efcfd0ce55e --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/COMPATIBLE @@ -0,0 +1,3 @@ +Compatible with TOML version +[v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) + diff --git a/vendor/github.com/BurntSushi/toml/COPYING b/vendor/github.com/BurntSushi/toml/COPYING new file mode 100644 index 000000000000..01b5743200b8 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/COPYING @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 TOML authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/BurntSushi/toml/Makefile b/vendor/github.com/BurntSushi/toml/Makefile new file mode 100644 index 000000000000..3600848d331a --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/Makefile @@ -0,0 +1,19 @@ +install: + go install ./... + +test: install + go test -v + toml-test toml-test-decoder + toml-test -encoder toml-test-encoder + +fmt: + gofmt -w *.go */*.go + colcheck *.go */*.go + +tags: + find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS + +push: + git push origin master + git push github master + diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md new file mode 100644 index 000000000000..7c1b37ecc7a0 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/README.md @@ -0,0 +1,218 @@ +## TOML parser and encoder for Go with reflection + +TOML stands for Tom's Obvious, Minimal Language. This Go package provides a +reflection interface similar to Go's standard library `json` and `xml` +packages. This package also supports the `encoding.TextUnmarshaler` and +`encoding.TextMarshaler` interfaces so that you can define custom data +representations. (There is an example of this below.) + +Spec: https://github.com/toml-lang/toml + +Compatible with TOML version +[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) + +Documentation: https://godoc.org/github.com/BurntSushi/toml + +Installation: + +```bash +go get github.com/BurntSushi/toml +``` + +Try the toml validator: + +```bash +go get github.com/BurntSushi/toml/cmd/tomlv +tomlv some-toml-file.toml +``` + +[![Build Status](https://travis-ci.org/BurntSushi/toml.svg?branch=master)](https://travis-ci.org/BurntSushi/toml) [![GoDoc](https://godoc.org/github.com/BurntSushi/toml?status.svg)](https://godoc.org/github.com/BurntSushi/toml) + +### Testing + +This package passes all tests in +[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder +and the encoder. + +### Examples + +This package works similarly to how the Go standard library handles `XML` +and `JSON`. Namely, data is loaded into Go values via reflection. + +For the simplest example, consider some TOML file as just a list of keys +and values: + +```toml +Age = 25 +Cats = [ "Cauchy", "Plato" ] +Pi = 3.14 +Perfection = [ 6, 28, 496, 8128 ] +DOB = 1987-07-05T05:45:00Z +``` + +Which could be defined in Go as: + +```go +type Config struct { + Age int + Cats []string + Pi float64 + Perfection []int + DOB time.Time // requires `import time` +} +``` + +And then decoded with: + +```go +var conf Config +if _, err := toml.Decode(tomlData, &conf); err != nil { + // handle error +} +``` + +You can also use struct tags if your struct field name doesn't map to a TOML +key value directly: + +```toml +some_key_NAME = "wat" +``` + +```go +type TOML struct { + ObscureKey string `toml:"some_key_NAME"` +} +``` + +### Using the `encoding.TextUnmarshaler` interface + +Here's an example that automatically parses duration strings into +`time.Duration` values: + +```toml +[[song]] +name = "Thunder Road" +duration = "4m49s" + +[[song]] +name = "Stairway to Heaven" +duration = "8m03s" +``` + +Which can be decoded with: + +```go +type song struct { + Name string + Duration duration +} +type songs struct { + Song []song +} +var favorites songs +if _, err := toml.Decode(blob, &favorites); err != nil { + log.Fatal(err) +} + +for _, s := range favorites.Song { + fmt.Printf("%s (%s)\n", s.Name, s.Duration) +} +``` + +And you'll also need a `duration` type that satisfies the +`encoding.TextUnmarshaler` interface: + +```go +type duration struct { + time.Duration +} + +func (d *duration) UnmarshalText(text []byte) error { + var err error + d.Duration, err = time.ParseDuration(string(text)) + return err +} +``` + +### More complex usage + +Here's an example of how to load the example from the official spec page: + +```toml +# This is a TOML document. Boom. + +title = "TOML Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] +``` + +And the corresponding Go types are: + +```go +type tomlConfig struct { + Title string + Owner ownerInfo + DB database `toml:"database"` + Servers map[string]server + Clients clients +} + +type ownerInfo struct { + Name string + Org string `toml:"organization"` + Bio string + DOB time.Time +} + +type database struct { + Server string + Ports []int + ConnMax int `toml:"connection_max"` + Enabled bool +} + +type server struct { + IP string + DC string +} + +type clients struct { + Data [][]interface{} + Hosts []string +} +``` + +Note that a case insensitive match will be tried if an exact match can't be +found. + +A working example of the above can be found in `_examples/example.{go,toml}`. diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go new file mode 100644 index 000000000000..b0fd51d5b6ea --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/decode.go @@ -0,0 +1,509 @@ +package toml + +import ( + "fmt" + "io" + "io/ioutil" + "math" + "reflect" + "strings" + "time" +) + +func e(format string, args ...interface{}) error { + return fmt.Errorf("toml: "+format, args...) +} + +// Unmarshaler is the interface implemented by objects that can unmarshal a +// TOML description of themselves. +type Unmarshaler interface { + UnmarshalTOML(interface{}) error +} + +// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`. +func Unmarshal(p []byte, v interface{}) error { + _, err := Decode(string(p), v) + return err +} + +// Primitive is a TOML value that hasn't been decoded into a Go value. +// When using the various `Decode*` functions, the type `Primitive` may +// be given to any value, and its decoding will be delayed. +// +// A `Primitive` value can be decoded using the `PrimitiveDecode` function. +// +// The underlying representation of a `Primitive` value is subject to change. +// Do not rely on it. +// +// N.B. Primitive values are still parsed, so using them will only avoid +// the overhead of reflection. They can be useful when you don't know the +// exact type of TOML data until run time. +type Primitive struct { + undecoded interface{} + context Key +} + +// DEPRECATED! +// +// Use MetaData.PrimitiveDecode instead. +func PrimitiveDecode(primValue Primitive, v interface{}) error { + md := MetaData{decoded: make(map[string]bool)} + return md.unify(primValue.undecoded, rvalue(v)) +} + +// PrimitiveDecode is just like the other `Decode*` functions, except it +// decodes a TOML value that has already been parsed. Valid primitive values +// can *only* be obtained from values filled by the decoder functions, +// including this method. (i.e., `v` may contain more `Primitive` +// values.) +// +// Meta data for primitive values is included in the meta data returned by +// the `Decode*` functions with one exception: keys returned by the Undecoded +// method will only reflect keys that were decoded. Namely, any keys hidden +// behind a Primitive will be considered undecoded. Executing this method will +// update the undecoded keys in the meta data. (See the example.) +func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error { + md.context = primValue.context + defer func() { md.context = nil }() + return md.unify(primValue.undecoded, rvalue(v)) +} + +// Decode will decode the contents of `data` in TOML format into a pointer +// `v`. +// +// TOML hashes correspond to Go structs or maps. (Dealer's choice. They can be +// used interchangeably.) +// +// TOML arrays of tables correspond to either a slice of structs or a slice +// of maps. +// +// TOML datetimes correspond to Go `time.Time` values. +// +// All other TOML types (float, string, int, bool and array) correspond +// to the obvious Go types. +// +// An exception to the above rules is if a type implements the +// encoding.TextUnmarshaler interface. In this case, any primitive TOML value +// (floats, strings, integers, booleans and datetimes) will be converted to +// a byte string and given to the value's UnmarshalText method. See the +// Unmarshaler example for a demonstration with time duration strings. +// +// Key mapping +// +// TOML keys can map to either keys in a Go map or field names in a Go +// struct. The special `toml` struct tag may be used to map TOML keys to +// struct fields that don't match the key name exactly. (See the example.) +// A case insensitive match to struct names will be tried if an exact match +// can't be found. +// +// The mapping between TOML values and Go values is loose. That is, there +// may exist TOML values that cannot be placed into your representation, and +// there may be parts of your representation that do not correspond to +// TOML values. This loose mapping can be made stricter by using the IsDefined +// and/or Undecoded methods on the MetaData returned. +// +// This decoder will not handle cyclic types. If a cyclic type is passed, +// `Decode` will not terminate. +func Decode(data string, v interface{}) (MetaData, error) { + rv := reflect.ValueOf(v) + if rv.Kind() != reflect.Ptr { + return MetaData{}, e("Decode of non-pointer %s", reflect.TypeOf(v)) + } + if rv.IsNil() { + return MetaData{}, e("Decode of nil %s", reflect.TypeOf(v)) + } + p, err := parse(data) + if err != nil { + return MetaData{}, err + } + md := MetaData{ + p.mapping, p.types, p.ordered, + make(map[string]bool, len(p.ordered)), nil, + } + return md, md.unify(p.mapping, indirect(rv)) +} + +// DecodeFile is just like Decode, except it will automatically read the +// contents of the file at `fpath` and decode it for you. +func DecodeFile(fpath string, v interface{}) (MetaData, error) { + bs, err := ioutil.ReadFile(fpath) + if err != nil { + return MetaData{}, err + } + return Decode(string(bs), v) +} + +// DecodeReader is just like Decode, except it will consume all bytes +// from the reader and decode it for you. +func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { + bs, err := ioutil.ReadAll(r) + if err != nil { + return MetaData{}, err + } + return Decode(string(bs), v) +} + +// unify performs a sort of type unification based on the structure of `rv`, +// which is the client representation. +// +// Any type mismatch produces an error. Finding a type that we don't know +// how to handle produces an unsupported type error. +func (md *MetaData) unify(data interface{}, rv reflect.Value) error { + + // Special case. Look for a `Primitive` value. + if rv.Type() == reflect.TypeOf((*Primitive)(nil)).Elem() { + // Save the undecoded data and the key context into the primitive + // value. + context := make(Key, len(md.context)) + copy(context, md.context) + rv.Set(reflect.ValueOf(Primitive{ + undecoded: data, + context: context, + })) + return nil + } + + // Special case. Unmarshaler Interface support. + if rv.CanAddr() { + if v, ok := rv.Addr().Interface().(Unmarshaler); ok { + return v.UnmarshalTOML(data) + } + } + + // Special case. Handle time.Time values specifically. + // TODO: Remove this code when we decide to drop support for Go 1.1. + // This isn't necessary in Go 1.2 because time.Time satisfies the encoding + // interfaces. + if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) { + return md.unifyDatetime(data, rv) + } + + // Special case. Look for a value satisfying the TextUnmarshaler interface. + if v, ok := rv.Interface().(TextUnmarshaler); ok { + return md.unifyText(data, v) + } + // BUG(burntsushi) + // The behavior here is incorrect whenever a Go type satisfies the + // encoding.TextUnmarshaler interface but also corresponds to a TOML + // hash or array. In particular, the unmarshaler should only be applied + // to primitive TOML values. But at this point, it will be applied to + // all kinds of values and produce an incorrect error whenever those values + // are hashes or arrays (including arrays of tables). + + k := rv.Kind() + + // laziness + if k >= reflect.Int && k <= reflect.Uint64 { + return md.unifyInt(data, rv) + } + switch k { + case reflect.Ptr: + elem := reflect.New(rv.Type().Elem()) + err := md.unify(data, reflect.Indirect(elem)) + if err != nil { + return err + } + rv.Set(elem) + return nil + case reflect.Struct: + return md.unifyStruct(data, rv) + case reflect.Map: + return md.unifyMap(data, rv) + case reflect.Array: + return md.unifyArray(data, rv) + case reflect.Slice: + return md.unifySlice(data, rv) + case reflect.String: + return md.unifyString(data, rv) + case reflect.Bool: + return md.unifyBool(data, rv) + case reflect.Interface: + // we only support empty interfaces. + if rv.NumMethod() > 0 { + return e("unsupported type %s", rv.Type()) + } + return md.unifyAnything(data, rv) + case reflect.Float32: + fallthrough + case reflect.Float64: + return md.unifyFloat64(data, rv) + } + return e("unsupported type %s", rv.Kind()) +} + +func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error { + tmap, ok := mapping.(map[string]interface{}) + if !ok { + if mapping == nil { + return nil + } + return e("type mismatch for %s: expected table but found %T", + rv.Type().String(), mapping) + } + + for key, datum := range tmap { + var f *field + fields := cachedTypeFields(rv.Type()) + for i := range fields { + ff := &fields[i] + if ff.name == key { + f = ff + break + } + if f == nil && strings.EqualFold(ff.name, key) { + f = ff + } + } + if f != nil { + subv := rv + for _, i := range f.index { + subv = indirect(subv.Field(i)) + } + if isUnifiable(subv) { + md.decoded[md.context.add(key).String()] = true + md.context = append(md.context, key) + if err := md.unify(datum, subv); err != nil { + return err + } + md.context = md.context[0 : len(md.context)-1] + } else if f.name != "" { + // Bad user! No soup for you! + return e("cannot write unexported field %s.%s", + rv.Type().String(), f.name) + } + } + } + return nil +} + +func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error { + tmap, ok := mapping.(map[string]interface{}) + if !ok { + if tmap == nil { + return nil + } + return badtype("map", mapping) + } + if rv.IsNil() { + rv.Set(reflect.MakeMap(rv.Type())) + } + for k, v := range tmap { + md.decoded[md.context.add(k).String()] = true + md.context = append(md.context, k) + + rvkey := indirect(reflect.New(rv.Type().Key())) + rvval := reflect.Indirect(reflect.New(rv.Type().Elem())) + if err := md.unify(v, rvval); err != nil { + return err + } + md.context = md.context[0 : len(md.context)-1] + + rvkey.SetString(k) + rv.SetMapIndex(rvkey, rvval) + } + return nil +} + +func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error { + datav := reflect.ValueOf(data) + if datav.Kind() != reflect.Slice { + if !datav.IsValid() { + return nil + } + return badtype("slice", data) + } + sliceLen := datav.Len() + if sliceLen != rv.Len() { + return e("expected array length %d; got TOML array of length %d", + rv.Len(), sliceLen) + } + return md.unifySliceArray(datav, rv) +} + +func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error { + datav := reflect.ValueOf(data) + if datav.Kind() != reflect.Slice { + if !datav.IsValid() { + return nil + } + return badtype("slice", data) + } + n := datav.Len() + if rv.IsNil() || rv.Cap() < n { + rv.Set(reflect.MakeSlice(rv.Type(), n, n)) + } + rv.SetLen(n) + return md.unifySliceArray(datav, rv) +} + +func (md *MetaData) unifySliceArray(data, rv reflect.Value) error { + sliceLen := data.Len() + for i := 0; i < sliceLen; i++ { + v := data.Index(i).Interface() + sliceval := indirect(rv.Index(i)) + if err := md.unify(v, sliceval); err != nil { + return err + } + } + return nil +} + +func (md *MetaData) unifyDatetime(data interface{}, rv reflect.Value) error { + if _, ok := data.(time.Time); ok { + rv.Set(reflect.ValueOf(data)) + return nil + } + return badtype("time.Time", data) +} + +func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error { + if s, ok := data.(string); ok { + rv.SetString(s) + return nil + } + return badtype("string", data) +} + +func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error { + if num, ok := data.(float64); ok { + switch rv.Kind() { + case reflect.Float32: + fallthrough + case reflect.Float64: + rv.SetFloat(num) + default: + panic("bug") + } + return nil + } + return badtype("float", data) +} + +func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error { + if num, ok := data.(int64); ok { + if rv.Kind() >= reflect.Int && rv.Kind() <= reflect.Int64 { + switch rv.Kind() { + case reflect.Int, reflect.Int64: + // No bounds checking necessary. + case reflect.Int8: + if num < math.MinInt8 || num > math.MaxInt8 { + return e("value %d is out of range for int8", num) + } + case reflect.Int16: + if num < math.MinInt16 || num > math.MaxInt16 { + return e("value %d is out of range for int16", num) + } + case reflect.Int32: + if num < math.MinInt32 || num > math.MaxInt32 { + return e("value %d is out of range for int32", num) + } + } + rv.SetInt(num) + } else if rv.Kind() >= reflect.Uint && rv.Kind() <= reflect.Uint64 { + unum := uint64(num) + switch rv.Kind() { + case reflect.Uint, reflect.Uint64: + // No bounds checking necessary. + case reflect.Uint8: + if num < 0 || unum > math.MaxUint8 { + return e("value %d is out of range for uint8", num) + } + case reflect.Uint16: + if num < 0 || unum > math.MaxUint16 { + return e("value %d is out of range for uint16", num) + } + case reflect.Uint32: + if num < 0 || unum > math.MaxUint32 { + return e("value %d is out of range for uint32", num) + } + } + rv.SetUint(unum) + } else { + panic("unreachable") + } + return nil + } + return badtype("integer", data) +} + +func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error { + if b, ok := data.(bool); ok { + rv.SetBool(b) + return nil + } + return badtype("boolean", data) +} + +func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error { + rv.Set(reflect.ValueOf(data)) + return nil +} + +func (md *MetaData) unifyText(data interface{}, v TextUnmarshaler) error { + var s string + switch sdata := data.(type) { + case TextMarshaler: + text, err := sdata.MarshalText() + if err != nil { + return err + } + s = string(text) + case fmt.Stringer: + s = sdata.String() + case string: + s = sdata + case bool: + s = fmt.Sprintf("%v", sdata) + case int64: + s = fmt.Sprintf("%d", sdata) + case float64: + s = fmt.Sprintf("%f", sdata) + default: + return badtype("primitive (string-like)", data) + } + if err := v.UnmarshalText([]byte(s)); err != nil { + return err + } + return nil +} + +// rvalue returns a reflect.Value of `v`. All pointers are resolved. +func rvalue(v interface{}) reflect.Value { + return indirect(reflect.ValueOf(v)) +} + +// indirect returns the value pointed to by a pointer. +// Pointers are followed until the value is not a pointer. +// New values are allocated for each nil pointer. +// +// An exception to this rule is if the value satisfies an interface of +// interest to us (like encoding.TextUnmarshaler). +func indirect(v reflect.Value) reflect.Value { + if v.Kind() != reflect.Ptr { + if v.CanSet() { + pv := v.Addr() + if _, ok := pv.Interface().(TextUnmarshaler); ok { + return pv + } + } + return v + } + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + return indirect(reflect.Indirect(v)) +} + +func isUnifiable(rv reflect.Value) bool { + if rv.CanSet() { + return true + } + if _, ok := rv.Interface().(TextUnmarshaler); ok { + return true + } + return false +} + +func badtype(expected string, data interface{}) error { + return e("cannot load TOML value of type %T into a Go %s", data, expected) +} diff --git a/vendor/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go new file mode 100644 index 000000000000..b9914a6798cf --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/decode_meta.go @@ -0,0 +1,121 @@ +package toml + +import "strings" + +// MetaData allows access to meta information about TOML data that may not +// be inferrable via reflection. In particular, whether a key has been defined +// and the TOML type of a key. +type MetaData struct { + mapping map[string]interface{} + types map[string]tomlType + keys []Key + decoded map[string]bool + context Key // Used only during decoding. +} + +// IsDefined returns true if the key given exists in the TOML data. The key +// should be specified hierarchially. e.g., +// +// // access the TOML key 'a.b.c' +// IsDefined("a", "b", "c") +// +// IsDefined will return false if an empty key given. Keys are case sensitive. +func (md *MetaData) IsDefined(key ...string) bool { + if len(key) == 0 { + return false + } + + var hash map[string]interface{} + var ok bool + var hashOrVal interface{} = md.mapping + for _, k := range key { + if hash, ok = hashOrVal.(map[string]interface{}); !ok { + return false + } + if hashOrVal, ok = hash[k]; !ok { + return false + } + } + return true +} + +// Type returns a string representation of the type of the key specified. +// +// Type will return the empty string if given an empty key or a key that +// does not exist. Keys are case sensitive. +func (md *MetaData) Type(key ...string) string { + fullkey := strings.Join(key, ".") + if typ, ok := md.types[fullkey]; ok { + return typ.typeString() + } + return "" +} + +// Key is the type of any TOML key, including key groups. Use (MetaData).Keys +// to get values of this type. +type Key []string + +func (k Key) String() string { + return strings.Join(k, ".") +} + +func (k Key) maybeQuotedAll() string { + var ss []string + for i := range k { + ss = append(ss, k.maybeQuoted(i)) + } + return strings.Join(ss, ".") +} + +func (k Key) maybeQuoted(i int) string { + quote := false + for _, c := range k[i] { + if !isBareKeyChar(c) { + quote = true + break + } + } + if quote { + return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\"" + } + return k[i] +} + +func (k Key) add(piece string) Key { + newKey := make(Key, len(k)+1) + copy(newKey, k) + newKey[len(k)] = piece + return newKey +} + +// Keys returns a slice of every key in the TOML data, including key groups. +// Each key is itself a slice, where the first element is the top of the +// hierarchy and the last is the most specific. +// +// The list will have the same order as the keys appeared in the TOML data. +// +// All keys returned are non-empty. +func (md *MetaData) Keys() []Key { + return md.keys +} + +// Undecoded returns all keys that have not been decoded in the order in which +// they appear in the original TOML document. +// +// This includes keys that haven't been decoded because of a Primitive value. +// Once the Primitive value is decoded, the keys will be considered decoded. +// +// Also note that decoding into an empty interface will result in no decoding, +// and so no keys will be considered decoded. +// +// In this sense, the Undecoded keys correspond to keys in the TOML document +// that do not have a concrete type in your representation. +func (md *MetaData) Undecoded() []Key { + undecoded := make([]Key, 0, len(md.keys)) + for _, key := range md.keys { + if !md.decoded[key.String()] { + undecoded = append(undecoded, key) + } + } + return undecoded +} diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go new file mode 100644 index 000000000000..b371f396edca --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/doc.go @@ -0,0 +1,27 @@ +/* +Package toml provides facilities for decoding and encoding TOML configuration +files via reflection. There is also support for delaying decoding with +the Primitive type, and querying the set of keys in a TOML document with the +MetaData type. + +The specification implemented: https://github.com/toml-lang/toml + +The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify +whether a file is a valid TOML document. It can also be used to print the +type of each key in a TOML document. + +Testing + +There are two important types of tests used for this package. The first is +contained inside '*_test.go' files and uses the standard Go unit testing +framework. These tests are primarily devoted to holistically testing the +decoder and encoder. + +The second type of testing is used to verify the implementation's adherence +to the TOML specification. These tests have been factored into their own +project: https://github.com/BurntSushi/toml-test + +The reason the tests are in a separate project is so that they can be used by +any implementation of TOML. Namely, it is language agnostic. +*/ +package toml diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go new file mode 100644 index 000000000000..d905c21a2466 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/encode.go @@ -0,0 +1,568 @@ +package toml + +import ( + "bufio" + "errors" + "fmt" + "io" + "reflect" + "sort" + "strconv" + "strings" + "time" +) + +type tomlEncodeError struct{ error } + +var ( + errArrayMixedElementTypes = errors.New( + "toml: cannot encode array with mixed element types") + errArrayNilElement = errors.New( + "toml: cannot encode array with nil element") + errNonString = errors.New( + "toml: cannot encode a map with non-string key type") + errAnonNonStruct = errors.New( + "toml: cannot encode an anonymous field that is not a struct") + errArrayNoTable = errors.New( + "toml: TOML array element cannot contain a table") + errNoKey = errors.New( + "toml: top-level values must be Go maps or structs") + errAnything = errors.New("") // used in testing +) + +var quotedReplacer = strings.NewReplacer( + "\t", "\\t", + "\n", "\\n", + "\r", "\\r", + "\"", "\\\"", + "\\", "\\\\", +) + +// Encoder controls the encoding of Go values to a TOML document to some +// io.Writer. +// +// The indentation level can be controlled with the Indent field. +type Encoder struct { + // A single indentation level. By default it is two spaces. + Indent string + + // hasWritten is whether we have written any output to w yet. + hasWritten bool + w *bufio.Writer +} + +// NewEncoder returns a TOML encoder that encodes Go values to the io.Writer +// given. By default, a single indentation level is 2 spaces. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{ + w: bufio.NewWriter(w), + Indent: " ", + } +} + +// Encode writes a TOML representation of the Go value to the underlying +// io.Writer. If the value given cannot be encoded to a valid TOML document, +// then an error is returned. +// +// The mapping between Go values and TOML values should be precisely the same +// as for the Decode* functions. Similarly, the TextMarshaler interface is +// supported by encoding the resulting bytes as strings. (If you want to write +// arbitrary binary data then you will need to use something like base64 since +// TOML does not have any binary types.) +// +// When encoding TOML hashes (i.e., Go maps or structs), keys without any +// sub-hashes are encoded first. +// +// If a Go map is encoded, then its keys are sorted alphabetically for +// deterministic output. More control over this behavior may be provided if +// there is demand for it. +// +// Encoding Go values without a corresponding TOML representation---like map +// types with non-string keys---will cause an error to be returned. Similarly +// for mixed arrays/slices, arrays/slices with nil elements, embedded +// non-struct types and nested slices containing maps or structs. +// (e.g., [][]map[string]string is not allowed but []map[string]string is OK +// and so is []map[string][]string.) +func (enc *Encoder) Encode(v interface{}) error { + rv := eindirect(reflect.ValueOf(v)) + if err := enc.safeEncode(Key([]string{}), rv); err != nil { + return err + } + return enc.w.Flush() +} + +func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) { + defer func() { + if r := recover(); r != nil { + if terr, ok := r.(tomlEncodeError); ok { + err = terr.error + return + } + panic(r) + } + }() + enc.encode(key, rv) + return nil +} + +func (enc *Encoder) encode(key Key, rv reflect.Value) { + // Special case. Time needs to be in ISO8601 format. + // Special case. If we can marshal the type to text, then we used that. + // Basically, this prevents the encoder for handling these types as + // generic structs (or whatever the underlying type of a TextMarshaler is). + switch rv.Interface().(type) { + case time.Time, TextMarshaler: + enc.keyEqElement(key, rv) + return + } + + k := rv.Kind() + switch k { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, + reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, + reflect.Uint64, + reflect.Float32, reflect.Float64, reflect.String, reflect.Bool: + enc.keyEqElement(key, rv) + case reflect.Array, reflect.Slice: + if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) { + enc.eArrayOfTables(key, rv) + } else { + enc.keyEqElement(key, rv) + } + case reflect.Interface: + if rv.IsNil() { + return + } + enc.encode(key, rv.Elem()) + case reflect.Map: + if rv.IsNil() { + return + } + enc.eTable(key, rv) + case reflect.Ptr: + if rv.IsNil() { + return + } + enc.encode(key, rv.Elem()) + case reflect.Struct: + enc.eTable(key, rv) + default: + panic(e("unsupported type for key '%s': %s", key, k)) + } +} + +// eElement encodes any value that can be an array element (primitives and +// arrays). +func (enc *Encoder) eElement(rv reflect.Value) { + switch v := rv.Interface().(type) { + case time.Time: + // Special case time.Time as a primitive. Has to come before + // TextMarshaler below because time.Time implements + // encoding.TextMarshaler, but we need to always use UTC. + enc.wf(v.UTC().Format("2006-01-02T15:04:05Z")) + return + case TextMarshaler: + // Special case. Use text marshaler if it's available for this value. + if s, err := v.MarshalText(); err != nil { + encPanic(err) + } else { + enc.writeQuoted(string(s)) + } + return + } + switch rv.Kind() { + case reflect.Bool: + enc.wf(strconv.FormatBool(rv.Bool())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, + reflect.Int64: + enc.wf(strconv.FormatInt(rv.Int(), 10)) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64: + enc.wf(strconv.FormatUint(rv.Uint(), 10)) + case reflect.Float32: + enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 32))) + case reflect.Float64: + enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 64))) + case reflect.Array, reflect.Slice: + enc.eArrayOrSliceElement(rv) + case reflect.Interface: + enc.eElement(rv.Elem()) + case reflect.String: + enc.writeQuoted(rv.String()) + default: + panic(e("unexpected primitive type: %s", rv.Kind())) + } +} + +// By the TOML spec, all floats must have a decimal with at least one +// number on either side. +func floatAddDecimal(fstr string) string { + if !strings.Contains(fstr, ".") { + return fstr + ".0" + } + return fstr +} + +func (enc *Encoder) writeQuoted(s string) { + enc.wf("\"%s\"", quotedReplacer.Replace(s)) +} + +func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) { + length := rv.Len() + enc.wf("[") + for i := 0; i < length; i++ { + elem := rv.Index(i) + enc.eElement(elem) + if i != length-1 { + enc.wf(", ") + } + } + enc.wf("]") +} + +func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { + if len(key) == 0 { + encPanic(errNoKey) + } + for i := 0; i < rv.Len(); i++ { + trv := rv.Index(i) + if isNil(trv) { + continue + } + panicIfInvalidKey(key) + enc.newline() + enc.wf("%s[[%s]]", enc.indentStr(key), key.maybeQuotedAll()) + enc.newline() + enc.eMapOrStruct(key, trv) + } +} + +func (enc *Encoder) eTable(key Key, rv reflect.Value) { + panicIfInvalidKey(key) + if len(key) == 1 { + // Output an extra newline between top-level tables. + // (The newline isn't written if nothing else has been written though.) + enc.newline() + } + if len(key) > 0 { + enc.wf("%s[%s]", enc.indentStr(key), key.maybeQuotedAll()) + enc.newline() + } + enc.eMapOrStruct(key, rv) +} + +func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value) { + switch rv := eindirect(rv); rv.Kind() { + case reflect.Map: + enc.eMap(key, rv) + case reflect.Struct: + enc.eStruct(key, rv) + default: + panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String()) + } +} + +func (enc *Encoder) eMap(key Key, rv reflect.Value) { + rt := rv.Type() + if rt.Key().Kind() != reflect.String { + encPanic(errNonString) + } + + // Sort keys so that we have deterministic output. And write keys directly + // underneath this key first, before writing sub-structs or sub-maps. + var mapKeysDirect, mapKeysSub []string + for _, mapKey := range rv.MapKeys() { + k := mapKey.String() + if typeIsHash(tomlTypeOfGo(rv.MapIndex(mapKey))) { + mapKeysSub = append(mapKeysSub, k) + } else { + mapKeysDirect = append(mapKeysDirect, k) + } + } + + var writeMapKeys = func(mapKeys []string) { + sort.Strings(mapKeys) + for _, mapKey := range mapKeys { + mrv := rv.MapIndex(reflect.ValueOf(mapKey)) + if isNil(mrv) { + // Don't write anything for nil fields. + continue + } + enc.encode(key.add(mapKey), mrv) + } + } + writeMapKeys(mapKeysDirect) + writeMapKeys(mapKeysSub) +} + +func (enc *Encoder) eStruct(key Key, rv reflect.Value) { + // Write keys for fields directly under this key first, because if we write + // a field that creates a new table, then all keys under it will be in that + // table (not the one we're writing here). + rt := rv.Type() + var fieldsDirect, fieldsSub [][]int + var addFields func(rt reflect.Type, rv reflect.Value, start []int) + addFields = func(rt reflect.Type, rv reflect.Value, start []int) { + for i := 0; i < rt.NumField(); i++ { + f := rt.Field(i) + // skip unexported fields + if f.PkgPath != "" && !f.Anonymous { + continue + } + frv := rv.Field(i) + if f.Anonymous { + t := f.Type + switch t.Kind() { + case reflect.Struct: + // Treat anonymous struct fields with + // tag names as though they are not + // anonymous, like encoding/json does. + if getOptions(f.Tag).name == "" { + addFields(t, frv, f.Index) + continue + } + case reflect.Ptr: + if t.Elem().Kind() == reflect.Struct && + getOptions(f.Tag).name == "" { + if !frv.IsNil() { + addFields(t.Elem(), frv.Elem(), f.Index) + } + continue + } + // Fall through to the normal field encoding logic below + // for non-struct anonymous fields. + } + } + + if typeIsHash(tomlTypeOfGo(frv)) { + fieldsSub = append(fieldsSub, append(start, f.Index...)) + } else { + fieldsDirect = append(fieldsDirect, append(start, f.Index...)) + } + } + } + addFields(rt, rv, nil) + + var writeFields = func(fields [][]int) { + for _, fieldIndex := range fields { + sft := rt.FieldByIndex(fieldIndex) + sf := rv.FieldByIndex(fieldIndex) + if isNil(sf) { + // Don't write anything for nil fields. + continue + } + + opts := getOptions(sft.Tag) + if opts.skip { + continue + } + keyName := sft.Name + if opts.name != "" { + keyName = opts.name + } + if opts.omitempty && isEmpty(sf) { + continue + } + if opts.omitzero && isZero(sf) { + continue + } + + enc.encode(key.add(keyName), sf) + } + } + writeFields(fieldsDirect) + writeFields(fieldsSub) +} + +// tomlTypeName returns the TOML type name of the Go value's type. It is +// used to determine whether the types of array elements are mixed (which is +// forbidden). If the Go value is nil, then it is illegal for it to be an array +// element, and valueIsNil is returned as true. + +// Returns the TOML type of a Go value. The type may be `nil`, which means +// no concrete TOML type could be found. +func tomlTypeOfGo(rv reflect.Value) tomlType { + if isNil(rv) || !rv.IsValid() { + return nil + } + switch rv.Kind() { + case reflect.Bool: + return tomlBool + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, + reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, + reflect.Uint64: + return tomlInteger + case reflect.Float32, reflect.Float64: + return tomlFloat + case reflect.Array, reflect.Slice: + if typeEqual(tomlHash, tomlArrayType(rv)) { + return tomlArrayHash + } + return tomlArray + case reflect.Ptr, reflect.Interface: + return tomlTypeOfGo(rv.Elem()) + case reflect.String: + return tomlString + case reflect.Map: + return tomlHash + case reflect.Struct: + switch rv.Interface().(type) { + case time.Time: + return tomlDatetime + case TextMarshaler: + return tomlString + default: + return tomlHash + } + default: + panic("unexpected reflect.Kind: " + rv.Kind().String()) + } +} + +// tomlArrayType returns the element type of a TOML array. The type returned +// may be nil if it cannot be determined (e.g., a nil slice or a zero length +// slize). This function may also panic if it finds a type that cannot be +// expressed in TOML (such as nil elements, heterogeneous arrays or directly +// nested arrays of tables). +func tomlArrayType(rv reflect.Value) tomlType { + if isNil(rv) || !rv.IsValid() || rv.Len() == 0 { + return nil + } + firstType := tomlTypeOfGo(rv.Index(0)) + if firstType == nil { + encPanic(errArrayNilElement) + } + + rvlen := rv.Len() + for i := 1; i < rvlen; i++ { + elem := rv.Index(i) + switch elemType := tomlTypeOfGo(elem); { + case elemType == nil: + encPanic(errArrayNilElement) + case !typeEqual(firstType, elemType): + encPanic(errArrayMixedElementTypes) + } + } + // If we have a nested array, then we must make sure that the nested + // array contains ONLY primitives. + // This checks arbitrarily nested arrays. + if typeEqual(firstType, tomlArray) || typeEqual(firstType, tomlArrayHash) { + nest := tomlArrayType(eindirect(rv.Index(0))) + if typeEqual(nest, tomlHash) || typeEqual(nest, tomlArrayHash) { + encPanic(errArrayNoTable) + } + } + return firstType +} + +type tagOptions struct { + skip bool // "-" + name string + omitempty bool + omitzero bool +} + +func getOptions(tag reflect.StructTag) tagOptions { + t := tag.Get("toml") + if t == "-" { + return tagOptions{skip: true} + } + var opts tagOptions + parts := strings.Split(t, ",") + opts.name = parts[0] + for _, s := range parts[1:] { + switch s { + case "omitempty": + opts.omitempty = true + case "omitzero": + opts.omitzero = true + } + } + return opts +} + +func isZero(rv reflect.Value) bool { + switch rv.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return rv.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return rv.Uint() == 0 + case reflect.Float32, reflect.Float64: + return rv.Float() == 0.0 + } + return false +} + +func isEmpty(rv reflect.Value) bool { + switch rv.Kind() { + case reflect.Array, reflect.Slice, reflect.Map, reflect.String: + return rv.Len() == 0 + case reflect.Bool: + return !rv.Bool() + } + return false +} + +func (enc *Encoder) newline() { + if enc.hasWritten { + enc.wf("\n") + } +} + +func (enc *Encoder) keyEqElement(key Key, val reflect.Value) { + if len(key) == 0 { + encPanic(errNoKey) + } + panicIfInvalidKey(key) + enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) + enc.eElement(val) + enc.newline() +} + +func (enc *Encoder) wf(format string, v ...interface{}) { + if _, err := fmt.Fprintf(enc.w, format, v...); err != nil { + encPanic(err) + } + enc.hasWritten = true +} + +func (enc *Encoder) indentStr(key Key) string { + return strings.Repeat(enc.Indent, len(key)-1) +} + +func encPanic(err error) { + panic(tomlEncodeError{err}) +} + +func eindirect(v reflect.Value) reflect.Value { + switch v.Kind() { + case reflect.Ptr, reflect.Interface: + return eindirect(v.Elem()) + default: + return v + } +} + +func isNil(rv reflect.Value) bool { + switch rv.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return rv.IsNil() + default: + return false + } +} + +func panicIfInvalidKey(key Key) { + for _, k := range key { + if len(k) == 0 { + encPanic(e("Key '%s' is not a valid table name. Key names "+ + "cannot be empty.", key.maybeQuotedAll())) + } + } +} + +func isValidKeyName(s string) bool { + return len(s) != 0 +} diff --git a/vendor/github.com/BurntSushi/toml/encoding_types.go b/vendor/github.com/BurntSushi/toml/encoding_types.go new file mode 100644 index 000000000000..d36e1dd6002b --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/encoding_types.go @@ -0,0 +1,19 @@ +// +build go1.2 + +package toml + +// In order to support Go 1.1, we define our own TextMarshaler and +// TextUnmarshaler types. For Go 1.2+, we just alias them with the +// standard library interfaces. + +import ( + "encoding" +) + +// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here +// so that Go 1.1 can be supported. +type TextMarshaler encoding.TextMarshaler + +// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined +// here so that Go 1.1 can be supported. +type TextUnmarshaler encoding.TextUnmarshaler diff --git a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go new file mode 100644 index 000000000000..e8d503d04690 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go @@ -0,0 +1,18 @@ +// +build !go1.2 + +package toml + +// These interfaces were introduced in Go 1.2, so we add them manually when +// compiling for Go 1.1. + +// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here +// so that Go 1.1 can be supported. +type TextMarshaler interface { + MarshalText() (text []byte, err error) +} + +// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined +// here so that Go 1.1 can be supported. +type TextUnmarshaler interface { + UnmarshalText(text []byte) error +} diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go new file mode 100644 index 000000000000..e0a742a8870f --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/lex.go @@ -0,0 +1,953 @@ +package toml + +import ( + "fmt" + "strings" + "unicode" + "unicode/utf8" +) + +type itemType int + +const ( + itemError itemType = iota + itemNIL // used in the parser to indicate no type + itemEOF + itemText + itemString + itemRawString + itemMultilineString + itemRawMultilineString + itemBool + itemInteger + itemFloat + itemDatetime + itemArray // the start of an array + itemArrayEnd + itemTableStart + itemTableEnd + itemArrayTableStart + itemArrayTableEnd + itemKeyStart + itemCommentStart + itemInlineTableStart + itemInlineTableEnd +) + +const ( + eof = 0 + comma = ',' + tableStart = '[' + tableEnd = ']' + arrayTableStart = '[' + arrayTableEnd = ']' + tableSep = '.' + keySep = '=' + arrayStart = '[' + arrayEnd = ']' + commentStart = '#' + stringStart = '"' + stringEnd = '"' + rawStringStart = '\'' + rawStringEnd = '\'' + inlineTableStart = '{' + inlineTableEnd = '}' +) + +type stateFn func(lx *lexer) stateFn + +type lexer struct { + input string + start int + pos int + line int + state stateFn + items chan item + + // Allow for backing up up to three runes. + // This is necessary because TOML contains 3-rune tokens (""" and '''). + prevWidths [3]int + nprev int // how many of prevWidths are in use + // If we emit an eof, we can still back up, but it is not OK to call + // next again. + atEOF bool + + // A stack of state functions used to maintain context. + // The idea is to reuse parts of the state machine in various places. + // For example, values can appear at the top level or within arbitrarily + // nested arrays. The last state on the stack is used after a value has + // been lexed. Similarly for comments. + stack []stateFn +} + +type item struct { + typ itemType + val string + line int +} + +func (lx *lexer) nextItem() item { + for { + select { + case item := <-lx.items: + return item + default: + lx.state = lx.state(lx) + } + } +} + +func lex(input string) *lexer { + lx := &lexer{ + input: input, + state: lexTop, + line: 1, + items: make(chan item, 10), + stack: make([]stateFn, 0, 10), + } + return lx +} + +func (lx *lexer) push(state stateFn) { + lx.stack = append(lx.stack, state) +} + +func (lx *lexer) pop() stateFn { + if len(lx.stack) == 0 { + return lx.errorf("BUG in lexer: no states to pop") + } + last := lx.stack[len(lx.stack)-1] + lx.stack = lx.stack[0 : len(lx.stack)-1] + return last +} + +func (lx *lexer) current() string { + return lx.input[lx.start:lx.pos] +} + +func (lx *lexer) emit(typ itemType) { + lx.items <- item{typ, lx.current(), lx.line} + lx.start = lx.pos +} + +func (lx *lexer) emitTrim(typ itemType) { + lx.items <- item{typ, strings.TrimSpace(lx.current()), lx.line} + lx.start = lx.pos +} + +func (lx *lexer) next() (r rune) { + if lx.atEOF { + panic("next called after EOF") + } + if lx.pos >= len(lx.input) { + lx.atEOF = true + return eof + } + + if lx.input[lx.pos] == '\n' { + lx.line++ + } + lx.prevWidths[2] = lx.prevWidths[1] + lx.prevWidths[1] = lx.prevWidths[0] + if lx.nprev < 3 { + lx.nprev++ + } + r, w := utf8.DecodeRuneInString(lx.input[lx.pos:]) + lx.prevWidths[0] = w + lx.pos += w + return r +} + +// ignore skips over the pending input before this point. +func (lx *lexer) ignore() { + lx.start = lx.pos +} + +// backup steps back one rune. Can be called only twice between calls to next. +func (lx *lexer) backup() { + if lx.atEOF { + lx.atEOF = false + return + } + if lx.nprev < 1 { + panic("backed up too far") + } + w := lx.prevWidths[0] + lx.prevWidths[0] = lx.prevWidths[1] + lx.prevWidths[1] = lx.prevWidths[2] + lx.nprev-- + lx.pos -= w + if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' { + lx.line-- + } +} + +// accept consumes the next rune if it's equal to `valid`. +func (lx *lexer) accept(valid rune) bool { + if lx.next() == valid { + return true + } + lx.backup() + return false +} + +// peek returns but does not consume the next rune in the input. +func (lx *lexer) peek() rune { + r := lx.next() + lx.backup() + return r +} + +// skip ignores all input that matches the given predicate. +func (lx *lexer) skip(pred func(rune) bool) { + for { + r := lx.next() + if pred(r) { + continue + } + lx.backup() + lx.ignore() + return + } +} + +// errorf stops all lexing by emitting an error and returning `nil`. +// Note that any value that is a character is escaped if it's a special +// character (newlines, tabs, etc.). +func (lx *lexer) errorf(format string, values ...interface{}) stateFn { + lx.items <- item{ + itemError, + fmt.Sprintf(format, values...), + lx.line, + } + return nil +} + +// lexTop consumes elements at the top level of TOML data. +func lexTop(lx *lexer) stateFn { + r := lx.next() + if isWhitespace(r) || isNL(r) { + return lexSkip(lx, lexTop) + } + switch r { + case commentStart: + lx.push(lexTop) + return lexCommentStart + case tableStart: + return lexTableStart + case eof: + if lx.pos > lx.start { + return lx.errorf("unexpected EOF") + } + lx.emit(itemEOF) + return nil + } + + // At this point, the only valid item can be a key, so we back up + // and let the key lexer do the rest. + lx.backup() + lx.push(lexTopEnd) + return lexKeyStart +} + +// lexTopEnd is entered whenever a top-level item has been consumed. (A value +// or a table.) It must see only whitespace, and will turn back to lexTop +// upon a newline. If it sees EOF, it will quit the lexer successfully. +func lexTopEnd(lx *lexer) stateFn { + r := lx.next() + switch { + case r == commentStart: + // a comment will read to a newline for us. + lx.push(lexTop) + return lexCommentStart + case isWhitespace(r): + return lexTopEnd + case isNL(r): + lx.ignore() + return lexTop + case r == eof: + lx.emit(itemEOF) + return nil + } + return lx.errorf("expected a top-level item to end with a newline, "+ + "comment, or EOF, but got %q instead", r) +} + +// lexTable lexes the beginning of a table. Namely, it makes sure that +// it starts with a character other than '.' and ']'. +// It assumes that '[' has already been consumed. +// It also handles the case that this is an item in an array of tables. +// e.g., '[[name]]'. +func lexTableStart(lx *lexer) stateFn { + if lx.peek() == arrayTableStart { + lx.next() + lx.emit(itemArrayTableStart) + lx.push(lexArrayTableEnd) + } else { + lx.emit(itemTableStart) + lx.push(lexTableEnd) + } + return lexTableNameStart +} + +func lexTableEnd(lx *lexer) stateFn { + lx.emit(itemTableEnd) + return lexTopEnd +} + +func lexArrayTableEnd(lx *lexer) stateFn { + if r := lx.next(); r != arrayTableEnd { + return lx.errorf("expected end of table array name delimiter %q, "+ + "but got %q instead", arrayTableEnd, r) + } + lx.emit(itemArrayTableEnd) + return lexTopEnd +} + +func lexTableNameStart(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.peek(); { + case r == tableEnd || r == eof: + return lx.errorf("unexpected end of table name " + + "(table names cannot be empty)") + case r == tableSep: + return lx.errorf("unexpected table separator " + + "(table names cannot be empty)") + case r == stringStart || r == rawStringStart: + lx.ignore() + lx.push(lexTableNameEnd) + return lexValue // reuse string lexing + default: + return lexBareTableName + } +} + +// lexBareTableName lexes the name of a table. It assumes that at least one +// valid character for the table has already been read. +func lexBareTableName(lx *lexer) stateFn { + r := lx.next() + if isBareKeyChar(r) { + return lexBareTableName + } + lx.backup() + lx.emit(itemText) + return lexTableNameEnd +} + +// lexTableNameEnd reads the end of a piece of a table name, optionally +// consuming whitespace. +func lexTableNameEnd(lx *lexer) stateFn { + lx.skip(isWhitespace) + switch r := lx.next(); { + case isWhitespace(r): + return lexTableNameEnd + case r == tableSep: + lx.ignore() + return lexTableNameStart + case r == tableEnd: + return lx.pop() + default: + return lx.errorf("expected '.' or ']' to end table name, "+ + "but got %q instead", r) + } +} + +// lexKeyStart consumes a key name up until the first non-whitespace character. +// lexKeyStart will ignore whitespace. +func lexKeyStart(lx *lexer) stateFn { + r := lx.peek() + switch { + case r == keySep: + return lx.errorf("unexpected key separator %q", keySep) + case isWhitespace(r) || isNL(r): + lx.next() + return lexSkip(lx, lexKeyStart) + case r == stringStart || r == rawStringStart: + lx.ignore() + lx.emit(itemKeyStart) + lx.push(lexKeyEnd) + return lexValue // reuse string lexing + default: + lx.ignore() + lx.emit(itemKeyStart) + return lexBareKey + } +} + +// lexBareKey consumes the text of a bare key. Assumes that the first character +// (which is not whitespace) has not yet been consumed. +func lexBareKey(lx *lexer) stateFn { + switch r := lx.next(); { + case isBareKeyChar(r): + return lexBareKey + case isWhitespace(r): + lx.backup() + lx.emit(itemText) + return lexKeyEnd + case r == keySep: + lx.backup() + lx.emit(itemText) + return lexKeyEnd + default: + return lx.errorf("bare keys cannot contain %q", r) + } +} + +// lexKeyEnd consumes the end of a key and trims whitespace (up to the key +// separator). +func lexKeyEnd(lx *lexer) stateFn { + switch r := lx.next(); { + case r == keySep: + return lexSkip(lx, lexValue) + case isWhitespace(r): + return lexSkip(lx, lexKeyEnd) + default: + return lx.errorf("expected key separator %q, but got %q instead", + keySep, r) + } +} + +// lexValue starts the consumption of a value anywhere a value is expected. +// lexValue will ignore whitespace. +// After a value is lexed, the last state on the next is popped and returned. +func lexValue(lx *lexer) stateFn { + // We allow whitespace to precede a value, but NOT newlines. + // In array syntax, the array states are responsible for ignoring newlines. + r := lx.next() + switch { + case isWhitespace(r): + return lexSkip(lx, lexValue) + case isDigit(r): + lx.backup() // avoid an extra state and use the same as above + return lexNumberOrDateStart + } + switch r { + case arrayStart: + lx.ignore() + lx.emit(itemArray) + return lexArrayValue + case inlineTableStart: + lx.ignore() + lx.emit(itemInlineTableStart) + return lexInlineTableValue + case stringStart: + if lx.accept(stringStart) { + if lx.accept(stringStart) { + lx.ignore() // Ignore """ + return lexMultilineString + } + lx.backup() + } + lx.ignore() // ignore the '"' + return lexString + case rawStringStart: + if lx.accept(rawStringStart) { + if lx.accept(rawStringStart) { + lx.ignore() // Ignore """ + return lexMultilineRawString + } + lx.backup() + } + lx.ignore() // ignore the "'" + return lexRawString + case '+', '-': + return lexNumberStart + case '.': // special error case, be kind to users + return lx.errorf("floats must start with a digit, not '.'") + } + if unicode.IsLetter(r) { + // Be permissive here; lexBool will give a nice error if the + // user wrote something like + // x = foo + // (i.e. not 'true' or 'false' but is something else word-like.) + lx.backup() + return lexBool + } + return lx.errorf("expected value but found %q instead", r) +} + +// lexArrayValue consumes one value in an array. It assumes that '[' or ',' +// have already been consumed. All whitespace and newlines are ignored. +func lexArrayValue(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r) || isNL(r): + return lexSkip(lx, lexArrayValue) + case r == commentStart: + lx.push(lexArrayValue) + return lexCommentStart + case r == comma: + return lx.errorf("unexpected comma") + case r == arrayEnd: + // NOTE(caleb): The spec isn't clear about whether you can have + // a trailing comma or not, so we'll allow it. + return lexArrayEnd + } + + lx.backup() + lx.push(lexArrayValueEnd) + return lexValue +} + +// lexArrayValueEnd consumes everything between the end of an array value and +// the next value (or the end of the array): it ignores whitespace and newlines +// and expects either a ',' or a ']'. +func lexArrayValueEnd(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r) || isNL(r): + return lexSkip(lx, lexArrayValueEnd) + case r == commentStart: + lx.push(lexArrayValueEnd) + return lexCommentStart + case r == comma: + lx.ignore() + return lexArrayValue // move on to the next value + case r == arrayEnd: + return lexArrayEnd + } + return lx.errorf( + "expected a comma or array terminator %q, but got %q instead", + arrayEnd, r, + ) +} + +// lexArrayEnd finishes the lexing of an array. +// It assumes that a ']' has just been consumed. +func lexArrayEnd(lx *lexer) stateFn { + lx.ignore() + lx.emit(itemArrayEnd) + return lx.pop() +} + +// lexInlineTableValue consumes one key/value pair in an inline table. +// It assumes that '{' or ',' have already been consumed. Whitespace is ignored. +func lexInlineTableValue(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r): + return lexSkip(lx, lexInlineTableValue) + case isNL(r): + return lx.errorf("newlines not allowed within inline tables") + case r == commentStart: + lx.push(lexInlineTableValue) + return lexCommentStart + case r == comma: + return lx.errorf("unexpected comma") + case r == inlineTableEnd: + return lexInlineTableEnd + } + lx.backup() + lx.push(lexInlineTableValueEnd) + return lexKeyStart +} + +// lexInlineTableValueEnd consumes everything between the end of an inline table +// key/value pair and the next pair (or the end of the table): +// it ignores whitespace and expects either a ',' or a '}'. +func lexInlineTableValueEnd(lx *lexer) stateFn { + r := lx.next() + switch { + case isWhitespace(r): + return lexSkip(lx, lexInlineTableValueEnd) + case isNL(r): + return lx.errorf("newlines not allowed within inline tables") + case r == commentStart: + lx.push(lexInlineTableValueEnd) + return lexCommentStart + case r == comma: + lx.ignore() + return lexInlineTableValue + case r == inlineTableEnd: + return lexInlineTableEnd + } + return lx.errorf("expected a comma or an inline table terminator %q, "+ + "but got %q instead", inlineTableEnd, r) +} + +// lexInlineTableEnd finishes the lexing of an inline table. +// It assumes that a '}' has just been consumed. +func lexInlineTableEnd(lx *lexer) stateFn { + lx.ignore() + lx.emit(itemInlineTableEnd) + return lx.pop() +} + +// lexString consumes the inner contents of a string. It assumes that the +// beginning '"' has already been consumed and ignored. +func lexString(lx *lexer) stateFn { + r := lx.next() + switch { + case r == eof: + return lx.errorf("unexpected EOF") + case isNL(r): + return lx.errorf("strings cannot contain newlines") + case r == '\\': + lx.push(lexString) + return lexStringEscape + case r == stringEnd: + lx.backup() + lx.emit(itemString) + lx.next() + lx.ignore() + return lx.pop() + } + return lexString +} + +// lexMultilineString consumes the inner contents of a string. It assumes that +// the beginning '"""' has already been consumed and ignored. +func lexMultilineString(lx *lexer) stateFn { + switch lx.next() { + case eof: + return lx.errorf("unexpected EOF") + case '\\': + return lexMultilineStringEscape + case stringEnd: + if lx.accept(stringEnd) { + if lx.accept(stringEnd) { + lx.backup() + lx.backup() + lx.backup() + lx.emit(itemMultilineString) + lx.next() + lx.next() + lx.next() + lx.ignore() + return lx.pop() + } + lx.backup() + } + } + return lexMultilineString +} + +// lexRawString consumes a raw string. Nothing can be escaped in such a string. +// It assumes that the beginning "'" has already been consumed and ignored. +func lexRawString(lx *lexer) stateFn { + r := lx.next() + switch { + case r == eof: + return lx.errorf("unexpected EOF") + case isNL(r): + return lx.errorf("strings cannot contain newlines") + case r == rawStringEnd: + lx.backup() + lx.emit(itemRawString) + lx.next() + lx.ignore() + return lx.pop() + } + return lexRawString +} + +// lexMultilineRawString consumes a raw string. Nothing can be escaped in such +// a string. It assumes that the beginning "'''" has already been consumed and +// ignored. +func lexMultilineRawString(lx *lexer) stateFn { + switch lx.next() { + case eof: + return lx.errorf("unexpected EOF") + case rawStringEnd: + if lx.accept(rawStringEnd) { + if lx.accept(rawStringEnd) { + lx.backup() + lx.backup() + lx.backup() + lx.emit(itemRawMultilineString) + lx.next() + lx.next() + lx.next() + lx.ignore() + return lx.pop() + } + lx.backup() + } + } + return lexMultilineRawString +} + +// lexMultilineStringEscape consumes an escaped character. It assumes that the +// preceding '\\' has already been consumed. +func lexMultilineStringEscape(lx *lexer) stateFn { + // Handle the special case first: + if isNL(lx.next()) { + return lexMultilineString + } + lx.backup() + lx.push(lexMultilineString) + return lexStringEscape(lx) +} + +func lexStringEscape(lx *lexer) stateFn { + r := lx.next() + switch r { + case 'b': + fallthrough + case 't': + fallthrough + case 'n': + fallthrough + case 'f': + fallthrough + case 'r': + fallthrough + case '"': + fallthrough + case '\\': + return lx.pop() + case 'u': + return lexShortUnicodeEscape + case 'U': + return lexLongUnicodeEscape + } + return lx.errorf("invalid escape character %q; only the following "+ + "escape characters are allowed: "+ + `\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX`, r) +} + +func lexShortUnicodeEscape(lx *lexer) stateFn { + var r rune + for i := 0; i < 4; i++ { + r = lx.next() + if !isHexadecimal(r) { + return lx.errorf(`expected four hexadecimal digits after '\u', `+ + "but got %q instead", lx.current()) + } + } + return lx.pop() +} + +func lexLongUnicodeEscape(lx *lexer) stateFn { + var r rune + for i := 0; i < 8; i++ { + r = lx.next() + if !isHexadecimal(r) { + return lx.errorf(`expected eight hexadecimal digits after '\U', `+ + "but got %q instead", lx.current()) + } + } + return lx.pop() +} + +// lexNumberOrDateStart consumes either an integer, a float, or datetime. +func lexNumberOrDateStart(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexNumberOrDate + } + switch r { + case '_': + return lexNumber + case 'e', 'E': + return lexFloat + case '.': + return lx.errorf("floats must start with a digit, not '.'") + } + return lx.errorf("expected a digit but got %q", r) +} + +// lexNumberOrDate consumes either an integer, float or datetime. +func lexNumberOrDate(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexNumberOrDate + } + switch r { + case '-': + return lexDatetime + case '_': + return lexNumber + case '.', 'e', 'E': + return lexFloat + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexDatetime consumes a Datetime, to a first approximation. +// The parser validates that it matches one of the accepted formats. +func lexDatetime(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexDatetime + } + switch r { + case '-', 'T', ':', '.', 'Z', '+': + return lexDatetime + } + + lx.backup() + lx.emit(itemDatetime) + return lx.pop() +} + +// lexNumberStart consumes either an integer or a float. It assumes that a sign +// has already been read, but that *no* digits have been consumed. +// lexNumberStart will move to the appropriate integer or float states. +func lexNumberStart(lx *lexer) stateFn { + // We MUST see a digit. Even floats have to start with a digit. + r := lx.next() + if !isDigit(r) { + if r == '.' { + return lx.errorf("floats must start with a digit, not '.'") + } + return lx.errorf("expected a digit but got %q", r) + } + return lexNumber +} + +// lexNumber consumes an integer or a float after seeing the first digit. +func lexNumber(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexNumber + } + switch r { + case '_': + return lexNumber + case '.', 'e', 'E': + return lexFloat + } + + lx.backup() + lx.emit(itemInteger) + return lx.pop() +} + +// lexFloat consumes the elements of a float. It allows any sequence of +// float-like characters, so floats emitted by the lexer are only a first +// approximation and must be validated by the parser. +func lexFloat(lx *lexer) stateFn { + r := lx.next() + if isDigit(r) { + return lexFloat + } + switch r { + case '_', '.', '-', '+', 'e', 'E': + return lexFloat + } + + lx.backup() + lx.emit(itemFloat) + return lx.pop() +} + +// lexBool consumes a bool string: 'true' or 'false. +func lexBool(lx *lexer) stateFn { + var rs []rune + for { + r := lx.next() + if !unicode.IsLetter(r) { + lx.backup() + break + } + rs = append(rs, r) + } + s := string(rs) + switch s { + case "true", "false": + lx.emit(itemBool) + return lx.pop() + } + return lx.errorf("expected value but found %q instead", s) +} + +// lexCommentStart begins the lexing of a comment. It will emit +// itemCommentStart and consume no characters, passing control to lexComment. +func lexCommentStart(lx *lexer) stateFn { + lx.ignore() + lx.emit(itemCommentStart) + return lexComment +} + +// lexComment lexes an entire comment. It assumes that '#' has been consumed. +// It will consume *up to* the first newline character, and pass control +// back to the last state on the stack. +func lexComment(lx *lexer) stateFn { + r := lx.peek() + if isNL(r) || r == eof { + lx.emit(itemText) + return lx.pop() + } + lx.next() + return lexComment +} + +// lexSkip ignores all slurped input and moves on to the next state. +func lexSkip(lx *lexer, nextState stateFn) stateFn { + return func(lx *lexer) stateFn { + lx.ignore() + return nextState + } +} + +// isWhitespace returns true if `r` is a whitespace character according +// to the spec. +func isWhitespace(r rune) bool { + return r == '\t' || r == ' ' +} + +func isNL(r rune) bool { + return r == '\n' || r == '\r' +} + +func isDigit(r rune) bool { + return r >= '0' && r <= '9' +} + +func isHexadecimal(r rune) bool { + return (r >= '0' && r <= '9') || + (r >= 'a' && r <= 'f') || + (r >= 'A' && r <= 'F') +} + +func isBareKeyChar(r rune) bool { + return (r >= 'A' && r <= 'Z') || + (r >= 'a' && r <= 'z') || + (r >= '0' && r <= '9') || + r == '_' || + r == '-' +} + +func (itype itemType) String() string { + switch itype { + case itemError: + return "Error" + case itemNIL: + return "NIL" + case itemEOF: + return "EOF" + case itemText: + return "Text" + case itemString, itemRawString, itemMultilineString, itemRawMultilineString: + return "String" + case itemBool: + return "Bool" + case itemInteger: + return "Integer" + case itemFloat: + return "Float" + case itemDatetime: + return "DateTime" + case itemTableStart: + return "TableStart" + case itemTableEnd: + return "TableEnd" + case itemKeyStart: + return "KeyStart" + case itemArray: + return "Array" + case itemArrayEnd: + return "ArrayEnd" + case itemCommentStart: + return "CommentStart" + } + panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype))) +} + +func (item item) String() string { + return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val) +} diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go new file mode 100644 index 000000000000..50869ef9266e --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/parse.go @@ -0,0 +1,592 @@ +package toml + +import ( + "fmt" + "strconv" + "strings" + "time" + "unicode" + "unicode/utf8" +) + +type parser struct { + mapping map[string]interface{} + types map[string]tomlType + lx *lexer + + // A list of keys in the order that they appear in the TOML data. + ordered []Key + + // the full key for the current hash in scope + context Key + + // the base key name for everything except hashes + currentKey string + + // rough approximation of line number + approxLine int + + // A map of 'key.group.names' to whether they were created implicitly. + implicits map[string]bool +} + +type parseError string + +func (pe parseError) Error() string { + return string(pe) +} + +func parse(data string) (p *parser, err error) { + defer func() { + if r := recover(); r != nil { + var ok bool + if err, ok = r.(parseError); ok { + return + } + panic(r) + } + }() + + p = &parser{ + mapping: make(map[string]interface{}), + types: make(map[string]tomlType), + lx: lex(data), + ordered: make([]Key, 0), + implicits: make(map[string]bool), + } + for { + item := p.next() + if item.typ == itemEOF { + break + } + p.topLevel(item) + } + + return p, nil +} + +func (p *parser) panicf(format string, v ...interface{}) { + msg := fmt.Sprintf("Near line %d (last key parsed '%s'): %s", + p.approxLine, p.current(), fmt.Sprintf(format, v...)) + panic(parseError(msg)) +} + +func (p *parser) next() item { + it := p.lx.nextItem() + if it.typ == itemError { + p.panicf("%s", it.val) + } + return it +} + +func (p *parser) bug(format string, v ...interface{}) { + panic(fmt.Sprintf("BUG: "+format+"\n\n", v...)) +} + +func (p *parser) expect(typ itemType) item { + it := p.next() + p.assertEqual(typ, it.typ) + return it +} + +func (p *parser) assertEqual(expected, got itemType) { + if expected != got { + p.bug("Expected '%s' but got '%s'.", expected, got) + } +} + +func (p *parser) topLevel(item item) { + switch item.typ { + case itemCommentStart: + p.approxLine = item.line + p.expect(itemText) + case itemTableStart: + kg := p.next() + p.approxLine = kg.line + + var key Key + for ; kg.typ != itemTableEnd && kg.typ != itemEOF; kg = p.next() { + key = append(key, p.keyString(kg)) + } + p.assertEqual(itemTableEnd, kg.typ) + + p.establishContext(key, false) + p.setType("", tomlHash) + p.ordered = append(p.ordered, key) + case itemArrayTableStart: + kg := p.next() + p.approxLine = kg.line + + var key Key + for ; kg.typ != itemArrayTableEnd && kg.typ != itemEOF; kg = p.next() { + key = append(key, p.keyString(kg)) + } + p.assertEqual(itemArrayTableEnd, kg.typ) + + p.establishContext(key, true) + p.setType("", tomlArrayHash) + p.ordered = append(p.ordered, key) + case itemKeyStart: + kname := p.next() + p.approxLine = kname.line + p.currentKey = p.keyString(kname) + + val, typ := p.value(p.next()) + p.setValue(p.currentKey, val) + p.setType(p.currentKey, typ) + p.ordered = append(p.ordered, p.context.add(p.currentKey)) + p.currentKey = "" + default: + p.bug("Unexpected type at top level: %s", item.typ) + } +} + +// Gets a string for a key (or part of a key in a table name). +func (p *parser) keyString(it item) string { + switch it.typ { + case itemText: + return it.val + case itemString, itemMultilineString, + itemRawString, itemRawMultilineString: + s, _ := p.value(it) + return s.(string) + default: + p.bug("Unexpected key type: %s", it.typ) + panic("unreachable") + } +} + +// value translates an expected value from the lexer into a Go value wrapped +// as an empty interface. +func (p *parser) value(it item) (interface{}, tomlType) { + switch it.typ { + case itemString: + return p.replaceEscapes(it.val), p.typeOfPrimitive(it) + case itemMultilineString: + trimmed := stripFirstNewline(stripEscapedWhitespace(it.val)) + return p.replaceEscapes(trimmed), p.typeOfPrimitive(it) + case itemRawString: + return it.val, p.typeOfPrimitive(it) + case itemRawMultilineString: + return stripFirstNewline(it.val), p.typeOfPrimitive(it) + case itemBool: + switch it.val { + case "true": + return true, p.typeOfPrimitive(it) + case "false": + return false, p.typeOfPrimitive(it) + } + p.bug("Expected boolean value, but got '%s'.", it.val) + case itemInteger: + if !numUnderscoresOK(it.val) { + p.panicf("Invalid integer %q: underscores must be surrounded by digits", + it.val) + } + val := strings.Replace(it.val, "_", "", -1) + num, err := strconv.ParseInt(val, 10, 64) + if err != nil { + // Distinguish integer values. Normally, it'd be a bug if the lexer + // provides an invalid integer, but it's possible that the number is + // out of range of valid values (which the lexer cannot determine). + // So mark the former as a bug but the latter as a legitimate user + // error. + if e, ok := err.(*strconv.NumError); ok && + e.Err == strconv.ErrRange { + + p.panicf("Integer '%s' is out of the range of 64-bit "+ + "signed integers.", it.val) + } else { + p.bug("Expected integer value, but got '%s'.", it.val) + } + } + return num, p.typeOfPrimitive(it) + case itemFloat: + parts := strings.FieldsFunc(it.val, func(r rune) bool { + switch r { + case '.', 'e', 'E': + return true + } + return false + }) + for _, part := range parts { + if !numUnderscoresOK(part) { + p.panicf("Invalid float %q: underscores must be "+ + "surrounded by digits", it.val) + } + } + if !numPeriodsOK(it.val) { + // As a special case, numbers like '123.' or '1.e2', + // which are valid as far as Go/strconv are concerned, + // must be rejected because TOML says that a fractional + // part consists of '.' followed by 1+ digits. + p.panicf("Invalid float %q: '.' must be followed "+ + "by one or more digits", it.val) + } + val := strings.Replace(it.val, "_", "", -1) + num, err := strconv.ParseFloat(val, 64) + if err != nil { + if e, ok := err.(*strconv.NumError); ok && + e.Err == strconv.ErrRange { + + p.panicf("Float '%s' is out of the range of 64-bit "+ + "IEEE-754 floating-point numbers.", it.val) + } else { + p.panicf("Invalid float value: %q", it.val) + } + } + return num, p.typeOfPrimitive(it) + case itemDatetime: + var t time.Time + var ok bool + var err error + for _, format := range []string{ + "2006-01-02T15:04:05Z07:00", + "2006-01-02T15:04:05", + "2006-01-02", + } { + t, err = time.ParseInLocation(format, it.val, time.Local) + if err == nil { + ok = true + break + } + } + if !ok { + p.panicf("Invalid TOML Datetime: %q.", it.val) + } + return t, p.typeOfPrimitive(it) + case itemArray: + array := make([]interface{}, 0) + types := make([]tomlType, 0) + + for it = p.next(); it.typ != itemArrayEnd; it = p.next() { + if it.typ == itemCommentStart { + p.expect(itemText) + continue + } + + val, typ := p.value(it) + array = append(array, val) + types = append(types, typ) + } + return array, p.typeOfArray(types) + case itemInlineTableStart: + var ( + hash = make(map[string]interface{}) + outerContext = p.context + outerKey = p.currentKey + ) + + p.context = append(p.context, p.currentKey) + p.currentKey = "" + for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() { + if it.typ != itemKeyStart { + p.bug("Expected key start but instead found %q, around line %d", + it.val, p.approxLine) + } + if it.typ == itemCommentStart { + p.expect(itemText) + continue + } + + // retrieve key + k := p.next() + p.approxLine = k.line + kname := p.keyString(k) + + // retrieve value + p.currentKey = kname + val, typ := p.value(p.next()) + // make sure we keep metadata up to date + p.setType(kname, typ) + p.ordered = append(p.ordered, p.context.add(p.currentKey)) + hash[kname] = val + } + p.context = outerContext + p.currentKey = outerKey + return hash, tomlHash + } + p.bug("Unexpected value type: %s", it.typ) + panic("unreachable") +} + +// numUnderscoresOK checks whether each underscore in s is surrounded by +// characters that are not underscores. +func numUnderscoresOK(s string) bool { + accept := false + for _, r := range s { + if r == '_' { + if !accept { + return false + } + accept = false + continue + } + accept = true + } + return accept +} + +// numPeriodsOK checks whether every period in s is followed by a digit. +func numPeriodsOK(s string) bool { + period := false + for _, r := range s { + if period && !isDigit(r) { + return false + } + period = r == '.' + } + return !period +} + +// establishContext sets the current context of the parser, +// where the context is either a hash or an array of hashes. Which one is +// set depends on the value of the `array` parameter. +// +// Establishing the context also makes sure that the key isn't a duplicate, and +// will create implicit hashes automatically. +func (p *parser) establishContext(key Key, array bool) { + var ok bool + + // Always start at the top level and drill down for our context. + hashContext := p.mapping + keyContext := make(Key, 0) + + // We only need implicit hashes for key[0:-1] + for _, k := range key[0 : len(key)-1] { + _, ok = hashContext[k] + keyContext = append(keyContext, k) + + // No key? Make an implicit hash and move on. + if !ok { + p.addImplicit(keyContext) + hashContext[k] = make(map[string]interface{}) + } + + // If the hash context is actually an array of tables, then set + // the hash context to the last element in that array. + // + // Otherwise, it better be a table, since this MUST be a key group (by + // virtue of it not being the last element in a key). + switch t := hashContext[k].(type) { + case []map[string]interface{}: + hashContext = t[len(t)-1] + case map[string]interface{}: + hashContext = t + default: + p.panicf("Key '%s' was already created as a hash.", keyContext) + } + } + + p.context = keyContext + if array { + // If this is the first element for this array, then allocate a new + // list of tables for it. + k := key[len(key)-1] + if _, ok := hashContext[k]; !ok { + hashContext[k] = make([]map[string]interface{}, 0, 5) + } + + // Add a new table. But make sure the key hasn't already been used + // for something else. + if hash, ok := hashContext[k].([]map[string]interface{}); ok { + hashContext[k] = append(hash, make(map[string]interface{})) + } else { + p.panicf("Key '%s' was already created and cannot be used as "+ + "an array.", keyContext) + } + } else { + p.setValue(key[len(key)-1], make(map[string]interface{})) + } + p.context = append(p.context, key[len(key)-1]) +} + +// setValue sets the given key to the given value in the current context. +// It will make sure that the key hasn't already been defined, account for +// implicit key groups. +func (p *parser) setValue(key string, value interface{}) { + var tmpHash interface{} + var ok bool + + hash := p.mapping + keyContext := make(Key, 0) + for _, k := range p.context { + keyContext = append(keyContext, k) + if tmpHash, ok = hash[k]; !ok { + p.bug("Context for key '%s' has not been established.", keyContext) + } + switch t := tmpHash.(type) { + case []map[string]interface{}: + // The context is a table of hashes. Pick the most recent table + // defined as the current hash. + hash = t[len(t)-1] + case map[string]interface{}: + hash = t + default: + p.bug("Expected hash to have type 'map[string]interface{}', but "+ + "it has '%T' instead.", tmpHash) + } + } + keyContext = append(keyContext, key) + + if _, ok := hash[key]; ok { + // Typically, if the given key has already been set, then we have + // to raise an error since duplicate keys are disallowed. However, + // it's possible that a key was previously defined implicitly. In this + // case, it is allowed to be redefined concretely. (See the + // `tests/valid/implicit-and-explicit-after.toml` test in `toml-test`.) + // + // But we have to make sure to stop marking it as an implicit. (So that + // another redefinition provokes an error.) + // + // Note that since it has already been defined (as a hash), we don't + // want to overwrite it. So our business is done. + if p.isImplicit(keyContext) { + p.removeImplicit(keyContext) + return + } + + // Otherwise, we have a concrete key trying to override a previous + // key, which is *always* wrong. + p.panicf("Key '%s' has already been defined.", keyContext) + } + hash[key] = value +} + +// setType sets the type of a particular value at a given key. +// It should be called immediately AFTER setValue. +// +// Note that if `key` is empty, then the type given will be applied to the +// current context (which is either a table or an array of tables). +func (p *parser) setType(key string, typ tomlType) { + keyContext := make(Key, 0, len(p.context)+1) + for _, k := range p.context { + keyContext = append(keyContext, k) + } + if len(key) > 0 { // allow type setting for hashes + keyContext = append(keyContext, key) + } + p.types[keyContext.String()] = typ +} + +// addImplicit sets the given Key as having been created implicitly. +func (p *parser) addImplicit(key Key) { + p.implicits[key.String()] = true +} + +// removeImplicit stops tagging the given key as having been implicitly +// created. +func (p *parser) removeImplicit(key Key) { + p.implicits[key.String()] = false +} + +// isImplicit returns true if the key group pointed to by the key was created +// implicitly. +func (p *parser) isImplicit(key Key) bool { + return p.implicits[key.String()] +} + +// current returns the full key name of the current context. +func (p *parser) current() string { + if len(p.currentKey) == 0 { + return p.context.String() + } + if len(p.context) == 0 { + return p.currentKey + } + return fmt.Sprintf("%s.%s", p.context, p.currentKey) +} + +func stripFirstNewline(s string) string { + if len(s) == 0 || s[0] != '\n' { + return s + } + return s[1:] +} + +func stripEscapedWhitespace(s string) string { + esc := strings.Split(s, "\\\n") + if len(esc) > 1 { + for i := 1; i < len(esc); i++ { + esc[i] = strings.TrimLeftFunc(esc[i], unicode.IsSpace) + } + } + return strings.Join(esc, "") +} + +func (p *parser) replaceEscapes(str string) string { + var replaced []rune + s := []byte(str) + r := 0 + for r < len(s) { + if s[r] != '\\' { + c, size := utf8.DecodeRune(s[r:]) + r += size + replaced = append(replaced, c) + continue + } + r += 1 + if r >= len(s) { + p.bug("Escape sequence at end of string.") + return "" + } + switch s[r] { + default: + p.bug("Expected valid escape code after \\, but got %q.", s[r]) + return "" + case 'b': + replaced = append(replaced, rune(0x0008)) + r += 1 + case 't': + replaced = append(replaced, rune(0x0009)) + r += 1 + case 'n': + replaced = append(replaced, rune(0x000A)) + r += 1 + case 'f': + replaced = append(replaced, rune(0x000C)) + r += 1 + case 'r': + replaced = append(replaced, rune(0x000D)) + r += 1 + case '"': + replaced = append(replaced, rune(0x0022)) + r += 1 + case '\\': + replaced = append(replaced, rune(0x005C)) + r += 1 + case 'u': + // At this point, we know we have a Unicode escape of the form + // `uXXXX` at [r, r+5). (Because the lexer guarantees this + // for us.) + escaped := p.asciiEscapeToUnicode(s[r+1 : r+5]) + replaced = append(replaced, escaped) + r += 5 + case 'U': + // At this point, we know we have a Unicode escape of the form + // `uXXXX` at [r, r+9). (Because the lexer guarantees this + // for us.) + escaped := p.asciiEscapeToUnicode(s[r+1 : r+9]) + replaced = append(replaced, escaped) + r += 9 + } + } + return string(replaced) +} + +func (p *parser) asciiEscapeToUnicode(bs []byte) rune { + s := string(bs) + hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32) + if err != nil { + p.bug("Could not parse '%s' as a hexadecimal number, but the "+ + "lexer claims it's OK: %s", s, err) + } + if !utf8.ValidRune(rune(hex)) { + p.panicf("Escaped character '\\u%s' is not valid UTF-8.", s) + } + return rune(hex) +} + +func isStringType(ty itemType) bool { + return ty == itemString || ty == itemMultilineString || + ty == itemRawString || ty == itemRawMultilineString +} diff --git a/vendor/github.com/BurntSushi/toml/session.vim b/vendor/github.com/BurntSushi/toml/session.vim new file mode 100644 index 000000000000..562164be0603 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/session.vim @@ -0,0 +1 @@ +au BufWritePost *.go silent!make tags > /dev/null 2>&1 diff --git a/vendor/github.com/BurntSushi/toml/type_check.go b/vendor/github.com/BurntSushi/toml/type_check.go new file mode 100644 index 000000000000..c73f8afc1a6d --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/type_check.go @@ -0,0 +1,91 @@ +package toml + +// tomlType represents any Go type that corresponds to a TOML type. +// While the first draft of the TOML spec has a simplistic type system that +// probably doesn't need this level of sophistication, we seem to be militating +// toward adding real composite types. +type tomlType interface { + typeString() string +} + +// typeEqual accepts any two types and returns true if they are equal. +func typeEqual(t1, t2 tomlType) bool { + if t1 == nil || t2 == nil { + return false + } + return t1.typeString() == t2.typeString() +} + +func typeIsHash(t tomlType) bool { + return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash) +} + +type tomlBaseType string + +func (btype tomlBaseType) typeString() string { + return string(btype) +} + +func (btype tomlBaseType) String() string { + return btype.typeString() +} + +var ( + tomlInteger tomlBaseType = "Integer" + tomlFloat tomlBaseType = "Float" + tomlDatetime tomlBaseType = "Datetime" + tomlString tomlBaseType = "String" + tomlBool tomlBaseType = "Bool" + tomlArray tomlBaseType = "Array" + tomlHash tomlBaseType = "Hash" + tomlArrayHash tomlBaseType = "ArrayHash" +) + +// typeOfPrimitive returns a tomlType of any primitive value in TOML. +// Primitive values are: Integer, Float, Datetime, String and Bool. +// +// Passing a lexer item other than the following will cause a BUG message +// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime. +func (p *parser) typeOfPrimitive(lexItem item) tomlType { + switch lexItem.typ { + case itemInteger: + return tomlInteger + case itemFloat: + return tomlFloat + case itemDatetime: + return tomlDatetime + case itemString: + return tomlString + case itemMultilineString: + return tomlString + case itemRawString: + return tomlString + case itemRawMultilineString: + return tomlString + case itemBool: + return tomlBool + } + p.bug("Cannot infer primitive type of lex item '%s'.", lexItem) + panic("unreachable") +} + +// typeOfArray returns a tomlType for an array given a list of types of its +// values. +// +// In the current spec, if an array is homogeneous, then its type is always +// "Array". If the array is not homogeneous, an error is generated. +func (p *parser) typeOfArray(types []tomlType) tomlType { + // Empty arrays are cool. + if len(types) == 0 { + return tomlArray + } + + theType := types[0] + for _, t := range types[1:] { + if !typeEqual(theType, t) { + p.panicf("Array contains values of type '%s' and '%s', but "+ + "arrays must be homogeneous.", theType, t) + } + } + return tomlArray +} diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go new file mode 100644 index 000000000000..608997c22f68 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/type_fields.go @@ -0,0 +1,242 @@ +package toml + +// Struct field handling is adapted from code in encoding/json: +// +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the Go distribution. + +import ( + "reflect" + "sort" + "sync" +) + +// A field represents a single field found in a struct. +type field struct { + name string // the name of the field (`toml` tag included) + tag bool // whether field has a `toml` tag + index []int // represents the depth of an anonymous field + typ reflect.Type // the type of the field +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from toml tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that TOML should recognize for the given +// type. The algorithm is breadth-first search over the set of structs to +// include - the top struct and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + count := map[reflect.Type]int{} + nextCount := map[reflect.Type]int{} + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" && !sf.Anonymous { // unexported + continue + } + opts := getOptions(sf.Tag) + if opts.skip { + continue + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := opts.name != "" + name := opts.name + if name == "" { + name = sf.Name + } + fields = append(fields, field{name, tagged, index, ft}) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + f := field{name: ft.Name(), index: index, typ: ft} + next = append(next, f) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with TOML tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// TOML tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} diff --git a/vendor/github.com/Masterminds/semver/.travis.yml b/vendor/github.com/Masterminds/semver/.travis.yml new file mode 100644 index 000000000000..3d9ebadb9333 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/.travis.yml @@ -0,0 +1,27 @@ +language: go + +go: + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - 1.10.x + - tip + +# Setting sudo access to false will let Travis CI use containers rather than +# VMs to run the tests. For more details see: +# - http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +# - http://docs.travis-ci.com/user/workers/standard-infrastructure/ +sudo: false + +script: + - make setup + - make test + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/06e3328629952dabe3e0 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always diff --git a/vendor/github.com/Masterminds/semver/CHANGELOG.md b/vendor/github.com/Masterminds/semver/CHANGELOG.md index 083c7349672b..b888e20abaa5 100644 --- a/vendor/github.com/Masterminds/semver/CHANGELOG.md +++ b/vendor/github.com/Masterminds/semver/CHANGELOG.md @@ -1,178 +1,86 @@ -# Changelog - -## 3.0.3 (2019-12-13) - -### Fixed - -- #141: Fixed issue with <= comparison - -## 3.0.2 (2019-11-14) - -### Fixed - -- #134: Fixed broken constraint checking with ^0.0 (thanks @krmichelos) - -## 3.0.1 (2019-09-13) - -### Fixed - -- #125: Fixes issue with module path for v3 - -## 3.0.0 (2019-09-12) - -This is a major release of the semver package which includes API changes. The Go -API is compatible with ^1. The Go API was not changed because many people are using -`go get` without Go modules for their applications and API breaking changes cause -errors which we have or would need to support. - -The changes in this release are the handling based on the data passed into the -functions. These are described in the added and changed sections below. - -### Added - -- StrictNewVersion function. This is similar to NewVersion but will return an - error if the version passed in is not a strict semantic version. For example, - 1.2.3 would pass but v1.2.3 or 1.2 would fail because they are not strictly - speaking semantic versions. This function is faster, performs fewer operations, - and uses fewer allocations than NewVersion. -- Fuzzing has been performed on NewVersion, StrictNewVersion, and NewConstraint. - The Makefile contains the operations used. For more information on you can start - on Wikipedia at https://en.wikipedia.org/wiki/Fuzzing -- Now using Go modules - -### Changed - -- NewVersion has proper prerelease and metadata validation with error messages - to signal an issue with either of them -- ^ now operates using a similar set of rules to npm/js and Rust/Cargo. If the - version is >=1 the ^ ranges works the same as v1. For major versions of 0 the - rules have changed. The minor version is treated as the stable version unless - a patch is specified and then it is equivalent to =. One difference from npm/js - is that prereleases there are only to a specific version (e.g. 1.2.3). - Prereleases here look over multiple versions and follow semantic version - ordering rules. This pattern now follows along with the expected and requested - handling of this packaged by numerous users. - -## 1.5.0 (2019-09-11) - -### Added - -- #103: Add basic fuzzing for `NewVersion()` (thanks @jesse-c) - -### Changed - -- #82: Clarify wildcard meaning in range constraints and update tests for it (thanks @greysteil) -- #83: Clarify caret operator range for pre-1.0.0 dependencies (thanks @greysteil) -- #72: Adding docs comment pointing to vert for a cli -- #71: Update the docs on pre-release comparator handling -- #89: Test with new go versions (thanks @thedevsaddam) -- #87: Added $ to ValidPrerelease for better validation (thanks @jeremycarroll) - -### Fixed - -- #78: Fix unchecked error in example code (thanks @ravron) -- #70: Fix the handling of pre-releases and the 0.0.0 release edge case -- #97: Fixed copyright file for proper display on GitHub -- #107: Fix handling prerelease when sorting alphanum and num -- #109: Fixed where Validate sometimes returns wrong message on error - -## 1.4.2 (2018-04-10) - -### Changed +# 1.4.2 (2018-04-10) +## Changed - #72: Updated the docs to point to vert for a console appliaction - #71: Update the docs on pre-release comparator handling -### Fixed - +## Fixed - #70: Fix the handling of pre-releases and the 0.0.0 release edge case -## 1.4.1 (2018-04-02) - -### Fixed +# 1.4.1 (2018-04-02) +## Fixed - Fixed #64: Fix pre-release precedence issue (thanks @uudashr) -## 1.4.0 (2017-10-04) - -### Changed +# 1.4.0 (2017-10-04) +## Changed - #61: Update NewVersion to parse ints with a 64bit int size (thanks @zknill) -## 1.3.1 (2017-07-10) - -### Fixed +# 1.3.1 (2017-07-10) +## Fixed - Fixed #57: number comparisons in prerelease sometimes inaccurate -## 1.3.0 (2017-05-02) - -### Added +# 1.3.0 (2017-05-02) +## Added - #45: Added json (un)marshaling support (thanks @mh-cbon) - Stability marker. See https://masterminds.github.io/stability/ -### Fixed - +## Fixed - #51: Fix handling of single digit tilde constraint (thanks @dgodd) -### Changed - +## Changed - #55: The godoc icon moved from png to svg -## 1.2.3 (2017-04-03) - -### Fixed +# 1.2.3 (2017-04-03) +## Fixed - #46: Fixed 0.x.x and 0.0.x in constraints being treated as * -## Release 1.2.2 (2016-12-13) - -### Fixed +# Release 1.2.2 (2016-12-13) +## Fixed - #34: Fixed issue where hyphen range was not working with pre-release parsing. -## Release 1.2.1 (2016-11-28) - -### Fixed +# Release 1.2.1 (2016-11-28) +## Fixed - #24: Fixed edge case issue where constraint "> 0" does not handle "0.0.1-alpha" properly. -## Release 1.2.0 (2016-11-04) - -### Added +# Release 1.2.0 (2016-11-04) +## Added - #20: Added MustParse function for versions (thanks @adamreese) - #15: Added increment methods on versions (thanks @mh-cbon) -### Fixed - +## Fixed - Issue #21: Per the SemVer spec (section 9) a pre-release is unstable and might not satisfy the intended compatibility. The change here ignores pre-releases on constraint checks (e.g., ~ or ^) when a pre-release is not part of the constraint. For example, `^1.2.3` will ignore pre-releases while `^1.2.3-alpha` will include them. -## Release 1.1.1 (2016-06-30) - -### Changed +# Release 1.1.1 (2016-06-30) +## Changed - Issue #9: Speed up version comparison performance (thanks @sdboyer) - Issue #8: Added benchmarks (thanks @sdboyer) - Updated Go Report Card URL to new location - Updated Readme to add code snippet formatting (thanks @mh-cbon) - Updating tagging to v[SemVer] structure for compatibility with other tools. -## Release 1.1.0 (2016-03-11) +# Release 1.1.0 (2016-03-11) - Issue #2: Implemented validation to provide reasons a versions failed a constraint. -## Release 1.0.1 (2015-12-31) +# Release 1.0.1 (2015-12-31) - Fixed #1: * constraint failing on valid versions. -## Release 1.0.0 (2015-10-20) +# Release 1.0.0 (2015-10-20) - Initial release diff --git a/vendor/github.com/Masterminds/semver/LICENSE.txt b/vendor/github.com/Masterminds/semver/LICENSE.txt index 9ff7da9c48b6..0da4aeadb094 100644 --- a/vendor/github.com/Masterminds/semver/LICENSE.txt +++ b/vendor/github.com/Masterminds/semver/LICENSE.txt @@ -1,4 +1,5 @@ -Copyright (C) 2014-2019, Matt Butcher and Matt Farina +The Masterminds +Copyright (C) 2014-2015, Matt Butcher and Matt Farina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/Masterminds/semver/Makefile b/vendor/github.com/Masterminds/semver/Makefile index eac19178fbd1..a7a1b4e36de9 100644 --- a/vendor/github.com/Masterminds/semver/Makefile +++ b/vendor/github.com/Masterminds/semver/Makefile @@ -1,37 +1,36 @@ -GOPATH=$(shell go env GOPATH) -GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint -GOFUZZBUILD = $(GOPATH)/bin/go-fuzz-build -GOFUZZ = $(GOPATH)/bin/go-fuzz - -.PHONY: lint -lint: $(GOLANGCI_LINT) - @echo "==> Linting codebase" - @$(GOLANGCI_LINT) run +.PHONY: setup +setup: + go get -u gopkg.in/alecthomas/gometalinter.v1 + gometalinter.v1 --install .PHONY: test -test: +test: validate lint @echo "==> Running tests" - GO111MODULE=on go test -v - -.PHONY: test-cover -test-cover: - @echo "==> Running Tests with coverage" - GO111MODULE=on go test -cover . + go test -v -.PHONY: fuzz -fuzz: $(GOFUZZBUILD) $(GOFUZZ) - @echo "==> Fuzz testing" - $(GOFUZZBUILD) - $(GOFUZZ) -workdir=_fuzz +.PHONY: validate +validate: + @echo "==> Running static validations" + @gometalinter.v1 \ + --disable-all \ + --enable deadcode \ + --severity deadcode:error \ + --enable gofmt \ + --enable gosimple \ + --enable ineffassign \ + --enable misspell \ + --enable vet \ + --tests \ + --vendor \ + --deadline 60s \ + ./... || exit_code=1 -$(GOLANGCI_LINT): - # Install golangci-lint. The configuration for it is in the .golangci.yml - # file in the root of the repository - echo ${GOPATH} - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.17.1 - -$(GOFUZZBUILD): - cd / && go get -u github.com/dvyukov/go-fuzz/go-fuzz-build - -$(GOFUZZ): - cd / && go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-dep \ No newline at end of file +.PHONY: lint +lint: + @echo "==> Running linters" + @gometalinter.v1 \ + --disable-all \ + --enable golint \ + --vendor \ + --deadline 60s \ + ./... || : diff --git a/vendor/github.com/Masterminds/semver/README.md b/vendor/github.com/Masterminds/semver/README.md index d8f54dcbd3c6..3e934ed71ecf 100644 --- a/vendor/github.com/Masterminds/semver/README.md +++ b/vendor/github.com/Masterminds/semver/README.md @@ -9,117 +9,65 @@ The `semver` package provides the ability to work with [Semantic Versions](http: [![Stability: Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html) -[![](https://github.com/Masterminds/semver/workflows/Tests/badge.svg)](https://github.com/Masterminds/semver/actions) -[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/Masterminds/semver/v3) -[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/semver)](https://goreportcard.com/report/github.com/Masterminds/semver) - -If you are looking for a command line tool for version comparisons please see -[vert](https://github.com/Masterminds/vert) which uses this library. - -## Package Versions - -There are three major versions fo the `semver` package. - -* 3.x.x is the new stable and active version. This version is focused on constraint - compatibility for range handling in other tools from other languages. It has - a similar API to the v1 releases. The development of this version is on the master - branch. The documentation for this version is below. -* 2.x was developed primarily for [dep](https://github.com/golang/dep). There are - no tagged releases and the development was performed by [@sdboyer](https://github.com/sdboyer). - There are API breaking changes from v1. This version lives on the [2.x branch](https://github.com/Masterminds/semver/tree/2.x). -* 1.x.x is the most widely used version with numerous tagged releases. This is the - previous stable and is still maintained for bug fixes. The development, to fix - bugs, occurs on the release-1 branch. You can read the documentation [here](https://github.com/Masterminds/semver/blob/release-1/README.md). +[![Build Status](https://travis-ci.org/Masterminds/semver.svg)](https://travis-ci.org/Masterminds/semver) [![Build status](https://ci.appveyor.com/api/projects/status/jfk66lib7hb985k8/branch/master?svg=true&passingText=windows%20build%20passing&failingText=windows%20build%20failing)](https://ci.appveyor.com/project/mattfarina/semver/branch/master) [![GoDoc](https://godoc.org/github.com/Masterminds/semver?status.svg)](https://godoc.org/github.com/Masterminds/semver) [![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/semver)](https://goreportcard.com/report/github.com/Masterminds/semver) ## Parsing Semantic Versions -There are two functions that can parse semantic versions. The `StrictNewVersion` -function only parses valid version 2 semantic versions as outlined in the -specification. The `NewVersion` function attempts to coerce a version into a -semantic version and parse it. For example, if there is a leading v or a version -listed without all 3 parts (e.g. `v1.2`) it will attempt to coerce it into a valid -semantic version (e.g., 1.2.0). In both cases a `Version` object is returned -that can be sorted, compared, and used in constraints. - -When parsing a version an error is returned if there is an issue parsing the -version. For example, +To parse a semantic version use the `NewVersion` function. For example, +```go v, err := semver.NewVersion("1.2.3-beta.1+build345") +``` -The version object has methods to get the parts of the version, compare it to -other versions, convert the version back into a string, and get the original -string. Getting the original string is useful if the semantic version was coerced -into a valid form. +If there is an error the version wasn't parseable. The version object has methods +to get the parts of the version, compare it to other versions, convert the +version back into a string, and get the original string. For more details +please see the [documentation](https://godoc.org/github.com/Masterminds/semver). ## Sorting Semantic Versions -A set of versions can be sorted using the `sort` package from the standard library. -For example, +A set of versions can be sorted using the [`sort`](https://golang.org/pkg/sort/) +package from the standard library. For example, ```go -raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} -vs := make([]*semver.Version, len(raw)) -for i, r := range raw { - v, err := semver.NewVersion(r) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - vs[i] = v -} - -sort.Sort(semver.Collection(vs)) + raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} + vs := make([]*semver.Version, len(raw)) + for i, r := range raw { + v, err := semver.NewVersion(r) + if err != nil { + t.Errorf("Error parsing version: %s", err) + } + + vs[i] = v + } + + sort.Sort(semver.Collection(vs)) ``` ## Checking Version Constraints -There are two methods for comparing versions. One uses comparison methods on -`Version` instances and the other uses `Constraints`. There are some important -differences to notes between these two methods of comparison. - -1. When two versions are compared using functions such as `Compare`, `LessThan`, - and others it will follow the specification and always include prereleases - within the comparison. It will provide an answer that is valid with the - comparison section of the spec at https://semver.org/#spec-item-11 -2. When constraint checking is used for checks or validation it will follow a - different set of rules that are common for ranges with tools like npm/js - and Rust/Cargo. This includes considering prereleases to be invalid if the - ranges does not include one. If you want to have it include pre-releases a - simple solution is to include `-0` in your range. -3. Constraint ranges can have some complex rules including the shorthand use of - ~ and ^. For more details on those see the options below. - -There are differences between the two methods or checking versions because the -comparison methods on `Version` follow the specification while comparison ranges -are not part of the specification. Different packages and tools have taken it -upon themselves to come up with range rules. This has resulted in differences. -For example, npm/js and Cargo/Rust follow similar patterns while PHP has a -different pattern for ^. The comparison features in this package follow the -npm/js and Cargo/Rust lead because applications using it have followed similar -patters with their versions. - Checking a version against version constraints is one of the most featureful parts of the package. ```go -c, err := semver.NewConstraint(">= 1.2.3") -if err != nil { - // Handle constraint not being parsable. -} - -v, err := semver.NewVersion("1.3") -if err != nil { - // Handle version not being parsable. -} -// Check if the version meets the constraints. The a variable will be true. -a := c.Check(v) + c, err := semver.NewConstraint(">= 1.2.3") + if err != nil { + // Handle constraint not being parseable. + } + + v, _ := semver.NewVersion("1.3") + if err != nil { + // Handle version not being parseable. + } + // Check if the version meets the constraints. The a variable will be true. + a := c.Check(v) ``` -### Basic Comparisons +## Basic Comparisons There are two elements to the comparisons. First, a comparison string is a list -of space or comma separated AND comparisons. These are then separated by || (OR) -comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a +of comma separated and comparisons. These are then separated by || separated or +comparisons. For example, `">= 1.2, < 3.0.0 || >= 4.2.3"` is looking for a comparison that's greater than or equal to 1.2 and less than 3.0.0 or is greater than or equal to 4.2.3. @@ -132,55 +80,35 @@ The basic comparisons are: * `>=`: greater than or equal to * `<=`: less than or equal to -### Working With Prerelease Versions - -Pre-releases, for those not familiar with them, are used for software releases -prior to stable or generally available releases. Examples of prereleases include -development, alpha, beta, and release candidate releases. A prerelease may be -a version such as `1.2.3-beta.1` while the stable release would be `1.2.3`. In the -order of precedence, prereleases come before their associated releases. In this -example `1.2.3-beta.1 < 1.2.3`. +_Note, according to the Semantic Version specification pre-releases may not be +API compliant with their release counterpart. It says,_ -According to the Semantic Version specification prereleases may not be -API compliant with their release counterpart. It says, +> _A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version._ -> A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. +_SemVer comparisons without a pre-release value will skip pre-release versions. +For example, `>1.2.3` will skip pre-releases when looking at a list of values +while `>1.2.3-alpha.1` will evaluate pre-releases._ -SemVer comparisons using constraints without a prerelease comparator will skip -prerelease versions. For example, `>=1.2.3` will skip prereleases when looking -at a list of releases while `>=1.2.3-0` will evaluate and find prereleases. - -The reason for the `0` as a pre-release version in the example comparison is -because pre-releases can only contain ASCII alphanumerics and hyphens (along with -`.` separators), per the spec. Sorting happens in ASCII sort order, again per the -spec. The lowest character is a `0` in ASCII sort order -(see an [ASCII Table](http://www.asciitable.com/)) - -Understanding ASCII sort ordering is important because A-Z comes before a-z. That -means `>=1.2.3-BETA` will return `1.2.3-alpha`. What you might expect from case -sensitivity doesn't apply here. This is due to ASCII sort ordering which is what -the spec specifies. - -### Hyphen Range Comparisons +## Hyphen Range Comparisons There are multiple methods to handle ranges and the first is hyphens ranges. These look like: -* `1.2 - 1.4.5` which is equivalent to `>= 1.2 <= 1.4.5` -* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` +* `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5` +* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4, <= 4.5` -### Wildcards In Comparisons +## Wildcards In Comparisons The `x`, `X`, and `*` characters can be used as a wildcard character. This works for all comparison operators. When used on the `=` operator it falls -back to the patch level comparison (see tilde below). For example, +back to the pack level comparison (see tilde below). For example, * `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` * `>= 1.2.x` is equivalent to `>= 1.2.0` -* `<= 2.x` is equivalent to `< 3` +* `<= 2.x` is equivalent to `<= 3` * `*` is equivalent to `>= 0.0.0` -### Tilde Range Comparisons (Patch) +## Tilde Range Comparisons (Patch) The tilde (`~`) comparison operator is for patch level ranges when a minor version is specified and major level changes when the minor number is missing. @@ -192,53 +120,46 @@ For example, * `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` * `~1.x` is equivalent to `>= 1, < 2` -### Caret Range Comparisons (Major) +## Caret Range Comparisons (Major) -The caret (`^`) comparison operator is for major level changes once a stable -(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts -as the API stability level. This is useful when comparisons of API versions as a -major change is API breaking. For example, +The caret (`^`) comparison operator is for major level changes. This is useful +when comparisons of API versions as a major change is API breaking. For example, * `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` * `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` * `^2.3` is equivalent to `>= 2.3, < 3` * `^2.x` is equivalent to `>= 2.0.0, < 3` -* `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` -* `^0.2` is equivalent to `>=0.2.0 <0.3.0` -* `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` -* `^0.0` is equivalent to `>=0.0.0 <0.1.0` -* `^0` is equivalent to `>=0.0.0 <1.0.0` -## Validation +# Validation In addition to testing a version against a constraint, a version can be validated against a constraint. When validation fails a slice of errors containing why a version didn't meet the constraint is returned. For example, ```go -c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") -if err != nil { - // Handle constraint not being parseable. -} - -v, err := semver.NewVersion("1.3") -if err != nil { - // Handle version not being parseable. -} - -// Validate a version against a constraint. -a, msgs := c.Validate(v) -// a is false -for _, m := range msgs { - fmt.Println(m) - - // Loops over the errors which would read - // "1.3 is greater than 1.2.3" - // "1.3 is less than 1.4" -} + c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") + if err != nil { + // Handle constraint not being parseable. + } + + v, _ := semver.NewVersion("1.3") + if err != nil { + // Handle version not being parseable. + } + + // Validate a version against a constraint. + a, msgs := c.Validate(v) + // a is false + for _, m := range msgs { + fmt.Println(m) + + // Loops over the errors which would read + // "1.3 is greater than 1.2.3" + // "1.3 is less than 1.4" + } ``` -## Contribute +# Contribute If you find an issue or want to contribute please file an [issue](https://github.com/Masterminds/semver/issues) or [create a pull request](https://github.com/Masterminds/semver/pulls). diff --git a/vendor/github.com/Masterminds/semver/appveyor.yml b/vendor/github.com/Masterminds/semver/appveyor.yml new file mode 100644 index 000000000000..b2778df15a40 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/appveyor.yml @@ -0,0 +1,44 @@ +version: build-{build}.{branch} + +clone_folder: C:\gopath\src\github.com\Masterminds\semver +shallow_clone: true + +environment: + GOPATH: C:\gopath + +platform: + - x64 + +install: + - go version + - go env + - go get -u gopkg.in/alecthomas/gometalinter.v1 + - set PATH=%PATH%;%GOPATH%\bin + - gometalinter.v1.exe --install + +build_script: + - go install -v ./... + +test_script: + - "gometalinter.v1 \ + --disable-all \ + --enable deadcode \ + --severity deadcode:error \ + --enable gofmt \ + --enable gosimple \ + --enable ineffassign \ + --enable misspell \ + --enable vet \ + --tests \ + --vendor \ + --deadline 60s \ + ./... || exit_code=1" + - "gometalinter.v1 \ + --disable-all \ + --enable golint \ + --vendor \ + --deadline 60s \ + ./... || :" + - go test -v + +deploy: off diff --git a/vendor/github.com/Masterminds/semver/constraints.go b/vendor/github.com/Masterminds/semver/constraints.go index a57669f44db0..a41a6a7a4a89 100644 --- a/vendor/github.com/Masterminds/semver/constraints.go +++ b/vendor/github.com/Masterminds/semver/constraints.go @@ -1,7 +1,6 @@ package semver import ( - "bytes" "errors" "fmt" "regexp" @@ -24,18 +23,7 @@ func NewConstraint(c string) (*Constraints, error) { ors := strings.Split(c, "||") or := make([][]*constraint, len(ors)) for k, v := range ors { - - // TODO: Find a way to validate and fetch all the constraints in a simpler form - - // Validate the segment - if !validConstraintRegex.MatchString(v) { - return nil, fmt.Errorf("improper constraint: %s", v) - } - - cs := findConstraintRegex.FindAllString(v, -1) - if cs == nil { - cs = append(cs, v) - } + cs := strings.Split(v, ",") result := make([]*constraint, len(cs)) for i, s := range cs { pc, err := parseConstraint(s) @@ -77,30 +65,13 @@ func (cs Constraints) Check(v *Version) bool { func (cs Constraints) Validate(v *Version) (bool, []error) { // loop over the ORs and check the inner ANDs var e []error - - // Capture the prerelease message only once. When it happens the first time - // this var is marked - var prerelesase bool for _, o := range cs.constraints { joy := true for _, c := range o { - // Before running the check handle the case there the version is - // a prerelease and the check is not searching for prereleases. - if c.con.pre == "" && v.pre != "" { - if !prerelesase { - em := fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - e = append(e, em) - prerelesase = true - } + if !c.check(v) { + em := fmt.Errorf(c.msg, v, c.orig) + e = append(e, em) joy = false - - } else { - - if !c.check(v) { - em := fmt.Errorf(constraintMsg[c.origfunc], v, c.orig) - e = append(e, em) - joy = false - } } } @@ -112,41 +83,9 @@ func (cs Constraints) Validate(v *Version) (bool, []error) { return false, e } -func (cs Constraints) String() string { - buf := make([]string, len(cs.constraints)) - var tmp bytes.Buffer - - for k, v := range cs.constraints { - tmp.Reset() - vlen := len(v) - for kk, c := range v { - tmp.WriteString(c.string()) - - // Space separate the AND conditions - if vlen > 1 && kk < vlen-1 { - tmp.WriteString(" ") - } - } - buf[k] = tmp.String() - } - - return strings.Join(buf, " || ") -} - var constraintOps map[string]cfunc var constraintMsg map[string]string var constraintRegex *regexp.Regexp -var constraintRangeRegex *regexp.Regexp - -// Used to find individual constraints within a multi-constraint string -var findConstraintRegex *regexp.Regexp - -// Used to validate an segment of ANDs is valid -var validConstraintRegex *regexp.Regexp - -const cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` + - `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + - `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` func init() { constraintOps = map[string]cfunc{ @@ -192,20 +131,16 @@ func init() { constraintRangeRegex = regexp.MustCompile(fmt.Sprintf( `\s*(%s)\s+-\s+(%s)\s*`, cvRegex, cvRegex)) - - findConstraintRegex = regexp.MustCompile(fmt.Sprintf( - `(%s)\s*(%s)`, - strings.Join(ops, "|"), - cvRegex)) - - validConstraintRegex = regexp.MustCompile(fmt.Sprintf( - `^(\s*(%s)\s*(%s)\s*\,?)+$`, - strings.Join(ops, "|"), - cvRegex)) } // An individual constraint type constraint struct { + // The callback function for the restraint. It performs the logic for + // the constraint. + function cfunc + + msg string + // The version used in the constraint check. For example, if a constraint // is '<= 2.0.0' the con a version instance representing 2.0.0. con *Version @@ -213,9 +148,6 @@ type constraint struct { // The original parsed version (e.g., 4.x from != 4.x) orig string - // The original operator for the constraint - origfunc string - // When an x is used as part of the version (e.g., 1.x) minorDirty bool dirty bool @@ -224,64 +156,36 @@ type constraint struct { // Check if a version meets the constraint func (c *constraint) check(v *Version) bool { - return constraintOps[c.origfunc](v, c) -} - -// String prints an individual constraint into a string -func (c *constraint) string() string { - return c.origfunc + c.orig + return c.function(v, c) } type cfunc func(v *Version, c *constraint) bool func parseConstraint(c string) (*constraint, error) { - if len(c) > 0 { - m := constraintRegex.FindStringSubmatch(c) - if m == nil { - return nil, fmt.Errorf("improper constraint: %s", c) - } - - cs := &constraint{ - orig: m[2], - origfunc: m[1], - } - - ver := m[2] - minorDirty := false - patchDirty := false - dirty := false - if isX(m[3]) || m[3] == "" { - ver = "0.0.0" - dirty = true - } else if isX(strings.TrimPrefix(m[4], ".")) || m[4] == "" { - minorDirty = true - dirty = true - ver = fmt.Sprintf("%s.0.0%s", m[3], m[6]) - } else if isX(strings.TrimPrefix(m[5], ".")) || m[5] == "" { - dirty = true - patchDirty = true - ver = fmt.Sprintf("%s%s.0%s", m[3], m[4], m[6]) - } - - con, err := NewVersion(ver) - if err != nil { - - // The constraintRegex should catch any regex parsing errors. So, - // we should never get here. - return nil, errors.New("constraint Parser Error") - } - - cs.con = con - cs.minorDirty = minorDirty - cs.patchDirty = patchDirty - cs.dirty = dirty - - return cs, nil - } - - // The rest is the special case where an empty string was passed in which - // is equivalent to * or >=0.0.0 - con, err := StrictNewVersion("0.0.0") + m := constraintRegex.FindStringSubmatch(c) + if m == nil { + return nil, fmt.Errorf("improper constraint: %s", c) + } + + ver := m[2] + orig := ver + minorDirty := false + patchDirty := false + dirty := false + if isX(m[3]) { + ver = "0.0.0" + dirty = true + } else if isX(strings.TrimPrefix(m[4], ".")) || m[4] == "" { + minorDirty = true + dirty = true + ver = fmt.Sprintf("%s.0.0%s", m[3], m[6]) + } else if isX(strings.TrimPrefix(m[5], ".")) { + dirty = true + patchDirty = true + ver = fmt.Sprintf("%s%s.0%s", m[3], m[4], m[6]) + } + + con, err := NewVersion(ver) if err != nil { // The constraintRegex should catch any regex parsing errors. So, @@ -290,12 +194,13 @@ func parseConstraint(c string) (*constraint, error) { } cs := &constraint{ + function: constraintOps[m[1]], + msg: constraintMsg[m[1]], con: con, - orig: c, - origfunc: "", - minorDirty: false, - patchDirty: false, - dirty: true, + orig: orig, + minorDirty: minorDirty, + patchDirty: patchDirty, + dirty: dirty, } return cs, nil } @@ -318,15 +223,9 @@ func constraintNotEqual(v *Version, c *constraint) bool { return true } else if c.minorDirty { return false - } else if c.con.Patch() != v.Patch() && !c.patchDirty { - return true - } else if c.patchDirty { - // Need to handle prereleases if present - if v.Prerelease() != "" || c.con.Prerelease() != "" { - return comparePrerelease(v.Prerelease(), c.con.Prerelease()) != 0 - } - return false } + + return false } return !v.Equal(c.con) @@ -334,6 +233,12 @@ func constraintNotEqual(v *Version, c *constraint) bool { func constraintGreaterThan(v *Version, c *constraint) bool { + // An edge case the constraint is 0.0.0 and the version is 0.0.0-someprerelease + // exists. This that case. + if !isNonZero(c.con) && isNonZero(v) { + return true + } + // If there is a pre-release on the version but the constraint isn't looking // for them assume that pre-releases are not compatible. See issue 21 for // more details. @@ -341,26 +246,6 @@ func constraintGreaterThan(v *Version, c *constraint) bool { return false } - if !c.dirty { - return v.Compare(c.con) == 1 - } - - if v.Major() > c.con.Major() { - return true - } else if v.Major() < c.con.Major() { - return false - } else if c.minorDirty { - // This is a range case such as >11. When the version is something like - // 11.1.0 is it not > 11. For that we would need 12 or higher - return false - } else if c.patchDirty { - // This is for ranges such as >11.1. A version of 11.1.1 is not greater - // which one of 11.2.1 is greater - return v.Minor() > c.con.Minor() - } - - // If we have gotten here we are not comparing pre-preleases and can use the - // Compare function to accomplish that. return v.Compare(c.con) == 1 } @@ -372,10 +257,25 @@ func constraintLessThan(v *Version, c *constraint) bool { return false } - return v.Compare(c.con) < 0 + if !c.dirty { + return v.Compare(c.con) < 0 + } + + if v.Major() > c.con.Major() { + return false + } else if v.Minor() > c.con.Minor() && !c.minorDirty { + return false + } + + return true } func constraintGreaterThanEqual(v *Version, c *constraint) bool { + // An edge case the constraint is 0.0.0 and the version is 0.0.0-someprerelease + // exists. This that case. + if !isNonZero(c.con) && isNonZero(v) { + return true + } // If there is a pre-release on the version but the constraint isn't looking // for them assume that pre-releases are not compatible. See issue 21 for @@ -401,7 +301,7 @@ func constraintLessThanEqual(v *Version, c *constraint) bool { if v.Major() > c.con.Major() { return false - } else if v.Major() == c.con.Major() && v.Minor() > c.con.Minor() && !c.minorDirty { + } else if v.Minor() > c.con.Minor() && !c.minorDirty { return false } @@ -455,21 +355,19 @@ func constraintTildeOrEqual(v *Version, c *constraint) bool { } if c.dirty { + c.msg = constraintMsg["~"] return constraintTilde(v, c) } return v.Equal(c.con) } -// ^* --> (any) -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2 --> >=1.2.0 <2.0.0 -// ^1 --> >=1.0.0 <2.0.0 -// ^0.2.3 --> >=0.2.3 <0.3.0 -// ^0.2 --> >=0.2.0 <0.3.0 -// ^0.0.3 --> >=0.0.3 <0.0.4 -// ^0.0 --> >=0.0.0 <0.1.0 -// ^0 --> >=0.0.0 <1.0.0 +// ^* --> (any) +// ^2, ^2.x, ^2.x.x --> >=2.0.0, <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0, <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0, <2.0.0 +// ^1.2.3 --> >=1.2.3, <2.0.0 +// ^1.2.0 --> >=1.2.0, <2.0.0 func constraintCaret(v *Version, c *constraint) bool { // If there is a pre-release on the version but the constraint isn't looking // for them assume that pre-releases are not compatible. See issue 21 for @@ -478,34 +376,23 @@ func constraintCaret(v *Version, c *constraint) bool { return false } - // This less than handles prereleases if v.LessThan(c.con) { return false } - // ^ when the major > 0 is >=x.y.z < x+1 - if c.con.Major() > 0 || c.minorDirty { - - // ^ has to be within a major range for > 0. Everything less than was - // filtered out with the LessThan call above. This filters out those - // that greater but not within the same major range. - return v.Major() == c.con.Major() - } - - // ^ when the major is 0 and minor > 0 is >=0.y.z < 0.y+1 - if c.con.Major() == 0 && v.Major() > 0 { + if v.Major() != c.con.Major() { return false } - // If the con Minor is > 0 it is not dirty - if c.con.Minor() > 0 || c.patchDirty { - return v.Minor() == c.con.Minor() - } - // At this point the major is 0 and the minor is 0 and not dirty. The patch - // is not dirty so we need to check if they are equal. If they are not equal - return c.con.Patch() == v.Patch() + return true } +var constraintRangeRegex *regexp.Regexp + +const cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` + + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + func isX(x string) bool { switch x { case "x", "*", "X": @@ -528,3 +415,12 @@ func rewriteRange(i string) string { return o } + +// Detect if a version is not zero (0.0.0) +func isNonZero(v *Version) bool { + if v.Major() != 0 || v.Minor() != 0 || v.Patch() != 0 || v.Prerelease() != "" { + return true + } + + return false +} diff --git a/vendor/github.com/Masterminds/semver/doc.go b/vendor/github.com/Masterminds/semver/doc.go index 391aa46b76df..e00f65eb73cf 100644 --- a/vendor/github.com/Masterminds/semver/doc.go +++ b/vendor/github.com/Masterminds/semver/doc.go @@ -10,23 +10,14 @@ Specifically it provides the ability to: Parsing Semantic Versions -There are two functions that can parse semantic versions. The `StrictNewVersion` -function only parses valid version 2 semantic versions as outlined in the -specification. The `NewVersion` function attempts to coerce a version into a -semantic version and parse it. For example, if there is a leading v or a version -listed without all 3 parts (e.g. 1.2) it will attempt to coerce it into a valid -semantic version (e.g., 1.2.0). In both cases a `Version` object is returned -that can be sorted, compared, and used in constraints. +To parse a semantic version use the `NewVersion` function. For example, -When parsing a version an optional error can be returned if there is an issue -parsing the version. For example, + v, err := semver.NewVersion("1.2.3-beta.1+build345") - v, err := semver.NewVersion("1.2.3-beta.1+b345") - -The version object has methods to get the parts of the version, compare it to -other versions, convert the version back into a string, and get the original -string. For more details please see the documentation -at https://godoc.org/github.com/Masterminds/semver. +If there is an error the version wasn't parseable. The version object has methods +to get the parts of the version, compare it to other versions, convert the +version back into a string, and get the original string. For more details +please see the documentation at https://godoc.org/github.com/Masterminds/semver. Sorting Semantic Versions @@ -46,44 +37,19 @@ For example, sort.Sort(semver.Collection(vs)) -Checking Version Constraints and Comparing Versions - -There are two methods for comparing versions. One uses comparison methods on -`Version` instances and the other is using Constraints. There are some important -differences to notes between these two methods of comparison. - -1. When two versions are compared using functions such as `Compare`, `LessThan`, - and others it will follow the specification and always include prereleases - within the comparison. It will provide an answer valid with the comparison - spec section at https://semver.org/#spec-item-11 -2. When constraint checking is used for checks or validation it will follow a - different set of rules that are common for ranges with tools like npm/js - and Rust/Cargo. This includes considering prereleases to be invalid if the - ranges does not include on. If you want to have it include pre-releases a - simple solution is to include `-0` in your range. -3. Constraint ranges can have some complex rules including the shorthard use of - ~ and ^. For more details on those see the options below. - -There are differences between the two methods or checking versions because the -comparison methods on `Version` follow the specification while comparison ranges -are not part of the specification. Different packages and tools have taken it -upon themselves to come up with range rules. This has resulted in differences. -For example, npm/js and Cargo/Rust follow similar patterns which PHP has a -different pattern for ^. The comparison features in this package follow the -npm/js and Cargo/Rust lead because applications using it have followed similar -patters with their versions. +Checking Version Constraints Checking a version against version constraints is one of the most featureful parts of the package. c, err := semver.NewConstraint(">= 1.2.3") if err != nil { - // Handle constraint not being parsable. + // Handle constraint not being parseable. } - v, err := semver.NewVersion("1.3") + v, _ := semver.NewVersion("1.3") if err != nil { - // Handle version not being parsable. + // Handle version not being parseable. } // Check if the version meets the constraints. The a variable will be true. a := c.Check(v) @@ -91,11 +57,10 @@ parts of the package. Basic Comparisons There are two elements to the comparisons. First, a comparison string is a list -of comma or space separated AND comparisons. These are then separated by || (OR) -comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a +of comma separated and comparisons. These are then separated by || separated or +comparisons. For example, `">= 1.2, < 3.0.0 || >= 4.2.3"` is looking for a comparison that's greater than or equal to 1.2 and less than 3.0.0 or is -greater than or equal to 4.2.3. This can also be written as -`">= 1.2, < 3.0.0 || >= 4.2.3"` +greater than or equal to 4.2.3. The basic comparisons are: @@ -112,15 +77,15 @@ There are multiple methods to handle ranges and the first is hyphens ranges. These look like: * `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5` - * `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` + * `2.3.4 - 4.5` which is equivalent to `>= 2.3.4, <= 4.5` Wildcards In Comparisons The `x`, `X`, and `*` characters can be used as a wildcard character. This works for all comparison operators. When used on the `=` operator it falls -back to the tilde operation. For example, +back to the pack level comparison (see tilde below). For example, - * `1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` + * `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` * `>= 1.2.x` is equivalent to `>= 1.2.0` * `<= 2.x` is equivalent to `<= 3` * `*` is equivalent to `>= 0.0.0` @@ -131,54 +96,20 @@ The tilde (`~`) comparison operator is for patch level ranges when a minor version is specified and major level changes when the minor number is missing. For example, - * `~1.2.3` is equivalent to `>= 1.2.3 < 1.3.0` + * `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0` * `~1` is equivalent to `>= 1, < 2` - * `~2.3` is equivalent to `>= 2.3 < 2.4` - * `~1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` - * `~1.x` is equivalent to `>= 1 < 2` + * `~2.3` is equivalent to `>= 2.3, < 2.4` + * `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` + * `~1.x` is equivalent to `>= 1, < 2` Caret Range Comparisons (Major) -The caret (`^`) comparison operator is for major level changes once a stable -(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts -as the API stability level. This is useful when comparisons of API versions as a -major change is API breaking. For example, +The caret (`^`) comparison operator is for major level changes. This is useful +when comparisons of API versions as a major change is API breaking. For example, * `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` * `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` * `^2.3` is equivalent to `>= 2.3, < 3` * `^2.x` is equivalent to `>= 2.0.0, < 3` - * `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` - * `^0.2` is equivalent to `>=0.2.0 <0.3.0` - * `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` - * `^0.0` is equivalent to `>=0.0.0 <0.1.0` - * `^0` is equivalent to `>=0.0.0 <1.0.0` - -Validation - -In addition to testing a version against a constraint, a version can be validated -against a constraint. When validation fails a slice of errors containing why a -version didn't meet the constraint is returned. For example, - - c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") - if err != nil { - // Handle constraint not being parseable. - } - - v, _ := semver.NewVersion("1.3") - if err != nil { - // Handle version not being parseable. - } - - // Validate a version against a constraint. - a, msgs := c.Validate(v) - // a is false - for _, m := range msgs { - fmt.Println(m) - - // Loops over the errors which would read - // "1.3 is greater than 1.2.3" - // "1.3 is less than 1.4" - } */ package semver diff --git a/vendor/github.com/Masterminds/semver/fuzz.go b/vendor/github.com/Masterminds/semver/fuzz.go deleted file mode 100644 index a242ad70587c..000000000000 --- a/vendor/github.com/Masterminds/semver/fuzz.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build gofuzz - -package semver - -func Fuzz(data []byte) int { - d := string(data) - - // Test NewVersion - _, _ = NewVersion(d) - - // Test StrictNewVersion - _, _ = StrictNewVersion(d) - - // Test NewConstraint - _, _ = NewConstraint(d) - - // The return value should be 0 normally, 1 if the priority in future tests - // should be increased, and -1 if future tests should skip passing in that - // data. We do not have a reason to change priority so 0 is always returned. - // There are example tests that do this. - return 0 -} diff --git a/vendor/github.com/Masterminds/semver/go.mod b/vendor/github.com/Masterminds/semver/go.mod deleted file mode 100644 index 658233c8f012..000000000000 --- a/vendor/github.com/Masterminds/semver/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/Masterminds/semver/v3 - -go 1.12 diff --git a/vendor/github.com/Masterminds/semver/version.go b/vendor/github.com/Masterminds/semver/version.go index 1bb95f2635dc..9d22ea6308d5 100644 --- a/vendor/github.com/Masterminds/semver/version.go +++ b/vendor/github.com/Masterminds/semver/version.go @@ -13,23 +13,13 @@ import ( // The compiled version of the regex created at init() is cached here so it // only needs to be created once. var versionRegex *regexp.Regexp +var validPrereleaseRegex *regexp.Regexp var ( // ErrInvalidSemVer is returned a version is found to be invalid when // being parsed. ErrInvalidSemVer = errors.New("Invalid Semantic Version") - // ErrEmptyString is returned when an empty string is passed in for parsing. - ErrEmptyString = errors.New("Version string empty") - - // ErrInvalidCharacters is returned when invalid characters are found as - // part of a version - ErrInvalidCharacters = errors.New("Invalid characters in version") - - // ErrSegmentStartsZero is returned when a version segment starts with 0. - // This is invalid in SemVer. - ErrSegmentStartsZero = errors.New("Version segment starts with 0") - // ErrInvalidMetadata is returned when the metadata is an invalid format ErrInvalidMetadata = errors.New("Invalid Metadata string") @@ -37,121 +27,30 @@ var ( ErrInvalidPrerelease = errors.New("Invalid Prerelease string") ) -// semVerRegex is the regular expression used to parse a semantic version. -const semVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + +// SemVerRegex is the regular expression used to parse a semantic version. +const SemVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` +// ValidPrerelease is the regular expression which validates +// both prerelease and metadata values. +const ValidPrerelease string = `^([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*)` + // Version represents a single semantic version. type Version struct { - major, minor, patch uint64 + major, minor, patch int64 pre string metadata string original string } func init() { - versionRegex = regexp.MustCompile("^" + semVerRegex + "$") -} - -const num string = "0123456789" -const allowed string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + num - -// StrictNewVersion parses a given version and returns an instance of Version or -// an error if unable to parse the version. Only parses valid semantic versions. -// Performs checking that can find errors within the version. -// If you want to coerce a version, such as 1 or 1.2, and perse that as the 1.x -// releases of semver provided use the NewSemver() function. -func StrictNewVersion(v string) (*Version, error) { - // Parsing here does not use RegEx in order to increase performance and reduce - // allocations. - - if len(v) == 0 { - return nil, ErrEmptyString - } - - // Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build - parts := strings.SplitN(v, ".", 3) - if len(parts) != 3 { - return nil, ErrInvalidSemVer - } - - sv := &Version{ - original: v, - } - - // check for prerelease or build metadata - var extra []string - if strings.ContainsAny(parts[2], "-+") { - // Start with the build metadata first as it needs to be on the right - extra = strings.SplitN(parts[2], "+", 2) - if len(extra) > 1 { - // build metadata found - sv.metadata = extra[1] - parts[2] = extra[0] - } - - extra = strings.SplitN(parts[2], "-", 2) - if len(extra) > 1 { - // prerelease found - sv.pre = extra[1] - parts[2] = extra[0] - } - } - - // Validate the number segments are valid. This includes only having positive - // numbers and no leading 0's. - for _, p := range parts { - if !containsOnly(p, num) { - return nil, ErrInvalidCharacters - } - - if len(p) > 1 && p[0] == '0' { - return nil, ErrSegmentStartsZero - } - } - - // Extract the major, minor, and patch elements onto the returned Version - var err error - sv.major, err = strconv.ParseUint(parts[0], 10, 64) - if err != nil { - return nil, err - } - - sv.minor, err = strconv.ParseUint(parts[1], 10, 64) - if err != nil { - return nil, err - } - - sv.patch, err = strconv.ParseUint(parts[2], 10, 64) - if err != nil { - return nil, err - } - - // No prerelease or build metadata found so returning now as a fastpath. - if sv.pre == "" && sv.metadata == "" { - return sv, nil - } - - if sv.pre != "" { - if err = validatePrerelease(sv.pre); err != nil { - return nil, err - } - } - - if sv.metadata != "" { - if err = validateMetadata(sv.metadata); err != nil { - return nil, err - } - } - - return sv, nil + versionRegex = regexp.MustCompile("^" + SemVerRegex + "$") + validPrereleaseRegex = regexp.MustCompile(ValidPrerelease) } // NewVersion parses a given version and returns an instance of Version or -// an error if unable to parse the version. If the version is SemVer-ish it -// attempts to convert it to SemVer. If you want to validate it was a strict -// semantic version at parse time see StrictNewVersion(). +// an error if unable to parse the version. func NewVersion(v string) (*Version, error) { m := versionRegex.FindStringSubmatch(v) if m == nil { @@ -164,45 +63,33 @@ func NewVersion(v string) (*Version, error) { original: v, } - var err error - sv.major, err = strconv.ParseUint(m[1], 10, 64) + var temp int64 + temp, err := strconv.ParseInt(m[1], 10, 64) if err != nil { return nil, fmt.Errorf("Error parsing version segment: %s", err) } + sv.major = temp if m[2] != "" { - sv.minor, err = strconv.ParseUint(strings.TrimPrefix(m[2], "."), 10, 64) + temp, err = strconv.ParseInt(strings.TrimPrefix(m[2], "."), 10, 64) if err != nil { return nil, fmt.Errorf("Error parsing version segment: %s", err) } + sv.minor = temp } else { sv.minor = 0 } if m[3] != "" { - sv.patch, err = strconv.ParseUint(strings.TrimPrefix(m[3], "."), 10, 64) + temp, err = strconv.ParseInt(strings.TrimPrefix(m[3], "."), 10, 64) if err != nil { return nil, fmt.Errorf("Error parsing version segment: %s", err) } + sv.patch = temp } else { sv.patch = 0 } - // Perform some basic due diligence on the extra parts to ensure they are - // valid. - - if sv.pre != "" { - if err = validatePrerelease(sv.pre); err != nil { - return nil, err - } - } - - if sv.metadata != "" { - if err = validateMetadata(sv.metadata); err != nil { - return nil, err - } - } - return sv, nil } @@ -219,8 +106,8 @@ func MustParse(v string) *Version { // Note, if the original version contained a leading v this version will not. // See the Original() method to retrieve the original value. Semantic Versions // don't contain a leading v per the spec. Instead it's optional on -// implementation. -func (v Version) String() string { +// impelementation. +func (v *Version) String() string { var buf bytes.Buffer fmt.Fprintf(&buf, "%d.%d.%d", v.major, v.minor, v.patch) @@ -240,32 +127,32 @@ func (v *Version) Original() string { } // Major returns the major version. -func (v Version) Major() uint64 { +func (v *Version) Major() int64 { return v.major } // Minor returns the minor version. -func (v Version) Minor() uint64 { +func (v *Version) Minor() int64 { return v.minor } // Patch returns the patch version. -func (v Version) Patch() uint64 { +func (v *Version) Patch() int64 { return v.patch } // Prerelease returns the pre-release version. -func (v Version) Prerelease() string { +func (v *Version) Prerelease() string { return v.pre } // Metadata returns the metadata on the version. -func (v Version) Metadata() string { +func (v *Version) Metadata() string { return v.metadata } // originalVPrefix returns the original 'v' prefix if any. -func (v Version) originalVPrefix() string { +func (v *Version) originalVPrefix() string { // Note, only lowercase v is supported as a prefix by the parser. if v.original != "" && v.original[:1] == "v" { @@ -278,7 +165,7 @@ func (v Version) originalVPrefix() string { // If the current version does not have prerelease/metadata information, // it unsets metadata and prerelease values, increments patch number. // If the current version has any of prerelease or metadata information, -// it unsets both values and keeps current patch value +// it unsets both values and keeps curent patch value func (v Version) IncPatch() Version { vNext := v // according to http://semver.org/#spec-item-9 @@ -330,13 +217,11 @@ func (v Version) IncMajor() Version { } // SetPrerelease defines the prerelease value. -// Value must not include the required 'hyphen' prefix. +// Value must not include the required 'hypen' prefix. func (v Version) SetPrerelease(prerelease string) (Version, error) { vNext := v - if len(prerelease) > 0 { - if err := validatePrerelease(prerelease); err != nil { - return vNext, err - } + if len(prerelease) > 0 && !validPrereleaseRegex.MatchString(prerelease) { + return vNext, ErrInvalidPrerelease } vNext.pre = prerelease vNext.original = v.originalVPrefix() + "" + vNext.String() @@ -347,10 +232,8 @@ func (v Version) SetPrerelease(prerelease string) (Version, error) { // Value must not include the required 'plus' prefix. func (v Version) SetMetadata(metadata string) (Version, error) { vNext := v - if len(metadata) > 0 { - if err := validateMetadata(metadata); err != nil { - return vNext, err - } + if len(metadata) > 0 && !validPrereleaseRegex.MatchString(metadata) { + return vNext, ErrInvalidMetadata } vNext.metadata = metadata vNext.original = v.originalVPrefix() + "" + vNext.String() @@ -378,9 +261,7 @@ func (v *Version) Equal(o *Version) bool { // the version smaller, equal, or larger than the other version. // // Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is -// lower than the version without a prerelease. Compare always takes into account -// prereleases. If you want to work with ranges using typical range syntaxes that -// skip prereleases if the range is not looking for them use constraints. +// lower than the version without a prerelease. func (v *Version) Compare(o *Version) int { // Compare the major, minor, and patch version for differences. If a // difference is found return the comparison. @@ -427,15 +308,16 @@ func (v *Version) UnmarshalJSON(b []byte) error { v.pre = temp.pre v.metadata = temp.metadata v.original = temp.original + temp = nil return nil } // MarshalJSON implements JSON.Marshaler interface. -func (v Version) MarshalJSON() ([]byte, error) { +func (v *Version) MarshalJSON() ([]byte, error) { return json.Marshal(v.String()) } -func compareSegment(v, o uint64) int { +func compareSegment(v, o int64) int { if v < o { return -1 } @@ -512,14 +394,10 @@ func comparePrePart(s, o string) int { } // When comparing strings "99" is greater than "103". To handle - // cases like this we need to detect numbers and compare them. According - // to the semver spec, numbers are always positive. If there is a - at the - // start like -99 this is to be evaluated as an alphanum. numbers always - // have precedence over alphanum. Parsing as Uints because negative numbers - // are ignored. + // cases like this we need to detect numbers and compare them. - oi, n1 := strconv.ParseUint(o, 10, 64) - si, n2 := strconv.ParseUint(s, 10, 64) + oi, n1 := strconv.ParseInt(o, 10, 64) + si, n2 := strconv.ParseInt(s, 10, 64) // The case where both are strings compare the strings if n1 != nil && n2 != nil { @@ -541,43 +419,3 @@ func comparePrePart(s, o string) int { return -1 } - -// Like strings.ContainsAny but does an only instead of any. -func containsOnly(s string, comp string) bool { - return strings.IndexFunc(s, func(r rune) bool { - return !strings.ContainsRune(comp, r) - }) == -1 -} - -// From the spec, "Identifiers MUST comprise only -// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. -// Numeric identifiers MUST NOT include leading zeroes.". These segments can -// be dot separated. -func validatePrerelease(p string) error { - eparts := strings.Split(p, ".") - for _, p := range eparts { - if containsOnly(p, num) { - if len(p) > 1 && p[0] == '0' { - return ErrSegmentStartsZero - } - } else if !containsOnly(p, allowed) { - return ErrInvalidPrerelease - } - } - - return nil -} - -// From the spec, "Build metadata MAY be denoted by -// appending a plus sign and a series of dot separated identifiers immediately -// following the patch or pre-release version. Identifiers MUST comprise only -// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty." -func validateMetadata(m string) error { - eparts := strings.Split(m, ".") - for _, p := range eparts { - if !containsOnly(p, allowed) { - return ErrInvalidMetadata - } - } - return nil -} diff --git a/vendor/github.com/Microsoft/go-winio/.gitignore b/vendor/github.com/Microsoft/go-winio/.gitignore new file mode 100644 index 000000000000..b883f1fdc6d6 --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/.gitignore @@ -0,0 +1 @@ +*.exe diff --git a/vendor/github.com/Microsoft/go-winio/go.mod b/vendor/github.com/Microsoft/go-winio/go.mod index b3846826b40c..50b9d6e2ec60 100644 --- a/vendor/github.com/Microsoft/go-winio/go.mod +++ b/vendor/github.com/Microsoft/go-winio/go.mod @@ -5,5 +5,5 @@ go 1.12 require ( github.com/pkg/errors v0.8.1 github.com/sirupsen/logrus v1.4.1 - golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b + golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 ) diff --git a/vendor/github.com/Microsoft/go-winio/go.sum b/vendor/github.com/Microsoft/go-winio/go.sum index babb4a70df91..209aa8cf4d85 100644 --- a/vendor/github.com/Microsoft/go-winio/go.sum +++ b/vendor/github.com/Microsoft/go-winio/go.sum @@ -14,3 +14,5 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/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/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go b/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go index 3488cc451a2b..726d1c8c1220 100644 --- a/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go +++ b/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go @@ -21,7 +21,7 @@ const ( // 2019 (ltsc2019), and Windows 10 (October 2018 Update). RS5 = 17763 - // V19H1 (version 1903) corresponds to Windows Sever 1903 (semi-annual + // V19H1 (version 1903) corresponds to Windows Server 1903 (semi-annual // channel). V19H1 = 18362 ) diff --git a/vendor/github.com/Shopify/sarama/.gitignore b/vendor/github.com/Shopify/sarama/.gitignore new file mode 100644 index 000000000000..6e362e4f213f --- /dev/null +++ b/vendor/github.com/Shopify/sarama/.gitignore @@ -0,0 +1,27 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so +*.test + +# Folders +_obj +_test +.vagrant + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe + +coverage.txt +profile.out diff --git a/vendor/github.com/Shopify/sarama/.travis.yml b/vendor/github.com/Shopify/sarama/.travis.yml new file mode 100644 index 000000000000..d60942369a37 --- /dev/null +++ b/vendor/github.com/Shopify/sarama/.travis.yml @@ -0,0 +1,38 @@ +dist: xenial +language: go +go: +- 1.11.x +- 1.12.x +- 1.13.x + +env: + global: + - KAFKA_PEERS=localhost:9091,localhost:9092,localhost:9093,localhost:9094,localhost:9095 + - TOXIPROXY_ADDR=http://localhost:8474 + - KAFKA_INSTALL_ROOT=/home/travis/kafka + - KAFKA_HOSTNAME=localhost + - DEBUG=true + matrix: + - KAFKA_VERSION=2.2.1 KAFKA_SCALA_VERSION=2.12 + - KAFKA_VERSION=2.3.0 KAFKA_SCALA_VERSION=2.12 + +before_install: +- export REPOSITORY_ROOT=${TRAVIS_BUILD_DIR} +- vagrant/install_cluster.sh +- vagrant/boot_cluster.sh +- vagrant/create_topics.sh +- vagrant/run_java_producer.sh + +install: make install_dependencies + +script: +- make test +- make vet +- make errcheck +- if [[ "$TRAVIS_GO_VERSION" == 1.13* ]]; then make fmt; fi + +after_success: +- go tool cover -func coverage.txt +- bash <(curl -s https://codecov.io/bash) + +after_script: vagrant/halt_cluster.sh diff --git a/vendor/github.com/Shopify/sarama/dev.yml b/vendor/github.com/Shopify/sarama/dev.yml new file mode 100644 index 000000000000..481f68144bb8 --- /dev/null +++ b/vendor/github.com/Shopify/sarama/dev.yml @@ -0,0 +1,10 @@ +name: sarama + +up: + - go: + version: '1.13.1' + +commands: + test: + run: make test + desc: 'run unit tests' diff --git a/vendor/github.com/aerospike/aerospike-client-go/.build.yml b/vendor/github.com/aerospike/aerospike-client-go/.build.yml new file mode 100644 index 000000000000..7099c7c60324 --- /dev/null +++ b/vendor/github.com/aerospike/aerospike-client-go/.build.yml @@ -0,0 +1,16 @@ +name: aerospike-client-go +dir: src/github.com/aerospike/aerospike-client-go + +container: + - base: + - docker.qe.aerospike.com/build/aerospike-client-go:golang-1.5 + - docker.qe.aerospike.com/build/aerospike-client-go:golang-1.6 + +build: + - name: build + script: + - go get -v github.com/aerospike/aerospike-client-go + - go build -v -x github.com/aerospike/aerospike-client-go + - go install -v -x github.com/aerospike/aerospike-client-go/tools/cli + - go install -v -x github.com/aerospike/aerospike-client-go/tools/benchmark + - go install -v -x github.com/aerospike/aerospike-client-go/tools/asinfo diff --git a/vendor/github.com/aerospike/aerospike-client-go/.gitignore b/vendor/github.com/aerospike/aerospike-client-go/.gitignore new file mode 100644 index 000000000000..b05c4b15f21c --- /dev/null +++ b/vendor/github.com/aerospike/aerospike-client-go/.gitignore @@ -0,0 +1,9 @@ +*.prof +*.test +*.coverprofile* +tools/benchmark/benchmark +tools/asinfo/asinfo +tools/debug/ +tmp/ +.DS_Store +TODO \ No newline at end of file diff --git a/vendor/github.com/aerospike/aerospike-client-go/.travis.yml b/vendor/github.com/aerospike/aerospike-client-go/.travis.yml new file mode 100644 index 000000000000..9f7df8936679 --- /dev/null +++ b/vendor/github.com/aerospike/aerospike-client-go/.travis.yml @@ -0,0 +1,65 @@ +language: go +go: +# - 1.4 +- 1.5 +- 1.6 +- 1.7 +- 1.8 +- tip +matrix: + allow_failures: + - go: tip +install: +- ifconfig +- if [ -d "$HOME/gopath/src/github.com/citrusleaf" ]; then mv $HOME/gopath/src/github.com/citrusleaf + $HOME/gopath/src/github.com/aerospike; fi +- export PATH=$PATH:$HOME/gopath/bin +- go get github.com/onsi/ginkgo/ginkgo +- go get github.com/onsi/gomega +- go get . +- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; + fi +- wget -O aerospike-server.tgz http://aerospike.com/download/server/latest/artifact/tgz +- tar xvzf aerospike-server.tgz +- cp -f .travis/aerospike.conf ./aerospike-server/share/etc +- cd aerospike-server +- mkdir instance1 +- mkdir instance2 +- ./bin/aerospike init --home instance1 --instance 1 --service-port 3000 +- ./bin/aerospike init --home instance2 --instance 2 --service-port 3010 +- cd instance1 +- sudo ./bin/aerospike start +- ../../.travis/wait_for_node.sh var/log/aerospike.log +- cd ../.. +- pwd +script: +- ginkgo -cover -race -r -keepGoing -succinct -randomizeSuites internal/lua +- ginkgo -cover -race -r -keepGoing -succinct -randomizeSuites types +- ginkgo -cover -race -r -keepGoing -succinct -randomizeSuites pkg +- find tools -name "*.go" -type f -print0 | xargs -0 -n1 go build +- find examples -name "*.go" -type f -print0 | xargs -0 -n1 go build +- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 +- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -- -use-replicas +- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -tags="as_performance" +- cd aerospike-server/instance1 +- sudo ./bin/aerospike stop +- cat /dev/null > var/log/aerospike.log +- sudo ./bin/aerospike start +- ../../.travis/wait_for_node.sh var/log/aerospike.log +- cd ../instance2 +- sudo ./bin/aerospike start +- ../../.travis/wait_for_node.sh var/log/aerospike.log +- cd ../.. +- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 +- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -- -use-replicas +- ginkgo -race -keepGoing -succinct -randomizeSuites -slowSpecThreshold=15 -tags="as_performance" +- .travis/proxy_check.sh +notifications: + hipchat: + rooms: + secure: mGFpOr8JWxK0bYj6wK3ur5+qtsfK+Im1njfPgoQ2b/Sudlii/mr2QiHyQRHtstw7tr79nyoMYgQ1lc53pTxUNAVSI/PkTJTBaDE4ZkyUG5+UW8NgMsC6FYhRfgu0xq+SBNn5a6KbrL8puQq0FH6fjEDYC00QqmN5L/967WCxF8g= + email: + - qe-notices@aerospike.com + - qe-notices-clients@aerospike.com + slack: + secure: FwRNnmQZLVD3ygwu66ujNTsy1rHKFAV01wZJCad+L0r5I54lxFWZxsO0JtRbhFyZ0yb4fhls4dPpczTqQrtlRgUzWW55u2i5T/bkTWxOik8QPJW35n9EvSOMYgiTQs1PQeSYwRmiqn0aDd8Fu1RAvB71nLKeyccYbVMHGyhpAq8= diff --git a/vendor/github.com/aerospike/aerospike-client-go/pkg/bcrypt/.gitignore b/vendor/github.com/aerospike/aerospike-client-go/pkg/bcrypt/.gitignore new file mode 100644 index 000000000000..c1e1c062b9f2 --- /dev/null +++ b/vendor/github.com/aerospike/aerospike-client-go/pkg/bcrypt/.gitignore @@ -0,0 +1,5 @@ +6.out +*.6 +_obj +_test +_testmain.go diff --git a/vendor/github.com/akavel/rsrc/AUTHORS b/vendor/github.com/akavel/rsrc/AUTHORS new file mode 100644 index 000000000000..c57b056cddab --- /dev/null +++ b/vendor/github.com/akavel/rsrc/AUTHORS @@ -0,0 +1,3 @@ +Mateusz Czapliński +Quentin Renard +shnmng diff --git a/vendor/github.com/andrewkroh/sys/AUTHORS b/vendor/github.com/andrewkroh/sys/AUTHORS new file mode 100644 index 000000000000..15167cd746c5 --- /dev/null +++ b/vendor/github.com/andrewkroh/sys/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/github.com/andrewkroh/sys/CONTRIBUTORS b/vendor/github.com/andrewkroh/sys/CONTRIBUTORS new file mode 100644 index 000000000000..1c4577e96806 --- /dev/null +++ b/vendor/github.com/andrewkroh/sys/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/github.com/antlr/antlr4/LICENSE.txt b/vendor/github.com/antlr/antlr4/LICENSE.txt deleted file mode 100644 index 2042d1bda6c9..000000000000 --- a/vendor/github.com/antlr/antlr4/LICENSE.txt +++ /dev/null @@ -1,52 +0,0 @@ -[The "BSD 3-clause license"] -Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -===== - -MIT License for codepointat.js from https://git.io/codepointat -MIT License for fromcodepoint.js from https://git.io/vDW1m - -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn.go deleted file mode 100644 index 1592212e1464..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -var ATNInvalidAltNumber int - -type ATN struct { - // DecisionToState is the decision points for all rules, subrules, optional - // blocks, ()+, ()*, etc. Used to build DFA predictors for them. - DecisionToState []DecisionState - - // grammarType is the ATN type and is used for deserializing ATNs from strings. - grammarType int - - // lexerActions is referenced by action transitions in the ATN for lexer ATNs. - lexerActions []LexerAction - - // maxTokenType is the maximum value for any symbol recognized by a transition in the ATN. - maxTokenType int - - modeNameToStartState map[string]*TokensStartState - - modeToStartState []*TokensStartState - - // ruleToStartState maps from rule index to starting state number. - ruleToStartState []*RuleStartState - - // ruleToStopState maps from rule index to stop state number. - ruleToStopState []*RuleStopState - - // ruleToTokenType maps the rule index to the resulting token type for lexer - // ATNs. For parser ATNs, it maps the rule index to the generated bypass token - // type if ATNDeserializationOptions.isGenerateRuleBypassTransitions was - // specified, and otherwise is nil. - ruleToTokenType []int - - states []ATNState -} - -func NewATN(grammarType int, maxTokenType int) *ATN { - return &ATN{ - grammarType: grammarType, - maxTokenType: maxTokenType, - modeNameToStartState: make(map[string]*TokensStartState), - } -} - -// NextTokensInContext computes the set of valid tokens that can occur starting -// in state s. If ctx is nil, the set of tokens will not include what can follow -// the rule surrounding s. In other words, the set will be restricted to tokens -// reachable staying within the rule of s. -func (a *ATN) NextTokensInContext(s ATNState, ctx RuleContext) *IntervalSet { - return NewLL1Analyzer(a).Look(s, nil, ctx) -} - -// NextTokensNoContext computes the set of valid tokens that can occur starting -// in s and staying in same rule. Token.EPSILON is in set if we reach end of -// rule. -func (a *ATN) NextTokensNoContext(s ATNState) *IntervalSet { - if s.GetNextTokenWithinRule() != nil { - return s.GetNextTokenWithinRule() - } - - s.SetNextTokenWithinRule(a.NextTokensInContext(s, nil)) - s.GetNextTokenWithinRule().readOnly = true - - return s.GetNextTokenWithinRule() -} - -func (a *ATN) NextTokens(s ATNState, ctx RuleContext) *IntervalSet { - if ctx == nil { - return a.NextTokensNoContext(s) - } - - return a.NextTokensInContext(s, ctx) -} - -func (a *ATN) addState(state ATNState) { - if state != nil { - state.SetATN(a) - state.SetStateNumber(len(a.states)) - } - - a.states = append(a.states, state) -} - -func (a *ATN) removeState(state ATNState) { - a.states[state.GetStateNumber()] = nil // Just free the memory; don't shift states in the slice -} - -func (a *ATN) defineDecisionState(s DecisionState) int { - a.DecisionToState = append(a.DecisionToState, s) - s.setDecision(len(a.DecisionToState) - 1) - - return s.getDecision() -} - -func (a *ATN) getDecisionState(decision int) DecisionState { - if len(a.DecisionToState) == 0 { - return nil - } - - return a.DecisionToState[decision] -} - -// getExpectedTokens computes the set of input symbols which could follow ATN -// state number stateNumber in the specified full parse context ctx and returns -// the set of potentially valid input symbols which could follow the specified -// state in the specified context. This method considers the complete parser -// context, but does not evaluate semantic predicates (i.e. all predicates -// encountered during the calculation are assumed true). If a path in the ATN -// exists from the starting state to the RuleStopState of the outermost context -// without Matching any symbols, Token.EOF is added to the returned set. -// -// A nil ctx defaults to ParserRuleContext.EMPTY. -// -// It panics if the ATN does not contain state stateNumber. -func (a *ATN) getExpectedTokens(stateNumber int, ctx RuleContext) *IntervalSet { - if stateNumber < 0 || stateNumber >= len(a.states) { - panic("Invalid state number.") - } - - s := a.states[stateNumber] - following := a.NextTokens(s, nil) - - if !following.contains(TokenEpsilon) { - return following - } - - expected := NewIntervalSet() - - expected.addSet(following) - expected.removeOne(TokenEpsilon) - - for ctx != nil && ctx.GetInvokingState() >= 0 && following.contains(TokenEpsilon) { - invokingState := a.states[ctx.GetInvokingState()] - rt := invokingState.GetTransitions()[0] - - following = a.NextTokens(rt.(*RuleTransition).followState, nil) - expected.addSet(following) - expected.removeOne(TokenEpsilon) - ctx = ctx.GetParent().(RuleContext) - } - - if following.contains(TokenEpsilon) { - expected.addOne(TokenEOF) - } - - return expected -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_config.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_config.go deleted file mode 100644 index 0535d5246c50..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_config.go +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" -) - -type comparable interface { - equals(other interface{}) bool -} - -// ATNConfig is a tuple: (ATN state, predicted alt, syntactic, semantic -// context). The syntactic context is a graph-structured stack node whose -// path(s) to the root is the rule invocation(s) chain used to arrive at the -// state. The semantic context is the tree of semantic predicates encountered -// before reaching an ATN state. -type ATNConfig interface { - comparable - - hash() int - - GetState() ATNState - GetAlt() int - GetSemanticContext() SemanticContext - - GetContext() PredictionContext - SetContext(PredictionContext) - - GetReachesIntoOuterContext() int - SetReachesIntoOuterContext(int) - - String() string - - getPrecedenceFilterSuppressed() bool - setPrecedenceFilterSuppressed(bool) -} - -type BaseATNConfig struct { - precedenceFilterSuppressed bool - state ATNState - alt int - context PredictionContext - semanticContext SemanticContext - reachesIntoOuterContext int -} - -func NewBaseATNConfig7(old *BaseATNConfig) *BaseATNConfig { // TODO: Dup - return &BaseATNConfig{ - state: old.state, - alt: old.alt, - context: old.context, - semanticContext: old.semanticContext, - reachesIntoOuterContext: old.reachesIntoOuterContext, - } -} - -func NewBaseATNConfig6(state ATNState, alt int, context PredictionContext) *BaseATNConfig { - return NewBaseATNConfig5(state, alt, context, SemanticContextNone) -} - -func NewBaseATNConfig5(state ATNState, alt int, context PredictionContext, semanticContext SemanticContext) *BaseATNConfig { - if semanticContext == nil { - panic("semanticContext cannot be nil") // TODO: Necessary? - } - - return &BaseATNConfig{state: state, alt: alt, context: context, semanticContext: semanticContext} -} - -func NewBaseATNConfig4(c ATNConfig, state ATNState) *BaseATNConfig { - return NewBaseATNConfig(c, state, c.GetContext(), c.GetSemanticContext()) -} - -func NewBaseATNConfig3(c ATNConfig, state ATNState, semanticContext SemanticContext) *BaseATNConfig { - return NewBaseATNConfig(c, state, c.GetContext(), semanticContext) -} - -func NewBaseATNConfig2(c ATNConfig, semanticContext SemanticContext) *BaseATNConfig { - return NewBaseATNConfig(c, c.GetState(), c.GetContext(), semanticContext) -} - -func NewBaseATNConfig1(c ATNConfig, state ATNState, context PredictionContext) *BaseATNConfig { - return NewBaseATNConfig(c, state, context, c.GetSemanticContext()) -} - -func NewBaseATNConfig(c ATNConfig, state ATNState, context PredictionContext, semanticContext SemanticContext) *BaseATNConfig { - if semanticContext == nil { - panic("semanticContext cannot be nil") - } - - return &BaseATNConfig{ - state: state, - alt: c.GetAlt(), - context: context, - semanticContext: semanticContext, - reachesIntoOuterContext: c.GetReachesIntoOuterContext(), - precedenceFilterSuppressed: c.getPrecedenceFilterSuppressed(), - } -} - -func (b *BaseATNConfig) getPrecedenceFilterSuppressed() bool { - return b.precedenceFilterSuppressed -} - -func (b *BaseATNConfig) setPrecedenceFilterSuppressed(v bool) { - b.precedenceFilterSuppressed = v -} - -func (b *BaseATNConfig) GetState() ATNState { - return b.state -} - -func (b *BaseATNConfig) GetAlt() int { - return b.alt -} - -func (b *BaseATNConfig) SetContext(v PredictionContext) { - b.context = v -} -func (b *BaseATNConfig) GetContext() PredictionContext { - return b.context -} - -func (b *BaseATNConfig) GetSemanticContext() SemanticContext { - return b.semanticContext -} - -func (b *BaseATNConfig) GetReachesIntoOuterContext() int { - return b.reachesIntoOuterContext -} - -func (b *BaseATNConfig) SetReachesIntoOuterContext(v int) { - b.reachesIntoOuterContext = v -} - -// An ATN configuration is equal to another if both have the same state, they -// predict the same alternative, and syntactic/semantic contexts are the same. -func (b *BaseATNConfig) equals(o interface{}) bool { - if b == o { - return true - } - - var other, ok = o.(*BaseATNConfig) - - if !ok { - return false - } - - var equal bool - - if b.context == nil { - equal = other.context == nil - } else { - equal = b.context.equals(other.context) - } - - var ( - nums = b.state.GetStateNumber() == other.state.GetStateNumber() - alts = b.alt == other.alt - cons = b.semanticContext.equals(other.semanticContext) - sups = b.precedenceFilterSuppressed == other.precedenceFilterSuppressed - ) - - return nums && alts && cons && sups && equal -} - -func (b *BaseATNConfig) hash() int { - var c int - if b.context != nil { - c = b.context.hash() - } - - h := murmurInit(7) - h = murmurUpdate(h, b.state.GetStateNumber()) - h = murmurUpdate(h, b.alt) - h = murmurUpdate(h, c) - h = murmurUpdate(h, b.semanticContext.hash()) - return murmurFinish(h, 4) -} - -func (b *BaseATNConfig) String() string { - var s1, s2, s3 string - - if b.context != nil { - s1 = ",[" + fmt.Sprint(b.context) + "]" - } - - if b.semanticContext != SemanticContextNone { - s2 = "," + fmt.Sprint(b.semanticContext) - } - - if b.reachesIntoOuterContext > 0 { - s3 = ",up=" + fmt.Sprint(b.reachesIntoOuterContext) - } - - return fmt.Sprintf("(%v,%v%v%v%v)", b.state, b.alt, s1, s2, s3) -} - -type LexerATNConfig struct { - *BaseATNConfig - lexerActionExecutor *LexerActionExecutor - passedThroughNonGreedyDecision bool -} - -func NewLexerATNConfig6(state ATNState, alt int, context PredictionContext) *LexerATNConfig { - return &LexerATNConfig{BaseATNConfig: NewBaseATNConfig5(state, alt, context, SemanticContextNone)} -} - -func NewLexerATNConfig5(state ATNState, alt int, context PredictionContext, lexerActionExecutor *LexerActionExecutor) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig5(state, alt, context, SemanticContextNone), - lexerActionExecutor: lexerActionExecutor, - } -} - -func NewLexerATNConfig4(c *LexerATNConfig, state ATNState) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig(c, state, c.GetContext(), c.GetSemanticContext()), - lexerActionExecutor: c.lexerActionExecutor, - passedThroughNonGreedyDecision: checkNonGreedyDecision(c, state), - } -} - -func NewLexerATNConfig3(c *LexerATNConfig, state ATNState, lexerActionExecutor *LexerActionExecutor) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig(c, state, c.GetContext(), c.GetSemanticContext()), - lexerActionExecutor: lexerActionExecutor, - passedThroughNonGreedyDecision: checkNonGreedyDecision(c, state), - } -} - -func NewLexerATNConfig2(c *LexerATNConfig, state ATNState, context PredictionContext) *LexerATNConfig { - return &LexerATNConfig{ - BaseATNConfig: NewBaseATNConfig(c, state, context, c.GetSemanticContext()), - lexerActionExecutor: c.lexerActionExecutor, - passedThroughNonGreedyDecision: checkNonGreedyDecision(c, state), - } -} - -func NewLexerATNConfig1(state ATNState, alt int, context PredictionContext) *LexerATNConfig { - return &LexerATNConfig{BaseATNConfig: NewBaseATNConfig5(state, alt, context, SemanticContextNone)} -} - -func (l *LexerATNConfig) hash() int { - var f int - if l.passedThroughNonGreedyDecision { - f = 1 - } else { - f = 0 - } - h := murmurInit(7) - h = murmurUpdate(h, l.state.hash()) - h = murmurUpdate(h, l.alt) - h = murmurUpdate(h, l.context.hash()) - h = murmurUpdate(h, l.semanticContext.hash()) - h = murmurUpdate(h, f) - h = murmurUpdate(h, l.lexerActionExecutor.hash()) - h = murmurFinish(h, 6) - return h -} - -func (l *LexerATNConfig) equals(other interface{}) bool { - var othert, ok = other.(*LexerATNConfig) - - if l == other { - return true - } else if !ok { - return false - } else if l.passedThroughNonGreedyDecision != othert.passedThroughNonGreedyDecision { - return false - } - - var b bool - - if l.lexerActionExecutor != nil { - b = !l.lexerActionExecutor.equals(othert.lexerActionExecutor) - } else { - b = othert.lexerActionExecutor != nil - } - - if b { - return false - } - - return l.BaseATNConfig.equals(othert.BaseATNConfig) -} - - -func checkNonGreedyDecision(source *LexerATNConfig, target ATNState) bool { - var ds, ok = target.(DecisionState) - - return source.passedThroughNonGreedyDecision || (ok && ds.getNonGreedy()) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_config_set.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_config_set.go deleted file mode 100644 index d9f74755fa72..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_config_set.go +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import "fmt" - -type ATNConfigSet interface { - hash() int - Add(ATNConfig, *DoubleDict) bool - AddAll([]ATNConfig) bool - - GetStates() *Set - GetPredicates() []SemanticContext - GetItems() []ATNConfig - - OptimizeConfigs(interpreter *BaseATNSimulator) - - Equals(other interface{}) bool - - Length() int - IsEmpty() bool - Contains(ATNConfig) bool - ContainsFast(ATNConfig) bool - Clear() - String() string - - HasSemanticContext() bool - SetHasSemanticContext(v bool) - - ReadOnly() bool - SetReadOnly(bool) - - GetConflictingAlts() *BitSet - SetConflictingAlts(*BitSet) - - FullContext() bool - - GetUniqueAlt() int - SetUniqueAlt(int) - - GetDipsIntoOuterContext() bool - SetDipsIntoOuterContext(bool) -} - -// BaseATNConfigSet is a specialized set of ATNConfig that tracks information -// about its elements and can combine similar configurations using a -// graph-structured stack. -type BaseATNConfigSet struct { - cachedHash int - - // configLookup is used to determine whether two BaseATNConfigSets are equal. We - // need all configurations with the same (s, i, _, semctx) to be equal. A key - // effectively doubles the number of objects associated with ATNConfigs. All - // keys are hashed by (s, i, _, pi), not including the context. Wiped out when - // read-only because a set becomes a DFA state. - configLookup *Set - - // configs is the added elements. - configs []ATNConfig - - // TODO: These fields make me pretty uncomfortable, but it is nice to pack up - // info together because it saves recomputation. Can we track conflicts as they - // are added to save scanning configs later? - conflictingAlts *BitSet - - // dipsIntoOuterContext is used by parsers and lexers. In a lexer, it indicates - // we hit a pred while computing a closure operation. Do not make a DFA state - // from the BaseATNConfigSet in this case. TODO: How is this used by parsers? - dipsIntoOuterContext bool - - // fullCtx is whether it is part of a full context LL prediction. Used to - // determine how to merge $. It is a wildcard with SLL, but not for an LL - // context merge. - fullCtx bool - - // Used in parser and lexer. In lexer, it indicates we hit a pred - // while computing a closure operation. Don't make a DFA state from a. - hasSemanticContext bool - - // readOnly is whether it is read-only. Do not - // allow any code to manipulate the set if true because DFA states will point at - // sets and those must not change. It not protect other fields; conflictingAlts - // in particular, which is assigned after readOnly. - readOnly bool - - // TODO: These fields make me pretty uncomfortable, but it is nice to pack up - // info together because it saves recomputation. Can we track conflicts as they - // are added to save scanning configs later? - uniqueAlt int -} - -func NewBaseATNConfigSet(fullCtx bool) *BaseATNConfigSet { - return &BaseATNConfigSet{ - cachedHash: -1, - configLookup: NewSet(nil, equalATNConfigs), - fullCtx: fullCtx, - } -} - -// Add merges contexts with existing configs for (s, i, pi, _), where s is the -// ATNConfig.state, i is the ATNConfig.alt, and pi is the -// ATNConfig.semanticContext. We use (s,i,pi) as the key. Updates -// dipsIntoOuterContext and hasSemanticContext when necessary. -func (b *BaseATNConfigSet) Add(config ATNConfig, mergeCache *DoubleDict) bool { - if b.readOnly { - panic("set is read-only") - } - - if config.GetSemanticContext() != SemanticContextNone { - b.hasSemanticContext = true - } - - if config.GetReachesIntoOuterContext() > 0 { - b.dipsIntoOuterContext = true - } - - existing := b.configLookup.add(config).(ATNConfig) - - if existing == config { - b.cachedHash = -1 - b.configs = append(b.configs, config) // Track order here - - return true - } - - // Merge a previous (s, i, pi, _) with it and save the result - rootIsWildcard := !b.fullCtx - merged := merge(existing.GetContext(), config.GetContext(), rootIsWildcard, mergeCache) - - // No need to check for existing.context because config.context is in the cache, - // since the only way to create new graphs is the "call rule" and here. We cache - // at both places. - existing.SetReachesIntoOuterContext(intMax(existing.GetReachesIntoOuterContext(), config.GetReachesIntoOuterContext())) - - // Preserve the precedence filter suppression during the merge - if config.getPrecedenceFilterSuppressed() { - existing.setPrecedenceFilterSuppressed(true) - } - - // Replace the context because there is no need to do alt mapping - existing.SetContext(merged) - - return true -} - -func (b *BaseATNConfigSet) GetStates() *Set { - states := NewSet(nil, nil) - - for i := 0; i < len(b.configs); i++ { - states.add(b.configs[i].GetState()) - } - - return states -} - -func (b *BaseATNConfigSet) HasSemanticContext() bool { - return b.hasSemanticContext -} - -func (b *BaseATNConfigSet) SetHasSemanticContext(v bool) { - b.hasSemanticContext = v -} - -func (b *BaseATNConfigSet) GetPredicates() []SemanticContext { - preds := make([]SemanticContext, 0) - - for i := 0; i < len(b.configs); i++ { - c := b.configs[i].GetSemanticContext() - - if c != SemanticContextNone { - preds = append(preds, c) - } - } - - return preds -} - -func (b *BaseATNConfigSet) GetItems() []ATNConfig { - return b.configs -} - -func (b *BaseATNConfigSet) OptimizeConfigs(interpreter *BaseATNSimulator) { - if b.readOnly { - panic("set is read-only") - } - - if b.configLookup.length() == 0 { - return - } - - for i := 0; i < len(b.configs); i++ { - config := b.configs[i] - - config.SetContext(interpreter.getCachedContext(config.GetContext())) - } -} - -func (b *BaseATNConfigSet) AddAll(coll []ATNConfig) bool { - for i := 0; i < len(coll); i++ { - b.Add(coll[i], nil) - } - - return false -} - -func (b *BaseATNConfigSet) Equals(other interface{}) bool { - if b == other { - return true - } else if _, ok := other.(*BaseATNConfigSet); !ok { - return false - } - - other2 := other.(*BaseATNConfigSet) - - return b.configs != nil && - // TODO: b.configs.equals(other2.configs) && // TODO: Is b necessary? - b.fullCtx == other2.fullCtx && - b.uniqueAlt == other2.uniqueAlt && - b.conflictingAlts == other2.conflictingAlts && - b.hasSemanticContext == other2.hasSemanticContext && - b.dipsIntoOuterContext == other2.dipsIntoOuterContext -} - -func (b *BaseATNConfigSet) hash() int { - if b.readOnly { - if b.cachedHash == -1 { - b.cachedHash = b.hashCodeConfigs() - } - - return b.cachedHash - } - - return b.hashCodeConfigs() -} - -func (b *BaseATNConfigSet) hashCodeConfigs() int { - h := murmurInit(1) - for _, c := range b.configs { - if c != nil { - h = murmurUpdate(h, c.hash()) - } - } - return murmurFinish(h, len(b.configs)) -} - -func (b *BaseATNConfigSet) Length() int { - return len(b.configs) -} - -func (b *BaseATNConfigSet) IsEmpty() bool { - return len(b.configs) == 0 -} - -func (b *BaseATNConfigSet) Contains(item ATNConfig) bool { - if b.configLookup == nil { - panic("not implemented for read-only sets") - } - - return b.configLookup.contains(item) -} - -func (b *BaseATNConfigSet) ContainsFast(item ATNConfig) bool { - if b.configLookup == nil { - panic("not implemented for read-only sets") - } - - return b.configLookup.contains(item) // TODO: containsFast is not implemented for Set -} - -func (b *BaseATNConfigSet) Clear() { - if b.readOnly { - panic("set is read-only") - } - - b.configs = make([]ATNConfig, 0) - b.cachedHash = -1 - b.configLookup = NewSet(nil, equalATNConfigs) -} - -func (b *BaseATNConfigSet) FullContext() bool { - return b.fullCtx -} - -func (b *BaseATNConfigSet) GetDipsIntoOuterContext() bool { - return b.dipsIntoOuterContext -} - -func (b *BaseATNConfigSet) SetDipsIntoOuterContext(v bool) { - b.dipsIntoOuterContext = v -} - -func (b *BaseATNConfigSet) GetUniqueAlt() int { - return b.uniqueAlt -} - -func (b *BaseATNConfigSet) SetUniqueAlt(v int) { - b.uniqueAlt = v -} - -func (b *BaseATNConfigSet) GetConflictingAlts() *BitSet { - return b.conflictingAlts -} - -func (b *BaseATNConfigSet) SetConflictingAlts(v *BitSet) { - b.conflictingAlts = v -} - -func (b *BaseATNConfigSet) ReadOnly() bool { - return b.readOnly -} - -func (b *BaseATNConfigSet) SetReadOnly(readOnly bool) { - b.readOnly = readOnly - - if readOnly { - b.configLookup = nil // Read only, so no need for the lookup cache - } -} - -func (b *BaseATNConfigSet) String() string { - s := "[" - - for i, c := range b.configs { - s += c.String() - - if i != len(b.configs)-1 { - s += ", " - } - } - - s += "]" - - if b.hasSemanticContext { - s += ",hasSemanticContext=" + fmt.Sprint(b.hasSemanticContext) - } - - if b.uniqueAlt != ATNInvalidAltNumber { - s += ",uniqueAlt=" + fmt.Sprint(b.uniqueAlt) - } - - if b.conflictingAlts != nil { - s += ",conflictingAlts=" + b.conflictingAlts.String() - } - - if b.dipsIntoOuterContext { - s += ",dipsIntoOuterContext" - } - - return s -} - -type OrderedATNConfigSet struct { - *BaseATNConfigSet -} - -func NewOrderedATNConfigSet() *OrderedATNConfigSet { - b := NewBaseATNConfigSet(false) - - b.configLookup = NewSet(nil, nil) - - return &OrderedATNConfigSet{BaseATNConfigSet: b} -} - -func equalATNConfigs(a, b interface{}) bool { - if a == nil || b == nil { - return false - } - - if a == b { - return true - } - - var ai, ok = a.(ATNConfig) - var bi, ok1 = b.(ATNConfig) - - if !ok || !ok1 { - return false - } - - nums := ai.GetState().GetStateNumber() == bi.GetState().GetStateNumber() - alts := ai.GetAlt() == bi.GetAlt() - cons := ai.GetSemanticContext().equals(bi.GetSemanticContext()) - - return nums && alts && cons -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_deserialization_options.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_deserialization_options.go deleted file mode 100644 index 18b89efafb23..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_deserialization_options.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -var ATNDeserializationOptionsdefaultOptions = &ATNDeserializationOptions{true, false, false} - -type ATNDeserializationOptions struct { - readOnly bool - verifyATN bool - generateRuleBypassTransitions bool -} - -func NewATNDeserializationOptions(CopyFrom *ATNDeserializationOptions) *ATNDeserializationOptions { - o := new(ATNDeserializationOptions) - - if CopyFrom != nil { - o.readOnly = CopyFrom.readOnly - o.verifyATN = CopyFrom.verifyATN - o.generateRuleBypassTransitions = CopyFrom.generateRuleBypassTransitions - } - - return o -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_deserializer.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_deserializer.go deleted file mode 100644 index 884d39cf7cd3..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_deserializer.go +++ /dev/null @@ -1,828 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "encoding/hex" - "fmt" - "strconv" - "strings" - "unicode/utf16" -) - -// This is the earliest supported serialized UUID. -// stick to serialized version for now, we don't need a UUID instance -var BaseSerializedUUID = "AADB8D7E-AEEF-4415-AD2B-8204D6CF042E" -var AddedUnicodeSMP = "59627784-3BE5-417A-B9EB-8131A7286089" - -// This list contains all of the currently supported UUIDs, ordered by when -// the feature first appeared in this branch. -var SupportedUUIDs = []string{BaseSerializedUUID, AddedUnicodeSMP} - -var SerializedVersion = 3 - -// This is the current serialized UUID. -var SerializedUUID = AddedUnicodeSMP - -type LoopEndStateIntPair struct { - item0 *LoopEndState - item1 int -} - -type BlockStartStateIntPair struct { - item0 BlockStartState - item1 int -} - -type ATNDeserializer struct { - deserializationOptions *ATNDeserializationOptions - data []rune - pos int - uuid string -} - -func NewATNDeserializer(options *ATNDeserializationOptions) *ATNDeserializer { - if options == nil { - options = ATNDeserializationOptionsdefaultOptions - } - - return &ATNDeserializer{deserializationOptions: options} -} - -func stringInSlice(a string, list []string) int { - for i, b := range list { - if b == a { - return i - } - } - - return -1 -} - -// isFeatureSupported determines if a particular serialized representation of an -// ATN supports a particular feature, identified by the UUID used for -// serializing the ATN at the time the feature was first introduced. Feature is -// the UUID marking the first time the feature was supported in the serialized -// ATN. ActualUuid is the UUID of the actual serialized ATN which is currently -// being deserialized. It returns true if actualUuid represents a serialized ATN -// at or after the feature identified by feature was introduced, and otherwise -// false. -func (a *ATNDeserializer) isFeatureSupported(feature, actualUUID string) bool { - idx1 := stringInSlice(feature, SupportedUUIDs) - - if idx1 < 0 { - return false - } - - idx2 := stringInSlice(actualUUID, SupportedUUIDs) - - return idx2 >= idx1 -} - -func (a *ATNDeserializer) DeserializeFromUInt16(data []uint16) *ATN { - a.reset(utf16.Decode(data)) - a.checkVersion() - a.checkUUID() - - atn := a.readATN() - - a.readStates(atn) - a.readRules(atn) - a.readModes(atn) - - sets := make([]*IntervalSet, 0) - - // First, deserialize sets with 16-bit arguments <= U+FFFF. - sets = a.readSets(atn, sets, a.readInt) - // Next, if the ATN was serialized with the Unicode SMP feature, - // deserialize sets with 32-bit arguments <= U+10FFFF. - if (a.isFeatureSupported(AddedUnicodeSMP, a.uuid)) { - sets = a.readSets(atn, sets, a.readInt32) - } - - a.readEdges(atn, sets) - a.readDecisions(atn) - a.readLexerActions(atn) - a.markPrecedenceDecisions(atn) - a.verifyATN(atn) - - if a.deserializationOptions.generateRuleBypassTransitions && atn.grammarType == ATNTypeParser { - a.generateRuleBypassTransitions(atn) - // Re-verify after modification - a.verifyATN(atn) - } - - return atn - -} - -func (a *ATNDeserializer) reset(data []rune) { - temp := make([]rune, len(data)) - - for i, c := range data { - // Don't adjust the first value since that's the version number - if i == 0 { - temp[i] = c - } else if c > 1 { - temp[i] = c - 2 - } else { - temp[i] = c + 65533 - } - } - - a.data = temp - a.pos = 0 -} - -func (a *ATNDeserializer) checkVersion() { - version := a.readInt() - - if version != SerializedVersion { - panic("Could not deserialize ATN with version " + strconv.Itoa(version) + " (expected " + strconv.Itoa(SerializedVersion) + ").") - } -} - -func (a *ATNDeserializer) checkUUID() { - uuid := a.readUUID() - - if stringInSlice(uuid, SupportedUUIDs) < 0 { - panic("Could not deserialize ATN with UUID: " + uuid + " (expected " + SerializedUUID + " or a legacy UUID).") - } - - a.uuid = uuid -} - -func (a *ATNDeserializer) readATN() *ATN { - grammarType := a.readInt() - maxTokenType := a.readInt() - - return NewATN(grammarType, maxTokenType) -} - -func (a *ATNDeserializer) readStates(atn *ATN) { - loopBackStateNumbers := make([]LoopEndStateIntPair, 0) - endStateNumbers := make([]BlockStartStateIntPair, 0) - - nstates := a.readInt() - - for i := 0; i < nstates; i++ { - stype := a.readInt() - - // Ignore bad types of states - if stype == ATNStateInvalidType { - atn.addState(nil) - - continue - } - - ruleIndex := a.readInt() - - if ruleIndex == 0xFFFF { - ruleIndex = -1 - } - - s := a.stateFactory(stype, ruleIndex) - - if stype == ATNStateLoopEnd { - loopBackStateNumber := a.readInt() - - loopBackStateNumbers = append(loopBackStateNumbers, LoopEndStateIntPair{s.(*LoopEndState), loopBackStateNumber}) - } else if s2, ok := s.(BlockStartState); ok { - endStateNumber := a.readInt() - - endStateNumbers = append(endStateNumbers, BlockStartStateIntPair{s2, endStateNumber}) - } - - atn.addState(s) - } - - // Delay the assignment of loop back and end states until we know all the state - // instances have been initialized - for j := 0; j < len(loopBackStateNumbers); j++ { - pair := loopBackStateNumbers[j] - - pair.item0.loopBackState = atn.states[pair.item1] - } - - for j := 0; j < len(endStateNumbers); j++ { - pair := endStateNumbers[j] - - pair.item0.setEndState(atn.states[pair.item1].(*BlockEndState)) - } - - numNonGreedyStates := a.readInt() - - for j := 0; j < numNonGreedyStates; j++ { - stateNumber := a.readInt() - - atn.states[stateNumber].(DecisionState).setNonGreedy(true) - } - - numPrecedenceStates := a.readInt() - - for j := 0; j < numPrecedenceStates; j++ { - stateNumber := a.readInt() - - atn.states[stateNumber].(*RuleStartState).isPrecedenceRule = true - } -} - -func (a *ATNDeserializer) readRules(atn *ATN) { - nrules := a.readInt() - - if atn.grammarType == ATNTypeLexer { - atn.ruleToTokenType = make([]int, nrules) // TODO: initIntArray(nrules, 0) - } - - atn.ruleToStartState = make([]*RuleStartState, nrules) // TODO: initIntArray(nrules, 0) - - for i := 0; i < nrules; i++ { - s := a.readInt() - startState := atn.states[s].(*RuleStartState) - - atn.ruleToStartState[i] = startState - - if atn.grammarType == ATNTypeLexer { - tokenType := a.readInt() - - if tokenType == 0xFFFF { - tokenType = TokenEOF - } - - atn.ruleToTokenType[i] = tokenType - } - } - - atn.ruleToStopState = make([]*RuleStopState, nrules) //initIntArray(nrules, 0) - - for i := 0; i < len(atn.states); i++ { - state := atn.states[i] - - if s2, ok := state.(*RuleStopState); ok { - atn.ruleToStopState[s2.ruleIndex] = s2 - atn.ruleToStartState[s2.ruleIndex].stopState = s2 - } - } -} - -func (a *ATNDeserializer) readModes(atn *ATN) { - nmodes := a.readInt() - - for i := 0; i < nmodes; i++ { - s := a.readInt() - - atn.modeToStartState = append(atn.modeToStartState, atn.states[s].(*TokensStartState)) - } -} - -func (a *ATNDeserializer) readSets(atn *ATN, sets []*IntervalSet, readUnicode func() int) []*IntervalSet { - m := a.readInt() - - for i := 0; i < m; i++ { - iset := NewIntervalSet() - - sets = append(sets, iset) - - n := a.readInt() - containsEOF := a.readInt() - - if containsEOF != 0 { - iset.addOne(-1) - } - - for j := 0; j < n; j++ { - i1 := readUnicode() - i2 := readUnicode() - - iset.addRange(i1, i2) - } - } - - return sets -} - -func (a *ATNDeserializer) readEdges(atn *ATN, sets []*IntervalSet) { - nedges := a.readInt() - - for i := 0; i < nedges; i++ { - var ( - src = a.readInt() - trg = a.readInt() - ttype = a.readInt() - arg1 = a.readInt() - arg2 = a.readInt() - arg3 = a.readInt() - trans = a.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets) - srcState = atn.states[src] - ) - - srcState.AddTransition(trans, -1) - } - - // Edges for rule stop states can be derived, so they are not serialized - for i := 0; i < len(atn.states); i++ { - state := atn.states[i] - - for j := 0; j < len(state.GetTransitions()); j++ { - var t, ok = state.GetTransitions()[j].(*RuleTransition) - - if !ok { - continue - } - - outermostPrecedenceReturn := -1 - - if atn.ruleToStartState[t.getTarget().GetRuleIndex()].isPrecedenceRule { - if t.precedence == 0 { - outermostPrecedenceReturn = t.getTarget().GetRuleIndex() - } - } - - trans := NewEpsilonTransition(t.followState, outermostPrecedenceReturn) - - atn.ruleToStopState[t.getTarget().GetRuleIndex()].AddTransition(trans, -1) - } - } - - for i := 0; i < len(atn.states); i++ { - state := atn.states[i] - - if s2, ok := state.(*BaseBlockStartState); ok { - // We need to know the end state to set its start state - if s2.endState == nil { - panic("IllegalState") - } - - // Block end states can only be associated to a single block start state - if s2.endState.startState != nil { - panic("IllegalState") - } - - s2.endState.startState = state - } - - if s2, ok := state.(*PlusLoopbackState); ok { - for j := 0; j < len(s2.GetTransitions()); j++ { - target := s2.GetTransitions()[j].getTarget() - - if t2, ok := target.(*PlusBlockStartState); ok { - t2.loopBackState = state - } - } - } else if s2, ok := state.(*StarLoopbackState); ok { - for j := 0; j < len(s2.GetTransitions()); j++ { - target := s2.GetTransitions()[j].getTarget() - - if t2, ok := target.(*StarLoopEntryState); ok { - t2.loopBackState = state - } - } - } - } -} - -func (a *ATNDeserializer) readDecisions(atn *ATN) { - ndecisions := a.readInt() - - for i := 0; i < ndecisions; i++ { - s := a.readInt() - decState := atn.states[s].(DecisionState) - - atn.DecisionToState = append(atn.DecisionToState, decState) - decState.setDecision(i) - } -} - -func (a *ATNDeserializer) readLexerActions(atn *ATN) { - if atn.grammarType == ATNTypeLexer { - count := a.readInt() - - atn.lexerActions = make([]LexerAction, count) // initIntArray(count, nil) - - for i := 0; i < count; i++ { - actionType := a.readInt() - data1 := a.readInt() - - if data1 == 0xFFFF { - data1 = -1 - } - - data2 := a.readInt() - - if data2 == 0xFFFF { - data2 = -1 - } - - lexerAction := a.lexerActionFactory(actionType, data1, data2) - - atn.lexerActions[i] = lexerAction - } - } -} - -func (a *ATNDeserializer) generateRuleBypassTransitions(atn *ATN) { - count := len(atn.ruleToStartState) - - for i := 0; i < count; i++ { - atn.ruleToTokenType[i] = atn.maxTokenType + i + 1 - } - - for i := 0; i < count; i++ { - a.generateRuleBypassTransition(atn, i) - } -} - -func (a *ATNDeserializer) generateRuleBypassTransition(atn *ATN, idx int) { - bypassStart := NewBasicBlockStartState() - - bypassStart.ruleIndex = idx - atn.addState(bypassStart) - - bypassStop := NewBlockEndState() - - bypassStop.ruleIndex = idx - atn.addState(bypassStop) - - bypassStart.endState = bypassStop - - atn.defineDecisionState(bypassStart.BaseDecisionState) - - bypassStop.startState = bypassStart - - var excludeTransition Transition - var endState ATNState - - if atn.ruleToStartState[idx].isPrecedenceRule { - // Wrap from the beginning of the rule to the StarLoopEntryState - endState = nil - - for i := 0; i < len(atn.states); i++ { - state := atn.states[i] - - if a.stateIsEndStateFor(state, idx) != nil { - endState = state - excludeTransition = state.(*StarLoopEntryState).loopBackState.GetTransitions()[0] - - break - } - } - - if excludeTransition == nil { - panic("Couldn't identify final state of the precedence rule prefix section.") - } - } else { - endState = atn.ruleToStopState[idx] - } - - // All non-excluded transitions that currently target end state need to target - // blockEnd instead - for i := 0; i < len(atn.states); i++ { - state := atn.states[i] - - for j := 0; j < len(state.GetTransitions()); j++ { - transition := state.GetTransitions()[j] - - if transition == excludeTransition { - continue - } - - if transition.getTarget() == endState { - transition.setTarget(bypassStop) - } - } - } - - // All transitions leaving the rule start state need to leave blockStart instead - ruleToStartState := atn.ruleToStartState[idx] - count := len(ruleToStartState.GetTransitions()) - - for count > 0 { - bypassStart.AddTransition(ruleToStartState.GetTransitions()[count-1], -1) - ruleToStartState.SetTransitions([]Transition{ruleToStartState.GetTransitions()[len(ruleToStartState.GetTransitions())-1]}) - } - - // Link the new states - atn.ruleToStartState[idx].AddTransition(NewEpsilonTransition(bypassStart, -1), -1) - bypassStop.AddTransition(NewEpsilonTransition(endState, -1), -1) - - MatchState := NewBasicState() - - atn.addState(MatchState) - MatchState.AddTransition(NewAtomTransition(bypassStop, atn.ruleToTokenType[idx]), -1) - bypassStart.AddTransition(NewEpsilonTransition(MatchState, -1), -1) -} - -func (a *ATNDeserializer) stateIsEndStateFor(state ATNState, idx int) ATNState { - if state.GetRuleIndex() != idx { - return nil - } - - if _, ok := state.(*StarLoopEntryState); !ok { - return nil - } - - maybeLoopEndState := state.GetTransitions()[len(state.GetTransitions())-1].getTarget() - - if _, ok := maybeLoopEndState.(*LoopEndState); !ok { - return nil - } - - var _, ok = maybeLoopEndState.GetTransitions()[0].getTarget().(*RuleStopState) - - if maybeLoopEndState.(*LoopEndState).epsilonOnlyTransitions && ok { - return state - } - - return nil -} - -// markPrecedenceDecisions analyzes the StarLoopEntryState states in the -// specified ATN to set the StarLoopEntryState.precedenceRuleDecision field to -// the correct value. -func (a *ATNDeserializer) markPrecedenceDecisions(atn *ATN) { - for _, state := range atn.states { - if _, ok := state.(*StarLoopEntryState); !ok { - continue - } - - // We analyze the ATN to determine if a ATN decision state is the - // decision for the closure block that determines whether a - // precedence rule should continue or complete. - if atn.ruleToStartState[state.GetRuleIndex()].isPrecedenceRule { - maybeLoopEndState := state.GetTransitions()[len(state.GetTransitions())-1].getTarget() - - if s3, ok := maybeLoopEndState.(*LoopEndState); ok { - var _, ok2 = maybeLoopEndState.GetTransitions()[0].getTarget().(*RuleStopState) - - if s3.epsilonOnlyTransitions && ok2 { - state.(*StarLoopEntryState).precedenceRuleDecision = true - } - } - } - } -} - -func (a *ATNDeserializer) verifyATN(atn *ATN) { - if !a.deserializationOptions.verifyATN { - return - } - - // Verify assumptions - for i := 0; i < len(atn.states); i++ { - state := atn.states[i] - - if state == nil { - continue - } - - a.checkCondition(state.GetEpsilonOnlyTransitions() || len(state.GetTransitions()) <= 1, "") - - switch s2 := state.(type) { - case *PlusBlockStartState: - a.checkCondition(s2.loopBackState != nil, "") - - case *StarLoopEntryState: - a.checkCondition(s2.loopBackState != nil, "") - a.checkCondition(len(s2.GetTransitions()) == 2, "") - - switch s2 := state.(type) { - case *StarBlockStartState: - var _, ok2 = s2.GetTransitions()[1].getTarget().(*LoopEndState) - - a.checkCondition(ok2, "") - a.checkCondition(!s2.nonGreedy, "") - - case *LoopEndState: - var s3, ok2 = s2.GetTransitions()[1].getTarget().(*StarBlockStartState) - - a.checkCondition(ok2, "") - a.checkCondition(s3.nonGreedy, "") - - default: - panic("IllegalState") - } - - case *StarLoopbackState: - a.checkCondition(len(state.GetTransitions()) == 1, "") - - var _, ok2 = state.GetTransitions()[0].getTarget().(*StarLoopEntryState) - - a.checkCondition(ok2, "") - - case *LoopEndState: - a.checkCondition(s2.loopBackState != nil, "") - - case *RuleStartState: - a.checkCondition(s2.stopState != nil, "") - - case *BaseBlockStartState: - a.checkCondition(s2.endState != nil, "") - - case *BlockEndState: - a.checkCondition(s2.startState != nil, "") - - case DecisionState: - a.checkCondition(len(s2.GetTransitions()) <= 1 || s2.getDecision() >= 0, "") - - default: - var _, ok = s2.(*RuleStopState) - - a.checkCondition(len(s2.GetTransitions()) <= 1 || ok, "") - } - } -} - -func (a *ATNDeserializer) checkCondition(condition bool, message string) { - if !condition { - if message == "" { - message = "IllegalState" - } - - panic(message) - } -} - -func (a *ATNDeserializer) readInt() int { - v := a.data[a.pos] - - a.pos++ - - return int(v) -} - -func (a *ATNDeserializer) readInt32() int { - var low = a.readInt() - var high = a.readInt() - return low | (high << 16) -} - -//TODO -//func (a *ATNDeserializer) readLong() int64 { -// panic("Not implemented") -// var low = a.readInt32() -// var high = a.readInt32() -// return (low & 0x00000000FFFFFFFF) | (high << int32) -//} - -func createByteToHex() []string { - bth := make([]string, 256) - - for i := 0; i < 256; i++ { - bth[i] = strings.ToUpper(hex.EncodeToString([]byte{byte(i)})) - } - - return bth -} - -var byteToHex = createByteToHex() - -func (a *ATNDeserializer) readUUID() string { - bb := make([]int, 16) - - for i := 7; i >= 0; i-- { - integer := a.readInt() - - bb[(2*i)+1] = integer & 0xFF - bb[2*i] = (integer >> 8) & 0xFF - } - - return byteToHex[bb[0]] + byteToHex[bb[1]] + - byteToHex[bb[2]] + byteToHex[bb[3]] + "-" + - byteToHex[bb[4]] + byteToHex[bb[5]] + "-" + - byteToHex[bb[6]] + byteToHex[bb[7]] + "-" + - byteToHex[bb[8]] + byteToHex[bb[9]] + "-" + - byteToHex[bb[10]] + byteToHex[bb[11]] + - byteToHex[bb[12]] + byteToHex[bb[13]] + - byteToHex[bb[14]] + byteToHex[bb[15]] -} - -func (a *ATNDeserializer) edgeFactory(atn *ATN, typeIndex, src, trg, arg1, arg2, arg3 int, sets []*IntervalSet) Transition { - target := atn.states[trg] - - switch typeIndex { - case TransitionEPSILON: - return NewEpsilonTransition(target, -1) - - case TransitionRANGE: - if arg3 != 0 { - return NewRangeTransition(target, TokenEOF, arg2) - } - - return NewRangeTransition(target, arg1, arg2) - - case TransitionRULE: - return NewRuleTransition(atn.states[arg1], arg2, arg3, target) - - case TransitionPREDICATE: - return NewPredicateTransition(target, arg1, arg2, arg3 != 0) - - case TransitionPRECEDENCE: - return NewPrecedencePredicateTransition(target, arg1) - - case TransitionATOM: - if arg3 != 0 { - return NewAtomTransition(target, TokenEOF) - } - - return NewAtomTransition(target, arg1) - - case TransitionACTION: - return NewActionTransition(target, arg1, arg2, arg3 != 0) - - case TransitionSET: - return NewSetTransition(target, sets[arg1]) - - case TransitionNOTSET: - return NewNotSetTransition(target, sets[arg1]) - - case TransitionWILDCARD: - return NewWildcardTransition(target) - } - - panic("The specified transition type is not valid.") -} - -func (a *ATNDeserializer) stateFactory(typeIndex, ruleIndex int) ATNState { - var s ATNState - - switch typeIndex { - case ATNStateInvalidType: - return nil - - case ATNStateBasic: - s = NewBasicState() - - case ATNStateRuleStart: - s = NewRuleStartState() - - case ATNStateBlockStart: - s = NewBasicBlockStartState() - - case ATNStatePlusBlockStart: - s = NewPlusBlockStartState() - - case ATNStateStarBlockStart: - s = NewStarBlockStartState() - - case ATNStateTokenStart: - s = NewTokensStartState() - - case ATNStateRuleStop: - s = NewRuleStopState() - - case ATNStateBlockEnd: - s = NewBlockEndState() - - case ATNStateStarLoopBack: - s = NewStarLoopbackState() - - case ATNStateStarLoopEntry: - s = NewStarLoopEntryState() - - case ATNStatePlusLoopBack: - s = NewPlusLoopbackState() - - case ATNStateLoopEnd: - s = NewLoopEndState() - - default: - panic(fmt.Sprintf("state type %d is invalid", typeIndex)) - } - - s.SetRuleIndex(ruleIndex) - - return s -} - -func (a *ATNDeserializer) lexerActionFactory(typeIndex, data1, data2 int) LexerAction { - switch typeIndex { - case LexerActionTypeChannel: - return NewLexerChannelAction(data1) - - case LexerActionTypeCustom: - return NewLexerCustomAction(data1, data2) - - case LexerActionTypeMode: - return NewLexerModeAction(data1) - - case LexerActionTypeMore: - return LexerMoreActionINSTANCE - - case LexerActionTypePopMode: - return LexerPopModeActionINSTANCE - - case LexerActionTypePushMode: - return NewLexerPushModeAction(data1) - - case LexerActionTypeSkip: - return LexerSkipActionINSTANCE - - case LexerActionTypeType: - return NewLexerTypeAction(data1) - - default: - panic(fmt.Sprintf("lexer action %d is invalid", typeIndex)) - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_simulator.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_simulator.go deleted file mode 100644 index d5454d6d5ddd..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_simulator.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -var ATNSimulatorError = NewDFAState(0x7FFFFFFF, NewBaseATNConfigSet(false)) - -type IATNSimulator interface { - SharedContextCache() *PredictionContextCache - ATN() *ATN - DecisionToDFA() []*DFA -} - -type BaseATNSimulator struct { - atn *ATN - sharedContextCache *PredictionContextCache - decisionToDFA []*DFA -} - -func NewBaseATNSimulator(atn *ATN, sharedContextCache *PredictionContextCache) *BaseATNSimulator { - b := new(BaseATNSimulator) - - b.atn = atn - b.sharedContextCache = sharedContextCache - - return b -} - -func (b *BaseATNSimulator) getCachedContext(context PredictionContext) PredictionContext { - if b.sharedContextCache == nil { - return context - } - - visited := make(map[PredictionContext]PredictionContext) - - return getCachedBasePredictionContext(context, b.sharedContextCache, visited) -} - -func (b *BaseATNSimulator) SharedContextCache() *PredictionContextCache { - return b.sharedContextCache -} - -func (b *BaseATNSimulator) ATN() *ATN { - return b.atn -} - -func (b *BaseATNSimulator) DecisionToDFA() []*DFA { - return b.decisionToDFA -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_state.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_state.go deleted file mode 100644 index 563d5db38d46..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_state.go +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import "strconv" - -// Constants for serialization. -const ( - ATNStateInvalidType = 0 - ATNStateBasic = 1 - ATNStateRuleStart = 2 - ATNStateBlockStart = 3 - ATNStatePlusBlockStart = 4 - ATNStateStarBlockStart = 5 - ATNStateTokenStart = 6 - ATNStateRuleStop = 7 - ATNStateBlockEnd = 8 - ATNStateStarLoopBack = 9 - ATNStateStarLoopEntry = 10 - ATNStatePlusLoopBack = 11 - ATNStateLoopEnd = 12 - - ATNStateInvalidStateNumber = -1 -) - -var ATNStateInitialNumTransitions = 4 - -type ATNState interface { - GetEpsilonOnlyTransitions() bool - - GetRuleIndex() int - SetRuleIndex(int) - - GetNextTokenWithinRule() *IntervalSet - SetNextTokenWithinRule(*IntervalSet) - - GetATN() *ATN - SetATN(*ATN) - - GetStateType() int - - GetStateNumber() int - SetStateNumber(int) - - GetTransitions() []Transition - SetTransitions([]Transition) - AddTransition(Transition, int) - - String() string - hash() int -} - -type BaseATNState struct { - // NextTokenWithinRule caches lookahead during parsing. Not used during construction. - NextTokenWithinRule *IntervalSet - - // atn is the current ATN. - atn *ATN - - epsilonOnlyTransitions bool - - // ruleIndex tracks the Rule index because there are no Rule objects at runtime. - ruleIndex int - - stateNumber int - - stateType int - - // Track the transitions emanating from this ATN state. - transitions []Transition -} - -func NewBaseATNState() *BaseATNState { - return &BaseATNState{stateNumber: ATNStateInvalidStateNumber, stateType: ATNStateInvalidType} -} - -func (as *BaseATNState) GetRuleIndex() int { - return as.ruleIndex -} - -func (as *BaseATNState) SetRuleIndex(v int) { - as.ruleIndex = v -} -func (as *BaseATNState) GetEpsilonOnlyTransitions() bool { - return as.epsilonOnlyTransitions -} - -func (as *BaseATNState) GetATN() *ATN { - return as.atn -} - -func (as *BaseATNState) SetATN(atn *ATN) { - as.atn = atn -} - -func (as *BaseATNState) GetTransitions() []Transition { - return as.transitions -} - -func (as *BaseATNState) SetTransitions(t []Transition) { - as.transitions = t -} - -func (as *BaseATNState) GetStateType() int { - return as.stateType -} - -func (as *BaseATNState) GetStateNumber() int { - return as.stateNumber -} - -func (as *BaseATNState) SetStateNumber(stateNumber int) { - as.stateNumber = stateNumber -} - -func (as *BaseATNState) GetNextTokenWithinRule() *IntervalSet { - return as.NextTokenWithinRule -} - -func (as *BaseATNState) SetNextTokenWithinRule(v *IntervalSet) { - as.NextTokenWithinRule = v -} - -func (as *BaseATNState) hash() int { - return as.stateNumber -} - -func (as *BaseATNState) String() string { - return strconv.Itoa(as.stateNumber) -} - -func (as *BaseATNState) equals(other interface{}) bool { - if ot, ok := other.(ATNState); ok { - return as.stateNumber == ot.GetStateNumber() - } - - return false -} - -func (as *BaseATNState) isNonGreedyExitState() bool { - return false -} - -func (as *BaseATNState) AddTransition(trans Transition, index int) { - if len(as.transitions) == 0 { - as.epsilonOnlyTransitions = trans.getIsEpsilon() - } else if as.epsilonOnlyTransitions != trans.getIsEpsilon() { - as.epsilonOnlyTransitions = false - } - - if index == -1 { - as.transitions = append(as.transitions, trans) - } else { - as.transitions = append(as.transitions[:index], append([]Transition{trans}, as.transitions[index:]...)...) - // TODO: as.transitions.splice(index, 1, trans) - } -} - -type BasicState struct { - *BaseATNState -} - -func NewBasicState() *BasicState { - b := NewBaseATNState() - - b.stateType = ATNStateBasic - - return &BasicState{BaseATNState: b} -} - -type DecisionState interface { - ATNState - - getDecision() int - setDecision(int) - - getNonGreedy() bool - setNonGreedy(bool) -} - -type BaseDecisionState struct { - *BaseATNState - decision int - nonGreedy bool -} - -func NewBaseDecisionState() *BaseDecisionState { - return &BaseDecisionState{BaseATNState: NewBaseATNState(), decision: -1} -} - -func (s *BaseDecisionState) getDecision() int { - return s.decision -} - -func (s *BaseDecisionState) setDecision(b int) { - s.decision = b -} - -func (s *BaseDecisionState) getNonGreedy() bool { - return s.nonGreedy -} - -func (s *BaseDecisionState) setNonGreedy(b bool) { - s.nonGreedy = b -} - -type BlockStartState interface { - DecisionState - - getEndState() *BlockEndState - setEndState(*BlockEndState) -} - -// BaseBlockStartState is the start of a regular (...) block. -type BaseBlockStartState struct { - *BaseDecisionState - endState *BlockEndState -} - -func NewBlockStartState() *BaseBlockStartState { - return &BaseBlockStartState{BaseDecisionState: NewBaseDecisionState()} -} - -func (s *BaseBlockStartState) getEndState() *BlockEndState { - return s.endState -} - -func (s *BaseBlockStartState) setEndState(b *BlockEndState) { - s.endState = b -} - -type BasicBlockStartState struct { - *BaseBlockStartState -} - -func NewBasicBlockStartState() *BasicBlockStartState { - b := NewBlockStartState() - - b.stateType = ATNStateBlockStart - - return &BasicBlockStartState{BaseBlockStartState: b} -} - -// BlockEndState is a terminal node of a simple (a|b|c) block. -type BlockEndState struct { - *BaseATNState - startState ATNState -} - -func NewBlockEndState() *BlockEndState { - b := NewBaseATNState() - - b.stateType = ATNStateBlockEnd - - return &BlockEndState{BaseATNState: b} -} - -// RuleStopState is the last node in the ATN for a rule, unless that rule is the -// start symbol. In that case, there is one transition to EOF. Later, we might -// encode references to all calls to this rule to compute FOLLOW sets for error -// handling. -type RuleStopState struct { - *BaseATNState -} - -func NewRuleStopState() *RuleStopState { - b := NewBaseATNState() - - b.stateType = ATNStateRuleStop - - return &RuleStopState{BaseATNState: b} -} - -type RuleStartState struct { - *BaseATNState - stopState ATNState - isPrecedenceRule bool -} - -func NewRuleStartState() *RuleStartState { - b := NewBaseATNState() - - b.stateType = ATNStateRuleStart - - return &RuleStartState{BaseATNState: b} -} - -// PlusLoopbackState is a decision state for A+ and (A|B)+. It has two -// transitions: one to the loop back to start of the block, and one to exit. -type PlusLoopbackState struct { - *BaseDecisionState -} - -func NewPlusLoopbackState() *PlusLoopbackState { - b := NewBaseDecisionState() - - b.stateType = ATNStatePlusLoopBack - - return &PlusLoopbackState{BaseDecisionState: b} -} - -// PlusBlockStartState is the start of a (A|B|...)+ loop. Technically it is a -// decision state; we don't use it for code generation. Somebody might need it, -// it is included for completeness. In reality, PlusLoopbackState is the real -// decision-making node for A+. -type PlusBlockStartState struct { - *BaseBlockStartState - loopBackState ATNState -} - -func NewPlusBlockStartState() *PlusBlockStartState { - b := NewBlockStartState() - - b.stateType = ATNStatePlusBlockStart - - return &PlusBlockStartState{BaseBlockStartState: b} -} - -// StarBlockStartState is the block that begins a closure loop. -type StarBlockStartState struct { - *BaseBlockStartState -} - -func NewStarBlockStartState() *StarBlockStartState { - b := NewBlockStartState() - - b.stateType = ATNStateStarBlockStart - - return &StarBlockStartState{BaseBlockStartState: b} -} - -type StarLoopbackState struct { - *BaseATNState -} - -func NewStarLoopbackState() *StarLoopbackState { - b := NewBaseATNState() - - b.stateType = ATNStateStarLoopBack - - return &StarLoopbackState{BaseATNState: b} -} - -type StarLoopEntryState struct { - *BaseDecisionState - loopBackState ATNState - precedenceRuleDecision bool -} - -func NewStarLoopEntryState() *StarLoopEntryState { - b := NewBaseDecisionState() - - b.stateType = ATNStateStarLoopEntry - - // False precedenceRuleDecision indicates whether s state can benefit from a precedence DFA during SLL decision making. - return &StarLoopEntryState{BaseDecisionState: b} -} - -// LoopEndState marks the end of a * or + loop. -type LoopEndState struct { - *BaseATNState - loopBackState ATNState -} - -func NewLoopEndState() *LoopEndState { - b := NewBaseATNState() - - b.stateType = ATNStateLoopEnd - - return &LoopEndState{BaseATNState: b} -} - -// TokensStartState is the Tokens rule start state linking to each lexer rule start state. -type TokensStartState struct { - *BaseDecisionState -} - -func NewTokensStartState() *TokensStartState { - b := NewBaseDecisionState() - - b.stateType = ATNStateTokenStart - - return &TokensStartState{BaseDecisionState: b} -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_type.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_type.go deleted file mode 100644 index a7b48976b311..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/atn_type.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// Represent the type of recognizer an ATN applies to. -const ( - ATNTypeLexer = 0 - ATNTypeParser = 1 -) diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/char_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/char_stream.go deleted file mode 100644 index 70c1207f7ffd..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/char_stream.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type CharStream interface { - IntStream - GetText(int, int) string - GetTextFromTokens(start, end Token) string - GetTextFromInterval(*Interval) string -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/common_token_factory.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/common_token_factory.go deleted file mode 100644 index 330ff8f31f8a..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/common_token_factory.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// TokenFactory creates CommonToken objects. -type TokenFactory interface { - Create(source *TokenSourceCharStreamPair, ttype int, text string, channel, start, stop, line, column int) Token -} - -// CommonTokenFactory is the default TokenFactory implementation. -type CommonTokenFactory struct { - // copyText indicates whether CommonToken.setText should be called after - // constructing tokens to explicitly set the text. This is useful for cases - // where the input stream might not be able to provide arbitrary substrings of - // text from the input after the lexer creates a token (e.g. the - // implementation of CharStream.GetText in UnbufferedCharStream panics an - // UnsupportedOperationException). Explicitly setting the token text allows - // Token.GetText to be called at any time regardless of the input stream - // implementation. - // - // The default value is false to avoid the performance and memory overhead of - // copying text for every token unless explicitly requested. - copyText bool -} - -func NewCommonTokenFactory(copyText bool) *CommonTokenFactory { - return &CommonTokenFactory{copyText: copyText} -} - -// CommonTokenFactoryDEFAULT is the default CommonTokenFactory. It does not -// explicitly copy token text when constructing tokens. -var CommonTokenFactoryDEFAULT = NewCommonTokenFactory(false) - -func (c *CommonTokenFactory) Create(source *TokenSourceCharStreamPair, ttype int, text string, channel, start, stop, line, column int) Token { - t := NewCommonToken(source, ttype, channel, start, stop) - - t.line = line - t.column = column - - if text != "" { - t.SetText(text) - } else if c.copyText && source.charStream != nil { - t.SetText(source.charStream.GetTextFromInterval(NewInterval(start, stop))) - } - - return t -} - -func (c *CommonTokenFactory) createThin(ttype int, text string) Token { - t := NewCommonToken(nil, ttype, TokenDefaultChannel, -1, -1) - t.SetText(text) - - return t -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/common_token_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/common_token_stream.go deleted file mode 100644 index c90e9b8904c8..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/common_token_stream.go +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "strconv" -) - -// CommonTokenStream is an implementation of TokenStream that loads tokens from -// a TokenSource on-demand and places the tokens in a buffer to provide access -// to any previous token by index. This token stream ignores the value of -// Token.getChannel. If your parser requires the token stream filter tokens to -// only those on a particular channel, such as Token.DEFAULT_CHANNEL or -// Token.HIDDEN_CHANNEL, use a filtering token stream such a CommonTokenStream. -type CommonTokenStream struct { - channel int - - // fetchedEOF indicates whether the Token.EOF token has been fetched from - // tokenSource and added to tokens. This field improves performance for the - // following cases: - // - // consume: The lookahead check in consume to preven consuming the EOF symbol is - // optimized by checking the values of fetchedEOF and p instead of calling LA. - // - // fetch: The check to prevent adding multiple EOF symbols into tokens is - // trivial with bt field. - fetchedEOF bool - - // index indexs into tokens of the current token (next token to consume). - // tokens[p] should be LT(1). It is set to -1 when the stream is first - // constructed or when SetTokenSource is called, indicating that the first token - // has not yet been fetched from the token source. For additional information, - // see the documentation of IntStream for a description of initializing methods. - index int - - // tokenSource is the TokenSource from which tokens for the bt stream are - // fetched. - tokenSource TokenSource - - // tokens is all tokens fetched from the token source. The list is considered a - // complete view of the input once fetchedEOF is set to true. - tokens []Token -} - -func NewCommonTokenStream(lexer Lexer, channel int) *CommonTokenStream { - return &CommonTokenStream{ - channel: channel, - index: -1, - tokenSource: lexer, - tokens: make([]Token, 0), - } -} - -func (c *CommonTokenStream) GetAllTokens() []Token { - return c.tokens -} - -func (c *CommonTokenStream) Mark() int { - return 0 -} - -func (c *CommonTokenStream) Release(marker int) {} - -func (c *CommonTokenStream) reset() { - c.Seek(0) -} - -func (c *CommonTokenStream) Seek(index int) { - c.lazyInit() - c.index = c.adjustSeekIndex(index) -} - -func (c *CommonTokenStream) Get(index int) Token { - c.lazyInit() - - return c.tokens[index] -} - -func (c *CommonTokenStream) Consume() { - SkipEOFCheck := false - - if c.index >= 0 { - if c.fetchedEOF { - // The last token in tokens is EOF. Skip the check if p indexes any fetched. - // token except the last. - SkipEOFCheck = c.index < len(c.tokens)-1 - } else { - // No EOF token in tokens. Skip the check if p indexes a fetched token. - SkipEOFCheck = c.index < len(c.tokens) - } - } else { - // Not yet initialized - SkipEOFCheck = false - } - - if !SkipEOFCheck && c.LA(1) == TokenEOF { - panic("cannot consume EOF") - } - - if c.Sync(c.index + 1) { - c.index = c.adjustSeekIndex(c.index + 1) - } -} - -// Sync makes sure index i in tokens has a token and returns true if a token is -// located at index i and otherwise false. -func (c *CommonTokenStream) Sync(i int) bool { - n := i - len(c.tokens) + 1 // TODO: How many more elements do we need? - - if n > 0 { - fetched := c.fetch(n) - return fetched >= n - } - - return true -} - -// fetch adds n elements to buffer and returns the actual number of elements -// added to the buffer. -func (c *CommonTokenStream) fetch(n int) int { - if c.fetchedEOF { - return 0 - } - - for i := 0; i < n; i++ { - t := c.tokenSource.NextToken() - - t.SetTokenIndex(len(c.tokens)) - c.tokens = append(c.tokens, t) - - if t.GetTokenType() == TokenEOF { - c.fetchedEOF = true - - return i + 1 - } - } - - return n -} - -// GetTokens gets all tokens from start to stop inclusive. -func (c *CommonTokenStream) GetTokens(start int, stop int, types *IntervalSet) []Token { - if start < 0 || stop < 0 { - return nil - } - - c.lazyInit() - - subset := make([]Token, 0) - - if stop >= len(c.tokens) { - stop = len(c.tokens) - 1 - } - - for i := start; i < stop; i++ { - t := c.tokens[i] - - if t.GetTokenType() == TokenEOF { - break - } - - if types == nil || types.contains(t.GetTokenType()) { - subset = append(subset, t) - } - } - - return subset -} - -func (c *CommonTokenStream) LA(i int) int { - return c.LT(i).GetTokenType() -} - -func (c *CommonTokenStream) lazyInit() { - if c.index == -1 { - c.setup() - } -} - -func (c *CommonTokenStream) setup() { - c.Sync(0) - c.index = c.adjustSeekIndex(0) -} - -func (c *CommonTokenStream) GetTokenSource() TokenSource { - return c.tokenSource -} - -// SetTokenSource resets the c token stream by setting its token source. -func (c *CommonTokenStream) SetTokenSource(tokenSource TokenSource) { - c.tokenSource = tokenSource - c.tokens = make([]Token, 0) - c.index = -1 -} - -// NextTokenOnChannel returns the index of the next token on channel given a -// starting index. Returns i if tokens[i] is on channel. Returns -1 if there are -// no tokens on channel between i and EOF. -func (c *CommonTokenStream) NextTokenOnChannel(i, channel int) int { - c.Sync(i) - - if i >= len(c.tokens) { - return -1 - } - - token := c.tokens[i] - - for token.GetChannel() != c.channel { - if token.GetTokenType() == TokenEOF { - return -1 - } - - i++ - c.Sync(i) - token = c.tokens[i] - } - - return i -} - -// previousTokenOnChannel returns the index of the previous token on channel -// given a starting index. Returns i if tokens[i] is on channel. Returns -1 if -// there are no tokens on channel between i and 0. -func (c *CommonTokenStream) previousTokenOnChannel(i, channel int) int { - for i >= 0 && c.tokens[i].GetChannel() != channel { - i-- - } - - return i -} - -// GetHiddenTokensToRight collects all tokens on a specified channel to the -// right of the current token up until we see a token on DEFAULT_TOKEN_CHANNEL -// or EOF. If channel is -1, it finds any non-default channel token. -func (c *CommonTokenStream) GetHiddenTokensToRight(tokenIndex, channel int) []Token { - c.lazyInit() - - if tokenIndex < 0 || tokenIndex >= len(c.tokens) { - panic(strconv.Itoa(tokenIndex) + " not in 0.." + strconv.Itoa(len(c.tokens)-1)) - } - - nextOnChannel := c.NextTokenOnChannel(tokenIndex+1, LexerDefaultTokenChannel) - from := tokenIndex + 1 - - // If no onchannel to the right, then nextOnChannel == -1, so set to to last token - var to int - - if nextOnChannel == -1 { - to = len(c.tokens) - 1 - } else { - to = nextOnChannel - } - - return c.filterForChannel(from, to, channel) -} - -// GetHiddenTokensToLeft collects all tokens on channel to the left of the -// current token until we see a token on DEFAULT_TOKEN_CHANNEL. If channel is -// -1, it finds any non default channel token. -func (c *CommonTokenStream) GetHiddenTokensToLeft(tokenIndex, channel int) []Token { - c.lazyInit() - - if tokenIndex < 0 || tokenIndex >= len(c.tokens) { - panic(strconv.Itoa(tokenIndex) + " not in 0.." + strconv.Itoa(len(c.tokens)-1)) - } - - prevOnChannel := c.previousTokenOnChannel(tokenIndex-1, LexerDefaultTokenChannel) - - if prevOnChannel == tokenIndex-1 { - return nil - } - - // If there are none on channel to the left and prevOnChannel == -1 then from = 0 - from := prevOnChannel + 1 - to := tokenIndex - 1 - - return c.filterForChannel(from, to, channel) -} - -func (c *CommonTokenStream) filterForChannel(left, right, channel int) []Token { - hidden := make([]Token, 0) - - for i := left; i < right+1; i++ { - t := c.tokens[i] - - if channel == -1 { - if t.GetChannel() != LexerDefaultTokenChannel { - hidden = append(hidden, t) - } - } else if t.GetChannel() == channel { - hidden = append(hidden, t) - } - } - - if len(hidden) == 0 { - return nil - } - - return hidden -} - -func (c *CommonTokenStream) GetSourceName() string { - return c.tokenSource.GetSourceName() -} - -func (c *CommonTokenStream) Size() int { - return len(c.tokens) -} - -func (c *CommonTokenStream) Index() int { - return c.index -} - -func (c *CommonTokenStream) GetAllText() string { - return c.GetTextFromInterval(nil) -} - -func (c *CommonTokenStream) GetTextFromTokens(start, end Token) string { - if start == nil || end == nil { - return "" - } - - return c.GetTextFromInterval(NewInterval(start.GetTokenIndex(), end.GetTokenIndex())) -} - -func (c *CommonTokenStream) GetTextFromRuleContext(interval RuleContext) string { - return c.GetTextFromInterval(interval.GetSourceInterval()) -} - -func (c *CommonTokenStream) GetTextFromInterval(interval *Interval) string { - c.lazyInit() - c.Fill() - - if interval == nil { - interval = NewInterval(0, len(c.tokens)-1) - } - - start := interval.Start - stop := interval.Stop - - if start < 0 || stop < 0 { - return "" - } - - if stop >= len(c.tokens) { - stop = len(c.tokens) - 1 - } - - s := "" - - for i := start; i < stop+1; i++ { - t := c.tokens[i] - - if t.GetTokenType() == TokenEOF { - break - } - - s += t.GetText() - } - - return s -} - -// Fill gets all tokens from the lexer until EOF. -func (c *CommonTokenStream) Fill() { - c.lazyInit() - - for c.fetch(1000) == 1000 { - continue - } -} - -func (c *CommonTokenStream) adjustSeekIndex(i int) int { - return c.NextTokenOnChannel(i, c.channel) -} - -func (c *CommonTokenStream) LB(k int) Token { - if k == 0 || c.index-k < 0 { - return nil - } - - i := c.index - n := 1 - - // Find k good tokens looking backward - for n <= k { - // Skip off-channel tokens - i = c.previousTokenOnChannel(i-1, c.channel) - n++ - } - - if i < 0 { - return nil - } - - return c.tokens[i] -} - -func (c *CommonTokenStream) LT(k int) Token { - c.lazyInit() - - if k == 0 { - return nil - } - - if k < 0 { - return c.LB(-k) - } - - i := c.index - n := 1 // We know tokens[n] is valid - - // Find k good tokens - for n < k { - // Skip off-channel tokens, but make sure to not look past EOF - if c.Sync(i + 1) { - i = c.NextTokenOnChannel(i+1, c.channel) - } - - n++ - } - - return c.tokens[i] -} - -// getNumberOfOnChannelTokens counts EOF once. -func (c *CommonTokenStream) getNumberOfOnChannelTokens() int { - var n int - - c.Fill() - - for i := 0; i < len(c.tokens); i++ { - t := c.tokens[i] - - if t.GetChannel() == c.channel { - n++ - } - - if t.GetTokenType() == TokenEOF { - break - } - } - - return n -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa.go deleted file mode 100644 index d6079aa203bd..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "sort" - "sync" -) - -type DFA struct { - // atnStartState is the ATN state in which this was created - atnStartState DecisionState - - decision int - - // states is all the DFA states. Use Map to get the old state back; Set can only - // indicate whether it is there. - states map[int]*DFAState - statesMu sync.RWMutex - - s0 *DFAState - s0Mu sync.RWMutex - - // precedenceDfa is the backing field for isPrecedenceDfa and setPrecedenceDfa. - // True if the DFA is for a precedence decision and false otherwise. - precedenceDfa bool -} - -func NewDFA(atnStartState DecisionState, decision int) *DFA { - return &DFA{ - atnStartState: atnStartState, - decision: decision, - states: make(map[int]*DFAState), - } -} - -// getPrecedenceStartState gets the start state for the current precedence and -// returns the start state corresponding to the specified precedence if a start -// state exists for the specified precedence and nil otherwise. d must be a -// precedence DFA. See also isPrecedenceDfa. -func (d *DFA) getPrecedenceStartState(precedence int) *DFAState { - if !d.precedenceDfa { - panic("only precedence DFAs may contain a precedence start state") - } - - d.s0Mu.RLock() - defer d.s0Mu.RUnlock() - - // s0.edges is never nil for a precedence DFA - if precedence < 0 || precedence >= len(d.s0.edges) { - return nil - } - - return d.s0.edges[precedence] -} - -// setPrecedenceStartState sets the start state for the current precedence. d -// must be a precedence DFA. See also isPrecedenceDfa. -func (d *DFA) setPrecedenceStartState(precedence int, startState *DFAState) { - if !d.precedenceDfa { - panic("only precedence DFAs may contain a precedence start state") - } - - if precedence < 0 { - return - } - - d.s0Mu.Lock() - defer d.s0Mu.Unlock() - - // Synchronization on s0 here is ok. When the DFA is turned into a - // precedence DFA, s0 will be initialized once and not updated again. s0.edges - // is never nil for a precedence DFA. - if precedence >= len(d.s0.edges) { - d.s0.edges = append(d.s0.edges, make([]*DFAState, precedence+1-len(d.s0.edges))...) - } - - d.s0.edges[precedence] = startState -} - -// setPrecedenceDfa sets whether d is a precedence DFA. If precedenceDfa differs -// from the current DFA configuration, then d.states is cleared, the initial -// state s0 is set to a new DFAState with an empty outgoing DFAState.edges to -// store the start states for individual precedence values if precedenceDfa is -// true or nil otherwise, and d.precedenceDfa is updated. -func (d *DFA) setPrecedenceDfa(precedenceDfa bool) { - if d.precedenceDfa != precedenceDfa { - d.states = make(map[int]*DFAState) - - if precedenceDfa { - precedenceState := NewDFAState(-1, NewBaseATNConfigSet(false)) - - precedenceState.edges = make([]*DFAState, 0) - precedenceState.isAcceptState = false - precedenceState.requiresFullContext = false - d.s0 = precedenceState - } else { - d.s0 = nil - } - - d.precedenceDfa = precedenceDfa - } -} - -func (d *DFA) getS0() *DFAState { - d.s0Mu.RLock() - defer d.s0Mu.RUnlock() - return d.s0 -} - -func (d *DFA) setS0(s *DFAState) { - d.s0Mu.Lock() - defer d.s0Mu.Unlock() - d.s0 = s -} - -func (d *DFA) getState(hash int) (*DFAState, bool) { - d.statesMu.RLock() - defer d.statesMu.RUnlock() - s, ok := d.states[hash] - return s, ok -} - -func (d *DFA) setState(hash int, state *DFAState) { - d.statesMu.Lock() - defer d.statesMu.Unlock() - d.states[hash] = state -} - -func (d *DFA) numStates() int { - d.statesMu.RLock() - defer d.statesMu.RUnlock() - return len(d.states) -} - -type dfaStateList []*DFAState - -func (d dfaStateList) Len() int { return len(d) } -func (d dfaStateList) Less(i, j int) bool { return d[i].stateNumber < d[j].stateNumber } -func (d dfaStateList) Swap(i, j int) { d[i], d[j] = d[j], d[i] } - -// sortedStates returns the states in d sorted by their state number. -func (d *DFA) sortedStates() []*DFAState { - vs := make([]*DFAState, 0, len(d.states)) - - for _, v := range d.states { - vs = append(vs, v) - } - - sort.Sort(dfaStateList(vs)) - - return vs -} - -func (d *DFA) String(literalNames []string, symbolicNames []string) string { - if d.s0 == nil { - return "" - } - - return NewDFASerializer(d, literalNames, symbolicNames).String() -} - -func (d *DFA) ToLexerString() string { - if d.s0 == nil { - return "" - } - - return NewLexerDFASerializer(d).String() -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa_serializer.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa_serializer.go deleted file mode 100644 index 4c0f690229a5..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa_serializer.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strconv" -) - -// DFASerializer is a DFA walker that knows how to dump them to serialized -// strings. -type DFASerializer struct { - dfa *DFA - literalNames []string - symbolicNames []string -} - -func NewDFASerializer(dfa *DFA, literalNames, symbolicNames []string) *DFASerializer { - if literalNames == nil { - literalNames = make([]string, 0) - } - - if symbolicNames == nil { - symbolicNames = make([]string, 0) - } - - return &DFASerializer{ - dfa: dfa, - literalNames: literalNames, - symbolicNames: symbolicNames, - } -} - -func (d *DFASerializer) String() string { - if d.dfa.s0 == nil { - return "" - } - - buf := "" - states := d.dfa.sortedStates() - - for _, s := range states { - if s.edges != nil { - n := len(s.edges) - - for j := 0; j < n; j++ { - t := s.edges[j] - - if t != nil && t.stateNumber != 0x7FFFFFFF { - buf += d.GetStateString(s) - buf += "-" - buf += d.getEdgeLabel(j) - buf += "->" - buf += d.GetStateString(t) - buf += "\n" - } - } - } - } - - if len(buf) == 0 { - return "" - } - - return buf -} - -func (d *DFASerializer) getEdgeLabel(i int) string { - if i == 0 { - return "EOF" - } else if d.literalNames != nil && i-1 < len(d.literalNames) { - return d.literalNames[i-1] - } else if d.symbolicNames != nil && i-1 < len(d.symbolicNames) { - return d.symbolicNames[i-1] - } - - return strconv.Itoa(i - 1) -} - -func (d *DFASerializer) GetStateString(s *DFAState) string { - var a, b string - - if s.isAcceptState { - a = ":" - } - - if s.requiresFullContext { - b = "^" - } - - baseStateStr := a + "s" + strconv.Itoa(s.stateNumber) + b - - if s.isAcceptState { - if s.predicates != nil { - return baseStateStr + "=>" + fmt.Sprint(s.predicates) - } - - return baseStateStr + "=>" + fmt.Sprint(s.prediction) - } - - return baseStateStr -} - -type LexerDFASerializer struct { - *DFASerializer -} - -func NewLexerDFASerializer(dfa *DFA) *LexerDFASerializer { - return &LexerDFASerializer{DFASerializer: NewDFASerializer(dfa, nil, nil)} -} - -func (l *LexerDFASerializer) getEdgeLabel(i int) string { - return "'" + string(i) + "'" -} - -func (l *LexerDFASerializer) String() string { - if l.dfa.s0 == nil { - return "" - } - - buf := "" - states := l.dfa.sortedStates() - - for i := 0; i < len(states); i++ { - s := states[i] - - if s.edges != nil { - n := len(s.edges) - - for j := 0; j < n; j++ { - t := s.edges[j] - - if t != nil && t.stateNumber != 0x7FFFFFFF { - buf += l.GetStateString(s) - buf += "-" - buf += l.getEdgeLabel(j) - buf += "->" - buf += l.GetStateString(t) - buf += "\n" - } - } - } - } - - if len(buf) == 0 { - return "" - } - - return buf -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa_state.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa_state.go deleted file mode 100644 index 38e918ad91e7..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/dfa_state.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" -) - -// PredPrediction maps a predicate to a predicted alternative. -type PredPrediction struct { - alt int - pred SemanticContext -} - -func NewPredPrediction(pred SemanticContext, alt int) *PredPrediction { - return &PredPrediction{alt: alt, pred: pred} -} - -func (p *PredPrediction) String() string { - return "(" + fmt.Sprint(p.pred) + ", " + fmt.Sprint(p.alt) + ")" -} - -// DFAState represents a set of possible ATN configurations. As Aho, Sethi, -// Ullman p. 117 says: "The DFA uses its state to keep track of all possible -// states the ATN can be in after reading each input symbol. That is to say, -// after reading input a1a2..an, the DFA is in a state that represents the -// subset T of the states of the ATN that are reachable from the ATN's start -// state along some path labeled a1a2..an." In conventional NFA-to-DFA -// conversion, therefore, the subset T would be a bitset representing the set of -// states the ATN could be in. We need to track the alt predicted by each state -// as well, however. More importantly, we need to maintain a stack of states, -// tracking the closure operations as they jump from rule to rule, emulating -// rule invocations (method calls). I have to add a stack to simulate the proper -// lookahead sequences for the underlying LL grammar from which the ATN was -// derived. -// -// I use a set of ATNConfig objects, not simple states. An ATNConfig is both a -// state (ala normal conversion) and a RuleContext describing the chain of rules -// (if any) followed to arrive at that state. -// -// A DFAState may have multiple references to a particular state, but with -// different ATN contexts (with same or different alts) meaning that state was -// reached via a different set of rule invocations. -type DFAState struct { - stateNumber int - configs ATNConfigSet - - // edges elements point to the target of the symbol. Shift up by 1 so (-1) - // Token.EOF maps to the first element. - edges []*DFAState - - isAcceptState bool - - // prediction is the ttype we match or alt we predict if the state is accept. - // Set to ATN.INVALID_ALT_NUMBER when predicates != nil or - // requiresFullContext. - prediction int - - lexerActionExecutor *LexerActionExecutor - - // requiresFullContext indicates it was created during an SLL prediction that - // discovered a conflict between the configurations in the state. Future - // ParserATNSimulator.execATN invocations immediately jump doing - // full context prediction if true. - requiresFullContext bool - - // predicates is the predicates associated with the ATN configurations of the - // DFA state during SLL parsing. When we have predicates, requiresFullContext - // is false, since full context prediction evaluates predicates on-the-fly. If - // d is - // not nil, then prediction is ATN.INVALID_ALT_NUMBER. - // - // We only use these for non-requiresFullContext but conflicting states. That - // means we know from the context (it's $ or we don't dip into outer context) - // that it's an ambiguity not a conflict. - // - // This list is computed by - // ParserATNSimulator.predicateDFAState. - predicates []*PredPrediction -} - -func NewDFAState(stateNumber int, configs ATNConfigSet) *DFAState { - if configs == nil { - configs = NewBaseATNConfigSet(false) - } - - return &DFAState{configs: configs, stateNumber: stateNumber} -} - -// GetAltSet gets the set of all alts mentioned by all ATN configurations in d. -func (d *DFAState) GetAltSet() *Set { - alts := NewSet(nil, nil) - - if d.configs != nil { - for _, c := range d.configs.GetItems() { - alts.add(c.GetAlt()) - } - } - - if alts.length() == 0 { - return nil - } - - return alts -} - -func (d *DFAState) setPrediction(v int) { - d.prediction = v -} - -// equals returns whether d equals other. Two DFAStates are equal if their ATN -// configuration sets are the same. This method is used to see if a state -// already exists. -// -// Because the number of alternatives and number of ATN configurations are -// finite, there is a finite number of DFA states that can be processed. This is -// necessary to show that the algorithm terminates. -// -// Cannot test the DFA state numbers here because in -// ParserATNSimulator.addDFAState we need to know if any other state exists that -// has d exact set of ATN configurations. The stateNumber is irrelevant. -func (d *DFAState) equals(other interface{}) bool { - if d == other { - return true - } else if _, ok := other.(*DFAState); !ok { - return false - } - - return d.configs.Equals(other.(*DFAState).configs) -} - -func (d *DFAState) String() string { - var s string - if d.isAcceptState { - if d.predicates != nil { - s = "=>" + fmt.Sprint(d.predicates) - } else { - s = "=>" + fmt.Sprint(d.prediction) - } - } - - return fmt.Sprintf("%d:%s%s", fmt.Sprint(d.configs), s) -} - -func (d *DFAState) hash() int { - h := murmurInit(11) - - c := 1 - if d.isAcceptState { - if d.predicates != nil { - for _, p := range d.predicates { - h = murmurUpdate(h, p.alt) - h = murmurUpdate(h, p.pred.hash()) - c += 2 - } - } else { - h = murmurUpdate(h, d.prediction) - c += 1 - } - } - - h = murmurUpdate(h, d.configs.hash()) - return murmurFinish(h, c) -} \ No newline at end of file diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/diagnostic_error_listener.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/diagnostic_error_listener.go deleted file mode 100644 index 1fec43d9dca3..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/diagnostic_error_listener.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "strconv" -) - -// -// This implementation of {@link ANTLRErrorListener} can be used to identify -// certain potential correctness and performance problems in grammars. "reports" -// are made by calling {@link Parser//NotifyErrorListeners} with the appropriate -// message. -// -//
    -//
  • Ambiguities: These are cases where more than one path through the -// grammar can Match the input.
  • -//
  • Weak context sensitivity: These are cases where full-context -// prediction resolved an SLL conflict to a unique alternative which equaled the -// minimum alternative of the SLL conflict.
  • -//
  • Strong (forced) context sensitivity: These are cases where the -// full-context prediction resolved an SLL conflict to a unique alternative, -// and the minimum alternative of the SLL conflict was found to not be -// a truly viable alternative. Two-stage parsing cannot be used for inputs where -// d situation occurs.
  • -//
- -type DiagnosticErrorListener struct { - *DefaultErrorListener - - exactOnly bool -} - -func NewDiagnosticErrorListener(exactOnly bool) *DiagnosticErrorListener { - - n := new(DiagnosticErrorListener) - - // whether all ambiguities or only exact ambiguities are Reported. - n.exactOnly = exactOnly - return n -} - -func (d *DiagnosticErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) { - if d.exactOnly && !exact { - return - } - msg := "reportAmbiguity d=" + - d.getDecisionDescription(recognizer, dfa) + - ": ambigAlts=" + - d.getConflictingAlts(ambigAlts, configs).String() + - ", input='" + - recognizer.GetTokenStream().GetTextFromInterval(NewInterval(startIndex, stopIndex)) + "'" - recognizer.NotifyErrorListeners(msg, nil, nil) -} - -func (d *DiagnosticErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) { - - msg := "reportAttemptingFullContext d=" + - d.getDecisionDescription(recognizer, dfa) + - ", input='" + - recognizer.GetTokenStream().GetTextFromInterval(NewInterval(startIndex, stopIndex)) + "'" - recognizer.NotifyErrorListeners(msg, nil, nil) -} - -func (d *DiagnosticErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) { - msg := "reportContextSensitivity d=" + - d.getDecisionDescription(recognizer, dfa) + - ", input='" + - recognizer.GetTokenStream().GetTextFromInterval(NewInterval(startIndex, stopIndex)) + "'" - recognizer.NotifyErrorListeners(msg, nil, nil) -} - -func (d *DiagnosticErrorListener) getDecisionDescription(recognizer Parser, dfa *DFA) string { - decision := dfa.decision - ruleIndex := dfa.atnStartState.GetRuleIndex() - - ruleNames := recognizer.GetRuleNames() - if ruleIndex < 0 || ruleIndex >= len(ruleNames) { - return strconv.Itoa(decision) - } - ruleName := ruleNames[ruleIndex] - if ruleName == "" { - return strconv.Itoa(decision) - } - return strconv.Itoa(decision) + " (" + ruleName + ")" -} - -// -// Computes the set of conflicting or ambiguous alternatives from a -// configuration set, if that information was not already provided by the -// parser. -// -// @param ReportedAlts The set of conflicting or ambiguous alternatives, as -// Reported by the parser. -// @param configs The conflicting or ambiguous configuration set. -// @return Returns {@code ReportedAlts} if it is not {@code nil}, otherwise -// returns the set of alternatives represented in {@code configs}. -// -func (d *DiagnosticErrorListener) getConflictingAlts(ReportedAlts *BitSet, set ATNConfigSet) *BitSet { - if ReportedAlts != nil { - return ReportedAlts - } - result := NewBitSet() - for _, c := range set.GetItems() { - result.add(c.GetAlt()) - } - - return result -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/error_listener.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/error_listener.go deleted file mode 100644 index 028e1a9d7f03..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/error_listener.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "os" - "strconv" -) - -// Provides an empty default implementation of {@link ANTLRErrorListener}. The -// default implementation of each method does nothing, but can be overridden as -// necessary. - -type ErrorListener interface { - SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) - ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) - ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) - ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) -} - -type DefaultErrorListener struct { -} - -func NewDefaultErrorListener() *DefaultErrorListener { - return new(DefaultErrorListener) -} - -func (d *DefaultErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) { -} - -func (d *DefaultErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) { -} - -func (d *DefaultErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) { -} - -func (d *DefaultErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) { -} - -type ConsoleErrorListener struct { - *DefaultErrorListener -} - -func NewConsoleErrorListener() *ConsoleErrorListener { - return new(ConsoleErrorListener) -} - -// -// Provides a default instance of {@link ConsoleErrorListener}. -// -var ConsoleErrorListenerINSTANCE = NewConsoleErrorListener() - -// -// {@inheritDoc} -// -//

-// This implementation prints messages to {@link System//err} containing the -// values of {@code line}, {@code charPositionInLine}, and {@code msg} using -// the following format.

-// -//
-// line line:charPositionInLine msg
-// 
-// -func (c *ConsoleErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) { - fmt.Fprintln(os.Stderr, "line "+strconv.Itoa(line)+":"+strconv.Itoa(column)+" "+msg) -} - -type ProxyErrorListener struct { - *DefaultErrorListener - delegates []ErrorListener -} - -func NewProxyErrorListener(delegates []ErrorListener) *ProxyErrorListener { - if delegates == nil { - panic("delegates is not provided") - } - l := new(ProxyErrorListener) - l.delegates = delegates - return l -} - -func (p *ProxyErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol interface{}, line, column int, msg string, e RecognitionException) { - for _, d := range p.delegates { - d.SyntaxError(recognizer, offendingSymbol, line, column, msg, e) - } -} - -func (p *ProxyErrorListener) ReportAmbiguity(recognizer Parser, dfa *DFA, startIndex, stopIndex int, exact bool, ambigAlts *BitSet, configs ATNConfigSet) { - for _, d := range p.delegates { - d.ReportAmbiguity(recognizer, dfa, startIndex, stopIndex, exact, ambigAlts, configs) - } -} - -func (p *ProxyErrorListener) ReportAttemptingFullContext(recognizer Parser, dfa *DFA, startIndex, stopIndex int, conflictingAlts *BitSet, configs ATNConfigSet) { - for _, d := range p.delegates { - d.ReportAttemptingFullContext(recognizer, dfa, startIndex, stopIndex, conflictingAlts, configs) - } -} - -func (p *ProxyErrorListener) ReportContextSensitivity(recognizer Parser, dfa *DFA, startIndex, stopIndex, prediction int, configs ATNConfigSet) { - for _, d := range p.delegates { - d.ReportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/error_strategy.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/error_strategy.go deleted file mode 100644 index 977a6e454965..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/error_strategy.go +++ /dev/null @@ -1,758 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "reflect" - "strconv" - "strings" -) - -type ErrorStrategy interface { - reset(Parser) - RecoverInline(Parser) Token - Recover(Parser, RecognitionException) - Sync(Parser) - inErrorRecoveryMode(Parser) bool - ReportError(Parser, RecognitionException) - ReportMatch(Parser) -} - -// This is the default implementation of {@link ANTLRErrorStrategy} used for -// error Reporting and recovery in ANTLR parsers. -// -type DefaultErrorStrategy struct { - errorRecoveryMode bool - lastErrorIndex int - lastErrorStates *IntervalSet -} - -var _ ErrorStrategy = &DefaultErrorStrategy{} - -func NewDefaultErrorStrategy() *DefaultErrorStrategy { - - d := new(DefaultErrorStrategy) - - // Indicates whether the error strategy is currently "recovering from an - // error". This is used to suppress Reporting multiple error messages while - // attempting to recover from a detected syntax error. - // - // @see //inErrorRecoveryMode - // - d.errorRecoveryMode = false - - // The index into the input stream where the last error occurred. - // This is used to prevent infinite loops where an error is found - // but no token is consumed during recovery...another error is found, - // ad nauseum. This is a failsafe mechanism to guarantee that at least - // one token/tree node is consumed for two errors. - // - d.lastErrorIndex = -1 - d.lastErrorStates = nil - return d -} - -//

The default implementation simply calls {@link //endErrorCondition} to -// ensure that the handler is not in error recovery mode.

-func (d *DefaultErrorStrategy) reset(recognizer Parser) { - d.endErrorCondition(recognizer) -} - -// -// This method is called to enter error recovery mode when a recognition -// exception is Reported. -// -// @param recognizer the parser instance -// -func (d *DefaultErrorStrategy) beginErrorCondition(recognizer Parser) { - d.errorRecoveryMode = true -} - -func (d *DefaultErrorStrategy) inErrorRecoveryMode(recognizer Parser) bool { - return d.errorRecoveryMode -} - -// -// This method is called to leave error recovery mode after recovering from -// a recognition exception. -// -// @param recognizer -// -func (d *DefaultErrorStrategy) endErrorCondition(recognizer Parser) { - d.errorRecoveryMode = false - d.lastErrorStates = nil - d.lastErrorIndex = -1 -} - -// -// {@inheritDoc} -// -//

The default implementation simply calls {@link //endErrorCondition}.

-// -func (d *DefaultErrorStrategy) ReportMatch(recognizer Parser) { - d.endErrorCondition(recognizer) -} - -// -// {@inheritDoc} -// -//

The default implementation returns immediately if the handler is already -// in error recovery mode. Otherwise, it calls {@link //beginErrorCondition} -// and dispatches the Reporting task based on the runtime type of {@code e} -// according to the following table.

-// -//
    -//
  • {@link NoViableAltException}: Dispatches the call to -// {@link //ReportNoViableAlternative}
  • -//
  • {@link InputMisMatchException}: Dispatches the call to -// {@link //ReportInputMisMatch}
  • -//
  • {@link FailedPredicateException}: Dispatches the call to -// {@link //ReportFailedPredicate}
  • -//
  • All other types: calls {@link Parser//NotifyErrorListeners} to Report -// the exception
  • -//
-// -func (d *DefaultErrorStrategy) ReportError(recognizer Parser, e RecognitionException) { - // if we've already Reported an error and have not Matched a token - // yet successfully, don't Report any errors. - if d.inErrorRecoveryMode(recognizer) { - return // don't Report spurious errors - } - d.beginErrorCondition(recognizer) - - switch t := e.(type) { - default: - fmt.Println("unknown recognition error type: " + reflect.TypeOf(e).Name()) - // fmt.Println(e.stack) - recognizer.NotifyErrorListeners(e.GetMessage(), e.GetOffendingToken(), e) - case *NoViableAltException: - d.ReportNoViableAlternative(recognizer, t) - case *InputMisMatchException: - d.ReportInputMisMatch(recognizer, t) - case *FailedPredicateException: - d.ReportFailedPredicate(recognizer, t) - } -} - -// {@inheritDoc} -// -//

The default implementation reSynchronizes the parser by consuming tokens -// until we find one in the reSynchronization set--loosely the set of tokens -// that can follow the current rule.

-// -func (d *DefaultErrorStrategy) Recover(recognizer Parser, e RecognitionException) { - - if d.lastErrorIndex == recognizer.GetInputStream().Index() && - d.lastErrorStates != nil && d.lastErrorStates.contains(recognizer.GetState()) { - // uh oh, another error at same token index and previously-Visited - // state in ATN must be a case where LT(1) is in the recovery - // token set so nothing got consumed. Consume a single token - // at least to prevent an infinite loop d is a failsafe. - recognizer.Consume() - } - d.lastErrorIndex = recognizer.GetInputStream().Index() - if d.lastErrorStates == nil { - d.lastErrorStates = NewIntervalSet() - } - d.lastErrorStates.addOne(recognizer.GetState()) - followSet := d.getErrorRecoverySet(recognizer) - d.consumeUntil(recognizer, followSet) -} - -// The default implementation of {@link ANTLRErrorStrategy//Sync} makes sure -// that the current lookahead symbol is consistent with what were expecting -// at d point in the ATN. You can call d anytime but ANTLR only -// generates code to check before subrules/loops and each iteration. -// -//

Implements Jim Idle's magic Sync mechanism in closures and optional -// subrules. E.g.,

-// -//
-// a : Sync ( stuff Sync )*
-// Sync : {consume to what can follow Sync}
-// 
-// -// At the start of a sub rule upon error, {@link //Sync} performs single -// token deletion, if possible. If it can't do that, it bails on the current -// rule and uses the default error recovery, which consumes until the -// reSynchronization set of the current rule. -// -//

If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block -// with an empty alternative), then the expected set includes what follows -// the subrule.

-// -//

During loop iteration, it consumes until it sees a token that can start a -// sub rule or what follows loop. Yes, that is pretty aggressive. We opt to -// stay in the loop as long as possible.

-// -//

ORIGINS

-// -//

Previous versions of ANTLR did a poor job of their recovery within loops. -// A single mismatch token or missing token would force the parser to bail -// out of the entire rules surrounding the loop. So, for rule

-// -//
-// classfunc : 'class' ID '{' member* '}'
-// 
-// -// input with an extra token between members would force the parser to -// consume until it found the next class definition rather than the next -// member definition of the current class. -// -//

This functionality cost a little bit of effort because the parser has to -// compare token set at the start of the loop and at each iteration. If for -// some reason speed is suffering for you, you can turn off d -// functionality by simply overriding d method as a blank { }.

-// -func (d *DefaultErrorStrategy) Sync(recognizer Parser) { - // If already recovering, don't try to Sync - if d.inErrorRecoveryMode(recognizer) { - return - } - - s := recognizer.GetInterpreter().atn.states[recognizer.GetState()] - la := recognizer.GetTokenStream().LA(1) - - // try cheaper subset first might get lucky. seems to shave a wee bit off - nextTokens := recognizer.GetATN().NextTokens(s, nil) - if nextTokens.contains(TokenEpsilon) || nextTokens.contains(la) { - return - } - - switch s.GetStateType() { - case ATNStateBlockStart, ATNStateStarBlockStart, ATNStatePlusBlockStart, ATNStateStarLoopEntry: - // Report error and recover if possible - if d.SingleTokenDeletion(recognizer) != nil { - return - } - panic(NewInputMisMatchException(recognizer)) - case ATNStatePlusLoopBack, ATNStateStarLoopBack: - d.ReportUnwantedToken(recognizer) - expecting := NewIntervalSet() - expecting.addSet(recognizer.GetExpectedTokens()) - whatFollowsLoopIterationOrRule := expecting.addSet(d.getErrorRecoverySet(recognizer)) - d.consumeUntil(recognizer, whatFollowsLoopIterationOrRule) - default: - // do nothing if we can't identify the exact kind of ATN state - } -} - -// This is called by {@link //ReportError} when the exception is a -// {@link NoViableAltException}. -// -// @see //ReportError -// -// @param recognizer the parser instance -// @param e the recognition exception -// -func (d *DefaultErrorStrategy) ReportNoViableAlternative(recognizer Parser, e *NoViableAltException) { - tokens := recognizer.GetTokenStream() - var input string - if tokens != nil { - if e.startToken.GetTokenType() == TokenEOF { - input = "" - } else { - input = tokens.GetTextFromTokens(e.startToken, e.offendingToken) - } - } else { - input = "" - } - msg := "no viable alternative at input " + d.escapeWSAndQuote(input) - recognizer.NotifyErrorListeners(msg, e.offendingToken, e) -} - -// -// This is called by {@link //ReportError} when the exception is an -// {@link InputMisMatchException}. -// -// @see //ReportError -// -// @param recognizer the parser instance -// @param e the recognition exception -// -func (this *DefaultErrorStrategy) ReportInputMisMatch(recognizer Parser, e *InputMisMatchException) { - msg := "mismatched input " + this.GetTokenErrorDisplay(e.offendingToken) + - " expecting " + e.getExpectedTokens().StringVerbose(recognizer.GetLiteralNames(), recognizer.GetSymbolicNames(), false) - recognizer.NotifyErrorListeners(msg, e.offendingToken, e) -} - -// -// This is called by {@link //ReportError} when the exception is a -// {@link FailedPredicateException}. -// -// @see //ReportError -// -// @param recognizer the parser instance -// @param e the recognition exception -// -func (d *DefaultErrorStrategy) ReportFailedPredicate(recognizer Parser, e *FailedPredicateException) { - ruleName := recognizer.GetRuleNames()[recognizer.GetParserRuleContext().GetRuleIndex()] - msg := "rule " + ruleName + " " + e.message - recognizer.NotifyErrorListeners(msg, e.offendingToken, e) -} - -// This method is called to Report a syntax error which requires the removal -// of a token from the input stream. At the time d method is called, the -// erroneous symbol is current {@code LT(1)} symbol and has not yet been -// removed from the input stream. When d method returns, -// {@code recognizer} is in error recovery mode. -// -//

This method is called when {@link //singleTokenDeletion} identifies -// single-token deletion as a viable recovery strategy for a mismatched -// input error.

-// -//

The default implementation simply returns if the handler is already in -// error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to -// enter error recovery mode, followed by calling -// {@link Parser//NotifyErrorListeners}.

-// -// @param recognizer the parser instance -// -func (d *DefaultErrorStrategy) ReportUnwantedToken(recognizer Parser) { - if d.inErrorRecoveryMode(recognizer) { - return - } - d.beginErrorCondition(recognizer) - t := recognizer.GetCurrentToken() - tokenName := d.GetTokenErrorDisplay(t) - expecting := d.GetExpectedTokens(recognizer) - msg := "extraneous input " + tokenName + " expecting " + - expecting.StringVerbose(recognizer.GetLiteralNames(), recognizer.GetSymbolicNames(), false) - recognizer.NotifyErrorListeners(msg, t, nil) -} - -// This method is called to Report a syntax error which requires the -// insertion of a missing token into the input stream. At the time d -// method is called, the missing token has not yet been inserted. When d -// method returns, {@code recognizer} is in error recovery mode. -// -//

This method is called when {@link //singleTokenInsertion} identifies -// single-token insertion as a viable recovery strategy for a mismatched -// input error.

-// -//

The default implementation simply returns if the handler is already in -// error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to -// enter error recovery mode, followed by calling -// {@link Parser//NotifyErrorListeners}.

-// -// @param recognizer the parser instance -// -func (d *DefaultErrorStrategy) ReportMissingToken(recognizer Parser) { - if d.inErrorRecoveryMode(recognizer) { - return - } - d.beginErrorCondition(recognizer) - t := recognizer.GetCurrentToken() - expecting := d.GetExpectedTokens(recognizer) - msg := "missing " + expecting.StringVerbose(recognizer.GetLiteralNames(), recognizer.GetSymbolicNames(), false) + - " at " + d.GetTokenErrorDisplay(t) - recognizer.NotifyErrorListeners(msg, t, nil) -} - -//

The default implementation attempts to recover from the mismatched input -// by using single token insertion and deletion as described below. If the -// recovery attempt fails, d method panics an -// {@link InputMisMatchException}.

-// -//

EXTRA TOKEN (single token deletion)

-// -//

{@code LA(1)} is not what we are looking for. If {@code LA(2)} has the -// right token, however, then assume {@code LA(1)} is some extra spurious -// token and delete it. Then consume and return the next token (which was -// the {@code LA(2)} token) as the successful result of the Match operation.

-// -//

This recovery strategy is implemented by {@link -// //singleTokenDeletion}.

-// -//

MISSING TOKEN (single token insertion)

-// -//

If current token (at {@code LA(1)}) is consistent with what could come -// after the expected {@code LA(1)} token, then assume the token is missing -// and use the parser's {@link TokenFactory} to create it on the fly. The -// "insertion" is performed by returning the created token as the successful -// result of the Match operation.

-// -//

This recovery strategy is implemented by {@link -// //singleTokenInsertion}.

-// -//

EXAMPLE

-// -//

For example, Input {@code i=(3} is clearly missing the {@code ')'}. When -// the parser returns from the nested call to {@code expr}, it will have -// call chain:

-// -//
-// stat &rarr expr &rarr atom
-// 
-// -// and it will be trying to Match the {@code ')'} at d point in the -// derivation: -// -//
-// => ID '=' '(' INT ')' ('+' atom)* ''
-// ^
-// 
-// -// The attempt to Match {@code ')'} will fail when it sees {@code ''} and -// call {@link //recoverInline}. To recover, it sees that {@code LA(1)==''} -// is in the set of tokens that can follow the {@code ')'} token reference -// in rule {@code atom}. It can assume that you forgot the {@code ')'}. -// -func (d *DefaultErrorStrategy) RecoverInline(recognizer Parser) Token { - // SINGLE TOKEN DELETION - MatchedSymbol := d.SingleTokenDeletion(recognizer) - if MatchedSymbol != nil { - // we have deleted the extra token. - // now, move past ttype token as if all were ok - recognizer.Consume() - return MatchedSymbol - } - // SINGLE TOKEN INSERTION - if d.SingleTokenInsertion(recognizer) { - return d.GetMissingSymbol(recognizer) - } - // even that didn't work must panic the exception - panic(NewInputMisMatchException(recognizer)) -} - -// -// This method implements the single-token insertion inline error recovery -// strategy. It is called by {@link //recoverInline} if the single-token -// deletion strategy fails to recover from the mismatched input. If this -// method returns {@code true}, {@code recognizer} will be in error recovery -// mode. -// -//

This method determines whether or not single-token insertion is viable by -// checking if the {@code LA(1)} input symbol could be successfully Matched -// if it were instead the {@code LA(2)} symbol. If d method returns -// {@code true}, the caller is responsible for creating and inserting a -// token with the correct type to produce d behavior.

-// -// @param recognizer the parser instance -// @return {@code true} if single-token insertion is a viable recovery -// strategy for the current mismatched input, otherwise {@code false} -// -func (d *DefaultErrorStrategy) SingleTokenInsertion(recognizer Parser) bool { - currentSymbolType := recognizer.GetTokenStream().LA(1) - // if current token is consistent with what could come after current - // ATN state, then we know we're missing a token error recovery - // is free to conjure up and insert the missing token - atn := recognizer.GetInterpreter().atn - currentState := atn.states[recognizer.GetState()] - next := currentState.GetTransitions()[0].getTarget() - expectingAtLL2 := atn.NextTokens(next, recognizer.GetParserRuleContext()) - if expectingAtLL2.contains(currentSymbolType) { - d.ReportMissingToken(recognizer) - return true - } - - return false -} - -// This method implements the single-token deletion inline error recovery -// strategy. It is called by {@link //recoverInline} to attempt to recover -// from mismatched input. If this method returns nil, the parser and error -// handler state will not have changed. If this method returns non-nil, -// {@code recognizer} will not be in error recovery mode since the -// returned token was a successful Match. -// -//

If the single-token deletion is successful, d method calls -// {@link //ReportUnwantedToken} to Report the error, followed by -// {@link Parser//consume} to actually "delete" the extraneous token. Then, -// before returning {@link //ReportMatch} is called to signal a successful -// Match.

-// -// @param recognizer the parser instance -// @return the successfully Matched {@link Token} instance if single-token -// deletion successfully recovers from the mismatched input, otherwise -// {@code nil} -// -func (d *DefaultErrorStrategy) SingleTokenDeletion(recognizer Parser) Token { - NextTokenType := recognizer.GetTokenStream().LA(2) - expecting := d.GetExpectedTokens(recognizer) - if expecting.contains(NextTokenType) { - d.ReportUnwantedToken(recognizer) - // print("recoverFromMisMatchedToken deleting " \ - // + str(recognizer.GetTokenStream().LT(1)) \ - // + " since " + str(recognizer.GetTokenStream().LT(2)) \ - // + " is what we want", file=sys.stderr) - recognizer.Consume() // simply delete extra token - // we want to return the token we're actually Matching - MatchedSymbol := recognizer.GetCurrentToken() - d.ReportMatch(recognizer) // we know current token is correct - return MatchedSymbol - } - - return nil -} - -// Conjure up a missing token during error recovery. -// -// The recognizer attempts to recover from single missing -// symbols. But, actions might refer to that missing symbol. -// For example, x=ID {f($x)}. The action clearly assumes -// that there has been an identifier Matched previously and that -// $x points at that token. If that token is missing, but -// the next token in the stream is what we want we assume that -// d token is missing and we keep going. Because we -// have to return some token to replace the missing token, -// we have to conjure one up. This method gives the user control -// over the tokens returned for missing tokens. Mostly, -// you will want to create something special for identifier -// tokens. For literals such as '{' and ',', the default -// action in the parser or tree parser works. It simply creates -// a CommonToken of the appropriate type. The text will be the token. -// If you change what tokens must be created by the lexer, -// override d method to create the appropriate tokens. -// -func (d *DefaultErrorStrategy) GetMissingSymbol(recognizer Parser) Token { - currentSymbol := recognizer.GetCurrentToken() - expecting := d.GetExpectedTokens(recognizer) - expectedTokenType := expecting.first() - var tokenText string - - if expectedTokenType == TokenEOF { - tokenText = "" - } else { - ln := recognizer.GetLiteralNames() - if expectedTokenType > 0 && expectedTokenType < len(ln) { - tokenText = "" - } else { - tokenText = "" // TODO matches the JS impl - } - } - current := currentSymbol - lookback := recognizer.GetTokenStream().LT(-1) - if current.GetTokenType() == TokenEOF && lookback != nil { - current = lookback - } - - tf := recognizer.GetTokenFactory() - - return tf.Create(current.GetSource(), expectedTokenType, tokenText, TokenDefaultChannel, -1, -1, current.GetLine(), current.GetColumn()) -} - -func (d *DefaultErrorStrategy) GetExpectedTokens(recognizer Parser) *IntervalSet { - return recognizer.GetExpectedTokens() -} - -// How should a token be displayed in an error message? The default -// is to display just the text, but during development you might -// want to have a lot of information spit out. Override in that case -// to use t.String() (which, for CommonToken, dumps everything about -// the token). This is better than forcing you to override a method in -// your token objects because you don't have to go modify your lexer -// so that it creates a NewJava type. -// -func (d *DefaultErrorStrategy) GetTokenErrorDisplay(t Token) string { - if t == nil { - return "" - } - s := t.GetText() - if s == "" { - if t.GetTokenType() == TokenEOF { - s = "" - } else { - s = "<" + strconv.Itoa(t.GetTokenType()) + ">" - } - } - return d.escapeWSAndQuote(s) -} - -func (d *DefaultErrorStrategy) escapeWSAndQuote(s string) string { - s = strings.Replace(s, "\t", "\\t", -1) - s = strings.Replace(s, "\n", "\\n", -1) - s = strings.Replace(s, "\r", "\\r", -1) - return "'" + s + "'" -} - -// Compute the error recovery set for the current rule. During -// rule invocation, the parser pushes the set of tokens that can -// follow that rule reference on the stack d amounts to -// computing FIRST of what follows the rule reference in the -// enclosing rule. See LinearApproximator.FIRST(). -// This local follow set only includes tokens -// from within the rule i.e., the FIRST computation done by -// ANTLR stops at the end of a rule. -// -// EXAMPLE -// -// When you find a "no viable alt exception", the input is not -// consistent with any of the alternatives for rule r. The best -// thing to do is to consume tokens until you see something that -// can legally follow a call to r//or* any rule that called r. -// You don't want the exact set of viable next tokens because the -// input might just be missing a token--you might consume the -// rest of the input looking for one of the missing tokens. -// -// Consider grammar: -// -// a : '[' b ']' -// | '(' b ')' -// -// b : c '^' INT -// c : ID -// | INT -// -// -// At each rule invocation, the set of tokens that could follow -// that rule is pushed on a stack. Here are the various -// context-sensitive follow sets: -// -// FOLLOW(b1_in_a) = FIRST(']') = ']' -// FOLLOW(b2_in_a) = FIRST(')') = ')' -// FOLLOW(c_in_b) = FIRST('^') = '^' -// -// Upon erroneous input "[]", the call chain is -// -// a -> b -> c -// -// and, hence, the follow context stack is: -// -// depth follow set start of rule execution -// 0 a (from main()) -// 1 ']' b -// 2 '^' c -// -// Notice that ')' is not included, because b would have to have -// been called from a different context in rule a for ')' to be -// included. -// -// For error recovery, we cannot consider FOLLOW(c) -// (context-sensitive or otherwise). We need the combined set of -// all context-sensitive FOLLOW sets--the set of all tokens that -// could follow any reference in the call chain. We need to -// reSync to one of those tokens. Note that FOLLOW(c)='^' and if -// we reSync'd to that token, we'd consume until EOF. We need to -// Sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}. -// In this case, for input "[]", LA(1) is ']' and in the set, so we would -// not consume anything. After printing an error, rule c would -// return normally. Rule b would not find the required '^' though. -// At this point, it gets a mismatched token error and panics an -// exception (since LA(1) is not in the viable following token -// set). The rule exception handler tries to recover, but finds -// the same recovery set and doesn't consume anything. Rule b -// exits normally returning to rule a. Now it finds the ']' (and -// with the successful Match exits errorRecovery mode). -// -// So, you can see that the parser walks up the call chain looking -// for the token that was a member of the recovery set. -// -// Errors are not generated in errorRecovery mode. -// -// ANTLR's error recovery mechanism is based upon original ideas: -// -// "Algorithms + Data Structures = Programs" by Niklaus Wirth -// -// and -// -// "A note on error recovery in recursive descent parsers": -// http://portal.acm.org/citation.cfm?id=947902.947905 -// -// Later, Josef Grosch had some good ideas: -// -// "Efficient and Comfortable Error Recovery in Recursive Descent -// Parsers": -// ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip -// -// Like Grosch I implement context-sensitive FOLLOW sets that are combined -// at run-time upon error to avoid overhead during parsing. -// -func (d *DefaultErrorStrategy) getErrorRecoverySet(recognizer Parser) *IntervalSet { - atn := recognizer.GetInterpreter().atn - ctx := recognizer.GetParserRuleContext() - recoverSet := NewIntervalSet() - for ctx != nil && ctx.GetInvokingState() >= 0 { - // compute what follows who invoked us - invokingState := atn.states[ctx.GetInvokingState()] - rt := invokingState.GetTransitions()[0] - follow := atn.NextTokens(rt.(*RuleTransition).followState, nil) - recoverSet.addSet(follow) - ctx = ctx.GetParent().(ParserRuleContext) - } - recoverSet.removeOne(TokenEpsilon) - return recoverSet -} - -// Consume tokens until one Matches the given token set.// -func (d *DefaultErrorStrategy) consumeUntil(recognizer Parser, set *IntervalSet) { - ttype := recognizer.GetTokenStream().LA(1) - for ttype != TokenEOF && !set.contains(ttype) { - recognizer.Consume() - ttype = recognizer.GetTokenStream().LA(1) - } -} - -// -// This implementation of {@link ANTLRErrorStrategy} responds to syntax errors -// by immediately canceling the parse operation with a -// {@link ParseCancellationException}. The implementation ensures that the -// {@link ParserRuleContext//exception} field is set for all parse tree nodes -// that were not completed prior to encountering the error. -// -//

-// This error strategy is useful in the following scenarios.

-// -//
    -//
  • Two-stage parsing: This error strategy allows the first -// stage of two-stage parsing to immediately terminate if an error is -// encountered, and immediately fall back to the second stage. In addition to -// avoiding wasted work by attempting to recover from errors here, the empty -// implementation of {@link BailErrorStrategy//Sync} improves the performance of -// the first stage.
  • -//
  • Silent validation: When syntax errors are not being -// Reported or logged, and the parse result is simply ignored if errors occur, -// the {@link BailErrorStrategy} avoids wasting work on recovering from errors -// when the result will be ignored either way.
  • -//
-// -//

-// {@code myparser.setErrorHandler(NewBailErrorStrategy())}

-// -// @see Parser//setErrorHandler(ANTLRErrorStrategy) - -type BailErrorStrategy struct { - *DefaultErrorStrategy -} - -var _ ErrorStrategy = &BailErrorStrategy{} - -func NewBailErrorStrategy() *BailErrorStrategy { - - b := new(BailErrorStrategy) - - b.DefaultErrorStrategy = NewDefaultErrorStrategy() - - return b -} - -// Instead of recovering from exception {@code e}, re-panic it wrapped -// in a {@link ParseCancellationException} so it is not caught by the -// rule func catches. Use {@link Exception//getCause()} to get the -// original {@link RecognitionException}. -// -func (b *BailErrorStrategy) Recover(recognizer Parser, e RecognitionException) { - context := recognizer.GetParserRuleContext() - for context != nil { - context.SetException(e) - context = context.GetParent().(ParserRuleContext) - } - panic(NewParseCancellationException()) // TODO we don't emit e properly -} - -// Make sure we don't attempt to recover inline if the parser -// successfully recovers, it won't panic an exception. -// -func (b *BailErrorStrategy) RecoverInline(recognizer Parser) Token { - b.Recover(recognizer, NewInputMisMatchException(recognizer)) - - return nil -} - -// Make sure we don't attempt to recover from problems in subrules.// -func (b *BailErrorStrategy) Sync(recognizer Parser) { - // pass -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/errors.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/errors.go deleted file mode 100644 index 2ef74926ecb1..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/errors.go +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// The root of the ANTLR exception hierarchy. In general, ANTLR tracks just -// 3 kinds of errors: prediction errors, failed predicate errors, and -// mismatched input errors. In each case, the parser knows where it is -// in the input, where it is in the ATN, the rule invocation stack, -// and what kind of problem occurred. - -type RecognitionException interface { - GetOffendingToken() Token - GetMessage() string - GetInputStream() IntStream -} - -type BaseRecognitionException struct { - message string - recognizer Recognizer - offendingToken Token - offendingState int - ctx RuleContext - input IntStream -} - -func NewBaseRecognitionException(message string, recognizer Recognizer, input IntStream, ctx RuleContext) *BaseRecognitionException { - - // todo - // Error.call(this) - // - // if (!!Error.captureStackTrace) { - // Error.captureStackTrace(this, RecognitionException) - // } else { - // stack := NewError().stack - // } - // TODO may be able to use - "runtime" func Stack(buf []byte, all bool) int - - t := new(BaseRecognitionException) - - t.message = message - t.recognizer = recognizer - t.input = input - t.ctx = ctx - // The current {@link Token} when an error occurred. Since not all streams - // support accessing symbols by index, we have to track the {@link Token} - // instance itself. - t.offendingToken = nil - // Get the ATN state number the parser was in at the time the error - // occurred. For {@link NoViableAltException} and - // {@link LexerNoViableAltException} exceptions, this is the - // {@link DecisionState} number. For others, it is the state whose outgoing - // edge we couldn't Match. - t.offendingState = -1 - if t.recognizer != nil { - t.offendingState = t.recognizer.GetState() - } - - return t -} - -func (b *BaseRecognitionException) GetMessage() string { - return b.message -} - -func (b *BaseRecognitionException) GetOffendingToken() Token { - return b.offendingToken -} - -func (b *BaseRecognitionException) GetInputStream() IntStream { - return b.input -} - -//

If the state number is not known, b method returns -1.

- -// -// Gets the set of input symbols which could potentially follow the -// previously Matched symbol at the time b exception was panicn. -// -//

If the set of expected tokens is not known and could not be computed, -// b method returns {@code nil}.

-// -// @return The set of token types that could potentially follow the current -// state in the ATN, or {@code nil} if the information is not available. -// / -func (b *BaseRecognitionException) getExpectedTokens() *IntervalSet { - if b.recognizer != nil { - return b.recognizer.GetATN().getExpectedTokens(b.offendingState, b.ctx) - } - - return nil -} - -func (b *BaseRecognitionException) String() string { - return b.message -} - -type LexerNoViableAltException struct { - *BaseRecognitionException - - startIndex int - deadEndConfigs ATNConfigSet -} - -func NewLexerNoViableAltException(lexer Lexer, input CharStream, startIndex int, deadEndConfigs ATNConfigSet) *LexerNoViableAltException { - - l := new(LexerNoViableAltException) - - l.BaseRecognitionException = NewBaseRecognitionException("", lexer, input, nil) - - l.startIndex = startIndex - l.deadEndConfigs = deadEndConfigs - - return l -} - -func (l *LexerNoViableAltException) String() string { - symbol := "" - if l.startIndex >= 0 && l.startIndex < l.input.Size() { - symbol = l.input.(CharStream).GetTextFromInterval(NewInterval(l.startIndex, l.startIndex)) - } - return "LexerNoViableAltException" + symbol -} - -type NoViableAltException struct { - *BaseRecognitionException - - startToken Token - offendingToken Token - ctx ParserRuleContext - deadEndConfigs ATNConfigSet -} - -// Indicates that the parser could not decide which of two or more paths -// to take based upon the remaining input. It tracks the starting token -// of the offending input and also knows where the parser was -// in the various paths when the error. Reported by ReportNoViableAlternative() -// -func NewNoViableAltException(recognizer Parser, input TokenStream, startToken Token, offendingToken Token, deadEndConfigs ATNConfigSet, ctx ParserRuleContext) *NoViableAltException { - - if ctx == nil { - ctx = recognizer.GetParserRuleContext() - } - - if offendingToken == nil { - offendingToken = recognizer.GetCurrentToken() - } - - if startToken == nil { - startToken = recognizer.GetCurrentToken() - } - - if input == nil { - input = recognizer.GetInputStream().(TokenStream) - } - - n := new(NoViableAltException) - n.BaseRecognitionException = NewBaseRecognitionException("", recognizer, input, ctx) - - // Which configurations did we try at input.Index() that couldn't Match - // input.LT(1)?// - n.deadEndConfigs = deadEndConfigs - // The token object at the start index the input stream might - // not be buffering tokens so get a reference to it. (At the - // time the error occurred, of course the stream needs to keep a - // buffer all of the tokens but later we might not have access to those.) - n.startToken = startToken - n.offendingToken = offendingToken - - return n -} - -type InputMisMatchException struct { - *BaseRecognitionException -} - -// This signifies any kind of mismatched input exceptions such as -// when the current input does not Match the expected token. -// -func NewInputMisMatchException(recognizer Parser) *InputMisMatchException { - - i := new(InputMisMatchException) - i.BaseRecognitionException = NewBaseRecognitionException("", recognizer, recognizer.GetInputStream(), recognizer.GetParserRuleContext()) - - i.offendingToken = recognizer.GetCurrentToken() - - return i - -} - -// A semantic predicate failed during validation. Validation of predicates -// occurs when normally parsing the alternative just like Matching a token. -// Disambiguating predicate evaluation occurs when we test a predicate during -// prediction. - -type FailedPredicateException struct { - *BaseRecognitionException - - ruleIndex int - predicateIndex int - predicate string -} - -func NewFailedPredicateException(recognizer Parser, predicate string, message string) *FailedPredicateException { - - f := new(FailedPredicateException) - - f.BaseRecognitionException = NewBaseRecognitionException(f.formatMessage(predicate, message), recognizer, recognizer.GetInputStream(), recognizer.GetParserRuleContext()) - - s := recognizer.GetInterpreter().atn.states[recognizer.GetState()] - trans := s.GetTransitions()[0] - if trans2, ok := trans.(*PredicateTransition); ok { - f.ruleIndex = trans2.ruleIndex - f.predicateIndex = trans2.predIndex - } else { - f.ruleIndex = 0 - f.predicateIndex = 0 - } - f.predicate = predicate - f.offendingToken = recognizer.GetCurrentToken() - - return f -} - -func (f *FailedPredicateException) formatMessage(predicate, message string) string { - if message != "" { - return message - } - - return "failed predicate: {" + predicate + "}?" -} - -type ParseCancellationException struct { -} - -func NewParseCancellationException() *ParseCancellationException { - // Error.call(this) - // Error.captureStackTrace(this, ParseCancellationException) - return new(ParseCancellationException) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/file_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/file_stream.go deleted file mode 100644 index 842170c086c9..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/file_stream.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "bytes" - "io" - "os" -) - -// This is an InputStream that is loaded from a file all at once -// when you construct the object. - -type FileStream struct { - *InputStream - - filename string -} - -func NewFileStream(fileName string) (*FileStream, error) { - - buf := bytes.NewBuffer(nil) - - f, err := os.Open(fileName) - if err != nil { - return nil, err - } - defer f.Close() - _, err = io.Copy(buf, f) - if err != nil { - return nil, err - } - - fs := new(FileStream) - - fs.filename = fileName - s := string(buf.Bytes()) - - fs.InputStream = NewInputStream(s) - - return fs, nil - -} - -func (f *FileStream) GetSourceName() string { - return f.filename -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/input_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/input_stream.go deleted file mode 100644 index 5ff270f53689..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/input_stream.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type InputStream struct { - name string - index int - data []rune - size int -} - -func NewInputStream(data string) *InputStream { - - is := new(InputStream) - - is.name = "" - is.index = 0 - is.data = []rune(data) - is.size = len(is.data) // number of runes - - return is -} - -func (is *InputStream) reset() { - is.index = 0 -} - -func (is *InputStream) Consume() { - if is.index >= is.size { - // assert is.LA(1) == TokenEOF - panic("cannot consume EOF") - } - is.index++ -} - -func (is *InputStream) LA(offset int) int { - - if offset == 0 { - return 0 // nil - } - if offset < 0 { - offset++ // e.g., translate LA(-1) to use offset=0 - } - pos := is.index + offset - 1 - - if pos < 0 || pos >= is.size { // invalid - return TokenEOF - } - - return int(is.data[pos]) -} - -func (is *InputStream) LT(offset int) int { - return is.LA(offset) -} - -func (is *InputStream) Index() int { - return is.index -} - -func (is *InputStream) Size() int { - return is.size -} - -// mark/release do nothing we have entire buffer -func (is *InputStream) Mark() int { - return -1 -} - -func (is *InputStream) Release(marker int) { -} - -func (is *InputStream) Seek(index int) { - if index <= is.index { - is.index = index // just jump don't update stream state (line,...) - return - } - // seek forward - is.index = intMin(index, is.size) -} - -func (is *InputStream) GetText(start int, stop int) string { - if stop >= is.size { - stop = is.size - 1 - } - if start >= is.size { - return "" - } - - return string(is.data[start : stop+1]) -} - -func (is *InputStream) GetTextFromTokens(start, stop Token) string { - if start != nil && stop != nil { - return is.GetTextFromInterval(NewInterval(start.GetTokenIndex(), stop.GetTokenIndex())) - } - - return "" -} - -func (is *InputStream) GetTextFromInterval(i *Interval) string { - return is.GetText(i.Start, i.Stop) -} - -func (*InputStream) GetSourceName() string { - return "Obtained from string" -} - -func (is *InputStream) String() string { - return string(is.data) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/int_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/int_stream.go deleted file mode 100644 index 438e0ea6e754..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/int_stream.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type IntStream interface { - Consume() - LA(int) int - Mark() int - Release(marker int) - Index() int - Seek(index int) - Size() int - GetSourceName() string -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/interval_set.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/interval_set.go deleted file mode 100644 index 510d90911414..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/interval_set.go +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "strconv" - "strings" -) - -type Interval struct { - Start int - Stop int -} - -/* stop is not included! */ -func NewInterval(start, stop int) *Interval { - i := new(Interval) - - i.Start = start - i.Stop = stop - return i -} - -func (i *Interval) Contains(item int) bool { - return item >= i.Start && item < i.Stop -} - -func (i *Interval) String() string { - if i.Start == i.Stop-1 { - return strconv.Itoa(i.Start) - } - - return strconv.Itoa(i.Start) + ".." + strconv.Itoa(i.Stop-1) -} - -func (i *Interval) length() int { - return i.Stop - i.Start -} - -type IntervalSet struct { - intervals []*Interval - readOnly bool -} - -func NewIntervalSet() *IntervalSet { - - i := new(IntervalSet) - - i.intervals = nil - i.readOnly = false - - return i -} - -func (i *IntervalSet) first() int { - if len(i.intervals) == 0 { - return TokenInvalidType - } - - return i.intervals[0].Start -} - -func (i *IntervalSet) addOne(v int) { - i.addInterval(NewInterval(v, v+1)) -} - -func (i *IntervalSet) addRange(l, h int) { - i.addInterval(NewInterval(l, h+1)) -} - -func (i *IntervalSet) addInterval(v *Interval) { - if i.intervals == nil { - i.intervals = make([]*Interval, 0) - i.intervals = append(i.intervals, v) - } else { - // find insert pos - for k, interval := range i.intervals { - // distinct range -> insert - if v.Stop < interval.Start { - i.intervals = append(i.intervals[0:k], append([]*Interval{v}, i.intervals[k:]...)...) - return - } else if v.Stop == interval.Start { - i.intervals[k].Start = v.Start - return - } else if v.Start <= interval.Stop { - i.intervals[k] = NewInterval(intMin(interval.Start, v.Start), intMax(interval.Stop, v.Stop)) - - // if not applying to end, merge potential overlaps - if k < len(i.intervals)-1 { - l := i.intervals[k] - r := i.intervals[k+1] - // if r contained in l - if l.Stop >= r.Stop { - i.intervals = append(i.intervals[0:k+1], i.intervals[k+2:]...) - } else if l.Stop >= r.Start { // partial overlap - i.intervals[k] = NewInterval(l.Start, r.Stop) - i.intervals = append(i.intervals[0:k+1], i.intervals[k+2:]...) - } - } - return - } - } - // greater than any exiting - i.intervals = append(i.intervals, v) - } -} - -func (i *IntervalSet) addSet(other *IntervalSet) *IntervalSet { - if other.intervals != nil { - for k := 0; k < len(other.intervals); k++ { - i2 := other.intervals[k] - i.addInterval(NewInterval(i2.Start, i2.Stop)) - } - } - return i -} - -func (i *IntervalSet) complement(start int, stop int) *IntervalSet { - result := NewIntervalSet() - result.addInterval(NewInterval(start, stop+1)) - for j := 0; j < len(i.intervals); j++ { - result.removeRange(i.intervals[j]) - } - return result -} - -func (i *IntervalSet) contains(item int) bool { - if i.intervals == nil { - return false - } - for k := 0; k < len(i.intervals); k++ { - if i.intervals[k].Contains(item) { - return true - } - } - return false -} - -func (i *IntervalSet) length() int { - len := 0 - - for _, v := range i.intervals { - len += v.length() - } - - return len -} - -func (i *IntervalSet) removeRange(v *Interval) { - if v.Start == v.Stop-1 { - i.removeOne(v.Start) - } else if i.intervals != nil { - k := 0 - for n := 0; n < len(i.intervals); n++ { - ni := i.intervals[k] - // intervals are ordered - if v.Stop <= ni.Start { - return - } else if v.Start > ni.Start && v.Stop < ni.Stop { - i.intervals[k] = NewInterval(ni.Start, v.Start) - x := NewInterval(v.Stop, ni.Stop) - // i.intervals.splice(k, 0, x) - i.intervals = append(i.intervals[0:k], append([]*Interval{x}, i.intervals[k:]...)...) - return - } else if v.Start <= ni.Start && v.Stop >= ni.Stop { - // i.intervals.splice(k, 1) - i.intervals = append(i.intervals[0:k], i.intervals[k+1:]...) - k = k - 1 // need another pass - } else if v.Start < ni.Stop { - i.intervals[k] = NewInterval(ni.Start, v.Start) - } else if v.Stop < ni.Stop { - i.intervals[k] = NewInterval(v.Stop, ni.Stop) - } - k++ - } - } -} - -func (i *IntervalSet) removeOne(v int) { - if i.intervals != nil { - for k := 0; k < len(i.intervals); k++ { - ki := i.intervals[k] - // intervals i ordered - if v < ki.Start { - return - } else if v == ki.Start && v == ki.Stop-1 { - // i.intervals.splice(k, 1) - i.intervals = append(i.intervals[0:k], i.intervals[k+1:]...) - return - } else if v == ki.Start { - i.intervals[k] = NewInterval(ki.Start+1, ki.Stop) - return - } else if v == ki.Stop-1 { - i.intervals[k] = NewInterval(ki.Start, ki.Stop-1) - return - } else if v < ki.Stop-1 { - x := NewInterval(ki.Start, v) - ki.Start = v + 1 - // i.intervals.splice(k, 0, x) - i.intervals = append(i.intervals[0:k], append([]*Interval{x}, i.intervals[k:]...)...) - return - } - } - } -} - -func (i *IntervalSet) String() string { - return i.StringVerbose(nil, nil, false) -} - -func (i *IntervalSet) StringVerbose(literalNames []string, symbolicNames []string, elemsAreChar bool) string { - - if i.intervals == nil { - return "{}" - } else if literalNames != nil || symbolicNames != nil { - return i.toTokenString(literalNames, symbolicNames) - } else if elemsAreChar { - return i.toCharString() - } - - return i.toIndexString() -} - -func (i *IntervalSet) toCharString() string { - names := make([]string, len(i.intervals)) - - for j := 0; j < len(i.intervals); j++ { - v := i.intervals[j] - if v.Stop == v.Start+1 { - if v.Start == TokenEOF { - names = append(names, "") - } else { - names = append(names, ("'" + string(v.Start) + "'")) - } - } else { - names = append(names, "'"+string(v.Start)+"'..'"+string(v.Stop-1)+"'") - } - } - if len(names) > 1 { - return "{" + strings.Join(names, ", ") + "}" - } - - return names[0] -} - -func (i *IntervalSet) toIndexString() string { - - names := make([]string, 0) - for j := 0; j < len(i.intervals); j++ { - v := i.intervals[j] - if v.Stop == v.Start+1 { - if v.Start == TokenEOF { - names = append(names, "") - } else { - names = append(names, strconv.Itoa(v.Start)) - } - } else { - names = append(names, strconv.Itoa(v.Start)+".."+strconv.Itoa(v.Stop-1)) - } - } - if len(names) > 1 { - return "{" + strings.Join(names, ", ") + "}" - } - - return names[0] -} - -func (i *IntervalSet) toTokenString(literalNames []string, symbolicNames []string) string { - names := make([]string, 0) - for _, v := range i.intervals { - for j := v.Start; j < v.Stop; j++ { - names = append(names, i.elementName(literalNames, symbolicNames, j)) - } - } - if len(names) > 1 { - return "{" + strings.Join(names, ", ") + "}" - } - - return names[0] -} - -func (i *IntervalSet) elementName(literalNames []string, symbolicNames []string, a int) string { - if a == TokenEOF { - return "" - } else if a == TokenEpsilon { - return "" - } else { - if a < len(literalNames) && literalNames[a] != "" { - return literalNames[a] - } - - return symbolicNames[a] - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer.go deleted file mode 100644 index 02deaf99cdf7..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer.go +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strconv" -) - -// A lexer is recognizer that draws input symbols from a character stream. -// lexer grammars result in a subclass of this object. A Lexer object -// uses simplified Match() and error recovery mechanisms in the interest -// of speed. -/// - -type Lexer interface { - TokenSource - Recognizer - - Emit() Token - - SetChannel(int) - PushMode(int) - PopMode() int - SetType(int) - SetMode(int) -} - -type BaseLexer struct { - *BaseRecognizer - - Interpreter ILexerATNSimulator - TokenStartCharIndex int - TokenStartLine int - TokenStartColumn int - ActionType int - Virt Lexer // The most derived lexer implementation. Allows virtual method calls. - - input CharStream - factory TokenFactory - tokenFactorySourcePair *TokenSourceCharStreamPair - token Token - hitEOF bool - channel int - thetype int - modeStack IntStack - mode int - text string -} - -func NewBaseLexer(input CharStream) *BaseLexer { - - lexer := new(BaseLexer) - - lexer.BaseRecognizer = NewBaseRecognizer() - - lexer.input = input - lexer.factory = CommonTokenFactoryDEFAULT - lexer.tokenFactorySourcePair = &TokenSourceCharStreamPair{lexer, input} - - lexer.Virt = lexer - - lexer.Interpreter = nil // child classes must populate it - - // The goal of all lexer rules/methods is to create a token object. - // l is an instance variable as multiple rules may collaborate to - // create a single token. NextToken will return l object after - // Matching lexer rule(s). If you subclass to allow multiple token - // emissions, then set l to the last token to be Matched or - // something nonnil so that the auto token emit mechanism will not - // emit another token. - lexer.token = nil - - // What character index in the stream did the current token start at? - // Needed, for example, to get the text for current token. Set at - // the start of NextToken. - lexer.TokenStartCharIndex = -1 - - // The line on which the first character of the token resides/// - lexer.TokenStartLine = -1 - - // The character position of first character within the line/// - lexer.TokenStartColumn = -1 - - // Once we see EOF on char stream, next token will be EOF. - // If you have DONE : EOF then you see DONE EOF. - lexer.hitEOF = false - - // The channel number for the current token/// - lexer.channel = TokenDefaultChannel - - // The token type for the current token/// - lexer.thetype = TokenInvalidType - - lexer.modeStack = make([]int, 0) - lexer.mode = LexerDefaultMode - - // You can set the text for the current token to override what is in - // the input char buffer. Use setText() or can set l instance var. - // / - lexer.text = "" - - return lexer -} - -const ( - LexerDefaultMode = 0 - LexerMore = -2 - LexerSkip = -3 -) - -const ( - LexerDefaultTokenChannel = TokenDefaultChannel - LexerHidden = TokenHiddenChannel - LexerMinCharValue = 0x0000 - LexerMaxCharValue = 0x10FFFF -) - -func (b *BaseLexer) reset() { - // wack Lexer state variables - if b.input != nil { - b.input.Seek(0) // rewind the input - } - b.token = nil - b.thetype = TokenInvalidType - b.channel = TokenDefaultChannel - b.TokenStartCharIndex = -1 - b.TokenStartColumn = -1 - b.TokenStartLine = -1 - b.text = "" - - b.hitEOF = false - b.mode = LexerDefaultMode - b.modeStack = make([]int, 0) - - b.Interpreter.reset() -} - -func (b *BaseLexer) GetInterpreter() ILexerATNSimulator { - return b.Interpreter -} - -func (b *BaseLexer) GetInputStream() CharStream { - return b.input -} - -func (b *BaseLexer) GetSourceName() string { - return b.GrammarFileName -} - -func (b *BaseLexer) SetChannel(v int) { - b.channel = v -} - -func (b *BaseLexer) GetTokenFactory() TokenFactory { - return b.factory -} - -func (b *BaseLexer) setTokenFactory(f TokenFactory) { - b.factory = f -} - -func (b *BaseLexer) safeMatch() (ret int) { - defer func() { - if e := recover(); e != nil { - if re, ok := e.(RecognitionException); ok { - b.notifyListeners(re) // Report error - b.Recover(re) - ret = LexerSkip // default - } - } - }() - - return b.Interpreter.Match(b.input, b.mode) -} - -// Return a token from l source i.e., Match a token on the char stream. -func (b *BaseLexer) NextToken() Token { - if b.input == nil { - panic("NextToken requires a non-nil input stream.") - } - - tokenStartMarker := b.input.Mark() - - // previously in finally block - defer func() { - // make sure we release marker after Match or - // unbuffered char stream will keep buffering - b.input.Release(tokenStartMarker) - }() - - for { - if b.hitEOF { - b.EmitEOF() - return b.token - } - b.token = nil - b.channel = TokenDefaultChannel - b.TokenStartCharIndex = b.input.Index() - b.TokenStartColumn = b.Interpreter.GetCharPositionInLine() - b.TokenStartLine = b.Interpreter.GetLine() - b.text = "" - continueOuter := false - for { - b.thetype = TokenInvalidType - ttype := LexerSkip - - ttype = b.safeMatch() - - if b.input.LA(1) == TokenEOF { - b.hitEOF = true - } - if b.thetype == TokenInvalidType { - b.thetype = ttype - } - if b.thetype == LexerSkip { - continueOuter = true - break - } - if b.thetype != LexerMore { - break - } - } - - if continueOuter { - continue - } - if b.token == nil { - b.Virt.Emit() - } - return b.token - } - - return nil -} - -// Instruct the lexer to Skip creating a token for current lexer rule -// and look for another token. NextToken() knows to keep looking when -// a lexer rule finishes with token set to SKIPTOKEN. Recall that -// if token==nil at end of any token rule, it creates one for you -// and emits it. -// / -func (b *BaseLexer) Skip() { - b.thetype = LexerSkip -} - -func (b *BaseLexer) More() { - b.thetype = LexerMore -} - -func (b *BaseLexer) SetMode(m int) { - b.mode = m -} - -func (b *BaseLexer) PushMode(m int) { - if LexerATNSimulatorDebug { - fmt.Println("pushMode " + strconv.Itoa(m)) - } - b.modeStack.Push(b.mode) - b.mode = m -} - -func (b *BaseLexer) PopMode() int { - if len(b.modeStack) == 0 { - panic("Empty Stack") - } - if LexerATNSimulatorDebug { - fmt.Println("popMode back to " + fmt.Sprint(b.modeStack[0:len(b.modeStack)-1])) - } - i, _ := b.modeStack.Pop() - b.mode = i - return b.mode -} - -func (b *BaseLexer) inputStream() CharStream { - return b.input -} - -func (b *BaseLexer) setInputStream(input CharStream) { - b.input = nil - b.tokenFactorySourcePair = &TokenSourceCharStreamPair{b, b.input} - b.reset() - b.input = input - b.tokenFactorySourcePair = &TokenSourceCharStreamPair{b, b.input} -} - -func (b *BaseLexer) GetTokenSourceCharStreamPair() *TokenSourceCharStreamPair { - return b.tokenFactorySourcePair -} - -// By default does not support multiple emits per NextToken invocation -// for efficiency reasons. Subclass and override l method, NextToken, -// and GetToken (to push tokens into a list and pull from that list -// rather than a single variable as l implementation does). -// / -func (b *BaseLexer) EmitToken(token Token) { - b.token = token -} - -// The standard method called to automatically emit a token at the -// outermost lexical rule. The token object should point into the -// char buffer start..stop. If there is a text override in 'text', -// use that to set the token's text. Override l method to emit -// custom Token objects or provide a Newfactory. -// / -func (b *BaseLexer) Emit() Token { - t := b.factory.Create(b.tokenFactorySourcePair, b.thetype, b.text, b.channel, b.TokenStartCharIndex, b.GetCharIndex()-1, b.TokenStartLine, b.TokenStartColumn) - b.EmitToken(t) - return t -} - -func (b *BaseLexer) EmitEOF() Token { - cpos := b.GetCharPositionInLine() - lpos := b.GetLine() - eof := b.factory.Create(b.tokenFactorySourcePair, TokenEOF, "", TokenDefaultChannel, b.input.Index(), b.input.Index()-1, lpos, cpos) - b.EmitToken(eof) - return eof -} - -func (b *BaseLexer) GetCharPositionInLine() int { - return b.Interpreter.GetCharPositionInLine() -} - -func (b *BaseLexer) GetLine() int { - return b.Interpreter.GetLine() -} - -func (b *BaseLexer) GetType() int { - return b.thetype -} - -func (b *BaseLexer) SetType(t int) { - b.thetype = t -} - -// What is the index of the current character of lookahead?/// -func (b *BaseLexer) GetCharIndex() int { - return b.input.Index() -} - -// Return the text Matched so far for the current token or any text override. -//Set the complete text of l token it wipes any previous changes to the text. -func (b *BaseLexer) GetText() string { - if b.text != "" { - return b.text - } - - return b.Interpreter.GetText(b.input) -} - -func (b *BaseLexer) SetText(text string) { - b.text = text -} - -func (b *BaseLexer) GetATN() *ATN { - return b.Interpreter.ATN() -} - -// Return a list of all Token objects in input char stream. -// Forces load of all tokens. Does not include EOF token. -// / -func (b *BaseLexer) GetAllTokens() []Token { - vl := b.Virt - tokens := make([]Token, 0) - t := vl.NextToken() - for t.GetTokenType() != TokenEOF { - tokens = append(tokens, t) - t = vl.NextToken() - } - return tokens -} - -func (b *BaseLexer) notifyListeners(e RecognitionException) { - start := b.TokenStartCharIndex - stop := b.input.Index() - text := b.input.GetTextFromInterval(NewInterval(start, stop)) - msg := "token recognition error at: '" + text + "'" - listener := b.GetErrorListenerDispatch() - listener.SyntaxError(b, nil, b.TokenStartLine, b.TokenStartColumn, msg, e) -} - -func (b *BaseLexer) getErrorDisplayForChar(c rune) string { - if c == TokenEOF { - return "" - } else if c == '\n' { - return "\\n" - } else if c == '\t' { - return "\\t" - } else if c == '\r' { - return "\\r" - } else { - return string(c) - } -} - -func (b *BaseLexer) getCharErrorDisplay(c rune) string { - return "'" + b.getErrorDisplayForChar(c) + "'" -} - -// Lexers can normally Match any char in it's vocabulary after Matching -// a token, so do the easy thing and just kill a character and hope -// it all works out. You can instead use the rule invocation stack -// to do sophisticated error recovery if you are in a fragment rule. -// / -func (b *BaseLexer) Recover(re RecognitionException) { - if b.input.LA(1) != TokenEOF { - if _, ok := re.(*LexerNoViableAltException); ok { - // Skip a char and try again - b.Interpreter.Consume(b.input) - } else { - // TODO: Do we lose character or line position information? - b.input.Consume() - } - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_action.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_action.go deleted file mode 100644 index 20df84f9437b..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_action.go +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import "strconv" - -const ( - LexerActionTypeChannel = 0 //The type of a {@link LexerChannelAction} action. - LexerActionTypeCustom = 1 //The type of a {@link LexerCustomAction} action. - LexerActionTypeMode = 2 //The type of a {@link LexerModeAction} action. - LexerActionTypeMore = 3 //The type of a {@link LexerMoreAction} action. - LexerActionTypePopMode = 4 //The type of a {@link LexerPopModeAction} action. - LexerActionTypePushMode = 5 //The type of a {@link LexerPushModeAction} action. - LexerActionTypeSkip = 6 //The type of a {@link LexerSkipAction} action. - LexerActionTypeType = 7 //The type of a {@link LexerTypeAction} action. -) - -type LexerAction interface { - getActionType() int - getIsPositionDependent() bool - execute(lexer Lexer) - hash() int - equals(other LexerAction) bool -} - -type BaseLexerAction struct { - actionType int - isPositionDependent bool -} - -func NewBaseLexerAction(action int) *BaseLexerAction { - la := new(BaseLexerAction) - - la.actionType = action - la.isPositionDependent = false - - return la -} - -func (b *BaseLexerAction) execute(lexer Lexer) { - panic("Not implemented") -} - -func (b *BaseLexerAction) getActionType() int { - return b.actionType -} - -func (b *BaseLexerAction) getIsPositionDependent() bool { - return b.isPositionDependent -} - -func (b *BaseLexerAction) hash() int { - return b.actionType -} - -func (b *BaseLexerAction) equals(other LexerAction) bool { - return b == other -} - -// -// Implements the {@code Skip} lexer action by calling {@link Lexer//Skip}. -// -//

The {@code Skip} command does not have any parameters, so l action is -// implemented as a singleton instance exposed by {@link //INSTANCE}.

-type LexerSkipAction struct { - *BaseLexerAction -} - -func NewLexerSkipAction() *LexerSkipAction { - la := new(LexerSkipAction) - la.BaseLexerAction = NewBaseLexerAction(LexerActionTypeSkip) - return la -} - -// Provides a singleton instance of l parameterless lexer action. -var LexerSkipActionINSTANCE = NewLexerSkipAction() - -func (l *LexerSkipAction) execute(lexer Lexer) { - lexer.Skip() -} - -func (l *LexerSkipAction) String() string { - return "skip" -} - -// Implements the {@code type} lexer action by calling {@link Lexer//setType} -// with the assigned type. -type LexerTypeAction struct { - *BaseLexerAction - - thetype int -} - -func NewLexerTypeAction(thetype int) *LexerTypeAction { - l := new(LexerTypeAction) - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypeType) - l.thetype = thetype - return l -} - -func (l *LexerTypeAction) execute(lexer Lexer) { - lexer.SetType(l.thetype) -} - -func (l *LexerTypeAction) hash() int { - h := murmurInit(0) - h = murmurUpdate(h, l.actionType) - h = murmurUpdate(h, l.thetype) - return murmurFinish(h, 2) -} - -func (l *LexerTypeAction) equals(other LexerAction) bool { - if l == other { - return true - } else if _, ok := other.(*LexerTypeAction); !ok { - return false - } else { - return l.thetype == other.(*LexerTypeAction).thetype - } -} - -func (l *LexerTypeAction) String() string { - return "actionType(" + strconv.Itoa(l.thetype) + ")" -} - -// Implements the {@code pushMode} lexer action by calling -// {@link Lexer//pushMode} with the assigned mode. -type LexerPushModeAction struct { - *BaseLexerAction - - mode int -} - -func NewLexerPushModeAction(mode int) *LexerPushModeAction { - - l := new(LexerPushModeAction) - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypePushMode) - - l.mode = mode - return l -} - -//

This action is implemented by calling {@link Lexer//pushMode} with the -// value provided by {@link //getMode}.

-func (l *LexerPushModeAction) execute(lexer Lexer) { - lexer.PushMode(l.mode) -} - -func (l *LexerPushModeAction) hash() int { - h := murmurInit(0) - h = murmurUpdate(h, l.actionType) - h = murmurUpdate(h, l.mode) - return murmurFinish(h, 2) -} - -func (l *LexerPushModeAction) equals(other LexerAction) bool { - if l == other { - return true - } else if _, ok := other.(*LexerPushModeAction); !ok { - return false - } else { - return l.mode == other.(*LexerPushModeAction).mode - } -} - -func (l *LexerPushModeAction) String() string { - return "pushMode(" + strconv.Itoa(l.mode) + ")" -} - -// Implements the {@code popMode} lexer action by calling {@link Lexer//popMode}. -// -//

The {@code popMode} command does not have any parameters, so l action is -// implemented as a singleton instance exposed by {@link //INSTANCE}.

-type LexerPopModeAction struct { - *BaseLexerAction -} - -func NewLexerPopModeAction() *LexerPopModeAction { - - l := new(LexerPopModeAction) - - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypePopMode) - - return l -} - -var LexerPopModeActionINSTANCE = NewLexerPopModeAction() - -//

This action is implemented by calling {@link Lexer//popMode}.

-func (l *LexerPopModeAction) execute(lexer Lexer) { - lexer.PopMode() -} - -func (l *LexerPopModeAction) String() string { - return "popMode" -} - -// Implements the {@code more} lexer action by calling {@link Lexer//more}. -// -//

The {@code more} command does not have any parameters, so l action is -// implemented as a singleton instance exposed by {@link //INSTANCE}.

- -type LexerMoreAction struct { - *BaseLexerAction -} - -func NewLexerMoreAction() *LexerMoreAction { - l := new(LexerMoreAction) - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypeMore) - - return l -} - -var LexerMoreActionINSTANCE = NewLexerMoreAction() - -//

This action is implemented by calling {@link Lexer//popMode}.

-func (l *LexerMoreAction) execute(lexer Lexer) { - lexer.More() -} - -func (l *LexerMoreAction) String() string { - return "more" -} - -// Implements the {@code mode} lexer action by calling {@link Lexer//mode} with -// the assigned mode. -type LexerModeAction struct { - *BaseLexerAction - - mode int -} - -func NewLexerModeAction(mode int) *LexerModeAction { - l := new(LexerModeAction) - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypeMode) - l.mode = mode - return l -} - -//

This action is implemented by calling {@link Lexer//mode} with the -// value provided by {@link //getMode}.

-func (l *LexerModeAction) execute(lexer Lexer) { - lexer.SetMode(l.mode) -} - -func (l *LexerModeAction) hash() int { - h := murmurInit(0) - h = murmurUpdate(h, l.actionType) - h = murmurUpdate(h, l.mode) - return murmurFinish(h, 2) -} - -func (l *LexerModeAction) equals(other LexerAction) bool { - if l == other { - return true - } else if _, ok := other.(*LexerModeAction); !ok { - return false - } else { - return l.mode == other.(*LexerModeAction).mode - } -} - -func (l *LexerModeAction) String() string { - return "mode(" + strconv.Itoa(l.mode) + ")" -} - -// Executes a custom lexer action by calling {@link Recognizer//action} with the -// rule and action indexes assigned to the custom action. The implementation of -// a custom action is added to the generated code for the lexer in an override -// of {@link Recognizer//action} when the grammar is compiled. -// -//

This class may represent embedded actions created with the {...} -// syntax in ANTLR 4, as well as actions created for lexer commands where the -// command argument could not be evaluated when the grammar was compiled.

- -// Constructs a custom lexer action with the specified rule and action -// indexes. -// -// @param ruleIndex The rule index to use for calls to -// {@link Recognizer//action}. -// @param actionIndex The action index to use for calls to -// {@link Recognizer//action}. - -type LexerCustomAction struct { - *BaseLexerAction - ruleIndex, actionIndex int -} - -func NewLexerCustomAction(ruleIndex, actionIndex int) *LexerCustomAction { - l := new(LexerCustomAction) - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypeCustom) - l.ruleIndex = ruleIndex - l.actionIndex = actionIndex - l.isPositionDependent = true - return l -} - -//

Custom actions are implemented by calling {@link Lexer//action} with the -// appropriate rule and action indexes.

-func (l *LexerCustomAction) execute(lexer Lexer) { - lexer.Action(nil, l.ruleIndex, l.actionIndex) -} - -func (l *LexerCustomAction) hash() int { - h := murmurInit(0) - h = murmurUpdate(h, l.actionType) - h = murmurUpdate(h, l.ruleIndex) - h = murmurUpdate(h, l.actionIndex) - return murmurFinish(h, 3) -} - -func (l *LexerCustomAction) equals(other LexerAction) bool { - if l == other { - return true - } else if _, ok := other.(*LexerCustomAction); !ok { - return false - } else { - return l.ruleIndex == other.(*LexerCustomAction).ruleIndex && l.actionIndex == other.(*LexerCustomAction).actionIndex - } -} - -// Implements the {@code channel} lexer action by calling -// {@link Lexer//setChannel} with the assigned channel. -// Constructs a New{@code channel} action with the specified channel value. -// @param channel The channel value to pass to {@link Lexer//setChannel}. -type LexerChannelAction struct { - *BaseLexerAction - - channel int -} - -func NewLexerChannelAction(channel int) *LexerChannelAction { - l := new(LexerChannelAction) - l.BaseLexerAction = NewBaseLexerAction(LexerActionTypeChannel) - l.channel = channel - return l -} - -//

This action is implemented by calling {@link Lexer//setChannel} with the -// value provided by {@link //getChannel}.

-func (l *LexerChannelAction) execute(lexer Lexer) { - lexer.SetChannel(l.channel) -} - -func (l *LexerChannelAction) hash() int { - h := murmurInit(0) - h = murmurUpdate(h, l.actionType) - h = murmurUpdate(h, l.channel) - return murmurFinish(h, 2) -} - -func (l *LexerChannelAction) equals(other LexerAction) bool { - if l == other { - return true - } else if _, ok := other.(*LexerChannelAction); !ok { - return false - } else { - return l.channel == other.(*LexerChannelAction).channel - } -} - -func (l *LexerChannelAction) String() string { - return "channel(" + strconv.Itoa(l.channel) + ")" -} - -// This implementation of {@link LexerAction} is used for tracking input offsets -// for position-dependent actions within a {@link LexerActionExecutor}. -// -//

This action is not serialized as part of the ATN, and is only required for -// position-dependent lexer actions which appear at a location other than the -// end of a rule. For more information about DFA optimizations employed for -// lexer actions, see {@link LexerActionExecutor//append} and -// {@link LexerActionExecutor//fixOffsetBeforeMatch}.

- -// Constructs a Newindexed custom action by associating a character offset -// with a {@link LexerAction}. -// -//

Note: This class is only required for lexer actions for which -// {@link LexerAction//isPositionDependent} returns {@code true}.

-// -// @param offset The offset into the input {@link CharStream}, relative to -// the token start index, at which the specified lexer action should be -// executed. -// @param action The lexer action to execute at a particular offset in the -// input {@link CharStream}. -type LexerIndexedCustomAction struct { - *BaseLexerAction - - offset int - lexerAction LexerAction - isPositionDependent bool -} - -func NewLexerIndexedCustomAction(offset int, lexerAction LexerAction) *LexerIndexedCustomAction { - - l := new(LexerIndexedCustomAction) - l.BaseLexerAction = NewBaseLexerAction(lexerAction.getActionType()) - - l.offset = offset - l.lexerAction = lexerAction - l.isPositionDependent = true - - return l -} - -//

This method calls {@link //execute} on the result of {@link //getAction} -// using the provided {@code lexer}.

-func (l *LexerIndexedCustomAction) execute(lexer Lexer) { - // assume the input stream position was properly set by the calling code - l.lexerAction.execute(lexer) -} - -func (l *LexerIndexedCustomAction) hash() int { - h := murmurInit(0) - h = murmurUpdate(h, l.actionType) - h = murmurUpdate(h, l.offset) - h = murmurUpdate(h, l.lexerAction.hash()) - return murmurFinish(h, 3) -} - -func (l *LexerIndexedCustomAction) equals(other LexerAction) bool { - if l == other { - return true - } else if _, ok := other.(*LexerIndexedCustomAction); !ok { - return false - } else { - return l.offset == other.(*LexerIndexedCustomAction).offset && l.lexerAction == other.(*LexerIndexedCustomAction).lexerAction - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_action_executor.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_action_executor.go deleted file mode 100644 index 80b949a1a54b..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_action_executor.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// Represents an executor for a sequence of lexer actions which traversed during -// the Matching operation of a lexer rule (token). -// -//

The executor tracks position information for position-dependent lexer actions -// efficiently, ensuring that actions appearing only at the end of the rule do -// not cause bloating of the {@link DFA} created for the lexer.

- -type LexerActionExecutor struct { - lexerActions []LexerAction - cachedHash int -} - -func NewLexerActionExecutor(lexerActions []LexerAction) *LexerActionExecutor { - - if lexerActions == nil { - lexerActions = make([]LexerAction, 0) - } - - l := new(LexerActionExecutor) - - l.lexerActions = lexerActions - - // Caches the result of {@link //hashCode} since the hash code is an element - // of the performance-critical {@link LexerATNConfig//hashCode} operation. - l.cachedHash = murmurInit(57) - for _, a := range lexerActions { - l.cachedHash = murmurUpdate(l.cachedHash, a.hash()) - } - - return l -} - -// Creates a {@link LexerActionExecutor} which executes the actions for -// the input {@code lexerActionExecutor} followed by a specified -// {@code lexerAction}. -// -// @param lexerActionExecutor The executor for actions already traversed by -// the lexer while Matching a token within a particular -// {@link LexerATNConfig}. If this is {@code nil}, the method behaves as -// though it were an empty executor. -// @param lexerAction The lexer action to execute after the actions -// specified in {@code lexerActionExecutor}. -// -// @return A {@link LexerActionExecutor} for executing the combine actions -// of {@code lexerActionExecutor} and {@code lexerAction}. -func LexerActionExecutorappend(lexerActionExecutor *LexerActionExecutor, lexerAction LexerAction) *LexerActionExecutor { - if lexerActionExecutor == nil { - return NewLexerActionExecutor([]LexerAction{lexerAction}) - } - - return NewLexerActionExecutor(append(lexerActionExecutor.lexerActions, lexerAction)) -} - -// Creates a {@link LexerActionExecutor} which encodes the current offset -// for position-dependent lexer actions. -// -//

Normally, when the executor encounters lexer actions where -// {@link LexerAction//isPositionDependent} returns {@code true}, it calls -// {@link IntStream//seek} on the input {@link CharStream} to set the input -// position to the end of the current token. This behavior provides -// for efficient DFA representation of lexer actions which appear at the end -// of a lexer rule, even when the lexer rule Matches a variable number of -// characters.

-// -//

Prior to traversing a Match transition in the ATN, the current offset -// from the token start index is assigned to all position-dependent lexer -// actions which have not already been assigned a fixed offset. By storing -// the offsets relative to the token start index, the DFA representation of -// lexer actions which appear in the middle of tokens remains efficient due -// to sharing among tokens of the same length, regardless of their absolute -// position in the input stream.

-// -//

If the current executor already has offsets assigned to all -// position-dependent lexer actions, the method returns {@code this}.

-// -// @param offset The current offset to assign to all position-dependent -// lexer actions which do not already have offsets assigned. -// -// @return A {@link LexerActionExecutor} which stores input stream offsets -// for all position-dependent lexer actions. -// / -func (l *LexerActionExecutor) fixOffsetBeforeMatch(offset int) *LexerActionExecutor { - var updatedLexerActions []LexerAction - for i := 0; i < len(l.lexerActions); i++ { - _, ok := l.lexerActions[i].(*LexerIndexedCustomAction) - if l.lexerActions[i].getIsPositionDependent() && !ok { - if updatedLexerActions == nil { - updatedLexerActions = make([]LexerAction, 0) - - for _, a := range l.lexerActions { - updatedLexerActions = append(updatedLexerActions, a) - } - } - - updatedLexerActions[i] = NewLexerIndexedCustomAction(offset, l.lexerActions[i]) - } - } - if updatedLexerActions == nil { - return l - } - - return NewLexerActionExecutor(updatedLexerActions) -} - -// Execute the actions encapsulated by l executor within the context of a -// particular {@link Lexer}. -// -//

This method calls {@link IntStream//seek} to set the position of the -// {@code input} {@link CharStream} prior to calling -// {@link LexerAction//execute} on a position-dependent action. Before the -// method returns, the input position will be restored to the same position -// it was in when the method was invoked.

-// -// @param lexer The lexer instance. -// @param input The input stream which is the source for the current token. -// When l method is called, the current {@link IntStream//index} for -// {@code input} should be the start of the following token, i.e. 1 -// character past the end of the current token. -// @param startIndex The token start index. This value may be passed to -// {@link IntStream//seek} to set the {@code input} position to the beginning -// of the token. -// / -func (l *LexerActionExecutor) execute(lexer Lexer, input CharStream, startIndex int) { - requiresSeek := false - stopIndex := input.Index() - - defer func() { - if requiresSeek { - input.Seek(stopIndex) - } - }() - - for i := 0; i < len(l.lexerActions); i++ { - lexerAction := l.lexerActions[i] - if la, ok := lexerAction.(*LexerIndexedCustomAction); ok { - offset := la.offset - input.Seek(startIndex + offset) - lexerAction = la.lexerAction - requiresSeek = (startIndex + offset) != stopIndex - } else if lexerAction.getIsPositionDependent() { - input.Seek(stopIndex) - requiresSeek = false - } - lexerAction.execute(lexer) - } -} - -func (l *LexerActionExecutor) hash() int { - if l == nil { - return 61 - } - return l.cachedHash -} - -func (l *LexerActionExecutor) equals(other interface{}) bool { - if l == other { - return true - } else if _, ok := other.(*LexerActionExecutor); !ok { - return false - } else { - return l.cachedHash == other.(*LexerActionExecutor).cachedHash && - &l.lexerActions == &other.(*LexerActionExecutor).lexerActions - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_atn_simulator.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_atn_simulator.go deleted file mode 100644 index 131364f75ccf..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/lexer_atn_simulator.go +++ /dev/null @@ -1,658 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strconv" -) - -var ( - LexerATNSimulatorDebug = false - LexerATNSimulatorDFADebug = false - - LexerATNSimulatorMinDFAEdge = 0 - LexerATNSimulatorMaxDFAEdge = 127 // forces unicode to stay in ATN - - LexerATNSimulatorMatchCalls = 0 -) - -type ILexerATNSimulator interface { - IATNSimulator - - reset() - Match(input CharStream, mode int) int - GetCharPositionInLine() int - GetLine() int - GetText(input CharStream) string - Consume(input CharStream) -} - -type LexerATNSimulator struct { - *BaseATNSimulator - - recog Lexer - predictionMode int - mergeCache DoubleDict - startIndex int - Line int - CharPositionInLine int - mode int - prevAccept *SimState - MatchCalls int -} - -func NewLexerATNSimulator(recog Lexer, atn *ATN, decisionToDFA []*DFA, sharedContextCache *PredictionContextCache) *LexerATNSimulator { - l := new(LexerATNSimulator) - - l.BaseATNSimulator = NewBaseATNSimulator(atn, sharedContextCache) - - l.decisionToDFA = decisionToDFA - l.recog = recog - // The current token's starting index into the character stream. - // Shared across DFA to ATN simulation in case the ATN fails and the - // DFA did not have a previous accept state. In l case, we use the - // ATN-generated exception object. - l.startIndex = -1 - // line number 1..n within the input/// - l.Line = 1 - // The index of the character relative to the beginning of the line - // 0..n-1/// - l.CharPositionInLine = 0 - l.mode = LexerDefaultMode - // Used during DFA/ATN exec to record the most recent accept configuration - // info - l.prevAccept = NewSimState() - // done - return l -} - -func (l *LexerATNSimulator) copyState(simulator *LexerATNSimulator) { - l.CharPositionInLine = simulator.CharPositionInLine - l.Line = simulator.Line - l.mode = simulator.mode - l.startIndex = simulator.startIndex -} - -func (l *LexerATNSimulator) Match(input CharStream, mode int) int { - l.MatchCalls++ - l.mode = mode - mark := input.Mark() - - defer func() { - input.Release(mark) - }() - - l.startIndex = input.Index() - l.prevAccept.reset() - - dfa := l.decisionToDFA[mode] - - if dfa.s0 == nil { - return l.MatchATN(input) - } - - return l.execATN(input, dfa.s0) -} - -func (l *LexerATNSimulator) reset() { - l.prevAccept.reset() - l.startIndex = -1 - l.Line = 1 - l.CharPositionInLine = 0 - l.mode = LexerDefaultMode -} - -func (l *LexerATNSimulator) MatchATN(input CharStream) int { - startState := l.atn.modeToStartState[l.mode] - - if LexerATNSimulatorDebug { - fmt.Println("MatchATN mode " + strconv.Itoa(l.mode) + " start: " + startState.String()) - } - oldMode := l.mode - s0Closure := l.computeStartState(input, startState) - suppressEdge := s0Closure.hasSemanticContext - s0Closure.hasSemanticContext = false - - next := l.addDFAState(s0Closure) - - if !suppressEdge { - l.decisionToDFA[l.mode].setS0(next) - } - - predict := l.execATN(input, next) - - if LexerATNSimulatorDebug { - fmt.Println("DFA after MatchATN: " + l.decisionToDFA[oldMode].ToLexerString()) - } - return predict -} - -func (l *LexerATNSimulator) execATN(input CharStream, ds0 *DFAState) int { - - if LexerATNSimulatorDebug { - fmt.Println("start state closure=" + ds0.configs.String()) - } - if ds0.isAcceptState { - // allow zero-length tokens - l.captureSimState(l.prevAccept, input, ds0) - } - t := input.LA(1) - s := ds0 // s is current/from DFA state - - for { // while more work - if LexerATNSimulatorDebug { - fmt.Println("execATN loop starting closure: " + s.configs.String()) - } - - // As we move src->trg, src->trg, we keep track of the previous trg to - // avoid looking up the DFA state again, which is expensive. - // If the previous target was already part of the DFA, we might - // be able to avoid doing a reach operation upon t. If s!=nil, - // it means that semantic predicates didn't prevent us from - // creating a DFA state. Once we know s!=nil, we check to see if - // the DFA state has an edge already for t. If so, we can just reuse - // it's configuration set there's no point in re-computing it. - // This is kind of like doing DFA simulation within the ATN - // simulation because DFA simulation is really just a way to avoid - // computing reach/closure sets. Technically, once we know that - // we have a previously added DFA state, we could jump over to - // the DFA simulator. But, that would mean popping back and forth - // a lot and making things more complicated algorithmically. - // This optimization makes a lot of sense for loops within DFA. - // A character will take us back to an existing DFA state - // that already has lots of edges out of it. e.g., .* in comments. - target := l.getExistingTargetState(s, t) - if target == nil { - target = l.computeTargetState(input, s, t) - // print("Computed:" + str(target)) - } - if target == ATNSimulatorError { - break - } - // If l is a consumable input element, make sure to consume before - // capturing the accept state so the input index, line, and char - // position accurately reflect the state of the interpreter at the - // end of the token. - if t != TokenEOF { - l.Consume(input) - } - if target.isAcceptState { - l.captureSimState(l.prevAccept, input, target) - if t == TokenEOF { - break - } - } - t = input.LA(1) - s = target // flip current DFA target becomes Newsrc/from state - } - - return l.failOrAccept(l.prevAccept, input, s.configs, t) -} - -// Get an existing target state for an edge in the DFA. If the target state -// for the edge has not yet been computed or is otherwise not available, -// l method returns {@code nil}. -// -// @param s The current DFA state -// @param t The next input symbol -// @return The existing target DFA state for the given input symbol -// {@code t}, or {@code nil} if the target state for l edge is not -// already cached -func (l *LexerATNSimulator) getExistingTargetState(s *DFAState, t int) *DFAState { - if s.edges == nil || t < LexerATNSimulatorMinDFAEdge || t > LexerATNSimulatorMaxDFAEdge { - return nil - } - - target := s.edges[t-LexerATNSimulatorMinDFAEdge] - if LexerATNSimulatorDebug && target != nil { - fmt.Println("reuse state " + strconv.Itoa(s.stateNumber) + " edge to " + strconv.Itoa(target.stateNumber)) - } - return target -} - -// Compute a target state for an edge in the DFA, and attempt to add the -// computed state and corresponding edge to the DFA. -// -// @param input The input stream -// @param s The current DFA state -// @param t The next input symbol -// -// @return The computed target DFA state for the given input symbol -// {@code t}. If {@code t} does not lead to a valid DFA state, l method -// returns {@link //ERROR}. -func (l *LexerATNSimulator) computeTargetState(input CharStream, s *DFAState, t int) *DFAState { - reach := NewOrderedATNConfigSet() - - // if we don't find an existing DFA state - // Fill reach starting from closure, following t transitions - l.getReachableConfigSet(input, s.configs, reach.BaseATNConfigSet, t) - - if len(reach.configs) == 0 { // we got nowhere on t from s - if !reach.hasSemanticContext { - // we got nowhere on t, don't panic out l knowledge it'd - // cause a failover from DFA later. - l.addDFAEdge(s, t, ATNSimulatorError, nil) - } - // stop when we can't Match any more char - return ATNSimulatorError - } - // Add an edge from s to target DFA found/created for reach - return l.addDFAEdge(s, t, nil, reach.BaseATNConfigSet) -} - -func (l *LexerATNSimulator) failOrAccept(prevAccept *SimState, input CharStream, reach ATNConfigSet, t int) int { - if l.prevAccept.dfaState != nil { - lexerActionExecutor := prevAccept.dfaState.lexerActionExecutor - l.accept(input, lexerActionExecutor, l.startIndex, prevAccept.index, prevAccept.line, prevAccept.column) - return prevAccept.dfaState.prediction - } - - // if no accept and EOF is first char, return EOF - if t == TokenEOF && input.Index() == l.startIndex { - return TokenEOF - } - - panic(NewLexerNoViableAltException(l.recog, input, l.startIndex, reach)) -} - -// Given a starting configuration set, figure out all ATN configurations -// we can reach upon input {@code t}. Parameter {@code reach} is a return -// parameter. -func (l *LexerATNSimulator) getReachableConfigSet(input CharStream, closure ATNConfigSet, reach ATNConfigSet, t int) { - // l is used to Skip processing for configs which have a lower priority - // than a config that already reached an accept state for the same rule - SkipAlt := ATNInvalidAltNumber - - for _, cfg := range closure.GetItems() { - currentAltReachedAcceptState := (cfg.GetAlt() == SkipAlt) - if currentAltReachedAcceptState && cfg.(*LexerATNConfig).passedThroughNonGreedyDecision { - continue - } - - if LexerATNSimulatorDebug { - - fmt.Printf("testing %s at %s\n", l.GetTokenName(t), cfg.String()) // l.recog, true)) - } - - for _, trans := range cfg.GetState().GetTransitions() { - target := l.getReachableTarget(trans, t) - if target != nil { - lexerActionExecutor := cfg.(*LexerATNConfig).lexerActionExecutor - if lexerActionExecutor != nil { - lexerActionExecutor = lexerActionExecutor.fixOffsetBeforeMatch(input.Index() - l.startIndex) - } - treatEOFAsEpsilon := (t == TokenEOF) - config := NewLexerATNConfig3(cfg.(*LexerATNConfig), target, lexerActionExecutor) - if l.closure(input, config, reach, - currentAltReachedAcceptState, true, treatEOFAsEpsilon) { - // any remaining configs for l alt have a lower priority - // than the one that just reached an accept state. - SkipAlt = cfg.GetAlt() - } - } - } - } -} - -func (l *LexerATNSimulator) accept(input CharStream, lexerActionExecutor *LexerActionExecutor, startIndex, index, line, charPos int) { - if LexerATNSimulatorDebug { - fmt.Printf("ACTION %s\n", lexerActionExecutor) - } - // seek to after last char in token - input.Seek(index) - l.Line = line - l.CharPositionInLine = charPos - if lexerActionExecutor != nil && l.recog != nil { - lexerActionExecutor.execute(l.recog, input, startIndex) - } -} - -func (l *LexerATNSimulator) getReachableTarget(trans Transition, t int) ATNState { - if trans.Matches(t, 0, LexerMaxCharValue) { - return trans.getTarget() - } - - return nil -} - -func (l *LexerATNSimulator) computeStartState(input CharStream, p ATNState) *OrderedATNConfigSet { - configs := NewOrderedATNConfigSet() - for i := 0; i < len(p.GetTransitions()); i++ { - target := p.GetTransitions()[i].getTarget() - cfg := NewLexerATNConfig6(target, i+1, BasePredictionContextEMPTY) - l.closure(input, cfg, configs, false, false, false) - } - - return configs -} - -// Since the alternatives within any lexer decision are ordered by -// preference, l method stops pursuing the closure as soon as an accept -// state is reached. After the first accept state is reached by depth-first -// search from {@code config}, all other (potentially reachable) states for -// l rule would have a lower priority. -// -// @return {@code true} if an accept state is reached, otherwise -// {@code false}. -func (l *LexerATNSimulator) closure(input CharStream, config *LexerATNConfig, configs ATNConfigSet, - currentAltReachedAcceptState, speculative, treatEOFAsEpsilon bool) bool { - - if LexerATNSimulatorDebug { - fmt.Println("closure(" + config.String() + ")") // config.String(l.recog, true) + ")") - } - - _, ok := config.state.(*RuleStopState) - if ok { - - if LexerATNSimulatorDebug { - if l.recog != nil { - fmt.Printf("closure at %s rule stop %s\n", l.recog.GetRuleNames()[config.state.GetRuleIndex()], config) - } else { - fmt.Printf("closure at rule stop %s\n", config) - } - } - - if config.context == nil || config.context.hasEmptyPath() { - if config.context == nil || config.context.isEmpty() { - configs.Add(config, nil) - return true - } - - configs.Add(NewLexerATNConfig2(config, config.state, BasePredictionContextEMPTY), nil) - currentAltReachedAcceptState = true - } - if config.context != nil && !config.context.isEmpty() { - for i := 0; i < config.context.length(); i++ { - if config.context.getReturnState(i) != BasePredictionContextEmptyReturnState { - newContext := config.context.GetParent(i) // "pop" return state - returnState := l.atn.states[config.context.getReturnState(i)] - cfg := NewLexerATNConfig2(config, returnState, newContext) - currentAltReachedAcceptState = l.closure(input, cfg, configs, currentAltReachedAcceptState, speculative, treatEOFAsEpsilon) - } - } - } - return currentAltReachedAcceptState - } - // optimization - if !config.state.GetEpsilonOnlyTransitions() { - if !currentAltReachedAcceptState || !config.passedThroughNonGreedyDecision { - configs.Add(config, nil) - } - } - for j := 0; j < len(config.state.GetTransitions()); j++ { - trans := config.state.GetTransitions()[j] - cfg := l.getEpsilonTarget(input, config, trans, configs, speculative, treatEOFAsEpsilon) - if cfg != nil { - currentAltReachedAcceptState = l.closure(input, cfg, configs, - currentAltReachedAcceptState, speculative, treatEOFAsEpsilon) - } - } - return currentAltReachedAcceptState -} - -// side-effect: can alter configs.hasSemanticContext -func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *LexerATNConfig, trans Transition, - configs ATNConfigSet, speculative, treatEOFAsEpsilon bool) *LexerATNConfig { - - var cfg *LexerATNConfig - - if trans.getSerializationType() == TransitionRULE { - - rt := trans.(*RuleTransition) - newContext := SingletonBasePredictionContextCreate(config.context, rt.followState.GetStateNumber()) - cfg = NewLexerATNConfig2(config, trans.getTarget(), newContext) - - } else if trans.getSerializationType() == TransitionPRECEDENCE { - panic("Precedence predicates are not supported in lexers.") - } else if trans.getSerializationType() == TransitionPREDICATE { - // Track traversing semantic predicates. If we traverse, - // we cannot add a DFA state for l "reach" computation - // because the DFA would not test the predicate again in the - // future. Rather than creating collections of semantic predicates - // like v3 and testing them on prediction, v4 will test them on the - // fly all the time using the ATN not the DFA. This is slower but - // semantically it's not used that often. One of the key elements to - // l predicate mechanism is not adding DFA states that see - // predicates immediately afterwards in the ATN. For example, - - // a : ID {p1}? | ID {p2}? - - // should create the start state for rule 'a' (to save start state - // competition), but should not create target of ID state. The - // collection of ATN states the following ID references includes - // states reached by traversing predicates. Since l is when we - // test them, we cannot cash the DFA state target of ID. - - pt := trans.(*PredicateTransition) - - if LexerATNSimulatorDebug { - fmt.Println("EVAL rule " + strconv.Itoa(trans.(*PredicateTransition).ruleIndex) + ":" + strconv.Itoa(pt.predIndex)) - } - configs.SetHasSemanticContext(true) - if l.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative) { - cfg = NewLexerATNConfig4(config, trans.getTarget()) - } - } else if trans.getSerializationType() == TransitionACTION { - if config.context == nil || config.context.hasEmptyPath() { - // execute actions anywhere in the start rule for a token. - // - // TODO: if the entry rule is invoked recursively, some - // actions may be executed during the recursive call. The - // problem can appear when hasEmptyPath() is true but - // isEmpty() is false. In l case, the config needs to be - // split into two contexts - one with just the empty path - // and another with everything but the empty path. - // Unfortunately, the current algorithm does not allow - // getEpsilonTarget to return two configurations, so - // additional modifications are needed before we can support - // the split operation. - lexerActionExecutor := LexerActionExecutorappend(config.lexerActionExecutor, l.atn.lexerActions[trans.(*ActionTransition).actionIndex]) - cfg = NewLexerATNConfig3(config, trans.getTarget(), lexerActionExecutor) - } else { - // ignore actions in referenced rules - cfg = NewLexerATNConfig4(config, trans.getTarget()) - } - } else if trans.getSerializationType() == TransitionEPSILON { - cfg = NewLexerATNConfig4(config, trans.getTarget()) - } else if trans.getSerializationType() == TransitionATOM || - trans.getSerializationType() == TransitionRANGE || - trans.getSerializationType() == TransitionSET { - if treatEOFAsEpsilon { - if trans.Matches(TokenEOF, 0, LexerMaxCharValue) { - cfg = NewLexerATNConfig4(config, trans.getTarget()) - } - } - } - return cfg -} - -// Evaluate a predicate specified in the lexer. -// -//

If {@code speculative} is {@code true}, l method was called before -// {@link //consume} for the Matched character. This method should call -// {@link //consume} before evaluating the predicate to ensure position -// sensitive values, including {@link Lexer//GetText}, {@link Lexer//GetLine}, -// and {@link Lexer//getcolumn}, properly reflect the current -// lexer state. This method should restore {@code input} and the simulator -// to the original state before returning (i.e. undo the actions made by the -// call to {@link //consume}.

-// -// @param input The input stream. -// @param ruleIndex The rule containing the predicate. -// @param predIndex The index of the predicate within the rule. -// @param speculative {@code true} if the current index in {@code input} is -// one character before the predicate's location. -// -// @return {@code true} if the specified predicate evaluates to -// {@code true}. -// / -func (l *LexerATNSimulator) evaluatePredicate(input CharStream, ruleIndex, predIndex int, speculative bool) bool { - // assume true if no recognizer was provided - if l.recog == nil { - return true - } - if !speculative { - return l.recog.Sempred(nil, ruleIndex, predIndex) - } - savedcolumn := l.CharPositionInLine - savedLine := l.Line - index := input.Index() - marker := input.Mark() - - defer func() { - l.CharPositionInLine = savedcolumn - l.Line = savedLine - input.Seek(index) - input.Release(marker) - }() - - l.Consume(input) - return l.recog.Sempred(nil, ruleIndex, predIndex) -} - -func (l *LexerATNSimulator) captureSimState(settings *SimState, input CharStream, dfaState *DFAState) { - settings.index = input.Index() - settings.line = l.Line - settings.column = l.CharPositionInLine - settings.dfaState = dfaState -} - -func (l *LexerATNSimulator) addDFAEdge(from *DFAState, tk int, to *DFAState, cfgs ATNConfigSet) *DFAState { - if to == nil && cfgs != nil { - // leading to l call, ATNConfigSet.hasSemanticContext is used as a - // marker indicating dynamic predicate evaluation makes l edge - // dependent on the specific input sequence, so the static edge in the - // DFA should be omitted. The target DFAState is still created since - // execATN has the ability to reSynchronize with the DFA state cache - // following the predicate evaluation step. - // - // TJP notes: next time through the DFA, we see a pred again and eval. - // If that gets us to a previously created (but dangling) DFA - // state, we can continue in pure DFA mode from there. - // / - suppressEdge := cfgs.HasSemanticContext() - cfgs.SetHasSemanticContext(false) - - to = l.addDFAState(cfgs) - - if suppressEdge { - return to - } - } - // add the edge - if tk < LexerATNSimulatorMinDFAEdge || tk > LexerATNSimulatorMaxDFAEdge { - // Only track edges within the DFA bounds - return to - } - if LexerATNSimulatorDebug { - fmt.Println("EDGE " + from.String() + " -> " + to.String() + " upon " + strconv.Itoa(tk)) - } - if from.edges == nil { - // make room for tokens 1..n and -1 masquerading as index 0 - from.edges = make([]*DFAState, LexerATNSimulatorMaxDFAEdge-LexerATNSimulatorMinDFAEdge+1) - } - from.edges[tk-LexerATNSimulatorMinDFAEdge] = to // connect - - return to -} - -// Add a NewDFA state if there isn't one with l set of -// configurations already. This method also detects the first -// configuration containing an ATN rule stop state. Later, when -// traversing the DFA, we will know which rule to accept. -func (l *LexerATNSimulator) addDFAState(configs ATNConfigSet) *DFAState { - - proposed := NewDFAState(-1, configs) - var firstConfigWithRuleStopState ATNConfig - - for _, cfg := range configs.GetItems() { - - _, ok := cfg.GetState().(*RuleStopState) - - if ok { - firstConfigWithRuleStopState = cfg - break - } - } - if firstConfigWithRuleStopState != nil { - proposed.isAcceptState = true - proposed.lexerActionExecutor = firstConfigWithRuleStopState.(*LexerATNConfig).lexerActionExecutor - proposed.setPrediction(l.atn.ruleToTokenType[firstConfigWithRuleStopState.GetState().GetRuleIndex()]) - } - hash := proposed.hash() - dfa := l.decisionToDFA[l.mode] - existing, ok := dfa.getState(hash) - if ok { - return existing - } - newState := proposed - newState.stateNumber = dfa.numStates() - configs.SetReadOnly(true) - newState.configs = configs - dfa.setState(hash, newState) - return newState -} - -func (l *LexerATNSimulator) getDFA(mode int) *DFA { - return l.decisionToDFA[mode] -} - -// Get the text Matched so far for the current token. -func (l *LexerATNSimulator) GetText(input CharStream) string { - // index is first lookahead char, don't include. - return input.GetTextFromInterval(NewInterval(l.startIndex, input.Index()-1)) -} - -func (l *LexerATNSimulator) Consume(input CharStream) { - curChar := input.LA(1) - if curChar == int('\n') { - l.Line++ - l.CharPositionInLine = 0 - } else { - l.CharPositionInLine++ - } - input.Consume() -} - -func (l *LexerATNSimulator) GetCharPositionInLine() int { - return l.CharPositionInLine -} - -func (l *LexerATNSimulator) GetLine() int { - return l.Line -} - -func (l *LexerATNSimulator) GetTokenName(tt int) string { - if tt == -1 { - return "EOF" - } - - return "'" + string(tt) + "'" -} - -func resetSimState(sim *SimState) { - sim.index = -1 - sim.line = 0 - sim.column = -1 - sim.dfaState = nil -} - -type SimState struct { - index int - line int - column int - dfaState *DFAState -} - -func NewSimState() *SimState { - s := new(SimState) - resetSimState(s) - return s -} - -func (s *SimState) reset() { - resetSimState(s) -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/ll1_analyzer.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/ll1_analyzer.go deleted file mode 100644 index f5afd09b3938..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/ll1_analyzer.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type LL1Analyzer struct { - atn *ATN -} - -func NewLL1Analyzer(atn *ATN) *LL1Analyzer { - la := new(LL1Analyzer) - la.atn = atn - return la -} - -//* Special value added to the lookahead sets to indicate that we hit -// a predicate during analysis if {@code seeThruPreds==false}. -/// -const ( - LL1AnalyzerHitPred = TokenInvalidType -) - -//* -// Calculates the SLL(1) expected lookahead set for each outgoing transition -// of an {@link ATNState}. The returned array has one element for each -// outgoing transition in {@code s}. If the closure from transition -// i leads to a semantic predicate before Matching a symbol, the -// element at index i of the result will be {@code nil}. -// -// @param s the ATN state -// @return the expected symbols for each outgoing transition of {@code s}. -func (la *LL1Analyzer) getDecisionLookahead(s ATNState) []*IntervalSet { - if s == nil { - return nil - } - count := len(s.GetTransitions()) - look := make([]*IntervalSet, count) - for alt := 0; alt < count; alt++ { - look[alt] = NewIntervalSet() - lookBusy := NewSet(nil, nil) - seeThruPreds := false // fail to get lookahead upon pred - la.look1(s.GetTransitions()[alt].getTarget(), nil, BasePredictionContextEMPTY, look[alt], lookBusy, NewBitSet(), seeThruPreds, false) - // Wipe out lookahead for la alternative if we found nothing - // or we had a predicate when we !seeThruPreds - if look[alt].length() == 0 || look[alt].contains(LL1AnalyzerHitPred) { - look[alt] = nil - } - } - return look -} - -//* -// Compute set of tokens that can follow {@code s} in the ATN in the -// specified {@code ctx}. -// -//

If {@code ctx} is {@code nil} and the end of the rule containing -// {@code s} is reached, {@link Token//EPSILON} is added to the result set. -// If {@code ctx} is not {@code nil} and the end of the outermost rule is -// reached, {@link Token//EOF} is added to the result set.

-// -// @param s the ATN state -// @param stopState the ATN state to stop at. This can be a -// {@link BlockEndState} to detect epsilon paths through a closure. -// @param ctx the complete parser context, or {@code nil} if the context -// should be ignored -// -// @return The set of tokens that can follow {@code s} in the ATN in the -// specified {@code ctx}. -/// -func (la *LL1Analyzer) Look(s, stopState ATNState, ctx RuleContext) *IntervalSet { - r := NewIntervalSet() - seeThruPreds := true // ignore preds get all lookahead - var lookContext PredictionContext - if ctx != nil { - lookContext = predictionContextFromRuleContext(s.GetATN(), ctx) - } - la.look1(s, stopState, lookContext, r, NewSet(nil, nil), NewBitSet(), seeThruPreds, true) - return r -} - -//* -// Compute set of tokens that can follow {@code s} in the ATN in the -// specified {@code ctx}. -// -//

If {@code ctx} is {@code nil} and {@code stopState} or the end of the -// rule containing {@code s} is reached, {@link Token//EPSILON} is added to -// the result set. If {@code ctx} is not {@code nil} and {@code addEOF} is -// {@code true} and {@code stopState} or the end of the outermost rule is -// reached, {@link Token//EOF} is added to the result set.

-// -// @param s the ATN state. -// @param stopState the ATN state to stop at. This can be a -// {@link BlockEndState} to detect epsilon paths through a closure. -// @param ctx The outer context, or {@code nil} if the outer context should -// not be used. -// @param look The result lookahead set. -// @param lookBusy A set used for preventing epsilon closures in the ATN -// from causing a stack overflow. Outside code should pass -// {@code NewSet} for la argument. -// @param calledRuleStack A set used for preventing left recursion in the -// ATN from causing a stack overflow. Outside code should pass -// {@code NewBitSet()} for la argument. -// @param seeThruPreds {@code true} to true semantic predicates as -// implicitly {@code true} and "see through them", otherwise {@code false} -// to treat semantic predicates as opaque and add {@link //HitPred} to the -// result if one is encountered. -// @param addEOF Add {@link Token//EOF} to the result if the end of the -// outermost context is reached. This parameter has no effect if {@code ctx} -// is {@code nil}. - -func (la *LL1Analyzer) look2(s, stopState ATNState, ctx PredictionContext, look *IntervalSet, lookBusy *Set, calledRuleStack *BitSet, seeThruPreds, addEOF bool, i int) { - - returnState := la.atn.states[ctx.getReturnState(i)] - - removed := calledRuleStack.contains(returnState.GetRuleIndex()) - - defer func() { - if removed { - calledRuleStack.add(returnState.GetRuleIndex()) - } - }() - - calledRuleStack.remove(returnState.GetRuleIndex()) - la.look1(returnState, stopState, ctx.GetParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF) - -} - -func (la *LL1Analyzer) look1(s, stopState ATNState, ctx PredictionContext, look *IntervalSet, lookBusy *Set, calledRuleStack *BitSet, seeThruPreds, addEOF bool) { - - c := NewBaseATNConfig6(s, 0, ctx) - - if lookBusy.contains(c) { - return - } - - lookBusy.add(c) - - if s == stopState { - if ctx == nil { - look.addOne(TokenEpsilon) - return - } else if ctx.isEmpty() && addEOF { - look.addOne(TokenEOF) - return - } - } - - _, ok := s.(*RuleStopState) - - if ok { - if ctx == nil { - look.addOne(TokenEpsilon) - return - } else if ctx.isEmpty() && addEOF { - look.addOne(TokenEOF) - return - } - - if ctx != BasePredictionContextEMPTY { - // run thru all possible stack tops in ctx - for i := 0; i < ctx.length(); i++ { - returnState := la.atn.states[ctx.getReturnState(i)] - la.look2(returnState, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF, i) - } - return - } - } - - n := len(s.GetTransitions()) - - for i := 0; i < n; i++ { - t := s.GetTransitions()[i] - - if t1, ok := t.(*RuleTransition); ok { - if calledRuleStack.contains(t1.getTarget().GetRuleIndex()) { - continue - } - - newContext := SingletonBasePredictionContextCreate(ctx, t1.followState.GetStateNumber()) - la.look3(stopState, newContext, look, lookBusy, calledRuleStack, seeThruPreds, addEOF, t1) - } else if t2, ok := t.(AbstractPredicateTransition); ok { - if seeThruPreds { - la.look1(t2.getTarget(), stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) - } else { - look.addOne(LL1AnalyzerHitPred) - } - } else if t.getIsEpsilon() { - la.look1(t.getTarget(), stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) - } else if _, ok := t.(*WildcardTransition); ok { - look.addRange(TokenMinUserTokenType, la.atn.maxTokenType) - } else { - set := t.getLabel() - if set != nil { - if _, ok := t.(*NotSetTransition); ok { - set = set.complement(TokenMinUserTokenType, la.atn.maxTokenType) - } - look.addSet(set) - } - } - } -} - -func (la *LL1Analyzer) look3(stopState ATNState, ctx PredictionContext, look *IntervalSet, lookBusy *Set, calledRuleStack *BitSet, seeThruPreds, addEOF bool, t1 *RuleTransition) { - - newContext := SingletonBasePredictionContextCreate(ctx, t1.followState.GetStateNumber()) - - defer func() { - calledRuleStack.remove(t1.getTarget().GetRuleIndex()) - }() - - calledRuleStack.add(t1.getTarget().GetRuleIndex()) - la.look1(t1.getTarget(), stopState, newContext, look, lookBusy, calledRuleStack, seeThruPreds, addEOF) - -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser.go deleted file mode 100644 index fb60258e3311..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser.go +++ /dev/null @@ -1,718 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strconv" -) - -type Parser interface { - Recognizer - - GetInterpreter() *ParserATNSimulator - - GetTokenStream() TokenStream - GetTokenFactory() TokenFactory - GetParserRuleContext() ParserRuleContext - SetParserRuleContext(ParserRuleContext) - Consume() Token - GetParseListeners() []ParseTreeListener - - GetErrorHandler() ErrorStrategy - SetErrorHandler(ErrorStrategy) - GetInputStream() IntStream - GetCurrentToken() Token - GetExpectedTokens() *IntervalSet - NotifyErrorListeners(string, Token, RecognitionException) - IsExpectedToken(int) bool - GetPrecedence() int - GetRuleInvocationStack(ParserRuleContext) []string -} - -type BaseParser struct { - *BaseRecognizer - - Interpreter *ParserATNSimulator - BuildParseTrees bool - - input TokenStream - errHandler ErrorStrategy - precedenceStack IntStack - ctx ParserRuleContext - - tracer *TraceListener - parseListeners []ParseTreeListener - _SyntaxErrors int -} - -// p.is all the parsing support code essentially most of it is error -// recovery stuff.// -func NewBaseParser(input TokenStream) *BaseParser { - - p := new(BaseParser) - - p.BaseRecognizer = NewBaseRecognizer() - - // The input stream. - p.input = nil - // The error handling strategy for the parser. The default value is a new - // instance of {@link DefaultErrorStrategy}. - p.errHandler = NewDefaultErrorStrategy() - p.precedenceStack = make([]int, 0) - p.precedenceStack.Push(0) - // The {@link ParserRuleContext} object for the currently executing rule. - // p.is always non-nil during the parsing process. - p.ctx = nil - // Specifies whether or not the parser should construct a parse tree during - // the parsing process. The default value is {@code true}. - p.BuildParseTrees = true - // When {@link //setTrace}{@code (true)} is called, a reference to the - // {@link TraceListener} is stored here so it can be easily removed in a - // later call to {@link //setTrace}{@code (false)}. The listener itself is - // implemented as a parser listener so p.field is not directly used by - // other parser methods. - p.tracer = nil - // The list of {@link ParseTreeListener} listeners registered to receive - // events during the parse. - p.parseListeners = nil - // The number of syntax errors Reported during parsing. p.value is - // incremented each time {@link //NotifyErrorListeners} is called. - p._SyntaxErrors = 0 - p.SetInputStream(input) - - return p -} - -// p.field maps from the serialized ATN string to the deserialized {@link -// ATN} with -// bypass alternatives. -// -// @see ATNDeserializationOptions//isGenerateRuleBypassTransitions() -// -var bypassAltsAtnCache = make(map[string]int) - -// reset the parser's state// -func (p *BaseParser) reset() { - if p.input != nil { - p.input.Seek(0) - } - p.errHandler.reset(p) - p.ctx = nil - p._SyntaxErrors = 0 - p.SetTrace(nil) - p.precedenceStack = make([]int, 0) - p.precedenceStack.Push(0) - if p.Interpreter != nil { - p.Interpreter.reset() - } -} - -func (p *BaseParser) GetErrorHandler() ErrorStrategy { - return p.errHandler -} - -func (p *BaseParser) SetErrorHandler(e ErrorStrategy) { - p.errHandler = e -} - -// Match current input symbol against {@code ttype}. If the symbol type -// Matches, {@link ANTLRErrorStrategy//ReportMatch} and {@link //consume} are -// called to complete the Match process. -// -//

If the symbol type does not Match, -// {@link ANTLRErrorStrategy//recoverInline} is called on the current error -// strategy to attempt recovery. If {@link //getBuildParseTree} is -// {@code true} and the token index of the symbol returned by -// {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to -// the parse tree by calling {@link ParserRuleContext//addErrorNode}.

-// -// @param ttype the token type to Match -// @return the Matched symbol -// @panics RecognitionException if the current input symbol did not Match -// {@code ttype} and the error strategy could not recover from the -// mismatched symbol - -func (p *BaseParser) Match(ttype int) Token { - - t := p.GetCurrentToken() - - if t.GetTokenType() == ttype { - p.errHandler.ReportMatch(p) - p.Consume() - } else { - t = p.errHandler.RecoverInline(p) - if p.BuildParseTrees && t.GetTokenIndex() == -1 { - // we must have conjured up a Newtoken during single token - // insertion - // if it's not the current symbol - p.ctx.AddErrorNode(t) - } - } - - return t -} - -// Match current input symbol as a wildcard. If the symbol type Matches -// (i.e. has a value greater than 0), {@link ANTLRErrorStrategy//ReportMatch} -// and {@link //consume} are called to complete the Match process. -// -//

If the symbol type does not Match, -// {@link ANTLRErrorStrategy//recoverInline} is called on the current error -// strategy to attempt recovery. If {@link //getBuildParseTree} is -// {@code true} and the token index of the symbol returned by -// {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to -// the parse tree by calling {@link ParserRuleContext//addErrorNode}.

-// -// @return the Matched symbol -// @panics RecognitionException if the current input symbol did not Match -// a wildcard and the error strategy could not recover from the mismatched -// symbol - -func (p *BaseParser) MatchWildcard() Token { - t := p.GetCurrentToken() - if t.GetTokenType() > 0 { - p.errHandler.ReportMatch(p) - p.Consume() - } else { - t = p.errHandler.RecoverInline(p) - if p.BuildParseTrees && t.GetTokenIndex() == -1 { - // we must have conjured up a Newtoken during single token - // insertion - // if it's not the current symbol - p.ctx.AddErrorNode(t) - } - } - return t -} - -func (p *BaseParser) GetParserRuleContext() ParserRuleContext { - return p.ctx -} - -func (p *BaseParser) SetParserRuleContext(v ParserRuleContext) { - p.ctx = v -} - -func (p *BaseParser) GetParseListeners() []ParseTreeListener { - if p.parseListeners == nil { - return make([]ParseTreeListener, 0) - } - return p.parseListeners -} - -// Registers {@code listener} to receive events during the parsing process. -// -//

To support output-preserving grammar transformations (including but not -// limited to left-recursion removal, automated left-factoring, and -// optimized code generation), calls to listener methods during the parse -// may differ substantially from calls made by -// {@link ParseTreeWalker//DEFAULT} used after the parse is complete. In -// particular, rule entry and exit events may occur in a different order -// during the parse than after the parser. In addition, calls to certain -// rule entry methods may be omitted.

-// -//

With the following specific exceptions, calls to listener events are -// deterministic, i.e. for identical input the calls to listener -// methods will be the same.

-// -//
    -//
  • Alterations to the grammar used to generate code may change the -// behavior of the listener calls.
  • -//
  • Alterations to the command line options passed to ANTLR 4 when -// generating the parser may change the behavior of the listener calls.
  • -//
  • Changing the version of the ANTLR Tool used to generate the parser -// may change the behavior of the listener calls.
  • -//
-// -// @param listener the listener to add -// -// @panics nilPointerException if {@code} listener is {@code nil} -// -func (p *BaseParser) AddParseListener(listener ParseTreeListener) { - if listener == nil { - panic("listener") - } - if p.parseListeners == nil { - p.parseListeners = make([]ParseTreeListener, 0) - } - p.parseListeners = append(p.parseListeners, listener) -} - -// -// Remove {@code listener} from the list of parse listeners. -// -//

If {@code listener} is {@code nil} or has not been added as a parse -// listener, p.method does nothing.

-// @param listener the listener to remove -// -func (p *BaseParser) RemoveParseListener(listener ParseTreeListener) { - - if p.parseListeners != nil { - - idx := -1 - for i, v := range p.parseListeners { - if v == listener { - idx = i - break - } - } - - if idx == -1 { - return - } - - // remove the listener from the slice - p.parseListeners = append(p.parseListeners[0:idx], p.parseListeners[idx+1:]...) - - if len(p.parseListeners) == 0 { - p.parseListeners = nil - } - } -} - -// Remove all parse listeners. -func (p *BaseParser) removeParseListeners() { - p.parseListeners = nil -} - -// Notify any parse listeners of an enter rule event. -func (p *BaseParser) TriggerEnterRuleEvent() { - if p.parseListeners != nil { - ctx := p.ctx - for _, listener := range p.parseListeners { - listener.EnterEveryRule(ctx) - ctx.EnterRule(listener) - } - } -} - -// -// Notify any parse listeners of an exit rule event. -// -// @see //addParseListener -// -func (p *BaseParser) TriggerExitRuleEvent() { - if p.parseListeners != nil { - // reverse order walk of listeners - ctx := p.ctx - l := len(p.parseListeners) - 1 - - for i := range p.parseListeners { - listener := p.parseListeners[l-i] - ctx.ExitRule(listener) - listener.ExitEveryRule(ctx) - } - } -} - -func (p *BaseParser) GetInterpreter() *ParserATNSimulator { - return p.Interpreter -} - -func (p *BaseParser) GetATN() *ATN { - return p.Interpreter.atn -} - -func (p *BaseParser) GetTokenFactory() TokenFactory { - return p.input.GetTokenSource().GetTokenFactory() -} - -// Tell our token source and error strategy about a Newway to create tokens.// -func (p *BaseParser) setTokenFactory(factory TokenFactory) { - p.input.GetTokenSource().setTokenFactory(factory) -} - -// The ATN with bypass alternatives is expensive to create so we create it -// lazily. -// -// @panics UnsupportedOperationException if the current parser does not -// implement the {@link //getSerializedATN()} method. -// -func (p *BaseParser) GetATNWithBypassAlts() { - - // TODO - panic("Not implemented!") - - // serializedAtn := p.getSerializedATN() - // if (serializedAtn == nil) { - // panic("The current parser does not support an ATN with bypass alternatives.") - // } - // result := p.bypassAltsAtnCache[serializedAtn] - // if (result == nil) { - // deserializationOptions := NewATNDeserializationOptions(nil) - // deserializationOptions.generateRuleBypassTransitions = true - // result = NewATNDeserializer(deserializationOptions).deserialize(serializedAtn) - // p.bypassAltsAtnCache[serializedAtn] = result - // } - // return result -} - -// The preferred method of getting a tree pattern. For example, here's a -// sample use: -// -//
-// ParseTree t = parser.expr()
-// ParseTreePattern p = parser.compileParseTreePattern("<ID>+0",
-// MyParser.RULE_expr)
-// ParseTreeMatch m = p.Match(t)
-// String id = m.Get("ID")
-// 
- -func (p *BaseParser) compileParseTreePattern(pattern, patternRuleIndex, lexer Lexer) { - - panic("NewParseTreePatternMatcher not implemented!") - // - // if (lexer == nil) { - // if (p.GetTokenStream() != nil) { - // tokenSource := p.GetTokenStream().GetTokenSource() - // if _, ok := tokenSource.(ILexer); ok { - // lexer = tokenSource - // } - // } - // } - // if (lexer == nil) { - // panic("Parser can't discover a lexer to use") - // } - - // m := NewParseTreePatternMatcher(lexer, p) - // return m.compile(pattern, patternRuleIndex) -} - -func (p *BaseParser) GetInputStream() IntStream { - return p.GetTokenStream() -} - -func (p *BaseParser) SetInputStream(input TokenStream) { - p.SetTokenStream(input) -} - -func (p *BaseParser) GetTokenStream() TokenStream { - return p.input -} - -// Set the token stream and reset the parser.// -func (p *BaseParser) SetTokenStream(input TokenStream) { - p.input = nil - p.reset() - p.input = input -} - -// Match needs to return the current input symbol, which gets put -// into the label for the associated token ref e.g., x=ID. -// -func (p *BaseParser) GetCurrentToken() Token { - return p.input.LT(1) -} - -func (p *BaseParser) NotifyErrorListeners(msg string, offendingToken Token, err RecognitionException) { - if offendingToken == nil { - offendingToken = p.GetCurrentToken() - } - p._SyntaxErrors++ - line := offendingToken.GetLine() - column := offendingToken.GetColumn() - listener := p.GetErrorListenerDispatch() - listener.SyntaxError(p, offendingToken, line, column, msg, err) -} - -func (p *BaseParser) Consume() Token { - o := p.GetCurrentToken() - if o.GetTokenType() != TokenEOF { - p.GetInputStream().Consume() - } - hasListener := p.parseListeners != nil && len(p.parseListeners) > 0 - if p.BuildParseTrees || hasListener { - if p.errHandler.inErrorRecoveryMode(p) { - node := p.ctx.AddErrorNode(o) - if p.parseListeners != nil { - for _, l := range p.parseListeners { - l.VisitErrorNode(node) - } - } - - } else { - node := p.ctx.AddTokenNode(o) - if p.parseListeners != nil { - for _, l := range p.parseListeners { - l.VisitTerminal(node) - } - } - } - // node.invokingState = p.state - } - - return o -} - -func (p *BaseParser) addContextToParseTree() { - // add current context to parent if we have a parent - if p.ctx.GetParent() != nil { - p.ctx.GetParent().(ParserRuleContext).AddChild(p.ctx) - } -} - -func (p *BaseParser) EnterRule(localctx ParserRuleContext, state, ruleIndex int) { - p.SetState(state) - p.ctx = localctx - p.ctx.SetStart(p.input.LT(1)) - if p.BuildParseTrees { - p.addContextToParseTree() - } - if p.parseListeners != nil { - p.TriggerEnterRuleEvent() - } -} - -func (p *BaseParser) ExitRule() { - p.ctx.SetStop(p.input.LT(-1)) - // trigger event on ctx, before it reverts to parent - if p.parseListeners != nil { - p.TriggerExitRuleEvent() - } - p.SetState(p.ctx.GetInvokingState()) - if p.ctx.GetParent() != nil { - p.ctx = p.ctx.GetParent().(ParserRuleContext) - } else { - p.ctx = nil - } -} - -func (p *BaseParser) EnterOuterAlt(localctx ParserRuleContext, altNum int) { - localctx.SetAltNumber(altNum) - // if we have Newlocalctx, make sure we replace existing ctx - // that is previous child of parse tree - if p.BuildParseTrees && p.ctx != localctx { - if p.ctx.GetParent() != nil { - p.ctx.GetParent().(ParserRuleContext).RemoveLastChild() - p.ctx.GetParent().(ParserRuleContext).AddChild(localctx) - } - } - p.ctx = localctx -} - -// Get the precedence level for the top-most precedence rule. -// -// @return The precedence level for the top-most precedence rule, or -1 if -// the parser context is not nested within a precedence rule. - -func (p *BaseParser) GetPrecedence() int { - if len(p.precedenceStack) == 0 { - return -1 - } - - return p.precedenceStack[len(p.precedenceStack)-1] -} - -func (p *BaseParser) EnterRecursionRule(localctx ParserRuleContext, state, ruleIndex, precedence int) { - p.SetState(state) - p.precedenceStack.Push(precedence) - p.ctx = localctx - p.ctx.SetStart(p.input.LT(1)) - if p.parseListeners != nil { - p.TriggerEnterRuleEvent() // simulates rule entry for - // left-recursive rules - } -} - -// -// Like {@link //EnterRule} but for recursive rules. - -func (p *BaseParser) PushNewRecursionContext(localctx ParserRuleContext, state, ruleIndex int) { - previous := p.ctx - previous.SetParent(localctx) - previous.SetInvokingState(state) - previous.SetStop(p.input.LT(-1)) - - p.ctx = localctx - p.ctx.SetStart(previous.GetStart()) - if p.BuildParseTrees { - p.ctx.AddChild(previous) - } - if p.parseListeners != nil { - p.TriggerEnterRuleEvent() // simulates rule entry for - // left-recursive rules - } -} - -func (p *BaseParser) UnrollRecursionContexts(parentCtx ParserRuleContext) { - p.precedenceStack.Pop() - p.ctx.SetStop(p.input.LT(-1)) - retCtx := p.ctx // save current ctx (return value) - // unroll so ctx is as it was before call to recursive method - if p.parseListeners != nil { - for p.ctx != parentCtx { - p.TriggerExitRuleEvent() - p.ctx = p.ctx.GetParent().(ParserRuleContext) - } - } else { - p.ctx = parentCtx - } - // hook into tree - retCtx.SetParent(parentCtx) - if p.BuildParseTrees && parentCtx != nil { - // add return ctx into invoking rule's tree - parentCtx.AddChild(retCtx) - } -} - -func (p *BaseParser) GetInvokingContext(ruleIndex int) ParserRuleContext { - ctx := p.ctx - for ctx != nil { - if ctx.GetRuleIndex() == ruleIndex { - return ctx - } - ctx = ctx.GetParent().(ParserRuleContext) - } - return nil -} - -func (p *BaseParser) Precpred(localctx RuleContext, precedence int) bool { - return precedence >= p.precedenceStack[len(p.precedenceStack)-1] -} - -func (p *BaseParser) inContext(context ParserRuleContext) bool { - // TODO: useful in parser? - return false -} - -// -// Checks whether or not {@code symbol} can follow the current state in the -// ATN. The behavior of p.method is equivalent to the following, but is -// implemented such that the complete context-sensitive follow set does not -// need to be explicitly constructed. -// -//
-// return getExpectedTokens().contains(symbol)
-// 
-// -// @param symbol the symbol type to check -// @return {@code true} if {@code symbol} can follow the current state in -// the ATN, otherwise {@code false}. - -func (p *BaseParser) IsExpectedToken(symbol int) bool { - atn := p.Interpreter.atn - ctx := p.ctx - s := atn.states[p.state] - following := atn.NextTokens(s, nil) - if following.contains(symbol) { - return true - } - if !following.contains(TokenEpsilon) { - return false - } - for ctx != nil && ctx.GetInvokingState() >= 0 && following.contains(TokenEpsilon) { - invokingState := atn.states[ctx.GetInvokingState()] - rt := invokingState.GetTransitions()[0] - following = atn.NextTokens(rt.(*RuleTransition).followState, nil) - if following.contains(symbol) { - return true - } - ctx = ctx.GetParent().(ParserRuleContext) - } - if following.contains(TokenEpsilon) && symbol == TokenEOF { - return true - } - - return false -} - -// Computes the set of input symbols which could follow the current parser -// state and context, as given by {@link //GetState} and {@link //GetContext}, -// respectively. -// -// @see ATN//getExpectedTokens(int, RuleContext) -// -func (p *BaseParser) GetExpectedTokens() *IntervalSet { - return p.Interpreter.atn.getExpectedTokens(p.state, p.ctx) -} - -func (p *BaseParser) GetExpectedTokensWithinCurrentRule() *IntervalSet { - atn := p.Interpreter.atn - s := atn.states[p.state] - return atn.NextTokens(s, nil) -} - -// Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.// -func (p *BaseParser) GetRuleIndex(ruleName string) int { - var ruleIndex, ok = p.GetRuleIndexMap()[ruleName] - if ok { - return ruleIndex - } - - return -1 -} - -// Return List<String> of the rule names in your parser instance -// leading up to a call to the current rule. You could override if -// you want more details such as the file/line info of where -// in the ATN a rule is invoked. -// -// this very useful for error messages. - -func (p *BaseParser) GetRuleInvocationStack(c ParserRuleContext) []string { - if c == nil { - c = p.ctx - } - stack := make([]string, 0) - for c != nil { - // compute what follows who invoked us - ruleIndex := c.GetRuleIndex() - if ruleIndex < 0 { - stack = append(stack, "n/a") - } else { - stack = append(stack, p.GetRuleNames()[ruleIndex]) - } - - vp := c.GetParent() - - if vp == nil { - break - } - - c = vp.(ParserRuleContext) - } - return stack -} - -// For debugging and other purposes.// -func (p *BaseParser) GetDFAStrings() string { - return fmt.Sprint(p.Interpreter.decisionToDFA) -} - -// For debugging and other purposes.// -func (p *BaseParser) DumpDFA() { - seenOne := false - for _, dfa := range p.Interpreter.decisionToDFA { - if dfa.numStates() > 0 { - if seenOne { - fmt.Println() - } - fmt.Println("Decision " + strconv.Itoa(dfa.decision) + ":") - fmt.Print(dfa.String(p.LiteralNames, p.SymbolicNames)) - seenOne = true - } - } -} - -func (p *BaseParser) GetSourceName() string { - return p.GrammarFileName -} - -// During a parse is sometimes useful to listen in on the rule entry and exit -// events as well as token Matches. p.is for quick and dirty debugging. -// -func (p *BaseParser) SetTrace(trace *TraceListener) { - if trace == nil { - p.RemoveParseListener(p.tracer) - p.tracer = nil - } else { - if p.tracer != nil { - p.RemoveParseListener(p.tracer) - } - p.tracer = NewTraceListener(p) - p.AddParseListener(p.tracer) - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser_atn_simulator.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser_atn_simulator.go deleted file mode 100644 index 128b9a96d4b8..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser_atn_simulator.go +++ /dev/null @@ -1,1473 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strconv" - "strings" -) - -var ( - ParserATNSimulatorDebug = false - ParserATNSimulatorListATNDecisions = false - ParserATNSimulatorDFADebug = false - ParserATNSimulatorRetryDebug = false -) - -type ParserATNSimulator struct { - *BaseATNSimulator - - parser Parser - predictionMode int - input TokenStream - startIndex int - dfa *DFA - mergeCache *DoubleDict - outerContext ParserRuleContext -} - -func NewParserATNSimulator(parser Parser, atn *ATN, decisionToDFA []*DFA, sharedContextCache *PredictionContextCache) *ParserATNSimulator { - - p := new(ParserATNSimulator) - - p.BaseATNSimulator = NewBaseATNSimulator(atn, sharedContextCache) - - p.parser = parser - p.decisionToDFA = decisionToDFA - // SLL, LL, or LL + exact ambig detection?// - p.predictionMode = PredictionModeLL - // LAME globals to avoid parameters!!!!! I need these down deep in predTransition - p.input = nil - p.startIndex = 0 - p.outerContext = nil - p.dfa = nil - // Each prediction operation uses a cache for merge of prediction contexts. - // Don't keep around as it wastes huge amounts of memory. DoubleKeyMap - // isn't Synchronized but we're ok since two threads shouldn't reuse same - // parser/atnsim object because it can only handle one input at a time. - // This maps graphs a and b to merged result c. (a,b)&rarrc. We can avoid - // the merge if we ever see a and b again. Note that (b,a)&rarrc should - // also be examined during cache lookup. - // - p.mergeCache = nil - - return p -} - -func (p *ParserATNSimulator) GetPredictionMode() int { - return p.predictionMode -} - -func (p *ParserATNSimulator) SetPredictionMode(v int) { - p.predictionMode = v -} - -func (p *ParserATNSimulator) reset() { -} - -func (p *ParserATNSimulator) AdaptivePredict(input TokenStream, decision int, outerContext ParserRuleContext) int { - if ParserATNSimulatorDebug || ParserATNSimulatorListATNDecisions { - fmt.Println("AdaptivePredict decision " + strconv.Itoa(decision) + - " exec LA(1)==" + p.getLookaheadName(input) + - " line " + strconv.Itoa(input.LT(1).GetLine()) + ":" + - strconv.Itoa(input.LT(1).GetColumn())) - } - - p.input = input - p.startIndex = input.Index() - p.outerContext = outerContext - - dfa := p.decisionToDFA[decision] - p.dfa = dfa - m := input.Mark() - index := input.Index() - - defer func() { - p.dfa = nil - p.mergeCache = nil // wack cache after each prediction - input.Seek(index) - input.Release(m) - }() - - // Now we are certain to have a specific decision's DFA - // But, do we still need an initial state? - var s0 *DFAState - if dfa.precedenceDfa { - // the start state for a precedence DFA depends on the current - // parser precedence, and is provided by a DFA method. - s0 = dfa.getPrecedenceStartState(p.parser.GetPrecedence()) - } else { - // the start state for a "regular" DFA is just s0 - s0 = dfa.s0 - } - - if s0 == nil { - if outerContext == nil { - outerContext = RuleContextEmpty - } - if ParserATNSimulatorDebug || ParserATNSimulatorListATNDecisions { - fmt.Println("predictATN decision " + strconv.Itoa(dfa.decision) + - " exec LA(1)==" + p.getLookaheadName(input) + - ", outerContext=" + outerContext.String(p.parser.GetRuleNames(), nil)) - } - // If p is not a precedence DFA, we check the ATN start state - // to determine if p ATN start state is the decision for the - // closure block that determines whether a precedence rule - // should continue or complete. - - t2 := dfa.atnStartState - t, ok := t2.(*StarLoopEntryState) - if !dfa.precedenceDfa && ok { - if t.precedenceRuleDecision { - dfa.setPrecedenceDfa(true) - } - } - fullCtx := false - s0Closure := p.computeStartState(dfa.atnStartState, RuleContextEmpty, fullCtx) - - if dfa.precedenceDfa { - // If p is a precedence DFA, we use applyPrecedenceFilter - // to convert the computed start state to a precedence start - // state. We then use DFA.setPrecedenceStartState to set the - // appropriate start state for the precedence level rather - // than simply setting DFA.s0. - // - s0Closure = p.applyPrecedenceFilter(s0Closure) - s0 = p.addDFAState(dfa, NewDFAState(-1, s0Closure)) - dfa.setPrecedenceStartState(p.parser.GetPrecedence(), s0) - } else { - s0 = p.addDFAState(dfa, NewDFAState(-1, s0Closure)) - dfa.s0 = s0 - } - } - alt := p.execATN(dfa, s0, input, index, outerContext) - if ParserATNSimulatorDebug { - fmt.Println("DFA after predictATN: " + dfa.String(p.parser.GetLiteralNames(), nil)) - } - return alt - -} - -// Performs ATN simulation to compute a predicted alternative based -// upon the remaining input, but also updates the DFA cache to avoid -// having to traverse the ATN again for the same input sequence. - -// There are some key conditions we're looking for after computing a new -// set of ATN configs (proposed DFA state): -// if the set is empty, there is no viable alternative for current symbol -// does the state uniquely predict an alternative? -// does the state have a conflict that would prevent us from -// putting it on the work list? - -// We also have some key operations to do: -// add an edge from previous DFA state to potentially NewDFA state, D, -// upon current symbol but only if adding to work list, which means in all -// cases except no viable alternative (and possibly non-greedy decisions?) -// collecting predicates and adding semantic context to DFA accept states -// adding rule context to context-sensitive DFA accept states -// consuming an input symbol -// Reporting a conflict -// Reporting an ambiguity -// Reporting a context sensitivity -// Reporting insufficient predicates - -// cover these cases: -// dead end -// single alt -// single alt + preds -// conflict -// conflict + preds -// -func (p *ParserATNSimulator) execATN(dfa *DFA, s0 *DFAState, input TokenStream, startIndex int, outerContext ParserRuleContext) int { - - if ParserATNSimulatorDebug || ParserATNSimulatorListATNDecisions { - fmt.Println("execATN decision " + strconv.Itoa(dfa.decision) + - " exec LA(1)==" + p.getLookaheadName(input) + - " line " + strconv.Itoa(input.LT(1).GetLine()) + ":" + strconv.Itoa(input.LT(1).GetColumn())) - } - - previousD := s0 - - if ParserATNSimulatorDebug { - fmt.Println("s0 = " + s0.String()) - } - t := input.LA(1) - for { // for more work - D := p.getExistingTargetState(previousD, t) - if D == nil { - D = p.computeTargetState(dfa, previousD, t) - } - if D == ATNSimulatorError { - // if any configs in previous dipped into outer context, that - // means that input up to t actually finished entry rule - // at least for SLL decision. Full LL doesn't dip into outer - // so don't need special case. - // We will get an error no matter what so delay until after - // decision better error message. Also, no reachable target - // ATN states in SLL implies LL will also get nowhere. - // If conflict in states that dip out, choose min since we - // will get error no matter what. - e := p.noViableAlt(input, outerContext, previousD.configs, startIndex) - input.Seek(startIndex) - alt := p.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previousD.configs, outerContext) - if alt != ATNInvalidAltNumber { - return alt - } - - panic(e) - } - if D.requiresFullContext && p.predictionMode != PredictionModeSLL { - // IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error) - conflictingAlts := D.configs.GetConflictingAlts() - if D.predicates != nil { - if ParserATNSimulatorDebug { - fmt.Println("DFA state has preds in DFA sim LL failover") - } - conflictIndex := input.Index() - if conflictIndex != startIndex { - input.Seek(startIndex) - } - conflictingAlts = p.evalSemanticContext(D.predicates, outerContext, true) - if conflictingAlts.length() == 1 { - if ParserATNSimulatorDebug { - fmt.Println("Full LL avoided") - } - return conflictingAlts.minValue() - } - if conflictIndex != startIndex { - // restore the index so Reporting the fallback to full - // context occurs with the index at the correct spot - input.Seek(conflictIndex) - } - } - if ParserATNSimulatorDFADebug { - fmt.Println("ctx sensitive state " + outerContext.String(nil, nil) + " in " + D.String()) - } - fullCtx := true - s0Closure := p.computeStartState(dfa.atnStartState, outerContext, fullCtx) - p.ReportAttemptingFullContext(dfa, conflictingAlts, D.configs, startIndex, input.Index()) - alt := p.execATNWithFullContext(dfa, D, s0Closure, input, startIndex, outerContext) - return alt - } - if D.isAcceptState { - if D.predicates == nil { - return D.prediction - } - stopIndex := input.Index() - input.Seek(startIndex) - alts := p.evalSemanticContext(D.predicates, outerContext, true) - if alts.length() == 0 { - panic(p.noViableAlt(input, outerContext, D.configs, startIndex)) - } else if alts.length() == 1 { - return alts.minValue() - } else { - // Report ambiguity after predicate evaluation to make sure the correct set of ambig alts is Reported. - p.ReportAmbiguity(dfa, D, startIndex, stopIndex, false, alts, D.configs) - return alts.minValue() - } - } - previousD = D - - if t != TokenEOF { - input.Consume() - t = input.LA(1) - } - } - - panic("Should not have reached p state") -} - -// Get an existing target state for an edge in the DFA. If the target state -// for the edge has not yet been computed or is otherwise not available, -// p method returns {@code nil}. -// -// @param previousD The current DFA state -// @param t The next input symbol -// @return The existing target DFA state for the given input symbol -// {@code t}, or {@code nil} if the target state for p edge is not -// already cached - -func (p *ParserATNSimulator) getExistingTargetState(previousD *DFAState, t int) *DFAState { - edges := previousD.edges - if edges == nil { - return nil - } - - return edges[t+1] -} - -// Compute a target state for an edge in the DFA, and attempt to add the -// computed state and corresponding edge to the DFA. -// -// @param dfa The DFA -// @param previousD The current DFA state -// @param t The next input symbol -// -// @return The computed target DFA state for the given input symbol -// {@code t}. If {@code t} does not lead to a valid DFA state, p method -// returns {@link //ERROR}. - -func (p *ParserATNSimulator) computeTargetState(dfa *DFA, previousD *DFAState, t int) *DFAState { - reach := p.computeReachSet(previousD.configs, t, false) - - if reach == nil { - p.addDFAEdge(dfa, previousD, t, ATNSimulatorError) - return ATNSimulatorError - } - // create Newtarget state we'll add to DFA after it's complete - D := NewDFAState(-1, reach) - - predictedAlt := p.getUniqueAlt(reach) - - if ParserATNSimulatorDebug { - altSubSets := PredictionModegetConflictingAltSubsets(reach) - fmt.Println("SLL altSubSets=" + fmt.Sprint(altSubSets) + - ", previous=" + previousD.configs.String() + - ", configs=" + reach.String() + - ", predict=" + strconv.Itoa(predictedAlt) + - ", allSubsetsConflict=" + - fmt.Sprint(PredictionModeallSubsetsConflict(altSubSets)) + - ", conflictingAlts=" + p.getConflictingAlts(reach).String()) - } - if predictedAlt != ATNInvalidAltNumber { - // NO CONFLICT, UNIQUELY PREDICTED ALT - D.isAcceptState = true - D.configs.SetUniqueAlt(predictedAlt) - D.setPrediction(predictedAlt) - } else if PredictionModehasSLLConflictTerminatingPrediction(p.predictionMode, reach) { - // MORE THAN ONE VIABLE ALTERNATIVE - D.configs.SetConflictingAlts(p.getConflictingAlts(reach)) - D.requiresFullContext = true - // in SLL-only mode, we will stop at p state and return the minimum alt - D.isAcceptState = true - D.setPrediction(D.configs.GetConflictingAlts().minValue()) - } - if D.isAcceptState && D.configs.HasSemanticContext() { - p.predicateDFAState(D, p.atn.getDecisionState(dfa.decision)) - if D.predicates != nil { - D.setPrediction(ATNInvalidAltNumber) - } - } - // all adds to dfa are done after we've created full D state - D = p.addDFAEdge(dfa, previousD, t, D) - return D -} - -func (p *ParserATNSimulator) predicateDFAState(dfaState *DFAState, decisionState DecisionState) { - // We need to test all predicates, even in DFA states that - // uniquely predict alternative. - nalts := len(decisionState.GetTransitions()) - // Update DFA so reach becomes accept state with (predicate,alt) - // pairs if preds found for conflicting alts - altsToCollectPredsFrom := p.getConflictingAltsOrUniqueAlt(dfaState.configs) - altToPred := p.getPredsForAmbigAlts(altsToCollectPredsFrom, dfaState.configs, nalts) - if altToPred != nil { - dfaState.predicates = p.getPredicatePredictions(altsToCollectPredsFrom, altToPred) - dfaState.setPrediction(ATNInvalidAltNumber) // make sure we use preds - } else { - // There are preds in configs but they might go away - // when OR'd together like {p}? || NONE == NONE. If neither - // alt has preds, resolve to min alt - dfaState.setPrediction(altsToCollectPredsFrom.minValue()) - } -} - -// comes back with reach.uniqueAlt set to a valid alt -func (p *ParserATNSimulator) execATNWithFullContext(dfa *DFA, D *DFAState, s0 ATNConfigSet, input TokenStream, startIndex int, outerContext ParserRuleContext) int { - - if ParserATNSimulatorDebug || ParserATNSimulatorListATNDecisions { - fmt.Println("execATNWithFullContext " + s0.String()) - } - - fullCtx := true - foundExactAmbig := false - var reach ATNConfigSet - previous := s0 - input.Seek(startIndex) - t := input.LA(1) - predictedAlt := -1 - - for { // for more work - reach = p.computeReachSet(previous, t, fullCtx) - if reach == nil { - // if any configs in previous dipped into outer context, that - // means that input up to t actually finished entry rule - // at least for LL decision. Full LL doesn't dip into outer - // so don't need special case. - // We will get an error no matter what so delay until after - // decision better error message. Also, no reachable target - // ATN states in SLL implies LL will also get nowhere. - // If conflict in states that dip out, choose min since we - // will get error no matter what. - e := p.noViableAlt(input, outerContext, previous, startIndex) - input.Seek(startIndex) - alt := p.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(previous, outerContext) - if alt != ATNInvalidAltNumber { - return alt - } - - panic(e) - } - altSubSets := PredictionModegetConflictingAltSubsets(reach) - if ParserATNSimulatorDebug { - fmt.Println("LL altSubSets=" + fmt.Sprint(altSubSets) + ", predict=" + - strconv.Itoa(PredictionModegetUniqueAlt(altSubSets)) + ", resolvesToJustOneViableAlt=" + - fmt.Sprint(PredictionModeresolvesToJustOneViableAlt(altSubSets))) - } - reach.SetUniqueAlt(p.getUniqueAlt(reach)) - // unique prediction? - if reach.GetUniqueAlt() != ATNInvalidAltNumber { - predictedAlt = reach.GetUniqueAlt() - break - } else if p.predictionMode != PredictionModeLLExactAmbigDetection { - predictedAlt = PredictionModeresolvesToJustOneViableAlt(altSubSets) - if predictedAlt != ATNInvalidAltNumber { - break - } - } else { - // In exact ambiguity mode, we never try to terminate early. - // Just keeps scarfing until we know what the conflict is - if PredictionModeallSubsetsConflict(altSubSets) && PredictionModeallSubsetsEqual(altSubSets) { - foundExactAmbig = true - predictedAlt = PredictionModegetSingleViableAlt(altSubSets) - break - } - // else there are multiple non-conflicting subsets or - // we're not sure what the ambiguity is yet. - // So, keep going. - } - previous = reach - if t != TokenEOF { - input.Consume() - t = input.LA(1) - } - } - // If the configuration set uniquely predicts an alternative, - // without conflict, then we know that it's a full LL decision - // not SLL. - if reach.GetUniqueAlt() != ATNInvalidAltNumber { - p.ReportContextSensitivity(dfa, predictedAlt, reach, startIndex, input.Index()) - return predictedAlt - } - // We do not check predicates here because we have checked them - // on-the-fly when doing full context prediction. - - // - // In non-exact ambiguity detection mode, we might actually be able to - // detect an exact ambiguity, but I'm not going to spend the cycles - // needed to check. We only emit ambiguity warnings in exact ambiguity - // mode. - // - // For example, we might know that we have conflicting configurations. - // But, that does not mean that there is no way forward without a - // conflict. It's possible to have nonconflicting alt subsets as in: - - // altSubSets=[{1, 2}, {1, 2}, {1}, {1, 2}] - - // from - // - // [(17,1,[5 $]), (13,1,[5 10 $]), (21,1,[5 10 $]), (11,1,[$]), - // (13,2,[5 10 $]), (21,2,[5 10 $]), (11,2,[$])] - // - // In p case, (17,1,[5 $]) indicates there is some next sequence that - // would resolve p without conflict to alternative 1. Any other viable - // next sequence, however, is associated with a conflict. We stop - // looking for input because no amount of further lookahead will alter - // the fact that we should predict alternative 1. We just can't say for - // sure that there is an ambiguity without looking further. - - p.ReportAmbiguity(dfa, D, startIndex, input.Index(), foundExactAmbig, nil, reach) - - return predictedAlt -} - -func (p *ParserATNSimulator) computeReachSet(closure ATNConfigSet, t int, fullCtx bool) ATNConfigSet { - if ParserATNSimulatorDebug { - fmt.Println("in computeReachSet, starting closure: " + closure.String()) - } - if p.mergeCache == nil { - p.mergeCache = NewDoubleDict() - } - intermediate := NewBaseATNConfigSet(fullCtx) - - // Configurations already in a rule stop state indicate reaching the end - // of the decision rule (local context) or end of the start rule (full - // context). Once reached, these configurations are never updated by a - // closure operation, so they are handled separately for the performance - // advantage of having a smaller intermediate set when calling closure. - // - // For full-context reach operations, separate handling is required to - // ensure that the alternative Matching the longest overall sequence is - // chosen when multiple such configurations can Match the input. - - var SkippedStopStates []*BaseATNConfig - - // First figure out where we can reach on input t - for _, c := range closure.GetItems() { - if ParserATNSimulatorDebug { - fmt.Println("testing " + p.GetTokenName(t) + " at " + c.String()) - } - - _, ok := c.GetState().(*RuleStopState) - - if ok { - if fullCtx || t == TokenEOF { - if SkippedStopStates == nil { - SkippedStopStates = make([]*BaseATNConfig, 0) - } - SkippedStopStates = append(SkippedStopStates, c.(*BaseATNConfig)) - if ParserATNSimulatorDebug { - fmt.Println("added " + c.String() + " to SkippedStopStates") - } - } - continue - } - - for j := 0; j < len(c.GetState().GetTransitions()); j++ { - trans := c.GetState().GetTransitions()[j] - target := p.getReachableTarget(trans, t) - if target != nil { - cfg := NewBaseATNConfig4(c, target) - intermediate.Add(cfg, p.mergeCache) - if ParserATNSimulatorDebug { - fmt.Println("added " + cfg.String() + " to intermediate") - } - } - } - } - // Now figure out where the reach operation can take us... - var reach ATNConfigSet - - // This block optimizes the reach operation for intermediate sets which - // trivially indicate a termination state for the overall - // AdaptivePredict operation. - // - // The conditions assume that intermediate - // contains all configurations relevant to the reach set, but p - // condition is not true when one or more configurations have been - // withheld in SkippedStopStates, or when the current symbol is EOF. - // - if SkippedStopStates == nil && t != TokenEOF { - if len(intermediate.configs) == 1 { - // Don't pursue the closure if there is just one state. - // It can only have one alternative just add to result - // Also don't pursue the closure if there is unique alternative - // among the configurations. - reach = intermediate - } else if p.getUniqueAlt(intermediate) != ATNInvalidAltNumber { - // Also don't pursue the closure if there is unique alternative - // among the configurations. - reach = intermediate - } - } - // If the reach set could not be trivially determined, perform a closure - // operation on the intermediate set to compute its initial value. - // - if reach == nil { - reach = NewBaseATNConfigSet(fullCtx) - closureBusy := NewSet(nil, nil) - treatEOFAsEpsilon := t == TokenEOF - for k := 0; k < len(intermediate.configs); k++ { - p.closure(intermediate.configs[k], reach, closureBusy, false, fullCtx, treatEOFAsEpsilon) - } - } - if t == TokenEOF { - // After consuming EOF no additional input is possible, so we are - // only interested in configurations which reached the end of the - // decision rule (local context) or end of the start rule (full - // context). Update reach to contain only these configurations. This - // handles both explicit EOF transitions in the grammar and implicit - // EOF transitions following the end of the decision or start rule. - // - // When reach==intermediate, no closure operation was performed. In - // p case, removeAllConfigsNotInRuleStopState needs to check for - // reachable rule stop states as well as configurations already in - // a rule stop state. - // - // This is handled before the configurations in SkippedStopStates, - // because any configurations potentially added from that list are - // already guaranteed to meet p condition whether or not it's - // required. - // - reach = p.removeAllConfigsNotInRuleStopState(reach, reach == intermediate) - } - // If SkippedStopStates!=nil, then it contains at least one - // configuration. For full-context reach operations, these - // configurations reached the end of the start rule, in which case we - // only add them back to reach if no configuration during the current - // closure operation reached such a state. This ensures AdaptivePredict - // chooses an alternative Matching the longest overall sequence when - // multiple alternatives are viable. - // - if SkippedStopStates != nil && ((!fullCtx) || (!PredictionModehasConfigInRuleStopState(reach))) { - for l := 0; l < len(SkippedStopStates); l++ { - reach.Add(SkippedStopStates[l], p.mergeCache) - } - } - if len(reach.GetItems()) == 0 { - return nil - } - - return reach -} - -// -// Return a configuration set containing only the configurations from -// {@code configs} which are in a {@link RuleStopState}. If all -// configurations in {@code configs} are already in a rule stop state, p -// method simply returns {@code configs}. -// -//

When {@code lookToEndOfRule} is true, p method uses -// {@link ATN//NextTokens} for each configuration in {@code configs} which is -// not already in a rule stop state to see if a rule stop state is reachable -// from the configuration via epsilon-only transitions.

-// -// @param configs the configuration set to update -// @param lookToEndOfRule when true, p method checks for rule stop states -// reachable by epsilon-only transitions from each configuration in -// {@code configs}. -// -// @return {@code configs} if all configurations in {@code configs} are in a -// rule stop state, otherwise return a Newconfiguration set containing only -// the configurations from {@code configs} which are in a rule stop state -// -func (p *ParserATNSimulator) removeAllConfigsNotInRuleStopState(configs ATNConfigSet, lookToEndOfRule bool) ATNConfigSet { - if PredictionModeallConfigsInRuleStopStates(configs) { - return configs - } - result := NewBaseATNConfigSet(configs.FullContext()) - for _, config := range configs.GetItems() { - - _, ok := config.GetState().(*RuleStopState) - - if ok { - result.Add(config, p.mergeCache) - continue - } - if lookToEndOfRule && config.GetState().GetEpsilonOnlyTransitions() { - NextTokens := p.atn.NextTokens(config.GetState(), nil) - if NextTokens.contains(TokenEpsilon) { - endOfRuleState := p.atn.ruleToStopState[config.GetState().GetRuleIndex()] - result.Add(NewBaseATNConfig4(config, endOfRuleState), p.mergeCache) - } - } - } - return result -} - -func (p *ParserATNSimulator) computeStartState(a ATNState, ctx RuleContext, fullCtx bool) ATNConfigSet { - // always at least the implicit call to start rule - initialContext := predictionContextFromRuleContext(p.atn, ctx) - configs := NewBaseATNConfigSet(fullCtx) - for i := 0; i < len(a.GetTransitions()); i++ { - target := a.GetTransitions()[i].getTarget() - c := NewBaseATNConfig6(target, i+1, initialContext) - closureBusy := NewSet(nil, nil) - p.closure(c, configs, closureBusy, true, fullCtx, false) - } - return configs -} - -// -// This method transforms the start state computed by -// {@link //computeStartState} to the special start state used by a -// precedence DFA for a particular precedence value. The transformation -// process applies the following changes to the start state's configuration -// set. -// -//
    -//
  1. Evaluate the precedence predicates for each configuration using -// {@link SemanticContext//evalPrecedence}.
  2. -//
  3. Remove all configurations which predict an alternative greater than -// 1, for which another configuration that predicts alternative 1 is in the -// same ATN state with the same prediction context. This transformation is -// valid for the following reasons: -//
      -//
    • The closure block cannot contain any epsilon transitions which bypass -// the body of the closure, so all states reachable via alternative 1 are -// part of the precedence alternatives of the transformed left-recursive -// rule.
    • -//
    • The "primary" portion of a left recursive rule cannot contain an -// epsilon transition, so the only way an alternative other than 1 can exist -// in a state that is also reachable via alternative 1 is by nesting calls -// to the left-recursive rule, with the outer calls not being at the -// preferred precedence level.
    • -//
    -//
  4. -//
-// -//

-// The prediction context must be considered by p filter to address -// situations like the following. -//

-// -//
-// grammar TA
-// prog: statement* EOF
-// statement: letterA | statement letterA 'b'
-// letterA: 'a'
-// 
-//
-//

-// If the above grammar, the ATN state immediately before the token -// reference {@code 'a'} in {@code letterA} is reachable from the left edge -// of both the primary and closure blocks of the left-recursive rule -// {@code statement}. The prediction context associated with each of these -// configurations distinguishes between them, and prevents the alternative -// which stepped out to {@code prog} (and then back in to {@code statement} -// from being eliminated by the filter. -//

-// -// @param configs The configuration set computed by -// {@link //computeStartState} as the start state for the DFA. -// @return The transformed configuration set representing the start state -// for a precedence DFA at a particular precedence level (determined by -// calling {@link Parser//getPrecedence}). -// -func (p *ParserATNSimulator) applyPrecedenceFilter(configs ATNConfigSet) ATNConfigSet { - - statesFromAlt1 := make(map[int]PredictionContext) - configSet := NewBaseATNConfigSet(configs.FullContext()) - - for _, config := range configs.GetItems() { - // handle alt 1 first - if config.GetAlt() != 1 { - continue - } - updatedContext := config.GetSemanticContext().evalPrecedence(p.parser, p.outerContext) - if updatedContext == nil { - // the configuration was eliminated - continue - } - statesFromAlt1[config.GetState().GetStateNumber()] = config.GetContext() - if updatedContext != config.GetSemanticContext() { - configSet.Add(NewBaseATNConfig2(config, updatedContext), p.mergeCache) - } else { - configSet.Add(config, p.mergeCache) - } - } - for _, config := range configs.GetItems() { - - if config.GetAlt() == 1 { - // already handled - continue - } - // In the future, p elimination step could be updated to also - // filter the prediction context for alternatives predicting alt>1 - // (basically a graph subtraction algorithm). - if !config.getPrecedenceFilterSuppressed() { - context := statesFromAlt1[config.GetState().GetStateNumber()] - if context != nil && context.equals(config.GetContext()) { - // eliminated - continue - } - } - configSet.Add(config, p.mergeCache) - } - return configSet -} - -func (p *ParserATNSimulator) getReachableTarget(trans Transition, ttype int) ATNState { - if trans.Matches(ttype, 0, p.atn.maxTokenType) { - return trans.getTarget() - } - - return nil -} - -func (p *ParserATNSimulator) getPredsForAmbigAlts(ambigAlts *BitSet, configs ATNConfigSet, nalts int) []SemanticContext { - - altToPred := make([]SemanticContext, nalts+1) - for _, c := range configs.GetItems() { - if ambigAlts.contains(c.GetAlt()) { - altToPred[c.GetAlt()] = SemanticContextorContext(altToPred[c.GetAlt()], c.GetSemanticContext()) - } - } - nPredAlts := 0 - for i := 1; i < nalts+1; i++ { - pred := altToPred[i] - if pred == nil { - altToPred[i] = SemanticContextNone - } else if pred != SemanticContextNone { - nPredAlts++ - } - } - // nonambig alts are nil in altToPred - if nPredAlts == 0 { - altToPred = nil - } - if ParserATNSimulatorDebug { - fmt.Println("getPredsForAmbigAlts result " + fmt.Sprint(altToPred)) - } - return altToPred -} - -func (p *ParserATNSimulator) getPredicatePredictions(ambigAlts *BitSet, altToPred []SemanticContext) []*PredPrediction { - pairs := make([]*PredPrediction, 0) - containsPredicate := false - for i := 1; i < len(altToPred); i++ { - pred := altToPred[i] - // unpredicated is indicated by SemanticContextNONE - if ambigAlts != nil && ambigAlts.contains(i) { - pairs = append(pairs, NewPredPrediction(pred, i)) - } - if pred != SemanticContextNone { - containsPredicate = true - } - } - if !containsPredicate { - return nil - } - return pairs -} - -// -// This method is used to improve the localization of error messages by -// choosing an alternative rather than panicing a -// {@link NoViableAltException} in particular prediction scenarios where the -// {@link //ERROR} state was reached during ATN simulation. -// -//

-// The default implementation of p method uses the following -// algorithm to identify an ATN configuration which successfully parsed the -// decision entry rule. Choosing such an alternative ensures that the -// {@link ParserRuleContext} returned by the calling rule will be complete -// and valid, and the syntax error will be Reported later at a more -// localized location.

-// -//
    -//
  • If a syntactically valid path or paths reach the end of the decision rule and -// they are semantically valid if predicated, return the min associated alt.
  • -//
  • Else, if a semantically invalid but syntactically valid path exist -// or paths exist, return the minimum associated alt. -//
  • -//
  • Otherwise, return {@link ATN//INVALID_ALT_NUMBER}.
  • -//
-// -//

-// In some scenarios, the algorithm described above could predict an -// alternative which will result in a {@link FailedPredicateException} in -// the parser. Specifically, p could occur if the only configuration -// capable of successfully parsing to the end of the decision rule is -// blocked by a semantic predicate. By choosing p alternative within -// {@link //AdaptivePredict} instead of panicing a -// {@link NoViableAltException}, the resulting -// {@link FailedPredicateException} in the parser will identify the specific -// predicate which is preventing the parser from successfully parsing the -// decision rule, which helps developers identify and correct logic errors -// in semantic predicates. -//

-// -// @param configs The ATN configurations which were valid immediately before -// the {@link //ERROR} state was reached -// @param outerContext The is the \gamma_0 initial parser context from the paper -// or the parser stack at the instant before prediction commences. -// -// @return The value to return from {@link //AdaptivePredict}, or -// {@link ATN//INVALID_ALT_NUMBER} if a suitable alternative was not -// identified and {@link //AdaptivePredict} should Report an error instead. -// -func (p *ParserATNSimulator) getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(configs ATNConfigSet, outerContext ParserRuleContext) int { - cfgs := p.splitAccordingToSemanticValidity(configs, outerContext) - semValidConfigs := cfgs[0] - semInvalidConfigs := cfgs[1] - alt := p.GetAltThatFinishedDecisionEntryRule(semValidConfigs) - if alt != ATNInvalidAltNumber { // semantically/syntactically viable path exists - return alt - } - // Is there a syntactically valid path with a failed pred? - if len(semInvalidConfigs.GetItems()) > 0 { - alt = p.GetAltThatFinishedDecisionEntryRule(semInvalidConfigs) - if alt != ATNInvalidAltNumber { // syntactically viable path exists - return alt - } - } - return ATNInvalidAltNumber -} - -func (p *ParserATNSimulator) GetAltThatFinishedDecisionEntryRule(configs ATNConfigSet) int { - alts := NewIntervalSet() - - for _, c := range configs.GetItems() { - _, ok := c.GetState().(*RuleStopState) - - if c.GetReachesIntoOuterContext() > 0 || (ok && c.GetContext().hasEmptyPath()) { - alts.addOne(c.GetAlt()) - } - } - if alts.length() == 0 { - return ATNInvalidAltNumber - } - - return alts.first() -} - -// Walk the list of configurations and split them according to -// those that have preds evaluating to true/false. If no pred, assume -// true pred and include in succeeded set. Returns Pair of sets. -// -// Create a NewSet so as not to alter the incoming parameter. -// -// Assumption: the input stream has been restored to the starting point -// prediction, which is where predicates need to evaluate. - -type ATNConfigSetPair struct { - item0, item1 ATNConfigSet -} - -func (p *ParserATNSimulator) splitAccordingToSemanticValidity(configs ATNConfigSet, outerContext ParserRuleContext) []ATNConfigSet { - succeeded := NewBaseATNConfigSet(configs.FullContext()) - failed := NewBaseATNConfigSet(configs.FullContext()) - - for _, c := range configs.GetItems() { - if c.GetSemanticContext() != SemanticContextNone { - predicateEvaluationResult := c.GetSemanticContext().evaluate(p.parser, outerContext) - if predicateEvaluationResult { - succeeded.Add(c, nil) - } else { - failed.Add(c, nil) - } - } else { - succeeded.Add(c, nil) - } - } - return []ATNConfigSet{succeeded, failed} -} - -// Look through a list of predicate/alt pairs, returning alts for the -// pairs that win. A {@code NONE} predicate indicates an alt containing an -// unpredicated config which behaves as "always true." If !complete -// then we stop at the first predicate that evaluates to true. This -// includes pairs with nil predicates. -// -func (p *ParserATNSimulator) evalSemanticContext(predPredictions []*PredPrediction, outerContext ParserRuleContext, complete bool) *BitSet { - predictions := NewBitSet() - for i := 0; i < len(predPredictions); i++ { - pair := predPredictions[i] - if pair.pred == SemanticContextNone { - predictions.add(pair.alt) - if !complete { - break - } - continue - } - - predicateEvaluationResult := pair.pred.evaluate(p.parser, outerContext) - if ParserATNSimulatorDebug || ParserATNSimulatorDFADebug { - fmt.Println("eval pred " + pair.String() + "=" + fmt.Sprint(predicateEvaluationResult)) - } - if predicateEvaluationResult { - if ParserATNSimulatorDebug || ParserATNSimulatorDFADebug { - fmt.Println("PREDICT " + fmt.Sprint(pair.alt)) - } - predictions.add(pair.alt) - if !complete { - break - } - } - } - return predictions -} - -func (p *ParserATNSimulator) closure(config ATNConfig, configs ATNConfigSet, closureBusy *Set, collectPredicates, fullCtx, treatEOFAsEpsilon bool) { - initialDepth := 0 - p.closureCheckingStopState(config, configs, closureBusy, collectPredicates, - fullCtx, initialDepth, treatEOFAsEpsilon) -} - -func (p *ParserATNSimulator) closureCheckingStopState(config ATNConfig, configs ATNConfigSet, closureBusy *Set, collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { - - if ParserATNSimulatorDebug { - fmt.Println("closure(" + config.String() + ")") - fmt.Println("configs(" + configs.String() + ")") - if config.GetReachesIntoOuterContext() > 50 { - panic("problem") - } - } - - _, ok := config.GetState().(*RuleStopState) - if ok { - // We hit rule end. If we have context info, use it - // run thru all possible stack tops in ctx - if !config.GetContext().isEmpty() { - for i := 0; i < config.GetContext().length(); i++ { - if config.GetContext().getReturnState(i) == BasePredictionContextEmptyReturnState { - if fullCtx { - configs.Add(NewBaseATNConfig1(config, config.GetState(), BasePredictionContextEMPTY), p.mergeCache) - continue - } else { - // we have no context info, just chase follow links (if greedy) - if ParserATNSimulatorDebug { - fmt.Println("FALLING off rule " + p.getRuleName(config.GetState().GetRuleIndex())) - } - p.closureWork(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEOFAsEpsilon) - } - continue - } - returnState := p.atn.states[config.GetContext().getReturnState(i)] - newContext := config.GetContext().GetParent(i) // "pop" return state - - c := NewBaseATNConfig5(returnState, config.GetAlt(), newContext, config.GetSemanticContext()) - // While we have context to pop back from, we may have - // gotten that context AFTER having falling off a rule. - // Make sure we track that we are now out of context. - c.SetReachesIntoOuterContext(config.GetReachesIntoOuterContext()) - p.closureCheckingStopState(c, configs, closureBusy, collectPredicates, fullCtx, depth-1, treatEOFAsEpsilon) - } - return - } else if fullCtx { - // reached end of start rule - configs.Add(config, p.mergeCache) - return - } else { - // else if we have no context info, just chase follow links (if greedy) - if ParserATNSimulatorDebug { - fmt.Println("FALLING off rule " + p.getRuleName(config.GetState().GetRuleIndex())) - } - } - } - p.closureWork(config, configs, closureBusy, collectPredicates, fullCtx, depth, treatEOFAsEpsilon) -} - -// Do the actual work of walking epsilon edges// -func (p *ParserATNSimulator) closureWork(config ATNConfig, configs ATNConfigSet, closureBusy *Set, collectPredicates, fullCtx bool, depth int, treatEOFAsEpsilon bool) { - state := config.GetState() - // optimization - if !state.GetEpsilonOnlyTransitions() { - configs.Add(config, p.mergeCache) - // make sure to not return here, because EOF transitions can act as - // both epsilon transitions and non-epsilon transitions. - } - for i := 0; i < len(state.GetTransitions()); i++ { - t := state.GetTransitions()[i] - _, ok := t.(*ActionTransition) - continueCollecting := collectPredicates && !ok - c := p.getEpsilonTarget(config, t, continueCollecting, depth == 0, fullCtx, treatEOFAsEpsilon) - if ci, ok := c.(*BaseATNConfig); ok && ci != nil { - if !t.getIsEpsilon() && closureBusy.add(c) != c { - // avoid infinite recursion for EOF* and EOF+ - continue - } - newDepth := depth - - if _, ok := config.GetState().(*RuleStopState); ok { - - // target fell off end of rule mark resulting c as having dipped into outer context - // We can't get here if incoming config was rule stop and we had context - // track how far we dip into outer context. Might - // come in handy and we avoid evaluating context dependent - // preds if p is > 0. - - if closureBusy.add(c) != c { - // avoid infinite recursion for right-recursive rules - continue - } - - if p.dfa != nil && p.dfa.precedenceDfa { - if t.(*EpsilonTransition).outermostPrecedenceReturn == p.dfa.atnStartState.GetRuleIndex() { - c.setPrecedenceFilterSuppressed(true) - } - } - - c.SetReachesIntoOuterContext(c.GetReachesIntoOuterContext() + 1) - configs.SetDipsIntoOuterContext(true) // TODO: can remove? only care when we add to set per middle of p method - newDepth-- - if ParserATNSimulatorDebug { - fmt.Println("dips into outer ctx: " + c.String()) - } - } else if _, ok := t.(*RuleTransition); ok { - // latch when newDepth goes negative - once we step out of the entry context we can't return - if newDepth >= 0 { - newDepth++ - } - } - p.closureCheckingStopState(c, configs, closureBusy, continueCollecting, fullCtx, newDepth, treatEOFAsEpsilon) - } - } -} - -func (p *ParserATNSimulator) getRuleName(index int) string { - if p.parser != nil && index >= 0 { - return p.parser.GetRuleNames()[index] - } - - return "" -} - -func (p *ParserATNSimulator) getEpsilonTarget(config ATNConfig, t Transition, collectPredicates, inContext, fullCtx, treatEOFAsEpsilon bool) ATNConfig { - - switch t.getSerializationType() { - case TransitionRULE: - return p.ruleTransition(config, t.(*RuleTransition)) - case TransitionPRECEDENCE: - return p.precedenceTransition(config, t.(*PrecedencePredicateTransition), collectPredicates, inContext, fullCtx) - case TransitionPREDICATE: - return p.predTransition(config, t.(*PredicateTransition), collectPredicates, inContext, fullCtx) - case TransitionACTION: - return p.actionTransition(config, t.(*ActionTransition)) - case TransitionEPSILON: - return NewBaseATNConfig4(config, t.getTarget()) - case TransitionATOM: - // EOF transitions act like epsilon transitions after the first EOF - // transition is traversed - if treatEOFAsEpsilon { - if t.Matches(TokenEOF, 0, 1) { - return NewBaseATNConfig4(config, t.getTarget()) - } - } - return nil - case TransitionRANGE: - // EOF transitions act like epsilon transitions after the first EOF - // transition is traversed - if treatEOFAsEpsilon { - if t.Matches(TokenEOF, 0, 1) { - return NewBaseATNConfig4(config, t.getTarget()) - } - } - return nil - case TransitionSET: - // EOF transitions act like epsilon transitions after the first EOF - // transition is traversed - if treatEOFAsEpsilon { - if t.Matches(TokenEOF, 0, 1) { - return NewBaseATNConfig4(config, t.getTarget()) - } - } - return nil - default: - return nil - } -} - -func (p *ParserATNSimulator) actionTransition(config ATNConfig, t *ActionTransition) *BaseATNConfig { - if ParserATNSimulatorDebug { - fmt.Println("ACTION edge " + strconv.Itoa(t.ruleIndex) + ":" + strconv.Itoa(t.actionIndex)) - } - return NewBaseATNConfig4(config, t.getTarget()) -} - -func (p *ParserATNSimulator) precedenceTransition(config ATNConfig, - pt *PrecedencePredicateTransition, collectPredicates, inContext, fullCtx bool) *BaseATNConfig { - - if ParserATNSimulatorDebug { - fmt.Println("PRED (collectPredicates=" + fmt.Sprint(collectPredicates) + ") " + - strconv.Itoa(pt.precedence) + ">=_p, ctx dependent=true") - if p.parser != nil { - fmt.Println("context surrounding pred is " + fmt.Sprint(p.parser.GetRuleInvocationStack(nil))) - } - } - var c *BaseATNConfig - if collectPredicates && inContext { - if fullCtx { - // In full context mode, we can evaluate predicates on-the-fly - // during closure, which dramatically reduces the size of - // the config sets. It also obviates the need to test predicates - // later during conflict resolution. - currentPosition := p.input.Index() - p.input.Seek(p.startIndex) - predSucceeds := pt.getPredicate().evaluate(p.parser, p.outerContext) - p.input.Seek(currentPosition) - if predSucceeds { - c = NewBaseATNConfig4(config, pt.getTarget()) // no pred context - } - } else { - newSemCtx := SemanticContextandContext(config.GetSemanticContext(), pt.getPredicate()) - c = NewBaseATNConfig3(config, pt.getTarget(), newSemCtx) - } - } else { - c = NewBaseATNConfig4(config, pt.getTarget()) - } - if ParserATNSimulatorDebug { - fmt.Println("config from pred transition=" + c.String()) - } - return c -} - -func (p *ParserATNSimulator) predTransition(config ATNConfig, pt *PredicateTransition, collectPredicates, inContext, fullCtx bool) *BaseATNConfig { - - if ParserATNSimulatorDebug { - fmt.Println("PRED (collectPredicates=" + fmt.Sprint(collectPredicates) + ") " + strconv.Itoa(pt.ruleIndex) + - ":" + strconv.Itoa(pt.predIndex) + ", ctx dependent=" + fmt.Sprint(pt.isCtxDependent)) - if p.parser != nil { - fmt.Println("context surrounding pred is " + fmt.Sprint(p.parser.GetRuleInvocationStack(nil))) - } - } - var c *BaseATNConfig - if collectPredicates && ((pt.isCtxDependent && inContext) || !pt.isCtxDependent) { - if fullCtx { - // In full context mode, we can evaluate predicates on-the-fly - // during closure, which dramatically reduces the size of - // the config sets. It also obviates the need to test predicates - // later during conflict resolution. - currentPosition := p.input.Index() - p.input.Seek(p.startIndex) - predSucceeds := pt.getPredicate().evaluate(p.parser, p.outerContext) - p.input.Seek(currentPosition) - if predSucceeds { - c = NewBaseATNConfig4(config, pt.getTarget()) // no pred context - } - } else { - newSemCtx := SemanticContextandContext(config.GetSemanticContext(), pt.getPredicate()) - c = NewBaseATNConfig3(config, pt.getTarget(), newSemCtx) - } - } else { - c = NewBaseATNConfig4(config, pt.getTarget()) - } - if ParserATNSimulatorDebug { - fmt.Println("config from pred transition=" + c.String()) - } - return c -} - -func (p *ParserATNSimulator) ruleTransition(config ATNConfig, t *RuleTransition) *BaseATNConfig { - if ParserATNSimulatorDebug { - fmt.Println("CALL rule " + p.getRuleName(t.getTarget().GetRuleIndex()) + ", ctx=" + config.GetContext().String()) - } - returnState := t.followState - newContext := SingletonBasePredictionContextCreate(config.GetContext(), returnState.GetStateNumber()) - return NewBaseATNConfig1(config, t.getTarget(), newContext) -} - -func (p *ParserATNSimulator) getConflictingAlts(configs ATNConfigSet) *BitSet { - altsets := PredictionModegetConflictingAltSubsets(configs) - return PredictionModeGetAlts(altsets) -} - -// Sam pointed out a problem with the previous definition, v3, of -// ambiguous states. If we have another state associated with conflicting -// alternatives, we should keep going. For example, the following grammar -// -// s : (ID | ID ID?) '' -// -// When the ATN simulation reaches the state before '', it has a DFA -// state that looks like: [12|1|[], 6|2|[], 12|2|[]]. Naturally -// 12|1|[] and 12|2|[] conflict, but we cannot stop processing p node -// because alternative to has another way to continue, via [6|2|[]]. -// The key is that we have a single state that has config's only associated -// with a single alternative, 2, and crucially the state transitions -// among the configurations are all non-epsilon transitions. That means -// we don't consider any conflicts that include alternative 2. So, we -// ignore the conflict between alts 1 and 2. We ignore a set of -// conflicting alts when there is an intersection with an alternative -// associated with a single alt state in the state&rarrconfig-list map. -// -// It's also the case that we might have two conflicting configurations but -// also a 3rd nonconflicting configuration for a different alternative: -// [1|1|[], 1|2|[], 8|3|[]]. This can come about from grammar: -// -// a : A | A | A B -// -// After Matching input A, we reach the stop state for rule A, state 1. -// State 8 is the state right before B. Clearly alternatives 1 and 2 -// conflict and no amount of further lookahead will separate the two. -// However, alternative 3 will be able to continue and so we do not -// stop working on p state. In the previous example, we're concerned -// with states associated with the conflicting alternatives. Here alt -// 3 is not associated with the conflicting configs, but since we can continue -// looking for input reasonably, I don't declare the state done. We -// ignore a set of conflicting alts when we have an alternative -// that we still need to pursue. -// - -func (p *ParserATNSimulator) getConflictingAltsOrUniqueAlt(configs ATNConfigSet) *BitSet { - var conflictingAlts *BitSet - if configs.GetUniqueAlt() != ATNInvalidAltNumber { - conflictingAlts = NewBitSet() - conflictingAlts.add(configs.GetUniqueAlt()) - } else { - conflictingAlts = configs.GetConflictingAlts() - } - return conflictingAlts -} - -func (p *ParserATNSimulator) GetTokenName(t int) string { - if t == TokenEOF { - return "EOF" - } - - if p.parser != nil && p.parser.GetLiteralNames() != nil { - if t >= len(p.parser.GetLiteralNames()) { - fmt.Println(strconv.Itoa(t) + " ttype out of range: " + strings.Join(p.parser.GetLiteralNames(), ",")) - // fmt.Println(p.parser.GetInputStream().(TokenStream).GetAllText()) // p seems incorrect - } else { - return p.parser.GetLiteralNames()[t] + "<" + strconv.Itoa(t) + ">" - } - } - - return strconv.Itoa(t) -} - -func (p *ParserATNSimulator) getLookaheadName(input TokenStream) string { - return p.GetTokenName(input.LA(1)) -} - -// Used for debugging in AdaptivePredict around execATN but I cut -// it out for clarity now that alg. works well. We can leave p -// "dead" code for a bit. -// -func (p *ParserATNSimulator) dumpDeadEndConfigs(nvae *NoViableAltException) { - - panic("Not implemented") - - // fmt.Println("dead end configs: ") - // var decs = nvae.deadEndConfigs - // - // for i:=0; i0) { - // var t = c.state.GetTransitions()[0] - // if t2, ok := t.(*AtomTransition); ok { - // trans = "Atom "+ p.GetTokenName(t2.label) - // } else if t3, ok := t.(SetTransition); ok { - // _, ok := t.(*NotSetTransition) - // - // var s string - // if (ok){ - // s = "~" - // } - // - // trans = s + "Set " + t3.set - // } - // } - // fmt.Errorf(c.String(p.parser, true) + ":" + trans) - // } -} - -func (p *ParserATNSimulator) noViableAlt(input TokenStream, outerContext ParserRuleContext, configs ATNConfigSet, startIndex int) *NoViableAltException { - return NewNoViableAltException(p.parser, input, input.Get(startIndex), input.LT(1), configs, outerContext) -} - -func (p *ParserATNSimulator) getUniqueAlt(configs ATNConfigSet) int { - alt := ATNInvalidAltNumber - for _, c := range configs.GetItems() { - if alt == ATNInvalidAltNumber { - alt = c.GetAlt() // found first alt - } else if c.GetAlt() != alt { - return ATNInvalidAltNumber - } - } - return alt -} - -// -// Add an edge to the DFA, if possible. This method calls -// {@link //addDFAState} to ensure the {@code to} state is present in the -// DFA. If {@code from} is {@code nil}, or if {@code t} is outside the -// range of edges that can be represented in the DFA tables, p method -// returns without adding the edge to the DFA. -// -//

If {@code to} is {@code nil}, p method returns {@code nil}. -// Otherwise, p method returns the {@link DFAState} returned by calling -// {@link //addDFAState} for the {@code to} state.

-// -// @param dfa The DFA -// @param from The source state for the edge -// @param t The input symbol -// @param to The target state for the edge -// -// @return If {@code to} is {@code nil}, p method returns {@code nil} -// otherwise p method returns the result of calling {@link //addDFAState} -// on {@code to} -// -func (p *ParserATNSimulator) addDFAEdge(dfa *DFA, from *DFAState, t int, to *DFAState) *DFAState { - if ParserATNSimulatorDebug { - fmt.Println("EDGE " + from.String() + " -> " + to.String() + " upon " + p.GetTokenName(t)) - } - if to == nil { - return nil - } - to = p.addDFAState(dfa, to) // used existing if possible not incoming - if from == nil || t < -1 || t > p.atn.maxTokenType { - return to - } - if from.edges == nil { - from.edges = make([]*DFAState, p.atn.maxTokenType+1+1) - } - from.edges[t+1] = to // connect - - if ParserATNSimulatorDebug { - var names []string - if p.parser != nil { - names = p.parser.GetLiteralNames() - } - - fmt.Println("DFA=\n" + dfa.String(names, nil)) - } - return to -} - -// -// Add state {@code D} to the DFA if it is not already present, and return -// the actual instance stored in the DFA. If a state equivalent to {@code D} -// is already in the DFA, the existing state is returned. Otherwise p -// method returns {@code D} after adding it to the DFA. -// -//

If {@code D} is {@link //ERROR}, p method returns {@link //ERROR} and -// does not change the DFA.

-// -// @param dfa The dfa -// @param D The DFA state to add -// @return The state stored in the DFA. This will be either the existing -// state if {@code D} is already in the DFA, or {@code D} itself if the -// state was not already present. -// -func (p *ParserATNSimulator) addDFAState(dfa *DFA, d *DFAState) *DFAState { - if d == ATNSimulatorError { - return d - } - hash := d.hash() - existing, ok := dfa.getState(hash) - if ok { - return existing - } - d.stateNumber = dfa.numStates() - if !d.configs.ReadOnly() { - d.configs.OptimizeConfigs(p.BaseATNSimulator) - d.configs.SetReadOnly(true) - } - dfa.setState(hash, d) - if ParserATNSimulatorDebug { - fmt.Println("adding NewDFA state: " + d.String()) - } - return d -} - -func (p *ParserATNSimulator) ReportAttemptingFullContext(dfa *DFA, conflictingAlts *BitSet, configs ATNConfigSet, startIndex, stopIndex int) { - if ParserATNSimulatorDebug || ParserATNSimulatorRetryDebug { - interval := NewInterval(startIndex, stopIndex+1) - fmt.Println("ReportAttemptingFullContext decision=" + strconv.Itoa(dfa.decision) + ":" + configs.String() + - ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) - } - if p.parser != nil { - p.parser.GetErrorListenerDispatch().ReportAttemptingFullContext(p.parser, dfa, startIndex, stopIndex, conflictingAlts, configs) - } -} - -func (p *ParserATNSimulator) ReportContextSensitivity(dfa *DFA, prediction int, configs ATNConfigSet, startIndex, stopIndex int) { - if ParserATNSimulatorDebug || ParserATNSimulatorRetryDebug { - interval := NewInterval(startIndex, stopIndex+1) - fmt.Println("ReportContextSensitivity decision=" + strconv.Itoa(dfa.decision) + ":" + configs.String() + - ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) - } - if p.parser != nil { - p.parser.GetErrorListenerDispatch().ReportContextSensitivity(p.parser, dfa, startIndex, stopIndex, prediction, configs) - } -} - -// If context sensitive parsing, we know it's ambiguity not conflict// -func (p *ParserATNSimulator) ReportAmbiguity(dfa *DFA, D *DFAState, startIndex, stopIndex int, - exact bool, ambigAlts *BitSet, configs ATNConfigSet) { - if ParserATNSimulatorDebug || ParserATNSimulatorRetryDebug { - interval := NewInterval(startIndex, stopIndex+1) - fmt.Println("ReportAmbiguity " + ambigAlts.String() + ":" + configs.String() + - ", input=" + p.parser.GetTokenStream().GetTextFromInterval(interval)) - } - if p.parser != nil { - p.parser.GetErrorListenerDispatch().ReportAmbiguity(p.parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs) - } -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser_rule_context.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser_rule_context.go deleted file mode 100644 index 49cd10c5ffca..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/parser_rule_context.go +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "reflect" - "strconv" -) - -type ParserRuleContext interface { - RuleContext - - SetException(RecognitionException) - - AddTokenNode(token Token) *TerminalNodeImpl - AddErrorNode(badToken Token) *ErrorNodeImpl - - EnterRule(listener ParseTreeListener) - ExitRule(listener ParseTreeListener) - - SetStart(Token) - GetStart() Token - - SetStop(Token) - GetStop() Token - - AddChild(child RuleContext) RuleContext - RemoveLastChild() -} - -type BaseParserRuleContext struct { - *BaseRuleContext - - start, stop Token - exception RecognitionException - children []Tree -} - -func NewBaseParserRuleContext(parent ParserRuleContext, invokingStateNumber int) *BaseParserRuleContext { - prc := new(BaseParserRuleContext) - - prc.BaseRuleContext = NewBaseRuleContext(parent, invokingStateNumber) - - prc.RuleIndex = -1 - // * If we are debugging or building a parse tree for a Visitor, - // we need to track all of the tokens and rule invocations associated - // with prc rule's context. This is empty for parsing w/o tree constr. - // operation because we don't the need to track the details about - // how we parse prc rule. - // / - prc.children = nil - prc.start = nil - prc.stop = nil - // The exception that forced prc rule to return. If the rule successfully - // completed, prc is {@code nil}. - prc.exception = nil - - return prc -} - -func (prc *BaseParserRuleContext) SetException(e RecognitionException) { - prc.exception = e -} - -func (prc *BaseParserRuleContext) GetChildren() []Tree { - return prc.children -} - -func (prc *BaseParserRuleContext) CopyFrom(ctx *BaseParserRuleContext) { - // from RuleContext - prc.parentCtx = ctx.parentCtx - prc.invokingState = ctx.invokingState - prc.children = nil - prc.start = ctx.start - prc.stop = ctx.stop -} - -func (prc *BaseParserRuleContext) GetText() string { - if prc.GetChildCount() == 0 { - return "" - } - - var s string - for _, child := range prc.children { - s += child.(ParseTree).GetText() - } - - return s -} - -// Double dispatch methods for listeners -func (prc *BaseParserRuleContext) EnterRule(listener ParseTreeListener) { -} - -func (prc *BaseParserRuleContext) ExitRule(listener ParseTreeListener) { -} - -// * Does not set parent link other add methods do that/// -func (prc *BaseParserRuleContext) addTerminalNodeChild(child TerminalNode) TerminalNode { - if prc.children == nil { - prc.children = make([]Tree, 0) - } - if child == nil { - panic("Child may not be null") - } - prc.children = append(prc.children, child) - return child -} - -func (prc *BaseParserRuleContext) AddChild(child RuleContext) RuleContext { - if prc.children == nil { - prc.children = make([]Tree, 0) - } - if child == nil { - panic("Child may not be null") - } - prc.children = append(prc.children, child) - return child -} - -// * Used by EnterOuterAlt to toss out a RuleContext previously added as -// we entered a rule. If we have // label, we will need to remove -// generic ruleContext object. -// / -func (prc *BaseParserRuleContext) RemoveLastChild() { - if prc.children != nil && len(prc.children) > 0 { - prc.children = prc.children[0 : len(prc.children)-1] - } -} - -func (prc *BaseParserRuleContext) AddTokenNode(token Token) *TerminalNodeImpl { - - node := NewTerminalNodeImpl(token) - prc.addTerminalNodeChild(node) - node.parentCtx = prc - return node - -} - -func (prc *BaseParserRuleContext) AddErrorNode(badToken Token) *ErrorNodeImpl { - node := NewErrorNodeImpl(badToken) - prc.addTerminalNodeChild(node) - node.parentCtx = prc - return node -} - -func (prc *BaseParserRuleContext) GetChild(i int) Tree { - if prc.children != nil && len(prc.children) >= i { - return prc.children[i] - } - - return nil -} - -func (prc *BaseParserRuleContext) GetChildOfType(i int, childType reflect.Type) RuleContext { - if childType == nil { - return prc.GetChild(i).(RuleContext) - } - - for j := 0; j < len(prc.children); j++ { - child := prc.children[j] - if reflect.TypeOf(child) == childType { - if i == 0 { - return child.(RuleContext) - } - - i-- - } - } - - return nil -} - -func (prc *BaseParserRuleContext) ToStringTree(ruleNames []string, recog Recognizer) string { - return TreesStringTree(prc, ruleNames, recog) -} - -func (prc *BaseParserRuleContext) GetRuleContext() RuleContext { - return prc -} - -func (prc *BaseParserRuleContext) Accept(visitor ParseTreeVisitor) interface{} { - return visitor.VisitChildren(prc) -} - -func (prc *BaseParserRuleContext) SetStart(t Token) { - prc.start = t -} - -func (prc *BaseParserRuleContext) GetStart() Token { - return prc.start -} - -func (prc *BaseParserRuleContext) SetStop(t Token) { - prc.stop = t -} - -func (prc *BaseParserRuleContext) GetStop() Token { - return prc.stop -} - -func (prc *BaseParserRuleContext) GetToken(ttype int, i int) TerminalNode { - - for j := 0; j < len(prc.children); j++ { - child := prc.children[j] - if c2, ok := child.(TerminalNode); ok { - if c2.GetSymbol().GetTokenType() == ttype { - if i == 0 { - return c2 - } - - i-- - } - } - } - return nil -} - -func (prc *BaseParserRuleContext) GetTokens(ttype int) []TerminalNode { - if prc.children == nil { - return make([]TerminalNode, 0) - } - - tokens := make([]TerminalNode, 0) - - for j := 0; j < len(prc.children); j++ { - child := prc.children[j] - if tchild, ok := child.(TerminalNode); ok { - if tchild.GetSymbol().GetTokenType() == ttype { - tokens = append(tokens, tchild) - } - } - } - - return tokens -} - -func (prc *BaseParserRuleContext) GetPayload() interface{} { - return prc -} - -func (prc *BaseParserRuleContext) getChild(ctxType reflect.Type, i int) RuleContext { - if prc.children == nil || i < 0 || i >= len(prc.children) { - return nil - } - - j := -1 // what element have we found with ctxType? - for _, o := range prc.children { - - childType := reflect.TypeOf(o) - - if childType.Implements(ctxType) { - j++ - if j == i { - return o.(RuleContext) - } - } - } - return nil -} - -// Go lacks generics, so it's not possible for us to return the child with the correct type, but we do -// check for convertibility - -func (prc *BaseParserRuleContext) GetTypedRuleContext(ctxType reflect.Type, i int) RuleContext { - return prc.getChild(ctxType, i) -} - -func (prc *BaseParserRuleContext) GetTypedRuleContexts(ctxType reflect.Type) []RuleContext { - if prc.children == nil { - return make([]RuleContext, 0) - } - - contexts := make([]RuleContext, 0) - - for _, child := range prc.children { - childType := reflect.TypeOf(child) - - if childType.ConvertibleTo(ctxType) { - contexts = append(contexts, child.(RuleContext)) - } - } - return contexts -} - -func (prc *BaseParserRuleContext) GetChildCount() int { - if prc.children == nil { - return 0 - } - - return len(prc.children) -} - -func (prc *BaseParserRuleContext) GetSourceInterval() *Interval { - if prc.start == nil || prc.stop == nil { - return TreeInvalidInterval - } - - return NewInterval(prc.start.GetTokenIndex(), prc.stop.GetTokenIndex()) -} - -//need to manage circular dependencies, so export now - -// Print out a whole tree, not just a node, in LISP format -// (root child1 .. childN). Print just a node if b is a leaf. -// - -func (prc *BaseParserRuleContext) String(ruleNames []string, stop RuleContext) string { - - var p ParserRuleContext = prc - s := "[" - for p != nil && p != stop { - if ruleNames == nil { - if !p.IsEmpty() { - s += strconv.Itoa(p.GetInvokingState()) - } - } else { - ri := p.GetRuleIndex() - var ruleName string - if ri >= 0 && ri < len(ruleNames) { - ruleName = ruleNames[ri] - } else { - ruleName = strconv.Itoa(ri) - } - s += ruleName - } - if p.GetParent() != nil && (ruleNames != nil || !p.GetParent().(ParserRuleContext).IsEmpty()) { - s += " " - } - pi := p.GetParent() - if pi != nil { - p = pi.(ParserRuleContext) - } else { - p = nil - } - } - s += "]" - return s -} - -var RuleContextEmpty = NewBaseParserRuleContext(nil, -1) - -type InterpreterRuleContext interface { - ParserRuleContext -} - -type BaseInterpreterRuleContext struct { - *BaseParserRuleContext -} - -func NewBaseInterpreterRuleContext(parent BaseInterpreterRuleContext, invokingStateNumber, ruleIndex int) *BaseInterpreterRuleContext { - - prc := new(BaseInterpreterRuleContext) - - prc.BaseParserRuleContext = NewBaseParserRuleContext(parent, invokingStateNumber) - - prc.RuleIndex = ruleIndex - - return prc -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/prediction_context.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/prediction_context.go deleted file mode 100644 index 99acb333fa27..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/prediction_context.go +++ /dev/null @@ -1,756 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "strconv" -) - -// Represents {@code $} in local context prediction, which means wildcard. -// {@code//+x =//}. -// / -const ( - BasePredictionContextEmptyReturnState = 0x7FFFFFFF -) - -// Represents {@code $} in an array in full context mode, when {@code $} -// doesn't mean wildcard: {@code $ + x = [$,x]}. Here, -// {@code $} = {@link //EmptyReturnState}. -// / - -var ( - BasePredictionContextglobalNodeCount = 1 - BasePredictionContextid = BasePredictionContextglobalNodeCount -) - -type PredictionContext interface { - hash() int - GetParent(int) PredictionContext - getReturnState(int) int - equals(PredictionContext) bool - length() int - isEmpty() bool - hasEmptyPath() bool - String() string -} - -type BasePredictionContext struct { - cachedHash int -} - -func NewBasePredictionContext(cachedHash int) *BasePredictionContext { - pc := new(BasePredictionContext) - pc.cachedHash = cachedHash - - return pc -} - -func (b *BasePredictionContext) isEmpty() bool { - return false -} - -func calculateHash(parent PredictionContext, returnState int) int { - h := murmurInit(1) - h = murmurUpdate(h, parent.hash()) - h = murmurUpdate(h, returnState) - return murmurFinish(h, 2) -} - -func calculateEmptyHash() int { - h := murmurInit(1) - return murmurFinish(h, 0) -} - -// Used to cache {@link BasePredictionContext} objects. Its used for the shared -// context cash associated with contexts in DFA states. This cache -// can be used for both lexers and parsers. - -type PredictionContextCache struct { - cache map[PredictionContext]PredictionContext -} - -func NewPredictionContextCache() *PredictionContextCache { - t := new(PredictionContextCache) - t.cache = make(map[PredictionContext]PredictionContext) - return t -} - -// Add a context to the cache and return it. If the context already exists, -// return that one instead and do not add a Newcontext to the cache. -// Protect shared cache from unsafe thread access. -// -func (p *PredictionContextCache) add(ctx PredictionContext) PredictionContext { - if ctx == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY - } - existing := p.cache[ctx] - if existing != nil { - return existing - } - p.cache[ctx] = ctx - return ctx -} - -func (p *PredictionContextCache) Get(ctx PredictionContext) PredictionContext { - return p.cache[ctx] -} - -func (p *PredictionContextCache) length() int { - return len(p.cache) -} - -type SingletonPredictionContext interface { - PredictionContext -} - -type BaseSingletonPredictionContext struct { - *BasePredictionContext - - parentCtx PredictionContext - returnState int -} - -func NewBaseSingletonPredictionContext(parent PredictionContext, returnState int) *BaseSingletonPredictionContext { - - s := new(BaseSingletonPredictionContext) - s.BasePredictionContext = NewBasePredictionContext(37) - - if parent != nil { - s.cachedHash = calculateHash(parent, returnState) - } else { - s.cachedHash = calculateEmptyHash() - } - - s.parentCtx = parent - s.returnState = returnState - - return s -} - -func SingletonBasePredictionContextCreate(parent PredictionContext, returnState int) PredictionContext { - if returnState == BasePredictionContextEmptyReturnState && parent == nil { - // someone can pass in the bits of an array ctx that mean $ - return BasePredictionContextEMPTY - } - - return NewBaseSingletonPredictionContext(parent, returnState) -} - -func (b *BaseSingletonPredictionContext) length() int { - return 1 -} - -func (b *BaseSingletonPredictionContext) GetParent(index int) PredictionContext { - return b.parentCtx -} - -func (b *BaseSingletonPredictionContext) getReturnState(index int) int { - return b.returnState -} - -func (b *BaseSingletonPredictionContext) hasEmptyPath() bool { - return b.returnState == BasePredictionContextEmptyReturnState -} - -func (b *BaseSingletonPredictionContext) equals(other PredictionContext) bool { - if b == other { - return true - } else if _, ok := other.(*BaseSingletonPredictionContext); !ok { - return false - } else if b.hash() != other.hash() { - return false // can't be same if hash is different - } - - otherP := other.(*BaseSingletonPredictionContext) - - if b.returnState != other.getReturnState(0) { - return false - } else if b.parentCtx == nil { - return otherP.parentCtx == nil - } - - return b.parentCtx.equals(otherP.parentCtx) -} - -func (b *BaseSingletonPredictionContext) hash() int { - h := murmurInit(1) - - if b.parentCtx == nil { - return murmurFinish(h, 0) - } - - h = murmurUpdate(h, b.parentCtx.hash()) - h = murmurUpdate(h, b.returnState) - return murmurFinish(h, 2) -} - -func (b *BaseSingletonPredictionContext) String() string { - var up string - - if b.parentCtx == nil { - up = "" - } else { - up = b.parentCtx.String() - } - - if len(up) == 0 { - if b.returnState == BasePredictionContextEmptyReturnState { - return "$" - } - - return strconv.Itoa(b.returnState) - } - - return strconv.Itoa(b.returnState) + " " + up -} - -var BasePredictionContextEMPTY = NewEmptyPredictionContext() - -type EmptyPredictionContext struct { - *BaseSingletonPredictionContext -} - -func NewEmptyPredictionContext() *EmptyPredictionContext { - - p := new(EmptyPredictionContext) - - p.BaseSingletonPredictionContext = NewBaseSingletonPredictionContext(nil, BasePredictionContextEmptyReturnState) - - return p -} - -func (e *EmptyPredictionContext) isEmpty() bool { - return true -} - -func (e *EmptyPredictionContext) GetParent(index int) PredictionContext { - return nil -} - -func (e *EmptyPredictionContext) getReturnState(index int) int { - return e.returnState -} - -func (e *EmptyPredictionContext) equals(other PredictionContext) bool { - return e == other -} - -func (e *EmptyPredictionContext) String() string { - return "$" -} - -type ArrayPredictionContext struct { - *BasePredictionContext - - parents []PredictionContext - returnStates []int -} - -func NewArrayPredictionContext(parents []PredictionContext, returnStates []int) *ArrayPredictionContext { - // Parent can be nil only if full ctx mode and we make an array - // from {@link //EMPTY} and non-empty. We merge {@link //EMPTY} by using - // nil parent and - // returnState == {@link //EmptyReturnState}. - - c := new(ArrayPredictionContext) - c.BasePredictionContext = NewBasePredictionContext(37) - - for i := range parents { - c.cachedHash += calculateHash(parents[i], returnStates[i]) - } - - c.parents = parents - c.returnStates = returnStates - - return c -} - -func (a *ArrayPredictionContext) GetReturnStates() []int { - return a.returnStates -} - -func (a *ArrayPredictionContext) hasEmptyPath() bool { - return a.getReturnState(a.length()-1) == BasePredictionContextEmptyReturnState -} - -func (a *ArrayPredictionContext) isEmpty() bool { - // since EmptyReturnState can only appear in the last position, we - // don't need to verify that size==1 - return a.returnStates[0] == BasePredictionContextEmptyReturnState -} - -func (a *ArrayPredictionContext) length() int { - return len(a.returnStates) -} - -func (a *ArrayPredictionContext) GetParent(index int) PredictionContext { - return a.parents[index] -} - -func (a *ArrayPredictionContext) getReturnState(index int) int { - return a.returnStates[index] -} - -func (a *ArrayPredictionContext) equals(other PredictionContext) bool { - if _, ok := other.(*ArrayPredictionContext); !ok { - return false - } else if a.cachedHash != other.hash() { - return false // can't be same if hash is different - } else { - otherP := other.(*ArrayPredictionContext) - return &a.returnStates == &otherP.returnStates && &a.parents == &otherP.parents - } -} - -func (a *ArrayPredictionContext) hash() int { - h := murmurInit(1) - - for _, p := range a.parents { - h = murmurUpdate(h, p.hash()) - } - - for _, r := range a.returnStates { - h = murmurUpdate(h, r) - } - - return murmurFinish(h, 2 * len(a.parents)) -} - -func (a *ArrayPredictionContext) String() string { - if a.isEmpty() { - return "[]" - } - - s := "[" - for i := 0; i < len(a.returnStates); i++ { - if i > 0 { - s = s + ", " - } - if a.returnStates[i] == BasePredictionContextEmptyReturnState { - s = s + "$" - continue - } - s = s + strconv.Itoa(a.returnStates[i]) - if a.parents[i] != nil { - s = s + " " + a.parents[i].String() - } else { - s = s + "nil" - } - } - - return s + "]" -} - -// Convert a {@link RuleContext} tree to a {@link BasePredictionContext} graph. -// Return {@link //EMPTY} if {@code outerContext} is empty or nil. -// / -func predictionContextFromRuleContext(a *ATN, outerContext RuleContext) PredictionContext { - if outerContext == nil { - outerContext = RuleContextEmpty - } - // if we are in RuleContext of start rule, s, then BasePredictionContext - // is EMPTY. Nobody called us. (if we are empty, return empty) - if outerContext.GetParent() == nil || outerContext == RuleContextEmpty { - return BasePredictionContextEMPTY - } - // If we have a parent, convert it to a BasePredictionContext graph - parent := predictionContextFromRuleContext(a, outerContext.GetParent().(RuleContext)) - state := a.states[outerContext.GetInvokingState()] - transition := state.GetTransitions()[0] - - return SingletonBasePredictionContextCreate(parent, transition.(*RuleTransition).followState.GetStateNumber()) -} - -func merge(a, b PredictionContext, rootIsWildcard bool, mergeCache *DoubleDict) PredictionContext { - // share same graph if both same - if a == b { - return a - } - - ac, ok1 := a.(*BaseSingletonPredictionContext) - bc, ok2 := b.(*BaseSingletonPredictionContext) - - if ok1 && ok2 { - return mergeSingletons(ac, bc, rootIsWildcard, mergeCache) - } - // At least one of a or b is array - // If one is $ and rootIsWildcard, return $ as// wildcard - if rootIsWildcard { - if _, ok := a.(*EmptyPredictionContext); ok { - return a - } - if _, ok := b.(*EmptyPredictionContext); ok { - return b - } - } - // convert singleton so both are arrays to normalize - if _, ok := a.(*BaseSingletonPredictionContext); ok { - a = NewArrayPredictionContext([]PredictionContext{a.GetParent(0)}, []int{a.getReturnState(0)}) - } - if _, ok := b.(*BaseSingletonPredictionContext); ok { - b = NewArrayPredictionContext([]PredictionContext{b.GetParent(0)}, []int{b.getReturnState(0)}) - } - return mergeArrays(a.(*ArrayPredictionContext), b.(*ArrayPredictionContext), rootIsWildcard, mergeCache) -} - -// -// Merge two {@link SingletonBasePredictionContext} instances. -// -//

Stack tops equal, parents merge is same return left graph.
-//

-// -//

Same stack top, parents differ merge parents giving array node, then -// remainders of those graphs. A Newroot node is created to point to the -// merged parents.
-//

-// -//

Different stack tops pointing to same parent. Make array node for the -// root where both element in the root point to the same (original) -// parent.
-//

-// -//

Different stack tops pointing to different parents. Make array node for -// the root where each element points to the corresponding original -// parent.
-//

-// -// @param a the first {@link SingletonBasePredictionContext} -// @param b the second {@link SingletonBasePredictionContext} -// @param rootIsWildcard {@code true} if this is a local-context merge, -// otherwise false to indicate a full-context merge -// @param mergeCache -// / -func mergeSingletons(a, b *BaseSingletonPredictionContext, rootIsWildcard bool, mergeCache *DoubleDict) PredictionContext { - if mergeCache != nil { - previous := mergeCache.Get(a.hash(), b.hash()) - if previous != nil { - return previous.(PredictionContext) - } - previous = mergeCache.Get(b.hash(), a.hash()) - if previous != nil { - return previous.(PredictionContext) - } - } - - rootMerge := mergeRoot(a, b, rootIsWildcard) - if rootMerge != nil { - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), rootMerge) - } - return rootMerge - } - if a.returnState == b.returnState { - parent := merge(a.parentCtx, b.parentCtx, rootIsWildcard, mergeCache) - // if parent is same as existing a or b parent or reduced to a parent, - // return it - if parent == a.parentCtx { - return a // ax + bx = ax, if a=b - } - if parent == b.parentCtx { - return b // ax + bx = bx, if a=b - } - // else: ax + ay = a'[x,y] - // merge parents x and y, giving array node with x,y then remainders - // of those graphs. dup a, a' points at merged array - // Newjoined parent so create Newsingleton pointing to it, a' - spc := SingletonBasePredictionContextCreate(parent, a.returnState) - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), spc) - } - return spc - } - // a != b payloads differ - // see if we can collapse parents due to $+x parents if local ctx - var singleParent PredictionContext - if a == b || (a.parentCtx != nil && a.parentCtx == b.parentCtx) { // ax + - // bx = - // [a,b]x - singleParent = a.parentCtx - } - if singleParent != nil { // parents are same - // sort payloads and use same parent - payloads := []int{a.returnState, b.returnState} - if a.returnState > b.returnState { - payloads[0] = b.returnState - payloads[1] = a.returnState - } - parents := []PredictionContext{singleParent, singleParent} - apc := NewArrayPredictionContext(parents, payloads) - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), apc) - } - return apc - } - // parents differ and can't merge them. Just pack together - // into array can't merge. - // ax + by = [ax,by] - payloads := []int{a.returnState, b.returnState} - parents := []PredictionContext{a.parentCtx, b.parentCtx} - if a.returnState > b.returnState { // sort by payload - payloads[0] = b.returnState - payloads[1] = a.returnState - parents = []PredictionContext{b.parentCtx, a.parentCtx} - } - apc := NewArrayPredictionContext(parents, payloads) - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), apc) - } - return apc -} - -// -// Handle case where at least one of {@code a} or {@code b} is -// {@link //EMPTY}. In the following diagrams, the symbol {@code $} is used -// to represent {@link //EMPTY}. -// -//

Local-Context Merges

-// -//

These local-context merge operations are used when {@code rootIsWildcard} -// is true.

-// -//

{@link //EMPTY} is superset of any graph return {@link //EMPTY}.
-//

-// -//

{@link //EMPTY} and anything is {@code //EMPTY}, so merged parent is -// {@code //EMPTY} return left graph.
-//

-// -//

Special case of last merge if local context.
-//

-// -//

Full-Context Merges

-// -//

These full-context merge operations are used when {@code rootIsWildcard} -// is false.

-// -//

-// -//

Must keep all contexts {@link //EMPTY} in array is a special value (and -// nil parent).
-//

-// -//

-// -// @param a the first {@link SingletonBasePredictionContext} -// @param b the second {@link SingletonBasePredictionContext} -// @param rootIsWildcard {@code true} if this is a local-context merge, -// otherwise false to indicate a full-context merge -// / -func mergeRoot(a, b SingletonPredictionContext, rootIsWildcard bool) PredictionContext { - if rootIsWildcard { - if a == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY // // + b =// - } - if b == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY // a +// =// - } - } else { - if a == BasePredictionContextEMPTY && b == BasePredictionContextEMPTY { - return BasePredictionContextEMPTY // $ + $ = $ - } else if a == BasePredictionContextEMPTY { // $ + x = [$,x] - payloads := []int{b.getReturnState(-1), BasePredictionContextEmptyReturnState} - parents := []PredictionContext{b.GetParent(-1), nil} - return NewArrayPredictionContext(parents, payloads) - } else if b == BasePredictionContextEMPTY { // x + $ = [$,x] ($ is always first if present) - payloads := []int{a.getReturnState(-1), BasePredictionContextEmptyReturnState} - parents := []PredictionContext{a.GetParent(-1), nil} - return NewArrayPredictionContext(parents, payloads) - } - } - return nil -} - -// -// Merge two {@link ArrayBasePredictionContext} instances. -// -//

Different tops, different parents.
-//

-// -//

Shared top, same parents.
-//

-// -//

Shared top, different parents.
-//

-// -//

Shared top, all shared parents.
-//

-// -//

Equal tops, merge parents and reduce top to -// {@link SingletonBasePredictionContext}.
-//

-// / -func mergeArrays(a, b *ArrayPredictionContext, rootIsWildcard bool, mergeCache *DoubleDict) PredictionContext { - if mergeCache != nil { - previous := mergeCache.Get(a.hash(), b.hash()) - if previous != nil { - return previous.(PredictionContext) - } - previous = mergeCache.Get(b.hash(), a.hash()) - if previous != nil { - return previous.(PredictionContext) - } - } - // merge sorted payloads a + b => M - i := 0 // walks a - j := 0 // walks b - k := 0 // walks target M array - - mergedReturnStates := make([]int, len(a.returnStates)+len(b.returnStates)) - mergedParents := make([]PredictionContext, len(a.returnStates)+len(b.returnStates)) - // walk and merge to yield mergedParents, mergedReturnStates - for i < len(a.returnStates) && j < len(b.returnStates) { - aParent := a.parents[i] - bParent := b.parents[j] - if a.returnStates[i] == b.returnStates[j] { - // same payload (stack tops are equal), must yield merged singleton - payload := a.returnStates[i] - // $+$ = $ - bothDollars := payload == BasePredictionContextEmptyReturnState && aParent == nil && bParent == nil - axAX := (aParent != nil && bParent != nil && aParent == bParent) // ax+ax - // -> - // ax - if bothDollars || axAX { - mergedParents[k] = aParent // choose left - mergedReturnStates[k] = payload - } else { // ax+ay -> a'[x,y] - mergedParent := merge(aParent, bParent, rootIsWildcard, mergeCache) - mergedParents[k] = mergedParent - mergedReturnStates[k] = payload - } - i++ // hop over left one as usual - j++ // but also Skip one in right side since we merge - } else if a.returnStates[i] < b.returnStates[j] { // copy a[i] to M - mergedParents[k] = aParent - mergedReturnStates[k] = a.returnStates[i] - i++ - } else { // b > a, copy b[j] to M - mergedParents[k] = bParent - mergedReturnStates[k] = b.returnStates[j] - j++ - } - k++ - } - // copy over any payloads remaining in either array - if i < len(a.returnStates) { - for p := i; p < len(a.returnStates); p++ { - mergedParents[k] = a.parents[p] - mergedReturnStates[k] = a.returnStates[p] - k++ - } - } else { - for p := j; p < len(b.returnStates); p++ { - mergedParents[k] = b.parents[p] - mergedReturnStates[k] = b.returnStates[p] - k++ - } - } - // trim merged if we combined a few that had same stack tops - if k < len(mergedParents) { // write index < last position trim - if k == 1 { // for just one merged element, return singleton top - pc := SingletonBasePredictionContextCreate(mergedParents[0], mergedReturnStates[0]) - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), pc) - } - return pc - } - mergedParents = mergedParents[0:k] - mergedReturnStates = mergedReturnStates[0:k] - } - - M := NewArrayPredictionContext(mergedParents, mergedReturnStates) - - // if we created same array as a or b, return that instead - // TODO: track whether this is possible above during merge sort for speed - if M == a { - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), a) - } - return a - } - if M == b { - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), b) - } - return b - } - combineCommonParents(mergedParents) - - if mergeCache != nil { - mergeCache.set(a.hash(), b.hash(), M) - } - return M -} - -// -// Make pass over all M {@code parents} merge any {@code equals()} -// ones. -// / -func combineCommonParents(parents []PredictionContext) { - uniqueParents := make(map[PredictionContext]PredictionContext) - - for p := 0; p < len(parents); p++ { - parent := parents[p] - if uniqueParents[parent] == nil { - uniqueParents[parent] = parent - } - } - for q := 0; q < len(parents); q++ { - parents[q] = uniqueParents[parents[q]] - } -} - -func getCachedBasePredictionContext(context PredictionContext, contextCache *PredictionContextCache, visited map[PredictionContext]PredictionContext) PredictionContext { - - if context.isEmpty() { - return context - } - existing := visited[context] - if existing != nil { - return existing - } - existing = contextCache.Get(context) - if existing != nil { - visited[context] = existing - return existing - } - changed := false - parents := make([]PredictionContext, context.length()) - for i := 0; i < len(parents); i++ { - parent := getCachedBasePredictionContext(context.GetParent(i), contextCache, visited) - if changed || parent != context.GetParent(i) { - if !changed { - parents = make([]PredictionContext, context.length()) - for j := 0; j < context.length(); j++ { - parents[j] = context.GetParent(j) - } - changed = true - } - parents[i] = parent - } - } - if !changed { - contextCache.add(context) - visited[context] = context - return context - } - var updated PredictionContext - if len(parents) == 0 { - updated = BasePredictionContextEMPTY - } else if len(parents) == 1 { - updated = SingletonBasePredictionContextCreate(parents[0], context.getReturnState(0)) - } else { - updated = NewArrayPredictionContext(parents, context.(*ArrayPredictionContext).GetReturnStates()) - } - contextCache.add(updated) - visited[updated] = updated - visited[context] = updated - - return updated -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/prediction_mode.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/prediction_mode.go deleted file mode 100644 index 15718f912bc0..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/prediction_mode.go +++ /dev/null @@ -1,553 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// This enumeration defines the prediction modes available in ANTLR 4 along with -// utility methods for analyzing configuration sets for conflicts and/or -// ambiguities. - -const ( - // - // The SLL(*) prediction mode. This prediction mode ignores the current - // parser context when making predictions. This is the fastest prediction - // mode, and provides correct results for many grammars. This prediction - // mode is more powerful than the prediction mode provided by ANTLR 3, but - // may result in syntax errors for grammar and input combinations which are - // not SLL. - // - //

- // When using this prediction mode, the parser will either return a correct - // parse tree (i.e. the same parse tree that would be returned with the - // {@link //LL} prediction mode), or it will Report a syntax error. If a - // syntax error is encountered when using the {@link //SLL} prediction mode, - // it may be due to either an actual syntax error in the input or indicate - // that the particular combination of grammar and input requires the more - // powerful {@link //LL} prediction abilities to complete successfully.

- // - //

- // This prediction mode does not provide any guarantees for prediction - // behavior for syntactically-incorrect inputs.

- // - PredictionModeSLL = 0 - // - // The LL(*) prediction mode. This prediction mode allows the current parser - // context to be used for resolving SLL conflicts that occur during - // prediction. This is the fastest prediction mode that guarantees correct - // parse results for all combinations of grammars with syntactically correct - // inputs. - // - //

- // When using this prediction mode, the parser will make correct decisions - // for all syntactically-correct grammar and input combinations. However, in - // cases where the grammar is truly ambiguous this prediction mode might not - // Report a precise answer for exactly which alternatives are - // ambiguous.

- // - //

- // This prediction mode does not provide any guarantees for prediction - // behavior for syntactically-incorrect inputs.

- // - PredictionModeLL = 1 - // - // The LL(*) prediction mode with exact ambiguity detection. In addition to - // the correctness guarantees provided by the {@link //LL} prediction mode, - // this prediction mode instructs the prediction algorithm to determine the - // complete and exact set of ambiguous alternatives for every ambiguous - // decision encountered while parsing. - // - //

- // This prediction mode may be used for diagnosing ambiguities during - // grammar development. Due to the performance overhead of calculating sets - // of ambiguous alternatives, this prediction mode should be avoided when - // the exact results are not necessary.

- // - //

- // This prediction mode does not provide any guarantees for prediction - // behavior for syntactically-incorrect inputs.

- // - PredictionModeLLExactAmbigDetection = 2 -) - -// -// Computes the SLL prediction termination condition. -// -//

-// This method computes the SLL prediction termination condition for both of -// the following cases.

-// -//
    -//
  • The usual SLL+LL fallback upon SLL conflict
  • -//
  • Pure SLL without LL fallback
  • -//
-// -//

COMBINED SLL+LL PARSING

-// -//

When LL-fallback is enabled upon SLL conflict, correct predictions are -// ensured regardless of how the termination condition is computed by this -// method. Due to the substantially higher cost of LL prediction, the -// prediction should only fall back to LL when the additional lookahead -// cannot lead to a unique SLL prediction.

-// -//

Assuming combined SLL+LL parsing, an SLL configuration set with only -// conflicting subsets should fall back to full LL, even if the -// configuration sets don't resolve to the same alternative (e.g. -// {@code {1,2}} and {@code {3,4}}. If there is at least one non-conflicting -// configuration, SLL could continue with the hopes that more lookahead will -// resolve via one of those non-conflicting configurations.

-// -//

Here's the prediction termination rule them: SLL (for SLL+LL parsing) -// stops when it sees only conflicting configuration subsets. In contrast, -// full LL keeps going when there is uncertainty.

-// -//

HEURISTIC

-// -//

As a heuristic, we stop prediction when we see any conflicting subset -// unless we see a state that only has one alternative associated with it. -// The single-alt-state thing lets prediction continue upon rules like -// (otherwise, it would admit defeat too soon):

-// -//

{@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) '' }

-// -//

When the ATN simulation reaches the state before {@code ''}, it has a -// DFA state that looks like: {@code [12|1|[], 6|2|[], 12|2|[]]}. Naturally -// {@code 12|1|[]} and {@code 12|2|[]} conflict, but we cannot stop -// processing this node because alternative to has another way to continue, -// via {@code [6|2|[]]}.

-// -//

It also let's us continue for this rule:

-// -//

{@code [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B }

-// -//

After Matching input A, we reach the stop state for rule A, state 1. -// State 8 is the state right before B. Clearly alternatives 1 and 2 -// conflict and no amount of further lookahead will separate the two. -// However, alternative 3 will be able to continue and so we do not stop -// working on this state. In the previous example, we're concerned with -// states associated with the conflicting alternatives. Here alt 3 is not -// associated with the conflicting configs, but since we can continue -// looking for input reasonably, don't declare the state done.

-// -//

PURE SLL PARSING

-// -//

To handle pure SLL parsing, all we have to do is make sure that we -// combine stack contexts for configurations that differ only by semantic -// predicate. From there, we can do the usual SLL termination heuristic.

-// -//

PREDICATES IN SLL+LL PARSING

-// -//

SLL decisions don't evaluate predicates until after they reach DFA stop -// states because they need to create the DFA cache that works in all -// semantic situations. In contrast, full LL evaluates predicates collected -// during start state computation so it can ignore predicates thereafter. -// This means that SLL termination detection can totally ignore semantic -// predicates.

-// -//

Implementation-wise, {@link ATNConfigSet} combines stack contexts but not -// semantic predicate contexts so we might see two configurations like the -// following.

-// -//

{@code (s, 1, x, {}), (s, 1, x', {p})}

-// -//

Before testing these configurations against others, we have to merge -// {@code x} and {@code x'} (without modifying the existing configurations). -// For example, we test {@code (x+x')==x''} when looking for conflicts in -// the following configurations.

-// -//

{@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}

-// -//

If the configuration set has predicates (as indicated by -// {@link ATNConfigSet//hasSemanticContext}), this algorithm makes a copy of -// the configurations to strip out all of the predicates so that a standard -// {@link ATNConfigSet} will merge everything ignoring predicates.

-// -func PredictionModehasSLLConflictTerminatingPrediction(mode int, configs ATNConfigSet) bool { - // Configs in rule stop states indicate reaching the end of the decision - // rule (local context) or end of start rule (full context). If all - // configs meet this condition, then none of the configurations is able - // to Match additional input so we terminate prediction. - // - if PredictionModeallConfigsInRuleStopStates(configs) { - return true - } - // pure SLL mode parsing - if mode == PredictionModeSLL { - // Don't bother with combining configs from different semantic - // contexts if we can fail over to full LL costs more time - // since we'll often fail over anyway. - if configs.HasSemanticContext() { - // dup configs, tossing out semantic predicates - dup := NewBaseATNConfigSet(false) - for _, c := range configs.GetItems() { - - // NewBaseATNConfig({semanticContext:}, c) - c = NewBaseATNConfig2(c, SemanticContextNone) - dup.Add(c, nil) - } - configs = dup - } - // now we have combined contexts for configs with dissimilar preds - } - // pure SLL or combined SLL+LL mode parsing - altsets := PredictionModegetConflictingAltSubsets(configs) - return PredictionModehasConflictingAltSet(altsets) && !PredictionModehasStateAssociatedWithOneAlt(configs) -} - -// Checks if any configuration in {@code configs} is in a -// {@link RuleStopState}. Configurations meeting this condition have reached -// the end of the decision rule (local context) or end of start rule (full -// context). -// -// @param configs the configuration set to test -// @return {@code true} if any configuration in {@code configs} is in a -// {@link RuleStopState}, otherwise {@code false} -func PredictionModehasConfigInRuleStopState(configs ATNConfigSet) bool { - for _, c := range configs.GetItems() { - if _, ok := c.GetState().(*RuleStopState); ok { - return true - } - } - return false -} - -// Checks if all configurations in {@code configs} are in a -// {@link RuleStopState}. Configurations meeting this condition have reached -// the end of the decision rule (local context) or end of start rule (full -// context). -// -// @param configs the configuration set to test -// @return {@code true} if all configurations in {@code configs} are in a -// {@link RuleStopState}, otherwise {@code false} -func PredictionModeallConfigsInRuleStopStates(configs ATNConfigSet) bool { - - for _, c := range configs.GetItems() { - if _, ok := c.GetState().(*RuleStopState); !ok { - return false - } - } - return true -} - -// -// Full LL prediction termination. -// -//

Can we stop looking ahead during ATN simulation or is there some -// uncertainty as to which alternative we will ultimately pick, after -// consuming more input? Even if there are partial conflicts, we might know -// that everything is going to resolve to the same minimum alternative. That -// means we can stop since no more lookahead will change that fact. On the -// other hand, there might be multiple conflicts that resolve to different -// minimums. That means we need more look ahead to decide which of those -// alternatives we should predict.

-// -//

The basic idea is to split the set of configurations {@code C}, into -// conflicting subsets {@code (s, _, ctx, _)} and singleton subsets with -// non-conflicting configurations. Two configurations conflict if they have -// identical {@link ATNConfig//state} and {@link ATNConfig//context} values -// but different {@link ATNConfig//alt} value, e.g. {@code (s, i, ctx, _)} -// and {@code (s, j, ctx, _)} for {@code i!=j}.

-// -//

Reduce these configuration subsets to the set of possible alternatives. -// You can compute the alternative subsets in one pass as follows:

-// -//

{@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in -// {@code C} holding {@code s} and {@code ctx} fixed.

-// -//

Or in pseudo-code, for each configuration {@code c} in {@code C}:

-// -//
-// map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not
-// alt and not pred
-// 
-// -//

The values in {@code map} are the set of {@code A_s,ctx} sets.

-// -//

If {@code |A_s,ctx|=1} then there is no conflict associated with -// {@code s} and {@code ctx}.

-// -//

Reduce the subsets to singletons by choosing a minimum of each subset. If -// the union of these alternative subsets is a singleton, then no amount of -// more lookahead will help us. We will always pick that alternative. If, -// however, there is more than one alternative, then we are uncertain which -// alternative to predict and must continue looking for resolution. We may -// or may not discover an ambiguity in the future, even if there are no -// conflicting subsets this round.

-// -//

The biggest sin is to terminate early because it means we've made a -// decision but were uncertain as to the eventual outcome. We haven't used -// enough lookahead. On the other hand, announcing a conflict too late is no -// big deal you will still have the conflict. It's just inefficient. It -// might even look until the end of file.

-// -//

No special consideration for semantic predicates is required because -// predicates are evaluated on-the-fly for full LL prediction, ensuring that -// no configuration contains a semantic context during the termination -// check.

-// -//

CONFLICTING CONFIGS

-// -//

Two configurations {@code (s, i, x)} and {@code (s, j, x')}, conflict -// when {@code i!=j} but {@code x=x'}. Because we merge all -// {@code (s, i, _)} configurations together, that means that there are at -// most {@code n} configurations associated with state {@code s} for -// {@code n} possible alternatives in the decision. The merged stacks -// complicate the comparison of configuration contexts {@code x} and -// {@code x'}. Sam checks to see if one is a subset of the other by calling -// merge and checking to see if the merged result is either {@code x} or -// {@code x'}. If the {@code x} associated with lowest alternative {@code i} -// is the superset, then {@code i} is the only possible prediction since the -// others resolve to {@code min(i)} as well. However, if {@code x} is -// associated with {@code j>i} then at least one stack configuration for -// {@code j} is not in conflict with alternative {@code i}. The algorithm -// should keep going, looking for more lookahead due to the uncertainty.

-// -//

For simplicity, I'm doing a equality check between {@code x} and -// {@code x'} that lets the algorithm continue to consume lookahead longer -// than necessary. The reason I like the equality is of course the -// simplicity but also because that is the test you need to detect the -// alternatives that are actually in conflict.

-// -//

CONTINUE/STOP RULE

-// -//

Continue if union of resolved alternative sets from non-conflicting and -// conflicting alternative subsets has more than one alternative. We are -// uncertain about which alternative to predict.

-// -//

The complete set of alternatives, {@code [i for (_,i,_)]}, tells us which -// alternatives are still in the running for the amount of input we've -// consumed at this point. The conflicting sets let us to strip away -// configurations that won't lead to more states because we resolve -// conflicts to the configuration with a minimum alternate for the -// conflicting set.

-// -//

CASES

-// -//
    -// -//
  • no conflicts and more than 1 alternative in set => continue
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s, 3, z)}, -// {@code (s', 1, y)}, {@code (s', 2, y)} yields non-conflicting set -// {@code {3}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} = -// {@code {1,3}} => continue -//
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)}, -// {@code (s', 2, y)}, {@code (s'', 1, z)} yields non-conflicting set -// {@code {1}} U conflicting sets {@code min({1,2})} U {@code min({1,2})} = -// {@code {1}} => stop and predict 1
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 1, y)}, -// {@code (s', 2, y)} yields conflicting, reduced sets {@code {1}} U -// {@code {1}} = {@code {1}} => stop and predict 1, can announce -// ambiguity {@code {1,2}}
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 2, y)}, -// {@code (s', 3, y)} yields conflicting, reduced sets {@code {1}} U -// {@code {2}} = {@code {1,2}} => continue
  • -// -//
  • {@code (s, 1, x)}, {@code (s, 2, x)}, {@code (s', 3, y)}, -// {@code (s', 4, y)} yields conflicting, reduced sets {@code {1}} U -// {@code {3}} = {@code {1,3}} => continue
  • -// -//
-// -//

EXACT AMBIGUITY DETECTION

-// -//

If all states Report the same conflicting set of alternatives, then we -// know we have the exact ambiguity set.

-// -//

|A_i|>1 and -// A_i = A_j for all i, j.

-// -//

In other words, we continue examining lookahead until all {@code A_i} -// have more than one alternative and all {@code A_i} are the same. If -// {@code A={{1,2}, {1,3}}}, then regular LL prediction would terminate -// because the resolved set is {@code {1}}. To determine what the real -// ambiguity is, we have to know whether the ambiguity is between one and -// two or one and three so we keep going. We can only stop prediction when -// we need exact ambiguity detection when the sets look like -// {@code A={{1,2}}} or {@code {{1,2},{1,2}}}, etc...

-// -func PredictionModeresolvesToJustOneViableAlt(altsets []*BitSet) int { - return PredictionModegetSingleViableAlt(altsets) -} - -// -// Determines if every alternative subset in {@code altsets} contains more -// than one alternative. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if every {@link BitSet} in {@code altsets} has -// {@link BitSet//cardinality cardinality} > 1, otherwise {@code false} -// -func PredictionModeallSubsetsConflict(altsets []*BitSet) bool { - return !PredictionModehasNonConflictingAltSet(altsets) -} - -// -// Determines if any single alternative subset in {@code altsets} contains -// exactly one alternative. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if {@code altsets} contains a {@link BitSet} with -// {@link BitSet//cardinality cardinality} 1, otherwise {@code false} -// -func PredictionModehasNonConflictingAltSet(altsets []*BitSet) bool { - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - if alts.length() == 1 { - return true - } - } - return false -} - -// -// Determines if any single alternative subset in {@code altsets} contains -// more than one alternative. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if {@code altsets} contains a {@link BitSet} with -// {@link BitSet//cardinality cardinality} > 1, otherwise {@code false} -// -func PredictionModehasConflictingAltSet(altsets []*BitSet) bool { - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - if alts.length() > 1 { - return true - } - } - return false -} - -// -// Determines if every alternative subset in {@code altsets} is equivalent. -// -// @param altsets a collection of alternative subsets -// @return {@code true} if every member of {@code altsets} is equal to the -// others, otherwise {@code false} -// -func PredictionModeallSubsetsEqual(altsets []*BitSet) bool { - var first *BitSet - - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - if first == nil { - first = alts - } else if alts != first { - return false - } - } - - return true -} - -// -// Returns the unique alternative predicted by all alternative subsets in -// {@code altsets}. If no such alternative exists, this method returns -// {@link ATN//INVALID_ALT_NUMBER}. -// -// @param altsets a collection of alternative subsets -// -func PredictionModegetUniqueAlt(altsets []*BitSet) int { - all := PredictionModeGetAlts(altsets) - if all.length() == 1 { - return all.minValue() - } - - return ATNInvalidAltNumber -} - -// Gets the complete set of represented alternatives for a collection of -// alternative subsets. This method returns the union of each {@link BitSet} -// in {@code altsets}. -// -// @param altsets a collection of alternative subsets -// @return the set of represented alternatives in {@code altsets} -// -func PredictionModeGetAlts(altsets []*BitSet) *BitSet { - all := NewBitSet() - for _, alts := range altsets { - all.or(alts) - } - return all -} - -// -// This func gets the conflicting alt subsets from a configuration set. -// For each configuration {@code c} in {@code configs}: -// -//
-// map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not
-// alt and not pred
-// 
-// -func PredictionModegetConflictingAltSubsets(configs ATNConfigSet) []*BitSet { - configToAlts := make(map[int]*BitSet) - - for _, c := range configs.GetItems() { - key := 31 * c.GetState().GetStateNumber() + c.GetContext().hash() - - alts, ok := configToAlts[key] - if !ok { - alts = NewBitSet() - configToAlts[key] = alts - } - alts.add(c.GetAlt()) - } - - values := make([]*BitSet, 0, 10) - for _, v := range configToAlts { - values = append(values, v) - } - return values -} - -// -// Get a map from state to alt subset from a configuration set. For each -// configuration {@code c} in {@code configs}: -// -//
-// map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}
-// 
-// -func PredictionModeGetStateToAltMap(configs ATNConfigSet) *AltDict { - m := NewAltDict() - - for _, c := range configs.GetItems() { - alts := m.Get(c.GetState().String()) - if alts == nil { - alts = NewBitSet() - m.put(c.GetState().String(), alts) - } - alts.(*BitSet).add(c.GetAlt()) - } - return m -} - -func PredictionModehasStateAssociatedWithOneAlt(configs ATNConfigSet) bool { - values := PredictionModeGetStateToAltMap(configs).values() - for i := 0; i < len(values); i++ { - if values[i].(*BitSet).length() == 1 { - return true - } - } - return false -} - -func PredictionModegetSingleViableAlt(altsets []*BitSet) int { - result := ATNInvalidAltNumber - - for i := 0; i < len(altsets); i++ { - alts := altsets[i] - minAlt := alts.minValue() - if result == ATNInvalidAltNumber { - result = minAlt - } else if result != minAlt { // more than 1 viable alt - return ATNInvalidAltNumber - } - } - return result -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/recognizer.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/recognizer.go deleted file mode 100644 index 9ea9f6f59434..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/recognizer.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strings" - - "strconv" -) - -type Recognizer interface { - GetLiteralNames() []string - GetSymbolicNames() []string - GetRuleNames() []string - - Sempred(RuleContext, int, int) bool - Precpred(RuleContext, int) bool - - GetState() int - SetState(int) - Action(RuleContext, int, int) - AddErrorListener(ErrorListener) - RemoveErrorListeners() - GetATN() *ATN - GetErrorListenerDispatch() ErrorListener -} - -type BaseRecognizer struct { - listeners []ErrorListener - state int - - RuleNames []string - LiteralNames []string - SymbolicNames []string - GrammarFileName string -} - -func NewBaseRecognizer() *BaseRecognizer { - rec := new(BaseRecognizer) - rec.listeners = []ErrorListener{ConsoleErrorListenerINSTANCE} - rec.state = -1 - return rec -} - -var tokenTypeMapCache = make(map[string]int) -var ruleIndexMapCache = make(map[string]int) - -func (b *BaseRecognizer) checkVersion(toolVersion string) { - runtimeVersion := "4.7.2" - if runtimeVersion != toolVersion { - fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion) - } -} - -func (b *BaseRecognizer) Action(context RuleContext, ruleIndex, actionIndex int) { - panic("action not implemented on Recognizer!") -} - -func (b *BaseRecognizer) AddErrorListener(listener ErrorListener) { - b.listeners = append(b.listeners, listener) -} - -func (b *BaseRecognizer) RemoveErrorListeners() { - b.listeners = make([]ErrorListener, 0) -} - -func (b *BaseRecognizer) GetRuleNames() []string { - return b.RuleNames -} - -func (b *BaseRecognizer) GetTokenNames() []string { - return b.LiteralNames -} - -func (b *BaseRecognizer) GetSymbolicNames() []string { - return b.SymbolicNames -} - -func (b *BaseRecognizer) GetLiteralNames() []string { - return b.LiteralNames -} - -func (b *BaseRecognizer) GetState() int { - return b.state -} - -func (b *BaseRecognizer) SetState(v int) { - b.state = v -} - -//func (b *Recognizer) GetTokenTypeMap() { -// var tokenNames = b.GetTokenNames() -// if (tokenNames==nil) { -// panic("The current recognizer does not provide a list of token names.") -// } -// var result = tokenTypeMapCache[tokenNames] -// if(result==nil) { -// result = tokenNames.reduce(function(o, k, i) { o[k] = i }) -// result.EOF = TokenEOF -// tokenTypeMapCache[tokenNames] = result -// } -// return result -//} - -// Get a map from rule names to rule indexes. -// -//

Used for XPath and tree pattern compilation.

-// -func (b *BaseRecognizer) GetRuleIndexMap() map[string]int { - - panic("Method not defined!") - // var ruleNames = b.GetRuleNames() - // if (ruleNames==nil) { - // panic("The current recognizer does not provide a list of rule names.") - // } - // - // var result = ruleIndexMapCache[ruleNames] - // if(result==nil) { - // result = ruleNames.reduce(function(o, k, i) { o[k] = i }) - // ruleIndexMapCache[ruleNames] = result - // } - // return result -} - -func (b *BaseRecognizer) GetTokenType(tokenName string) int { - panic("Method not defined!") - // var ttype = b.GetTokenTypeMap()[tokenName] - // if (ttype !=nil) { - // return ttype - // } else { - // return TokenInvalidType - // } -} - -//func (b *Recognizer) GetTokenTypeMap() map[string]int { -// Vocabulary vocabulary = getVocabulary() -// -// Synchronized (tokenTypeMapCache) { -// Map result = tokenTypeMapCache.Get(vocabulary) -// if (result == null) { -// result = new HashMap() -// for (int i = 0; i < GetATN().maxTokenType; i++) { -// String literalName = vocabulary.getLiteralName(i) -// if (literalName != null) { -// result.put(literalName, i) -// } -// -// String symbolicName = vocabulary.GetSymbolicName(i) -// if (symbolicName != null) { -// result.put(symbolicName, i) -// } -// } -// -// result.put("EOF", Token.EOF) -// result = Collections.unmodifiableMap(result) -// tokenTypeMapCache.put(vocabulary, result) -// } -// -// return result -// } -//} - -// What is the error header, normally line/character position information?// -func (b *BaseRecognizer) GetErrorHeader(e RecognitionException) string { - line := e.GetOffendingToken().GetLine() - column := e.GetOffendingToken().GetColumn() - return "line " + strconv.Itoa(line) + ":" + strconv.Itoa(column) -} - -// How should a token be displayed in an error message? The default -// is to display just the text, but during development you might -// want to have a lot of information spit out. Override in that case -// to use t.String() (which, for CommonToken, dumps everything about -// the token). This is better than forcing you to override a method in -// your token objects because you don't have to go modify your lexer -// so that it creates a NewJava type. -// -// @deprecated This method is not called by the ANTLR 4 Runtime. Specific -// implementations of {@link ANTLRErrorStrategy} may provide a similar -// feature when necessary. For example, see -// {@link DefaultErrorStrategy//GetTokenErrorDisplay}. -// -func (b *BaseRecognizer) GetTokenErrorDisplay(t Token) string { - if t == nil { - return "" - } - s := t.GetText() - if s == "" { - if t.GetTokenType() == TokenEOF { - s = "" - } else { - s = "<" + strconv.Itoa(t.GetTokenType()) + ">" - } - } - s = strings.Replace(s, "\t", "\\t", -1) - s = strings.Replace(s, "\n", "\\n", -1) - s = strings.Replace(s, "\r", "\\r", -1) - - return "'" + s + "'" -} - -func (b *BaseRecognizer) GetErrorListenerDispatch() ErrorListener { - return NewProxyErrorListener(b.listeners) -} - -// subclass needs to override these if there are sempreds or actions -// that the ATN interp needs to execute -func (b *BaseRecognizer) Sempred(localctx RuleContext, ruleIndex int, actionIndex int) bool { - return true -} - -func (b *BaseRecognizer) Precpred(localctx RuleContext, precedence int) bool { - return true -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/rule_context.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/rule_context.go deleted file mode 100644 index 600cf8c0625c..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/rule_context.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// A rule context is a record of a single rule invocation. It knows -// which context invoked it, if any. If there is no parent context, then -// naturally the invoking state is not valid. The parent link -// provides a chain upwards from the current rule invocation to the root -// of the invocation tree, forming a stack. We actually carry no -// information about the rule associated with b context (except -// when parsing). We keep only the state number of the invoking state from -// the ATN submachine that invoked b. Contrast b with the s -// pointer inside ParserRuleContext that tracks the current state -// being "executed" for the current rule. -// -// The parent contexts are useful for computing lookahead sets and -// getting error information. -// -// These objects are used during parsing and prediction. -// For the special case of parsers, we use the subclass -// ParserRuleContext. -// -// @see ParserRuleContext -// - -type RuleContext interface { - RuleNode - - GetInvokingState() int - SetInvokingState(int) - - GetRuleIndex() int - IsEmpty() bool - - GetAltNumber() int - SetAltNumber(altNumber int) - - String([]string, RuleContext) string -} - -type BaseRuleContext struct { - parentCtx RuleContext - invokingState int - RuleIndex int -} - -func NewBaseRuleContext(parent RuleContext, invokingState int) *BaseRuleContext { - - rn := new(BaseRuleContext) - - // What context invoked b rule? - rn.parentCtx = parent - - // What state invoked the rule associated with b context? - // The "return address" is the followState of invokingState - // If parent is nil, b should be -1. - if parent == nil { - rn.invokingState = -1 - } else { - rn.invokingState = invokingState - } - - return rn -} - -func (b *BaseRuleContext) GetBaseRuleContext() *BaseRuleContext { - return b -} - -func (b *BaseRuleContext) SetParent(v Tree) { - if v == nil { - b.parentCtx = nil - } else { - b.parentCtx = v.(RuleContext) - } -} - -func (b *BaseRuleContext) GetInvokingState() int { - return b.invokingState -} - -func (b *BaseRuleContext) SetInvokingState(t int) { - b.invokingState = t -} - -func (b *BaseRuleContext) GetRuleIndex() int { - return b.RuleIndex -} - -func (b *BaseRuleContext) GetAltNumber() int { - return ATNInvalidAltNumber -} - -func (b *BaseRuleContext) SetAltNumber(altNumber int) {} - -// A context is empty if there is no invoking state meaning nobody call -// current context. -func (b *BaseRuleContext) IsEmpty() bool { - return b.invokingState == -1 -} - -// Return the combined text of all child nodes. This method only considers -// tokens which have been added to the parse tree. -//

-// Since tokens on hidden channels (e.g. whitespace or comments) are not -// added to the parse trees, they will not appear in the output of b -// method. -// - -func (b *BaseRuleContext) GetParent() Tree { - return b.parentCtx -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/semantic_context.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/semantic_context.go deleted file mode 100644 index 49205a162403..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/semantic_context.go +++ /dev/null @@ -1,455 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "fmt" - "strconv" -) - -// A tree structure used to record the semantic context in which -// an ATN configuration is valid. It's either a single predicate, -// a conjunction {@code p1&&p2}, or a sum of products {@code p1||p2}. -// -//

I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of -// {@link SemanticContext} within the scope of this outer class.

-// - -type SemanticContext interface { - comparable - - evaluate(parser Recognizer, outerContext RuleContext) bool - evalPrecedence(parser Recognizer, outerContext RuleContext) SemanticContext - - hash() int - String() string -} - -func SemanticContextandContext(a, b SemanticContext) SemanticContext { - if a == nil || a == SemanticContextNone { - return b - } - if b == nil || b == SemanticContextNone { - return a - } - result := NewAND(a, b) - if len(result.opnds) == 1 { - return result.opnds[0] - } - - return result -} - -func SemanticContextorContext(a, b SemanticContext) SemanticContext { - if a == nil { - return b - } - if b == nil { - return a - } - if a == SemanticContextNone || b == SemanticContextNone { - return SemanticContextNone - } - result := NewOR(a, b) - if len(result.opnds) == 1 { - return result.opnds[0] - } - - return result -} - -type Predicate struct { - ruleIndex int - predIndex int - isCtxDependent bool -} - -func NewPredicate(ruleIndex, predIndex int, isCtxDependent bool) *Predicate { - p := new(Predicate) - - p.ruleIndex = ruleIndex - p.predIndex = predIndex - p.isCtxDependent = isCtxDependent // e.g., $i ref in pred - return p -} - -//The default {@link SemanticContext}, which is semantically equivalent to -//a predicate of the form {@code {true}?}. - -var SemanticContextNone SemanticContext = NewPredicate(-1, -1, false) - -func (p *Predicate) evalPrecedence(parser Recognizer, outerContext RuleContext) SemanticContext { - return p -} - -func (p *Predicate) evaluate(parser Recognizer, outerContext RuleContext) bool { - - var localctx RuleContext - - if p.isCtxDependent { - localctx = outerContext - } - - return parser.Sempred(localctx, p.ruleIndex, p.predIndex) -} - -func (p *Predicate) equals(other interface{}) bool { - if p == other { - return true - } else if _, ok := other.(*Predicate); !ok { - return false - } else { - return p.ruleIndex == other.(*Predicate).ruleIndex && - p.predIndex == other.(*Predicate).predIndex && - p.isCtxDependent == other.(*Predicate).isCtxDependent - } -} - -func (p *Predicate) hash() int { - return p.ruleIndex*43 + p.predIndex*47 -} - -func (p *Predicate) String() string { - return "{" + strconv.Itoa(p.ruleIndex) + ":" + strconv.Itoa(p.predIndex) + "}?" -} - -type PrecedencePredicate struct { - precedence int -} - -func NewPrecedencePredicate(precedence int) *PrecedencePredicate { - - p := new(PrecedencePredicate) - p.precedence = precedence - - return p -} - -func (p *PrecedencePredicate) evaluate(parser Recognizer, outerContext RuleContext) bool { - return parser.Precpred(outerContext, p.precedence) -} - -func (p *PrecedencePredicate) evalPrecedence(parser Recognizer, outerContext RuleContext) SemanticContext { - if parser.Precpred(outerContext, p.precedence) { - return SemanticContextNone - } - - return nil -} - -func (p *PrecedencePredicate) compareTo(other *PrecedencePredicate) int { - return p.precedence - other.precedence -} - -func (p *PrecedencePredicate) equals(other interface{}) bool { - if p == other { - return true - } else if _, ok := other.(*PrecedencePredicate); !ok { - return false - } else { - return p.precedence == other.(*PrecedencePredicate).precedence - } -} - -func (p *PrecedencePredicate) hash() int { - return p.precedence * 51 -} - -func (p *PrecedencePredicate) String() string { - return "{" + strconv.Itoa(p.precedence) + ">=prec}?" -} - -func PrecedencePredicatefilterPrecedencePredicates(set *Set) []*PrecedencePredicate { - result := make([]*PrecedencePredicate, 0) - - for _, v := range set.values() { - if c2, ok := v.(*PrecedencePredicate); ok { - result = append(result, c2) - } - } - - return result -} - -// A semantic context which is true whenever none of the contained contexts -// is false.` - -type AND struct { - opnds []SemanticContext -} - -func NewAND(a, b SemanticContext) *AND { - - operands := NewSet(nil, nil) - if aa, ok := a.(*AND); ok { - for _, o := range aa.opnds { - operands.add(o) - } - } else { - operands.add(a) - } - - if ba, ok := b.(*AND); ok { - for _, o := range ba.opnds { - operands.add(o) - } - } else { - operands.add(b) - } - precedencePredicates := PrecedencePredicatefilterPrecedencePredicates(operands) - if len(precedencePredicates) > 0 { - // interested in the transition with the lowest precedence - var reduced *PrecedencePredicate - - for _, p := range precedencePredicates { - if reduced == nil || p.precedence < reduced.precedence { - reduced = p - } - } - - operands.add(reduced) - } - - vs := operands.values() - opnds := make([]SemanticContext, len(vs)) - for i, v := range vs { - opnds[i] = v.(SemanticContext) - } - - and := new(AND) - and.opnds = opnds - - return and -} - -func (a *AND) equals(other interface{}) bool { - if a == other { - return true - } else if _, ok := other.(*AND); !ok { - return false - } else { - for i, v := range other.(*AND).opnds { - if !a.opnds[i].equals(v) { - return false - } - } - return true - } -} - -// -// {@inheritDoc} -// -//

-// The evaluation of predicates by a context is short-circuiting, but -// unordered.

-// -func (a *AND) evaluate(parser Recognizer, outerContext RuleContext) bool { - for i := 0; i < len(a.opnds); i++ { - if !a.opnds[i].evaluate(parser, outerContext) { - return false - } - } - return true -} - -func (a *AND) evalPrecedence(parser Recognizer, outerContext RuleContext) SemanticContext { - differs := false - operands := make([]SemanticContext, 0) - - for i := 0; i < len(a.opnds); i++ { - context := a.opnds[i] - evaluated := context.evalPrecedence(parser, outerContext) - differs = differs || (evaluated != context) - if evaluated == nil { - // The AND context is false if any element is false - return nil - } else if evaluated != SemanticContextNone { - // Reduce the result by Skipping true elements - operands = append(operands, evaluated) - } - } - if !differs { - return a - } - - if len(operands) == 0 { - // all elements were true, so the AND context is true - return SemanticContextNone - } - - var result SemanticContext - - for _, o := range operands { - if result == nil { - result = o - } else { - result = SemanticContextandContext(result, o) - } - } - - return result -} - -func (a *AND) hash() int { - h := murmurInit(37) // Init with a value different from OR - for _, op := range a.opnds { - h = murmurUpdate(h, op.hash()) - } - return murmurFinish(h, len(a.opnds)) -} - -func (a *OR) hash() int { - h := murmurInit(41) // Init with a value different from AND - for _, op := range a.opnds { - h = murmurUpdate(h, op.hash()) - } - return murmurFinish(h, len(a.opnds)) -} - -func (a *AND) String() string { - s := "" - - for _, o := range a.opnds { - s += "&& " + fmt.Sprint(o) - } - - if len(s) > 3 { - return s[0:3] - } - - return s -} - -// -// A semantic context which is true whenever at least one of the contained -// contexts is true. -// - -type OR struct { - opnds []SemanticContext -} - -func NewOR(a, b SemanticContext) *OR { - - operands := NewSet(nil, nil) - if aa, ok := a.(*OR); ok { - for _, o := range aa.opnds { - operands.add(o) - } - } else { - operands.add(a) - } - - if ba, ok := b.(*OR); ok { - for _, o := range ba.opnds { - operands.add(o) - } - } else { - operands.add(b) - } - precedencePredicates := PrecedencePredicatefilterPrecedencePredicates(operands) - if len(precedencePredicates) > 0 { - // interested in the transition with the lowest precedence - var reduced *PrecedencePredicate - - for _, p := range precedencePredicates { - if reduced == nil || p.precedence > reduced.precedence { - reduced = p - } - } - - operands.add(reduced) - } - - vs := operands.values() - - opnds := make([]SemanticContext, len(vs)) - for i, v := range vs { - opnds[i] = v.(SemanticContext) - } - - o := new(OR) - o.opnds = opnds - - return o -} - -func (o *OR) equals(other interface{}) bool { - if o == other { - return true - } else if _, ok := other.(*OR); !ok { - return false - } else { - for i, v := range other.(*OR).opnds { - if !o.opnds[i].equals(v) { - return false - } - } - return true - } -} - -//

-// The evaluation of predicates by o context is short-circuiting, but -// unordered.

-// -func (o *OR) evaluate(parser Recognizer, outerContext RuleContext) bool { - for i := 0; i < len(o.opnds); i++ { - if o.opnds[i].evaluate(parser, outerContext) { - return true - } - } - return false -} - -func (o *OR) evalPrecedence(parser Recognizer, outerContext RuleContext) SemanticContext { - differs := false - operands := make([]SemanticContext, 0) - for i := 0; i < len(o.opnds); i++ { - context := o.opnds[i] - evaluated := context.evalPrecedence(parser, outerContext) - differs = differs || (evaluated != context) - if evaluated == SemanticContextNone { - // The OR context is true if any element is true - return SemanticContextNone - } else if evaluated != nil { - // Reduce the result by Skipping false elements - operands = append(operands, evaluated) - } - } - if !differs { - return o - } - if len(operands) == 0 { - // all elements were false, so the OR context is false - return nil - } - var result SemanticContext - - for _, o := range operands { - if result == nil { - result = o - } else { - result = SemanticContextorContext(result, o) - } - } - - return result -} - -func (o *OR) String() string { - s := "" - - for _, o := range o.opnds { - s += "|| " + fmt.Sprint(o) - } - - if len(s) > 3 { - return s[0:3] - } - - return s -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token.go deleted file mode 100644 index 2d8e99095d32..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "strconv" - "strings" -) - -type TokenSourceCharStreamPair struct { - tokenSource TokenSource - charStream CharStream -} - -// A token has properties: text, type, line, character position in the line -// (so we can ignore tabs), token channel, index, and source from which -// we obtained this token. - -type Token interface { - GetSource() *TokenSourceCharStreamPair - GetTokenType() int - GetChannel() int - GetStart() int - GetStop() int - GetLine() int - GetColumn() int - - GetText() string - SetText(s string) - - GetTokenIndex() int - SetTokenIndex(v int) - - GetTokenSource() TokenSource - GetInputStream() CharStream -} - -type BaseToken struct { - source *TokenSourceCharStreamPair - tokenType int // token type of the token - channel int // The parser ignores everything not on DEFAULT_CHANNEL - start int // optional return -1 if not implemented. - stop int // optional return -1 if not implemented. - tokenIndex int // from 0..n-1 of the token object in the input stream - line int // line=1..n of the 1st character - column int // beginning of the line at which it occurs, 0..n-1 - text string // text of the token. - readOnly bool -} - -const ( - TokenInvalidType = 0 - - // During lookahead operations, this "token" signifies we hit rule end ATN state - // and did not follow it despite needing to. - TokenEpsilon = -2 - - TokenMinUserTokenType = 1 - - TokenEOF = -1 - - // All tokens go to the parser (unless Skip() is called in that rule) - // on a particular "channel". The parser tunes to a particular channel - // so that whitespace etc... can go to the parser on a "hidden" channel. - - TokenDefaultChannel = 0 - - // Anything on different channel than DEFAULT_CHANNEL is not parsed - // by parser. - - TokenHiddenChannel = 1 -) - -func (b *BaseToken) GetChannel() int { - return b.channel -} - -func (b *BaseToken) GetStart() int { - return b.start -} - -func (b *BaseToken) GetStop() int { - return b.stop -} - -func (b *BaseToken) GetLine() int { - return b.line -} - -func (b *BaseToken) GetColumn() int { - return b.column -} - -func (b *BaseToken) GetTokenType() int { - return b.tokenType -} - -func (b *BaseToken) GetSource() *TokenSourceCharStreamPair { - return b.source -} - -func (b *BaseToken) GetTokenIndex() int { - return b.tokenIndex -} - -func (b *BaseToken) SetTokenIndex(v int) { - b.tokenIndex = v -} - -func (b *BaseToken) GetTokenSource() TokenSource { - return b.source.tokenSource -} - -func (b *BaseToken) GetInputStream() CharStream { - return b.source.charStream -} - -type CommonToken struct { - *BaseToken -} - -func NewCommonToken(source *TokenSourceCharStreamPair, tokenType, channel, start, stop int) *CommonToken { - - t := new(CommonToken) - - t.BaseToken = new(BaseToken) - - t.source = source - t.tokenType = tokenType - t.channel = channel - t.start = start - t.stop = stop - t.tokenIndex = -1 - if t.source.tokenSource != nil { - t.line = source.tokenSource.GetLine() - t.column = source.tokenSource.GetCharPositionInLine() - } else { - t.column = -1 - } - return t -} - -// An empty {@link Pair} which is used as the default value of -// {@link //source} for tokens that do not have a source. - -//CommonToken.EMPTY_SOURCE = [ nil, nil ] - -// Constructs a New{@link CommonToken} as a copy of another {@link Token}. -// -//

-// If {@code oldToken} is also a {@link CommonToken} instance, the newly -// constructed token will share a reference to the {@link //text} field and -// the {@link Pair} stored in {@link //source}. Otherwise, {@link //text} will -// be assigned the result of calling {@link //GetText}, and {@link //source} -// will be constructed from the result of {@link Token//GetTokenSource} and -// {@link Token//GetInputStream}.

-// -// @param oldToken The token to copy. -// -func (c *CommonToken) clone() *CommonToken { - t := NewCommonToken(c.source, c.tokenType, c.channel, c.start, c.stop) - t.tokenIndex = c.GetTokenIndex() - t.line = c.GetLine() - t.column = c.GetColumn() - t.text = c.GetText() - return t -} - -func (c *CommonToken) GetText() string { - if c.text != "" { - return c.text - } - input := c.GetInputStream() - if input == nil { - return "" - } - n := input.Size() - if c.start < n && c.stop < n { - return input.GetTextFromInterval(NewInterval(c.start, c.stop)) - } - return "" -} - -func (c *CommonToken) SetText(text string) { - c.text = text -} - -func (c *CommonToken) String() string { - txt := c.GetText() - if txt != "" { - txt = strings.Replace(txt, "\n", "\\n", -1) - txt = strings.Replace(txt, "\r", "\\r", -1) - txt = strings.Replace(txt, "\t", "\\t", -1) - } else { - txt = "" - } - - var ch string - if c.channel > 0 { - ch = ",channel=" + strconv.Itoa(c.channel) - } else { - ch = "" - } - - return "[@" + strconv.Itoa(c.tokenIndex) + "," + strconv.Itoa(c.start) + ":" + strconv.Itoa(c.stop) + "='" + - txt + "',<" + strconv.Itoa(c.tokenType) + ">" + - ch + "," + strconv.Itoa(c.line) + ":" + strconv.Itoa(c.column) + "]" -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token_source.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token_source.go deleted file mode 100644 index e023978fef4d..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token_source.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type TokenSource interface { - NextToken() Token - Skip() - More() - GetLine() int - GetCharPositionInLine() int - GetInputStream() CharStream - GetSourceName() string - setTokenFactory(factory TokenFactory) - GetTokenFactory() TokenFactory -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token_stream.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token_stream.go deleted file mode 100644 index df92c8147897..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/token_stream.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -type TokenStream interface { - IntStream - - LT(k int) Token - - Get(index int) Token - GetTokenSource() TokenSource - SetTokenSource(TokenSource) - - GetAllText() string - GetTextFromInterval(*Interval) string - GetTextFromRuleContext(RuleContext) string - GetTextFromTokens(Token, Token) string -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/tokenstream_rewriter.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/tokenstream_rewriter.go deleted file mode 100644 index 96a03f02aa6b..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/tokenstream_rewriter.go +++ /dev/null @@ -1,649 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. -package antlr - -import ( -"bytes" -"fmt" -) - - -// -// Useful for rewriting out a buffered input token stream after doing some -// augmentation or other manipulations on it. - -//

-// You can insert stuff, replace, and delete chunks. Note that the operations -// are done lazily--only if you convert the buffer to a {@link String} with -// {@link TokenStream#getText()}. This is very efficient because you are not -// moving data around all the time. As the buffer of tokens is converted to -// strings, the {@link #getText()} method(s) scan the input token stream and -// check to see if there is an operation at the current index. If so, the -// operation is done and then normal {@link String} rendering continues on the -// buffer. This is like having multiple Turing machine instruction streams -// (programs) operating on a single input tape. :)

-//

- -// This rewriter makes no modifications to the token stream. It does not ask the -// stream to fill itself up nor does it advance the input cursor. The token -// stream {@link TokenStream#index()} will return the same value before and -// after any {@link #getText()} call.

- -//

-// The rewriter only works on tokens that you have in the buffer and ignores the -// current input cursor. If you are buffering tokens on-demand, calling -// {@link #getText()} halfway through the input will only do rewrites for those -// tokens in the first half of the file.

- -//

-// Since the operations are done lazily at {@link #getText}-time, operations do -// not screw up the token index values. That is, an insert operation at token -// index {@code i} does not change the index values for tokens -// {@code i}+1..n-1.

- -//

-// Because operations never actually alter the buffer, you may always get the -// original token stream back without undoing anything. Since the instructions -// are queued up, you can easily simulate transactions and roll back any changes -// if there is an error just by removing instructions. For example,

- -//
-// CharStream input = new ANTLRFileStream("input");
-// TLexer lex = new TLexer(input);
-// CommonTokenStream tokens = new CommonTokenStream(lex);
-// T parser = new T(tokens);
-// TokenStreamRewriter rewriter = new TokenStreamRewriter(tokens);
-// parser.startRule();
-// 
- -//

-// Then in the rules, you can execute (assuming rewriter is visible):

- -//
-// Token t,u;
-// ...
-// rewriter.insertAfter(t, "text to put after t");}
-// rewriter.insertAfter(u, "text after u");}
-// System.out.println(rewriter.getText());
-// 
- -//

-// You can also have multiple "instruction streams" and get multiple rewrites -// from a single pass over the input. Just name the instruction streams and use -// that name again when printing the buffer. This could be useful for generating -// a C file and also its header file--all from the same buffer:

- -//
-// rewriter.insertAfter("pass1", t, "text to put after t");}
-// rewriter.insertAfter("pass2", u, "text after u");}
-// System.out.println(rewriter.getText("pass1"));
-// System.out.println(rewriter.getText("pass2"));
-// 
- -//

-// If you don't use named rewrite streams, a "default" stream is used as the -// first example shows.

- - - -const( - Default_Program_Name = "default" - Program_Init_Size = 100 - Min_Token_Index = 0 -) - -// Define the rewrite operation hierarchy - -type RewriteOperation interface { - // Execute the rewrite operation by possibly adding to the buffer. - // Return the index of the next token to operate on. - Execute(buffer *bytes.Buffer) int - String() string - GetInstructionIndex() int - GetIndex() int - GetText() string - GetOpName() string - GetTokens() TokenStream - SetInstructionIndex(val int) - SetIndex(int) - SetText(string) - SetOpName(string) - SetTokens(TokenStream) -} - -type BaseRewriteOperation struct { - //Current index of rewrites list - instruction_index int - //Token buffer index - index int - //Substitution text - text string - //Actual operation name - op_name string - //Pointer to token steam - tokens TokenStream -} - -func (op *BaseRewriteOperation)GetInstructionIndex() int{ - return op.instruction_index -} - -func (op *BaseRewriteOperation)GetIndex() int{ - return op.index -} - -func (op *BaseRewriteOperation)GetText() string{ - return op.text -} - -func (op *BaseRewriteOperation)GetOpName() string{ - return op.op_name -} - -func (op *BaseRewriteOperation)GetTokens() TokenStream{ - return op.tokens -} - -func (op *BaseRewriteOperation)SetInstructionIndex(val int){ - op.instruction_index = val -} - -func (op *BaseRewriteOperation)SetIndex(val int) { - op.index = val -} - -func (op *BaseRewriteOperation)SetText(val string){ - op.text = val -} - -func (op *BaseRewriteOperation)SetOpName(val string){ - op.op_name = val -} - -func (op *BaseRewriteOperation)SetTokens(val TokenStream) { - op.tokens = val -} - - -func (op *BaseRewriteOperation) Execute(buffer *bytes.Buffer) int{ - return op.index -} - -func (op *BaseRewriteOperation) String() string { - return fmt.Sprintf("<%s@%d:\"%s\">", - op.op_name, - op.tokens.Get(op.GetIndex()), - op.text, - ) - -} - - -type InsertBeforeOp struct { - BaseRewriteOperation -} - -func NewInsertBeforeOp(index int, text string, stream TokenStream) *InsertBeforeOp{ - return &InsertBeforeOp{BaseRewriteOperation:BaseRewriteOperation{ - index:index, - text:text, - op_name:"InsertBeforeOp", - tokens:stream, - }} -} - -func (op *InsertBeforeOp) Execute(buffer *bytes.Buffer) int{ - buffer.WriteString(op.text) - if op.tokens.Get(op.index).GetTokenType() != TokenEOF{ - buffer.WriteString(op.tokens.Get(op.index).GetText()) - } - return op.index+1 -} - -func (op *InsertBeforeOp) String() string { - return op.BaseRewriteOperation.String() -} - -// Distinguish between insert after/before to do the "insert afters" -// first and then the "insert befores" at same index. Implementation -// of "insert after" is "insert before index+1". - -type InsertAfterOp struct { - BaseRewriteOperation -} - -func NewInsertAfterOp(index int, text string, stream TokenStream) *InsertAfterOp{ - return &InsertAfterOp{BaseRewriteOperation:BaseRewriteOperation{ - index:index+1, - text:text, - tokens:stream, - }} -} - -func (op *InsertAfterOp) Execute(buffer *bytes.Buffer) int { - buffer.WriteString(op.text) - if op.tokens.Get(op.index).GetTokenType() != TokenEOF{ - buffer.WriteString(op.tokens.Get(op.index).GetText()) - } - return op.index+1 -} - -func (op *InsertAfterOp) String() string { - return op.BaseRewriteOperation.String() -} - -// I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp -// instructions. -type ReplaceOp struct{ - BaseRewriteOperation - LastIndex int -} - -func NewReplaceOp(from, to int, text string, stream TokenStream)*ReplaceOp { - return &ReplaceOp{ - BaseRewriteOperation:BaseRewriteOperation{ - index:from, - text:text, - op_name:"ReplaceOp", - tokens:stream, - }, - LastIndex:to, - } -} - -func (op *ReplaceOp)Execute(buffer *bytes.Buffer) int{ - if op.text != ""{ - buffer.WriteString(op.text) - } - return op.LastIndex +1 -} - -func (op *ReplaceOp) String() string { - if op.text == "" { - return fmt.Sprintf("", - op.tokens.Get(op.index), op.tokens.Get(op.LastIndex)) - } - return fmt.Sprintf("", - op.tokens.Get(op.index), op.tokens.Get(op.LastIndex), op.text) -} - - -type TokenStreamRewriter struct { - //Our source stream - tokens TokenStream - // You may have multiple, named streams of rewrite operations. - // I'm calling these things "programs." - // Maps String (name) → rewrite (List) - programs map[string][]RewriteOperation - last_rewrite_token_indexes map[string]int -} - -func NewTokenStreamRewriter(tokens TokenStream) *TokenStreamRewriter{ - return &TokenStreamRewriter{ - tokens: tokens, - programs: map[string][]RewriteOperation{ - Default_Program_Name:make([]RewriteOperation,0, Program_Init_Size), - }, - last_rewrite_token_indexes: map[string]int{}, - } -} - -func (tsr *TokenStreamRewriter) GetTokenStream() TokenStream{ - return tsr.tokens -} - -// Rollback the instruction stream for a program so that -// the indicated instruction (via instructionIndex) is no -// longer in the stream. UNTESTED! -func (tsr *TokenStreamRewriter) Rollback(program_name string, instruction_index int){ - is, ok := tsr.programs[program_name] - if ok{ - tsr.programs[program_name] = is[Min_Token_Index:instruction_index] - } -} - -func (tsr *TokenStreamRewriter) RollbackDefault(instruction_index int){ - tsr.Rollback(Default_Program_Name, instruction_index) -} -//Reset the program so that no instructions exist -func (tsr *TokenStreamRewriter) DeleteProgram(program_name string){ - tsr.Rollback(program_name, Min_Token_Index) //TODO: double test on that cause lower bound is not included -} - -func (tsr *TokenStreamRewriter) DeleteProgramDefault(){ - tsr.DeleteProgram(Default_Program_Name) -} - -func (tsr *TokenStreamRewriter) InsertAfter(program_name string, index int, text string){ - // to insert after, just insert before next index (even if past end) - var op RewriteOperation = NewInsertAfterOp(index, text, tsr.tokens) - rewrites := tsr.GetProgram(program_name) - op.SetInstructionIndex(len(rewrites)) - tsr.AddToProgram(program_name, op) -} - -func (tsr *TokenStreamRewriter) InsertAfterDefault(index int, text string){ - tsr.InsertAfter(Default_Program_Name, index, text) -} - -func (tsr *TokenStreamRewriter) InsertAfterToken(program_name string, token Token, text string){ - tsr.InsertAfter(program_name, token.GetTokenIndex(), text) -} - -func (tsr* TokenStreamRewriter) InsertBefore(program_name string, index int, text string){ - var op RewriteOperation = NewInsertBeforeOp(index, text, tsr.tokens) - rewrites := tsr.GetProgram(program_name) - op.SetInstructionIndex(len(rewrites)) - tsr.AddToProgram(program_name, op) -} - -func (tsr *TokenStreamRewriter) InsertBeforeDefault(index int, text string){ - tsr.InsertBefore(Default_Program_Name, index, text) -} - -func (tsr *TokenStreamRewriter) InsertBeforeToken(program_name string,token Token, text string){ - tsr.InsertBefore(program_name, token.GetTokenIndex(), text) -} - -func (tsr *TokenStreamRewriter) Replace(program_name string, from, to int, text string){ - if from > to || from < 0 || to < 0 || to >= tsr.tokens.Size(){ - panic(fmt.Sprintf("replace: range invalid: %d..%d(size=%d)", - from, to, tsr.tokens.Size())) - } - var op RewriteOperation = NewReplaceOp(from, to, text, tsr.tokens) - rewrites := tsr.GetProgram(program_name) - op.SetInstructionIndex(len(rewrites)) - tsr.AddToProgram(program_name, op) -} - -func (tsr *TokenStreamRewriter)ReplaceDefault(from, to int, text string) { - tsr.Replace(Default_Program_Name, from, to, text) -} - -func (tsr *TokenStreamRewriter)ReplaceDefaultPos(index int, text string){ - tsr.ReplaceDefault(index, index, text) -} - -func (tsr *TokenStreamRewriter)ReplaceToken(program_name string, from, to Token, text string){ - tsr.Replace(program_name, from.GetTokenIndex(), to.GetTokenIndex(), text) -} - -func (tsr *TokenStreamRewriter)ReplaceTokenDefault(from, to Token, text string){ - tsr.ReplaceToken(Default_Program_Name, from, to, text) -} - -func (tsr *TokenStreamRewriter)ReplaceTokenDefaultPos(index Token, text string){ - tsr.ReplaceTokenDefault(index, index, text) -} - -func (tsr *TokenStreamRewriter)Delete(program_name string, from, to int){ - tsr.Replace(program_name, from, to, "" ) -} - -func (tsr *TokenStreamRewriter)DeleteDefault(from, to int){ - tsr.Delete(Default_Program_Name, from, to) -} - -func (tsr *TokenStreamRewriter)DeleteDefaultPos(index int){ - tsr.DeleteDefault(index,index) -} - -func (tsr *TokenStreamRewriter)DeleteToken(program_name string, from, to Token) { - tsr.ReplaceToken(program_name, from, to, "") -} - -func (tsr *TokenStreamRewriter)DeleteTokenDefault(from,to Token){ - tsr.DeleteToken(Default_Program_Name, from, to) -} - -func (tsr *TokenStreamRewriter)GetLastRewriteTokenIndex(program_name string)int { - i, ok := tsr.last_rewrite_token_indexes[program_name] - if !ok{ - return -1 - } - return i -} - -func (tsr *TokenStreamRewriter)GetLastRewriteTokenIndexDefault()int{ - return tsr.GetLastRewriteTokenIndex(Default_Program_Name) -} - -func (tsr *TokenStreamRewriter)SetLastRewriteTokenIndex(program_name string, i int){ - tsr.last_rewrite_token_indexes[program_name] = i -} - -func (tsr *TokenStreamRewriter)InitializeProgram(name string)[]RewriteOperation{ - is := make([]RewriteOperation, 0, Program_Init_Size) - tsr.programs[name] = is - return is -} - -func (tsr *TokenStreamRewriter)AddToProgram(name string, op RewriteOperation){ - is := tsr.GetProgram(name) - is = append(is, op) - tsr.programs[name] = is -} - -func (tsr *TokenStreamRewriter)GetProgram(name string) []RewriteOperation { - is, ok := tsr.programs[name] - if !ok{ - is = tsr.InitializeProgram(name) - } - return is -} -// Return the text from the original tokens altered per the -// instructions given to this rewriter. -func (tsr *TokenStreamRewriter)GetTextDefault() string{ - return tsr.GetText( - Default_Program_Name, - NewInterval(0, tsr.tokens.Size()-1)) -} -// Return the text from the original tokens altered per the -// instructions given to this rewriter. -func (tsr *TokenStreamRewriter)GetText(program_name string, interval *Interval) string { - rewrites := tsr.programs[program_name] - start := interval.Start - stop := interval.Stop - // ensure start/end are in range - stop = min(stop, tsr.tokens.Size()-1) - start = max(start,0) - if rewrites == nil || len(rewrites) == 0{ - return tsr.tokens.GetTextFromInterval(interval) // no instructions to execute - } - buf := bytes.Buffer{} - // First, optimize instruction stream - indexToOp := reduceToSingleOperationPerIndex(rewrites) - // Walk buffer, executing instructions and emitting tokens - for i:=start; i<=stop && i= tsr.tokens.Size()-1 {buf.WriteString(op.GetText())} - } - } - return buf.String() -} - -// We need to combine operations and report invalid operations (like -// overlapping replaces that are not completed nested). Inserts to -// same index need to be combined etc... Here are the cases: -// -// I.i.u I.j.v leave alone, nonoverlapping -// I.i.u I.i.v combine: Iivu -// -// R.i-j.u R.x-y.v | i-j in x-y delete first R -// R.i-j.u R.i-j.v delete first R -// R.i-j.u R.x-y.v | x-y in i-j ERROR -// R.i-j.u R.x-y.v | boundaries overlap ERROR -// -// Delete special case of replace (text==null): -// D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) -// -// I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before -// we're not deleting i) -// I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping -// R.x-y.v I.i.u | i in x-y ERROR -// R.x-y.v I.x.u R.x-y.uv (combine, delete I) -// R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping -// -// I.i.u = insert u before op @ index i -// R.x-y.u = replace x-y indexed tokens with u -// -// First we need to examine replaces. For any replace op: -// -// 1. wipe out any insertions before op within that range. -// 2. Drop any replace op before that is contained completely within -// that range. -// 3. Throw exception upon boundary overlap with any previous replace. -// -// Then we can deal with inserts: -// -// 1. for any inserts to same index, combine even if not adjacent. -// 2. for any prior replace with same left boundary, combine this -// insert with replace and delete this replace. -// 3. throw exception if index in same range as previous replace -// -// Don't actually delete; make op null in list. Easier to walk list. -// Later we can throw as we add to index → op map. -// -// Note that I.2 R.2-2 will wipe out I.2 even though, technically, the -// inserted stuff would be before the replace range. But, if you -// add tokens in front of a method body '{' and then delete the method -// body, I think the stuff before the '{' you added should disappear too. -// -// Return a map from token index to operation. -// -func reduceToSingleOperationPerIndex(rewrites []RewriteOperation) map[int]RewriteOperation{ - // WALK REPLACES - for i:=0; i < len(rewrites); i++{ - op := rewrites[i] - if op == nil{continue} - rop, ok := op.(*ReplaceOp) - if !ok{continue} - // Wipe prior inserts within range - for j:=0; j rop.index && iop.index <=rop.LastIndex{ - // delete insert as it's a no-op. - rewrites[iop.instruction_index] = nil - } - } - } - // Drop any prior replaces contained within - for j:=0; j=rop.index && prevop.LastIndex <= rop.LastIndex{ - // delete replace as it's a no-op. - rewrites[prevop.instruction_index] = nil - continue - } - // throw exception unless disjoint or identical - disjoint := prevop.LastIndex < rop.index || prevop.index > rop.LastIndex - // Delete special case of replace (text==null): - // D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) - if prevop.text == "" && rop.text == "" && !disjoint{ - rewrites[prevop.instruction_index] = nil - rop.index = min(prevop.index, rop.index) - rop.LastIndex = max(prevop.LastIndex, rop.LastIndex) - println("new rop" + rop.String()) //TODO: remove console write, taken from Java version - }else if !disjoint{ - panic("replace op boundaries of " + rop.String() + " overlap with previous " + prevop.String()) - } - } - } - } - // WALK INSERTS - for i:=0; i < len(rewrites); i++ { - op := rewrites[i] - if op == nil{continue} - //hack to replicate inheritance in composition - _, iok := rewrites[i].(*InsertBeforeOp) - _, aok := rewrites[i].(*InsertAfterOp) - if !iok && !aok{continue} - iop := rewrites[i] - // combine current insert with prior if any at same index - // deviating a bit from TokenStreamRewriter.java - hard to incorporate inheritance logic - for j:=0; j= rop.index && iop.GetIndex() <= rop.LastIndex{ - panic("insert op "+iop.String()+" within boundaries of previous "+rop.String()) - } - } - } - } - m := map[int]RewriteOperation{} - for i:=0; i < len(rewrites); i++{ - op := rewrites[i] - if op == nil {continue} - if _, ok := m[op.GetIndex()]; ok{ - panic("should only be one op per index") - } - m[op.GetIndex()] = op - } - return m -} - - -/* - Quick fixing Go lack of overloads - */ - -func max(a,b int)int{ - if a>b{ - return a - }else { - return b - } -} -func min(a,b int)int{ - if aThis is a one way link. It emanates from a state (usually via a list of -// transitions) and has a target state.

-// -//

Since we never have to change the ATN transitions once we construct it, -// the states. We'll use the term Edge for the DFA to distinguish them from -// ATN transitions.

- -type Transition interface { - getTarget() ATNState - setTarget(ATNState) - getIsEpsilon() bool - getLabel() *IntervalSet - getSerializationType() int - Matches(int, int, int) bool -} - -type BaseTransition struct { - target ATNState - isEpsilon bool - label int - intervalSet *IntervalSet - serializationType int -} - -func NewBaseTransition(target ATNState) *BaseTransition { - - if target == nil { - panic("target cannot be nil.") - } - - t := new(BaseTransition) - - t.target = target - // Are we epsilon, action, sempred? - t.isEpsilon = false - t.intervalSet = nil - - return t -} - -func (t *BaseTransition) getTarget() ATNState { - return t.target -} - -func (t *BaseTransition) setTarget(s ATNState) { - t.target = s -} - -func (t *BaseTransition) getIsEpsilon() bool { - return t.isEpsilon -} - -func (t *BaseTransition) getLabel() *IntervalSet { - return t.intervalSet -} - -func (t *BaseTransition) getSerializationType() int { - return t.serializationType -} - -func (t *BaseTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - panic("Not implemented") -} - -const ( - TransitionEPSILON = 1 - TransitionRANGE = 2 - TransitionRULE = 3 - TransitionPREDICATE = 4 // e.g., {isType(input.LT(1))}? - TransitionATOM = 5 - TransitionACTION = 6 - TransitionSET = 7 // ~(A|B) or ~atom, wildcard, which convert to next 2 - TransitionNOTSET = 8 - TransitionWILDCARD = 9 - TransitionPRECEDENCE = 10 -) - -var TransitionserializationNames = []string{ - "INVALID", - "EPSILON", - "RANGE", - "RULE", - "PREDICATE", - "ATOM", - "ACTION", - "SET", - "NOT_SET", - "WILDCARD", - "PRECEDENCE", -} - -//var TransitionserializationTypes struct { -// EpsilonTransition int -// RangeTransition int -// RuleTransition int -// PredicateTransition int -// AtomTransition int -// ActionTransition int -// SetTransition int -// NotSetTransition int -// WildcardTransition int -// PrecedencePredicateTransition int -//}{ -// TransitionEPSILON, -// TransitionRANGE, -// TransitionRULE, -// TransitionPREDICATE, -// TransitionATOM, -// TransitionACTION, -// TransitionSET, -// TransitionNOTSET, -// TransitionWILDCARD, -// TransitionPRECEDENCE -//} - -// TODO: make all transitions sets? no, should remove set edges -type AtomTransition struct { - *BaseTransition -} - -func NewAtomTransition(target ATNState, intervalSet int) *AtomTransition { - - t := new(AtomTransition) - t.BaseTransition = NewBaseTransition(target) - - t.label = intervalSet // The token type or character value or, signifies special intervalSet. - t.intervalSet = t.makeLabel() - t.serializationType = TransitionATOM - - return t -} - -func (t *AtomTransition) makeLabel() *IntervalSet { - s := NewIntervalSet() - s.addOne(t.label) - return s -} - -func (t *AtomTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return t.label == symbol -} - -func (t *AtomTransition) String() string { - return strconv.Itoa(t.label) -} - -type RuleTransition struct { - *BaseTransition - - followState ATNState - ruleIndex, precedence int -} - -func NewRuleTransition(ruleStart ATNState, ruleIndex, precedence int, followState ATNState) *RuleTransition { - - t := new(RuleTransition) - t.BaseTransition = NewBaseTransition(ruleStart) - - t.ruleIndex = ruleIndex - t.precedence = precedence - t.followState = followState - t.serializationType = TransitionRULE - t.isEpsilon = true - - return t -} - -func (t *RuleTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return false -} - -type EpsilonTransition struct { - *BaseTransition - - outermostPrecedenceReturn int -} - -func NewEpsilonTransition(target ATNState, outermostPrecedenceReturn int) *EpsilonTransition { - - t := new(EpsilonTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionEPSILON - t.isEpsilon = true - t.outermostPrecedenceReturn = outermostPrecedenceReturn - return t -} - -func (t *EpsilonTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return false -} - -func (t *EpsilonTransition) String() string { - return "epsilon" -} - -type RangeTransition struct { - *BaseTransition - - start, stop int -} - -func NewRangeTransition(target ATNState, start, stop int) *RangeTransition { - - t := new(RangeTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionRANGE - t.start = start - t.stop = stop - t.intervalSet = t.makeLabel() - return t -} - -func (t *RangeTransition) makeLabel() *IntervalSet { - s := NewIntervalSet() - s.addRange(t.start, t.stop) - return s -} - -func (t *RangeTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return symbol >= t.start && symbol <= t.stop -} - -func (t *RangeTransition) String() string { - return "'" + string(t.start) + "'..'" + string(t.stop) + "'" -} - -type AbstractPredicateTransition interface { - Transition - IAbstractPredicateTransitionFoo() -} - -type BaseAbstractPredicateTransition struct { - *BaseTransition -} - -func NewBasePredicateTransition(target ATNState) *BaseAbstractPredicateTransition { - - t := new(BaseAbstractPredicateTransition) - t.BaseTransition = NewBaseTransition(target) - - return t -} - -func (a *BaseAbstractPredicateTransition) IAbstractPredicateTransitionFoo() {} - -type PredicateTransition struct { - *BaseAbstractPredicateTransition - - isCtxDependent bool - ruleIndex, predIndex int -} - -func NewPredicateTransition(target ATNState, ruleIndex, predIndex int, isCtxDependent bool) *PredicateTransition { - - t := new(PredicateTransition) - t.BaseAbstractPredicateTransition = NewBasePredicateTransition(target) - - t.serializationType = TransitionPREDICATE - t.ruleIndex = ruleIndex - t.predIndex = predIndex - t.isCtxDependent = isCtxDependent // e.g., $i ref in pred - t.isEpsilon = true - return t -} - -func (t *PredicateTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return false -} - -func (t *PredicateTransition) getPredicate() *Predicate { - return NewPredicate(t.ruleIndex, t.predIndex, t.isCtxDependent) -} - -func (t *PredicateTransition) String() string { - return "pred_" + strconv.Itoa(t.ruleIndex) + ":" + strconv.Itoa(t.predIndex) -} - -type ActionTransition struct { - *BaseTransition - - isCtxDependent bool - ruleIndex, actionIndex, predIndex int -} - -func NewActionTransition(target ATNState, ruleIndex, actionIndex int, isCtxDependent bool) *ActionTransition { - - t := new(ActionTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionACTION - t.ruleIndex = ruleIndex - t.actionIndex = actionIndex - t.isCtxDependent = isCtxDependent // e.g., $i ref in pred - t.isEpsilon = true - return t -} - -func (t *ActionTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return false -} - -func (t *ActionTransition) String() string { - return "action_" + strconv.Itoa(t.ruleIndex) + ":" + strconv.Itoa(t.actionIndex) -} - -type SetTransition struct { - *BaseTransition -} - -func NewSetTransition(target ATNState, set *IntervalSet) *SetTransition { - - t := new(SetTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionSET - if set != nil { - t.intervalSet = set - } else { - t.intervalSet = NewIntervalSet() - t.intervalSet.addOne(TokenInvalidType) - } - - return t -} - -func (t *SetTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return t.intervalSet.contains(symbol) -} - -func (t *SetTransition) String() string { - return t.intervalSet.String() -} - -type NotSetTransition struct { - *SetTransition -} - -func NewNotSetTransition(target ATNState, set *IntervalSet) *NotSetTransition { - - t := new(NotSetTransition) - - t.SetTransition = NewSetTransition(target, set) - - t.serializationType = TransitionNOTSET - - return t -} - -func (t *NotSetTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return symbol >= minVocabSymbol && symbol <= maxVocabSymbol && !t.intervalSet.contains(symbol) -} - -func (t *NotSetTransition) String() string { - return "~" + t.intervalSet.String() -} - -type WildcardTransition struct { - *BaseTransition -} - -func NewWildcardTransition(target ATNState) *WildcardTransition { - - t := new(WildcardTransition) - t.BaseTransition = NewBaseTransition(target) - - t.serializationType = TransitionWILDCARD - return t -} - -func (t *WildcardTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return symbol >= minVocabSymbol && symbol <= maxVocabSymbol -} - -func (t *WildcardTransition) String() string { - return "." -} - -type PrecedencePredicateTransition struct { - *BaseAbstractPredicateTransition - - precedence int -} - -func NewPrecedencePredicateTransition(target ATNState, precedence int) *PrecedencePredicateTransition { - - t := new(PrecedencePredicateTransition) - t.BaseAbstractPredicateTransition = NewBasePredicateTransition(target) - - t.serializationType = TransitionPRECEDENCE - t.precedence = precedence - t.isEpsilon = true - - return t -} - -func (t *PrecedencePredicateTransition) Matches(symbol, minVocabSymbol, maxVocabSymbol int) bool { - return false -} - -func (t *PrecedencePredicateTransition) getPredicate() *PrecedencePredicate { - return NewPrecedencePredicate(t.precedence) -} - -func (t *PrecedencePredicateTransition) String() string { - return fmt.Sprint(t.precedence) + " >= _p" -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/tree.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/tree.go deleted file mode 100644 index ad0eabf005d3..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/tree.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -// The basic notion of a tree has a parent, a payload, and a list of children. -// It is the most abstract interface for all the trees used by ANTLR. -/// - -var TreeInvalidInterval = NewInterval(-1, -2) - -type Tree interface { - GetParent() Tree - SetParent(Tree) - GetPayload() interface{} - GetChild(i int) Tree - GetChildCount() int - GetChildren() []Tree -} - -type SyntaxTree interface { - Tree - - GetSourceInterval() *Interval -} - -type ParseTree interface { - SyntaxTree - - Accept(Visitor ParseTreeVisitor) interface{} - GetText() string - - ToStringTree([]string, Recognizer) string -} - -type RuleNode interface { - ParseTree - - GetRuleContext() RuleContext - GetBaseRuleContext() *BaseRuleContext -} - -type TerminalNode interface { - ParseTree - - GetSymbol() Token -} - -type ErrorNode interface { - TerminalNode - - errorNode() -} - -type ParseTreeVisitor interface { - Visit(tree ParseTree) interface{} - VisitChildren(node RuleNode) interface{} - VisitTerminal(node TerminalNode) interface{} - VisitErrorNode(node ErrorNode) interface{} -} - -type BaseParseTreeVisitor struct{} - -var _ ParseTreeVisitor = &BaseParseTreeVisitor{} - -func (v *BaseParseTreeVisitor) Visit(tree ParseTree) interface{} { return nil } -func (v *BaseParseTreeVisitor) VisitChildren(node RuleNode) interface{} { return nil } -func (v *BaseParseTreeVisitor) VisitTerminal(node TerminalNode) interface{} { return nil } -func (v *BaseParseTreeVisitor) VisitErrorNode(node ErrorNode) interface{} { return nil } - -// TODO -//func (this ParseTreeVisitor) Visit(ctx) { -// if (Utils.isArray(ctx)) { -// self := this -// return ctx.map(function(child) { return VisitAtom(self, child)}) -// } else { -// return VisitAtom(this, ctx) -// } -//} -// -//func VisitAtom(Visitor, ctx) { -// if (ctx.parser == nil) { //is terminal -// return -// } -// -// name := ctx.parser.ruleNames[ctx.ruleIndex] -// funcName := "Visit" + Utils.titleCase(name) -// -// return Visitor[funcName](ctx) -//} - -type ParseTreeListener interface { - VisitTerminal(node TerminalNode) - VisitErrorNode(node ErrorNode) - EnterEveryRule(ctx ParserRuleContext) - ExitEveryRule(ctx ParserRuleContext) -} - -type BaseParseTreeListener struct{} - -var _ ParseTreeListener = &BaseParseTreeListener{} - -func (l *BaseParseTreeListener) VisitTerminal(node TerminalNode) {} -func (l *BaseParseTreeListener) VisitErrorNode(node ErrorNode) {} -func (l *BaseParseTreeListener) EnterEveryRule(ctx ParserRuleContext) {} -func (l *BaseParseTreeListener) ExitEveryRule(ctx ParserRuleContext) {} - -type TerminalNodeImpl struct { - parentCtx RuleContext - - symbol Token -} - -var _ TerminalNode = &TerminalNodeImpl{} - -func NewTerminalNodeImpl(symbol Token) *TerminalNodeImpl { - tn := new(TerminalNodeImpl) - - tn.parentCtx = nil - tn.symbol = symbol - - return tn -} - -func (t *TerminalNodeImpl) GetChild(i int) Tree { - return nil -} - -func (t *TerminalNodeImpl) GetChildren() []Tree { - return nil -} - -func (t *TerminalNodeImpl) SetChildren(tree []Tree) { - panic("Cannot set children on terminal node") -} - -func (t *TerminalNodeImpl) GetSymbol() Token { - return t.symbol -} - -func (t *TerminalNodeImpl) GetParent() Tree { - return t.parentCtx -} - -func (t *TerminalNodeImpl) SetParent(tree Tree) { - t.parentCtx = tree.(RuleContext) -} - -func (t *TerminalNodeImpl) GetPayload() interface{} { - return t.symbol -} - -func (t *TerminalNodeImpl) GetSourceInterval() *Interval { - if t.symbol == nil { - return TreeInvalidInterval - } - tokenIndex := t.symbol.GetTokenIndex() - return NewInterval(tokenIndex, tokenIndex) -} - -func (t *TerminalNodeImpl) GetChildCount() int { - return 0 -} - -func (t *TerminalNodeImpl) Accept(v ParseTreeVisitor) interface{} { - return v.VisitTerminal(t) -} - -func (t *TerminalNodeImpl) GetText() string { - return t.symbol.GetText() -} - -func (t *TerminalNodeImpl) String() string { - if t.symbol.GetTokenType() == TokenEOF { - return "" - } - - return t.symbol.GetText() -} - -func (t *TerminalNodeImpl) ToStringTree(s []string, r Recognizer) string { - return t.String() -} - -// Represents a token that was consumed during reSynchronization -// rather than during a valid Match operation. For example, -// we will create this kind of a node during single token insertion -// and deletion as well as during "consume until error recovery set" -// upon no viable alternative exceptions. - -type ErrorNodeImpl struct { - *TerminalNodeImpl -} - -var _ ErrorNode = &ErrorNodeImpl{} - -func NewErrorNodeImpl(token Token) *ErrorNodeImpl { - en := new(ErrorNodeImpl) - en.TerminalNodeImpl = NewTerminalNodeImpl(token) - return en -} - -func (e *ErrorNodeImpl) errorNode() {} - -func (e *ErrorNodeImpl) Accept(v ParseTreeVisitor) interface{} { - return v.VisitErrorNode(e) -} - -type ParseTreeWalker struct { -} - -func NewParseTreeWalker() *ParseTreeWalker { - return new(ParseTreeWalker) -} - -func (p *ParseTreeWalker) Walk(listener ParseTreeListener, t Tree) { - switch tt := t.(type) { - case ErrorNode: - listener.VisitErrorNode(tt) - case TerminalNode: - listener.VisitTerminal(tt) - default: - p.EnterRule(listener, t.(RuleNode)) - for i := 0; i < t.GetChildCount(); i++ { - child := t.GetChild(i) - p.Walk(listener, child) - } - p.ExitRule(listener, t.(RuleNode)) - } -} - -// -// The discovery of a rule node, involves sending two events: the generic -// {@link ParseTreeListener//EnterEveryRule} and a -// {@link RuleContext}-specific event. First we trigger the generic and then -// the rule specific. We to them in reverse order upon finishing the node. -// -func (p *ParseTreeWalker) EnterRule(listener ParseTreeListener, r RuleNode) { - ctx := r.GetRuleContext().(ParserRuleContext) - listener.EnterEveryRule(ctx) - ctx.EnterRule(listener) -} - -func (p *ParseTreeWalker) ExitRule(listener ParseTreeListener, r RuleNode) { - ctx := r.GetRuleContext().(ParserRuleContext) - ctx.ExitRule(listener) - listener.ExitEveryRule(ctx) -} - -var ParseTreeWalkerDefault = NewParseTreeWalker() diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/trees.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/trees.go deleted file mode 100644 index 80144ecadeac..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/trees.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import "fmt" - -/** A set of utility routines useful for all kinds of ANTLR trees. */ - -// Print out a whole tree in LISP form. {@link //getNodeText} is used on the -// node payloads to get the text for the nodes. Detect -// parse trees and extract data appropriately. -func TreesStringTree(tree Tree, ruleNames []string, recog Recognizer) string { - - if recog != nil { - ruleNames = recog.GetRuleNames() - } - - s := TreesGetNodeText(tree, ruleNames, nil) - - s = EscapeWhitespace(s, false) - c := tree.GetChildCount() - if c == 0 { - return s - } - res := "(" + s + " " - if c > 0 { - s = TreesStringTree(tree.GetChild(0), ruleNames, nil) - res += s - } - for i := 1; i < c; i++ { - s = TreesStringTree(tree.GetChild(i), ruleNames, nil) - res += (" " + s) - } - res += ")" - return res -} - -func TreesGetNodeText(t Tree, ruleNames []string, recog Parser) string { - if recog != nil { - ruleNames = recog.GetRuleNames() - } - - if ruleNames != nil { - switch t2 := t.(type) { - case RuleNode: - t3 := t2.GetRuleContext() - altNumber := t3.GetAltNumber() - - if altNumber != ATNInvalidAltNumber { - return fmt.Sprintf("%s:%d", ruleNames[t3.GetRuleIndex()], altNumber) - } - return ruleNames[t3.GetRuleIndex()] - case ErrorNode: - return fmt.Sprint(t2) - case TerminalNode: - if t2.GetSymbol() != nil { - return t2.GetSymbol().GetText() - } - } - } - - // no recog for rule names - payload := t.GetPayload() - if p2, ok := payload.(Token); ok { - return p2.GetText() - } - - return fmt.Sprint(t.GetPayload()) -} - -// Return ordered list of all children of this node -func TreesGetChildren(t Tree) []Tree { - list := make([]Tree, 0) - for i := 0; i < t.GetChildCount(); i++ { - list = append(list, t.GetChild(i)) - } - return list -} - -// Return a list of all ancestors of this node. The first node of -// list is the root and the last is the parent of this node. -// -func TreesgetAncestors(t Tree) []Tree { - ancestors := make([]Tree, 0) - t = t.GetParent() - for t != nil { - f := []Tree{t} - ancestors = append(f, ancestors...) - t = t.GetParent() - } - return ancestors -} - -func TreesFindAllTokenNodes(t ParseTree, ttype int) []ParseTree { - return TreesfindAllNodes(t, ttype, true) -} - -func TreesfindAllRuleNodes(t ParseTree, ruleIndex int) []ParseTree { - return TreesfindAllNodes(t, ruleIndex, false) -} - -func TreesfindAllNodes(t ParseTree, index int, findTokens bool) []ParseTree { - nodes := make([]ParseTree, 0) - treesFindAllNodes(t, index, findTokens, &nodes) - return nodes -} - -func treesFindAllNodes(t ParseTree, index int, findTokens bool, nodes *[]ParseTree) { - // check this node (the root) first - - t2, ok := t.(TerminalNode) - t3, ok2 := t.(ParserRuleContext) - - if findTokens && ok { - if t2.GetSymbol().GetTokenType() == index { - *nodes = append(*nodes, t2) - } - } else if !findTokens && ok2 { - if t3.GetRuleIndex() == index { - *nodes = append(*nodes, t3) - } - } - // check children - for i := 0; i < t.GetChildCount(); i++ { - treesFindAllNodes(t.GetChild(i).(ParseTree), index, findTokens, nodes) - } -} - -func TreesDescendants(t ParseTree) []ParseTree { - nodes := []ParseTree{t} - for i := 0; i < t.GetChildCount(); i++ { - nodes = append(nodes, TreesDescendants(t.GetChild(i).(ParseTree))...) - } - return nodes -} diff --git a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go b/vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go deleted file mode 100644 index bba2ffae7930..000000000000 --- a/vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. -// Use of this file is governed by the BSD 3-clause license that -// can be found in the LICENSE.txt file in the project root. - -package antlr - -import ( - "bytes" - "errors" - "fmt" - "sort" - "strconv" - "strings" -) - -func intMin(a, b int) int { - if a < b { - return a - } - return b -} - -func intMax(a, b int) int { - if a > b { - return a - } - return b -} - -// A simple integer stack - -type IntStack []int - -var ErrEmptyStack = errors.New("Stack is empty") - -func (s *IntStack) Pop() (int, error) { - l := len(*s) - 1 - if l < 0 { - return 0, ErrEmptyStack - } - v := (*s)[l] - *s = (*s)[0:l] - return v, nil -} - -func (s *IntStack) Push(e int) { - *s = append(*s, e) -} - -type Set struct { - data map[int][]interface{} - hashcodeFunction func(interface{}) int - equalsFunction func(interface{}, interface{}) bool -} - -func NewSet( - hashcodeFunction func(interface{}) int, - equalsFunction func(interface{}, interface{}) bool) *Set { - - s := new(Set) - - s.data = make(map[int][]interface{}) - - if hashcodeFunction != nil { - s.hashcodeFunction = hashcodeFunction - } else { - s.hashcodeFunction = standardHashFunction - } - - if equalsFunction == nil { - s.equalsFunction = standardEqualsFunction - } else { - s.equalsFunction = equalsFunction - } - - return s -} - -func standardEqualsFunction(a interface{}, b interface{}) bool { - - ac, oka := a.(comparable) - bc, okb := b.(comparable) - - if !oka || !okb { - panic("Not Comparable") - } - - return ac.equals(bc) -} - -func standardHashFunction(a interface{}) int { - if h, ok := a.(hasher); ok { - return h.hash() - } - - panic("Not Hasher") -} - -type hasher interface { - hash() int -} - -func (s *Set) length() int { - return len(s.data) -} - -func (s *Set) add(value interface{}) interface{} { - - key := s.hashcodeFunction(value) - - values := s.data[key] - - if s.data[key] != nil { - for i := 0; i < len(values); i++ { - if s.equalsFunction(value, values[i]) { - return values[i] - } - } - - s.data[key] = append(s.data[key], value) - return value - } - - v := make([]interface{}, 1, 10) - v[0] = value - s.data[key] = v - - return value -} - -func (s *Set) contains(value interface{}) bool { - - key := s.hashcodeFunction(value) - - values := s.data[key] - - if s.data[key] != nil { - for i := 0; i < len(values); i++ { - if s.equalsFunction(value, values[i]) { - return true - } - } - } - return false -} - -func (s *Set) values() []interface{} { - var l []interface{} - - for _, v := range s.data { - l = append(l, v...) - } - - return l -} - -func (s *Set) String() string { - r := "" - - for _, av := range s.data { - for _, v := range av { - r += fmt.Sprint(v) - } - } - - return r -} - -type BitSet struct { - data map[int]bool -} - -func NewBitSet() *BitSet { - b := new(BitSet) - b.data = make(map[int]bool) - return b -} - -func (b *BitSet) add(value int) { - b.data[value] = true -} - -func (b *BitSet) clear(index int) { - delete(b.data, index) -} - -func (b *BitSet) or(set *BitSet) { - for k := range set.data { - b.add(k) - } -} - -func (b *BitSet) remove(value int) { - delete(b.data, value) -} - -func (b *BitSet) contains(value int) bool { - return b.data[value] -} - -func (b *BitSet) values() []int { - ks := make([]int, len(b.data)) - i := 0 - for k := range b.data { - ks[i] = k - i++ - } - sort.Ints(ks) - return ks -} - -func (b *BitSet) minValue() int { - min := 2147483647 - - for k := range b.data { - if k < min { - min = k - } - } - - return min -} - -func (b *BitSet) equals(other interface{}) bool { - otherBitSet, ok := other.(*BitSet) - if !ok { - return false - } - - if len(b.data) != len(otherBitSet.data) { - return false - } - - for k, v := range b.data { - if otherBitSet.data[k] != v { - return false - } - } - - return true -} - -func (b *BitSet) length() int { - return len(b.data) -} - -func (b *BitSet) String() string { - vals := b.values() - valsS := make([]string, len(vals)) - - for i, val := range vals { - valsS[i] = strconv.Itoa(val) - } - return "{" + strings.Join(valsS, ", ") + "}" -} - -type AltDict struct { - data map[string]interface{} -} - -func NewAltDict() *AltDict { - d := new(AltDict) - d.data = make(map[string]interface{}) - return d -} - -func (a *AltDict) Get(key string) interface{} { - key = "k-" + key - return a.data[key] -} - -func (a *AltDict) put(key string, value interface{}) { - key = "k-" + key - a.data[key] = value -} - -func (a *AltDict) values() []interface{} { - vs := make([]interface{}, len(a.data)) - i := 0 - for _, v := range a.data { - vs[i] = v - i++ - } - return vs -} - -type DoubleDict struct { - data map[int]map[int]interface{} -} - -func NewDoubleDict() *DoubleDict { - dd := new(DoubleDict) - dd.data = make(map[int]map[int]interface{}) - return dd -} - -func (d *DoubleDict) Get(a, b int) interface{} { - data := d.data[a] - - if data == nil { - return nil - } - - return data[b] -} - -func (d *DoubleDict) set(a, b int, o interface{}) { - data := d.data[a] - - if data == nil { - data = make(map[int]interface{}) - d.data[a] = data - } - - data[b] = o -} - -func EscapeWhitespace(s string, escapeSpaces bool) string { - - s = strings.Replace(s, "\t", "\\t", -1) - s = strings.Replace(s, "\n", "\\n", -1) - s = strings.Replace(s, "\r", "\\r", -1) - if escapeSpaces { - s = strings.Replace(s, " ", "\u00B7", -1) - } - return s -} - -func TerminalNodeToStringArray(sa []TerminalNode) []string { - st := make([]string, len(sa)) - - for i, s := range sa { - st[i] = fmt.Sprintf("%v", s) - } - - return st -} - -func PrintArrayJavaStyle(sa []string) string { - var buffer bytes.Buffer - - buffer.WriteString("[") - - for i, s := range sa { - buffer.WriteString(s) - if i != len(sa)-1 { - buffer.WriteString(", ") - } - } - - buffer.WriteString("]") - - return buffer.String() -} - -// The following routines were lifted from bits.rotate* available in Go 1.9. - -const uintSize = 32 << (^uint(0) >> 32 & 1) // 32 or 64 - -// rotateLeft returns the value of x rotated left by (k mod UintSize) bits. -// To rotate x right by k bits, call RotateLeft(x, -k). -func rotateLeft(x uint, k int) uint { - if uintSize == 32 { - return uint(rotateLeft32(uint32(x), k)) - } - return uint(rotateLeft64(uint64(x), k)) -} - -// rotateLeft32 returns the value of x rotated left by (k mod 32) bits. -func rotateLeft32(x uint32, k int) uint32 { - const n = 32 - s := uint(k) & (n - 1) - return x<>(n-s) -} - -// rotateLeft64 returns the value of x rotated left by (k mod 64) bits. -func rotateLeft64(x uint64, k int) uint64 { - const n = 64 - s := uint(k) & (n - 1) - return x<>(n-s) -} - - -// murmur hash -const ( - c1_32 uint = 0xCC9E2D51 - c2_32 uint = 0x1B873593 - n1_32 uint = 0xE6546B64 -) - -func murmurInit(seed int) int { - return seed -} - -func murmurUpdate(h1 int, k1 int) int { - var k1u uint - k1u = uint(k1) * c1_32 - k1u = rotateLeft(k1u, 15) - k1u *= c2_32 - - var h1u = uint(h1) ^ k1u - k1u = rotateLeft(k1u, 13) - h1u = h1u*5 + 0xe6546b64 - return int(h1u) -} - -func murmurFinish(h1 int, numberOfWords int) int { - var h1u uint = uint(h1) - h1u ^= uint(numberOfWords * 4) - h1u ^= h1u >> 16 - h1u *= uint(0x85ebca6b) - h1u ^= h1u >> 13 - h1u *= 0xc2b2ae35 - h1u ^= h1u >> 16 - - return int(h1u) -} diff --git a/vendor/github.com/armon/go-socks5/.gitignore b/vendor/github.com/armon/go-socks5/.gitignore new file mode 100644 index 000000000000..00268614f045 --- /dev/null +++ b/vendor/github.com/armon/go-socks5/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/armon/go-socks5/.travis.yml b/vendor/github.com/armon/go-socks5/.travis.yml new file mode 100644 index 000000000000..8d61700ec229 --- /dev/null +++ b/vendor/github.com/armon/go-socks5/.travis.yml @@ -0,0 +1,4 @@ +language: go +go: + - 1.1 + - tip diff --git a/vendor/github.com/aws/aws-lambda-go/Gopkg.lock b/vendor/github.com/aws/aws-lambda-go/Gopkg.lock deleted file mode 100644 index a49283106fef..000000000000 --- a/vendor/github.com/aws/aws-lambda-go/Gopkg.lock +++ /dev/null @@ -1,33 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" - -[[projects]] - name = "gopkg.in/urfave/cli.v1" - packages = ["."] - revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" - version = "v1.20.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "21bf02839d69eb4ab638d20ad48614cf2e71753b2005ef5fa2b05cb9704ab5d2" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/aws/aws-lambda-go/Gopkg.toml b/vendor/github.com/aws/aws-lambda-go/Gopkg.toml deleted file mode 100644 index 323002ca8a86..000000000000 --- a/vendor/github.com/aws/aws-lambda-go/Gopkg.toml +++ /dev/null @@ -1,21 +0,0 @@ - -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" diff --git a/vendor/github.com/aws/aws-lambda-go/README.md b/vendor/github.com/aws/aws-lambda-go/README.md deleted file mode 100644 index 9cc2eae4e685..000000000000 --- a/vendor/github.com/aws/aws-lambda-go/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# aws-lambda-go - -Libraries, samples and tools to help Go developers develop AWS Lambda functions. - -To learn more about writing AWS Lambda functions in Go, go to [the offical documentation](https://docs.aws.amazon.com/lambda/latest/dg/go-programming-model.html) - -[![GoDoc][1]][2] -[![GoCard][3]][4] -[![Build Status][5]][6] -[![codecov][7]][8] - -[1]: https://godoc.org/github.com/aws/aws-lambda-go?status.svg -[2]: https://godoc.org/github.com/aws/aws-lambda-go -[3]: https://goreportcard.com/badge/github.com/aws/aws-lambda-go -[4]: https://goreportcard.com/report/github.com/aws/aws-lambda-go -[5]: https://travis-ci.org/aws/aws-lambda-go.svg?branch=master -[6]: https://travis-ci.org/aws/aws-lambda-go -[7]: https://codecov.io/gh/aws/aws-lambda-go/branch/master/graph/badge.svg -[8]: https://codecov.io/gh/aws/aws-lambda-go - -# Getting Started - -``` Go -// main.go -package main - -import ( - "github.com/aws/aws-lambda-go/lambda" -) - -func hello() (string, error) { - return "Hello ƛ!", nil -} - -func main() { - // Make the handler available for Remote Procedure Call by AWS Lambda - lambda.Start(hello) -} -``` - -# Building your function - -Preparing a binary to deploy to AWS Lambda requires that it is compiled for Linux and placed into a .zip file. - -## For developers on Linux and macOS -``` shell -# Remember to build your handler executable for Linux! -GOOS=linux GOARCH=amd64 go build -o main main.go -zip main.zip main -``` - -## For developers on Windows - -Windows developers may have trouble producing a zip file that marks the binary as exectuable on Linux. To create a .zip that will work on AWS Lambda, the `build-lambda-zip` tool may be helpful. - -Get the tool -``` shell -go.exe get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip -``` - -Use the tool from your `GOPATH`. If you have a default installation of Go, the tool will be in `%USERPROFILE%\Go\bin`. - -in cmd.exe: -``` bat -set GOOS=linux -set GOARCH=amd64 -go build -o main main.go -%USERPROFILE%\Go\bin\build-lambda-zip.exe -o main.zip main -``` - -in Powershell: -``` posh -$env:GOOS = "linux" -$env:GOARCH = "amd64" -go build -o main main.go -~\Go\Bin\build-lambda-zip.exe -o main.zip main -``` -# Deploying your functions - -To deploy your function, refer to the offical documentation for [deploying using the AWS CLI, AWS Cloudformation, and AWS SAM](https://docs.aws.amazon.com/lambda/latest/dg/deploying-lambda-apps.html). - -# Event Integrations - -The [event models](https://github.com/aws/aws-lambda-go/tree/master/events) can be used to model AWS event sources. The offical documentation has [detailed walkthroughs](https://docs.aws.amazon.com/lambda/latest/dg/use-cases.html). - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md deleted file mode 100644 index 36e0eceb1a09..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md +++ /dev/null @@ -1,325 +0,0 @@ -Release v0.9.0 (2019-05-28) -=== - -### Services -* Synced the V2 SDK with latest AWS service API definitions. -* Fixes [#304](https://github.com/aws/aws-sdk-go-v2/issues/304) -* Fixes [#295](https://github.com/aws/aws-sdk-go-v2/issues/295) - -### SDK Breaking changes -This update includes multiple breaking changes to the SDK. These updates improve the SDK's usability, consistency. - -#### Client type name -The API client type is renamed to `Client` for consistency, and remove stutter between package and client type name. Using Amazon S3 API client as an example, the `s3.S3` type is renamed to `s3.Client`. - -#### New API operation response type -API operations' `Request.Send` method now returns a Response type for the specific operation. The Response type wraps the operation's Output parameter, and includes a method for the response's metadata such as RequestID. The Output type is an anonymous embedded field within the Output type. If your application was passing the Output value around you'll need to extract it directly, or pass the Response type instead. - -#### New API operation paginator utility -This change removes the `Paginate` method from API operation Request types, (e.g. ListObjectsRequest). A new Paginator constructor is added that can be used to page these operations. To update your application to use the new pattern, where `Paginate` was being called, replace this with the Paginator type's constructor. The usage of the returned Paginator type is unchanged. - -```go -req := svc.ListObjectsRequest(params) -p := req.Paginate() -``` - -Is updated to to use the Paginator constructor instead of Paginate method. - -```go -req := svc.ListObjectsRequest(params) -p := s3.NewListObjectsPaginator(req) -``` - -#### Other changes - * Standardizes API client package name to be based on the API model's `ServiceID`. - * Standardizes API client operation input and output type names. - * Removes `endpoints` package's service identifier constants. These values were unstable. Each API client package contains an `EndpointsID` constant that can be used for service specific endpoint lookup. - * Fix API endpoint lookups to use the API's modeled `EndpointsID` (aka `enpdointPrefix`). Searching for API endpoints in the `endpoints` package should use the API client package's, `EndpointsID`. - -### SDK Enhancements -* Update CI tests to ensure all codegen changes are accounted for in PR ([#183](https://github.com/aws/aws-sdk-go-v2/issues/183)) - * Updates the CI tests to ensure that any code generation changes are accounted for in the PR, and that there were no mistaken changes made without also running code generation. This change should also help ensure that code generation order is stable, and there are no ordering issues with the SDK's codegen. - * Related [aws/aws-sdk-go#1966](https://github.com/aws/aws-sdk-go/issues/1966) - -### SDK Bugs -* `service/dynamodb/expression`: Fix Builder with KeyCondition example ([#306](https://github.com/aws/aws-sdk-go-v2/issues/306)) - * Fixes the ExampleBuilder_WithKeyCondition example to include the ExpressionAttributeNames member being set. - * Fixes [#285](https://github.com/aws/aws-sdk-go-v2/issues/285) -* `aws/defaults`: Fix UserAgent execution environment key ([#307](https://github.com/aws/aws-sdk-go-v2/issues/307)) - * Fixes the SDK's UserAgent key for the execution environment. - * Fixes [#276](https://github.com/aws/aws-sdk-go-v2/issues/276) -* `private/model/api`: Improve SDK API reference doc generation ([#309](https://github.com/aws/aws-sdk-go-v2/issues/309)) - * Improves the SDK's generated documentation for API client, operation, and types. This fixes several bugs in the doc generation causing poor formatting, an difficult to read reference documentation. - * Fix [#308](https://github.com/aws/aws-sdk-go-v2/issues/308) - * Related [aws/aws-sdk-go#2617](https://github.com/aws/aws-sdk-go/issues/2617) - -Release v0.8.0 (2019-04-25) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### SDK Breaking changes -* Update SDK API operation request send to required Context ([#265](https://github.com/aws/aws-sdk-go-v2/pull/265)) - * Updates the SDK's API operation request Send method to require a context.Context value when called. This is done to encourage best applications to use Context for cancellation and request tracing. Standardizing on this pattern will also help reduce code paths which accidentally do not have the Context causing the cancellation and tracing chain to be lost. Leading to difficult to trace down losses of cancellation and tracing within an application. - * Fixes [#264](https://github.com/aws/aws-sdk-go-v2/pull/264) - -### SDK Enhancements -* Update README.md for getting SDK without Go Modules - * Updates the README.md with instructions how to get the SDK without Go Modules enabled, or using the SDK within a GOPATH with Go 1.11, and Go 1.12. -* Refactor SDK's integration tests to be code generated ([#283](https://github.com/aws/aws-sdk-go-v2/pull/283)) -* `aws`: Add RequestThrottledException to set of throttled exceptions ([#292](https://github.com/aws/aws-sdk-go-v2/pull/292)) -* `private/model/api`: Backfill authtype, STS and Cognito Identity ([#293](https://github.com/aws/aws-sdk-go-v2/pull/293)) - * Backfills the authtype=none modeled trait for STS and Cognito Identity services. This removes the in code customization for these two services' APIs that should not be signed. - -### SDK Bugs -* Fix HTTP endpoint credential provider test for unresolved hosts ([#262](https://github.com/aws/aws-sdk-go-v2/pull/262)) - * Fixes the HTTP endpoint credential provider's tests to check for a host that resolves to no addresses. -* `example/service/s3/mockPaginator`: Update example to not use internal pkg ([#278](https://github.com/aws/aws-sdk-go-v2/pull/278)) - * Updates the SDK's S3 Mock Paginator example to not use internal SDK packages and instead use the SDK's provided defaults package for default configuration. - * Fixes [#116](https://github.com/aws/aws-sdk-go-v2/issues/116) -* Cleanup go mod unused dependencies ([#284](https://github.com/aws/aws-sdk-go-v2/pull/284)) -* `service/s3/s3manager`: Fix brittle Upload unit test ([#288](https://github.com/aws/aws-sdk-go-v2/pull/288)) -* `aws/ec2metadata`: Fix EC2 Metadata client panic with debug logging ([#290](https://github.com/aws/aws-sdk-go-v2/pull/290)) - * Fixes a panic that could occur within the EC2 Metadata client when both AWS_EC2_METADATA_DISABLED env var is set and log level is LogDebugWithHTTPBody. The SDK's client response body debug functionality would panic because the Request.HTTPResponse value was not specified. -* `aws`: Fix RequestUserAgent test to be stable ([#289](https://github.com/aws/aws-sdk-go-v2/pull/289)) -* `private/protocol/rest`: Trim space in header key and value ([#291](https://github.com/aws/aws-sdk-go-v2/pull/291)) - * Fixes a bug when using S3 metadata where metadata values with leading spaces would trigger request signature validation errors when the request is received by the service. - - -Release v0.7.0 (2019-01-03) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### SDK Enhancements -* deps: Update SDK to latest go-jmespath ([#254](https://github.com/aws/aws-sdk-go-v2/pull/254)) - -### SDK Bugs -* `internal/ini`: Fix bug on trimming rhs spaces closes ([#260](https://github.com/aws/aws-sdk-go-v2/pull/260)) - * Fixes a bug trimming RHS spaces not being read correctly from the ini file. - * Fix [#259](https://github.com/aws/aws-sdk-go-v2/pull/259) - -Release v0.6.0 (2018-12-03) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### SDK Bugs -* Updates the SDK's release tagging scheme to use `v0` until the v2 SDK reaches - * General Availability (GA). This allows the SDK to be used with Go 1.11 modules. Post GA, v2 SDK's release tagging version will most likely follow a `v1..` patter. - * Fixes [#221](https://github.com/aws/aws-sdk-go-v2/issues/221) - -Release v0.5.0 (2018-09-19) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### SDK Bugs -* Fix SDK Go 1.11 connection reset handling (#207) - * Fixes how the SDK checks for connection reset errors when making API calls to be compatiable with Go 1.11. -* `aws/signer/v4`: Fix X-Amz-Content-Sha256 being in to query for presign (#188) - * Fixes the bug which would allow the X-Amz-Content-Sha256 header to be promoted to the query string when presigning a S3 request. This bug also was preventing users from setting their own sha256 value for a presigned URL. Presigned requests generated with the custom sha256 would of always failed with invalid signature. - * Related to aws/aws-sdk-go#1974 - -### SDK Enhancements -* Cleanup SDK README and example documenation. -* `service/s3/s3manager`: Add doc for sequential download (#201) - Adds documentation for downloading object sequentially with the S3 download manager. -* `aws/credentials`: Update Credentials cache to have less overhead (#184) - * Updates the Credentials type's cache of the CredentialsValue to be synchronized with an atomic value in addition to the Mutex. This reduces the overhead applications will encounter when many concurrent API requests are being made. - * Related to: aws/aws-sdk-go#1973 -* `service/dynamodb/dynamodbattribute`: Add support for custom struct tag keys (#203) - * Adds support for (un)marshaling Go types using custom struct tag keys. The new `MarshalOptions.TagKey` allows the user to specify the tag key to use when (un)marshaling struct fields. Adds support for struct tags such as `yaml`, `toml`, etc. Support for these keys are in name only, and require the tag value format and values to be supported by the package's Marshalers. -* `internal/ini`: Add custom INI parser for shared config/credentials file (#209) - * Related to: aws/aws-sdk-go#2024 - -Release v0.4.0 (2018-05-25) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### SDK Bugs -* `private/protocol/xml/xmlutil`: Fix XML unmarshaler not correctly unmarshaling list of timestamp values ([#166](https://github.com/aws/aws-sdk-go-v2/pull/166)) - * Fixes a bug in the XML unmarshaler that would incorrectly try to unmarshal "time.Time" parameters that did not have the struct tag type on them. - * Related to [aws/aws-sdk-go#1894](https://github.com/aws/aws-sdk-go/pull/1894) -* `service/s3`: Fix typos for migrated S3 specific config options ([#173](https://github.com/aws/aws-sdk-go-v2/pull/173)) - * Updates the S3 specific config error messages to the correct fields. -* `aws/endpoints`: Fix SDK endpoint signing name resolution ([#181](https://github.com/aws/aws-sdk-go-v2/pull/181)) - * Fixes how the SDK derives service signing names. If the signing name is not modeled in the endpoints package the service will fallback to the signing name modeled in the service model. - * Fix [#163](https://github.com/aws/aws-sdk-go-v2/pull/163) - * Fix [#153](https://github.com/aws/aws-sdk-go-v2/pull/153) - * Related to [aws/aws-sdk-go#1854](https://github.com/aws/aws-sdk-go/pull/1854) -* `service/s3`: remove SelectContent until EventStream supported ([#175](https://github.com/aws/aws-sdk-go-v2/pull/175]) - * S3's SelectContent API is not functional in the SDK yet, and was not supposed to be generated until EventStream support is available. - * Related to [aws/aws-sdk-go#1941](https://github.com/aws/aws-sdk-go/pull/1941) - -### SDK Enhancements -* `service/s3/s3manager/s3manageriface`: Add WithIterator to mock interface ([#156](https://github.com/aws/aws-sdk-go-v2/pull/156)) - * Updates the `DownloaderAPI` and `UploaderAPI` mocking interfaces to have parity with the concrete types. - * Fixes [#155](https://github.com/aws/aws-sdk-go-v2/issues/155) - - -Release v0.3.0 (2018-03-08) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### Breaking Changes -* `private/mode/api`: Refactor service paginator helpers to iterator pattern ([#119](https://github.com/aws/aws-sdk-go-v2/pull/119)) - * Refactors the generated service client paginators to be an iterator pattern. This pattern improves usability while removing the need for callbacks. - * See the linked PR for an example. -* `private/model/api`: Removes setter helpers from service API types ([#101](https://github.com/aws/aws-sdk-go-v2/pull/101)) - * Removes the setter helper methods from service API types. Removing clutter and noise from the API type's signature. - * Based on feedback [#81][https://github.com/aws/aws-sdk-go-v2/issues/81] -* `aws`: Rename CanceledErrorCode to ErrCodeRequestCanceled ([#131](https://github.com/aws/aws-sdk-go-v2/pull/131)) - * Renames CanceledErrorCode to correct naming scheme. - -### SDK Bugs -* `internal/awsutil`: Fix DeepEqual to consider string alias type equal to string ([#102](https://github.com/aws/aws-sdk-go-v2/pull/102)) - * Fixes SDK waiters not detecting the correct condition is met. [#92](https://github.com/aws/aws-sdk-go-v2/issues/92) -* `aws/external`: Fix EnvConfig misspelled container endpoint path getter ([#106](https://github.com/aws/aws-sdk-go-v2/pull/106)) - * This caused the type to not satisfy the ContainerCredentialsEndpointPathProvider interface. - * Fixes [#105](https://github.com/aws/aws-sdk-go-v2/issues/105) -* `service/s3/s3crypto`: Fix S3Crypto's handling of TagLen ([#107](https://github.com/aws/aws-sdk-go-v2/pull/107)) - * Fixes the S3Crypto's handling of TagLen to only be set if present. - * V2 Fix for [aws/aws-sdk-go#1742](https://github.com/aws/aws-sdk-go/issues/1742) -* `private/model/api`: Update SDK service client initialization documentation ([#141](https://github.com/aws/aws-sdk-go-v2/pull/141)) - * Updates the SDK's service initialization doc template to reflect the v2 SDK's configuration update change from v1. - * Related to [#136](https://github.com/aws/aws-sdk-go-v2/issues/136) - -### SDK Enhancements -* `aws`: Improve pagination unit tests ([#97](https://github.com/aws/aws-sdk-go-v2/pull/97)) - * V2 port of [aws/aws-sdk-go#1733](https://github.com/aws/aws-sdk-go/pull/1733) -* `aws/external`: Add example for shared config and static credential helper ([#109](https://github.com/aws/aws-sdk-go-v2/pull/109)) - * Adds examples for the config helpers; WithSharedConfigProfile, WithCredentialsValue, WithMFATokenFunc. -* `private/model/api`: Add validation to prevent collision of api defintions ([#112](https://github.com/aws/aws-sdk-go-v2/pull/112)) - * V2 port of [aws/aws-sdk-go#1758](https://github.com/aws/aws-sdk-go/pull/1758) -* `aws/ec2metadata`: Add support for AWS_EC2_METADATA_DISABLED env var ([#128](https://github.com/aws/aws-sdk-go-v2/pull/128)) - * When this environment variable is set. The SDK's EC2 Metadata Client will not attempt to make requests. All requests made with the EC2 Metadata Client will fail. - * V2 port of [aws/aws-sdk-go#1799](https://github.com/aws/aws-sdk-go/pull/1799) -* Add code of conduct ([#138](https://github.com/aws/aws-sdk-go-v2/pull/138)) -* Update SDK README dep usage ([#140](https://github.com/aws/aws-sdk-go-v2/pull/140)) - -Release v0.2.0 (2018-01-15) -=== - -### Services -* Synced the V2 SDK with latests AWS service API definitions. - -### SDK Bugs -* `service/s3/s3manager`: Fix Upload Manger's UploadInput fields ([#89](https://github.com/aws/aws-sdk-go-v2/pull/89)) - * Fixes [#88](https://github.com/aws/aws-sdk-go-v2/issues/88) -* `aws`: Fix Pagination handling of empty string NextToken ([#94](https://github.com/aws/aws-sdk-go-v2/pull/94)) - * Fixes [#84](https://github.com/aws/aws-sdk-go-v2/issues/84) - - -Release v0.1.0 (2017-12-21) -=== - -## What has changed? - -Our focus for the 2.0 SDK is to improve the SDK’s development experience and performance, make the SDK easy to extend, and add new features. The changes made in the Developer Preview target the major pain points of configuring the SDK and using AWS service API calls. Check out the SDK for details on pending changes that are in development and designs we’re discussing. - -The following are some of the larger changes included in the AWS SDK for Go 2.0 Developer Preview. - -### SDK configuration - -The 2.0 SDK simplifies how you configure the SDK's service clients by using a single `Config` type. This simplifies the `Session` and `Config` type interaction from the 1.x SDK. In addition, we’ve moved the service-specific configuration flags to the individual service client types. This reduces confusion about where service clients will use configuration members. - -We added the external package to provide the utilities for you to use external configuration sources to populate the SDK's `Config` type. External sources include environmental variables, shared credentials file (`~/.aws/credentials`), and shared config file (`~/.aws/config`). By default, the 2.0 SDK will now automatically load configuration values from the shared config file. The external package also provides you with the tools to customize how the external sources are loaded and used to populate the `Config` type. - -You can even customize external configuration sources to include your own custom sources, for example, JSON files or a custom file format. - -Use `LoadDefaultAWSConfig` in the external package to create the default `Config` value, and load configuration values from the external configuration sources. - -```go -cfg, err := external.LoadDefaultAWSConfig() -``` - -To specify the shared configuration profile load used in code, use the `WithSharedConfigProfile` helper passed into `LoadDefaultAWSConfig` with the profile name to use. - -```go -cfg, err := external.LoadDefaultAWSConfig( - external.WithSharedConfigProfile("gopher") -) -``` - -Once a `Config` value is returned by `LoadDefaultAWSConfig`, you can set or override configuration values by setting the fields on the `Config` struct, such as `Region`. - -```go -cfg.Region = endpoints.UsWest2RegionID -``` - -Use the `cfg` value to provide the loaded configuration to new AWS service clients. - -```go -svc := dynamodb.New(cfg) -``` - -### API request methods - -The 2.0 SDK consolidates several ways to make an API call, providing a single request constructor for each API call. This means that your application will create an API request from input parameters, then send it. This enables you to optionally modify and configure how the request will be sent. This includes, but isn’t limited to, modifications such as setting the `Context` per request, adding request handlers, and enabling logging. - -Each API request method is suffixed with `Request` and returns a typed value for the specific API request. - -As an example, to use the Amazon Simple Storage Service GetObject API, the signature of the method is: - -```go -func (c *S3) GetObjectRequest(*s3.GetObjectInput) *s3.GetObjectRequest -``` - -To use the GetObject API, we pass in the input parameters to the method, just like we would with the 1.x SDK. The 2.0 SDK's method will initialize a `GetObjectRequest` value that we can then use to send our request to Amazon S3. - -```go -req := svc.GetObjectRequest(params) - -// Optionally, set the context or other configuration for the request to use -req.SetContext(ctx) - -// Send the request and get the response -resp, err := req.Send() -``` - -### API enumerations - -The 2.0 SDK uses typed enumeration values for all API enumeration fields. This change provides you with the type safety that you and your IDE can leverage to discover which enumeration values are valid for particular fields. Typed enumeration values also provide a stronger type safety story for your application than using string literals directly. The 2.0 SDK uses string aliases for each enumeration type. The SDK also generates typed constants for each enumeration value. This change removes the need for enumeration API fields to be pointers, as a zero-value enumeration always means the field isn’t set. - -For example, the Amazon Simple Storage Service PutObject API has a field, `ACL ObjectCannedACL`. An `ObjectCannedACL` string alias is defined within the s3 package, and each enumeration value is also defined as a typed constant. In this example, we want to use the typed enumeration values to set an uploaded object to have an ACL of `public-read`. The constant that the SDK provides for this enumeration value is `ObjectCannedACLPublicRead`. - -```go -svc.PutObjectRequest(&s3.PutObjectInput{ - Bucket: aws.String("myBucket"), - Key: aws.String("myKey"), - ACL: s3.ObjectCannedACLPublicRead, - Body: body, -}) -``` - -### API slice and map elements - -The 2.0 SDK removes the need to convert slice and map elements from values to pointers for API calls. This will reduce the overhead of needing to use fields with a type, such as `[]string`, in API calls. The 1.x SDK's pattern of using pointer types for all slice and map elements was a significant pain point for users, requiring them to convert between the types. The 2.0 SDK does away with the pointer types for slices and maps, using value types instead. - -The following example shows how value types for the Amazon Simple Queue Service AddPermission API's `AWSAccountIds` and `Actions` member slices are set. - -```go -svc := sqs.New(cfg) - -svc.AddPermission(&sqs.AddPermissionInput{ - AWSAcountIds: []string{ - "123456789", - }, - Actions: []string{ - "SendMessage", - }, - - Label: aws.String("MessageSender"), - QueueUrl: aws.String(queueURL) -}) -``` - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG_PENDING.md b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG_PENDING.md deleted file mode 100644 index 8a1927a39ca5..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG_PENDING.md +++ /dev/null @@ -1,5 +0,0 @@ -### SDK Features - -### SDK Enhancements - -### SDK Bugs diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md deleted file mode 100644 index 3b64466870c9..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md deleted file mode 100644 index 6f422a95edbb..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md +++ /dev/null @@ -1,127 +0,0 @@ -Contributing to the AWS SDK for Go - -We work hard to provide a high-quality and useful SDK, and we greatly value -feedback and contributions from our community. Whether it's a bug report, -new feature, correction, or additional documentation, we welcome your issues -and pull requests. Please read through this document before submitting any -issues or pull requests to ensure we have all the necessary information to -effectively respond to your bug report or contribution. - - -## Filing Bug Reports - -You can file bug reports against the SDK on the [GitHub issues][issues] page. - -If you are filing a report for a bug or regression in the SDK, it's extremely -helpful to provide as much information as possible when opening the original -issue. This helps us reproduce and investigate the possible bug without having -to wait for this extra information to be provided. Please read the following -guidelines prior to filing a bug report. - -1. Search through existing [issues][] to ensure that your specific issue has - not yet been reported. If it is a common issue, it is likely there is - already a bug report for your problem. - -2. Ensure that you have tested the latest version of the SDK. Although you - may have an issue against an older version of the SDK, we cannot provide - bug fixes for old versions. It's also possible that the bug may have been - fixed in the latest release. - -3. Provide as much information about your environment, SDK version, and - relevant dependencies as possible. For example, let us know what version - of Go you are using, which and version of the operating system, and the - the environment your code is running in. e.g Container. - -4. Provide a minimal test case that reproduces your issue or any error - information you related to your problem. We can provide feedback much - more quickly if we know what operations you are calling in the SDK. If - you cannot provide a full test case, provide as much code as you can - to help us diagnose the problem. Any relevant information should be provided - as well, like whether this is a persistent issue, or if it only occurs - some of the time. - - -## Submitting Pull Requests - -We are always happy to receive code and documentation contributions to the SDK. -Please be aware of the following notes prior to opening a pull request: - -1. The SDK is released under the [Apache license][license]. Any code you submit - will be released under that license. For substantial contributions, we may - ask you to sign a [Contributor License Agreement (CLA)][cla]. - -2. If you would like to implement support for a significant feature that is not - yet available in the SDK, please talk to us beforehand to avoid any - duplication of effort. - -3. Wherever possible, pull requests should contain tests as appropriate. - Bugfixes should contain tests that exercise the corrected behavior (i.e., the - test should fail without the bugfix and pass with it), and new features - should be accompanied by tests exercising the feature. - -4. Pull requests that contain failing tests will not be merged until the test - failures are addressed. Pull requests that cause a significant drop in the - SDK's test coverage percentage are unlikely to be merged until tests have - been added. - -5. The JSON files under the SDK's `models` folder are sourced from outside the SDK. - Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests - directly on these models. If you discover an issue with the models please - create a [GitHub issue][issues] describing the issue. - -### Testing - -To run the tests locally, running the `make unit` command will `go get` the -SDK's testing dependencies, and run vet, link and unit tests for the SDK. - -``` -make unit -``` - -Standard go testing functionality is supported as well. To test SDK code that -is tagged with `codegen` you'll need to set the build tag in the go test -command. The `make unit` command will do this automatically. - -``` -go test -tags codegen ./private/... -``` - -See the `Makefile` for additional testing tags that can be used in testing. - -To test on multiple platform the SDK includes several DockerFiles under the -`awstesting/sandbox` folder, and associated make recipes to to execute -unit testing within environments configured for specific Go versions. - -``` -make sandbox-test-go18 -``` - -To run all sandbox environments use the following make recipe - -``` -# Optionally update the Go tip that will be used during the batch testing -make update-aws-golang-tip - -# Run all SDK tests for supported Go versions in sandboxes -make sandbox-test -``` - -In addition the sandbox environment include make recipes for interactive modes -so you can run command within the Docker container and context of the SDK. - -``` -make sandbox-go18 -``` - -### Changelog - -You can see all release changes in the `CHANGELOG.md` file at the root of the -repository. The release notes added to this file will contain service client -updates, and major SDK changes. - -[issues]: https://github.com/aws/aws-sdk-go/issues -[pr]: https://github.com/aws/aws-sdk-go/pulls -[license]: http://aws.amazon.com/apache2.0/ -[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement -[releasenotes]: https://github.com/aws/aws-sdk-go/releases - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/Gopkg.lock b/vendor/github.com/aws/aws-sdk-go-v2/Gopkg.lock deleted file mode 100644 index 81273b925520..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/Gopkg.lock +++ /dev/null @@ -1,16 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:13fe471d0ed891e8544eddfeeb0471fd3c9f2015609a1c000aefdedf52a19d40" - name = "github.com/jmespath/go-jmespath" - packages = ["."] - pruneopts = "" - revision = "c2b33e84" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = ["github.com/jmespath/go-jmespath"] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/Gopkg.toml b/vendor/github.com/aws/aws-sdk-go-v2/Gopkg.toml deleted file mode 100644 index 60688e2bd988..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/Gopkg.toml +++ /dev/null @@ -1,43 +0,0 @@ - -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" - -ignored = [ - # Testing/Example/Codegen dependencies - "github.com/stretchr/testify", - "github.com/stretchr/testify/assert", - "github.com/stretchr/testify/require", - "github.com/go-sql-driver/mysql", - "github.com/gucumber/gucumber", - "github.com/pkg/errors", - "golang.org/x/net", - "golang.org/x/net/html", - "golang.org/x/net/http2", - "golang.org/x/text", - "golang.org/x/text/html", - "golang.org/x/tools", - "golang.org/x/tools/go/loader", -] - -[[constraint]] - name = "github.com/jmespath/go-jmespath" - revision = "c2b33e84" - #version = "0.2.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/Makefile b/vendor/github.com/aws/aws-sdk-go-v2/Makefile deleted file mode 100644 index bdbb139c36aa..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/Makefile +++ /dev/null @@ -1,201 +0,0 @@ -LINTIGNOREDOT='internal/awstesting/integration.+should not use dot imports' -LINTIGNOREDOC='service/[^/]+/(api|service|waiters)\.go:.+(comment on exported|should have comment or be unexported)' -LINTIGNORECONST='service/[^/]+/(api|service|waiters)\.go:.+(type|struct field|const|func) ([^ ]+) should be ([^ ]+)' -LINTIGNORESTUTTER='service/[^/]+/(api|service)\.go:.+(and that stutters)' -LINTIGNOREINFLECT='service/[^/]+/(api|errors|service)\.go:.+(method|const) .+ should be ' -LINTIGNOREINFLECTS3UPLOAD='service/s3/s3manager/upload\.go:.+struct field SSEKMSKeyId should be ' -LINTIGNOREDEPS='vendor/.+\.go' -LINTIGNOREPKGCOMMENT='service/[^/]+/doc_custom.go:.+package comment should be of the form' -LINTIGNOREENDPOINTS='aws/endpoints/defaults.go:.+(method|const) .+ should be ' -UNIT_TEST_TAGS="example codegen awsinclude" - -# SDK's Core and client packages that are compatable with Go 1.9+. -SDK_CORE_PKGS=./aws/... ./private/... ./internal/... -SDK_CLIENT_PKGS=./service/... -SDK_COMPA_PKGS=${SDK_CORE_PKGS} ${SDK_CLIENT_PKGS} - -# SDK additional packages that are used for development of the SDK. -SDK_EXAMPLES_PKGS=./example/... -SDK_MODELS_PKGS=./models/... -SDK_ALL_PKGS=${SDK_COMPA_PKGS} ${SDK_EXAMPLES_PKGS} ${SDK_MODELS_PKGS} - -SDK_V1_USAGE=$(shell go list -f '''{{ if not .Standard }}{{ range $$_, $$name := .Imports }} * {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ end }}''' ./... | sort -u | grep '''/aws-sdk-go/''') - -all: generate unit - -################### -# Code Generation # -################### -generate: cleanup-models gen-test gen-endpoints gen-services gen-tools - -gen-test: gen-protocol-test -#gen-test: gen-protocol-test gen-codegen-test - -#gen-codegen-test: -# @echo "Generating SDK API tests" -# go generate ./private/model/api/codegentest/service - -gen-services: - @echo "Generating SDK clients" - go generate ./service - -gen-protocol-test: - @echo "Generating SDK protocol tests" - go generate ./private/protocol/... - -gen-endpoints: - @echo "Generating SDK endpoints" - go generate ./models/endpoints - -gen-tools: - go generate ./internal/awstesting/cmd/op_crawler/ - -cleanup-models: - @echo "Cleaning up stale model versions" - @./cleanup_models.sh - -################### -# Unit/CI Testing # -################### -unit: verify - @echo "go test SDK and vendor packages" - @go test -tags ${UNIT_TEST_TAGS} ${SDK_ALL_PKGS} - -unit-with-race-cover: verify - @echo "go test SDK and vendor packages" - @go test -tags ${UNIT_TEST_TAGS} -race -cpu=1,2,4 ${SDK_ALL_PKGS} - -ci-test: generate unit-with-race-cover ci-test-generate-validate - -ci-test-generate-validate: - @echo "CI test validate no generated code changes" - git update-index --assume-unchanged go.mod go.sum - git add . -A - gitstatus=`git diff --cached --ignore-space-change`; \ - git update-index --no-assume-unchanged go.mod go.sum - echo "$$gitstatus"; \ - if [ "$$gitstatus" != "" ]; then echo "$$gitstatus"; exit 1; fi - -####################### -# Integration Testing # -####################### -integration: core-integ client-integ - -core-integ: - @echo "Integration Testing SDK core" - AWS_REGION="" go test -count=1 -tags "integration" -v -run '^TestInteg_' ${SDK_CORE_PKGS} - -client-integ: - @echo "Integration Testing SDK clients" - AWS_REGION="" go test -count=1 -tags "integration" -v -run '^TestInteg_' ./service/... - -s3crypto-integ: - @echo "Integration Testing S3 Cyrpto utility" - AWS_REGION="" go test -count=1 -tags "s3crypto_integ integration" -v -run '^TestInteg_' ./service/s3/s3crypto - -cleanup-integ-buckets: - @echo "Cleaning up SDK integraiton resources" - go run -tags "integration" ./internal/awstesting/cmd/bucket_cleanup/main.go "aws-sdk-go-integration" - -################### -# Sandbox Testing # -################### -sandbox-tests: sandbox-test-go1.9 sandbox-test-go1.10 sandbox-test-go1.11 sandbox-test-go1.12 sandbox-test-gotip - -sandbox-build-go1.9: - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.9 -t "aws-sdk-go-1.9" . -sandbox-go1.9: sandbox-build-go1.9 - docker run -i -t aws-sdk-go-1.9 bash -sandbox-test-go1.9: sandbox-build-go1.9 - docker run -t aws-sdk-go-1.9 - -sandbox-build-go1.10: - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.10 -t "aws-sdk-go-1.10" . -sandbox-go1.10: sandbox-build-go1.10 - docker run -i -t aws-sdk-go-1.10 bash -sandbox-test-go1.10: sandbox-build-go1.10 - docker run -t aws-sdk-go-1.10 - -sandbox-build-go1.11: - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.11 -t "aws-sdk-go-1.11" . -sandbox-go1.11: sandbox-build-go1.11 - docker run -i -t aws-sdk-go-1.11 bash -sandbox-test-go1.11: sandbox-build-go1.11 - docker run -t aws-sdk-go-1.11 - -sandbox-build-go1.12: - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.12 -t "aws-sdk-go-1.12" . -sandbox-go1.12: sandbox-build-go1.12 - docker run -i -t aws-sdk-go-1.12 bash -sandbox-test-go1.12: sandbox-build-go1.12 - docker run -t aws-sdk-go-1.12 - -sandbox-build-gotip: - @echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container" - docker build -f ./internal/awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-tip" . -sandbox-gotip: sandbox-build-gotip - docker run -i -t aws-sdk-go-tip bash -sandbox-test-gotip: sandbox-build-gotip - docker run -t aws-sdk-go-tip - -update-aws-golang-tip: - docker build --no-cache=true -f ./internal/awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" . - -################## -# Linting/Verify # -################## -verify: lint vet sdkv1check - -lint: - @echo "go lint SDK and vendor packages" - @lint=`golint ./...`; \ - dolint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD} -e ${LINTIGNOREPKGCOMMENT} -e ${LINTIGNOREENDPOINTS}`; \ - echo "$$dolint"; \ - if [ "$$dolint" != "" ]; then exit 1; fi - -vet: - go vet -tags "example codegen awsinclude integration" --all ${SDK_ALL_PKGS} - -sdkv1check: - @echo "Checking for usage of AWS SDK for Go v1" - @if [ ! -z "${SDK_V1_USAGE}" ]; then echo "Using of V1 SDK packages"; echo "${SDK_V1_USAGE}"; exit 1; fi - -################ -# Dependencies # -################ -get-deps: get-deps-tests get-deps-x-tests get-deps-codegen get-deps-verify - go get github.com/jmespath/go-jmespath - -get-deps-tests: - @echo "go get SDK testing dependencies" - go get github.com/stretchr/testify - go get golang.org/x/net/html - -get-deps-x-tests: - @echo "go get SDK testing golang.org/x dependencies" - go get golang.org/x/net/http2 - -get-deps-codegen: get-deps-x-tests - @echo "go get SDK codegen dependencies" - go get golang.org/x/net/html - -get-deps-verify: - @echo "go get SDK verification utilities" - go get golang.org/x/lint/golint - -############## -# Benchmarks # -############## -bench: - @echo "go bench SDK packages" - @go test -run NONE -bench . -benchmem -tags 'bench' ${SDK_ALL_PKGS} - -bench-protocol: - @echo "go bench SDK protocol marshallers" - @go test -run NONE -bench . -benchmem -tags 'bench' ./private/protocol/... - -############# -# Utilities # -############# -api_info: - @go run private/model/cli/api-info/api-info.go diff --git a/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt new file mode 100644 index 000000000000..5f14d1162ed4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt @@ -0,0 +1,3 @@ +AWS SDK for Go +Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2014-2015 Stripe, Inc. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/README.md b/vendor/github.com/aws/aws-sdk-go-v2/README.md deleted file mode 100644 index ff1256c1ae86..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/README.md +++ /dev/null @@ -1,92 +0,0 @@ -![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiNmlHN1RaaXBIc3RmZzFCYjgydENqSENIaTZJazF0QTBWUkxhR2JoWnZLdG9BdU9nblpXbDk5S2xoYUhRcWl5dERFVklaMDRrUy9rY3l4cmJTRzJnNHJZPSIsIml2UGFyYW1ldGVyU3BlYyI6Inc4bW5GZzZNN1MreGl1Y3giLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master) [![Documentation](https://godoc.org/github.com/aws/aws-sdk-go-v2?status.svg)](https://godoc.org/github.com/aws/aws-sdk-go-v2) - -# AWS SDK for Go v2 - -aws-sdk-go-v2 is the Developer Preview for the v2 of the AWS SDK for the Go programming language. - -Check out the [Issues] and [Projects] for design and updates being made to the SDK. The v2 SDK requires a minimum version of Go 1.9. - -We'll be expanding out the [Issues] and [Projects] sections with additional changes to the SDK based on your feedback, and SDK's core's improvements. Check the the SDK's [CHANGE_LOG] for information about the latest updates to the SDK. - -## Getting started - -The best way to get started working with the SDK is to use `go get` to add the SDK to your Go Workspace or application using Go modules. - -```sh -go get github.com/aws/aws-sdk-go-v2 -``` - -Without Go Modules, or in a GOPATH with Go 1.11 or 1.12 use the `/...` suffix on the `go get` to retrieve all of the SDK's depdnencies. - -```sh -go get github.com/aws/aws-sdk-go-v2/... -``` - -### Hello AWS - -This example shows how you can use the v2 SDK to make an API request using the SDK's [Amazon DynamoDB] client. - -```go -package main - -import ( - "fmt" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/endpoints" - "github.com/aws/aws-sdk-go-v2/aws/external" - "github.com/aws/aws-sdk-go-v2/service/dynamodb" -) - -func main() { - // Using the SDK's default configuration, loading additional config - // and credentials values from the environment variables, shared - // credentials, and shared configuration files - cfg, err := external.LoadDefaultAWSConfig() - if err != nil { - panic("unable to load SDK config, " + err.Error()) - } - - // Set the AWS Region that the service clients should use - cfg.Region = endpoints.UsWest2RegionID - - // Using the Config value, create the DynamoDB client - svc := dynamodb.New(cfg) - - // Build the request with its input parameters - req := svc.DescribeTableRequest(&dynamodb.DescribeTableInput{ - TableName: aws.String("myTable"), - }) - - // Send the request, and get the response or error back - resp, err := req.Send() - if err != nil { - panic("failed to describe table, "+err.Error()) - } - - fmt.Println("Response", resp) -} -``` - -## Feedback and contributing - -The v2 SDK will use GitHub [Issues] to track feature requests and issues with the SDK. In addition, we'll use GitHub [Projects] to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways. - -**GitHub issues**. To provide feedback or report bugs, file GitHub [Issues] on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch. - -**Gitter channel**. For more informal discussions or general feedback, check out our [Gitter channel] for the SDK. The [Gitter channel] is also a great place to ask general questions, and find help to get started with the 2.0 SDK Developer Preview. - -**Contributing**. You can open pull requests for fixes or additions to the AWS SDK for Go 2.0 Developer Preview release. All pull requests must be submitted under the Apache 2.0 license and will be reviewed by an SDK team member before being merged in. Accompanying unit tests, where possible, are appreciated. - -## License - -This SDK is distributed under the -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), -see LICENSE.txt and NOTICE.txt for more information. - -[Dep]: https://github.com/golang/dep -[Issues]: https://github.com/aws/aws-sdk-go-v2/issues -[Projects]: https://github.com/aws/aws-sdk-go-v2/projects -[CHANGE_LOG]: https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md -[Amazon DynamoDB]: https://aws.amazon.com/dynamodb/ -[Gitter channel]: https://gitter.im/aws/aws-sdk-go-v2 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/client.go index d552c56c5faf..3a3266afdf95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/client.go @@ -8,7 +8,7 @@ import ( type Metadata struct { ServiceName string ServiceID string - EndpointsID string + EndpointsID string APIVersion string Endpoint string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ec2metadata/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ec2metadata/api_client.go index 011426974e7a..eb65fa779cc7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ec2metadata/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/ec2metadata/api_client.go @@ -40,7 +40,7 @@ func New(config aws.Config) *Client { aws.Metadata{ ServiceName: "EC2 Instance Metadata", ServiceID: "EC2InstanceMetadata", - EndpointsID: "ec2metadata", + EndpointsID: "ec2metadata", APIVersion: "latest", }, ), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go index 943174407a6b..ddbade68697d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go @@ -96,25 +96,25 @@ var ignoredHeaders = rules{ var requiredSignedHeaders = rules{ whitelist{ mapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, + "Cache-Control": struct{}{}, + "Content-Disposition": struct{}{}, + "Content-Encoding": struct{}{}, + "Content-Language": struct{}{}, + "Content-Md5": struct{}{}, + "Content-Type": struct{}{}, + "Expires": struct{}{}, + "If-Match": struct{}{}, + "If-Modified-Since": struct{}{}, + "If-None-Match": struct{}{}, + "If-Unmodified-Since": struct{}{}, + "Range": struct{}{}, + "X-Amz-Acl": struct{}{}, + "X-Amz-Copy-Source": struct{}{}, + "X-Amz-Copy-Source-If-Match": struct{}{}, + "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, + "X-Amz-Copy-Source-If-None-Match": struct{}{}, + "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, + "X-Amz-Copy-Source-Range": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/cleanup_models.sh b/vendor/github.com/aws/aws-sdk-go-v2/cleanup_models.sh deleted file mode 100755 index 72e239a66b2d..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/cleanup_models.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# Deletes all but the most current model version. -for v in $(ls ./models/apis | grep -v '.go' ); do - for vm in $(ls -r models/apis/$v/ | sed -n '1!p' ); do - echo "rm -r models/apis/$v/$vm" - rm -r models/apis/$v/$vm - done -done diff --git a/vendor/github.com/aws/aws-sdk-go-v2/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/doc.go deleted file mode 100644 index 8f1ff3aabd7e..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/doc.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Package sdk is the official AWS SDK v2 for the Go programming language. - -aws-sdk-go-v2 is the Developer Preview for the v2 of the AWS SDK for the Go -programming language. Look for additional documentation and examples to be -added. - -Getting started - -The best way to get started working with the SDK is to use `go get` to add the -SDK to your Go Workspace manually. - - go get github.com/aws/aws-sdk-go-v2 - -You could also use [Dep] to add the SDK to your application's dependencies. -Using [Dep] will simplify your update story and help your application keep -pinned to specific version of the SDK - - dep ensure --add github.com/aws/aws-sdk-go-v2 - -### Hello AWS - -This example shows how you can use the v2 SDK to make an API request using the -SDK's Amazon DynamoDB client. - - package main - - import ( - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/endpoints" - "github.com/aws/aws-sdk-go-v2/aws/external" - "github.com/aws/aws-sdk-go-v2/service/dynamodb" - ) - - func main() { - // Using the SDK's default configuration, loading additional config - // and credentials values from the environment variables, shared - // credentials, and shared configuration files - cfg, err := external.LoadDefaultAWSConfig() - if err != nil { - panic("unable to load SDK config, " + err.Error()) - } - - // Set the AWS Region that the service clients should use - cfg.Region = endpoints.UsWest2RegionID - - // Using the Config value, create the DynamoDB client - svc := dynamodb.New(cfg) - - // Build the request with its input parameters - req := svc.DescribeTableRequest(&dynamodb.DescribeTableInput{ - TableName: aws.String("myTable"), - }) - - // Send the request, and get the response or error back - resp, err := req.Send() - if err != nil { - panic("failed to describe table, "+err.Error()) - } - - fmt.Println("Response", resp) - } - -*/ -package sdk diff --git a/vendor/github.com/aws/aws-sdk-go-v2/go.mod b/vendor/github.com/aws/aws-sdk-go-v2/go.mod deleted file mode 100644 index 43587db59bfb..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/go.mod +++ /dev/null @@ -1,12 +0,0 @@ -module github.com/aws/aws-sdk-go-v2 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-sql-driver/mysql v1.4.0 - github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af - github.com/pkg/errors v0.8.0 - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.2.2 - golang.org/x/net v0.0.0-20181201002055-351d144fa1fc - google.golang.org/appengine v1.2.0 // indirect -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/go.sum b/vendor/github.com/aws/aws-sdk-go-v2/go.sum deleted file mode 100644 index 44eb8879c4c6..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/go.sum +++ /dev/null @@ -1,19 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/iamiface/interface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/iamiface/interface.go deleted file mode 100644 index 9e569920c7e3..000000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/iamiface/interface.go +++ /dev/null @@ -1,352 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package iamiface provides an interface to enable mocking the AWS Identity and Access Management service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package iamiface - -import ( - "context" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/iam" -) - -// ClientAPI provides an interface to enable mocking the -// iam.Client methods. This make unit testing your code that -// calls out to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // IAM. -// func myFunc(svc iamiface.ClientAPI) bool { -// // Make svc.AddClientIDToOpenIDConnectProvider request -// } -// -// func main() { -// cfg, err := external.LoadDefaultAWSConfig() -// if err != nil { -// panic("failed to load config, " + err.Error()) -// } -// -// svc := iam.New(cfg) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockClientClient struct { -// iamiface.ClientPI -// } -// func (m *mockClientClient) AddClientIDToOpenIDConnectProvider(input *iam.AddClientIDToOpenIDConnectProviderInput) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockClientClient{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type ClientAPI interface { - AddClientIDToOpenIDConnectProviderRequest(*iam.AddClientIDToOpenIDConnectProviderInput) iam.AddClientIDToOpenIDConnectProviderRequest - - AddRoleToInstanceProfileRequest(*iam.AddRoleToInstanceProfileInput) iam.AddRoleToInstanceProfileRequest - - AddUserToGroupRequest(*iam.AddUserToGroupInput) iam.AddUserToGroupRequest - - AttachGroupPolicyRequest(*iam.AttachGroupPolicyInput) iam.AttachGroupPolicyRequest - - AttachRolePolicyRequest(*iam.AttachRolePolicyInput) iam.AttachRolePolicyRequest - - AttachUserPolicyRequest(*iam.AttachUserPolicyInput) iam.AttachUserPolicyRequest - - ChangePasswordRequest(*iam.ChangePasswordInput) iam.ChangePasswordRequest - - CreateAccessKeyRequest(*iam.CreateAccessKeyInput) iam.CreateAccessKeyRequest - - CreateAccountAliasRequest(*iam.CreateAccountAliasInput) iam.CreateAccountAliasRequest - - CreateGroupRequest(*iam.CreateGroupInput) iam.CreateGroupRequest - - CreateInstanceProfileRequest(*iam.CreateInstanceProfileInput) iam.CreateInstanceProfileRequest - - CreateLoginProfileRequest(*iam.CreateLoginProfileInput) iam.CreateLoginProfileRequest - - CreateOpenIDConnectProviderRequest(*iam.CreateOpenIDConnectProviderInput) iam.CreateOpenIDConnectProviderRequest - - CreatePolicyRequest(*iam.CreatePolicyInput) iam.CreatePolicyRequest - - CreatePolicyVersionRequest(*iam.CreatePolicyVersionInput) iam.CreatePolicyVersionRequest - - CreateRoleRequest(*iam.CreateRoleInput) iam.CreateRoleRequest - - CreateSAMLProviderRequest(*iam.CreateSAMLProviderInput) iam.CreateSAMLProviderRequest - - CreateServiceLinkedRoleRequest(*iam.CreateServiceLinkedRoleInput) iam.CreateServiceLinkedRoleRequest - - CreateServiceSpecificCredentialRequest(*iam.CreateServiceSpecificCredentialInput) iam.CreateServiceSpecificCredentialRequest - - CreateUserRequest(*iam.CreateUserInput) iam.CreateUserRequest - - CreateVirtualMFADeviceRequest(*iam.CreateVirtualMFADeviceInput) iam.CreateVirtualMFADeviceRequest - - DeactivateMFADeviceRequest(*iam.DeactivateMFADeviceInput) iam.DeactivateMFADeviceRequest - - DeleteAccessKeyRequest(*iam.DeleteAccessKeyInput) iam.DeleteAccessKeyRequest - - DeleteAccountAliasRequest(*iam.DeleteAccountAliasInput) iam.DeleteAccountAliasRequest - - DeleteAccountPasswordPolicyRequest(*iam.DeleteAccountPasswordPolicyInput) iam.DeleteAccountPasswordPolicyRequest - - DeleteGroupRequest(*iam.DeleteGroupInput) iam.DeleteGroupRequest - - DeleteGroupPolicyRequest(*iam.DeleteGroupPolicyInput) iam.DeleteGroupPolicyRequest - - DeleteInstanceProfileRequest(*iam.DeleteInstanceProfileInput) iam.DeleteInstanceProfileRequest - - DeleteLoginProfileRequest(*iam.DeleteLoginProfileInput) iam.DeleteLoginProfileRequest - - DeleteOpenIDConnectProviderRequest(*iam.DeleteOpenIDConnectProviderInput) iam.DeleteOpenIDConnectProviderRequest - - DeletePolicyRequest(*iam.DeletePolicyInput) iam.DeletePolicyRequest - - DeletePolicyVersionRequest(*iam.DeletePolicyVersionInput) iam.DeletePolicyVersionRequest - - DeleteRoleRequest(*iam.DeleteRoleInput) iam.DeleteRoleRequest - - DeleteRolePermissionsBoundaryRequest(*iam.DeleteRolePermissionsBoundaryInput) iam.DeleteRolePermissionsBoundaryRequest - - DeleteRolePolicyRequest(*iam.DeleteRolePolicyInput) iam.DeleteRolePolicyRequest - - DeleteSAMLProviderRequest(*iam.DeleteSAMLProviderInput) iam.DeleteSAMLProviderRequest - - DeleteSSHPublicKeyRequest(*iam.DeleteSSHPublicKeyInput) iam.DeleteSSHPublicKeyRequest - - DeleteServerCertificateRequest(*iam.DeleteServerCertificateInput) iam.DeleteServerCertificateRequest - - DeleteServiceLinkedRoleRequest(*iam.DeleteServiceLinkedRoleInput) iam.DeleteServiceLinkedRoleRequest - - DeleteServiceSpecificCredentialRequest(*iam.DeleteServiceSpecificCredentialInput) iam.DeleteServiceSpecificCredentialRequest - - DeleteSigningCertificateRequest(*iam.DeleteSigningCertificateInput) iam.DeleteSigningCertificateRequest - - DeleteUserRequest(*iam.DeleteUserInput) iam.DeleteUserRequest - - DeleteUserPermissionsBoundaryRequest(*iam.DeleteUserPermissionsBoundaryInput) iam.DeleteUserPermissionsBoundaryRequest - - DeleteUserPolicyRequest(*iam.DeleteUserPolicyInput) iam.DeleteUserPolicyRequest - - DeleteVirtualMFADeviceRequest(*iam.DeleteVirtualMFADeviceInput) iam.DeleteVirtualMFADeviceRequest - - DetachGroupPolicyRequest(*iam.DetachGroupPolicyInput) iam.DetachGroupPolicyRequest - - DetachRolePolicyRequest(*iam.DetachRolePolicyInput) iam.DetachRolePolicyRequest - - DetachUserPolicyRequest(*iam.DetachUserPolicyInput) iam.DetachUserPolicyRequest - - EnableMFADeviceRequest(*iam.EnableMFADeviceInput) iam.EnableMFADeviceRequest - - GenerateCredentialReportRequest(*iam.GenerateCredentialReportInput) iam.GenerateCredentialReportRequest - - GenerateServiceLastAccessedDetailsRequest(*iam.GenerateServiceLastAccessedDetailsInput) iam.GenerateServiceLastAccessedDetailsRequest - - GetAccessKeyLastUsedRequest(*iam.GetAccessKeyLastUsedInput) iam.GetAccessKeyLastUsedRequest - - GetAccountAuthorizationDetailsRequest(*iam.GetAccountAuthorizationDetailsInput) iam.GetAccountAuthorizationDetailsRequest - - GetAccountPasswordPolicyRequest(*iam.GetAccountPasswordPolicyInput) iam.GetAccountPasswordPolicyRequest - - GetAccountSummaryRequest(*iam.GetAccountSummaryInput) iam.GetAccountSummaryRequest - - GetContextKeysForCustomPolicyRequest(*iam.GetContextKeysForCustomPolicyInput) iam.GetContextKeysForCustomPolicyRequest - - GetContextKeysForPrincipalPolicyRequest(*iam.GetContextKeysForPrincipalPolicyInput) iam.GetContextKeysForPrincipalPolicyRequest - - GetCredentialReportRequest(*iam.GetCredentialReportInput) iam.GetCredentialReportRequest - - GetGroupRequest(*iam.GetGroupInput) iam.GetGroupRequest - - GetGroupPolicyRequest(*iam.GetGroupPolicyInput) iam.GetGroupPolicyRequest - - GetInstanceProfileRequest(*iam.GetInstanceProfileInput) iam.GetInstanceProfileRequest - - GetLoginProfileRequest(*iam.GetLoginProfileInput) iam.GetLoginProfileRequest - - GetOpenIDConnectProviderRequest(*iam.GetOpenIDConnectProviderInput) iam.GetOpenIDConnectProviderRequest - - GetPolicyRequest(*iam.GetPolicyInput) iam.GetPolicyRequest - - GetPolicyVersionRequest(*iam.GetPolicyVersionInput) iam.GetPolicyVersionRequest - - GetRoleRequest(*iam.GetRoleInput) iam.GetRoleRequest - - GetRolePolicyRequest(*iam.GetRolePolicyInput) iam.GetRolePolicyRequest - - GetSAMLProviderRequest(*iam.GetSAMLProviderInput) iam.GetSAMLProviderRequest - - GetSSHPublicKeyRequest(*iam.GetSSHPublicKeyInput) iam.GetSSHPublicKeyRequest - - GetServerCertificateRequest(*iam.GetServerCertificateInput) iam.GetServerCertificateRequest - - GetServiceLastAccessedDetailsRequest(*iam.GetServiceLastAccessedDetailsInput) iam.GetServiceLastAccessedDetailsRequest - - GetServiceLastAccessedDetailsWithEntitiesRequest(*iam.GetServiceLastAccessedDetailsWithEntitiesInput) iam.GetServiceLastAccessedDetailsWithEntitiesRequest - - GetServiceLinkedRoleDeletionStatusRequest(*iam.GetServiceLinkedRoleDeletionStatusInput) iam.GetServiceLinkedRoleDeletionStatusRequest - - GetUserRequest(*iam.GetUserInput) iam.GetUserRequest - - GetUserPolicyRequest(*iam.GetUserPolicyInput) iam.GetUserPolicyRequest - - ListAccessKeysRequest(*iam.ListAccessKeysInput) iam.ListAccessKeysRequest - - ListAccountAliasesRequest(*iam.ListAccountAliasesInput) iam.ListAccountAliasesRequest - - ListAttachedGroupPoliciesRequest(*iam.ListAttachedGroupPoliciesInput) iam.ListAttachedGroupPoliciesRequest - - ListAttachedRolePoliciesRequest(*iam.ListAttachedRolePoliciesInput) iam.ListAttachedRolePoliciesRequest - - ListAttachedUserPoliciesRequest(*iam.ListAttachedUserPoliciesInput) iam.ListAttachedUserPoliciesRequest - - ListEntitiesForPolicyRequest(*iam.ListEntitiesForPolicyInput) iam.ListEntitiesForPolicyRequest - - ListGroupPoliciesRequest(*iam.ListGroupPoliciesInput) iam.ListGroupPoliciesRequest - - ListGroupsRequest(*iam.ListGroupsInput) iam.ListGroupsRequest - - ListGroupsForUserRequest(*iam.ListGroupsForUserInput) iam.ListGroupsForUserRequest - - ListInstanceProfilesRequest(*iam.ListInstanceProfilesInput) iam.ListInstanceProfilesRequest - - ListInstanceProfilesForRoleRequest(*iam.ListInstanceProfilesForRoleInput) iam.ListInstanceProfilesForRoleRequest - - ListMFADevicesRequest(*iam.ListMFADevicesInput) iam.ListMFADevicesRequest - - ListOpenIDConnectProvidersRequest(*iam.ListOpenIDConnectProvidersInput) iam.ListOpenIDConnectProvidersRequest - - ListPoliciesRequest(*iam.ListPoliciesInput) iam.ListPoliciesRequest - - ListPoliciesGrantingServiceAccessRequest(*iam.ListPoliciesGrantingServiceAccessInput) iam.ListPoliciesGrantingServiceAccessRequest - - ListPolicyVersionsRequest(*iam.ListPolicyVersionsInput) iam.ListPolicyVersionsRequest - - ListRolePoliciesRequest(*iam.ListRolePoliciesInput) iam.ListRolePoliciesRequest - - ListRoleTagsRequest(*iam.ListRoleTagsInput) iam.ListRoleTagsRequest - - ListRolesRequest(*iam.ListRolesInput) iam.ListRolesRequest - - ListSAMLProvidersRequest(*iam.ListSAMLProvidersInput) iam.ListSAMLProvidersRequest - - ListSSHPublicKeysRequest(*iam.ListSSHPublicKeysInput) iam.ListSSHPublicKeysRequest - - ListServerCertificatesRequest(*iam.ListServerCertificatesInput) iam.ListServerCertificatesRequest - - ListServiceSpecificCredentialsRequest(*iam.ListServiceSpecificCredentialsInput) iam.ListServiceSpecificCredentialsRequest - - ListSigningCertificatesRequest(*iam.ListSigningCertificatesInput) iam.ListSigningCertificatesRequest - - ListUserPoliciesRequest(*iam.ListUserPoliciesInput) iam.ListUserPoliciesRequest - - ListUserTagsRequest(*iam.ListUserTagsInput) iam.ListUserTagsRequest - - ListUsersRequest(*iam.ListUsersInput) iam.ListUsersRequest - - ListVirtualMFADevicesRequest(*iam.ListVirtualMFADevicesInput) iam.ListVirtualMFADevicesRequest - - PutGroupPolicyRequest(*iam.PutGroupPolicyInput) iam.PutGroupPolicyRequest - - PutRolePermissionsBoundaryRequest(*iam.PutRolePermissionsBoundaryInput) iam.PutRolePermissionsBoundaryRequest - - PutRolePolicyRequest(*iam.PutRolePolicyInput) iam.PutRolePolicyRequest - - PutUserPermissionsBoundaryRequest(*iam.PutUserPermissionsBoundaryInput) iam.PutUserPermissionsBoundaryRequest - - PutUserPolicyRequest(*iam.PutUserPolicyInput) iam.PutUserPolicyRequest - - RemoveClientIDFromOpenIDConnectProviderRequest(*iam.RemoveClientIDFromOpenIDConnectProviderInput) iam.RemoveClientIDFromOpenIDConnectProviderRequest - - RemoveRoleFromInstanceProfileRequest(*iam.RemoveRoleFromInstanceProfileInput) iam.RemoveRoleFromInstanceProfileRequest - - RemoveUserFromGroupRequest(*iam.RemoveUserFromGroupInput) iam.RemoveUserFromGroupRequest - - ResetServiceSpecificCredentialRequest(*iam.ResetServiceSpecificCredentialInput) iam.ResetServiceSpecificCredentialRequest - - ResyncMFADeviceRequest(*iam.ResyncMFADeviceInput) iam.ResyncMFADeviceRequest - - SetDefaultPolicyVersionRequest(*iam.SetDefaultPolicyVersionInput) iam.SetDefaultPolicyVersionRequest - - SetSecurityTokenServicePreferencesRequest(*iam.SetSecurityTokenServicePreferencesInput) iam.SetSecurityTokenServicePreferencesRequest - - SimulateCustomPolicyRequest(*iam.SimulateCustomPolicyInput) iam.SimulateCustomPolicyRequest - - SimulatePrincipalPolicyRequest(*iam.SimulatePrincipalPolicyInput) iam.SimulatePrincipalPolicyRequest - - TagRoleRequest(*iam.TagRoleInput) iam.TagRoleRequest - - TagUserRequest(*iam.TagUserInput) iam.TagUserRequest - - UntagRoleRequest(*iam.UntagRoleInput) iam.UntagRoleRequest - - UntagUserRequest(*iam.UntagUserInput) iam.UntagUserRequest - - UpdateAccessKeyRequest(*iam.UpdateAccessKeyInput) iam.UpdateAccessKeyRequest - - UpdateAccountPasswordPolicyRequest(*iam.UpdateAccountPasswordPolicyInput) iam.UpdateAccountPasswordPolicyRequest - - UpdateAssumeRolePolicyRequest(*iam.UpdateAssumeRolePolicyInput) iam.UpdateAssumeRolePolicyRequest - - UpdateGroupRequest(*iam.UpdateGroupInput) iam.UpdateGroupRequest - - UpdateLoginProfileRequest(*iam.UpdateLoginProfileInput) iam.UpdateLoginProfileRequest - - UpdateOpenIDConnectProviderThumbprintRequest(*iam.UpdateOpenIDConnectProviderThumbprintInput) iam.UpdateOpenIDConnectProviderThumbprintRequest - - UpdateRoleRequest(*iam.UpdateRoleInput) iam.UpdateRoleRequest - - UpdateRoleDescriptionRequest(*iam.UpdateRoleDescriptionInput) iam.UpdateRoleDescriptionRequest - - UpdateSAMLProviderRequest(*iam.UpdateSAMLProviderInput) iam.UpdateSAMLProviderRequest - - UpdateSSHPublicKeyRequest(*iam.UpdateSSHPublicKeyInput) iam.UpdateSSHPublicKeyRequest - - UpdateServerCertificateRequest(*iam.UpdateServerCertificateInput) iam.UpdateServerCertificateRequest - - UpdateServiceSpecificCredentialRequest(*iam.UpdateServiceSpecificCredentialInput) iam.UpdateServiceSpecificCredentialRequest - - UpdateSigningCertificateRequest(*iam.UpdateSigningCertificateInput) iam.UpdateSigningCertificateRequest - - UpdateUserRequest(*iam.UpdateUserInput) iam.UpdateUserRequest - - UploadSSHPublicKeyRequest(*iam.UploadSSHPublicKeyInput) iam.UploadSSHPublicKeyRequest - - UploadServerCertificateRequest(*iam.UploadServerCertificateInput) iam.UploadServerCertificateRequest - - UploadSigningCertificateRequest(*iam.UploadSigningCertificateInput) iam.UploadSigningCertificateRequest - - WaitUntilInstanceProfileExists(context.Context, *iam.GetInstanceProfileInput, ...aws.WaiterOption) error - - WaitUntilPolicyExists(context.Context, *iam.GetPolicyInput, ...aws.WaiterOption) error - - WaitUntilRoleExists(context.Context, *iam.GetRoleInput, ...aws.WaiterOption) error - - WaitUntilUserExists(context.Context, *iam.GetUserInput, ...aws.WaiterOption) error -} - -var _ ClientAPI = (*iam.Client)(nil) diff --git a/vendor/github.com/awslabs/goformation/LICENSE b/vendor/github.com/awslabs/goformation/LICENSE deleted file mode 100644 index 8dada3edaf50..000000000000 --- a/vendor/github.com/awslabs/goformation/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. diff --git a/vendor/github.com/awslabs/goformation/v4/CHANGELOG.md b/vendor/github.com/awslabs/goformation/v4/CHANGELOG.md deleted file mode 100644 index 2457f431493c..000000000000 --- a/vendor/github.com/awslabs/goformation/v4/CHANGELOG.md +++ /dev/null @@ -1,236 +0,0 @@ -# GoFormation Versioning Changelog - -# [4.1.0](https://github.com/awslabs/goformation/compare/v4.0.3...v4.1.0) (2019-12-09) - - -### Features - -* **schema:** CloudFormation Updates (2019-12-09) ([#251](https://github.com/awslabs/goformation/issues/251)) ([a23ba41](https://github.com/awslabs/goformation/commit/a23ba416a24649c7296a0bc507c7940d9082ea30)) - -## [4.0.3](https://github.com/awslabs/goformation/compare/v4.0.2...v4.0.3) (2019-11-30) - - -### Bug Fixes - -* **schema:** AWS::Serverless::Function S3 notification filters ([#249](https://github.com/awslabs/goformation/issues/249)) ([a50ef92](https://github.com/awslabs/goformation/commit/a50ef9291026420ea8a5e74790fc49b8a9c7fd85)), closes [#74](https://github.com/awslabs/goformation/issues/74) - -## [4.0.2](https://github.com/awslabs/goformation/compare/v4.0.1...v4.0.2) (2019-11-30) - - -### Bug Fixes - -* **schema:** AWS::Serverless:Api.Cors ([#246](https://github.com/awslabs/goformation/issues/246)) ([62fd56a](https://github.com/awslabs/goformation/commit/62fd56a62586c65722f99dbd4c8308ab42fcfc1d)), closes [#244](https://github.com/awslabs/goformation/issues/244) - -## [4.0.1](https://github.com/awslabs/goformation/compare/v4.0.0...v4.0.1) (2019-11-30) - - -### Bug Fixes - -* **schema:** AWS::Serverless::Api.MethodSettings should be a list ([a1f340a](https://github.com/awslabs/goformation/commit/a1f340a07e0ba4f21b8655da2c4d608849278901)), closes [#242](https://github.com/awslabs/goformation/issues/242) - -# [4.0.0](https://github.com/awslabs/goformation/compare/v3.1.0...v4.0.0) (2019-11-30) - - -* Fix method conflicts (#245) ([d0b0a8b](https://github.com/awslabs/goformation/commit/d0b0a8bc322e27f72e840c9847f3c822d4efa933)), closes [#245](https://github.com/awslabs/goformation/issues/245) [#241](https://github.com/awslabs/goformation/issues/241) [#294](https://github.com/awslabs/goformation/issues/294) - - -### BREAKING CHANGES - -* This change refactors the DependsOn, Metadata, CreationPolicy, -UpdatePolicy and DeletionPolicy methods on each resource to a new -name. This is required, as some CloudFormation resources use these -keywords as properties (AWS::AppMesh::Route.GrpcRouteMatch has a -Metadata field for example), which causes a conflict. - -`resource.DependsOn()` method is refactored to `resource.AWSCloudFormationDependsOn` field. -`resource.SetDependsOn()` method is refactored to `resource.AWSCloudFormationDependsOn` field. -`resource.Metadata()` method is refactored to `resource.AWSCloudFormationMetadata` field. -`resource.SetMetadata()` method is refactored to `resource.AWSCloudFormationMetadata` field. -`resource.CreationPolicy()` method is refactored to `resource.AWSCloudFormationCreationPolicy` field. -`resource.SetCreationPolicy()` method is refactored to `resource.AWSCloudFormationCreationPolicy` field. -`resource.UpdatePolicy()` method is refactored to `resource.AWSCloudFormationUpdatePolicy` field. -`resource.SetUpdatePolicy()` method is refactored to `resource.AWSCloudFormationUpdatePolicy` field. -`resource.DeletionPolicy()` method is refactored to `resource.AWSCloudFormationDeletionPolicy` field. -`resource.SetDeletionPolicy()` method is refactored to `resource.AWSCloudFormationDeletionPolicy` field. - -# [3.1.0](https://github.com/awslabs/goformation/compare/v3.0.1...v3.1.0) (2019-10-29) - - -### Features - -* **schema:** AWS CloudFormation Update (2019-10-29) ([#239](https://github.com/awslabs/goformation/issues/239)) ([7ff8499](https://github.com/awslabs/goformation/commit/7ff84990c89e11815d22e06d377e110ae422cc17)) - -## [3.0.1](https://github.com/awslabs/goformation/compare/v3.0.0...v3.0.1) (2019-10-29) - - -### Bug Fixes - -* **schema:** Ordered cloudformation/all.go file ([#238](https://github.com/awslabs/goformation/issues/238)) ([91254f3](https://github.com/awslabs/goformation/commit/91254f30925b89db5e79604d812a1ee9279267bd)) - -# [3.0.0](https://github.com/awslabs/goformation/compare/v2.3.1...v3.0.0) (2019-10-27) - - -* Group CloudFormation resources by AWS service name (#234) ([d0749e6](https://github.com/awslabs/goformation/commit/d0749e6a8fc5e7b0ddc301aef0170e12c7dc459c)), closes [#234](https://github.com/awslabs/goformation/issues/234) - - -### BREAKING CHANGES - -* this change moves all Cloudformation resources to -packages based on the AWS service name. The main motivation for this is -that building goformation on some platforms (Windows) failed due to too -many files in the old cloudformation/resources package. This new package -style has a nice benefit of slightly nicer to use API, but is a breaking -change and will require refactoring existing codebases to update to v3. - -Old usage: - -```go -import "github.com/awslabs/goformation/v2/cloudformation/resources" - -... snip ... - -topic := &resources.AWSSNSTopic{} -``` - -New usage: - -```go -import "github.com/awslabs/goformation/v4/cloudformation/sns" - -...snip... - -topic := &sns.Topic{} -``` - -Most tests are still failing at this point and need refactoring. - -* fix(schema): Tag handling - -Fixed tag handling for new grouped resources style (via new tags.Tag -struct). - -* fix(schema): SAM specification - -SAM Specification now generates nicely with new grouped resources -format. Also all tests are now passing \o/ - -# [2.3.0](https://github.com/awslabs/goformation/compare/v2.2.2...v2.3.0) (2019-03-20) - - -### Bug Fixes - -* **parser:** Unmarshalling of resources with polymorphic properties (like S3 events) now works ([#188](https://github.com/awslabs/goformation/issues/188)) ([8eff90a](https://github.com/awslabs/goformation/commit/8eff90a)) - - -### Features - -* **sam:** Add support for `AWS::Serverless::Api.TracingEnabled`, `AWS::Serverless::Function.PermissionsBoundary`, `AWS::Serverless::Function.DynamoEvent.Enabled`, `AWS::Serverless::Function.KinesisEvent.Enabled`, and `AWS::Serverless::Function.SQSEvent.Enabled` ([#191](https://github.com/awslabs/goformation/issues/191)) ([38f0187](https://github.com/awslabs/goformation/commit/38f0187)) -* **schema:** AWS CloudFormation Update (2019-03-15) ([#189](https://github.com/awslabs/goformation/issues/189)) ([8b332a4](https://github.com/awslabs/goformation/commit/8b332a4)) - -## [2.2.2](https://github.com/awslabs/goformation/compare/v2.2.1...v2.2.2) (2019-03-13) - - -### Bug Fixes - -* **parser:** Select the correct AWS CloudFormation resource type based on similarity ([#183](https://github.com/awslabs/goformation/issues/183)) ([5749b23](https://github.com/awslabs/goformation/commit/5749b23)) - -## [2.2.1](https://github.com/awslabs/goformation/compare/v2.2.0...v2.2.1) (2019-03-10) - - -### Bug Fixes - -* **parser:** fix invalid YAML template error for custom tag marshaler ([#177](https://github.com/awslabs/goformation/issues/177)) ([035d438](https://github.com/awslabs/goformation/commit/035d438)) - -# [2.2.0](https://github.com/awslabs/goformation/compare/v2.1.5...v2.2.0) (2019-03-10) - - -### Features - -* **schema:** regenerated resources to apply SAM schema fixes from previous PR ([b30c019](https://github.com/awslabs/goformation/commit/b30c019)) - -## [2.1.5](https://github.com/awslabs/goformation/compare/v2.1.4...v2.1.5) (2019-03-10) - - -### Bug Fixes - -* **parser:** do not break if a non-intrinsic `Condition` statement is found in a YAML template ([#169](https://github.com/awslabs/goformation/issues/169)) ([e4671e3](https://github.com/awslabs/goformation/commit/e4671e3)) - -## [2.1.4](https://github.com/awslabs/goformation/compare/v2.1.3...v2.1.4) (2019-03-10) - - -### Bug Fixes - -* **schema:** fixed incorrect field type for AWS::Serverless::Application.Location ([#167](https://github.com/awslabs/goformation/issues/167)) ([3f1817b](https://github.com/awslabs/goformation/commit/3f1817b)) - -## [2.1.3](https://github.com/awslabs/goformation/compare/v2.1.2...v2.1.3) (2019-03-10) - - -### Bug Fixes - -* **schema:** maps within YAML templates should allow unknown fields/properties ([3b6e359](https://github.com/awslabs/goformation/commit/3b6e359)) - -## [2.1.2](https://github.com/awslabs/goformation/compare/v2.1.1...v2.1.2) (2019-03-10) - - -### Bug Fixes - -* **CI:** fix broken GitHub PR integration ([#185](https://github.com/awslabs/goformation/issues/185)) ([d42d00a](https://github.com/awslabs/goformation/commit/d42d00a)) - -## [2.1.1](https://github.com/awslabs/goformation/compare/v2.1.0...v2.1.1) (2019-03-10) - - -### Bug Fixes - -* **CI:** only run semantic-release on push-to-master (not on pull requests) ([#184](https://github.com/awslabs/goformation/issues/184)) ([c83945a](https://github.com/awslabs/goformation/commit/c83945a)) - -# [2.1.0](https://github.com/awslabs/goformation/compare/v2.0.0...v2.1.0) (2019-03-10) - - -### Features - -* **CI:** auto-generate AUTHORS.md file ([b37af7b](https://github.com/awslabs/goformation/commit/b37af7b)) - -# Semantic Versioning Changelog - -# [2.0.0](https://github.com/awslabs/goformation/compare/v1.4.1...v2.0.0) (2019-03-10) - - -### Code Refactoring - -* **generator:** moving resources and policies into their own packages ([#161](https://github.com/awslabs/goformation/issues/161)) ([03a0123](https://github.com/awslabs/goformation/commit/03a0123)) - - -### BREAKING CHANGES - -* **generator:** this PR refactors the auto-generated CloudFormation resources out of the cloudformation package and into a dedicated package (resources). This helps keep the auto generated files separate from others. - -E.g. cloudformation.AWSSnsTopic{} becomes resources.AWSSnsTopic{} - -## [1.4.1](https://github.com/awslabs/goformation/compare/v1.4.0...v1.4.1) (2019-03-10) - - -### Bug Fixes - -* **spec:** corrected AWS::Serverless::Api.Auth.Authorizers to be of type JSON rather than string ([#164](https://github.com/awslabs/goformation/issues/164)) ([4cf1bee](https://github.com/awslabs/goformation/commit/4cf1bee)) - -# [1.4.0](https://github.com/awslabs/goformation/compare/v1.3.0...v1.4.0) (2019-03-09) - - -### Features - -* **parser:** Default to parsing as YAML unless the filename ends in .json ([#176](https://github.com/awslabs/goformation/issues/176)) ([42e7146](https://github.com/awslabs/goformation/commit/42e7146)) - -# [1.3.0](https://github.com/awslabs/goformation/compare/v1.2.1...v1.3.0) (2019-03-09) - - -### Bug Fixes - -* **CI:** speed up PR builds by only downloading the cfn spec and regenerating resources on cron schedule (not on every build) ([7ae2a32](https://github.com/awslabs/goformation/commit/7ae2a32)) -* **CI:** Update TravisCI configuration based on https://github.com/se… ([#180](https://github.com/awslabs/goformation/issues/180)) ([88e1e85](https://github.com/awslabs/goformation/commit/88e1e85)) -* **CI:** Update TravisCI configuration for semantic-release to use jobs ([f6c2fee](https://github.com/awslabs/goformation/commit/f6c2fee)) - - -### Features - -* Added semantic-release CI setup ([a9b368a](https://github.com/awslabs/goformation/commit/a9b368a)) -* Added semantic-release configuration file ([3b25fdb](https://github.com/awslabs/goformation/commit/3b25fdb)) diff --git a/vendor/github.com/awslabs/goformation/v4/CODE_OF_CONDUCT.md b/vendor/github.com/awslabs/goformation/v4/CODE_OF_CONDUCT.md deleted file mode 100644 index a95bc6820b09..000000000000 --- a/vendor/github.com/awslabs/goformation/v4/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at goformation@amazon.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file diff --git a/vendor/github.com/awslabs/goformation/v4/CONTRIBUTING.md b/vendor/github.com/awslabs/goformation/v4/CONTRIBUTING.md deleted file mode 100644 index f26de0055224..000000000000 --- a/vendor/github.com/awslabs/goformation/v4/CONTRIBUTING.md +++ /dev/null @@ -1,204 +0,0 @@ -# Contributing to GoFormation - -✨ Thanks for contributing to **GoFormation**! ✨ - -As a contributor, here are the guidelines we would like you to follow: -- [Code of conduct](#code-of-conduct) -- [Submitting a Pull Request](#submitting-a-pull-request) -- [Coding rules](#coding-rules) - - [Source code](#source-code) - - [Commit message guidelines](#commit-message-guidelines) - - [Atomic commits](#atomic-commits) - - [Commit message format](#commit-message-format) - - [Revert](#revert) - - [Type](#type) - - [Subject](#subject) - - [Body](#body) - - [Footer](#footer) - - [Examples](#examples) -- [Working with the code](#working-with-the-code) - - [Set up the workspace](#set-up-the-workspace) - - [Tests](#tests) - - [Commits](#commits) - - [Generating AWS CloudFormation Resources](#generating-aws-cloudformation-resources) - -We also recommend that you read [How to Contribute to Open Source](https://opensource.guide/how-to-contribute). - -## Code of conduct - -Help us keep **GoFormation** open and inclusive. Please read and follow our [Code of conduct](CODE_OF_CONDUCT.md). - -## Submitting a Pull Request - -Good pull requests, whether patches, improvements, or new features, are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. - -**Please ask first** before embarking on any significant pull requests (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. - -If you have never created a pull request before, welcome 🎉 😄. [Here is a great tutorial](https://opensource.guide/how-to-contribute/#opening-a-pull-request) on how to send one :) - -Here is a summary of the steps to follow: - -1. [Set up the workspace](#set-up-the-workspace) -2. If you cloned a while ago, get the latest changes from upstream and update dependencies: -```bash -$ git checkout master -$ git pull upstream master -``` -3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: -```bash -$ git checkout -b -``` -4. Make your code changes, following the [Coding rules](#coding-rules) -5. Push your topic branch up to your fork: -```bash -$ git push origin -``` -6. [Open a Pull Request](https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request) with a clear title and description. - -**Tips**: -- For ambitious tasks, open a Pull Request as soon as possible with the `[WIP]` prefix in the title, in order to get feedback and help from the community. -- [Allow GoFormation maintainers to make changes to your Pull Request branch](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork). This way, we can rebase it and make some minor changes if necessary. - -## Coding rules - -### Source code - -To ensure consistency and quality throughout the source code, all code modifications must have: -- A [test](#tests) for every possible case introduced by your code change -- [Valid commit message(s)](#commit-message-guidelines) -- Documentation for new features -- Updated documentation for modified features - -### Commit message guidelines - -#### Atomic commits - -If possible, make [atomic commits](https://en.wikipedia.org/wiki/Atomic_commit), which means: -- a commit should contain exactly one self-contained functional change -- a functional change should be contained in exactly one commit -- a commit should not create an inconsistent state (such as test errors, linting errors, partial fix, feature with documentation etc...) - -A complex feature can be broken down into multiple commits as long as each one maintains a consistent state and consists of a self-contained change. - -#### Commit message format - -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: - -```commit -(): - - - -