diff --git a/.travis.yml b/.travis.yml index d636172b..a277df59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.10.x + - 1.11.x # set tag for helm chart env: diff --git a/Dockerfile b/Dockerfile index 26f177f2..8147d3c3 100755 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # docker container. The alpine build image has to match # the alpine image in the referencing runtime container. ######################################################### -FROM golang:1.10.1-alpine3.7 AS builder +FROM golang:1.11.2-alpine3.8 AS builder # We need so that dep can fetch it's dependencies # RUN apk --no-cache add git @@ -23,10 +23,10 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o /mai ######################################################## # Build the runtime container ######################################################## -FROM alpine:3.7 +FROM alpine:3.8 # required to use x.509 certs (HTTPS) -RUN apk update && apk add ca-certificates +RUN apk add --no-cache ca-certificates WORKDIR /app diff --git a/Gopkg.lock b/Gopkg.lock index 55c79522..af3406a8 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -3,7 +3,7 @@ [[projects]] branch = "master" - digest = "1:79aecab568f369420f3a82ada1590d1e7cd88e1be914cb6fcaab893c4a0bf9ae" + digest = "1:e6dbc3dcdc2dbbcef7c25467df4837d8b49f813fc4d96109e4db160ced5f50a4" name = "github.com/Peripli/service-broker-proxy" packages = [ "pkg/filter", @@ -15,10 +15,10 @@ "pkg/sm", ] pruneopts = "" - revision = "83b0c0c250c7df23be8a26b4f0f36b4f82fc220e" + revision = "d6006576ab7f742432a160173374050bdc4cd7a7" [[projects]] - digest = "1:678912e5044d198bb261ebb41f329a629a58cbf0c6684ec11059f43eada94644" + digest = "1:ab2f7dbbc44bce26412194ff5b39448aaa355bbe97a0b1114b484298065a0a96" name = "github.com/Peripli/service-manager" packages = [ "api", @@ -30,6 +30,8 @@ "api/info", "api/osb", "api/platform", + "api/service_offering", + "api/service_plan", "pkg/env", "pkg/health", "pkg/log", @@ -44,8 +46,8 @@ "storage", ] pruneopts = "" - revision = "04f873027c938d84832e90624f5ce0c14f5cdb7d" - version = "v0.1.1" + revision = "fc19aafe3cdbcb3d288cee9c7b83bfc2ed0208c4" + version = "v0.1.3" [[projects]] digest = "1:d8ee1b165eb7f4fd9ada718e1e7eeb0bc1fd462592d0bd823df694443f448681" @@ -70,14 +72,6 @@ revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" version = "v1.4.7" -[[projects]] - digest = "1:b13707423743d41665fd23f0c36b2f37bb49c30e94adb813319c44188a51ba22" - name = "github.com/ghodss/yaml" - packages = ["."] - pruneopts = "" - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - [[projects]] digest = "1:9ab1b1c637d7c8f49e39d8538a650d7eb2137b076790cff69d160823b505964c" name = "github.com/gobwas/glob" @@ -182,14 +176,14 @@ [[projects]] branch = "master" - digest = "1:009a1928b8c096338b68b5822d838a72b4d8520715c1463614476359f3282ec8" + digest = "1:5e345eb75d8bfb2b91cfbfe02a82a79c0b2ea55cf06c5a4d180a9321f36973b4" name = "github.com/gregjones/httpcache" packages = [ ".", "diskcache", ] pruneopts = "" - revision = "9cad4c3443a7200dd6400aef47183728de563a38" + revision = "c63ab54fda8f77302f8d414e19933f2b6026a089" [[projects]] digest = "1:8e3bd93036b4a925fe2250d3e4f38f21cadb8ef623561cd80c3c50c114b13201" @@ -308,7 +302,7 @@ revision = "c9849815bc7c2abf20d58e4bc06c242198ebb741" [[projects]] - digest = "1:a7fd918fb5bd2188436785c0424f8a50b4addfedf37a2b14d796be2a927b8007" + digest = "1:a754db3c70741eeaeba73ec4cd970dc8918d06ced993d24891e9c0386d74f588" name = "github.com/onsi/ginkgo" packages = [ ".", @@ -331,11 +325,11 @@ "types", ] pruneopts = "" - revision = "3774a09d95489ccaa16032e0770d08ea77ba6184" - version = "v1.6.0" + revision = "2e1be8f7d90e9d3e3e58b0ce470f2f14d075406f" + version = "v1.7.0" [[projects]] - digest = "1:3ecd0a37c4a90c12a97e31c398cdbc173824351aa891898ee178120bfe71c478" + digest = "1:c8f0c8c28c9c1c51db72d0e7f04797cfe5d0d50528274099b6b2d6c314db7f97" name = "github.com/onsi/gomega" packages = [ ".", @@ -352,8 +346,8 @@ "types", ] pruneopts = "" - revision = "7615b9433f86a8bdf29709bf288bc4fd0636a369" - version = "v1.4.2" + revision = "65fb64232476ad9046e57c26cd0bff3d3a8dc6cd" + version = "v1.4.3" [[projects]] digest = "1:894aef961c056b6d85d12bac890bf60c44e99b46292888bfa66caf529f804457" @@ -467,7 +461,7 @@ [[projects]] branch = "master" - digest = "1:78f41d38365ccef743e54ed854a2faf73313ba0750c621116a8eeb0395590bd0" + digest = "1:e8e4a203435ece7d6a119a9c2bd5078c401e94a4b93db3ca37ae0394ce77a919" name = "golang.org/x/crypto" packages = [ "ed25519", @@ -476,11 +470,11 @@ "ssh/terminal", ] pruneopts = "" - revision = "0c41d7ab0a0ee717d4590a44bcb987dfd9e183eb" + revision = "e657309f52e71501f9934566ac06dc5c2f7f11a1" [[projects]] branch = "master" - digest = "1:6543c75ddc1efc0041202dd49378ee2e5711b7cc82c2845c0437eef6276cc984" + digest = "1:4ac199b027ed34460ec4e0a92c882156f561e78cd046fef095e50f867462435a" name = "golang.org/x/net" packages = [ "context", @@ -494,29 +488,29 @@ "idna", ] pruneopts = "" - revision = "04a2e542c03f1d053ab3e4d6e5abcd4b66e2be8e" + revision = "adae6a3d119ae4890b46832a2e88a95adc62b8e7" [[projects]] branch = "master" - digest = "1:77478892c6d9d841c7997858d6287884c65b760000f29a25d7b1a6b6ada5f308" + digest = "1:76df884b1ac08579aff75a621a538800759808f000bb4a1b08c91b485bfb3522" name = "golang.org/x/oauth2" packages = [ ".", "internal", ] pruneopts = "" - revision = "9dcd33a902f40452422c2367fefcb95b54f9f8f8" + revision = "8f65e3013ebad444f13bc19536f7865efc793816" [[projects]] branch = "master" - digest = "1:03a1b1f2bfb0a6b2291c4161032429b1e8a1f23cc68530ad64358f8b493ead5f" + digest = "1:303c0ee48d6229a2423950f41b3ccb5a2067dc4c7b65f8863cfbd962bef05a85" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "" - revision = "8a28ead16f52c8aaeffbf79239b251dfdf6c4f96" + revision = "62eef0e2fa9b2c385f7b2778e763486da6880d37" [[projects]] digest = "1:5acd3512b047305d49e8763eef7ba423901e85d5dd2fd1e71778a0ea8de10bd4" @@ -555,14 +549,14 @@ [[projects]] branch = "master" - digest = "1:55a681cb66f28755765fa5fa5104cbd8dc85c55c02d206f9f89566451e3fe1aa" + digest = "1:14cb1d4240bcbbf1386ae763957e04e2765ec4e4ce7bb2769d05fa6faccd774e" name = "golang.org/x/time" packages = ["rate"] pruneopts = "" - revision = "fbb02b2291d28baffd63558aa44b4b56f178d650" + revision = "85acf8d2951cb2a3bde7632f9ff273ef0379bcbd" [[projects]] - digest = "1:8c432632a230496c35a15cfdf441436f04c90e724ad99c8463ef0c82bbe93edb" + digest = "1:77d3cff3a451d50be4b52db9c7766c0d8570ba47593f0c9dc72173adb208e788" name = "google.golang.org/appengine" packages = [ "internal", @@ -574,8 +568,8 @@ "urlfetch", ] pruneopts = "" - revision = "ae0ab99deb4dc413a2b4bd6c8bdd0eb67f1e4d06" - version = "v1.2.0" + revision = "4a4468ece617fc8205e99368fa2200e9d1fad421" + version = "v1.3.0" [[projects]] digest = "1:eb53021a8aa3f599d29c7102e65026242bdedce998a54837dc67f14b6a97c5fd" @@ -624,7 +618,7 @@ [[projects]] branch = "master" - digest = "1:3be9524394b78bc9b60cb1513b8a6882bc75cf8555d1fb4b38a380a461ea6b82" + digest = "1:0052286784b883f2e6c54e3a5cf38194abdef1c247f557b5b45f5104b231d319" name = "k8s.io/api" packages = [ "admissionregistration/v1alpha1", @@ -660,11 +654,11 @@ "storage/v1beta1", ] pruneopts = "" - revision = "843ad2d9b9ae703c74f2f43959e6ce0b24cc3185" + revision = "b7bd5f2d334ce968edc54f5fdb2ac67ce39c56d5" [[projects]] branch = "master" - digest = "1:8fb3dce56e8628b29f59012f88795004a3360f55b3bc59ff640e0f39075cbf01" + digest = "1:a3742497bd3110497e64b9f4b978bd3d5a325064eaf6d25e4274909daddc3a18" name = "k8s.io/apimachinery" packages = [ "pkg/api/errors", @@ -705,7 +699,7 @@ "third_party/forked/golang/reflect", ] pruneopts = "" - revision = "60666be32c5de527b69dabe8e4400b4f0aa897de" + revision = "195a1699ff5cb7fcf4584a4141316e96f39e0f5a" [[projects]] digest = "1:5d4153d12c3aed2c90a94262520d2498d5afa4d692554af55e65a7c5af0bc399" @@ -765,6 +759,22 @@ revision = "1638f8970cefaa404ff3a62950f88b08292b2696" version = "v9.0.0" +[[projects]] + digest = "1:4f5eb833037cc0ba0bf8fe9cae6be9df62c19dd1c869415275c708daa8ccfda5" + name = "k8s.io/klog" + packages = ["."] + pruneopts = "" + revision = "a5bc97fbc634d635061f3146511332c7e313a55a" + version = "v0.1.0" + +[[projects]] + digest = "1:321081b4a44256715f2b68411d8eda9a17f17ebfe6f0cc61d2cc52d11c08acfa" + name = "sigs.k8s.io/yaml" + packages = ["."] + pruneopts = "" + revision = "fd68e9863619f6ec2fdd8625fe1f02e7c877e480" + version = "v1.1.0" + [solve-meta] analyzer-name = "dep" analyzer-version = 1 diff --git a/VERSION b/VERSION deleted file mode 100644 index 8acdd82b..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.0.1 diff --git a/release-notes.md b/release-notes.md index f83cc325..2542755f 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,12 @@ # Service Broker Proxy K8S Release Notes +## v0.2.0 + +2018-11-27 + +* Use go 1.11 +* Update service-broker-proxy to support new Service Manager broker api. + ## v0.1.1 2018-10-23 diff --git a/vendor/github.com/Peripli/service-broker-proxy/.travis.yml b/vendor/github.com/Peripli/service-broker-proxy/.travis.yml index b9cc7faa..67aae7ef 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/.travis.yml +++ b/vendor/github.com/Peripli/service-broker-proxy/.travis.yml @@ -1,11 +1,11 @@ language: go go: - - 1.10.x + - 1.11.x before_install: - go get -u github.com/golang/dep/cmd/dep - - dep ensure + - make dep-vendor install: - go get github.com/alecthomas/gometalinter @@ -20,8 +20,8 @@ script: - gometalinter --vendor ./... # Execute tests and generate coverage for all the packages except fakes and tests - - go test ./... -coverpkg $(go list ./... | egrep -v "fakes|test" | paste -sd "," -) -coverprofile=profile.cov + - make test - goveralls -coverprofile profile.cov -service=travis-ci notifications: - slack: openservicebrokerapi:KQo2QAC6LXeEeXPOemOXja48 \ No newline at end of file + slack: openservicebrokerapi:KQo2QAC6LXeEeXPOemOXja48 diff --git a/vendor/github.com/Peripli/service-broker-proxy/Gopkg.lock b/vendor/github.com/Peripli/service-broker-proxy/Gopkg.lock index 6138bf0b..4ac05345 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/Gopkg.lock +++ b/vendor/github.com/Peripli/service-broker-proxy/Gopkg.lock @@ -2,7 +2,7 @@ [[projects]] - digest = "1:2249fe68d28c215f40e8496de1c856c7f7436c3a1ba66d100140ed590c97dca5" + digest = "1:db6d724f6d2dfc136c965f75fa7ffe3a496b617b711cf561b1cfa015476fbd7b" name = "github.com/Peripli/service-manager" packages = [ "api", @@ -14,6 +14,8 @@ "api/info", "api/osb", "api/platform", + "api/service_offering", + "api/service_plan", "cf", "config", "pkg/env", @@ -34,8 +36,8 @@ "test/common", ] pruneopts = "NT" - revision = "04f873027c938d84832e90624f5ce0c14f5cdb7d" - version = "v0.1.1" + revision = "fc19aafe3cdbcb3d288cee9c7b83bfc2ed0208c4" + version = "v0.1.3" [[projects]] digest = "1:2aff5edb9bccd2974090fddb17ca7ab05a3f5c983db567c30c7f0b53404f5783" @@ -228,7 +230,7 @@ [[projects]] branch = "master" - digest = "1:2d9070553bcb70bb6291792b445ed1572e63b9d6847238b0ff4bbe2697de0ffc" + digest = "1:3ef2729752327c194e0f1ea9a17833e92bc8eacc1b2300fca8a4ddd53931249d" name = "github.com/jmoiron/sqlx" packages = [ ".", @@ -236,10 +238,10 @@ "types", ] pruneopts = "UT" - revision = "3a411660be52b3236199fbfe1919f515cfc1ca32" + revision = "82935fac6c1a317907c8f43ed3f7f85ea844a78b" [[projects]] - digest = "1:cdbed6a7b574b13bbabcd8c36c5be56d6444789bab21fcd37d39655eab0b2141" + digest = "1:aaa8e0e7e35d92e21daed3f241832cee73d15ca1cd3302ba3843159a959a7eac" name = "github.com/klauspost/compress" packages = [ "flate", @@ -247,16 +249,16 @@ "zlib", ] pruneopts = "UT" - revision = "b939724e787a27c0005cabe3f78e7ed7987ac74f" - version = "v1.4.0" + revision = "30be6041bed523c18e269a700ebd9c2ea9328574" + version = "v1.4.1" [[projects]] - digest = "1:4ea0668d490ca32a38366453a486e2e8c60fbdaf1f2607c96b4a093d8a5c8de7" + digest = "1:2d643962fac133904694fffa959bc3c5dcfdcee38c6f5ffdd99a3c93eb9c835c" name = "github.com/klauspost/cpuid" packages = ["."] pruneopts = "UT" - revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da" - version = "v1.1" + revision = "e7e905edc00ea8827e58662220139109efea09db" + version = "v1.2.0" [[projects]] branch = "master" @@ -286,12 +288,12 @@ version = "v1.1.2" [[projects]] - branch = "master" digest = "1:7aefb397a53fc437c90f0fdb3e1419c751c5a3a165ced52325d5d797edf1aca6" name = "github.com/moul/http2curl" packages = ["."] pruneopts = "UT" revision = "9ac6cf4d929b2fa8fd2d2e6dec5bb0feb4f4911d" + version = "v1.0.0" [[projects]] branch = "master" @@ -302,7 +304,7 @@ revision = "c9849815bc7c2abf20d58e4bc06c242198ebb741" [[projects]] - digest = "1:f37a92358921891d53d5375ff7fa57739ba65d5b3c311d96a460609bfc1b4999" + digest = "1:9dd8858ae7fa91d2477ec05605b000d3c1ad65e3a1e36f9bf8f97a170c05ea05" name = "github.com/onsi/ginkgo" packages = [ ".", @@ -326,8 +328,8 @@ "types", ] pruneopts = "UT" - revision = "3774a09d95489ccaa16032e0770d08ea77ba6184" - version = "v1.6.0" + revision = "2e1be8f7d90e9d3e3e58b0ce470f2f14d075406f" + version = "v1.7.0" [[projects]] digest = "1:e42321c3ec0ff36c0644da60c2c1469886b214134286f4610199b704619e11a3" @@ -545,7 +547,7 @@ [[projects]] branch = "master" - digest = "1:8e241498e35f550e5192ee6b1f6ff2c0a7ffe81feff9541d297facffe1383979" + digest = "1:b06f45abbe7431aec373695c6cf9770a051fa4ac81ad31b3fa73ddf3bb76bb27" name = "golang.org/x/crypto" packages = [ "ed25519", @@ -554,11 +556,11 @@ "ssh/terminal", ] pruneopts = "UT" - revision = "0c41d7ab0a0ee717d4590a44bcb987dfd9e183eb" + revision = "e657309f52e71501f9934566ac06dc5c2f7f11a1" [[projects]] branch = "master" - digest = "1:a3b0de1029560a3a2d1f8f945b90f68b369d0138b9652a1cc41507025fbe5fdf" + digest = "1:01b27a69b969b2af666b9fcc5c74bfc20781204ba8305f7799b4ba69c5b84cf0" name = "golang.org/x/net" packages = [ "context", @@ -570,29 +572,29 @@ "publicsuffix", ] pruneopts = "UT" - revision = "04a2e542c03f1d053ab3e4d6e5abcd4b66e2be8e" + revision = "adae6a3d119ae4890b46832a2e88a95adc62b8e7" [[projects]] branch = "master" - digest = "1:1bce229fad01cbad9bd00e70ca32afff25ac2cea3dd710d50f88c967c1c3df65" + digest = "1:0142ef85bbc356750e329654ef29734ff05bd70ec9d8c1f46e39a3e97683318f" name = "golang.org/x/oauth2" packages = [ ".", "internal", ] pruneopts = "UT" - revision = "9dcd33a902f40452422c2367fefcb95b54f9f8f8" + revision = "8f65e3013ebad444f13bc19536f7865efc793816" [[projects]] branch = "master" - digest = "1:bececf436a23bf63181438c4ef4f7f47816b87ff879083d83ca1321f9001a354" + digest = "1:f343f077a5b0bc3a3788b3a04e24dd417e3e25b2acb529c413e212d2c42416ef" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "UT" - revision = "8f1d3d21f81be6e86ebcd6febee89c89bc50719f" + revision = "62eef0e2fa9b2c385f7b2778e763486da6880d37" [[projects]] digest = "1:436b24586f8fee329e0dd65fd67c817681420cda1d7f934345c13fe78c212a73" @@ -630,7 +632,7 @@ version = "v0.3.0" [[projects]] - digest = "1:6247f76e55a1e1a5c19a81e2d4b4dff6730461eeb5bbb0a16dd4a8ec8637ee93" + digest = "1:08206298775e5b462e6c0333f4471b44e63f1a70e42952b6ede4ecc9572281eb" name = "google.golang.org/appengine" packages = [ "internal", @@ -642,8 +644,8 @@ "urlfetch", ] pruneopts = "UT" - revision = "ae0ab99deb4dc413a2b4bd6c8bdd0eb67f1e4d06" - version = "v1.2.0" + revision = "4a4468ece617fc8205e99368fa2200e9d1fad421" + version = "v1.3.0" [[projects]] digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" @@ -687,12 +689,14 @@ analyzer-version = 1 input-imports = [ "github.com/Peripli/service-manager/api/filters", + "github.com/Peripli/service-manager/api/filters/authn/basic", "github.com/Peripli/service-manager/api/healthcheck", "github.com/Peripli/service-manager/api/osb", "github.com/Peripli/service-manager/pkg/env", "github.com/Peripli/service-manager/pkg/env/envfakes", "github.com/Peripli/service-manager/pkg/health", "github.com/Peripli/service-manager/pkg/log", + "github.com/Peripli/service-manager/pkg/security/filters", "github.com/Peripli/service-manager/pkg/server", "github.com/Peripli/service-manager/pkg/types", "github.com/Peripli/service-manager/pkg/util", @@ -705,7 +709,6 @@ "github.com/onsi/gomega", "github.com/onsi/gomega/ghttp", "github.com/pkg/errors", - "github.com/pmorie/go-open-service-broker-client/v2", "github.com/robfig/cron", "github.com/sirupsen/logrus", "github.com/spf13/cast", diff --git a/vendor/github.com/Peripli/service-broker-proxy/Gopkg.toml b/vendor/github.com/Peripli/service-broker-proxy/Gopkg.toml index f77e3a3f..6926446e 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/Gopkg.toml +++ b/vendor/github.com/Peripli/service-broker-proxy/Gopkg.toml @@ -23,7 +23,7 @@ [[constraint]] name = "github.com/onsi/ginkgo" - version = "1.4.0" + version = "1.7.0" [[constraint]] name = "github.com/pmorie/go-open-service-broker-client" @@ -43,9 +43,9 @@ [[constraint]] name = "github.com/Peripli/service-manager" - version = "v0.1.1" + version = "0.1.3" # Refer to issue https://github.com/golang/dep/issues/1799 [[override]] name = "gopkg.in/fsnotify.v1" - source = "https://github.com/fsnotify/fsnotify.git" \ No newline at end of file + source = "https://github.com/fsnotify/fsnotify.git" diff --git a/vendor/github.com/Peripli/service-broker-proxy/Makefile b/vendor/github.com/Peripli/service-broker-proxy/Makefile new file mode 100644 index 00000000..f082aed4 --- /dev/null +++ b/vendor/github.com/Peripli/service-broker-proxy/Makefile @@ -0,0 +1,62 @@ +# Copyright 2018 The Service Manager 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. + +all: build test + +TEST_PROFILE ?= $(CURDIR)/profile.cov +COVERAGE ?= $(CURDIR)/coverage.html + +PLATFORM ?= linux +ARCH ?= amd64 + +BUILD_LDFLAGS = + +# GO_FLAGS - extra "go build" flags to use - e.g. -v (for verbose) +GO_BUILD = env CGO_ENABLED=0 GOOS=$(PLATFORM) GOARCH=$(ARCH) \ + go build $(GO_FLAGS) -ldflags '-s -w $(BUILD_LDFLAGS)' ./... + +build: dep-vendor sbproxy + +dep-check: + @which dep 2>/dev/null || (echo dep is required to build the project; exit 1) + +dep: dep-check + @dep ensure -v + +dep-vendor: dep-check + @dep ensure --vendor-only -v + +dep-reload: dep-check clean-vendor dep + +sbproxy: + $(GO_BUILD) + +test: build + @echo Running tests: + @go test ./... -p 1 -race -coverpkg $(shell go list ./... | egrep -v "fakes|test" | paste -sd "," -) -coverprofile=$(TEST_PROFILE) + +coverage: test + @go tool cover -html=$(TEST_PROFILE) -o "$(COVERAGE)" + +clean: clean-test clean-coverage + +clean-test: + rm -f $(TEST_PROFILE) + +clean-coverage: + rm -f $(COVERAGE) + +clean-vendor: + rm -rf vendor + @echo > Gopkg.lock \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/platform/types.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/platform/types.go index eeb1ca50..84e817d7 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/platform/types.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/platform/types.go @@ -16,8 +16,11 @@ package platform -import "encoding/json" -import osbc "github.com/pmorie/go-open-service-broker-client/v2" +import ( + "encoding/json" + + "github.com/Peripli/service-manager/pkg/types" +) // CreateServiceBrokerRequest type used for requests by the platform client type CreateServiceBrokerRequest struct { @@ -40,11 +43,11 @@ type DeleteServiceBrokerRequest struct { // ServiceBroker type for responses from the platform client type ServiceBroker struct { - GUID string `json:"guid"` - Name string `json:"name"` - BrokerURL string `json:"broker_url"` - Catalog *osbc.CatalogResponse `json:"catalog"` - Metadata map[string]json.RawMessage `json:"metadata"` + GUID string `json:"guid"` + Name string `json:"name"` + BrokerURL string `json:"broker_url"` + ServiceOfferings []types.ServiceOffering `json:"services"` + Metadata map[string]json.RawMessage `json:"metadata"` } // ServiceBrokerList type for responses from the platform client diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/options.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/options.go index 75fb6582..2b951f55 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/options.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/options.go @@ -22,8 +22,8 @@ import ( "github.com/Peripli/service-manager/pkg/env" "github.com/Peripli/service-manager/pkg/log" "github.com/Peripli/service-manager/pkg/server" - "github.com/spf13/pflag" "github.com/Peripli/service-manager/pkg/util" + "github.com/spf13/pflag" ) // Settings type holds all config properties for the sbproxy diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers.go index 61425f2e..bbda19a9 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers.go @@ -18,18 +18,21 @@ package reconcile import ( "context" - "github.com/Peripli/service-manager/pkg/log" "sync" + "github.com/Peripli/service-manager/pkg/types" + + "github.com/Peripli/service-manager/pkg/log" + "strings" "encoding/json" "fmt" + "github.com/Peripli/service-broker-proxy/pkg/platform" "github.com/Peripli/service-broker-proxy/pkg/sm" "github.com/pkg/errors" - osbc "github.com/pmorie/go-open-service-broker-client/v2" "github.com/sirupsen/logrus" ) @@ -177,10 +180,10 @@ func (r ReconcilationTask) getBrokersFromSM() ([]platform.ServiceBroker, error) brokersFromSM := make([]platform.ServiceBroker, 0, len(proxyBrokers)) for _, broker := range proxyBrokers { brokerReg := platform.ServiceBroker{ - GUID: broker.ID, - BrokerURL: broker.BrokerURL, - Catalog: broker.Catalog, - Metadata: broker.Metadata, + GUID: broker.ID, + BrokerURL: broker.BrokerURL, + ServiceOfferings: broker.ServiceOfferings, + Metadata: broker.Metadata, } brokersFromSM = append(brokersFromSM, brokerReg) } @@ -242,16 +245,15 @@ func (r ReconcilationTask) enableServiceAccessVisibilities(broker *platform.Serv logger := log.C(r.ctx) logger.WithFields(logBroker(broker)).Info("ReconcilationTask task attempting to enable service access for broker...") - catalog := broker.Catalog - if catalog == nil { + if len(broker.ServiceOfferings) == 0 { logger.WithFields(logBroker(broker)).Error("Error enabling service access due to missing catalog details") return } - for _, service := range catalog.Services { + for _, service := range broker.ServiceOfferings { logger.WithFields(logService(service)).Debug("ReconcilationTask task attempting to enable service access for service...") - if err := f.EnableAccessForService(r.ctx, emptyContext, service.ID); err != nil { - logger.WithFields(logService(service)).WithError(err).Errorf("Error enabling service access for service with ID=%s...", service.ID) + if err := f.EnableAccessForService(r.ctx, emptyContext, service.CatalogID); err != nil { + logger.WithFields(logService(service)).WithError(err).Errorf("Error enabling service access for service with ID=%s...", service.CatalogID) } logger.WithFields(logService(service)).Debug("ReconcilationTask task finished enabling service access for service...") } @@ -271,9 +273,9 @@ func logBroker(broker *platform.ServiceBroker) logrus.Fields { } } -func logService(service osbc.Service) logrus.Fields { +func logService(service types.ServiceOffering) logrus.Fields { return logrus.Fields{ - "service_guid": service.ID, + "service_guid": service.CatalogID, "service_name": service.Name, } } diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers_test.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers_test.go index 047cc93d..c7bd8749 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers_test.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sbproxy/reconcile/reconcile_brokers_test.go @@ -19,15 +19,16 @@ package reconcile import ( "context" "fmt" + "sync" + "github.com/Peripli/service-broker-proxy/pkg/platform" "github.com/Peripli/service-broker-proxy/pkg/platform/platformfakes" "github.com/Peripli/service-broker-proxy/pkg/sm" "github.com/Peripli/service-broker-proxy/pkg/sm/smfakes" + "github.com/Peripli/service-manager/pkg/types" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - osbc "github.com/pmorie/go-open-service-broker-client/v2" - "sync" ) var _ = Describe("ReconcilationTask", func() { @@ -92,25 +93,23 @@ var _ = Describe("ReconcilationTask", func() { smbroker1 = sm.Broker{ ID: "smBrokerID1", BrokerURL: "https://smBroker1.com", - Catalog: &osbc.CatalogResponse{ - Services: []osbc.Service{ - { - ID: "smBroker1ServiceID1", - Name: "smBroker1Service1", - Description: "description", - Bindable: true, - BindingsRetrievable: true, - Plans: []osbc.Plan{ - { - ID: "smBroker1ServiceID1PlanID1", - Name: "smBroker1Service1Plan1", - Description: "description", - }, - { - ID: "smBroker1ServiceID1PlanID2", - Name: "smBroker1Service1Plan2", - Description: "description", - }, + ServiceOfferings: []types.ServiceOffering{ + { + ID: "smBroker1ServiceID1", + Name: "smBroker1Service1", + Description: "description", + Bindable: true, + BindingsRetrievable: true, + Plans: []*types.ServicePlan{ + { + ID: "smBroker1ServiceID1PlanID1", + Name: "smBroker1Service1Plan1", + Description: "description", + }, + { + ID: "smBroker1ServiceID1PlanID2", + Name: "smBroker1Service1Plan2", + Description: "description", }, }, }, @@ -120,25 +119,23 @@ var _ = Describe("ReconcilationTask", func() { smbroker2 = sm.Broker{ ID: "smBrokerID2", BrokerURL: "https://smBroker2.com", - Catalog: &osbc.CatalogResponse{ - Services: []osbc.Service{ - { - ID: "smBroker2ServiceID1", - Name: "smBroker2Service1", - Description: "description", - Bindable: true, - BindingsRetrievable: true, - Plans: []osbc.Plan{ - { - ID: "smBroker2ServiceID1PlanID1", - Name: "smBroker2Service1Plan1", - Description: "description", - }, - { - ID: "smBroker2ServiceID1PlanID2", - Name: "smBroker2Service1Plan2", - Description: "description", - }, + ServiceOfferings: []types.ServiceOffering{ + { + ID: "smBroker2ServiceID1", + Name: "smBroker2Service1", + Description: "description", + Bindable: true, + BindingsRetrievable: true, + Plans: []*types.ServicePlan{ + { + ID: "smBroker2ServiceID1PlanID1", + Name: "smBroker2Service1Plan1", + Description: "description", + }, + { + ID: "smBroker2ServiceID1PlanID2", + Name: "smBroker2Service1Plan2", + Description: "description", }, }, }, @@ -164,11 +161,14 @@ var _ = Describe("ReconcilationTask", func() { } }) + type catalog struct { + ServiceOfferings []types.ServiceOffering + } type expectations struct { reconcileCreateCalledFor []platform.ServiceBroker reconcileDeleteCalledFor []platform.ServiceBroker reconcileCatalogCalledFor []platform.ServiceBroker - reconcileAccessCalledFor []osbc.CatalogResponse + reconcileAccessCalledFor []catalog } type testCase struct { @@ -195,7 +195,7 @@ var _ = Describe("ReconcilationTask", func() { reconcileCreateCalledFor: []platform.ServiceBroker{}, reconcileDeleteCalledFor: []platform.ServiceBroker{}, reconcileCatalogCalledFor: []platform.ServiceBroker{}, - reconcileAccessCalledFor: []osbc.CatalogResponse{}, + reconcileAccessCalledFor: []catalog{}, } }, }), @@ -215,7 +215,7 @@ var _ = Describe("ReconcilationTask", func() { reconcileCreateCalledFor: []platform.ServiceBroker{}, reconcileDeleteCalledFor: []platform.ServiceBroker{}, reconcileCatalogCalledFor: []platform.ServiceBroker{}, - reconcileAccessCalledFor: []osbc.CatalogResponse{}, + reconcileAccessCalledFor: []catalog{}, } }, }), @@ -246,7 +246,7 @@ var _ = Describe("ReconcilationTask", func() { platformbroker2, }, reconcileCatalogCalledFor: []platform.ServiceBroker{}, - reconcileAccessCalledFor: []osbc.CatalogResponse{}, + reconcileAccessCalledFor: []catalog{}, } }, }), @@ -262,7 +262,7 @@ var _ = Describe("ReconcilationTask", func() { }, nil }, smBrokers: func() ([]sm.Broker, error) { - smbroker1.Catalog = nil + smbroker1.ServiceOfferings = nil return []sm.Broker{ smbroker1, smbroker2, @@ -276,8 +276,10 @@ var _ = Describe("ReconcilationTask", func() { platformbroker1, platformbroker2, }, - reconcileAccessCalledFor: []osbc.CatalogResponse{ - *smbroker2.Catalog, + reconcileAccessCalledFor: []catalog{ + { + ServiceOfferings: smbroker2.ServiceOfferings, + }, }, } }, @@ -304,9 +306,13 @@ var _ = Describe("ReconcilationTask", func() { }, reconcileDeleteCalledFor: []platform.ServiceBroker{}, reconcileCatalogCalledFor: []platform.ServiceBroker{}, - reconcileAccessCalledFor: []osbc.CatalogResponse{ - *smbroker1.Catalog, - *smbroker2.Catalog, + reconcileAccessCalledFor: []catalog{ + { + ServiceOfferings: smbroker1.ServiceOfferings, + }, + { + ServiceOfferings: smbroker2.ServiceOfferings, + }, }, } }, @@ -333,8 +339,10 @@ var _ = Describe("ReconcilationTask", func() { reconcileCatalogCalledFor: []platform.ServiceBroker{ platformbroker1, }, - reconcileAccessCalledFor: []osbc.CatalogResponse{ - *smbroker1.Catalog, + reconcileAccessCalledFor: []catalog{ + { + ServiceOfferings: smbroker1.ServiceOfferings, + }, }, } }, @@ -359,7 +367,7 @@ var _ = Describe("ReconcilationTask", func() { platformbroker1, }, reconcileCatalogCalledFor: []platform.ServiceBroker{}, - reconcileAccessCalledFor: []osbc.CatalogResponse{}, + reconcileAccessCalledFor: []catalog{}, } }, }), @@ -381,7 +389,7 @@ var _ = Describe("ReconcilationTask", func() { reconcileCreateCalledFor: []platform.ServiceBroker{}, reconcileDeleteCalledFor: []platform.ServiceBroker{}, reconcileCatalogCalledFor: []platform.ServiceBroker{}, - reconcileAccessCalledFor: []osbc.CatalogResponse{}, + reconcileAccessCalledFor: []catalog{}, } }, }), @@ -435,9 +443,9 @@ var _ = Describe("ReconcilationTask", func() { servicesCount := 0 index := 0 for _, catalog := range expected.reconcileAccessCalledFor { - for _, service := range catalog.Services { + for _, service := range catalog.ServiceOfferings { _, _, serviceID := fakePlatformServiceAccess.EnableAccessForServiceArgsForCall(index) - Expect(serviceID).To(Equal(service.ID)) + Expect(serviceID).To(Equal(service.CatalogID)) servicesCount++ index++ } diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client.go index bf16fc0d..2adad2ba 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client.go @@ -23,6 +23,7 @@ import ( "time" "context" + "github.com/Peripli/service-manager/pkg/log" "github.com/Peripli/service-manager/pkg/util" "github.com/pkg/errors" diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client_test.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client_test.go index 0a73b55c..3ba48dc2 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client_test.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/client_test.go @@ -17,19 +17,21 @@ package sm import ( + "context" "encoding/base64" "encoding/json" "fmt" + "net/http" + "time" + + "github.com/Peripli/service-manager/pkg/types" + "github.com/pkg/errors" + "github.com/Peripli/service-manager/test/common" + . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - "github.com/pkg/errors" - osbc "github.com/pmorie/go-open-service-broker-client/v2" - "net/http" - - "context" - "time" ) type MockTransport struct { @@ -40,17 +42,17 @@ func (t *MockTransport) RoundTrip(req *http.Request) (*http.Response, error) { return t.f(req) } -func basicAuth(username, password string) string { - auth := username + ":" + password - return base64.StdEncoding.EncodeToString([]byte(auth)) -} - func httpClient(reaction *common.HTTPReaction, checks *common.HTTPExpectations) *MockTransport { return &MockTransport{ f: common.DoHTTP(reaction, checks), } } +func basicAuth(username, password string) string { + auth := username + ":" + password + return base64.StdEncoding.EncodeToString([]byte(auth)) +} + var _ = Describe("Client", func() { Describe("NewClient", func() { var settings *Settings @@ -112,7 +114,6 @@ var _ = Describe("Client", func() { "metadata": { }, - "catalog":{ "services":[ { "name":"fake-service", @@ -145,7 +146,7 @@ var _ = Describe("Client", func() { "plan_updateable":true, "plans":[ { - "name":"fake-plan-1", + "name":"fake-service_plan-1", "id":"d3031751-XXXX-XXXX-XXXX-a42377d3320e", "description":"Shared fake Server, 5tb persistent disk, 40 max concurrent connections", "free":false, @@ -216,25 +217,25 @@ var _ = Describe("Client", func() { } ] } - ]} + ] } ]}` - catalogObject := func(brokers string) *osbc.CatalogResponse { + catalogObject := func(brokers string) []types.ServiceOffering { c := &Brokers{} err := json.Unmarshal([]byte(brokers), c) if err != nil { panic(err) } - return c.Brokers[0].Catalog + return c.Brokers[0].ServiceOfferings } clientBrokersResponse := []Broker{ { - ID: "brokerID", - BrokerURL: "https://service-broker-url", - Catalog: catalogObject(okResponse), - Metadata: map[string]json.RawMessage{}, + ID: "brokerID", + BrokerURL: "https://service-broker-url", + ServiceOfferings: catalogObject(okResponse), + Metadata: map[string]json.RawMessage{}, }, } diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/options_test.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/options_test.go index 2224cd87..f9f79a6d 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/options_test.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/options_test.go @@ -146,7 +146,7 @@ var _ = Describe("Config", func() { Context("when URL is missing", func() { It("returns an error", func() { - config.URL= "" + config.URL = "" assertErrorDuringValidate() }) }) diff --git a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/types.go b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/types.go index 096314c9..d2078832 100644 --- a/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/types.go +++ b/vendor/github.com/Peripli/service-broker-proxy/pkg/sm/types.go @@ -19,7 +19,7 @@ package sm import ( "encoding/json" - osbc "github.com/pmorie/go-open-service-broker-client/v2" + "github.com/Peripli/service-manager/pkg/types" ) // Brokers type used for responses from the Service Manager client @@ -32,6 +32,6 @@ type Broker struct { ID string `json:"id"` BrokerURL string `json:"broker_url"` - Catalog *osbc.CatalogResponse `json:"catalog"` - Metadata map[string]json.RawMessage `json:"metadata,omitempty"` + ServiceOfferings []types.ServiceOffering `json:"services"` + Metadata map[string]json.RawMessage `json:"metadata,omitempty"` } diff --git a/vendor/github.com/Peripli/service-manager/.dockerignore b/vendor/github.com/Peripli/service-manager/.dockerignore index f596e132..924042bd 100644 --- a/vendor/github.com/Peripli/service-manager/.dockerignore +++ b/vendor/github.com/Peripli/service-manager/.dockerignore @@ -1,7 +1,6 @@ vendor/ debug .vscode/ -.git .gitignore .gometalinter.json .travis.yml diff --git a/vendor/github.com/Peripli/service-manager/.travis.yml b/vendor/github.com/Peripli/service-manager/.travis.yml index ea2bf493..fe40ed00 100644 --- a/vendor/github.com/Peripli/service-manager/.travis.yml +++ b/vendor/github.com/Peripli/service-manager/.travis.yml @@ -1,34 +1,17 @@ language: go go: - - 1.10.x - -before_install: - - go get -u github.com/golang/dep/cmd/dep - - make dep-vendor + - 1.11.x install: - - go get github.com/alecthomas/gometalinter - - go get github.com/GoASTScanner/gas/cmd/gas/... - - go get golang.org/x/tools/cmd/cover - - go get github.com/mattn/goveralls - -before_script: - - gometalinter --install --update + - make prepare services: - postgresql script: - # Execute static checks - - gometalinter --vendor ./... - - # Execute tests and generate coverage for all the packages except fakes and tests - - make test + - make precommit - goveralls -coverprofile profile.cov -service=travis-ci - #Execute security scan - # - gas ./... - notifications: slack: openservicebrokerapi:KQo2QAC6LXeEeXPOemOXja48 diff --git a/vendor/github.com/Peripli/service-manager/Dockerfile b/vendor/github.com/Peripli/service-manager/Dockerfile index 72db16ed..918b424b 100644 --- a/vendor/github.com/Peripli/service-manager/Dockerfile +++ b/vendor/github.com/Peripli/service-manager/Dockerfile @@ -3,7 +3,7 @@ # docker container. The alpine build image has to match # the alpine image in the referencing runtime container. ######################################################### -FROM golang:1.10.1-alpine3.7 AS builder +FROM golang:1.11.2-alpine3.7 AS builder # We need so that dep can fetch it's dependencies RUN apk --no-cache add git @@ -18,7 +18,7 @@ RUN dep ensure --vendor-only -v # Copy and build source code COPY . ./ -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o /main main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags "$(build/ldflags)" -o /main main.go ######################################################## # Build the runtime container @@ -33,7 +33,11 @@ WORKDIR /app COPY --from=builder /main /app/ # Copy migration scripts -COPY --from=builder /go/src/github.com/Peripli/service-manager/storage/postgres/migrations/ /app/storage/postgres/migrations/ +COPY --from=builder /go/src/github.com/Peripli/service-manager/storage/postgres/migrations/ /app/ + +# If one wants to use migrations scripts from somewhere else, overriding this env var would override the scripts from the image +ENV STORAGE_MIGRATIONS_URL=file:///app EXPOSE 8080 + ENTRYPOINT [ "./main" ] diff --git a/vendor/github.com/Peripli/service-manager/Gopkg.lock b/vendor/github.com/Peripli/service-manager/Gopkg.lock index 1f117830..6294f45b 100644 --- a/vendor/github.com/Peripli/service-manager/Gopkg.lock +++ b/vendor/github.com/Peripli/service-manager/Gopkg.lock @@ -443,12 +443,12 @@ revision = "1731857f09b1f38450e2c12409748407822dc6be" [[projects]] - digest = "1:0c1bd4e9b2d596d0d6e676f2764a40f3f39a12d85d65308ffadcd68fde3af5e4" + digest = "1:ea8da5f44f5e15bb589cca1bd9b85ceb9c05257e83824a725fb0243665e3ce1c" name = "github.com/tidwall/sjson" packages = ["."] pruneopts = "UT" - revision = "6a22caf2fd45d5e2119bfc3717e984f15a7eb7ee" - version = "v1.0.0" + revision = "c943cc8c8d751d9b33444adf78ae04c2fc8be754" + version = "v1.0.3" [[projects]] branch = "master" @@ -688,6 +688,7 @@ "github.com/spf13/cast", "github.com/spf13/pflag", "github.com/spf13/viper", + "github.com/tidwall/gjson", "github.com/tidwall/sjson", "gopkg.in/yaml.v2", ] diff --git a/vendor/github.com/Peripli/service-manager/Gopkg.toml b/vendor/github.com/Peripli/service-manager/Gopkg.toml index 60910166..22304948 100644 --- a/vendor/github.com/Peripli/service-manager/Gopkg.toml +++ b/vendor/github.com/Peripli/service-manager/Gopkg.toml @@ -93,6 +93,14 @@ name = "github.com/DATA-DOG/go-sqlmock" revision = "852fc940e4b9b895dc144b88ee8f6e39228127b0" +[[constraint]] + name = "github.com/tidwall/gjson" + version = "v1.1.3" + +[[constraint]] + name = "github.com/tidwall/sjson" + version = "v1.0.2" + # Refer to issue https://github.com/golang/dep/issues/1799 [[override]] name = "gopkg.in/fsnotify.v1" diff --git a/vendor/github.com/Peripli/service-manager/Makefile b/vendor/github.com/Peripli/service-manager/Makefile index c6881504..85b13ad5 100644 --- a/vendor/github.com/Peripli/service-manager/Makefile +++ b/vendor/github.com/Peripli/service-manager/Makefile @@ -12,65 +12,195 @@ # See the License for the specific language governing permissions and # limitations under the License. -all: build test - -BINDIR ?= bin -TEST_PROFILE ?= $(CURDIR)/profile.cov -COVERAGE ?= $(CURDIR)/coverage.html -PROJECT_PKG = github.com/Peripli/service-manager - -PLATFORM ?= linux -ARCH ?= amd64 - -BUILD_LDFLAGS = - -# GOFLAGS - extra "go build" flags to use - e.g. -v (for verbose) -GO_BUILD = env CGO_ENABLED=0 GOOS=$(PLATFORM) GOARCH=$(ARCH) \ - go build $(GOFLAGS) -ldflags '-s -w $(BUILD_LDFLAGS)' - -build: .init dep-vendor service-manager +all: build test-unit ## Default target that builds SM and runs unit-tests + +GO ?= go +GOFMT ?= gofmt +BINDIR ?= bin +PROJECT_PKG ?= github.com/Peripli/service-manager + +PLATFORM ?= linux +ARCH ?= amd64 + +UNIT_TEST_PROFILE ?= $(CURDIR)/profile-unit.cov +INT_TEST_PROFILE ?= $(CURDIR)/profile-int.cov +TEST_PROFILE ?= $(CURDIR)/profile.cov +COVERAGE ?= $(CURDIR)/coverage.html + +VERSION ?= $(shell git describe --tags --always --dirty) +DATE ?= $(shell date -u '+%Y-%m-%d-%H%M UTC') +VERSION_FLAGS ?= -X "main.Version=$(VERSION)" -X "main.BuildTime=$(DATE)" + +# .go files - excludes fakes, mocks, generated files, etc... +SOURCE_FILES = $(shell find . -type f -name '*.go' ! -name '*.gen.go' ! -name '*.pb.go' ! -name '*mock*.go' \ + ! -name '*fake*.go' ! -path "./vendor/*" ! -path "*/*fakes*/*" \ + -exec grep -vrli 'Code generated by counterfeiter' {} \;) + +# .go files with go:generate directives (currently files that contain interfaces for which counterfeiter fakes are generated) +GENERATE_PREREQ_FILES = $(shell find . -name "*.go" ! -path "./vendor/*" -exec grep "go:generate" -rli {} \;) + +# GO_FLAGS - extra "go build" flags to use - e.g. -v (for verbose) +GO_BUILD = env CGO_ENABLED=0 GOOS=$(PLATFORM) GOARCH=$(ARCH) \ + $(GO) build $(GO_FLAGS) -ldflags '-s -w $(BUILD_LDFLAGS) $(VERSION_FLAGS)' + +# TEST_FLAGS - extra "go test" flags to use +GO_INT_TEST = $(GO) test -p 1 -race -coverpkg $(shell go list ./... | egrep -v "fakes|test" | paste -sd "," -) \ + ./test/... $(TEST_FLAGS) -coverprofile=$(INT_TEST_PROFILE) + +GO_UNIT_TEST = $(GO) test -p 1 -race -coverpkg $(shell go list ./... | egrep -v "fakes|test" | paste -sd "," -) \ + $(shell go list ./... | egrep -v "test") -coverprofile=$(UNIT_TEST_PROFILE) + +#----------------------------------------------------------------------------- +# Prepare environment to be able to run other make targets +#----------------------------------------------------------------------------- + +prepare: ## Installs some tools (dep, gometalinter, cover, goveralls) +ifeq ($(shell which dep),) + @echo "Installing dep..." + @go get -u github.com/golang/dep/cmd/dep + @chmod a+x ${GOPATH}/bin/dep +endif +ifeq ($(shell which gometalinter),) + @echo "Installing gometalinter..." + @go get -u github.com/alecthomas/gometalinter + @gometalinter --install +endif +ifeq ($(shell which cover),) + @echo "Installing cover tool..." + @go get -u golang.org/x/tools/cmd/cover +endif +ifeq ($(shell which goveralls),) + @echo "Installing goveralls..." + @go get github.com/mattn/goveralls +endif +ifeq ($(shell which counterfeiter),) + @echo "Installing counterfeither..." + @go get github.com/maxbrunsfeld/counterfeiter +endif +ifeq ($(shell which golint),) + @echo "Installing golint... " + @go get -u golang.org/x/lint/golint +endif + +#----------------------------------------------------------------------------- +# Builds and dependency management +#----------------------------------------------------------------------------- + +build: .init dep-vendor-only service-manager ## Downloads vendored dependecies and builds the service-manager binary dep-check: @which dep 2>/dev/null || (echo dep is required to build the project; exit 1) -dep: dep-check +dep: dep-check ## Runs dep ensure -v @dep ensure -v + @dep status -dep-vendor: dep-check +dep-vendor-only: dep-check ## Runs dep ensure --vendor-only -v @dep ensure --vendor-only -v + @dep status -dep-reload: dep-check clean-vendor dep +dep-reload: dep-check clean-vendor dep ## Recreates the vendored dependencies service-manager: $(BINDIR)/service-manager # Build serivce-manager under ./bin/service-manager -$(BINDIR)/service-manager: .init . +$(BINDIR)/service-manager: FORCE | .init $(GO_BUILD) -o $@ $(PROJECT_PKG) # init creates the bin dir .init: $(BINDIR) +# Force can be used as a prerequisite to a target and this will cause this target to always run +FORCE: + $(BINDIR): mkdir -p $@ -test: build - @echo Running tests: - @go test ./... -p 1 -race -coverpkg $(shell go list ./... | egrep -v "fakes|test" | paste -sd "," -) -coverprofile=$(TEST_PROFILE) +clean-bin: ## Cleans up the binaries + @echo Deleting $(CURDIR)/$(BINDIR) and built binaries... + @rm -rf $(BINDIR) + + +clean-vendor: ## Cleans up the vendor folder and prints out the Gopkg.lock + @echo Deleting vendor folder... + @rm -rf vendor + @echo > Gopkg.lock + +#----------------------------------------------------------------------------- +# Tests and coverage +#----------------------------------------------------------------------------- + +generate: $(GENERATE_PREREQ_FILES) ## Recreates gen files if any of the files containing go:generate directives have changed + $(GO) list ./... | xargs $(GO) generate + @touch $@ + +test-unit: generate ## Runs the unit tests + @echo Running unit tests: + $(GO_UNIT_TEST) + +test-int: generate ## Runs the integration tests. Use TEST_FLAGS="--storage.uri=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" to specify the DB. All other SM flags are also supported + @echo Running integration tests: + $(GO_INT_TEST) + +test-report: test-unit test-int + @$(GO) get github.com/wadey/gocovmerge + @gocovmerge $(CURDIR)/*.cov > $(TEST_PROFILE) + +coverage: test-report ## Produces an HTML report containing code coverage details + @go tool cover -html=$(TEST_PROFILE) -o $(COVERAGE) + @echo Generated coverage report in $(COVERAGE). + +clean-generate: + @rm -f generate + +clean-test-unit: clean-generate ## Cleans up unit test artifacts + @echo Deleting $(UNIT_TEST_PROFILE)... + @rm -f $(UNIT_TEST_PROFILE) + +clean-test-int: clean-generate ## Cleans up integration test artifacts + @echo Deleting $(INT_TEST_PROFILE)... + @rm -f $(INT_TEST_PROFILE) + +clean-test-report: clean-test-unit clean-test-int + @echo Deleting $(TEST_PROFILE)... + @rm -f $(TEST_PROFILE) + +clean-coverage: clean-test-report ## Cleans up coverage artifacts + @echo Deleting $(COVERAGE)... + @rm -f $(COVERAGE) + +#----------------------------------------------------------------------------- +# Formatting, Linting, Static code checks +#----------------------------------------------------------------------------- + +precommit: build coverage format-check lint-check ## Run this before commiting (builds, recreates fakes, runs tests, checks linting and formating). This also runs integration tests - check test-int target for details -coverage: build test - @go tool cover -html=$(TEST_PROFILE) -o "$(COVERAGE)" +format: ## Formats the source code files with gofmt + @echo The following files were reformated: + @$(GOFMT) -l -s -w $(SOURCE_FILES) -clean: clean-bin clean-test clean-coverage +format-check: ## Checks for style violation using gofmt + @echo Checking if there are files not formatted with gofmt... + @$(GOFMT) -l -s $(SOURCE_FILES) | grep ".*\.go"; if [ "$$?" = "0" ]; then echo "Files need reformating! Run make format!" ; exit 1; fi -clean-bin: - rm -rf $(BINDIR) +lint-check: ## Runs some linters and static code checks + @echo Running linter checks... + @gometalinter --vendor --disable-all \ + --enable=megacheck \ + --enable=deadcode \ + --enable=ineffassign \ + --enable=misspell \ + --enable=errcheck \ + --enable=vet \ + --deadline=10m \ + ./... -clean-test: - rm -f $(TEST_PROFILE) +#----------------------------------------------------------------------------- +# Useful utility targets +#----------------------------------------------------------------------------- -clean-coverage: - rm -f $(COVERAGE) +clean: clean-bin clean-coverage ## Cleans up binaries, test and coverage artifacts -clean-vendor: - rm -rf vendor - @echo > Gopkg.lock \ No newline at end of file +help: ## Displays documentation about the makefile targets + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ + awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/vendor/github.com/Peripli/service-manager/README.md b/vendor/github.com/Peripli/service-manager/README.md index d1ca8fa9..936ba327 100644 --- a/vendor/github.com/Peripli/service-manager/README.md +++ b/vendor/github.com/Peripli/service-manager/README.md @@ -41,8 +41,12 @@ Feedback and contributions are always welcome. Please refer to the [contribution ## Additional Resources -* Execution of a flow similar to the one described in the [walkthrough](./docs/usage/walkthrough.md) can be found [here](https://www.youtube.com/watch?v=FG2bIv34P10). - * Details about the SM API can be found [here](https://github.com/Peripli/specification/blob/master/api.md). * Service Manager CLI documentation is located [here](https://github.com/Peripli/service-manager-cli/tree/master/docs). + +* Execution of a flow similar to the one described in the [walkthrough](./docs/usage/walkthrough.md) can be found [here](https://www.youtube.com/watch?v=FG2bIv34P10). + +* Service Manager Introduction as part of the keynote @ CF Summit Europe 2018 can be found [here](https://www.youtube.com/watch?v=LMwo_zgfYjU). + +* Service Manager Session @ CF Summit Europe 2018 can be found [here](https://www.youtube.com/watch?v=SGfwVPx-kmE). diff --git a/vendor/github.com/Peripli/service-manager/api/api.go b/vendor/github.com/Peripli/service-manager/api/api.go index 48801ff7..4094f6b8 100644 --- a/vendor/github.com/Peripli/service-manager/api/api.go +++ b/vendor/github.com/Peripli/service-manager/api/api.go @@ -23,12 +23,16 @@ import ( "net/http" "github.com/Peripli/service-manager/api/broker" + "github.com/Peripli/service-manager/api/platform" + + "github.com/Peripli/service-manager/api/service_offering" + "github.com/Peripli/service-manager/api/service_plan" + "github.com/Peripli/service-manager/api/filters" "github.com/Peripli/service-manager/api/filters/authn/basic" "github.com/Peripli/service-manager/api/filters/authn/oauth" "github.com/Peripli/service-manager/api/info" "github.com/Peripli/service-manager/api/osb" - "github.com/Peripli/service-manager/api/platform" "github.com/Peripli/service-manager/pkg/health" "github.com/Peripli/service-manager/pkg/security" secfilters "github.com/Peripli/service-manager/pkg/security/filters" @@ -53,23 +57,18 @@ func (s *Security) Validate() error { // Settings type to be loaded from the environment type Settings struct { - TokenIssuerURL string `mapstructure:"token_issuer_url"` - ClientID string `mapstructure:"client_id"` - Security Security `mapstructure:"security"` - SkipSSLValidation bool `mapstructure:"skip_ssl_validation"` + TokenIssuerURL string `mapstructure:"token_issuer_url"` + ClientID string `mapstructure:"client_id"` + SkipSSLValidation bool `mapstructure:"skip_ssl_validation"` } // DefaultSettings returns default values for API settings func DefaultSettings() *Settings { return &Settings{ - TokenIssuerURL: "", - ClientID: "", - Security: Security{ - EncryptionKey: "", - }, + TokenIssuerURL: "", + ClientID: "", SkipSSLValidation: false, } - } // Validate validates the API settings @@ -77,48 +76,49 @@ func (s *Settings) Validate() error { if (len(s.TokenIssuerURL)) == 0 { return fmt.Errorf("validate Settings: APITokenIssuerURL missing") } - if err := s.Security.Validate(); err != nil { - return err - } return nil } // New returns the minimum set of REST APIs needed for the Service Manager -func New(ctx context.Context, store storage.Storage, settings *Settings, encrypter security.Encrypter) (*web.API, error) { +func New(ctx context.Context, repository storage.Repository, settings *Settings, encrypter security.Encrypter) (*web.API, error) { bearerAuthnFilter, err := oauth.NewFilter(ctx, settings.TokenIssuerURL, settings.ClientID) if err != nil { return nil, err } - healthRegistry := health.NewDefaultRegistry() - healthRegistry.AddHealthIndicator(&storage.HealthIndicator{Storage: store}) return &web.API{ // Default controllers - more filters can be registered using the relevant API methods Controllers: []web.Controller{ &broker.Controller{ - BrokerStorage: store.Broker(), + Repository: repository, OSBClientCreateFunc: newOSBClient(settings.SkipSSLValidation), Encrypter: encrypter, }, &platform.Controller{ - PlatformStorage: store.Platform(), + PlatformStorage: repository.Platform(), Encrypter: encrypter, }, + &service_offering.Controller{ + ServiceOfferingStorage: repository.ServiceOffering(), + }, + &service_plan.Controller{ + ServicePlanStorage: repository.ServicePlan(), + }, &info.Controller{ TokenIssuer: settings.TokenIssuerURL, }, osb.NewController(&osb.StorageBrokerFetcher{ - BrokerStorage: store.Broker(), + BrokerStorage: repository.Broker(), Encrypter: encrypter, }, http.DefaultTransport), }, // Default filters - more filters can be registered using the relevant API methods Filters: []web.Filter{ &filters.Logging{}, - basic.NewFilter(store.Credentials(), encrypter), + basic.NewFilter(repository.Credentials(), encrypter), bearerAuthnFilter, secfilters.NewRequiredAuthnFilter(), }, - Registry: healthRegistry, + Registry: health.NewDefaultRegistry(), }, nil } diff --git a/vendor/github.com/Peripli/service-manager/api/broker/broker.go b/vendor/github.com/Peripli/service-manager/api/broker/broker.go index f7388bd1..26ea26c7 100644 --- a/vendor/github.com/Peripli/service-manager/api/broker/broker.go +++ b/vendor/github.com/Peripli/service-manager/api/broker/broker.go @@ -45,7 +45,7 @@ func (c *Controller) Routes() []web.Route { Method: http.MethodGet, Path: web.BrokersURL, }, - Handler: c.getAllBrokers, + Handler: c.listBrokers, }, { Endpoint: web.Endpoint{ diff --git a/vendor/github.com/Peripli/service-manager/api/broker/broker_controller.go b/vendor/github.com/Peripli/service-manager/api/broker/broker_controller.go index fe15d1c4..75c7c82a 100644 --- a/vendor/github.com/Peripli/service-manager/api/broker/broker_controller.go +++ b/vendor/github.com/Peripli/service-manager/api/broker/broker_controller.go @@ -42,13 +42,19 @@ const ( // Controller broker controller type Controller struct { - BrokerStorage storage.Broker + Repository storage.Repository + OSBClientCreateFunc osbc.CreateFunc Encrypter security.Encrypter } var _ web.Controller = &Controller{} +type catalogPlanWithServiceOfferingID struct { + *osbc.Plan + ServiceOffering *types.ServiceOffering +} + func (c *Controller) createBroker(r *web.Request) (*web.Response, error) { ctx := r.Context() log.C(ctx).Debug("Creating new broker") @@ -73,17 +79,68 @@ func (c *Controller) createBroker(r *web.Request) (*web.Response, error) { if err != nil { return nil, err } - broker.Catalog = catalog if err := transformBrokerCredentials(ctx, broker, c.Encrypter.Encrypt); err != nil { return nil, err } - if err := c.BrokerStorage.Create(ctx, broker); err != nil { - return nil, util.HandleStorageError(err, "broker", broker.ID) + + if err := c.Repository.InTransaction(ctx, func(ctx context.Context, storage storage.Warehouse) error { + if err := storage.Broker().Create(ctx, broker); err != nil { + return util.HandleStorageError(err, "broker", broker.ID) + } + for _, service := range catalog.Services { + serviceOffering := &types.ServiceOffering{} + err := osbcCatalogServiceToServiceOffering(serviceOffering, &service) + if err != nil { + return err + } + serviceUUID, err := uuid.NewV4() + if err != nil { + return fmt.Errorf("could not generate GUID for service: %s", err) + } + serviceOffering.ID = serviceUUID.String() + serviceOffering.CreatedAt = broker.CreatedAt + serviceOffering.UpdatedAt = broker.UpdatedAt + serviceOffering.BrokerID = broker.ID + + if err := serviceOffering.Validate(); err != nil { + return fmt.Errorf("service offering constructed during catalog insertion for broker %s is invalid: %s", broker.ID, err) + } + if err := storage.ServiceOffering().Create(ctx, serviceOffering); err != nil { + return util.HandleStorageError(err, "service_offering", service.ID) + } + for planIndex := range service.Plans { + servicePlan := &types.ServicePlan{} + err := osbcCatalogPlanToServicePlan(servicePlan, &catalogPlanWithServiceOfferingID{ + Plan: &service.Plans[planIndex], + ServiceOffering: serviceOffering, + }) + if err != nil { + return err + } + planUUID, err := uuid.NewV4() + if err != nil { + return fmt.Errorf("could not generate GUID for service_plan: %s", err) + } + servicePlan.ID = planUUID.String() + servicePlan.CreatedAt = broker.CreatedAt + servicePlan.UpdatedAt = broker.UpdatedAt + + if err := servicePlan.Validate(); err != nil { + return fmt.Errorf("service plan constructed during catalog insertion for broker %s is invalid: %s", broker.ID, err) + } + + if err := storage.ServicePlan().Create(ctx, servicePlan); err != nil { + return util.HandleStorageError(err, "service_plan", service.Plans[planIndex].ID) + } + } + } + return nil + }); err != nil { + return nil, err } broker.Credentials = nil - broker.Catalog = nil return util.NewJSONResponse(http.StatusCreated, broker) } @@ -92,30 +149,39 @@ func (c *Controller) getBroker(r *web.Request) (*web.Response, error) { ctx := r.Context() log.C(ctx).Debugf("Getting broker with id %s", brokerID) - broker, err := c.BrokerStorage.Get(ctx, brokerID) + broker, err := c.Repository.Broker().Get(ctx, brokerID) if err != nil { return nil, util.HandleStorageError(err, "broker", brokerID) } broker.Credentials = nil - broker.Catalog = nil return util.NewJSONResponse(http.StatusOK, broker) } -func (c *Controller) getAllBrokers(r *web.Request) (*web.Response, error) { +func (c *Controller) listBrokers(r *web.Request) (*web.Response, error) { + var brokers []*types.Broker + var err error ctx := r.Context() log.C(ctx).Debug("Getting all brokers") - brokers, err := c.BrokerStorage.GetAll(ctx) + includeCatalog := strings.ToLower(r.FormValue(catalogParam)) == "true" + + brokers, err = c.Repository.Broker().List(ctx) if err != nil { return nil, err } + if includeCatalog { + for _, broker := range brokers { + offerings, err := c.Repository.ServiceOffering().ListWithServicePlansByBrokerID(ctx, broker.ID) + if err != nil { + return nil, err + } + broker.Services = offerings + + } + } - removeCatalog := strings.ToLower(r.FormValue(catalogParam)) != "true" for _, broker := range brokers { broker.Credentials = nil - if removeCatalog { - broker.Catalog = nil - } } return util.NewJSONResponse(http.StatusOK, &types.Brokers{ @@ -128,7 +194,7 @@ func (c *Controller) deleteBroker(r *web.Request) (*web.Response, error) { ctx := r.Context() log.C(ctx).Debugf("Deleting broker with id %s", brokerID) - if err := c.BrokerStorage.Delete(ctx, brokerID); err != nil { + if err := c.Repository.Broker().Delete(ctx, brokerID); err != nil { return nil, util.HandleStorageError(err, "broker", brokerID) } return util.NewJSONResponse(http.StatusOK, map[string]int{}) @@ -139,66 +205,134 @@ func (c *Controller) patchBroker(r *web.Request) (*web.Response, error) { ctx := r.Context() log.C(ctx).Debugf("Updating updateBroker with id %s", brokerID) - broker, err := c.BrokerStorage.Get(ctx, brokerID) + broker, err := c.Repository.Broker().Get(ctx, brokerID) if err != nil { return nil, util.HandleStorageError(err, "broker", brokerID) } createdAt := broker.CreatedAt - - if err := util.BytesToObject(r.Body, broker); err != nil { - return nil, err - } - - if err := transformBrokerCredentials(ctx, broker, c.Encrypter.Encrypt); err != nil { + if err := transformBrokerCredentials(ctx, broker, c.Encrypter.Decrypt); err != nil { return nil, err } - catalog, err := c.getBrokerCatalog(ctx, broker) - if err != nil { + if err := util.BytesToObject(r.Body, broker); err != nil { return nil, err } broker.ID = brokerID - broker.Catalog = catalog broker.CreatedAt = createdAt broker.UpdatedAt = time.Now().UTC() + if err := c.resyncBrokerAndCatalog(ctx, broker); err != nil { + return nil, err + } - if err := c.BrokerStorage.Update(ctx, broker); err != nil { - return nil, util.HandleStorageError(err, "broker", brokerID) + if err := transformBrokerCredentials(ctx, broker, c.Encrypter.Encrypt); err != nil { + return nil, err } broker.Credentials = nil - broker.Catalog = nil - return util.NewJSONResponse(http.StatusOK, broker) } -func (c *Controller) getBrokerCatalog(ctx context.Context, broker *types.Broker) (json.RawMessage, error) { - osbClient, err := osbClient(ctx, c.OSBClientCreateFunc, broker) +func convertExistingCatalogToMaps(serviceOfferings []*types.ServiceOffering) (map[string]*types.ServiceOffering, map[string]*types.ServicePlan) { + serviceOfferingsMap := make(map[string]*types.ServiceOffering) + servicePlansMap := make(map[string]*types.ServicePlan) + + for serviceOfferingIndex := range serviceOfferings { + serviceOfferingsMap[serviceOfferings[serviceOfferingIndex].CatalogID] = serviceOfferings[serviceOfferingIndex] + for servicePlanIndex := range serviceOfferings[serviceOfferingIndex].Plans { + servicePlansMap[serviceOfferings[serviceOfferingIndex].Plans[servicePlanIndex].CatalogID] = serviceOfferings[serviceOfferingIndex].Plans[servicePlanIndex] + } + } + + return serviceOfferingsMap, servicePlansMap +} + +func (c *Controller) getBrokerCatalog(ctx context.Context, broker *types.Broker) (*osbc.CatalogResponse, error) { + osbClient, err := osbcClient(ctx, c.OSBClientCreateFunc, broker) if err != nil { return nil, err } catalog, err := osbClient.GetCatalog() if err != nil { - return nil, fmt.Errorf("Error fetching catalog from broker %s: %v", broker.Name, err) + return nil, fmt.Errorf("error fetching catalog from broker %s: %s", broker.Name, err) + } + + return catalog, nil +} + +func getBrokerCatalogServicesAndPlans(catalog *osbc.CatalogResponse) ([]*osbc.Service, map[string][]*osbc.Plan, error) { + services := make([]*osbc.Service, 0, len(catalog.Services)) + plans := make(map[string][]*osbc.Plan) + + for serviceIndex := range catalog.Services { + services = append(services, &catalog.Services[serviceIndex]) + plansForService := make([]*osbc.Plan, 0) + for planIndex := range catalog.Services[serviceIndex].Plans { + plansForService = append(plansForService, &catalog.Services[serviceIndex].Plans[planIndex]) + } + plans[catalog.Services[serviceIndex].ID] = plansForService } + return services, plans, nil +} - bytes, err := json.Marshal(catalog) +func osbcCatalogServiceToServiceOffering(serviceOffering *types.ServiceOffering, service *osbc.Service) error { + serviceTagsBytes, err := json.Marshal(service.Tags) if err != nil { - return nil, err + return fmt.Errorf("could not marshal service tags: %s", err) + } + serviceRequiresBytes, err := json.Marshal(service.Requires) + if err != nil { + return fmt.Errorf("could not marshal service requires: %s", err) + } + serviceMetadataBytes, err := json.Marshal(service.Metadata) + if err != nil { + return fmt.Errorf("could not marshal service metadata: %s", err) } - return json.RawMessage(bytes), nil + serviceOffering.Name = service.Name + serviceOffering.Description = service.Description + serviceOffering.Bindable = service.Bindable + serviceOffering.InstancesRetrievable = service.BindingsRetrievable + serviceOffering.BindingsRetrievable = service.BindingsRetrievable + serviceOffering.PlanUpdatable = boolPointerToBool(service.PlanUpdatable, serviceOffering.PlanUpdatable) + serviceOffering.CatalogID = service.ID + serviceOffering.CatalogName = service.Name + serviceOffering.Tags = json.RawMessage(serviceTagsBytes) + serviceOffering.Requires = json.RawMessage(serviceRequiresBytes) + serviceOffering.Metadata = json.RawMessage(serviceMetadataBytes) + + return nil } -func osbClient(ctx context.Context, createFunc osbc.CreateFunc, broker *types.Broker) (osbc.Client, error) { - config := clientConfigForBroker(broker) - log.C(ctx).Debug("Building OSB client for serviceBroker with name: ", config.Name, " accessible at: ", config.URL) - return createFunc(config) +func osbcCatalogPlanToServicePlan(servicePlan *types.ServicePlan, plan *catalogPlanWithServiceOfferingID) error { + planMetadataBytes, err := json.Marshal(plan.Metadata) + if err != nil { + return fmt.Errorf("could not marshal plan metadata: %s", err) + } + schemasBytes := make([]byte, 0) + if plan.Schemas != nil { + schemasBytes, err = json.Marshal(plan.Schemas) + if err != nil { + return fmt.Errorf("could not marshal plan service instance create schema: %s", err) + } + } + + servicePlan.Name = plan.Plan.Name + servicePlan.Description = plan.Plan.Description + servicePlan.CatalogID = plan.Plan.ID + servicePlan.CatalogName = plan.Plan.Name + servicePlan.Free = boolPointerToBool(plan.Plan.Free, servicePlan.Free) + servicePlan.Bindable = boolPointerToBool(plan.Plan.Bindable, plan.ServiceOffering.Bindable) + servicePlan.PlanUpdatable = boolPointerToBool(&plan.ServiceOffering.PlanUpdatable, servicePlan.PlanUpdatable) + servicePlan.Metadata = json.RawMessage(planMetadataBytes) + servicePlan.Schemas = schemasBytes + servicePlan.ServiceOfferingID = plan.ServiceOffering.ID + + return nil } -func clientConfigForBroker(broker *types.Broker) *osbc.ClientConfiguration { +func osbcClient(ctx context.Context, createFunc osbc.CreateFunc, broker *types.Broker) (osbc.Client, error) { config := osbc.DefaultClientConfiguration() config.Name = broker.Name config.URL = broker.BrokerURL @@ -208,7 +342,8 @@ func clientConfigForBroker(broker *types.Broker) *osbc.ClientConfiguration { Password: broker.Credentials.Basic.Password, }, } - return config + log.C(ctx).Debug("Building OSB client for service broker with name: ", config.Name, " accessible at: ", config.URL) + return createFunc(config) } func transformBrokerCredentials(ctx context.Context, broker *types.Broker, transformationFunc func(context.Context, []byte) ([]byte, error)) error { @@ -221,3 +356,148 @@ func transformBrokerCredentials(ctx context.Context, broker *types.Broker, trans } return nil } + +func boolPointerToBool(value *bool, defaultValue bool) bool { + if value == nil { + return defaultValue + } + return *value +} + +func (c *Controller) resyncBrokerAndCatalog(ctx context.Context, broker *types.Broker) error { + catalog, err := c.getBrokerCatalog(ctx, broker) + if err != nil { + return err + } + log.C(ctx).Debugf("Updating catalog storage for broker with id %s", broker.ID) + if err := c.Repository.InTransaction(ctx, func(ctx context.Context, storage storage.Warehouse) error { + if err := storage.Broker().Update(ctx, broker); err != nil { + return util.HandleStorageError(err, "broker", broker.ID) + } + + existingServiceOfferingsWithServicePlans, err := storage.ServiceOffering().ListWithServicePlansByBrokerID(ctx, broker.ID) + if err != nil { + return err + } + existingServicesOfferingsMap, existingServicePlansMap := convertExistingCatalogToMaps(existingServiceOfferingsWithServicePlans) + log.C(ctx).Debugf("Found %d services and %d plans currently known for broker", len(existingServicesOfferingsMap), len(existingServicePlansMap)) + + catalogServices, catalogPlansMap, err := getBrokerCatalogServicesAndPlans(catalog) + if err != nil { + return err + } + log.C(ctx).Debugf("Found %d services and %d plans in catalog for broker with id %s", len(catalogServices), len(catalogPlansMap), broker.ID) + + catalogPlans := make([]*catalogPlanWithServiceOfferingID, 0) + + log.C(ctx).Debugf("Resyncing service offerings for broker with id %s...", broker.ID) + for _, catalogService := range catalogServices { + existingServiceOffering, ok := existingServicesOfferingsMap[catalogService.ID] + delete(existingServicesOfferingsMap, catalogService.ID) + if ok { + if err := osbcCatalogServiceToServiceOffering(existingServiceOffering, catalogService); err != nil { + return err + } + existingServiceOffering.UpdatedAt = time.Now().UTC() + + if err := existingServiceOffering.Validate(); err != nil { + return fmt.Errorf("service offering constructed during catalog update for broker %s is invalid: %s", broker.ID, err) + } + if err := c.Repository.ServiceOffering().Update(ctx, existingServiceOffering); err != nil { + return util.HandleStorageError(err, "service_offering", existingServiceOffering.ID) + } + } else { + serviceUUID, err := uuid.NewV4() + if err != nil { + return fmt.Errorf("could not generate GUID for service_plan: %s", err) + } + serviceOffering := &types.ServiceOffering{} + if err := osbcCatalogServiceToServiceOffering(serviceOffering, catalogService); err != nil { + return err + } + serviceOffering.ID = serviceUUID.String() + serviceOffering.CreatedAt = time.Now().UTC() + serviceOffering.UpdatedAt = time.Now().UTC() + serviceOffering.BrokerID = broker.ID + + if err := serviceOffering.Validate(); err != nil { + return fmt.Errorf("service offering constructed during catalog update for broker %s is invalid: %s", broker.ID, err) + } + if err := c.Repository.ServiceOffering().Create(ctx, serviceOffering); err != nil { + return util.HandleStorageError(err, "service_offering", existingServiceOffering.ID) + } + } + + catalogPlansForService := catalogPlansMap[catalogService.ID] + for catalogPlanOfCatalogServiceIndex := range catalogPlansForService { + catalogPlan := &catalogPlanWithServiceOfferingID{ + Plan: catalogPlansForService[catalogPlanOfCatalogServiceIndex], + ServiceOffering: existingServiceOffering, + } + catalogPlans = append(catalogPlans, catalogPlan) + } + } + + for _, existingServiceOffering := range existingServicesOfferingsMap { + if err := c.Repository.ServiceOffering().Delete(ctx, existingServiceOffering.ID); err != nil { + return util.HandleStorageError(err, "service_offering", existingServiceOffering.ID) + } + } + log.C(ctx).Debugf("Successfully resynced service offerings for broker with id %s", broker.ID) + + log.C(ctx).Debugf("Resyncing service plans for broker with id %s", broker.ID) + for _, catalogPlan := range catalogPlans { + existingServicePlan, ok := existingServicePlansMap[catalogPlan.ID] + delete(existingServicePlansMap, catalogPlan.ID) + if ok { + if err := osbcCatalogPlanToServicePlan(existingServicePlan, catalogPlan); err != nil { + return err + } + existingServicePlan.UpdatedAt = time.Now().UTC() + + if err := existingServicePlan.Validate(); err != nil { + return fmt.Errorf("service plan constructed during catalog update for broker %s is invalid: %s", broker.ID, err) + } + if err := c.Repository.ServicePlan().Update(ctx, existingServicePlan); err != nil { + return util.HandleStorageError(err, "service_plan", existingServicePlan.ID) + } + } else { + planUUID, err := uuid.NewV4() + if err != nil { + return fmt.Errorf("could not generate GUID for service_plan: %s", err) + } + servicePlan := &types.ServicePlan{} + if err := osbcCatalogPlanToServicePlan(servicePlan, catalogPlan); err != nil { + return err + } + servicePlan.ID = planUUID.String() + servicePlan.CreatedAt = time.Now().UTC() + servicePlan.UpdatedAt = time.Now().UTC() + if err := servicePlan.Validate(); err != nil { + return fmt.Errorf("service plan constructed during catalog update for broker %s is invalid: %s", broker.ID, err) + } + if err := c.Repository.ServicePlan().Create(ctx, servicePlan); err != nil { + return util.HandleStorageError(err, "service_plan", existingServicePlan.ID) + } + } + } + + for _, existingServicePlan := range existingServicePlansMap { + if err := c.Repository.ServicePlan().Delete(ctx, existingServicePlan.ID); err != nil { + if err == util.ErrNotFoundInStorage { + // If the service for the plan was deleted, plan would already be gone + continue + } + return util.HandleStorageError(err, "service_plan", existingServicePlan.ID) + } + } + log.C(ctx).Debugf("Successfully resynced service plans for broker with id %s", broker.ID) + + return nil + }); err != nil { + return err + } + log.C(ctx).Debugf("Successfully updated catalog storage for broker with id %s", broker.ID) + + return nil +} diff --git a/vendor/github.com/Peripli/service-manager/api/filters/authn/basic/basic.go b/vendor/github.com/Peripli/service-manager/api/filters/authn/basic/basic.go index ead05d8f..6c483d8d 100644 --- a/vendor/github.com/Peripli/service-manager/api/filters/authn/basic/basic.go +++ b/vendor/github.com/Peripli/service-manager/api/filters/authn/basic/basic.go @@ -60,6 +60,12 @@ func (ba *basicAuthnFilter) FilterMatchers() []web.FilterMatcher { web.Path(web.BrokersURL + "/**"), }, }, + { + Matchers: []web.Matcher{ + web.Methods(http.MethodGet), + web.Path(web.ServicePlansURL + "/**"), + }, + }, } } diff --git a/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator.go b/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator.go index a0e1670a..fe90753e 100644 --- a/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator.go +++ b/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator.go @@ -96,13 +96,13 @@ func newOIDCConfig(options *options) *goidc.Config { // Authenticate returns information about the user by obtaining it from the bearer token, or an error if security is unsuccessful func (a *oauthAuthenticator) Authenticate(request *http.Request) (*web.User, security.Decision, error) { authorizationHeader := request.Header.Get("Authorization") - if authorizationHeader == "" || !strings.HasPrefix(strings.ToLower(authorizationHeader), "bearer") { + if authorizationHeader == "" || !strings.HasPrefix(strings.ToLower(authorizationHeader), "bearer ") { return nil, security.Abstain, nil } if a.Verifier == nil { return nil, security.Abstain, errors.New("authenticator is not configured") } - token := strings.TrimPrefix(authorizationHeader, "Bearer ") + token := strings.TrimSpace(authorizationHeader[len("Bearer "):]) if token == "" { return nil, security.Deny, nil } diff --git a/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator_test.go b/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator_test.go index e0c62093..079e0426 100644 --- a/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator_test.go +++ b/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/authenticator_test.go @@ -26,8 +26,6 @@ import ( "net/http" "testing" - "errors" - "github.com/Peripli/service-manager/pkg/security" "github.com/Peripli/service-manager/pkg/security/securityfakes" "github.com/Peripli/service-manager/pkg/util" @@ -303,7 +301,7 @@ var _ = Describe("OIDC Authenticator", func() { }) }) - Context("When Authorization header is not bearer", func() { + Context("when Authorization header is not bearer", func() { It("should abstain authentication decision with no error", func() { request.Header.Set("Authorization", "Basic admin:admin") @@ -313,12 +311,13 @@ var _ = Describe("OIDC Authenticator", func() { Context("when Authorization header is bearer", func() { Context("when token is missing", func() { - It("should deny authentication with malformed token error", func() { + It("should deny authentication with no error", func() { request.Header.Set("Authorization", "bearer ") - validateAuthenticationReturns(nil, security.Deny, errors.New("oidc: malformed jwt: square/go-jose: compact JWS format must have three parts")) + validateAuthenticationReturns(nil, security.Deny, nil) }) }) + Context("when token is present", func() { var ( verifier *securityfakes.FakeTokenVerifier @@ -326,78 +325,98 @@ var _ = Describe("OIDC Authenticator", func() { expectedError error ) - BeforeEach(func() { - verifier = &securityfakes.FakeTokenVerifier{} - authenticator = &oauthAuthenticator{Verifier: verifier} + verifyTokenCases := func() { + Context("when verifier returns an error", func() { + BeforeEach(func() { + expectedError = fmt.Errorf("Verifier returned error") - request.Header.Set("Authorization", "Bearer token") - }) + verifier.VerifyReturns(nil, expectedError) + }) - Context("when verifier returns an error", func() { - BeforeEach(func() { - expectedError = fmt.Errorf("Verifier returned error") + It("should deny with an error", func() { + user, decision, err := authenticator.Authenticate(request) - verifier.VerifyReturns(nil, expectedError) + Expect(user).To(BeNil()) + Expect(decision).To(Equal(security.Deny)) + Expect(err).To(Equal(expectedError)) + }) }) - It("should deny with an error", func() { - user, decision, err := authenticator.Authenticate(request) + Context("when returned token cannot extract claims", func() { + var fakeToken *webfakes.FakeTokenData - Expect(user).To(BeNil()) - Expect(decision).To(Equal(security.Deny)) - Expect(err).To(Equal(expectedError)) - }) - }) + BeforeEach(func() { + expectedError = fmt.Errorf("Claims extraction error") - Context("when returned token cannot extract claims", func() { - var fakeToken *webfakes.FakeTokenData + fakeToken = &webfakes.FakeTokenData{} + fakeToken.ClaimsReturns(expectedError) - BeforeEach(func() { - expectedError = fmt.Errorf("Claims extraction error") + verifier.VerifyReturns(fakeToken, nil) - fakeToken = &webfakes.FakeTokenData{} - fakeToken.ClaimsReturns(expectedError) + }) - verifier.VerifyReturns(fakeToken, nil) + It("should deny with an error", func() { + user, decision, err := authenticator.Authenticate(request) + Expect(user).To(BeNil()) + Expect(decision).To(Equal(security.Deny)) + Expect(err).To(Equal(expectedError)) + }) }) - It("should deny with an error", func() { - user, decision, err := authenticator.Authenticate(request) - - Expect(user).To(BeNil()) - Expect(decision).To(Equal(security.Deny)) - Expect(err).To(Equal(expectedError)) + Context("when returned token is valid", func() { + expectedUserName := "test_user" + + BeforeEach(func() { + tokenJSON := fmt.Sprintf(`{"user_name": "%s", "abc": "xyz"}`, expectedUserName) + token := &webfakes.FakeTokenData{} + token.ClaimsStub = func(v interface{}) error { + return json.Unmarshal([]byte(tokenJSON), v) + } + verifier.VerifyReturns(token, nil) + }) + + It("should allow authentication and return user", func() { + user, decision, err := authenticator.Authenticate(request) + + Expect(user).To(Not(BeNil())) + Expect(user.Name).To(Equal(expectedUserName)) + Expect(decision).To(Equal(security.Allow)) + Expect(err).To(BeNil()) + + claims := struct { + Abc string + }{} + err = user.Claims(&claims) + + _, token := verifier.VerifyArgsForCall(0) + Expect(token).To(Equal("token")) + Expect(err).To(BeNil()) + Expect(claims.Abc).To(Equal("xyz")) + }) }) - }) - - Context("when returned token is valid", func() { - expectedUserName := "test_user" + } + Context("when Bearer starts with uppercase", func() { BeforeEach(func() { - tokenJSON := fmt.Sprintf(`{"user_name": "%s", "abc": "xyz"}`, expectedUserName) - token := &webfakes.FakeTokenData{} - token.ClaimsStub = func(v interface{}) error { - return json.Unmarshal([]byte(tokenJSON), v) - } - verifier.VerifyReturns(token, nil) + verifier = &securityfakes.FakeTokenVerifier{} + authenticator = &oauthAuthenticator{Verifier: verifier} + + request.Header.Set("Authorization", "Bearer token") }) - It("should allow authentication and return user", func() { - user, decision, err := authenticator.Authenticate(request) + verifyTokenCases() + }) - Expect(user).To(Not(BeNil())) - Expect(user.Name).To(Equal(expectedUserName)) - Expect(decision).To(Equal(security.Allow)) - Expect(err).To(BeNil()) + Context("when bearer starts with lowercase", func() { + BeforeEach(func() { + verifier = &securityfakes.FakeTokenVerifier{} + authenticator = &oauthAuthenticator{Verifier: verifier} - claims := struct { - Abc string - }{} - err = user.Claims(&claims) - Expect(err).To(BeNil()) - Expect(claims.Abc).To(Equal("xyz")) + request.Header.Set("Authorization", "bearer token") }) + + verifyTokenCases() }) }) }) diff --git a/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/filter.go b/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/filter.go index 97c05f09..cefba8ee 100644 --- a/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/filter.go +++ b/vendor/github.com/Peripli/service-manager/api/filters/authn/oauth/filter.go @@ -39,6 +39,8 @@ func (ba *bearerAuthnFilter) FilterMatchers() []web.FilterMatcher { web.Path( web.BrokersURL+"/**", web.PlatformsURL+"/**", + web.ServiceOfferingsURL+"/**", + web.ServicePlansURL+"/**", ), }, }, diff --git a/vendor/github.com/Peripli/service-manager/api/http_handler.go b/vendor/github.com/Peripli/service-manager/api/http_handler.go index 170afe67..b576d36c 100644 --- a/vendor/github.com/Peripli/service-manager/api/http_handler.go +++ b/vendor/github.com/Peripli/service-manager/api/http_handler.go @@ -17,6 +17,7 @@ package api import ( + "context" "net/http" "github.com/Peripli/service-manager/pkg/log" @@ -27,13 +28,15 @@ import ( // HTTPHandler converts a pkg/web.Handler and pkg/web.HandlerFunc to a standard http.Handler type HTTPHandler struct { - Handler web.Handler + Handler web.Handler + requestBodyMaxSize int } // NewHTTPHandler creates a new HTTPHandler from the provided web.Handler -func NewHTTPHandler(handler web.Handler) *HTTPHandler { +func NewHTTPHandler(handler web.Handler, requestBodyMaxSize int) *HTTPHandler { return &HTTPHandler{ - Handler: handler, + Handler: handler, + requestBodyMaxSize: requestBodyMaxSize, } } @@ -50,6 +53,8 @@ func (h *HTTPHandler) ServeHTTP(res http.ResponseWriter, req *http.Request) { } func (h *HTTPHandler) serve(res http.ResponseWriter, req *http.Request) error { + req.Body = http.MaxBytesReader(res, req.Body, int64(h.requestBodyMaxSize)) + request, err := convertToWebRequest(req) if err != nil { return err @@ -84,6 +89,7 @@ func convertToWebRequest(request *http.Request) (*web.Request, error) { var err error if request.Method == "PUT" || request.Method == "POST" || request.Method == "PATCH" { body, err = util.RequestBodyToBytes(request) + err = isPayloadTooLargeErr(request.Context(), err) } return &web.Request{ @@ -92,3 +98,17 @@ func convertToWebRequest(request *http.Request) (*web.Request, error) { Body: body, }, err } + +func isPayloadTooLargeErr(ctx context.Context, err error) error { + // Go http package uses errors.New() to return the below error, so + // we can only check it with string matching + if err != nil && err.Error() == "http: request body too large" { + log.C(ctx).Errorf(err.Error()) + return &util.HTTPError{ + StatusCode: http.StatusRequestEntityTooLarge, + ErrorType: "PayloadTooLarge", + Description: "Payload too large", + } + } + return err +} diff --git a/vendor/github.com/Peripli/service-manager/api/http_handler_test.go b/vendor/github.com/Peripli/service-manager/api/http_handler_test.go index 3409e760..6d9e5b4b 100644 --- a/vendor/github.com/Peripli/service-manager/api/http_handler_test.go +++ b/vendor/github.com/Peripli/service-manager/api/http_handler_test.go @@ -17,7 +17,9 @@ package api import ( + "bytes" "net/http/httptest" + "strconv" "strings" @@ -34,6 +36,23 @@ import ( . "github.com/onsi/gomega" ) +const ( + bodyMaxSize = 2000000 +) + +func generateJSON(size int) string { + var result bytes.Buffer + result.WriteString(`{`) + size = size / 16 + for i := 0; i < size-1; i++ { + result.WriteString(fmt.Sprintf(`"property%s":"value%s",`, strconv.Itoa(int(size)), strconv.Itoa(int(size)))) + } + result.WriteString(fmt.Sprintf(`"property%s":"value%s"`, strconv.Itoa(int(size)), strconv.Itoa(int(size)))) + result.WriteString(`}`) + + return result.String() +} + var _ = Describe("Handler", func() { const validJSON = `{"key1":"value1","key2":"value2"}` const invalidJSON = `{{{"KEY"` @@ -45,7 +64,7 @@ var _ = Describe("Handler", func() { BeforeEach(func() { fakeHandler = &webfakes.FakeHandler{} responseRecorder = httptest.NewRecorder() - handler = NewHTTPHandler(fakeHandler) + handler = NewHTTPHandler(fakeHandler, bodyMaxSize) }) makeRequest := func(method, path, body string, headers map[string]string) *httptest.ResponseRecorder { @@ -90,6 +109,17 @@ var _ = Describe("Handler", func() { }) }) + Context("when http request has too large body", func() { + Specify("response contains a proper HTTPError", func() { + var bodySize int = 2100000 + response := makeRequest(http.MethodPost, "http://example.com", generateJSON(bodySize), map[string]string{ + "Content-Type": "application/json", + }) + + validateHTTPErrorOccurred(response, http.StatusRequestEntityTooLarge) + }) + }) + Context("when call to web handler returns an error", func() { Specify("response contains a proper HTTPError", func() { handlerError := fmt.Errorf("error") diff --git a/vendor/github.com/Peripli/service-manager/api/osb/osb_controller.go b/vendor/github.com/Peripli/service-manager/api/osb/osb_controller.go index 003b4ab8..d9d4b0ac 100644 --- a/vendor/github.com/Peripli/service-manager/api/osb/osb_controller.go +++ b/vendor/github.com/Peripli/service-manager/api/osb/osb_controller.go @@ -40,21 +40,16 @@ type BrokerFetcher interface { FetchBroker(ctx context.Context, brokerID string) (*types.Broker, error) } -// Controller implements api.Controller by providing OSB API logic +// controller implements api.Controller by providing OSB API logic type controller struct { fetcher BrokerFetcher - proxy *httputil.ReverseProxy } var _ web.Controller = &controller{} // NewController returns new OSB controller -func NewController(fetcher BrokerFetcher, roundTripper http.RoundTripper) web.Controller { +func NewController(fetcher BrokerFetcher, _ http.RoundTripper) web.Controller { return &controller{ - proxy: &httputil.ReverseProxy{ - Transport: roundTripper, - Director: func(req *http.Request) {}, - }, fetcher: fetcher, } } @@ -79,27 +74,49 @@ func (c *controller) handler(r *web.Request) (*web.Response, error) { if err != nil { return nil, err } + logger.Debugf("Fetched broker %s with id %s accessible at %s", broker.ID, broker.Name, broker.BrokerURL) targetBrokerURL, _ := url.Parse(broker.BrokerURL) m := osbPathPattern.FindStringSubmatch(r.URL.Path) if m == nil || len(m) < 2 { - return nil, fmt.Errorf("could not get OSB path from URL %s", r.URL.Path) + return nil, fmt.Errorf("could not get OSB path from URL %s", r.URL) } modifiedRequest := r.Request.WithContext(ctx) modifiedRequest.SetBasicAuth(broker.Credentials.Basic.Username, broker.Credentials.Basic.Password) modifiedRequest.Body = ioutil.NopCloser(bytes.NewReader(r.Body)) modifiedRequest.ContentLength = int64(len(r.Body)) - modifiedRequest.Host = targetBrokerURL.Host modifiedRequest.URL.Path = m[1] - logger.Debugf("Forwarding OSB r to %s", modifiedRequest.URL) + // This is needed because the request is shallow copy of the request to the Service Manager + // This sets the host header to point to the service broker that the request will be proxied to + modifiedRequest.Host = targetBrokerURL.Host proxy := httputil.NewSingleHostReverseProxy(targetBrokerURL) + + director := proxy.Director + proxy.Director = func(request *http.Request) { + director(request) + logger.Debugf("Forwarded OSB request to service broker %s at %s", broker.Name, request.URL) + } + proxy.ModifyResponse = func(response *http.Response) error { + logger.Debugf("Service broker %s replied with status %d", broker.Name, response.StatusCode) + return nil + } + proxy.ErrorHandler = func(writer http.ResponseWriter, request *http.Request, e error) { + logger.WithError(e).Errorf("Error while forwarding request to service broker %s", broker.Name) + util.WriteError(&util.HTTPError{ + ErrorType: "ServiceBrokerErr", + Description: fmt.Sprintf("could not reach service broker %s at %s", broker.Name, request.URL), + StatusCode: http.StatusBadGateway, + }, writer) + } + recorder := httptest.NewRecorder() proxy.ServeHTTP(recorder, modifiedRequest) + respBody, err := ioutil.ReadAll(recorder.Body) if err != nil { return nil, err @@ -107,9 +124,8 @@ func (c *controller) handler(r *web.Request) (*web.Response, error) { resp := &web.Response{ StatusCode: recorder.Code, - Header: recorder.HeaderMap, + Header: recorder.Header(), Body: respBody, } - logger.Debugf("Service broker replied with status %d", resp.StatusCode) return resp, nil } diff --git a/vendor/github.com/Peripli/service-manager/api/platform/platform_controller.go b/vendor/github.com/Peripli/service-manager/api/platform/platform_controller.go index 91391e8b..9a964dde 100644 --- a/vendor/github.com/Peripli/service-manager/api/platform/platform_controller.go +++ b/vendor/github.com/Peripli/service-manager/api/platform/platform_controller.go @@ -21,10 +21,10 @@ import ( "time" "github.com/Peripli/service-manager/pkg/log" + "github.com/Peripli/service-manager/pkg/security" "github.com/Peripli/service-manager/pkg/types" "github.com/Peripli/service-manager/pkg/util" "github.com/Peripli/service-manager/pkg/web" - "github.com/Peripli/service-manager/pkg/security" "github.com/Peripli/service-manager/storage" "github.com/gofrs/uuid" ) @@ -102,7 +102,7 @@ func (c *Controller) getPlatform(r *web.Request) (*web.Response, error) { func (c *Controller) getAllPlatforms(r *web.Request) (*web.Response, error) { ctx := r.Context() log.C(ctx).Debug("Getting all platforms") - platforms, err := c.PlatformStorage.GetAll(ctx) + platforms, err := c.PlatformStorage.List(ctx) if err != nil { return nil, err } diff --git a/vendor/github.com/Peripli/service-manager/api/service_offering/service_offering.go b/vendor/github.com/Peripli/service-manager/api/service_offering/service_offering.go new file mode 100644 index 00000000..3f4c6069 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/api/service_offering/service_offering.go @@ -0,0 +1,44 @@ +/* + * Copyright 2018 The Service Manager 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 service_offering contains logic for building the Service Manager service offerings API +package service_offering + +import ( + "net/http" + + "github.com/Peripli/service-manager/pkg/web" +) + +// Routes returns slice of routes which handle service offering operations +func (c *Controller) Routes() []web.Route { + return []web.Route{ + { + Endpoint: web.Endpoint{ + Method: http.MethodGet, + Path: web.ServiceOfferingsURL + "/{service_offering_id}", + }, + Handler: c.getServiceOffering, + }, + { + Endpoint: web.Endpoint{ + Method: http.MethodGet, + Path: web.ServiceOfferingsURL, + }, + Handler: c.listServiceOfferings, + }, + } +} diff --git a/vendor/github.com/Peripli/service-manager/api/service_offering/service_offering_controller.go b/vendor/github.com/Peripli/service-manager/api/service_offering/service_offering_controller.go new file mode 100644 index 00000000..30a2b966 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/api/service_offering/service_offering_controller.go @@ -0,0 +1,72 @@ +/* + * Copyright 2018 The Service Manager 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 service_offering + +import ( + "net/http" + + "github.com/Peripli/service-manager/pkg/types" + "github.com/Peripli/service-manager/storage" + + "github.com/Peripli/service-manager/pkg/log" + "github.com/Peripli/service-manager/pkg/util" + "github.com/Peripli/service-manager/pkg/web" +) + +const reqServiceOfferingID = "service_offering_id" + +// Controller implements api.Controller by providing service offerings API logic +type Controller struct { + ServiceOfferingStorage storage.ServiceOffering +} + +func (c *Controller) getServiceOffering(r *web.Request) (*web.Response, error) { + serviceOfferingID := r.PathParams[reqServiceOfferingID] + ctx := r.Context() + log.C(ctx).Debugf("Getting service offering with id %s", serviceOfferingID) + + serviceOffering, err := c.ServiceOfferingStorage.Get(ctx, serviceOfferingID) + if err = util.HandleStorageError(err, "service_offering", serviceOfferingID); err != nil { + return nil, err + } + return util.NewJSONResponse(http.StatusOK, serviceOffering) +} + +func (c *Controller) listServiceOfferings(r *web.Request) (*web.Response, error) { + var serviceOfferings []*types.ServiceOffering + var err error + ctx := r.Context() + log.C(ctx).Debug("Listing service offerings") + + query := r.URL.Query() + catalogName := query.Get("catalog_name") + if catalogName != "" { + log.C(ctx).Debugf("Filtering list by catalog_name=%s", catalogName) + serviceOfferings, err = c.ServiceOfferingStorage.ListByCatalogName(ctx, catalogName) + } else { + serviceOfferings, err = c.ServiceOfferingStorage.List(ctx) + } + if err != nil { + return nil, err + } + + return util.NewJSONResponse(http.StatusOK, struct { + ServiceOfferings []*types.ServiceOffering `json:"service_offerings"` + }{ + ServiceOfferings: serviceOfferings, + }) +} diff --git a/vendor/github.com/Peripli/service-manager/api/service_plan/service_plan.go b/vendor/github.com/Peripli/service-manager/api/service_plan/service_plan.go new file mode 100644 index 00000000..9824f3ca --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/api/service_plan/service_plan.go @@ -0,0 +1,44 @@ +/* + * Copyright 2018 The Service Manager 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 service_offering contains logic for building the Service Manager service plans API +package service_plan + +import ( + "net/http" + + "github.com/Peripli/service-manager/pkg/web" +) + +// Routes returns slice of routes which handle service plan operations +func (c *Controller) Routes() []web.Route { + return []web.Route{ + { + Endpoint: web.Endpoint{ + Method: http.MethodGet, + Path: web.ServicePlansURL + "/{service_plan_id}", + }, + Handler: c.getServicePlan, + }, + { + Endpoint: web.Endpoint{ + Method: http.MethodGet, + Path: web.ServicePlansURL, + }, + Handler: c.ListServicePlans, + }, + } +} diff --git a/vendor/github.com/Peripli/service-manager/api/service_plan/service_plan_controller.go b/vendor/github.com/Peripli/service-manager/api/service_plan/service_plan_controller.go new file mode 100644 index 00000000..c7f49fa2 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/api/service_plan/service_plan_controller.go @@ -0,0 +1,71 @@ +/* + * Copyright 2018 The Service Manager 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 service_plan + +import ( + "net/http" + + "github.com/Peripli/service-manager/pkg/log" + "github.com/Peripli/service-manager/pkg/types" + "github.com/Peripli/service-manager/pkg/util" + "github.com/Peripli/service-manager/pkg/web" + "github.com/Peripli/service-manager/storage" +) + +const reqServicePlanID = "service_plan_id" + +// Controller implements api.Controller by providing service plans API logic +type Controller struct { + ServicePlanStorage storage.ServicePlan +} + +func (c *Controller) getServicePlan(r *web.Request) (*web.Response, error) { + servicePlanID := r.PathParams[reqServicePlanID] + ctx := r.Context() + log.C(ctx).Debugf("Getting service plan with id %s", servicePlanID) + + servicePlan, err := c.ServicePlanStorage.Get(ctx, servicePlanID) + if err = util.HandleStorageError(err, "service_plan", servicePlanID); err != nil { + return nil, err + } + return util.NewJSONResponse(http.StatusOK, servicePlan) +} + +func (c *Controller) ListServicePlans(r *web.Request) (*web.Response, error) { + var servicePlans []*types.ServicePlan + var err error + ctx := r.Context() + log.C(ctx).Debug("Listing service plans") + + query := r.URL.Query() + catalogName := query.Get("catalog_name") + if catalogName != "" { + log.C(ctx).Debugf("Filtering list by catalog_name=%s", catalogName) + servicePlans, err = c.ServicePlanStorage.ListByCatalogName(ctx, catalogName) + } else { + servicePlans, err = c.ServicePlanStorage.List(ctx) + } + if err != nil { + return nil, err + } + + return util.NewJSONResponse(http.StatusOK, struct { + ServicePlans []*types.ServicePlan `json:"service_plans"` + }{ + ServicePlans: servicePlans, + }) +} diff --git a/vendor/github.com/Peripli/service-manager/application.yml b/vendor/github.com/Peripli/service-manager/application.yml index bb792777..32af3969 100644 --- a/vendor/github.com/Peripli/service-manager/application.yml +++ b/vendor/github.com/Peripli/service-manager/application.yml @@ -2,16 +2,17 @@ server: request_timeout: 4000ms shutdown_timeout: 4000ms port: 8080 + # max_body_bytes: 4000 + # max_header_bytes: 1000 log: level: debug format: text storage: - uri: postgres://postgres:postgres@192.168.99.100:5432/postgres?sslmode=disable -#storage: # name: sm-postgres + uri: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable + encryption_key: ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8 + skip_ssl_validation: false api: - token_issuer_url: https://uaa.local.pcfdev.io + token_issuer_url: http://localhost:8080/uaa client_id: sm - security: - encryption_key: ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8 skip_ssl_validation: false diff --git a/vendor/github.com/Peripli/service-manager/build/ldflags b/vendor/github.com/Peripli/service-manager/build/ldflags new file mode 100644 index 00000000..eaaa5057 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/build/ldflags @@ -0,0 +1,9 @@ +#!/bin/sh + +# this script injects the version by generating proper go build options + +VERSION_PACKAGE=github.com/Peripli/service-manager/version +GIT_COMMIT=$(git rev-list -1 HEAD) +VERSION=$(git describe --tags) +>&2 echo Version=$VERSION GitCommit=$GIT_COMMIT +echo "-X $VERSION_PACKAGE.GitCommit=$GIT_COMMIT -X $VERSION_PACKAGE.Version=$VERSION" diff --git a/vendor/github.com/Peripli/service-manager/cf/env.go b/vendor/github.com/Peripli/service-manager/cf/env.go index 694097f4..42609d39 100644 --- a/vendor/github.com/Peripli/service-manager/cf/env.go +++ b/vendor/github.com/Peripli/service-manager/cf/env.go @@ -17,7 +17,7 @@ package cf import ( - "fmt" + "fmt" "os" "github.com/Peripli/service-manager/pkg/env" diff --git a/vendor/github.com/Peripli/service-manager/config/config_test.go b/vendor/github.com/Peripli/service-manager/config/config_test.go index 6e5c5650..b7771d0c 100644 --- a/vendor/github.com/Peripli/service-manager/config/config_test.go +++ b/vendor/github.com/Peripli/service-manager/config/config_test.go @@ -53,8 +53,8 @@ var _ = Describe("config", func() { config.Storage.URI = "postgres://postgres:postgres@localhost:5555/postgres?sslmode=disable" config.API.TokenIssuerURL = "http://example.com" config.API.ClientID = "sm" - config.API.Security.EncryptionKey = "ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8" config.API.SkipSSLValidation = true + config.Storage.EncryptionKey = "ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8" }) Context("when config is valid", func() { @@ -99,13 +99,20 @@ var _ = Describe("config", func() { }) }) - Context("when Storage URI is missing", func() { + Context("when Repository URI is missing", func() { It("returns an error", func() { config.Storage.URI = "" assertErrorDuringValidate() }) }) + Context("when Repository Encryption key is missing", func() { + It("returns an error", func() { + config.Storage.EncryptionKey = "" + assertErrorDuringValidate() + }) + }) + Context("when API token issuer URL is missing", func() { It("returns an error", func() { config.API.TokenIssuerURL = "" @@ -115,7 +122,6 @@ var _ = Describe("config", func() { }) Describe("New", func() { - var ( fakeEnv *envfakes.FakeEnvironment creationError = fmt.Errorf("creation error") diff --git a/vendor/github.com/Peripli/service-manager/deployment/cf/manifest.yml b/vendor/github.com/Peripli/service-manager/deployment/cf/manifest.yml index dedd5243..579aa363 100644 --- a/vendor/github.com/Peripli/service-manager/deployment/cf/manifest.yml +++ b/vendor/github.com/Peripli/service-manager/deployment/cf/manifest.yml @@ -2,17 +2,19 @@ applications: - name: service-manager memory: 64M - services: - - + services: docker: - image: quay.io/service-manager/core:v0.1.0 + image: quay.io/service-manager/core:v0.1.1 env: - GOVERSION: go1.10 + GOVERSION: go1.11 GOPACKAGENAME: github.com/Peripli/service-manager LOG_FORMAT: json LOG_LEVEL: info - STORAGE_NAME: - API_TOKEN_ISSUER_URL: + API_TOKEN_ISSUER_URL: https://uaa.dev.cfdev.sh API_CLIENT_ID: cf - API_SECURITY_ENCRYPTION_KEY: ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8 - API_SKIP_SSL_VALIDATION: false + API_SKIP_SSL_VALIDATION: true + STORAGE_ENCRYPTION_KEY: ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8 + STORAGE_NAME: + STORAGE_SKIP_SSL_VALIDATION: false + # Set STORAGE_URI and remove STORAGE_NAME if using external postgreSQL + # STORAGE_URI: postgres://postgres:postgres@10.0.2.2:5432/postgres?sslmode=disable diff --git a/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/templates/sm03-deployment.yaml b/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/templates/sm03-deployment.yaml index 1b7c31ae..b0868f98 100644 --- a/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/templates/sm03-deployment.yaml +++ b/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/templates/sm03-deployment.yaml @@ -37,15 +37,19 @@ spec: secretKeyRef: name: {{ template "service-manager.fullname" . }}-secret key: uri - - name: API_SECURITY_ENCRYPTION_KEY + - name: STORAGE_ENCRYPTION_KEY valueFrom: secretKeyRef: name: {{ template "service-manager.fullname" . }}-secret key: encryption_key args: + {{- if .Values.storage.migrations_url }} + - "--storage.migrations_url={{ .Values.storage.migrations_url }}" + {{- end }} - "--file.location={{ .Values.file.location }}" - "--file.name={{ .Values.file.name }}" - "--file.format={{ .Values.file.format }}" + - "--storage.skip_ssl_validation={{ .Values.storage.skip_ssl_validation }}" ports: - name: http containerPort: 8080 diff --git a/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/values.yaml b/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/values.yaml index fea20498..487cde5e 100644 --- a/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/values.yaml +++ b/vendor/github.com/Peripli/service-manager/deployment/k8s/charts/service-manager/values.yaml @@ -24,6 +24,10 @@ postgresql: persistence: size: 1Gi +storage: + migrations_url: "" + skip_ssl_validation: false + file: name: application location: /etc/config diff --git a/vendor/github.com/Peripli/service-manager/docs/README.md b/vendor/github.com/Peripli/service-manager/docs/README.md index c4f16abc..566d69c8 100644 --- a/vendor/github.com/Peripli/service-manager/docs/README.md +++ b/vendor/github.com/Peripli/service-manager/docs/README.md @@ -15,6 +15,7 @@ The `docs` folder contains end-to-end documentation for the Service Manager and ## Installation * [Installation Guide](./install/README.md) + * [Prerequisites](./development/install-prerequisites.md) * [Install Service Manager](./install/sm.md) * [Install smctl](./install/cli.md) * [Install CF Proxy](./install/cf-proxy.md) @@ -23,9 +24,10 @@ The `docs` folder contains end-to-end documentation for the Service Manager and ## Development * [Developer's Guide](./development/README.md) + * [Run Components Locally](./development/local.md) * [Source Code Repositories](./development/repositories-structure.md) * [Build Components](./development/build.md) - * [Running Tests](./development/tests.md) + * [Run Tests](./development/tests.md) * [Manage Dependencies](./development/dep.md) * [Extensions](./development/extensions.md) * [Contribution Process](./development/contrib-process.md) \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-manager/docs/development/README.md b/vendor/github.com/Peripli/service-manager/docs/development/README.md index ad4b0d35..a3d6eac4 100644 --- a/vendor/github.com/Peripli/service-manager/docs/development/README.md +++ b/vendor/github.com/Peripli/service-manager/docs/development/README.md @@ -4,11 +4,11 @@ This page intends to get you up-and-running with the Service Manager project. -If you are interested in contributing, take a look at the [contribution guide](../../CONTRIBUTING.md). +If you are interested in contributing, take a look at the [contribution guide](./../../CONTRIBUTING.md). -## [Prerequisites](prerequisites.md) +## [Prerequisites](develop-prerequisites.md) -In order to setup development environment for the project you would need some preinstalled tools. +## [Run Locally](local.md) ## [Repository Structure](repositories-structure.md) diff --git a/vendor/github.com/Peripli/service-manager/docs/development/build.md b/vendor/github.com/Peripli/service-manager/docs/development/build.md index 9df1681f..80dd5fb3 100644 --- a/vendor/github.com/Peripli/service-manager/docs/development/build.md +++ b/vendor/github.com/Peripli/service-manager/docs/development/build.md @@ -3,6 +3,7 @@ **Note**: See [Prerequisite](sm-tools.md) You can set the docker client to the Minikube docker environment by executing: + * windows: ```@FOR /f "tokens=*" %i IN ('minikube docker-env') DO @%i``` * linux/mac: ```eval $(minikube docker-env)``` @@ -11,14 +12,15 @@ You can set the docker client to the Minikube docker environment by executing: Navigate to the project root directory. The following command will build Service Manager binary and put it in the *bin* folder. Make sure you set `PLATFORM` and `ARCH` environment variable to your platform and architecture: + ```console -$ make build +make build ``` Alternatively you can build a docker image: ```console -$ docker build -t "service-manager:latest" -f Dockerfile . +docker build -t "service-manager:latest" -f Dockerfile . ``` @@ -27,13 +29,15 @@ $ docker build -t "service-manager:latest" -f Dockerfile . Navigate to the project root directory. First fetch all dependencies: + ```console -$ dep ensure -v --vendor-only +dep ensure -v --vendor-only ``` To build an executable run the following command: + ```console -$ go build -o cf-proxy github.com/Peripli/service-broker-proxy-cf +go build -o cf-proxy github.com/Peripli/service-broker-proxy-cf ``` ## [K8S Proxy (Agent)](https://github.com/Peripli/service-broker-proxy-k8s) @@ -41,8 +45,9 @@ $ go build -o cf-proxy github.com/Peripli/service-broker-proxy-cf Navigate to the project root directory. Build the image: + ```console -$ docker build -t "sb-proxy-k8s:latest" -f Dockerfile . +docker build -t "sb-proxy-k8s:latest" -f Dockerfile . ``` If you have set your docker client to the Minikube docker you can directly use the above image to run a pod with the k8s proxy. diff --git a/vendor/github.com/Peripli/service-manager/docs/development/dep.md b/vendor/github.com/Peripli/service-manager/docs/development/dep.md index 134cf951..d1b0c606 100644 --- a/vendor/github.com/Peripli/service-manager/docs/development/dep.md +++ b/vendor/github.com/Peripli/service-manager/docs/development/dep.md @@ -3,26 +3,26 @@ We use [dep](https://golang.github.io/dep) to manage the project dependencies. Currently we do not commit the vendor directory. If a new branch is pulled, delete your local vendor directory and then run `dep ensure -v --vendor-only` to install the dependencies. -* Gopkg.toml - the dep manifest, this is intended to be hand-edited and contains a set of -constraints and other rules for dep to apply when selecting appropriate versions of dependencies. +* Gopkg.toml - the dep manifest, this is intended to be hand-edited and contains a set of constraints and other rules for dep to apply when selecting appropriate versions of dependencies. * Gopkg.lock - the dep lockfile, do not edit because it is a generated file. If you use [VS Code](https://code.visualstudio.com), we recommend installing the [dep extension](https://marketplace.visualstudio.com/items?itemName=carolynvs.dep). It provides snippets and improved highlighting that makes it easier to work with dep. ## Selecting the version for a dependency + * Use released versions of a dependency, for example v1.2.3. * Use the master branch when a dependency does not tag releases, or we require an unreleased change. * Include an explanatory comment with a link to any relevant issues anytime a dependency is pinned to a specific revision in Gopkg.toml. ## Add a new dependency -1. Run `dep ensure -add github.com/example/project/pkg/foo`. This adds a constraint to Gopkg.toml, -and downloads the dependency to vendor/. + +1. Run `dep ensure -add github.com/example/project/pkg/foo`. This adds a constraint to Gopkg.toml and downloads the dependency to vendor/. 2. Import the package in the code and use it. 3. Run `dep ensure -v` to sync Gopkg.lock and vendor/ with your changes. ## Change the version of a dependency -1. Edit Gopkg.toml and update the version for the project. If the project is not in -Gopkg.toml already, add a constraint for it and set the version. + +1. Edit Gopkg.toml and update the version for the project. If the project is not in Gopkg.toml already, add a constraint for it and set the version. 2. Run `dep ensure -v` to sync Gopkg.lock and vendor/ with the updated version. diff --git a/vendor/github.com/Peripli/service-manager/docs/development/develop-prerequisites.md b/vendor/github.com/Peripli/service-manager/docs/development/develop-prerequisites.md new file mode 100644 index 00000000..58cfe1d7 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/docs/development/develop-prerequisites.md @@ -0,0 +1,88 @@ +# Prerequisites + +The prerequisites page contains details about all the tools that are needed for instaling / developing the Service Manager Components. + +## Local Development Prerequisites + +Prerequisites required for installing the Service Manager (and/or the CF and K8S Proxies) on `localhost`, performing builds, running tests, etc... + +### Git + +Setup is described [here](https://git-scm.com/) + +### Go + +Currently Service Manager requires Go version 1.10. Installation steps can be found [here](https://golang.org/doc/install). + +### Dep + +Most of the Service Manager github repositories do not include a `vendor` folder. You would need to have `dep` installed and run `dep ensure --vendor-only` to download the project dependencies. Installation details can be found [here](https://github.com/golang/dep#installation). + +### GNU Make + +Makefiles are provided in the repositories. In order to use them, one would need to setup `make` as described [here](https://www.gnu.org/software/make/manual/make.html). + +**Note:** Running `make help` would print out the Makefile documentation. + +### Docker + +* [Docker for Windows](https://docs.docker.com/docker-for-mac/install/) +* [Docker for Mac](https://docs.docker.com/docker-for-windows/install/) + +### Postgres on Docker + +```console +$ docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -d postgres +``` + +**Note:** If you are using `Docker for Window` or `Docker for Mac`, the database URI should be `postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable`. Otherwise, instead of `localhost` you would need to use the `$(docker-machine ip)`. + +The obtained value can be used to set the Service Manger `STORAGE_URI`. + +## Local K8S Setup + +### minikube + +A locally running K8S Cluster. Check the [minikube installation guide](https://kubernetes.io/docs/getting-started-guides/minikube/#installation.) + +Alternatively, **Windows** users may follow these steps: + +* Setup chocolately package manager + +```powershell + @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" +``` + +* Install minikube + + ```bat + choco install minikube + ``` + +>**Note:** In order to reuse the docker daemon and speed up local development check the [Reusing the Docker daemon section of the minikube getting started guide](https://kubernetes.io/docs/getting-started-guides/minikube/#reusing-the-docker-daemon) + +### Fulfill the K8S Deployment Prerequisites + +The [kubernetes deployment prerequisites]() section outlines some additional steps you would need to perform to fully setup the development environment. + +## Local CF Setup + +### PCF Dev + +A locally running CF installation that includes an Authorization Server (UAA). Installation steps for PCFDev can be found [here](https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry-dev/introduction). + +### CF Dev + +Alternatively, instead of `PCF Dev` one can use [CF Dev](https://github.com/cloudfoundry-incubator/cfdev) + +**Note**: Installing `PCF Dev` or `CF Dev` also includes an Authrization Server(UAA). To get the CF UAA URL you can execute the following command (you need to install [jq](https://stedolan.github.io/jq/)): + +```console +cf curl /v2/info | jq .token_endpoint +``` + +The obtained value can be used to set the Service Manager `API_TOKEN_ISSUER_URL`. + +### Fulfill the Deployment Prerequisites + +Depending on which pieces of the SM you will be developing on, you would need to fulfill the relevant deployment prerequisites in order to eventually be able to run/start/install the Service Manager components. For further details, check the [installation prerequisites page](install-prerequisites.md). \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-manager/docs/development/extensions.md b/vendor/github.com/Peripli/service-manager/docs/development/extensions.md index 3419a571..a26ca8a2 100644 --- a/vendor/github.com/Peripli/service-manager/docs/development/extensions.md +++ b/vendor/github.com/Peripli/service-manager/docs/development/extensions.md @@ -163,7 +163,7 @@ All other errors will result in status 500 (Internal Server Error) being returne ## Controllers -Controllers provide means to add additional APIs to the Service Manager. The Service Manager `pkg/web` package exposes interfaces one should implement in order to add additional SM APIs. +Controllers provide means to add additional APIs to the Service Manager. A controlle is a way to group a set of routes. Registering a controller in the Service Manager would register the controller routes with their respective handlers as part of the REST API. The registration happens only during Service Manager startup. The Service Manager `pkg/web` package exposes interfaces one should implement in order to add additional SM APIs. ### Example Controller @@ -236,3 +236,7 @@ func main() { sm.Run() } ``` + +## Extensions in the Service Broker Proxies + +The service broker proxies (currently the [K8S proxy](https://github.com/Peripli/service-broker-proxy-k8s) and the [CF proxy](httyps://github.com/Peripli/service-broker-proxy-cf)) that base their implementation on the [Broker Proxy Framework](https://github.com/Peripli/service-broker-proxy) by default get the same extension capabilities that the Service Manager has. This would imply that one can register filters, plugins, controllers and health indicators as extensions in the proxies, too. diff --git a/vendor/github.com/Peripli/service-manager/docs/development/install-prerequisites.md b/vendor/github.com/Peripli/service-manager/docs/development/install-prerequisites.md new file mode 100644 index 00000000..c4901b03 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/docs/development/install-prerequisites.md @@ -0,0 +1,124 @@ +# Prerequisites + +Prerequisites that will help you get ready to deploy/run the Service Manager components. + +## General Deployment Prerequisites + +Generally required prerequisites in order to get started with the Service Manager. These would be required no matter where the Service Manager would be installed. + +### Git + +Setup is described [here](https://git-scm.com/) + +### Go + +Currently Service Manager requires Go version 1.10. Installation steps can be found [here](https://golang.org/doc/install). + +### Dep + +Most of the Service Manager github repositories do not include a `vendor` folder. You would need to have `dep` installed and run `dep ensure --vendor-only` to download the project dependencies. Installation details can be found [here](https://github.com/golang/dep#installation). + +### smctl + +Install `smctl` as described [here](https://github.com/Peripli/service-manager-cli/blob/master/README.md). + +**Note:** `smctl` is required to register the proxies as platforms in SM and obtain credentials that they can use to access the SM APIs. + +### Postgres Database + +The Service Manager uses a Postgres database to store its data. The database could be running as a CF service, K8S deployment or externally. + +In the end, what is important is for the Service Manager to have `STORAGE_URI` env var or `storage.uri` pflag provided and the value should be an accessible postgres URI. + +If SM will be running in CF and the CF installation offers a postgres backing service, one could bind a postges service instance to SM and set the `STORAGE_NAME` env var or the `storage.name` pflag to the name of the postgres service instance. This would internally take care of setting the `storage URI`. More details can be found in the respective [CF instllation section](./../install/sm.md#run-on-cf). + +If SM will be running on K8S, there are helm chart parameters which indicate whether to use an external postgres database or to setup one as part of the helm installation. More details can be found in the respective [K8S instllation section](./../install/sm.md#run-on-kubernetes). + +**Note:** A postgres database is required to run the Service Manager. The proxies do not use a database. + +### Authorization Server + +You need to have an OAuth server to be used by the Service Manager. This OAuth server must support [OpenID Connect Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html). In a CF installation this could be the CF UAA. + +In the end, what is important is for the Service Manager to have `API_TOKEN_ISSUER_URL` env var or `api.token_issuer_url` pflag provided pointing to an accessible OAuth2 OpenID-compliant Authorization Server. + +If SM will be running on CF, one could use UAA's token endpoint. + +If SM will be running on K8S, one could provide a URL to an Authorization Server as part of the helm installation. + +**Note:** An authorization server is required to run the Service Manager. The proxies do not use an authorization server. + +### OSB-compliant platforms (CF/K8S with service catalog) + +In order to run the Service Broker Proxies, actual platforms are required. + +The CF Proxy calls Cloud Controller APIs for service broker management and service access enablement and therefore requires a Cloud Foundry installation. + +The K8S proxy calls service catalog APIs for service broker management and requires a K8S cluster with service catalog installed. + +**Note:** The Service Manager itself does not talk to the platforms , so technically if you want to run just the Service Manager, you may do so without any OSB-compliant platforms provided that you have a place to actually deploy SM. + +## Kubernetes Deployment Prerequisites + +Additional prerequisites to the [general deployment prerequisites](#general-deployment-prerequisites) required for installing the Service Manager (and/or the K8S Proxy) on a K8S Cluster. + +### kubectl + +Setup `kubectl` as described [here](https://kubernetes.io/docs/tasks/tools/install-kubectl/). Also install the [svcat plugin](https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/install.md#plugin). + +### helm + +Setup `helm` on your K8S Cluster. Details about installing `helm` can be found [here](https://github.com/kubernetes/helm/blob/master/docs/install.md). + +Alternatively, **Windows** users may follow [these steps](https://medium.com/@JockDaRock/take-the-helm-with-kubernetes-on-windows-c2cd4373104b): + + +Afterwards, start Minikube and initialize Tiller. + +```console +$ minikube start --extra-config=apiserver.Authorization.Mode=RBAC + +$ helm init +``` + + ### service catalog + + Setup `service catalog` on your K8S Cluster. Details about installing the `service catalog` can be found [here](https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/install.md). + +Alternatively, **Windows** users may follow these steps: + + ```console + $ kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default + + $ helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com + + $ kubectl create clusterrolebinding tiller-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default + + $ kubectl -n kube-system patch deployment tiller-deploy -p '{"spec": {"template": {"spec": {"automountServiceAccountToken": true}}}}' + + $ helm install svc-cat/catalog --name catalog --namespace catalog + ``` + +## Cloud Foundry Deployment Prerequisites + +Additional prerequisites to the [general deployment prerequisites](#general-deployment-prerequisites) required for installing the Service Manager (and/or the CF Proxy) on CF. + +#### CF CLI + +Details about installing `CF CLI` can be found [here](https://github.com/cloudfoundry/cli#downloads). + +**Note:** kubectl, svcat, helm and smctl binaries should be in your $PATH. + +#### Cloud Foundry Installation + +You would also need a Cloud Foundry installation and either user/pass or oauth client credentials to manage service brokers as well as service access at the Cloud Controller API. + +**Note:** The CF installation should have a `go_buildpack` installed with support for Go 1.10+. This would imply that the go buildpack version should be newer than 1.8.19. The buildpack should use the name `go_buildpack`. Steps to upgrade the `go_buildpack` in case this is required: + +* Download the latest Release from [here](https://github.com/cloudfoundry/go-buildpack/releases) +* Rename the zip so it contains no dots (.) and slashes (-) +* Navigate to the directory the zip was downloaded to and run: + + ```console + cf update-buildpack go_buildpack .zip 1 + ``` diff --git a/vendor/github.com/Peripli/service-manager/docs/development/local.md b/vendor/github.com/Peripli/service-manager/docs/development/local.md new file mode 100644 index 00000000..ef4588e5 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/docs/development/local.md @@ -0,0 +1,182 @@ +# Local Setup for Service Manager Components + +## Prerequisites + +Each of the sections below outlines only the prerequisites required to run the particular component in the particular platform. However, if you want to setup the full-fledged local environment, its recommended to setup everything that is described in both the [local dev prerequisites](develop-prerequisites.md) and the [installation prerequisites](install-prerequisites.md). + +## Service Manager + +### Service Manager on `minikube` + +#### Prerequisites + +* [general deployment prerequisites](./install-prerequisites.md#general-deployment-prerequisites) +* [minikube](./develop-prerequisites.md#minikube) +* [K8S deployment prerequisites](./install-prerequisites.md#kubernetes-deployment-prerequisites) +* in case you are planning to develop/contribute code, you should check the [local development prerequisites](./develop-prerequisites#local-development-prerequisites) + +#### Installation + +Follow [run on Kubernetes](./../install/sm.md#run-on-Kubernertes) installation steps. + +### Service Manager on `cfdev/pcfdev` + +#### Prerequisites + +* [general deployment prerequisites](./install-prerequisites.md#general-deployment-prerequisites) +* [local CF installation](./develop-prerequisites.md#local-cf-setup) +* [CF deployment prerequisites](./install-prerequisites.md#cloud-foundry-deployment-prerequisites) +* in case you are planning to develop/contribute code, you should check the [local development prerequisites](./develop-prerequisites#local-development-prerequisites) + +#### Configuration Adjustments + +Edit the following `env` vars in the `$GOPATH/src/github.com/Peripli/service-manager/deployment/cf/manifest.yml`: + +* set the token endpoint of the authorization server that was setup as part of the prerequisites + + ```yml + env: + API_TOKEN_ISSUER_URL: https://uaa.dev.cfdev.sh + ``` + +* set the storage configuration + + If you are using an external database that is running on `localhost:5432` then set the `STORAGE_URI` (use 10.0.2.2 as the application will run inside the CF Dev VM and `10.0.2.2` maps to the host's `localhost`): + + **Note:** You might need to setup a loopback alias. On MacOS, you may use `sudo ifconfig lo0 alias 10.0.2.2`. + + ```yml + env: + STORAGE_URI: postgres://postgres:postgres@10.0.2.2:5432/postgres?sslmode=disable + ``` + + If your CF installation has a `postgres` service, then create and bind it to the application and set `STORAGE_NAME` to the postgres service instance name: + + ```yml + env: + STORAGE_NAME: postgres + ``` + +**Note:** Comment the `docker.image` in the `manifest.yml` in order to use local sources. + +#### Installation + +Follow [run on CF](./../install/sm.md#run-on-CF) installation steps. + +### Service Manager on `localhost` + +#### Prerequisites + +* check the [local development prerequisites](./develop-prerequisites.md#local-development-prerequisites) + +#### Configuration Adjustments + +Edit the following `properties` in the `$GOPATH/src/github.com/Peripli/service-manager/application.yml`: + +* set the token endpoint of the authorization server that was setup as part of the prerequisites + + ```yml + api: + token_issuer_url: https://uaa.dev.cfdev.sh + skip_ssl_verification: true + ``` +* set the storage configuration + + ```yml + storage: + uri: postgres://postgres:postgres@10.0.2.2:5432/postgres?sslmode=disable + ``` + + **Note:** Comment `storage.name` if its present in application.yml + + +#### Installation + +```console +go run main.go +``` + +**Note:** One may skip the configuration adjustments in the `application.yml` file and instead set the values as commandline flags. + +```console +go run main.go --storage.uri=postgres://postgres:postgres@10.0.2.2:5432/postgres?sslmode=disable --api.token_issuer_url=https://uaa.dev.cfdev.sh --api.skip_ssl_verification=true +``` + +## Service Broker CF Proxy + +### CF Proxy on `cfdev/pcfdev` + +#### Prerequisites + + * [git](https://git-scm.com/) + * [smctl](https://github.com/Peripli/service-manager-cli/blob/master/README.md) + * [local CF installation](./develop-prerequisites.md#local-cf-setup) + * [CF deployment prerequisites](./install-prerequisites.md#cloud-foundry-deployment-prerequisites) + +#### Configuration Adjustments + +Example adjustments for `manifest.yml` + +```yml +# Access the SM API + SM_URL: http://service-manager.dev.cfdev.sh + SM_USER: /u4PGZHsLVX9WXsibWHZ4lNWDvhreeRvkUpFnBYPq/k= + SM_PASSWORD: Pe4jPzR18pO3xvhkUD1MfnU3jHTJvot4blc9RR5ustk= + SM_SKIP_SSL_VALIDATION: true +# Access the CC API to register brokers/ manage access + CF_CLIENT_USERNAME: admin + CF_CLIENT_PASSWORD: admin + CF_CLIENT_APIADDRESS: https://api.dev.cfdev.sh + CF_CLIENT_SKIPSSLVALIDATION: true +``` + +The necessary configuration adjustments are mentioned in the installation section about [modifying the manifest](../install/cf-proxy.md#modify-manifest.yml). Additionally, as shown above `skipping SSL validation` needs to be set to `true`. + +#### Installation + +Follow the [run on CF](./../install/cf-proxy.md) installation steps. + +**Note:** Remember to set the skipping of SSL validation to `true` as shown in the example above. + +## Service Broker K8S Proxy + +### K8S Proxy on `minikube` + +#### Prerequisites + +* [git](https://git-scm.com/) +* [smctl](https://github.com/Peripli/service-manager-cli/blob/master/README.md) +* [minikube](./develop-prerequisites.md#local-k8s-setup) +* [K8S deployment prerequisites](./install-prerequisites.md#kubernetes-deployment-prerequisites) + +#### Installation + +Follow the [run on K8S](./../install/k8s-proxy.md) installation steps. + +## Service Manager CLI + +### smctl as Binary + +Follow the [installation steps](./../installation/cli.md) to install the binary. + +### smctl Locally + +* Clone the [smctl](https://github.com/Peripli/service-manager-cli) repository. + + ```console + git clone https://github.com/Peripli/service-manager-cli.git $GOPATH/src/github.com/Peripli/service-manager-cli && cd $GOPATH/src/github.com/Peripli/service-manager-cli + ``` + +* install dependencies + + ```console + dep ensure --vendor-only + ``` + +* Run/debug a command by executing `go run main.go` followed by the command + + Example: + ```console + $ go run main.go version + Service Manager Client 0.0.1 + ``` \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-manager/docs/development/prerequisites.md b/vendor/github.com/Peripli/service-manager/docs/development/prerequisites.md deleted file mode 100644 index 648e303d..00000000 --- a/vendor/github.com/Peripli/service-manager/docs/development/prerequisites.md +++ /dev/null @@ -1,81 +0,0 @@ -# SM ToolBox - -The SM ToolBox page contains details about all the tools that are needed for instaling / developing the Service Manager Components. - ->**Note:** Click on the title of a section to get redirected to the installation instructions. - -### [Go (version 1.10+)](https://golang.org/doc/install) - -### [GNU Make](https://www.gnu.org/software/make/manual/make.html) - -### [Git](https://git-scm.com/) - -### [Docker Windows](https://docs.docker.com/docker-for-mac/install/) / [Docker Mac](https://docs.docker.com/docker-for-windows/install/) - -### [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - -### [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/#installation) - -Alternatively, **Windows** users may follow these steps: - -> **Note:** On Windows Minikube versions 26.x does not work on Windows. Currently version 25.2 is the latest tested version on Windows that works properly. - -* Setup chocolately package manager - -```powershell - @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" -``` - -* Install Minikube - - ```bat - choco install minikube --version 0.25.2 - ``` - ->**Note:** In order to reuse the docker daemon and speed up local development check the [Reusing the Docker daemon section of the minikube getting started guide](https://kubernetes.io/docs/getting-started-guides/minikube/#reusing-the-docker-daemon) - -#### [Helm](https://github.com/kubernetes/helm/blob/master/docs/install.md) - -Alternatively, **Windows** users may follow [these steps](https://medium.com/@JockDaRock/take-the-helm-with-kubernetes-on-windows-c2cd4373104b): - - -Afterwards, start Minikube and initialize Tiller. - -```console -$ minikube start --extra-config=apiserver.Authorization.Mode=RBAC - -$ helm init -``` - #### [servicecatalog](https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/install.md) - -Alternatively, **Windows** users may follow these steps: - - ```console - $ kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default - - $ helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com - - $ kubectl create clusterrolebinding tiller-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default - - $ kubectl -n kube-system patch deployment tiller-deploy -p '{"spec": {"template": {"spec": {"automountServiceAccountToken": true}}}}' - - $ helm install svc-cat/catalog --name catalog --namespace catalog - ``` - -### [CF CLI and PCF Dev](https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry-dev/introduction) - -The Service Manager components use go1.10 and currenty the buildpack installed in PCF Dev does not support go1.10. The following steps install the latest go buildpack version on PCF Dev: - -* Download the latest Release from [here](https://github.com/cloudfoundry/go-buildpack/releases) -* Rename the zip so it cotnains no dots (.) and slashes (-) -* Navigate to the directory the zip was downloaded to and run: - - ```console - $ cf update-buildpack go_buildpack .zip 1 - ``` - -**Note:** Alternatively, one can use [CF Dev](https://github.com/cloudfoundry-incubator/cfdev) - -### [smctl](https://github.com/Peripli/service-manager-cli/blob/master/README.md) - -**Note:** kubectl, svcat, helm and smctl binaries should be in your $PATH. diff --git a/vendor/github.com/Peripli/service-manager/docs/development/tests.md b/vendor/github.com/Peripli/service-manager/docs/development/tests.md index 6004df5c..4174d75a 100644 --- a/vendor/github.com/Peripli/service-manager/docs/development/tests.md +++ b/vendor/github.com/Peripli/service-manager/docs/development/tests.md @@ -4,29 +4,41 @@ For testing we use the frameworks - [Ginkgo](https://onsi.github.io/ginkgo/) and ## Prerequisites -* PostgreSQL running - - Standalone or... - - In a docker container +* PostgreSQL running standalone or in a docker container ```console - $ docker run -d -p5432:5432 --name prod_postgres --user postgres postgres + docker run -d -p 5432:5432 --name prod_postgres --user postgres postgres ``` -If PostgreSQL is not running with default settings, the connection URI can be changed in file: [application.yml](https://github.com/Peripli/service-manager/blob/master/test/common/application.yml#L9) - ## Unit and integration tests Currently unit and integration tests are run with one command. To execute tests, run the following command: + +```console +make test +``` + +If PostgreSQL is not running with default settings, the connection URI can be changed by providing a commandline argument: + ```console -$ make test +make test TEST_FLAGS="--storage.uri=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" ``` ## Coverage To generate test coverage report run the following command: + +```console +make coverage +``` + +If PostgreSQL is not running with default settings, the connection URI can be changed by providing a commandline argument: + ```console -$ make coverage +make coverage TEST_FLAGS="--storage.uri=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" ``` The above command will create a file called `coverage.html` at the root of the project. + +**Note**: All commandline arguments that can be used to configure the Service Manager on startup can also be passed to `make test` and `make coverage` via `TEST_FLAGS`. \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-manager/docs/install/README.md b/vendor/github.com/Peripli/service-manager/docs/install/README.md index 78b0648e..916f6cd6 100644 --- a/vendor/github.com/Peripli/service-manager/docs/install/README.md +++ b/vendor/github.com/Peripli/service-manager/docs/install/README.md @@ -1,5 +1,6 @@ # Installing Service Manager and its components +* [Prerequisites](./../development/install-prerequisites.md) * [Installing the Service Manager core component](./sm.md) * [Installing the Service Manager cli tool](./cli.md) * [Installing the Service Broker proxy for Kubernetes](./k8s-proxy.md) diff --git a/vendor/github.com/Peripli/service-manager/docs/install/cf-proxy.md b/vendor/github.com/Peripli/service-manager/docs/install/cf-proxy.md index 93db8809..918010e3 100644 --- a/vendor/github.com/Peripli/service-manager/docs/install/cf-proxy.md +++ b/vendor/github.com/Peripli/service-manager/docs/install/cf-proxy.md @@ -2,22 +2,21 @@ ## Prerequisites -* `git` is installed -* `go` is installed -* `dep` is installed -* `cf cli` is installed. -* You are logged in CF. -* `go_buildpack` is installed with support for go version 1.10 +* git +* go 1.10 +* dep +* CF CLI +* go_buildpack 1.8.19+ * [Service-Manager](./sm.md) is installed. -**Note:** The used go buildpack should be named `go_buildpack`. +**Note:** For details about the prerequisites you may refer to the [installation prerequisites page](./../development/install-prerequisites.md) ## Clone the repository Clone the [service-broker-proxy-cf](https://github.com/Peripli/service-broker-proxy-cf) git repository. ```console -$ git clone https://github.com/Peripli/service-broker-proxy-cf.git && cd service-broker-proxy-cf +$ git clone https://github.com/Peripli/service-broker-proxy-cf.git $GOPATH/src/github.com/Peripli/service-broker-proxy-cf && cd $GOPATH/src/github.com/Peripli/service-broker-proxy-cf ``` **Note:** Do not use `go get`. Instead use git to clone the repository. @@ -25,7 +24,7 @@ $ git clone https://github.com/Peripli/service-broker-proxy-cf.git && cd service ## Install dependencies ```console -$ dep ensure --vendor-only +dep ensure --vendor-only ``` ## Register CF in Service Manager @@ -34,6 +33,12 @@ To start the service-broker-proxy-cf you need to register CF in Service Manager. As a result this will return the credentials used for communicating with the Service Manager. For example: +```console +$ smctl login -u admin -p admin -a http://service-manager.dev.cfdev.sh --skip-ssl-validation + +Logged in successfully. +``` + ```console $ smctl register-platform mycf cf example @@ -46,8 +51,9 @@ ID Name Type Description Created In the [service-broker-proxy-cf](https://github.com/Peripli/service-broker-proxy-cf) repository you need to replace in the `manifest.yml` the following things: +* Administrative credentials for CF with env variables `CF_CLIENT_USERNAME` and `CF_CLIENT_PASSWORD`. +* Optional: adapt env variable `CF_CLIENT_APIADDRESS`. * Service-Manager URL using the `SM_URL` env variable. -* Administrative credentials for CF with env variables `CF_USERNAME` and `CF_PASSWORD`. * Credentials for Service Manager with env variables `SM_USER` and `SM_PASSWORD`. These are the credentials obtained by the `smctl register-platform` command In addition you can change other configurations like log level and log format. @@ -58,5 +64,5 @@ You can also use the `application.yml` file which has lower priority than the En Execute: ```console -$ cf push -f manifest.yml -``` \ No newline at end of file +cf push -f manifest.yml +``` diff --git a/vendor/github.com/Peripli/service-manager/docs/install/k8s-proxy.md b/vendor/github.com/Peripli/service-manager/docs/install/k8s-proxy.md index d9b5db18..1c2eb5f1 100644 --- a/vendor/github.com/Peripli/service-manager/docs/install/k8s-proxy.md +++ b/vendor/github.com/Peripli/service-manager/docs/install/k8s-proxy.md @@ -2,25 +2,36 @@ ## Prerequisites -* `git` is installed. -* [`service-catalog`](https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/install.md) is installed and configured in the Kubernetes cluster. +* git +* kubectl +* helm +* service-catalog +* [Service-Manager](./sm.md) is installed. + +**Note:** For details about the prerequisites you may refer to the [installation prerequisites page](./../development/install-prerequisites.md) ## Clone the repository Clone the [service-broker-proxy-k8s](https://github.com/Peripli/service-broker-proxy-k8s) git repository. ```console -$ git clone https://github.com/Peripli/service-broker-proxy-k8s.git && cd service-broker-proxy-k8s +$ git clone https://github.com/Peripli/service-broker-proxy-k8s.git $GOPATH/src/github.com/Peripli/service-broker-proxy-k8s && cd $GOPATH/src/github.com/Peripli/service-broker-proxy-k8s ``` **Note:** Do not use `go get`. Instead use git to clone the repository. -## Register the kubernetes cluster in Service Manager +## Register the Kubernetes cluster in Service Manager To start the service-broker-proxy-k8s you need to register the kubernetes cluster in Service Manager. You can use the [smctl](./cli.md) `register-platform` command. As a result this will return the credentials used for communicating with the Service Manager. For example: +```console +$ smctl login -u admin -p admin -a http://service-manager.dev.cfdev.sh --skip-ssl-validation + +Logged in successfully. +``` + ```console $ smctl register-platform mycluster k8s example @@ -40,9 +51,9 @@ The service-broker-proxy-k8s is installed via a helm chart located in the [servi Navigate to the root of the cloned repository and execute: ```console -$ helm install charts/service-broker-proxy --name service-broker-proxy --namespace service-broker-proxy --set config.sm.url= --set sm.user= --set sm.password= +helm install charts/service-broker-proxy-k8s --name service-broker-proxy --namespace service-broker-proxy --set config.sm.url= --set sm.user= --set sm.password= ``` -**Note:** Make sure you substitute `` with the Service Manager URL, `` and `` with the credentials issued from Service Manager when this platform was registered there. +**Note:** Make sure you substitute `` with the Service Manager URL, `` and `` with the credentials issued from Service Manager when this platform was registered there. To use your own images you can set `image.repository`, `image.tag` and `image.pullPolicy` to the helm install command. diff --git a/vendor/github.com/Peripli/service-manager/docs/install/sm.md b/vendor/github.com/Peripli/service-manager/docs/install/sm.md index 3fb1dd10..91a78f2e 100644 --- a/vendor/github.com/Peripli/service-manager/docs/install/sm.md +++ b/vendor/github.com/Peripli/service-manager/docs/install/sm.md @@ -1,17 +1,12 @@ # Run Service Manager -## Prerequisites +## Clone the Repository -* You need to have an OAuth server to be used by the Service Manager. This OAuth server must support [OpenID Connect Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html). In CF this could be the CF UAA. -* `git` is installed. +Clone the [service-manager](https://github.com/Peripli/service-manager) repository. -## Clone the repository - -Clone the [service-manager](https://github.com/Peripli/service-manager) git repository. - -```console -$ git clone https://github.com/Peripli/service-manager.git && cd service-manager -``` + ```console + $ git clone https://github.com/Peripli/service-manager.git $GOPATH/src/github.com/Peripli/service-manager && cd $GOPATH/src/github.com/Peripli/service-manager + ``` **Note:** Do not use `go get`. Instead use git to clone the repository. @@ -19,19 +14,23 @@ $ git clone https://github.com/Peripli/service-manager.git && cd service-manager ### Prerequisites for CF deployment -The following must be fulfilled: +* git +* go 1.10 +* dep +* OpenID compliant Authorization Server +* CF CLI installed and configured. +* go_buildpack 1.8.19+ +* PostgreSQL service is available or an external PostgreSQL is accessible from the CF environment. -* You have CF cli installed and configured. -* You are logged in to CF. -* PostgreSQL service is available or an external PostgreSQL is installed and accessible from the CF environment. +**Note:** For details about the prerequisites you may refer to the [installation prerequisites page](./../development/install-prerequisites.md) ### Create PostgreSQL service instance in your CF environment ```console -$ cf create-service +cf create-service ``` -Alternatively, you can use external PostgreSQL. In this case you need to have a PostgreSQL URI. +Alternatively, you can use external PostgreSQL as described in the [installation prerequisites page](./../development/install-prerequisites.md#postgres-database). In this case you need to have a PostgreSQL URI and substitute it in the the `STORAG_URI` in `manifest.yml` as outlined below. ### Update manifest.yml file @@ -43,7 +42,7 @@ Prepare the manifest for deployment using *[deployment/cf/manifest.yml](https:// **Note:** To get the CF UAA URL you can execute the following command (you need to install [jq](https://stedolan.github.io/jq/)): ```console -$ cf curl /v2/info | jq .token_endpoint +cf curl /v2/info | jq .token_endpoint ``` ### Push the application @@ -51,18 +50,23 @@ $ cf curl /v2/info | jq .token_endpoint From the root of the service manager project execute: ```console -$ cf push -f deployment/cf/manifest.yml +cf push -f deployment/cf/manifest.yml ``` ## Run on Kubernetes ### Prerequisites for Kubernetes deployment -The following must be fulfilled: +* git +* go 1.10 +* dep +* OpenID compliant Authorization Server +* kubectl is installed and configured to be used with the Kubernetes cluster +* helm is installed and configured on the cluster +* ingress controller is configured on the cluster *(optional)* +* External PostgreSQL accessible from the cluster *(optional)* -* *kubectl* is installed and configured to be used with the Kubernetes cluster. -* Helm is installed and configured. -* Ingress controller is configured on the cluster *(optional)* +**Note:** For details about the prerequisites you may refer to the [installation prerequisites page](./../development/install-prerequisites.md) ### Install Service Manager @@ -71,7 +75,7 @@ Go to *deployment/k8s/charts/service-manager* folder. Execute: ```console -$ helm dependency build +helm dependency build ``` to get the required dependencies. @@ -79,7 +83,7 @@ to get the required dependencies. To install the Service Manager and PostgreSQL database, execute: ```console -$ helm install --name service-manager --namespace service-manager . --set config.api.token_issuer_url= +helm install --name service-manager --namespace service-manager . --set config.api.token_issuer_url= ``` where ** is the URL of your OAuth server. If this configuration is not set it will use the CFDev UAA URL - `https://uaa.dev.cfdev.sh` @@ -87,21 +91,21 @@ where ** is the URL of your OAuth server. If this configur To change the PostgreSQL username or password you can use the `postgresql.postgresUser` and `postgresql.postgresPassword` configurations as in the example below: ```console -$ helm install --name service-manager --namespace service-manager . --set postgresql.postgresUser= --set postgresql.postgresPassword= +helm install --name service-manager --namespace service-manager . --set postgresql.postgresUser= --set postgresql.postgresPassword= ``` **Note:** These credentials will remain in your bash history. Alternatively you can change these values directly in *deployment/k8s/charts/service-manager/values.yaml* file. -You can install the Service Manager with external PostgreSQL using a connection string: +You can also install the Service Manager with external PostgreSQL using a connection string (here `externalPostgresURI` sets the value for `STORAGE_URI` env var): ```console -$ helm install --name service-manager --namespace service-manager . --set postgresql.install=false --set externalPostgresURI= +helm install --name service-manager --namespace service-manager . --set postgresql.install=false --set externalPostgresURI= ``` Or use Service Manager docker image from a different repository: ```console -$ helm install --name service-manager --namespace service-manager . --set image.repository= --set image.tag= +helm install --name service-manager --namespace service-manager . --set image.repository= --set image.tag= ``` If ingress controller is not available you can disable ingress with `--set ingress.enabled=false`. @@ -109,5 +113,5 @@ To expose the Service Manager outside the Kubernetes cluster you can change the For example: ```console -$ helm install --name service-manager --namespace service-manager . --set ingress.enabled=false --set service.type=NodePort +helm install --name service-manager --namespace service-manager . --set ingress.enabled=false --set service.type=NodePort ``` diff --git a/vendor/github.com/Peripli/service-manager/main.go b/vendor/github.com/Peripli/service-manager/main.go index 2fa5ba0a..7d6737b3 100644 --- a/vendor/github.com/Peripli/service-manager/main.go +++ b/vendor/github.com/Peripli/service-manager/main.go @@ -20,9 +20,12 @@ import ( "context" "github.com/Peripli/service-manager/pkg/sm" + "github.com/Peripli/service-manager/version" ) func main() { + version.Log() + ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/vendor/github.com/Peripli/service-manager/pkg/env/env.go b/vendor/github.com/Peripli/service-manager/pkg/env/env.go index ac6ffe46..d2351e36 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/env/env.go +++ b/vendor/github.com/Peripli/service-manager/pkg/env/env.go @@ -17,7 +17,6 @@ package env import ( - "flag" "fmt" "os" "reflect" @@ -65,11 +64,10 @@ type ViperEnv struct { *viper.Viper } -// EmptyFlagSet creates an empty flag set and adds the default se of flags to it +// EmptyFlagSet creates an empty flag set and adds the default set of flags to it func EmptyFlagSet() *pflag.FlagSet { set := pflag.NewFlagSet("Service Manager Configuration Flags", pflag.ExitOnError) set.AddFlagSet(pflag.CommandLine) - set.AddGoFlagSet(flag.CommandLine) return set } diff --git a/vendor/github.com/Peripli/service-manager/pkg/env/envfakes/fake_environment.go b/vendor/github.com/Peripli/service-manager/pkg/env/envfakes/fake_environment.go index bcd8d283..c228d424 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/env/envfakes/fake_environment.go +++ b/vendor/github.com/Peripli/service-manager/pkg/env/envfakes/fake_environment.go @@ -2,17 +2,29 @@ package envfakes import ( - "sync" + sync "sync" - "github.com/Peripli/service-manager/pkg/env" - "github.com/spf13/pflag" + env "github.com/Peripli/service-manager/pkg/env" + pflag "github.com/spf13/pflag" ) type FakeEnvironment struct { - GetStub func(key string) interface{} + BindPFlagStub func(string, *pflag.Flag) error + bindPFlagMutex sync.RWMutex + bindPFlagArgsForCall []struct { + arg1 string + arg2 *pflag.Flag + } + bindPFlagReturns struct { + result1 error + } + bindPFlagReturnsOnCall map[int]struct { + result1 error + } + GetStub func(string) interface{} getMutex sync.RWMutex getArgsForCall []struct { - key string + arg1 string } getReturns struct { result1 interface{} @@ -20,16 +32,16 @@ type FakeEnvironment struct { getReturnsOnCall map[int]struct { result1 interface{} } - SetStub func(key string, value interface{}) + SetStub func(string, interface{}) setMutex sync.RWMutex setArgsForCall []struct { - key string - value interface{} + arg1 string + arg2 interface{} } - UnmarshalStub func(value interface{}) error + UnmarshalStub func(interface{}) error unmarshalMutex sync.RWMutex unmarshalArgsForCall []struct { - value interface{} + arg1 interface{} } unmarshalReturns struct { result1 error @@ -37,37 +49,87 @@ type FakeEnvironment struct { unmarshalReturnsOnCall map[int]struct { result1 error } - BindPFlagStub func(key string, flag *pflag.Flag) error - bindPFlagMutex sync.RWMutex - bindPFlagArgsForCall []struct { - key string - flag *pflag.Flag + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeEnvironment) BindPFlag(arg1 string, arg2 *pflag.Flag) error { + fake.bindPFlagMutex.Lock() + ret, specificReturn := fake.bindPFlagReturnsOnCall[len(fake.bindPFlagArgsForCall)] + fake.bindPFlagArgsForCall = append(fake.bindPFlagArgsForCall, struct { + arg1 string + arg2 *pflag.Flag + }{arg1, arg2}) + fake.recordInvocation("BindPFlag", []interface{}{arg1, arg2}) + fake.bindPFlagMutex.Unlock() + if fake.BindPFlagStub != nil { + return fake.BindPFlagStub(arg1, arg2) } - bindPFlagReturns struct { - result1 error + if specificReturn { + return ret.result1 } - bindPFlagReturnsOnCall map[int]struct { + fakeReturns := fake.bindPFlagReturns + return fakeReturns.result1 +} + +func (fake *FakeEnvironment) BindPFlagCallCount() int { + fake.bindPFlagMutex.RLock() + defer fake.bindPFlagMutex.RUnlock() + return len(fake.bindPFlagArgsForCall) +} + +func (fake *FakeEnvironment) BindPFlagCalls(stub func(string, *pflag.Flag) error) { + fake.bindPFlagMutex.Lock() + defer fake.bindPFlagMutex.Unlock() + fake.BindPFlagStub = stub +} + +func (fake *FakeEnvironment) BindPFlagArgsForCall(i int) (string, *pflag.Flag) { + fake.bindPFlagMutex.RLock() + defer fake.bindPFlagMutex.RUnlock() + argsForCall := fake.bindPFlagArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeEnvironment) BindPFlagReturns(result1 error) { + fake.bindPFlagMutex.Lock() + defer fake.bindPFlagMutex.Unlock() + fake.BindPFlagStub = nil + fake.bindPFlagReturns = struct { result1 error + }{result1} +} + +func (fake *FakeEnvironment) BindPFlagReturnsOnCall(i int, result1 error) { + fake.bindPFlagMutex.Lock() + defer fake.bindPFlagMutex.Unlock() + fake.BindPFlagStub = nil + if fake.bindPFlagReturnsOnCall == nil { + fake.bindPFlagReturnsOnCall = make(map[int]struct { + result1 error + }) } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex + fake.bindPFlagReturnsOnCall[i] = struct { + result1 error + }{result1} } -func (fake *FakeEnvironment) Get(key string) interface{} { +func (fake *FakeEnvironment) Get(arg1 string) interface{} { fake.getMutex.Lock() ret, specificReturn := fake.getReturnsOnCall[len(fake.getArgsForCall)] fake.getArgsForCall = append(fake.getArgsForCall, struct { - key string - }{key}) - fake.recordInvocation("Get", []interface{}{key}) + arg1 string + }{arg1}) + fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() if fake.GetStub != nil { - return fake.GetStub(key) + return fake.GetStub(arg1) } if specificReturn { return ret.result1 } - return fake.getReturns.result1 + fakeReturns := fake.getReturns + return fakeReturns.result1 } func (fake *FakeEnvironment) GetCallCount() int { @@ -76,13 +138,22 @@ func (fake *FakeEnvironment) GetCallCount() int { return len(fake.getArgsForCall) } +func (fake *FakeEnvironment) GetCalls(stub func(string) interface{}) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() + fake.GetStub = stub +} + func (fake *FakeEnvironment) GetArgsForCall(i int) string { fake.getMutex.RLock() defer fake.getMutex.RUnlock() - return fake.getArgsForCall[i].key + argsForCall := fake.getArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeEnvironment) GetReturns(result1 interface{}) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() fake.GetStub = nil fake.getReturns = struct { result1 interface{} @@ -90,6 +161,8 @@ func (fake *FakeEnvironment) GetReturns(result1 interface{}) { } func (fake *FakeEnvironment) GetReturnsOnCall(i int, result1 interface{}) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() fake.GetStub = nil if fake.getReturnsOnCall == nil { fake.getReturnsOnCall = make(map[int]struct { @@ -101,16 +174,16 @@ func (fake *FakeEnvironment) GetReturnsOnCall(i int, result1 interface{}) { }{result1} } -func (fake *FakeEnvironment) Set(key string, value interface{}) { +func (fake *FakeEnvironment) Set(arg1 string, arg2 interface{}) { fake.setMutex.Lock() fake.setArgsForCall = append(fake.setArgsForCall, struct { - key string - value interface{} - }{key, value}) - fake.recordInvocation("Set", []interface{}{key, value}) + arg1 string + arg2 interface{} + }{arg1, arg2}) + fake.recordInvocation("Set", []interface{}{arg1, arg2}) fake.setMutex.Unlock() if fake.SetStub != nil { - fake.SetStub(key, value) + fake.SetStub(arg1, arg2) } } @@ -120,27 +193,35 @@ func (fake *FakeEnvironment) SetCallCount() int { return len(fake.setArgsForCall) } +func (fake *FakeEnvironment) SetCalls(stub func(string, interface{})) { + fake.setMutex.Lock() + defer fake.setMutex.Unlock() + fake.SetStub = stub +} + func (fake *FakeEnvironment) SetArgsForCall(i int) (string, interface{}) { fake.setMutex.RLock() defer fake.setMutex.RUnlock() - return fake.setArgsForCall[i].key, fake.setArgsForCall[i].value + argsForCall := fake.setArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeEnvironment) Unmarshal(value interface{}) error { +func (fake *FakeEnvironment) Unmarshal(arg1 interface{}) error { fake.unmarshalMutex.Lock() ret, specificReturn := fake.unmarshalReturnsOnCall[len(fake.unmarshalArgsForCall)] fake.unmarshalArgsForCall = append(fake.unmarshalArgsForCall, struct { - value interface{} - }{value}) - fake.recordInvocation("Unmarshal", []interface{}{value}) + arg1 interface{} + }{arg1}) + fake.recordInvocation("Unmarshal", []interface{}{arg1}) fake.unmarshalMutex.Unlock() if fake.UnmarshalStub != nil { - return fake.UnmarshalStub(value) + return fake.UnmarshalStub(arg1) } if specificReturn { return ret.result1 } - return fake.unmarshalReturns.result1 + fakeReturns := fake.unmarshalReturns + return fakeReturns.result1 } func (fake *FakeEnvironment) UnmarshalCallCount() int { @@ -149,13 +230,22 @@ func (fake *FakeEnvironment) UnmarshalCallCount() int { return len(fake.unmarshalArgsForCall) } +func (fake *FakeEnvironment) UnmarshalCalls(stub func(interface{}) error) { + fake.unmarshalMutex.Lock() + defer fake.unmarshalMutex.Unlock() + fake.UnmarshalStub = stub +} + func (fake *FakeEnvironment) UnmarshalArgsForCall(i int) interface{} { fake.unmarshalMutex.RLock() defer fake.unmarshalMutex.RUnlock() - return fake.unmarshalArgsForCall[i].value + argsForCall := fake.unmarshalArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeEnvironment) UnmarshalReturns(result1 error) { + fake.unmarshalMutex.Lock() + defer fake.unmarshalMutex.Unlock() fake.UnmarshalStub = nil fake.unmarshalReturns = struct { result1 error @@ -163,6 +253,8 @@ func (fake *FakeEnvironment) UnmarshalReturns(result1 error) { } func (fake *FakeEnvironment) UnmarshalReturnsOnCall(i int, result1 error) { + fake.unmarshalMutex.Lock() + defer fake.unmarshalMutex.Unlock() fake.UnmarshalStub = nil if fake.unmarshalReturnsOnCall == nil { fake.unmarshalReturnsOnCall = make(map[int]struct { @@ -174,66 +266,17 @@ func (fake *FakeEnvironment) UnmarshalReturnsOnCall(i int, result1 error) { }{result1} } -func (fake *FakeEnvironment) BindPFlag(key string, flag *pflag.Flag) error { - fake.bindPFlagMutex.Lock() - ret, specificReturn := fake.bindPFlagReturnsOnCall[len(fake.bindPFlagArgsForCall)] - fake.bindPFlagArgsForCall = append(fake.bindPFlagArgsForCall, struct { - key string - flag *pflag.Flag - }{key, flag}) - fake.recordInvocation("BindPFlag", []interface{}{key, flag}) - fake.bindPFlagMutex.Unlock() - if fake.BindPFlagStub != nil { - return fake.BindPFlagStub(key, flag) - } - if specificReturn { - return ret.result1 - } - return fake.bindPFlagReturns.result1 -} - -func (fake *FakeEnvironment) BindPFlagCallCount() int { - fake.bindPFlagMutex.RLock() - defer fake.bindPFlagMutex.RUnlock() - return len(fake.bindPFlagArgsForCall) -} - -func (fake *FakeEnvironment) BindPFlagArgsForCall(i int) (string, *pflag.Flag) { - fake.bindPFlagMutex.RLock() - defer fake.bindPFlagMutex.RUnlock() - return fake.bindPFlagArgsForCall[i].key, fake.bindPFlagArgsForCall[i].flag -} - -func (fake *FakeEnvironment) BindPFlagReturns(result1 error) { - fake.BindPFlagStub = nil - fake.bindPFlagReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeEnvironment) BindPFlagReturnsOnCall(i int, result1 error) { - fake.BindPFlagStub = nil - if fake.bindPFlagReturnsOnCall == nil { - fake.bindPFlagReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.bindPFlagReturnsOnCall[i] = struct { - result1 error - }{result1} -} - func (fake *FakeEnvironment) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() + fake.bindPFlagMutex.RLock() + defer fake.bindPFlagMutex.RUnlock() fake.getMutex.RLock() defer fake.getMutex.RUnlock() fake.setMutex.RLock() defer fake.setMutex.RUnlock() fake.unmarshalMutex.RLock() defer fake.unmarshalMutex.RUnlock() - fake.bindPFlagMutex.RLock() - defer fake.bindPFlagMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value diff --git a/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_aggregation_policy.go b/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_aggregation_policy.go index be5a8cfd..6fd285e3 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_aggregation_policy.go +++ b/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_aggregation_policy.go @@ -2,16 +2,16 @@ package healthfakes import ( - "sync" + sync "sync" - "github.com/Peripli/service-manager/pkg/health" + health "github.com/Peripli/service-manager/pkg/health" ) type FakeAggregationPolicy struct { - ApplyStub func(healths map[string]*health.Health) *health.Health + ApplyStub func(map[string]*health.Health) *health.Health applyMutex sync.RWMutex applyArgsForCall []struct { - healths map[string]*health.Health + arg1 map[string]*health.Health } applyReturns struct { result1 *health.Health @@ -23,21 +23,22 @@ type FakeAggregationPolicy struct { invocationsMutex sync.RWMutex } -func (fake *FakeAggregationPolicy) Apply(healths map[string]*health.Health) *health.Health { +func (fake *FakeAggregationPolicy) Apply(arg1 map[string]*health.Health) *health.Health { fake.applyMutex.Lock() ret, specificReturn := fake.applyReturnsOnCall[len(fake.applyArgsForCall)] fake.applyArgsForCall = append(fake.applyArgsForCall, struct { - healths map[string]*health.Health - }{healths}) - fake.recordInvocation("Apply", []interface{}{healths}) + arg1 map[string]*health.Health + }{arg1}) + fake.recordInvocation("Apply", []interface{}{arg1}) fake.applyMutex.Unlock() if fake.ApplyStub != nil { - return fake.ApplyStub(healths) + return fake.ApplyStub(arg1) } if specificReturn { return ret.result1 } - return fake.applyReturns.result1 + fakeReturns := fake.applyReturns + return fakeReturns.result1 } func (fake *FakeAggregationPolicy) ApplyCallCount() int { @@ -46,13 +47,22 @@ func (fake *FakeAggregationPolicy) ApplyCallCount() int { return len(fake.applyArgsForCall) } +func (fake *FakeAggregationPolicy) ApplyCalls(stub func(map[string]*health.Health) *health.Health) { + fake.applyMutex.Lock() + defer fake.applyMutex.Unlock() + fake.ApplyStub = stub +} + func (fake *FakeAggregationPolicy) ApplyArgsForCall(i int) map[string]*health.Health { fake.applyMutex.RLock() defer fake.applyMutex.RUnlock() - return fake.applyArgsForCall[i].healths + argsForCall := fake.applyArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeAggregationPolicy) ApplyReturns(result1 *health.Health) { + fake.applyMutex.Lock() + defer fake.applyMutex.Unlock() fake.ApplyStub = nil fake.applyReturns = struct { result1 *health.Health @@ -60,6 +70,8 @@ func (fake *FakeAggregationPolicy) ApplyReturns(result1 *health.Health) { } func (fake *FakeAggregationPolicy) ApplyReturnsOnCall(i int, result1 *health.Health) { + fake.applyMutex.Lock() + defer fake.applyMutex.Unlock() fake.ApplyStub = nil if fake.applyReturnsOnCall == nil { fake.applyReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_indicator.go b/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_indicator.go index fb306af9..54a177b3 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_indicator.go +++ b/vendor/github.com/Peripli/service-manager/pkg/health/healthfakes/fake_indicator.go @@ -2,78 +2,41 @@ package healthfakes import ( - "sync" + sync "sync" - "github.com/Peripli/service-manager/pkg/health" + health "github.com/Peripli/service-manager/pkg/health" ) type FakeIndicator struct { - NameStub func() string - nameMutex sync.RWMutex - nameArgsForCall []struct{} - nameReturns struct { - result1 string - } - nameReturnsOnCall map[int]struct { - result1 string - } HealthStub func() *health.Health healthMutex sync.RWMutex - healthArgsForCall []struct{} - healthReturns struct { + healthArgsForCall []struct { + } + healthReturns struct { result1 *health.Health } healthReturnsOnCall map[int]struct { result1 *health.Health } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeIndicator) Name() string { - fake.nameMutex.Lock() - ret, specificReturn := fake.nameReturnsOnCall[len(fake.nameArgsForCall)] - fake.nameArgsForCall = append(fake.nameArgsForCall, struct{}{}) - fake.recordInvocation("Name", []interface{}{}) - fake.nameMutex.Unlock() - if fake.NameStub != nil { - return fake.NameStub() - } - if specificReturn { - return ret.result1 + NameStub func() string + nameMutex sync.RWMutex + nameArgsForCall []struct { } - return fake.nameReturns.result1 -} - -func (fake *FakeIndicator) NameCallCount() int { - fake.nameMutex.RLock() - defer fake.nameMutex.RUnlock() - return len(fake.nameArgsForCall) -} - -func (fake *FakeIndicator) NameReturns(result1 string) { - fake.NameStub = nil - fake.nameReturns = struct { + nameReturns struct { result1 string - }{result1} -} - -func (fake *FakeIndicator) NameReturnsOnCall(i int, result1 string) { - fake.NameStub = nil - if fake.nameReturnsOnCall == nil { - fake.nameReturnsOnCall = make(map[int]struct { - result1 string - }) } - fake.nameReturnsOnCall[i] = struct { + nameReturnsOnCall map[int]struct { result1 string - }{result1} + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex } func (fake *FakeIndicator) Health() *health.Health { fake.healthMutex.Lock() ret, specificReturn := fake.healthReturnsOnCall[len(fake.healthArgsForCall)] - fake.healthArgsForCall = append(fake.healthArgsForCall, struct{}{}) + fake.healthArgsForCall = append(fake.healthArgsForCall, struct { + }{}) fake.recordInvocation("Health", []interface{}{}) fake.healthMutex.Unlock() if fake.HealthStub != nil { @@ -82,7 +45,8 @@ func (fake *FakeIndicator) Health() *health.Health { if specificReturn { return ret.result1 } - return fake.healthReturns.result1 + fakeReturns := fake.healthReturns + return fakeReturns.result1 } func (fake *FakeIndicator) HealthCallCount() int { @@ -91,7 +55,15 @@ func (fake *FakeIndicator) HealthCallCount() int { return len(fake.healthArgsForCall) } +func (fake *FakeIndicator) HealthCalls(stub func() *health.Health) { + fake.healthMutex.Lock() + defer fake.healthMutex.Unlock() + fake.HealthStub = stub +} + func (fake *FakeIndicator) HealthReturns(result1 *health.Health) { + fake.healthMutex.Lock() + defer fake.healthMutex.Unlock() fake.HealthStub = nil fake.healthReturns = struct { result1 *health.Health @@ -99,6 +71,8 @@ func (fake *FakeIndicator) HealthReturns(result1 *health.Health) { } func (fake *FakeIndicator) HealthReturnsOnCall(i int, result1 *health.Health) { + fake.healthMutex.Lock() + defer fake.healthMutex.Unlock() fake.HealthStub = nil if fake.healthReturnsOnCall == nil { fake.healthReturnsOnCall = make(map[int]struct { @@ -110,13 +84,65 @@ func (fake *FakeIndicator) HealthReturnsOnCall(i int, result1 *health.Health) { }{result1} } +func (fake *FakeIndicator) Name() string { + fake.nameMutex.Lock() + ret, specificReturn := fake.nameReturnsOnCall[len(fake.nameArgsForCall)] + fake.nameArgsForCall = append(fake.nameArgsForCall, struct { + }{}) + fake.recordInvocation("Name", []interface{}{}) + fake.nameMutex.Unlock() + if fake.NameStub != nil { + return fake.NameStub() + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.nameReturns + return fakeReturns.result1 +} + +func (fake *FakeIndicator) NameCallCount() int { + fake.nameMutex.RLock() + defer fake.nameMutex.RUnlock() + return len(fake.nameArgsForCall) +} + +func (fake *FakeIndicator) NameCalls(stub func() string) { + fake.nameMutex.Lock() + defer fake.nameMutex.Unlock() + fake.NameStub = stub +} + +func (fake *FakeIndicator) NameReturns(result1 string) { + fake.nameMutex.Lock() + defer fake.nameMutex.Unlock() + fake.NameStub = nil + fake.nameReturns = struct { + result1 string + }{result1} +} + +func (fake *FakeIndicator) NameReturnsOnCall(i int, result1 string) { + fake.nameMutex.Lock() + defer fake.nameMutex.Unlock() + fake.NameStub = nil + if fake.nameReturnsOnCall == nil { + fake.nameReturnsOnCall = make(map[int]struct { + result1 string + }) + } + fake.nameReturnsOnCall[i] = struct { + result1 string + }{result1} +} + func (fake *FakeIndicator) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() - fake.nameMutex.RLock() - defer fake.nameMutex.RUnlock() fake.healthMutex.RLock() defer fake.healthMutex.RUnlock() + fake.nameMutex.RLock() + defer fake.nameMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value diff --git a/vendor/github.com/Peripli/service-manager/test/security_test/two_layer_encrypter_test.go b/vendor/github.com/Peripli/service-manager/pkg/security/encrypter_test.go similarity index 98% rename from vendor/github.com/Peripli/service-manager/test/security_test/two_layer_encrypter_test.go rename to vendor/github.com/Peripli/service-manager/pkg/security/encrypter_test.go index 982a0633..c1538493 100644 --- a/vendor/github.com/Peripli/service-manager/test/security_test/two_layer_encrypter_test.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/encrypter_test.go @@ -20,16 +20,15 @@ import ( "context" "crypto/rand" "fmt" - "log" - "testing" - "github.com/Peripli/service-manager/pkg/security" "github.com/Peripli/service-manager/pkg/security/securityfakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "log" + "testing" ) -func TestApi(t *testing.T) { +func TestEncrypter(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Encrypter Test Suite") } diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/filters/required_authn.go b/vendor/github.com/Peripli/service-manager/pkg/security/filters/required_authn.go index 704d5f0c..a7f2c295 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/filters/required_authn.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/filters/required_authn.go @@ -54,6 +54,8 @@ func (raf *requiredAuthnFilter) FilterMatchers() []web.FilterMatcher { web.BrokersURL+"/**", web.PlatformsURL+"/**", web.OSBURL+"/**", + web.ServiceOfferingsURL+"/**", + web.ServicePlansURL+"/**", ), }, }, diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authenticator.go b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authenticator.go index fb95d2f7..7c390bdf 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authenticator.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authenticator.go @@ -2,18 +2,18 @@ package securityfakes import ( - "net/http" - "sync" + http "net/http" + sync "sync" - "github.com/Peripli/service-manager/pkg/security" - "github.com/Peripli/service-manager/pkg/web" + security "github.com/Peripli/service-manager/pkg/security" + web "github.com/Peripli/service-manager/pkg/web" ) type FakeAuthenticator struct { - AuthenticateStub func(req *http.Request) (*web.User, security.Decision, error) + AuthenticateStub func(*http.Request) (*web.User, security.Decision, error) authenticateMutex sync.RWMutex authenticateArgsForCall []struct { - req *http.Request + arg1 *http.Request } authenticateReturns struct { result1 *web.User @@ -29,21 +29,22 @@ type FakeAuthenticator struct { invocationsMutex sync.RWMutex } -func (fake *FakeAuthenticator) Authenticate(req *http.Request) (*web.User, security.Decision, error) { +func (fake *FakeAuthenticator) Authenticate(arg1 *http.Request) (*web.User, security.Decision, error) { fake.authenticateMutex.Lock() ret, specificReturn := fake.authenticateReturnsOnCall[len(fake.authenticateArgsForCall)] fake.authenticateArgsForCall = append(fake.authenticateArgsForCall, struct { - req *http.Request - }{req}) - fake.recordInvocation("Authenticate", []interface{}{req}) + arg1 *http.Request + }{arg1}) + fake.recordInvocation("Authenticate", []interface{}{arg1}) fake.authenticateMutex.Unlock() if fake.AuthenticateStub != nil { - return fake.AuthenticateStub(req) + return fake.AuthenticateStub(arg1) } if specificReturn { return ret.result1, ret.result2, ret.result3 } - return fake.authenticateReturns.result1, fake.authenticateReturns.result2, fake.authenticateReturns.result3 + fakeReturns := fake.authenticateReturns + return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 } func (fake *FakeAuthenticator) AuthenticateCallCount() int { @@ -52,13 +53,22 @@ func (fake *FakeAuthenticator) AuthenticateCallCount() int { return len(fake.authenticateArgsForCall) } +func (fake *FakeAuthenticator) AuthenticateCalls(stub func(*http.Request) (*web.User, security.Decision, error)) { + fake.authenticateMutex.Lock() + defer fake.authenticateMutex.Unlock() + fake.AuthenticateStub = stub +} + func (fake *FakeAuthenticator) AuthenticateArgsForCall(i int) *http.Request { fake.authenticateMutex.RLock() defer fake.authenticateMutex.RUnlock() - return fake.authenticateArgsForCall[i].req + argsForCall := fake.authenticateArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeAuthenticator) AuthenticateReturns(result1 *web.User, result2 security.Decision, result3 error) { + fake.authenticateMutex.Lock() + defer fake.authenticateMutex.Unlock() fake.AuthenticateStub = nil fake.authenticateReturns = struct { result1 *web.User @@ -68,6 +78,8 @@ func (fake *FakeAuthenticator) AuthenticateReturns(result1 *web.User, result2 se } func (fake *FakeAuthenticator) AuthenticateReturnsOnCall(i int, result1 *web.User, result2 security.Decision, result3 error) { + fake.authenticateMutex.Lock() + defer fake.authenticateMutex.Unlock() fake.AuthenticateStub = nil if fake.authenticateReturnsOnCall == nil { fake.authenticateReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authorizer.go b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authorizer.go index da7df422..45946823 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authorizer.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_authorizer.go @@ -2,17 +2,17 @@ package securityfakes import ( - "net/http" - "sync" + http "net/http" + sync "sync" - "github.com/Peripli/service-manager/pkg/security" + security "github.com/Peripli/service-manager/pkg/security" ) type FakeAuthorizer struct { - AuthorizeStub func(req *http.Request) (security.Decision, error) + AuthorizeStub func(*http.Request) (security.Decision, error) authorizeMutex sync.RWMutex authorizeArgsForCall []struct { - req *http.Request + arg1 *http.Request } authorizeReturns struct { result1 security.Decision @@ -26,21 +26,22 @@ type FakeAuthorizer struct { invocationsMutex sync.RWMutex } -func (fake *FakeAuthorizer) Authorize(req *http.Request) (security.Decision, error) { +func (fake *FakeAuthorizer) Authorize(arg1 *http.Request) (security.Decision, error) { fake.authorizeMutex.Lock() ret, specificReturn := fake.authorizeReturnsOnCall[len(fake.authorizeArgsForCall)] fake.authorizeArgsForCall = append(fake.authorizeArgsForCall, struct { - req *http.Request - }{req}) - fake.recordInvocation("Authorize", []interface{}{req}) + arg1 *http.Request + }{arg1}) + fake.recordInvocation("Authorize", []interface{}{arg1}) fake.authorizeMutex.Unlock() if fake.AuthorizeStub != nil { - return fake.AuthorizeStub(req) + return fake.AuthorizeStub(arg1) } if specificReturn { return ret.result1, ret.result2 } - return fake.authorizeReturns.result1, fake.authorizeReturns.result2 + fakeReturns := fake.authorizeReturns + return fakeReturns.result1, fakeReturns.result2 } func (fake *FakeAuthorizer) AuthorizeCallCount() int { @@ -49,13 +50,22 @@ func (fake *FakeAuthorizer) AuthorizeCallCount() int { return len(fake.authorizeArgsForCall) } +func (fake *FakeAuthorizer) AuthorizeCalls(stub func(*http.Request) (security.Decision, error)) { + fake.authorizeMutex.Lock() + defer fake.authorizeMutex.Unlock() + fake.AuthorizeStub = stub +} + func (fake *FakeAuthorizer) AuthorizeArgsForCall(i int) *http.Request { fake.authorizeMutex.RLock() defer fake.authorizeMutex.RUnlock() - return fake.authorizeArgsForCall[i].req + argsForCall := fake.authorizeArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeAuthorizer) AuthorizeReturns(result1 security.Decision, result2 error) { + fake.authorizeMutex.Lock() + defer fake.authorizeMutex.Unlock() fake.AuthorizeStub = nil fake.authorizeReturns = struct { result1 security.Decision @@ -64,6 +74,8 @@ func (fake *FakeAuthorizer) AuthorizeReturns(result1 security.Decision, result2 } func (fake *FakeAuthorizer) AuthorizeReturnsOnCall(i int, result1 security.Decision, result2 error) { + fake.authorizeMutex.Lock() + defer fake.authorizeMutex.Unlock() fake.AuthorizeStub = nil if fake.authorizeReturnsOnCall == nil { fake.authorizeReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_encrypter.go b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_encrypter.go index 3b158e7f..9877d76a 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_encrypter.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_encrypter.go @@ -2,38 +2,38 @@ package securityfakes import ( - "context" - "sync" + context "context" + sync "sync" - "github.com/Peripli/service-manager/pkg/security" + security "github.com/Peripli/service-manager/pkg/security" ) type FakeEncrypter struct { - EncryptStub func(ctx context.Context, plaintext []byte) ([]byte, error) - encryptMutex sync.RWMutex - encryptArgsForCall []struct { - ctx context.Context - plaintext []byte + DecryptStub func(context.Context, []byte) ([]byte, error) + decryptMutex sync.RWMutex + decryptArgsForCall []struct { + arg1 context.Context + arg2 []byte } - encryptReturns struct { + decryptReturns struct { result1 []byte result2 error } - encryptReturnsOnCall map[int]struct { + decryptReturnsOnCall map[int]struct { result1 []byte result2 error } - DecryptStub func(ctx context.Context, ciphertext []byte) ([]byte, error) - decryptMutex sync.RWMutex - decryptArgsForCall []struct { - ctx context.Context - ciphertext []byte + EncryptStub func(context.Context, []byte) ([]byte, error) + encryptMutex sync.RWMutex + encryptArgsForCall []struct { + arg1 context.Context + arg2 []byte } - decryptReturns struct { + encryptReturns struct { result1 []byte result2 error } - decryptReturnsOnCall map[int]struct { + encryptReturnsOnCall map[int]struct { result1 []byte result2 error } @@ -41,115 +41,139 @@ type FakeEncrypter struct { invocationsMutex sync.RWMutex } -func (fake *FakeEncrypter) Encrypt(ctx context.Context, plaintext []byte) ([]byte, error) { - var plaintextCopy []byte - if plaintext != nil { - plaintextCopy = make([]byte, len(plaintext)) - copy(plaintextCopy, plaintext) +func (fake *FakeEncrypter) Decrypt(arg1 context.Context, arg2 []byte) ([]byte, error) { + var arg2Copy []byte + if arg2 != nil { + arg2Copy = make([]byte, len(arg2)) + copy(arg2Copy, arg2) } - fake.encryptMutex.Lock() - ret, specificReturn := fake.encryptReturnsOnCall[len(fake.encryptArgsForCall)] - fake.encryptArgsForCall = append(fake.encryptArgsForCall, struct { - ctx context.Context - plaintext []byte - }{ctx, plaintextCopy}) - fake.recordInvocation("Encrypt", []interface{}{ctx, plaintextCopy}) - fake.encryptMutex.Unlock() - if fake.EncryptStub != nil { - return fake.EncryptStub(ctx, plaintext) + fake.decryptMutex.Lock() + ret, specificReturn := fake.decryptReturnsOnCall[len(fake.decryptArgsForCall)] + fake.decryptArgsForCall = append(fake.decryptArgsForCall, struct { + arg1 context.Context + arg2 []byte + }{arg1, arg2Copy}) + fake.recordInvocation("Decrypt", []interface{}{arg1, arg2Copy}) + fake.decryptMutex.Unlock() + if fake.DecryptStub != nil { + return fake.DecryptStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } - return fake.encryptReturns.result1, fake.encryptReturns.result2 + fakeReturns := fake.decryptReturns + return fakeReturns.result1, fakeReturns.result2 } -func (fake *FakeEncrypter) EncryptCallCount() int { - fake.encryptMutex.RLock() - defer fake.encryptMutex.RUnlock() - return len(fake.encryptArgsForCall) +func (fake *FakeEncrypter) DecryptCallCount() int { + fake.decryptMutex.RLock() + defer fake.decryptMutex.RUnlock() + return len(fake.decryptArgsForCall) } -func (fake *FakeEncrypter) EncryptArgsForCall(i int) (context.Context, []byte) { - fake.encryptMutex.RLock() - defer fake.encryptMutex.RUnlock() - return fake.encryptArgsForCall[i].ctx, fake.encryptArgsForCall[i].plaintext +func (fake *FakeEncrypter) DecryptCalls(stub func(context.Context, []byte) ([]byte, error)) { + fake.decryptMutex.Lock() + defer fake.decryptMutex.Unlock() + fake.DecryptStub = stub } -func (fake *FakeEncrypter) EncryptReturns(result1 []byte, result2 error) { - fake.EncryptStub = nil - fake.encryptReturns = struct { +func (fake *FakeEncrypter) DecryptArgsForCall(i int) (context.Context, []byte) { + fake.decryptMutex.RLock() + defer fake.decryptMutex.RUnlock() + argsForCall := fake.decryptArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeEncrypter) DecryptReturns(result1 []byte, result2 error) { + fake.decryptMutex.Lock() + defer fake.decryptMutex.Unlock() + fake.DecryptStub = nil + fake.decryptReturns = struct { result1 []byte result2 error }{result1, result2} } -func (fake *FakeEncrypter) EncryptReturnsOnCall(i int, result1 []byte, result2 error) { - fake.EncryptStub = nil - if fake.encryptReturnsOnCall == nil { - fake.encryptReturnsOnCall = make(map[int]struct { +func (fake *FakeEncrypter) DecryptReturnsOnCall(i int, result1 []byte, result2 error) { + fake.decryptMutex.Lock() + defer fake.decryptMutex.Unlock() + fake.DecryptStub = nil + if fake.decryptReturnsOnCall == nil { + fake.decryptReturnsOnCall = make(map[int]struct { result1 []byte result2 error }) } - fake.encryptReturnsOnCall[i] = struct { + fake.decryptReturnsOnCall[i] = struct { result1 []byte result2 error }{result1, result2} } -func (fake *FakeEncrypter) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error) { - var ciphertextCopy []byte - if ciphertext != nil { - ciphertextCopy = make([]byte, len(ciphertext)) - copy(ciphertextCopy, ciphertext) +func (fake *FakeEncrypter) Encrypt(arg1 context.Context, arg2 []byte) ([]byte, error) { + var arg2Copy []byte + if arg2 != nil { + arg2Copy = make([]byte, len(arg2)) + copy(arg2Copy, arg2) } - fake.decryptMutex.Lock() - ret, specificReturn := fake.decryptReturnsOnCall[len(fake.decryptArgsForCall)] - fake.decryptArgsForCall = append(fake.decryptArgsForCall, struct { - ctx context.Context - ciphertext []byte - }{ctx, ciphertextCopy}) - fake.recordInvocation("Decrypt", []interface{}{ctx, ciphertextCopy}) - fake.decryptMutex.Unlock() - if fake.DecryptStub != nil { - return fake.DecryptStub(ctx, ciphertext) + fake.encryptMutex.Lock() + ret, specificReturn := fake.encryptReturnsOnCall[len(fake.encryptArgsForCall)] + fake.encryptArgsForCall = append(fake.encryptArgsForCall, struct { + arg1 context.Context + arg2 []byte + }{arg1, arg2Copy}) + fake.recordInvocation("Encrypt", []interface{}{arg1, arg2Copy}) + fake.encryptMutex.Unlock() + if fake.EncryptStub != nil { + return fake.EncryptStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } - return fake.decryptReturns.result1, fake.decryptReturns.result2 + fakeReturns := fake.encryptReturns + return fakeReturns.result1, fakeReturns.result2 } -func (fake *FakeEncrypter) DecryptCallCount() int { - fake.decryptMutex.RLock() - defer fake.decryptMutex.RUnlock() - return len(fake.decryptArgsForCall) +func (fake *FakeEncrypter) EncryptCallCount() int { + fake.encryptMutex.RLock() + defer fake.encryptMutex.RUnlock() + return len(fake.encryptArgsForCall) } -func (fake *FakeEncrypter) DecryptArgsForCall(i int) (context.Context, []byte) { - fake.decryptMutex.RLock() - defer fake.decryptMutex.RUnlock() - return fake.decryptArgsForCall[i].ctx, fake.decryptArgsForCall[i].ciphertext +func (fake *FakeEncrypter) EncryptCalls(stub func(context.Context, []byte) ([]byte, error)) { + fake.encryptMutex.Lock() + defer fake.encryptMutex.Unlock() + fake.EncryptStub = stub } -func (fake *FakeEncrypter) DecryptReturns(result1 []byte, result2 error) { - fake.DecryptStub = nil - fake.decryptReturns = struct { +func (fake *FakeEncrypter) EncryptArgsForCall(i int) (context.Context, []byte) { + fake.encryptMutex.RLock() + defer fake.encryptMutex.RUnlock() + argsForCall := fake.encryptArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeEncrypter) EncryptReturns(result1 []byte, result2 error) { + fake.encryptMutex.Lock() + defer fake.encryptMutex.Unlock() + fake.EncryptStub = nil + fake.encryptReturns = struct { result1 []byte result2 error }{result1, result2} } -func (fake *FakeEncrypter) DecryptReturnsOnCall(i int, result1 []byte, result2 error) { - fake.DecryptStub = nil - if fake.decryptReturnsOnCall == nil { - fake.decryptReturnsOnCall = make(map[int]struct { +func (fake *FakeEncrypter) EncryptReturnsOnCall(i int, result1 []byte, result2 error) { + fake.encryptMutex.Lock() + defer fake.encryptMutex.Unlock() + fake.EncryptStub = nil + if fake.encryptReturnsOnCall == nil { + fake.encryptReturnsOnCall = make(map[int]struct { result1 []byte result2 error }) } - fake.decryptReturnsOnCall[i] = struct { + fake.encryptReturnsOnCall[i] = struct { result1 []byte result2 error }{result1, result2} @@ -158,10 +182,10 @@ func (fake *FakeEncrypter) DecryptReturnsOnCall(i int, result1 []byte, result2 e func (fake *FakeEncrypter) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() - fake.encryptMutex.RLock() - defer fake.encryptMutex.RUnlock() fake.decryptMutex.RLock() defer fake.decryptMutex.RUnlock() + fake.encryptMutex.RLock() + defer fake.encryptMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_fetcher.go b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_fetcher.go index 48b61499..88c83c24 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_fetcher.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_fetcher.go @@ -2,17 +2,17 @@ package securityfakes import ( - "context" - "sync" + context "context" + sync "sync" - "github.com/Peripli/service-manager/pkg/security" + security "github.com/Peripli/service-manager/pkg/security" ) type FakeKeyFetcher struct { - GetEncryptionKeyStub func(ctx context.Context) ([]byte, error) + GetEncryptionKeyStub func(context.Context) ([]byte, error) getEncryptionKeyMutex sync.RWMutex getEncryptionKeyArgsForCall []struct { - ctx context.Context + arg1 context.Context } getEncryptionKeyReturns struct { result1 []byte @@ -26,21 +26,22 @@ type FakeKeyFetcher struct { invocationsMutex sync.RWMutex } -func (fake *FakeKeyFetcher) GetEncryptionKey(ctx context.Context) ([]byte, error) { +func (fake *FakeKeyFetcher) GetEncryptionKey(arg1 context.Context) ([]byte, error) { fake.getEncryptionKeyMutex.Lock() ret, specificReturn := fake.getEncryptionKeyReturnsOnCall[len(fake.getEncryptionKeyArgsForCall)] fake.getEncryptionKeyArgsForCall = append(fake.getEncryptionKeyArgsForCall, struct { - ctx context.Context - }{ctx}) - fake.recordInvocation("GetEncryptionKey", []interface{}{ctx}) + arg1 context.Context + }{arg1}) + fake.recordInvocation("GetEncryptionKey", []interface{}{arg1}) fake.getEncryptionKeyMutex.Unlock() if fake.GetEncryptionKeyStub != nil { - return fake.GetEncryptionKeyStub(ctx) + return fake.GetEncryptionKeyStub(arg1) } if specificReturn { return ret.result1, ret.result2 } - return fake.getEncryptionKeyReturns.result1, fake.getEncryptionKeyReturns.result2 + fakeReturns := fake.getEncryptionKeyReturns + return fakeReturns.result1, fakeReturns.result2 } func (fake *FakeKeyFetcher) GetEncryptionKeyCallCount() int { @@ -49,13 +50,22 @@ func (fake *FakeKeyFetcher) GetEncryptionKeyCallCount() int { return len(fake.getEncryptionKeyArgsForCall) } +func (fake *FakeKeyFetcher) GetEncryptionKeyCalls(stub func(context.Context) ([]byte, error)) { + fake.getEncryptionKeyMutex.Lock() + defer fake.getEncryptionKeyMutex.Unlock() + fake.GetEncryptionKeyStub = stub +} + func (fake *FakeKeyFetcher) GetEncryptionKeyArgsForCall(i int) context.Context { fake.getEncryptionKeyMutex.RLock() defer fake.getEncryptionKeyMutex.RUnlock() - return fake.getEncryptionKeyArgsForCall[i].ctx + argsForCall := fake.getEncryptionKeyArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeKeyFetcher) GetEncryptionKeyReturns(result1 []byte, result2 error) { + fake.getEncryptionKeyMutex.Lock() + defer fake.getEncryptionKeyMutex.Unlock() fake.GetEncryptionKeyStub = nil fake.getEncryptionKeyReturns = struct { result1 []byte @@ -64,6 +74,8 @@ func (fake *FakeKeyFetcher) GetEncryptionKeyReturns(result1 []byte, result2 erro } func (fake *FakeKeyFetcher) GetEncryptionKeyReturnsOnCall(i int, result1 []byte, result2 error) { + fake.getEncryptionKeyMutex.Lock() + defer fake.getEncryptionKeyMutex.Unlock() fake.GetEncryptionKeyStub = nil if fake.getEncryptionKeyReturnsOnCall == nil { fake.getEncryptionKeyReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_setter.go b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_setter.go index dd326467..166353ed 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_setter.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_key_setter.go @@ -2,18 +2,18 @@ package securityfakes import ( - "context" - "sync" + context "context" + sync "sync" - "github.com/Peripli/service-manager/pkg/security" + security "github.com/Peripli/service-manager/pkg/security" ) type FakeKeySetter struct { - SetEncryptionKeyStub func(ctx context.Context, key []byte) error + SetEncryptionKeyStub func(context.Context, []byte) error setEncryptionKeyMutex sync.RWMutex setEncryptionKeyArgsForCall []struct { - ctx context.Context - key []byte + arg1 context.Context + arg2 []byte } setEncryptionKeyReturns struct { result1 error @@ -25,27 +25,28 @@ type FakeKeySetter struct { invocationsMutex sync.RWMutex } -func (fake *FakeKeySetter) SetEncryptionKey(ctx context.Context, key []byte) error { - var keyCopy []byte - if key != nil { - keyCopy = make([]byte, len(key)) - copy(keyCopy, key) +func (fake *FakeKeySetter) SetEncryptionKey(arg1 context.Context, arg2 []byte) error { + var arg2Copy []byte + if arg2 != nil { + arg2Copy = make([]byte, len(arg2)) + copy(arg2Copy, arg2) } fake.setEncryptionKeyMutex.Lock() ret, specificReturn := fake.setEncryptionKeyReturnsOnCall[len(fake.setEncryptionKeyArgsForCall)] fake.setEncryptionKeyArgsForCall = append(fake.setEncryptionKeyArgsForCall, struct { - ctx context.Context - key []byte - }{ctx, keyCopy}) - fake.recordInvocation("SetEncryptionKey", []interface{}{ctx, keyCopy}) + arg1 context.Context + arg2 []byte + }{arg1, arg2Copy}) + fake.recordInvocation("SetEncryptionKey", []interface{}{arg1, arg2Copy}) fake.setEncryptionKeyMutex.Unlock() if fake.SetEncryptionKeyStub != nil { - return fake.SetEncryptionKeyStub(ctx, key) + return fake.SetEncryptionKeyStub(arg1, arg2) } if specificReturn { return ret.result1 } - return fake.setEncryptionKeyReturns.result1 + fakeReturns := fake.setEncryptionKeyReturns + return fakeReturns.result1 } func (fake *FakeKeySetter) SetEncryptionKeyCallCount() int { @@ -54,13 +55,22 @@ func (fake *FakeKeySetter) SetEncryptionKeyCallCount() int { return len(fake.setEncryptionKeyArgsForCall) } +func (fake *FakeKeySetter) SetEncryptionKeyCalls(stub func(context.Context, []byte) error) { + fake.setEncryptionKeyMutex.Lock() + defer fake.setEncryptionKeyMutex.Unlock() + fake.SetEncryptionKeyStub = stub +} + func (fake *FakeKeySetter) SetEncryptionKeyArgsForCall(i int) (context.Context, []byte) { fake.setEncryptionKeyMutex.RLock() defer fake.setEncryptionKeyMutex.RUnlock() - return fake.setEncryptionKeyArgsForCall[i].ctx, fake.setEncryptionKeyArgsForCall[i].key + argsForCall := fake.setEncryptionKeyArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 } func (fake *FakeKeySetter) SetEncryptionKeyReturns(result1 error) { + fake.setEncryptionKeyMutex.Lock() + defer fake.setEncryptionKeyMutex.Unlock() fake.SetEncryptionKeyStub = nil fake.setEncryptionKeyReturns = struct { result1 error @@ -68,6 +78,8 @@ func (fake *FakeKeySetter) SetEncryptionKeyReturns(result1 error) { } func (fake *FakeKeySetter) SetEncryptionKeyReturnsOnCall(i int, result1 error) { + fake.setEncryptionKeyMutex.Lock() + defer fake.setEncryptionKeyMutex.Unlock() fake.SetEncryptionKeyStub = nil if fake.setEncryptionKeyReturnsOnCall == nil { fake.setEncryptionKeyReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_token_verifier.go b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_token_verifier.go index 717f2a05..d30ad705 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_token_verifier.go +++ b/vendor/github.com/Peripli/service-manager/pkg/security/securityfakes/fake_token_verifier.go @@ -2,19 +2,19 @@ package securityfakes import ( - "context" - "sync" + context "context" + sync "sync" - "github.com/Peripli/service-manager/pkg/security" - "github.com/Peripli/service-manager/pkg/web" + security "github.com/Peripli/service-manager/pkg/security" + web "github.com/Peripli/service-manager/pkg/web" ) type FakeTokenVerifier struct { - VerifyStub func(ctx context.Context, token string) (web.TokenData, error) + VerifyStub func(context.Context, string) (web.TokenData, error) verifyMutex sync.RWMutex verifyArgsForCall []struct { - ctx context.Context - token string + arg1 context.Context + arg2 string } verifyReturns struct { result1 web.TokenData @@ -28,22 +28,23 @@ type FakeTokenVerifier struct { invocationsMutex sync.RWMutex } -func (fake *FakeTokenVerifier) Verify(ctx context.Context, token string) (web.TokenData, error) { +func (fake *FakeTokenVerifier) Verify(arg1 context.Context, arg2 string) (web.TokenData, error) { fake.verifyMutex.Lock() ret, specificReturn := fake.verifyReturnsOnCall[len(fake.verifyArgsForCall)] fake.verifyArgsForCall = append(fake.verifyArgsForCall, struct { - ctx context.Context - token string - }{ctx, token}) - fake.recordInvocation("Verify", []interface{}{ctx, token}) + arg1 context.Context + arg2 string + }{arg1, arg2}) + fake.recordInvocation("Verify", []interface{}{arg1, arg2}) fake.verifyMutex.Unlock() if fake.VerifyStub != nil { - return fake.VerifyStub(ctx, token) + return fake.VerifyStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } - return fake.verifyReturns.result1, fake.verifyReturns.result2 + fakeReturns := fake.verifyReturns + return fakeReturns.result1, fakeReturns.result2 } func (fake *FakeTokenVerifier) VerifyCallCount() int { @@ -52,13 +53,22 @@ func (fake *FakeTokenVerifier) VerifyCallCount() int { return len(fake.verifyArgsForCall) } +func (fake *FakeTokenVerifier) VerifyCalls(stub func(context.Context, string) (web.TokenData, error)) { + fake.verifyMutex.Lock() + defer fake.verifyMutex.Unlock() + fake.VerifyStub = stub +} + func (fake *FakeTokenVerifier) VerifyArgsForCall(i int) (context.Context, string) { fake.verifyMutex.RLock() defer fake.verifyMutex.RUnlock() - return fake.verifyArgsForCall[i].ctx, fake.verifyArgsForCall[i].token + argsForCall := fake.verifyArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 } func (fake *FakeTokenVerifier) VerifyReturns(result1 web.TokenData, result2 error) { + fake.verifyMutex.Lock() + defer fake.verifyMutex.Unlock() fake.VerifyStub = nil fake.verifyReturns = struct { result1 web.TokenData @@ -67,6 +77,8 @@ func (fake *FakeTokenVerifier) VerifyReturns(result1 web.TokenData, result2 erro } func (fake *FakeTokenVerifier) VerifyReturnsOnCall(i int, result1 web.TokenData, result2 error) { + fake.verifyMutex.Lock() + defer fake.verifyMutex.Unlock() fake.VerifyStub = nil if fake.verifyReturnsOnCall == nil { fake.verifyReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/server/server.go b/vendor/github.com/Peripli/service-manager/pkg/server/server.go index 8d127435..573b2e23 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/server/server.go +++ b/vendor/github.com/Peripli/service-manager/pkg/server/server.go @@ -31,12 +31,20 @@ import ( "github.com/gorilla/mux" ) +const ( + _ = iota + kb int = 1 << (10 * iota) + mb +) + // Settings type to be loaded from the environment type Settings struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` RequestTimeout time.Duration `mapstructure:"request_timeout"` ShutdownTimeout time.Duration `mapstructure:"shutdown_timeout"` + MaxBodyBytes int `mapstructure:"max_body_bytes"` + MaxHeaderBytes int `mapstructure:"max_header_bytes"` } // DefaultSettings returns the default values for configuring the Service Manager @@ -45,6 +53,8 @@ func DefaultSettings() *Settings { Port: 8080, RequestTimeout: time.Second * 3, ShutdownTimeout: time.Second * 3, + MaxBodyBytes: mb, + MaxHeaderBytes: kb, } } @@ -83,7 +93,7 @@ type Server struct { // Returns the new server and an error if creation was not successful func New(config *Settings, api *web.API) *Server { router := mux.NewRouter().StrictSlash(true) - registerControllers(api, router) + registerControllers(api, router, config) return &Server{ Router: router, @@ -91,12 +101,12 @@ func New(config *Settings, api *web.API) *Server { } } -func registerControllers(API *web.API, router *mux.Router) { +func registerControllers(API *web.API, router *mux.Router, config *Settings) { for _, ctrl := range API.Controllers { for _, route := range ctrl.Routes() { log.D().Debugf("Registering endpoint: %s %s", route.Endpoint.Method, route.Endpoint.Path) handler := web.Filters(API.Filters).ChainMatching(route) - router.Handle(route.Endpoint.Path, api.NewHTTPHandler(handler)).Methods(route.Endpoint.Method) + router.Handle(route.Endpoint.Path, api.NewHTTPHandler(handler, config.MaxBodyBytes)).Methods(route.Endpoint.Method) } } } @@ -107,10 +117,11 @@ func (s *Server) Run(ctx context.Context) { panic(fmt.Sprintf("invalid server config: %s", err)) } handler := &http.Server{ - Handler: s.Router, - Addr: s.Config.Host + ":" + strconv.Itoa(s.Config.Port), - WriteTimeout: s.Config.RequestTimeout, - ReadTimeout: s.Config.RequestTimeout, + Handler: s.Router, + Addr: s.Config.Host + ":" + strconv.Itoa(s.Config.Port), + WriteTimeout: s.Config.RequestTimeout, + ReadTimeout: s.Config.RequestTimeout, + MaxHeaderBytes: s.Config.MaxHeaderBytes, } startServer(ctx, handler, s.Config.ShutdownTimeout) } diff --git a/vendor/github.com/Peripli/service-manager/pkg/sm/sm.go b/vendor/github.com/Peripli/service-manager/pkg/sm/sm.go index 1ed81d94..0d9e8362 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/sm/sm.go +++ b/vendor/github.com/Peripli/service-manager/pkg/sm/sm.go @@ -95,7 +95,7 @@ func New(ctx context.Context, cancel context.CancelFunc, env env.Environment) *S util.HandleInterrupts(ctx, cancel) // setup smStorage - smStorage, err := storage.Use(ctx, postgres.Storage, cfg.Storage.URI, []byte(cfg.API.Security.EncryptionKey)) + smStorage, err := storage.Use(ctx, postgres.Storage, cfg.Storage) if err != nil { panic(fmt.Sprintf("error using smStorage: %s", err)) } @@ -115,6 +115,8 @@ func New(ctx context.Context, cancel context.CancelFunc, env env.Environment) *S panic(fmt.Sprintf("error creating core api: %s", err)) } + API.AddHealthIndicator(&storage.HealthIndicator{Pinger: storage.PingFunc(smStorage.Ping)}) + return &ServiceManagerBuilder{ ctx: ctx, cfg: cfg.Server, diff --git a/vendor/github.com/Peripli/service-manager/pkg/types/broker.go b/vendor/github.com/Peripli/service-manager/pkg/types/broker.go index 6d781860..eb3516f9 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/types/broker.go +++ b/vendor/github.com/Peripli/service-manager/pkg/types/broker.go @@ -33,14 +33,15 @@ type Brokers struct { // Broker broker struct type Broker struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` - BrokerURL string `json:"broker_url"` - Credentials *Credentials `json:"credentials,omitempty" structs:"-"` - Catalog json.RawMessage `json:"catalog,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + BrokerURL string `json:"broker_url"` + Credentials *Credentials `json:"credentials,omitempty" structs:"-"` + + Services []*ServiceOffering `json:"services,omitempty" structs:"-"` } // Validate implements InputValidator and verifies all mandatory fields are populated diff --git a/vendor/github.com/Peripli/service-manager/pkg/types/credentials.go b/vendor/github.com/Peripli/service-manager/pkg/types/credentials.go index 7d811cbd..95a49794 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/types/credentials.go +++ b/vendor/github.com/Peripli/service-manager/pkg/types/credentials.go @@ -19,18 +19,28 @@ package types import ( "crypto/rand" "encoding/base64" + "encoding/json" "errors" ) // Basic basic credentials type Basic struct { - Username string `json:"username"` - Password string `json:"password"` + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` } // Credentials credentials type Credentials struct { - Basic *Basic `json:"basic"` + Basic *Basic `json:"basic,omitempty"` +} + +func (c *Credentials) MarshalJSON() ([]byte, error) { + type C Credentials + toMarshal := (*C)(c) + if toMarshal.Basic == nil || toMarshal.Basic.Username == "" || toMarshal.Basic.Password == "" { + toMarshal.Basic = nil + } + return json.Marshal(toMarshal) } // Validate implements InputValidator and verifies all mandatory fields are populated @@ -47,16 +57,6 @@ func (c *Credentials) Validate() error { return nil } -// NewBasicCredentials returns new basic credentials object -func NewBasicCredentials(username string, password string) *Credentials { - return &Credentials{ - Basic: &Basic{ - Username: username, - Password: password, - }, - } -} - // GenerateCredentials return user and password func GenerateCredentials() (*Credentials, error) { password := make([]byte, 32) @@ -74,5 +74,10 @@ func GenerateCredentials() (*Credentials, error) { encodedPass := base64.StdEncoding.EncodeToString(password) encodedUser := base64.StdEncoding.EncodeToString(user) - return NewBasicCredentials(encodedUser, encodedPass), nil + return &Credentials{ + Basic: &Basic{ + Username: encodedUser, + Password: encodedPass, + }, + }, nil } diff --git a/vendor/github.com/Peripli/service-manager/pkg/types/service_offering.go b/vendor/github.com/Peripli/service-manager/pkg/types/service_offering.go new file mode 100644 index 00000000..22618dc3 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/pkg/types/service_offering.go @@ -0,0 +1,91 @@ +/* + * Copyright 2018 The Service Manager 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 types + +import ( + "encoding/json" + "errors" + "fmt" + "time" + + "github.com/Peripli/service-manager/pkg/util" +) + +// Service Offering struct +type ServiceOffering struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + + Bindable bool `json:"bindable"` + InstancesRetrievable bool `json:"instances_retrievable"` + BindingsRetrievable bool `json:"bindings_retrievable"` + PlanUpdatable bool `json:"plan_updateable"` + CatalogID string `json:"catalog_id"` + CatalogName string `json:"catalog_name"` + + Tags json.RawMessage `json:"tags,omitempty"` + Requires json.RawMessage `json:"requires,omitempty"` + Metadata json.RawMessage `json:"metadata,omitempty"` + + BrokerID string `json:"broker_id"` + Plans []*ServicePlan `json:"plans"` +} + +// MarshalJSON override json serialization for http response +func (so *ServiceOffering) MarshalJSON() ([]byte, error) { + type SO ServiceOffering + toMarshal := struct { + CreatedAt *string `json:"created_at,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + *SO + }{ + SO: (*SO)(so), + } + + if !so.CreatedAt.IsZero() { + str := util.ToRFCFormat(so.CreatedAt) + toMarshal.CreatedAt = &str + } + if !so.UpdatedAt.IsZero() { + str := util.ToRFCFormat(so.UpdatedAt) + toMarshal.UpdatedAt = &str + } + return json.Marshal(toMarshal) +} + +// Validate implements InputValidator and verifies all mandatory fields are populated +func (so *ServiceOffering) Validate() error { + if util.HasRFC3986ReservedSymbols(so.ID) { + return fmt.Errorf("%s contains invalid character(s)", so.ID) + } + if so.Name == "" { + return errors.New("service offering catalog name missing") + } + if so.CatalogID == "" { + return errors.New("service offering catalog id missing") + } + if so.CatalogName == "" { + return errors.New("service offering catalog name missing") + } + if so.BrokerID == "" { + return errors.New("service offering broker id missing") + } + return nil +} diff --git a/vendor/github.com/Peripli/service-manager/pkg/types/service_plan.go b/vendor/github.com/Peripli/service-manager/pkg/types/service_plan.go new file mode 100644 index 00000000..df3c0829 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/pkg/types/service_plan.go @@ -0,0 +1,87 @@ +/* + * Copyright 2018 The Service Manager 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 types + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/Peripli/service-manager/pkg/util" +) + +// Service Plan struct +type ServicePlan struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + + CatalogID string `json:"catalog_id"` + CatalogName string `json:"catalog_name"` + Free bool `json:"free"` + Bindable bool `json:"bindable"` + PlanUpdatable bool `json:"plan_updateable"` + + Metadata json.RawMessage `json:"metadata,omitempty"` + Schemas json.RawMessage `json:"schemas"` + + ServiceOfferingID string `json:"service_offering_id"` +} + +// MarshalJSON override json serialization for http response +func (sp *ServicePlan) MarshalJSON() ([]byte, error) { + type SP ServicePlan + toMarshal := struct { + CreatedAt *string `json:"created_at,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + *SP + }{ + SP: (*SP)(sp), + } + + if !sp.CreatedAt.IsZero() { + str := util.ToRFCFormat(sp.CreatedAt) + toMarshal.CreatedAt = &str + } + if !sp.UpdatedAt.IsZero() { + str := util.ToRFCFormat(sp.UpdatedAt) + toMarshal.UpdatedAt = &str + } + return json.Marshal(toMarshal) +} + +// Validate implements InputValidator and verifies all mandatory fields are populated +func (sp *ServicePlan) Validate() error { + if util.HasRFC3986ReservedSymbols(sp.ID) { + return fmt.Errorf("%s contains invalid character(s)", sp.ID) + } + if sp.Name == "" { + return fmt.Errorf("service plan name missing") + } + if sp.CatalogID == "" { + return fmt.Errorf("service plan catalog id missing") + } + if sp.CatalogName == "" { + return fmt.Errorf("service plan catalog name missing") + } + if sp.ServiceOfferingID == "" { + return fmt.Errorf("service plan service offering id missing") + } + return nil +} diff --git a/vendor/github.com/Peripli/service-manager/pkg/util/api.go b/vendor/github.com/Peripli/service-manager/pkg/util/api.go index 63e1292b..49c48256 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/util/api.go +++ b/vendor/github.com/Peripli/service-manager/pkg/util/api.go @@ -18,7 +18,7 @@ package util import ( - "encoding/json" + "encoding/json" "net/http" "strings" "time" @@ -33,6 +33,9 @@ var ( }, "") ) +// EmptyResponseBody represents an empty response body value +type EmptyResponseBody struct{} + // InputValidator should be implemented by types that need input validation check. For a reference refer to pkg/types type InputValidator interface { Validate() error @@ -129,7 +132,13 @@ func WriteJSON(writer http.ResponseWriter, code int, value interface{}) error { func NewJSONResponse(code int, value interface{}) (*web.Response, error) { headers := http.Header{} headers.Add("Content-Type", "application/json") - body, err := json.Marshal(value) + + body := make([]byte, 0) + var err error + if _, ok := value.(EmptyResponseBody); !ok { + body, err = json.Marshal(value) + } + return &web.Response{ StatusCode: code, Header: headers, diff --git a/vendor/github.com/Peripli/service-manager/pkg/util/api_test.go b/vendor/github.com/Peripli/service-manager/pkg/util/api_test.go index 9c78bf11..1f933281 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/util/api_test.go +++ b/vendor/github.com/Peripli/service-manager/pkg/util/api_test.go @@ -223,9 +223,36 @@ var _ = Describe("Utils test", func() { Expect(response.Body).Should(MatchJSON(testTypeValid)) Expect(response.Header.Get("Content-Type")).To(Equal("application/json")) }) + + It("builds a web.Response containing an empty response value when return code is 204 No Content", func() { + testJSONResponse(http.StatusNoContent, util.EmptyResponseBody{}, []byte{}) + }) + + It("builds a web.Response containing an empty response value when return code is 200 OK and EmptyResponseBody is provided", func() { + testJSONResponse(http.StatusOK, util.EmptyResponseBody{}, []byte{}) + }) + + It("builds a web.Response containing a non-empty response value when instead of EmptyResponseBody an empty data structure is provided", func() { + response, err := util.NewJSONResponse(http.StatusOK, struct{}{}) + + Expect(err).ShouldNot(HaveOccurred()) + Expect(response.StatusCode).To(Equal(http.StatusOK)) + Expect(response.Body).ShouldNot(BeEmpty()) + Expect(response.Body).ShouldNot(Equal(util.EmptyResponseBody{})) + Expect(response.Header.Get("Content-Type")).To(Equal("application/json")) + }) }) }) +func testJSONResponse(expectedCode int, providedBody, expectedMarshalledBody interface{}) { + response, err := util.NewJSONResponse(expectedCode, providedBody) + + Expect(err).ShouldNot(HaveOccurred()) + Expect(response.StatusCode).To(Equal(expectedCode)) + Expect(response.Body).Should(Equal(expectedMarshalledBody)) + Expect(response.Header.Get("Content-Type")).To(Equal("application/json")) +} + type testTypeValidated struct { Field1 string `json:"field1"` Field2 string `json:"field2"` diff --git a/vendor/github.com/Peripli/service-manager/pkg/util/slice/strings.go b/vendor/github.com/Peripli/service-manager/pkg/util/slice/strings.go index a3987744..83fcda8c 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/util/slice/strings.go +++ b/vendor/github.com/Peripli/service-manager/pkg/util/slice/strings.go @@ -63,3 +63,13 @@ func StringsAnyEquals(stringSlice []string, str string) bool { } return false } + +// StringsAnySuffix returns true if any of the strings in the slice have the given suffix. +func StringsAnySuffix(stringSlice []string, suffix string) bool { + for _, v := range stringSlice { + if strings.HasSuffix(v, suffix) { + return true + } + } + return false +} diff --git a/vendor/github.com/Peripli/service-manager/pkg/web/api.go b/vendor/github.com/Peripli/service-manager/pkg/web/api.go index c45352a4..8e1c7a93 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/web/api.go +++ b/vendor/github.com/Peripli/service-manager/pkg/web/api.go @@ -19,9 +19,10 @@ package web import ( - "github.com/Peripli/service-manager/pkg/health" "net/http" + "github.com/Peripli/service-manager/pkg/health" + "github.com/Peripli/service-manager/pkg/log" "github.com/Peripli/service-manager/pkg/util/slice" ) diff --git a/vendor/github.com/Peripli/service-manager/pkg/web/routes.go b/vendor/github.com/Peripli/service-manager/pkg/web/routes.go index 484e20ca..1059db6e 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/web/routes.go +++ b/vendor/github.com/Peripli/service-manager/pkg/web/routes.go @@ -6,6 +6,12 @@ const ( // BrokersURL is the URL path to manage service brokers BrokersURL = "/" + apiVersion + "/service_brokers" + // ServiceOfferingsURL is the URL path to manage service offerings + ServiceOfferingsURL = "/" + apiVersion + "/service_offerings" + + // ServicePlansURL is the URL path to manage service plans + ServicePlansURL = "/" + apiVersion + "/service_plans" + // PlatformsURL is the URL path to manage platforms PlatformsURL = "/" + apiVersion + "/platforms" diff --git a/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_filter.go b/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_filter.go index e40c2a82..b64b8e25 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_filter.go +++ b/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_filter.go @@ -2,26 +2,37 @@ package webfakes import ( - "sync" + sync "sync" - "github.com/Peripli/service-manager/pkg/web" + web "github.com/Peripli/service-manager/pkg/web" ) type FakeFilter struct { + FilterMatchersStub func() []web.FilterMatcher + filterMatchersMutex sync.RWMutex + filterMatchersArgsForCall []struct { + } + filterMatchersReturns struct { + result1 []web.FilterMatcher + } + filterMatchersReturnsOnCall map[int]struct { + result1 []web.FilterMatcher + } NameStub func() string nameMutex sync.RWMutex - nameArgsForCall []struct{} - nameReturns struct { + nameArgsForCall []struct { + } + nameReturns struct { result1 string } nameReturnsOnCall map[int]struct { result1 string } - RunStub func(req *web.Request, next web.Handler) (*web.Response, error) + RunStub func(*web.Request, web.Handler) (*web.Response, error) runMutex sync.RWMutex runArgsForCall []struct { - req *web.Request - next web.Handler + arg1 *web.Request + arg2 web.Handler } runReturns struct { result1 *web.Response @@ -31,23 +42,67 @@ type FakeFilter struct { result1 *web.Response result2 error } - FilterMatchersStub func() []web.FilterMatcher - filterMatchersMutex sync.RWMutex - filterMatchersArgsForCall []struct{} - filterMatchersReturns struct { - result1 []web.FilterMatcher + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeFilter) FilterMatchers() []web.FilterMatcher { + fake.filterMatchersMutex.Lock() + ret, specificReturn := fake.filterMatchersReturnsOnCall[len(fake.filterMatchersArgsForCall)] + fake.filterMatchersArgsForCall = append(fake.filterMatchersArgsForCall, struct { + }{}) + fake.recordInvocation("FilterMatchers", []interface{}{}) + fake.filterMatchersMutex.Unlock() + if fake.FilterMatchersStub != nil { + return fake.FilterMatchersStub() } - filterMatchersReturnsOnCall map[int]struct { + if specificReturn { + return ret.result1 + } + fakeReturns := fake.filterMatchersReturns + return fakeReturns.result1 +} + +func (fake *FakeFilter) FilterMatchersCallCount() int { + fake.filterMatchersMutex.RLock() + defer fake.filterMatchersMutex.RUnlock() + return len(fake.filterMatchersArgsForCall) +} + +func (fake *FakeFilter) FilterMatchersCalls(stub func() []web.FilterMatcher) { + fake.filterMatchersMutex.Lock() + defer fake.filterMatchersMutex.Unlock() + fake.FilterMatchersStub = stub +} + +func (fake *FakeFilter) FilterMatchersReturns(result1 []web.FilterMatcher) { + fake.filterMatchersMutex.Lock() + defer fake.filterMatchersMutex.Unlock() + fake.FilterMatchersStub = nil + fake.filterMatchersReturns = struct { result1 []web.FilterMatcher + }{result1} +} + +func (fake *FakeFilter) FilterMatchersReturnsOnCall(i int, result1 []web.FilterMatcher) { + fake.filterMatchersMutex.Lock() + defer fake.filterMatchersMutex.Unlock() + fake.FilterMatchersStub = nil + if fake.filterMatchersReturnsOnCall == nil { + fake.filterMatchersReturnsOnCall = make(map[int]struct { + result1 []web.FilterMatcher + }) } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex + fake.filterMatchersReturnsOnCall[i] = struct { + result1 []web.FilterMatcher + }{result1} } func (fake *FakeFilter) Name() string { fake.nameMutex.Lock() ret, specificReturn := fake.nameReturnsOnCall[len(fake.nameArgsForCall)] - fake.nameArgsForCall = append(fake.nameArgsForCall, struct{}{}) + fake.nameArgsForCall = append(fake.nameArgsForCall, struct { + }{}) fake.recordInvocation("Name", []interface{}{}) fake.nameMutex.Unlock() if fake.NameStub != nil { @@ -56,7 +111,8 @@ func (fake *FakeFilter) Name() string { if specificReturn { return ret.result1 } - return fake.nameReturns.result1 + fakeReturns := fake.nameReturns + return fakeReturns.result1 } func (fake *FakeFilter) NameCallCount() int { @@ -65,7 +121,15 @@ func (fake *FakeFilter) NameCallCount() int { return len(fake.nameArgsForCall) } +func (fake *FakeFilter) NameCalls(stub func() string) { + fake.nameMutex.Lock() + defer fake.nameMutex.Unlock() + fake.NameStub = stub +} + func (fake *FakeFilter) NameReturns(result1 string) { + fake.nameMutex.Lock() + defer fake.nameMutex.Unlock() fake.NameStub = nil fake.nameReturns = struct { result1 string @@ -73,6 +137,8 @@ func (fake *FakeFilter) NameReturns(result1 string) { } func (fake *FakeFilter) NameReturnsOnCall(i int, result1 string) { + fake.nameMutex.Lock() + defer fake.nameMutex.Unlock() fake.NameStub = nil if fake.nameReturnsOnCall == nil { fake.nameReturnsOnCall = make(map[int]struct { @@ -84,22 +150,23 @@ func (fake *FakeFilter) NameReturnsOnCall(i int, result1 string) { }{result1} } -func (fake *FakeFilter) Run(req *web.Request, next web.Handler) (*web.Response, error) { +func (fake *FakeFilter) Run(arg1 *web.Request, arg2 web.Handler) (*web.Response, error) { fake.runMutex.Lock() ret, specificReturn := fake.runReturnsOnCall[len(fake.runArgsForCall)] fake.runArgsForCall = append(fake.runArgsForCall, struct { - req *web.Request - next web.Handler - }{req, next}) - fake.recordInvocation("Run", []interface{}{req, next}) + arg1 *web.Request + arg2 web.Handler + }{arg1, arg2}) + fake.recordInvocation("Run", []interface{}{arg1, arg2}) fake.runMutex.Unlock() if fake.RunStub != nil { - return fake.RunStub(req, next) + return fake.RunStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } - return fake.runReturns.result1, fake.runReturns.result2 + fakeReturns := fake.runReturns + return fakeReturns.result1, fakeReturns.result2 } func (fake *FakeFilter) RunCallCount() int { @@ -108,13 +175,22 @@ func (fake *FakeFilter) RunCallCount() int { return len(fake.runArgsForCall) } +func (fake *FakeFilter) RunCalls(stub func(*web.Request, web.Handler) (*web.Response, error)) { + fake.runMutex.Lock() + defer fake.runMutex.Unlock() + fake.RunStub = stub +} + func (fake *FakeFilter) RunArgsForCall(i int) (*web.Request, web.Handler) { fake.runMutex.RLock() defer fake.runMutex.RUnlock() - return fake.runArgsForCall[i].req, fake.runArgsForCall[i].next + argsForCall := fake.runArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 } func (fake *FakeFilter) RunReturns(result1 *web.Response, result2 error) { + fake.runMutex.Lock() + defer fake.runMutex.Unlock() fake.RunStub = nil fake.runReturns = struct { result1 *web.Response @@ -123,6 +199,8 @@ func (fake *FakeFilter) RunReturns(result1 *web.Response, result2 error) { } func (fake *FakeFilter) RunReturnsOnCall(i int, result1 *web.Response, result2 error) { + fake.runMutex.Lock() + defer fake.runMutex.Unlock() fake.RunStub = nil if fake.runReturnsOnCall == nil { fake.runReturnsOnCall = make(map[int]struct { @@ -136,55 +214,15 @@ func (fake *FakeFilter) RunReturnsOnCall(i int, result1 *web.Response, result2 e }{result1, result2} } -func (fake *FakeFilter) FilterMatchers() []web.FilterMatcher { - fake.filterMatchersMutex.Lock() - ret, specificReturn := fake.filterMatchersReturnsOnCall[len(fake.filterMatchersArgsForCall)] - fake.filterMatchersArgsForCall = append(fake.filterMatchersArgsForCall, struct{}{}) - fake.recordInvocation("FilterMatchers", []interface{}{}) - fake.filterMatchersMutex.Unlock() - if fake.FilterMatchersStub != nil { - return fake.FilterMatchersStub() - } - if specificReturn { - return ret.result1 - } - return fake.filterMatchersReturns.result1 -} - -func (fake *FakeFilter) FilterMatchersCallCount() int { - fake.filterMatchersMutex.RLock() - defer fake.filterMatchersMutex.RUnlock() - return len(fake.filterMatchersArgsForCall) -} - -func (fake *FakeFilter) FilterMatchersReturns(result1 []web.FilterMatcher) { - fake.FilterMatchersStub = nil - fake.filterMatchersReturns = struct { - result1 []web.FilterMatcher - }{result1} -} - -func (fake *FakeFilter) FilterMatchersReturnsOnCall(i int, result1 []web.FilterMatcher) { - fake.FilterMatchersStub = nil - if fake.filterMatchersReturnsOnCall == nil { - fake.filterMatchersReturnsOnCall = make(map[int]struct { - result1 []web.FilterMatcher - }) - } - fake.filterMatchersReturnsOnCall[i] = struct { - result1 []web.FilterMatcher - }{result1} -} - func (fake *FakeFilter) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() + fake.filterMatchersMutex.RLock() + defer fake.filterMatchersMutex.RUnlock() fake.nameMutex.RLock() defer fake.nameMutex.RUnlock() fake.runMutex.RLock() defer fake.runMutex.RUnlock() - fake.filterMatchersMutex.RLock() - defer fake.filterMatchersMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value diff --git a/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_handler.go b/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_handler.go index db88f4c7..56c1c9a7 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_handler.go +++ b/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_handler.go @@ -2,16 +2,16 @@ package webfakes import ( - "sync" + sync "sync" - "github.com/Peripli/service-manager/pkg/web" + web "github.com/Peripli/service-manager/pkg/web" ) type FakeHandler struct { - HandleStub func(req *web.Request) (resp *web.Response, err error) + HandleStub func(*web.Request) (*web.Response, error) handleMutex sync.RWMutex handleArgsForCall []struct { - req *web.Request + arg1 *web.Request } handleReturns struct { result1 *web.Response @@ -25,21 +25,22 @@ type FakeHandler struct { invocationsMutex sync.RWMutex } -func (fake *FakeHandler) Handle(req *web.Request) (resp *web.Response, err error) { +func (fake *FakeHandler) Handle(arg1 *web.Request) (*web.Response, error) { fake.handleMutex.Lock() ret, specificReturn := fake.handleReturnsOnCall[len(fake.handleArgsForCall)] fake.handleArgsForCall = append(fake.handleArgsForCall, struct { - req *web.Request - }{req}) - fake.recordInvocation("Handle", []interface{}{req}) + arg1 *web.Request + }{arg1}) + fake.recordInvocation("Handle", []interface{}{arg1}) fake.handleMutex.Unlock() if fake.HandleStub != nil { - return fake.HandleStub(req) + return fake.HandleStub(arg1) } if specificReturn { return ret.result1, ret.result2 } - return fake.handleReturns.result1, fake.handleReturns.result2 + fakeReturns := fake.handleReturns + return fakeReturns.result1, fakeReturns.result2 } func (fake *FakeHandler) HandleCallCount() int { @@ -48,13 +49,22 @@ func (fake *FakeHandler) HandleCallCount() int { return len(fake.handleArgsForCall) } +func (fake *FakeHandler) HandleCalls(stub func(*web.Request) (*web.Response, error)) { + fake.handleMutex.Lock() + defer fake.handleMutex.Unlock() + fake.HandleStub = stub +} + func (fake *FakeHandler) HandleArgsForCall(i int) *web.Request { fake.handleMutex.RLock() defer fake.handleMutex.RUnlock() - return fake.handleArgsForCall[i].req + argsForCall := fake.handleArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeHandler) HandleReturns(result1 *web.Response, result2 error) { + fake.handleMutex.Lock() + defer fake.handleMutex.Unlock() fake.HandleStub = nil fake.handleReturns = struct { result1 *web.Response @@ -63,6 +73,8 @@ func (fake *FakeHandler) HandleReturns(result1 *web.Response, result2 error) { } func (fake *FakeHandler) HandleReturnsOnCall(i int, result1 *web.Response, result2 error) { + fake.handleMutex.Lock() + defer fake.handleMutex.Unlock() fake.HandleStub = nil if fake.handleReturnsOnCall == nil { fake.handleReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_token_data.go b/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_token_data.go index 7e446a5f..c731718f 100644 --- a/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_token_data.go +++ b/vendor/github.com/Peripli/service-manager/pkg/web/webfakes/fake_token_data.go @@ -2,16 +2,16 @@ package webfakes import ( - "sync" + sync "sync" - "github.com/Peripli/service-manager/pkg/web" + web "github.com/Peripli/service-manager/pkg/web" ) type FakeTokenData struct { - ClaimsStub func(v interface{}) error + ClaimsStub func(interface{}) error claimsMutex sync.RWMutex claimsArgsForCall []struct { - v interface{} + arg1 interface{} } claimsReturns struct { result1 error @@ -23,21 +23,22 @@ type FakeTokenData struct { invocationsMutex sync.RWMutex } -func (fake *FakeTokenData) Claims(v interface{}) error { +func (fake *FakeTokenData) Claims(arg1 interface{}) error { fake.claimsMutex.Lock() ret, specificReturn := fake.claimsReturnsOnCall[len(fake.claimsArgsForCall)] fake.claimsArgsForCall = append(fake.claimsArgsForCall, struct { - v interface{} - }{v}) - fake.recordInvocation("Claims", []interface{}{v}) + arg1 interface{} + }{arg1}) + fake.recordInvocation("Claims", []interface{}{arg1}) fake.claimsMutex.Unlock() if fake.ClaimsStub != nil { - return fake.ClaimsStub(v) + return fake.ClaimsStub(arg1) } if specificReturn { return ret.result1 } - return fake.claimsReturns.result1 + fakeReturns := fake.claimsReturns + return fakeReturns.result1 } func (fake *FakeTokenData) ClaimsCallCount() int { @@ -46,13 +47,22 @@ func (fake *FakeTokenData) ClaimsCallCount() int { return len(fake.claimsArgsForCall) } +func (fake *FakeTokenData) ClaimsCalls(stub func(interface{}) error) { + fake.claimsMutex.Lock() + defer fake.claimsMutex.Unlock() + fake.ClaimsStub = stub +} + func (fake *FakeTokenData) ClaimsArgsForCall(i int) interface{} { fake.claimsMutex.RLock() defer fake.claimsMutex.RUnlock() - return fake.claimsArgsForCall[i].v + argsForCall := fake.claimsArgsForCall[i] + return argsForCall.arg1 } func (fake *FakeTokenData) ClaimsReturns(result1 error) { + fake.claimsMutex.Lock() + defer fake.claimsMutex.Unlock() fake.ClaimsStub = nil fake.claimsReturns = struct { result1 error @@ -60,6 +70,8 @@ func (fake *FakeTokenData) ClaimsReturns(result1 error) { } func (fake *FakeTokenData) ClaimsReturnsOnCall(i int, result1 error) { + fake.claimsMutex.Lock() + defer fake.claimsMutex.Unlock() fake.ClaimsStub = nil if fake.claimsReturnsOnCall == nil { fake.claimsReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/storage/healthcheck.go b/vendor/github.com/Peripli/service-manager/storage/healthcheck.go index ed40e959..b6c42686 100644 --- a/vendor/github.com/Peripli/service-manager/storage/healthcheck.go +++ b/vendor/github.com/Peripli/service-manager/storage/healthcheck.go @@ -20,7 +20,7 @@ import "github.com/Peripli/service-manager/pkg/health" // HealthIndicator returns a new indicator for the storage type HealthIndicator struct { - Storage Storage + Pinger Pinger } // Name returns the name of the storage component @@ -30,10 +30,10 @@ func (i *HealthIndicator) Name() string { // Health returns the health of the storage component func (i *HealthIndicator) Health() *health.Health { - err := i.Storage.Ping() + err := i.Pinger.Ping() healthz := health.New() if err != nil { - return healthz.WithError(err).WithDetail("message", "Storage ping failed") + return healthz.WithError(err).WithDetail("message", "Repository ping failed") } return healthz.Up() } diff --git a/vendor/github.com/Peripli/service-manager/storage/interfaces.go b/vendor/github.com/Peripli/service-manager/storage/interfaces.go index fe5db467..7ec1fc47 100644 --- a/vendor/github.com/Peripli/service-manager/storage/interfaces.go +++ b/vendor/github.com/Peripli/service-manager/storage/interfaces.go @@ -20,20 +20,33 @@ package storage import ( "context" "fmt" + "path" + "runtime" - "github.com/Peripli/service-manager/pkg/types" "github.com/Peripli/service-manager/pkg/security" + "github.com/Peripli/service-manager/pkg/types" +) + +var ( + _, b, _, _ = runtime.Caller(0) + basepath = path.Dir(b) ) // Settings type to be loaded from the environment type Settings struct { - URI string + URI string + MigrationsURL string `mapstructure:"migrations_url"` + EncryptionKey string `mapstructure:"encryption_key"` + SkipSSLValidation bool `mapstructure:"skip_ssl_validation"` } // DefaultSettings returns default values for storage settings func DefaultSettings() *Settings { return &Settings{ - URI: "", + URI: "", + MigrationsURL: fmt.Sprintf("file://%s/postgres/migrations", basepath), + EncryptionKey: "", + SkipSSLValidation: false, } } @@ -42,24 +55,46 @@ func (s *Settings) Validate() error { if len(s.URI) == 0 { return fmt.Errorf("validate Settings: StorageURI missing") } + if len(s.EncryptionKey) != 32 { + return fmt.Errorf("validate Settings: StorageEncryptionKey must be exactly 32 symbols long but was %d symbols long", len(s.EncryptionKey)) + } return nil } -// Storage interface provides entity-specific storages -//go:generate counterfeiter . Storage -type Storage interface { +// OpenCloser represents an openable and closeable storage +type OpenCloser interface { // Open initializes the storage, e.g. opens a connection to the underlying storage - Open(uri string, encryptionKey []byte) error + Open(options *Settings) error // Close clears resources associated with this storage, e.g. closes the connection the underlying storage Close() error +} +// Pinger allows pinging the storage to check liveliness +type Pinger interface { // Ping verifies a connection to the database is still alive, establishing a connection if necessary. Ping() error +} + +// PingFunc is an adapter that allows to use regular functions as Pinger +type PingFunc func() error +// Run allows PingFunc to act as a Pinger +func (mf PingFunc) Ping() error { + return mf() +} + +// Warehouse contains the Service Manager data access object providers +type Warehouse interface { // Broker provides access to service broker db operations Broker() Broker + // ServiceOffering provides access to service offering db operations + ServiceOffering() ServiceOffering + + // ServicePlan provides access to service plan db operations + ServicePlan() ServicePlan + // Platform provides access to platform db operations Platform() Platform @@ -70,6 +105,22 @@ type Storage interface { Security() Security } +// Repository is a storage warehouse that can initiate a transaction +type Repository interface { + Warehouse + + // InTransaction initiates a transaction and allows passing a function to be executed within the transaction + InTransaction(ctx context.Context, f func(ctx context.Context, storage Warehouse) error) error +} + +// Storage interface provides entity-specific storages +//go:generate counterfeiter . Storage +type Storage interface { + OpenCloser + Pinger + Repository +} + // Broker interface for Broker db operations type Broker interface { // Create stores a broker in SM DB @@ -78,8 +129,8 @@ type Broker interface { // Get retrieves a broker using the provided id from SM DB Get(ctx context.Context, id string) (*types.Broker, error) - // GetAll retrieves all brokers from SM DB - GetAll(ctx context.Context) ([]*types.Broker, error) + // List retrieves all brokers from SM DB + List(ctx context.Context) ([]*types.Broker, error) // Delete deletes a broker from SM DB Delete(ctx context.Context, id string) error @@ -88,7 +139,7 @@ type Broker interface { Update(ctx context.Context, broker *types.Broker) error } -// Platform interface for Platform db operations +// Platform interface for Platform DB operations type Platform interface { // Create stores a platform in SM DB Create(ctx context.Context, platform *types.Platform) error @@ -96,8 +147,8 @@ type Platform interface { // Get retrieves a platform using the provided id from SM DB Get(ctx context.Context, id string) (*types.Platform, error) - // GetAll retrieves all platforms from SM DB - GetAll(ctx context.Context) ([]*types.Platform, error) + // List retrieves all platforms from SM DB + List(ctx context.Context) ([]*types.Platform, error) // Delete deletes a platform from SM DB Delete(ctx context.Context, id string) error @@ -106,6 +157,51 @@ type Platform interface { Update(ctx context.Context, platform *types.Platform) error } +// ServiceOffering instance for Service Offerings DB operations +type ServiceOffering interface { + // Create stores a service offering in SM DB + Create(ctx context.Context, serviceOffering *types.ServiceOffering) error + + // Get retrieves a service offering using the provided id from SM DB + Get(ctx context.Context, id string) (*types.ServiceOffering, error) + + // ListByCatalogName retrieves all service offerings from SM DB that match the specified catalog name + ListByCatalogName(ctx context.Context, name string) ([]*types.ServiceOffering, error) + + // ListWithServicePlansByBrokerID retrieves all service offerings with their service plans from SM DB that match the specified broker ID + ListWithServicePlansByBrokerID(ctx context.Context, brokerID string) ([]*types.ServiceOffering, error) + + // List retrieves all service offerings from SM DB + List(ctx context.Context) ([]*types.ServiceOffering, error) + + // Delete deletes a service offering from SM DB + Delete(ctx context.Context, id string) error + + // Update updates a service offering from SM DB + Update(ctx context.Context, serviceOffering *types.ServiceOffering) error +} + +// ServiceOffering instance for Service Plan DB operations +type ServicePlan interface { + // Create stores a service service_plan in SM DB + Create(ctx context.Context, servicePlan *types.ServicePlan) error + + // Get retrieves a service service_plan using the provided id from SM DB + Get(ctx context.Context, id string) (*types.ServicePlan, error) + + // ListByCatalogName retrieves all service plans from SM DB that match the specified catalog name + ListByCatalogName(ctx context.Context, name string) ([]*types.ServicePlan, error) + + // List retrieves all service plans from SM DB + List(ctx context.Context) ([]*types.ServicePlan, error) + + // Delete deletes a service service_plan from SM DB + Delete(ctx context.Context, id string) error + + // Update updates a service service_plan from SM DB + Update(ctx context.Context, servicePlan *types.ServicePlan) error +} + // Credentials interface for Credentials db operations //go:generate counterfeiter . Credentials type Credentials interface { @@ -118,10 +214,13 @@ type Security interface { // Lock locks the storage so that only one process can manipulate the encryption key. // Returns an error if the process has already acquired the lock Lock(ctx context.Context) error + // Unlock releases the acquired lock. Unlock(ctx context.Context) error + // Fetcher provides means to obtain the encryption key Fetcher() security.KeyFetcher - // Setter provides means to change the encryption key + + // Setter provides means to change the encryption key Setter() security.KeySetter } diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/abstract.go b/vendor/github.com/Peripli/service-manager/storage/postgres/abstract.go index f1a2165f..01a6dd0c 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/abstract.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/abstract.go @@ -20,16 +20,42 @@ import ( "context" "database/sql" "fmt" + "reflect" "strings" + "github.com/jmoiron/sqlx" + "github.com/Peripli/service-manager/pkg/log" "github.com/Peripli/service-manager/pkg/util" "github.com/fatih/structs" - "github.com/jmoiron/sqlx" "github.com/lib/pq" ) -func create(ctx context.Context, db *sqlx.DB, table string, dto interface{}) error { +type namedExecerContext interface { + NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) +} + +type namedQuerierContext interface { + NamedQuery(query string, arg interface{}) (*sqlx.Rows, error) +} + +type selecterContext interface { + SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error +} + +type getterContext interface { + GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error +} + +type pgDB interface { + namedExecerContext + namedQuerierContext + selecterContext + getterContext + sqlx.ExtContext +} + +func create(ctx context.Context, db namedExecerContext, table string, dto interface{}) error { set := getDBTags(dto) if len(set) == 0 { @@ -47,30 +73,37 @@ func create(ctx context.Context, db *sqlx.DB, table string, dto interface{}) err return checkUniqueViolation(ctx, err) } -func get(ctx context.Context, db *sqlx.DB, id string, table string, dto interface{}) error { +func get(ctx context.Context, db getterContext, id string, table string, dto interface{}) error { query := "SELECT * FROM " + table + " WHERE id=$1" log.C(ctx).Debugf("Executing query %s", query) err := db.GetContext(ctx, dto, query, &id) return checkSQLNoRows(err) } -func getAll(ctx context.Context, db *sqlx.DB, table string, dtos interface{}) error { +func list(ctx context.Context, db selecterContext, table string, filter map[string]string, dtos interface{}) error { query := "SELECT * FROM " + table + if len(filter) != 0 { + pairs := make([]string, 0) + for key, value := range filter { + pairs = append(pairs, fmt.Sprintf("%s='%s'", key, value)) + } + query += " WHERE " + strings.Join(pairs, " AND ") + } log.C(ctx).Debugf("Executing query %s", query) return db.SelectContext(ctx, dtos, query) } -func delete(ctx context.Context, db *sqlx.DB, id string, table string) error { +func delete(ctx context.Context, db sqlx.ExecerContext, id string, table string) error { query := "DELETE FROM " + table + " WHERE id=$1" log.C(ctx).Debugf("Executing query %s", query) - result, err := db.ExecContext(ctx, query, &id) + result, err := db.ExecContext(ctx, query, id) if err != nil { return err } return checkRowsAffected(result) } -func update(ctx context.Context, db *sqlx.DB, table string, dto interface{}) error { +func update(ctx context.Context, db namedExecerContext, table string, dto interface{}) error { updateQueryString := updateQuery(table, dto) if updateQueryString == "" { log.C(ctx).Debugf("%s update: Nothing to update", table) @@ -90,10 +123,13 @@ func getDBTags(structure interface{}) []string { set := make([]string, 0, len(fields)) for _, field := range fields { - if field.IsEmbedded() || field.IsZero() { + if field.IsEmbedded() || (field.Kind() == reflect.Ptr && field.IsZero()) { continue } dbTag := field.Tag("db") + if dbTag == "-" { + continue + } if dbTag == "" { dbTag = strings.ToLower(field.Name()) } diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/abstract_test.go b/vendor/github.com/Peripli/service-manager/storage/postgres/abstract_test.go index 482fd5b5..a53a8960 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/abstract_test.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/abstract_test.go @@ -46,11 +46,21 @@ var _ = Describe("Postgres Storage Abstract", func() { }) Context("Called with structure with empty field", func() { - It("Should return proper query", func() { + It("allows setting default values for fields", func() { type ts struct { Field string } query := updateQuery("n/a", ts{}) + Expect(query).To(Equal("UPDATE n/a SET field = :field WHERE id = :id")) + }) + }) + + Context("Called with structure with nil field", func() { + It("ignores nils", func() { + type ts struct { + Field *string + } + query := updateQuery("n/a", ts{}) Expect(query).To(Equal("")) }) }) diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/broker.go b/vendor/github.com/Peripli/service-manager/storage/postgres/broker.go index 46e3aeb2..f4328f68 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/broker.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/broker.go @@ -20,15 +20,16 @@ import ( "context" "github.com/Peripli/service-manager/pkg/types" - "github.com/jmoiron/sqlx" ) type brokerStorage struct { - db *sqlx.DB + db pgDB } func (bs *brokerStorage) Create(ctx context.Context, broker *types.Broker) error { - return create(ctx, bs.db, brokerTable, convertBrokerToDTO(broker)) + b := &Broker{} + b.FromDTO(broker) + return create(ctx, bs.db, brokerTable, b) } func (bs *brokerStorage) Get(ctx context.Context, id string) (*types.Broker, error) { @@ -36,18 +37,18 @@ func (bs *brokerStorage) Get(ctx context.Context, id string) (*types.Broker, err if err := get(ctx, bs.db, id, brokerTable, broker); err != nil { return nil, err } - return broker.Convert(), nil + return broker.ToDTO(), nil } -func (bs *brokerStorage) GetAll(ctx context.Context) ([]*types.Broker, error) { +func (bs *brokerStorage) List(ctx context.Context) ([]*types.Broker, error) { var brokerDTOs []Broker - err := getAll(ctx, bs.db, brokerTable, &brokerDTOs) + err := list(ctx, bs.db, brokerTable, map[string]string{}, &brokerDTOs) if err != nil || len(brokerDTOs) == 0 { return []*types.Broker{}, err } brokers := make([]*types.Broker, 0, len(brokerDTOs)) for _, broker := range brokerDTOs { - brokers = append(brokers, broker.Convert()) + brokers = append(brokers, broker.ToDTO()) } return brokers, nil } @@ -57,5 +58,7 @@ func (bs *brokerStorage) Delete(ctx context.Context, id string) error { } func (bs *brokerStorage) Update(ctx context.Context, broker *types.Broker) error { - return update(ctx, bs.db, brokerTable, convertBrokerToDTO(broker)) + b := &Broker{} + b.FromDTO(broker) + return update(ctx, bs.db, brokerTable, b) } diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/credentials.go b/vendor/github.com/Peripli/service-manager/storage/postgres/credentials.go index f83922cb..3ab9b8fe 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/credentials.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/credentials.go @@ -22,11 +22,10 @@ import ( "github.com/Peripli/service-manager/pkg/log" "github.com/Peripli/service-manager/pkg/types" - "github.com/jmoiron/sqlx" ) type credentialStorage struct { - db *sqlx.DB + db pgDB } func (cs *credentialStorage) Get(ctx context.Context, username string) (*types.Credentials, error) { @@ -40,5 +39,10 @@ func (cs *credentialStorage) Get(ctx context.Context, username string) (*types.C return nil, checkSQLNoRows(err) } - return types.NewBasicCredentials(platformCredentials.Username, platformCredentials.Password), nil + return &types.Credentials{ + Basic: &types.Basic{ + Username: platformCredentials.Username, + Password: platformCredentials.Password, + }, + }, nil } diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/migrations/003_catalog.down.sql b/vendor/github.com/Peripli/service-manager/storage/postgres/migrations/003_catalog.down.sql new file mode 100644 index 00000000..f9915f8d --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/migrations/003_catalog.down.sql @@ -0,0 +1,6 @@ +BEGIN; + +DROP TABLE IF EXISTS service_plans; +DROP TABLE IF EXISTS service_offerings; + +COMMIT; \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/migrations/003_catalog.up.sql b/vendor/github.com/Peripli/service-manager/storage/postgres/migrations/003_catalog.up.sql new file mode 100644 index 00000000..bcb28868 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/migrations/003_catalog.up.sql @@ -0,0 +1,53 @@ +BEGIN; + +ALTER TABLE brokers DROP COLUMN IF EXISTS catalog; + +ALTER TABLE brokers ADD CONSTRAINT unique_broker_url UNIQUE (broker_url); + +CREATE TABLE service_offerings ( + id varchar(100) PRIMARY KEY NOT NULL, + name varchar(255) NOT NULL, + description text NOT NULL DEFAULT '', + created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + catalog_id varchar(255) NOT NULL, + catalog_name varchar(255) NOT NULL, + + bindable boolean NOT NULL DEFAULT '0', + plan_updateable boolean NOT NULL DEFAULT '0', + instances_retrievable boolean NOT NULL DEFAULT '0', + bindings_retrievable boolean NOT NULL DEFAULT '0', + + metadata json NOT NULL DEFAULT '{}', + tags json NOT NULL DEFAULT '{}', + requires json NOT NULL DEFAULT '{}', + + broker_id varchar(100) NOT NULL REFERENCES brokers(id) ON DELETE CASCADE, + UNIQUE (broker_id, name), + UNIQUE (broker_id, catalog_id), + UNIQUE (broker_id, catalog_name) +); + +CREATE TABLE service_plans ( + id varchar(100) PRIMARY KEY NOT NULL, + name varchar(255) NOT NULL, + description text NOT NULL DEFAULT '', + created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + catalog_name varchar(255) NOT NULL, + catalog_id varchar(255) NOT NULL, + + bindable boolean NOT NULL, + plan_updateable boolean NOT NULL, + free boolean NOT NULL, + + metadata json NOT NULL DEFAULT '{}', + schemas json NOT NULL DEFAULT '{}', + + service_offering_id varchar(100) NOT NULL REFERENCES service_offerings(id) ON DELETE CASCADE, + UNIQUE (service_offering_id, name), + UNIQUE (service_offering_id, catalog_id), + UNIQUE (service_offering_id, catalog_name) +); + +COMMIT; \ No newline at end of file diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/platform.go b/vendor/github.com/Peripli/service-manager/storage/postgres/platform.go index 58e1c16c..d1b86ee1 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/platform.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/platform.go @@ -20,15 +20,16 @@ import ( "context" "github.com/Peripli/service-manager/pkg/types" - "github.com/jmoiron/sqlx" ) type platformStorage struct { - db *sqlx.DB + db pgDB } func (ps *platformStorage) Create(ctx context.Context, platform *types.Platform) error { - return create(ctx, ps.db, platformTable, convertPlatformToDTO(platform)) + p := &Platform{} + p.FromDTO(platform) + return create(ctx, ps.db, platformTable, p) } func (ps *platformStorage) Get(ctx context.Context, id string) (*types.Platform, error) { @@ -36,20 +37,20 @@ func (ps *platformStorage) Get(ctx context.Context, id string) (*types.Platform, if err := get(ctx, ps.db, id, platformTable, platform); err != nil { return nil, err } - return platform.Convert(), nil + return platform.ToDTO(), nil } -func (ps *platformStorage) GetAll(ctx context.Context) ([]*types.Platform, error) { - var platformDTOs []Platform - err := getAll(ctx, ps.db, platformTable, &platformDTOs) - if err != nil || len(platformDTOs) == 0 { +func (ps *platformStorage) List(ctx context.Context) ([]*types.Platform, error) { + var platforms []Platform + err := list(ctx, ps.db, platformTable, map[string]string{}, &platforms) + if err != nil || len(platforms) == 0 { return []*types.Platform{}, err } - var platforms = make([]*types.Platform, 0, len(platformDTOs)) - for _, platformDTO := range platformDTOs { - platforms = append(platforms, platformDTO.Convert()) + var platformDTOs = make([]*types.Platform, 0, len(platforms)) + for _, platform := range platforms { + platformDTOs = append(platformDTOs, platform.ToDTO()) } - return platforms, nil + return platformDTOs, nil } func (ps *platformStorage) Delete(ctx context.Context, id string) error { @@ -57,5 +58,7 @@ func (ps *platformStorage) Delete(ctx context.Context, id string) error { } func (ps *platformStorage) Update(ctx context.Context, platform *types.Platform) error { - return update(ctx, ps.db, platformTable, convertPlatformToDTO(platform)) + p := &Platform{} + p.FromDTO(platform) + return update(ctx, ps.db, platformTable, p) } diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/security.go b/vendor/github.com/Peripli/service-manager/storage/postgres/security.go index e5f72822..55e38b6f 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/security.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/security.go @@ -24,13 +24,12 @@ import ( "github.com/Peripli/service-manager/pkg/log" "github.com/Peripli/service-manager/pkg/security" - "github.com/jmoiron/sqlx" - ) +) const securityLockIndex = 111 type securityStorage struct { - db *sqlx.DB + db pgDB encryptionKey []byte isLocked bool mutex *sync.Mutex @@ -42,7 +41,7 @@ func (s *securityStorage) Lock(ctx context.Context) error { s.mutex.Lock() defer s.mutex.Unlock() if s.isLocked { - return fmt.Errorf("Lock is already acquired") + return fmt.Errorf("lock is already acquired") } if _, err := s.db.ExecContext(ctx, "SELECT pg_advisory_lock($1)", securityLockIndex); err != nil { return err @@ -77,14 +76,14 @@ func (s *securityStorage) Setter() security.KeySetter { } type keyFetcher struct { - db *sqlx.DB + db pgDB encryptionKey []byte } // GetEncryptionKey returns the encryption key used to encrypt the credentials for brokers func (s *keyFetcher) GetEncryptionKey(ctx context.Context) ([]byte, error) { var safes []Safe - if err := getAll(ctx, s.db, "safe", &safes); err != nil { + if err := list(ctx, s.db, "safe", map[string]string{}, &safes); err != nil { return nil, err } if len(safes) != 1 { @@ -96,18 +95,18 @@ func (s *keyFetcher) GetEncryptionKey(ctx context.Context) ([]byte, error) { } type keySetter struct { - db *sqlx.DB + db pgDB encryptionKey []byte } // Sets the encryption key by encrypting it beforehand with the encryption key in the environment func (k *keySetter) SetEncryptionKey(ctx context.Context, key []byte) error { var safes []Safe - if err := getAll(ctx, k.db, "safe", &safes); err != nil { + if err := list(ctx, k.db, "safe", map[string]string{}, &safes); err != nil { return err } if len(safes) != 0 { - return fmt.Errorf("Encryption key is already set") + return fmt.Errorf("encryption key is already set") } bytes, err := security.Encrypt(key, k.encryptionKey) if err != nil { diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/service_offering.go b/vendor/github.com/Peripli/service-manager/storage/postgres/service_offering.go new file mode 100644 index 00000000..23081a43 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/service_offering.go @@ -0,0 +1,139 @@ +/* + * Copyright 2018 The Service Manager 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 postgres + +import ( + "context" + "fmt" + + "github.com/Peripli/service-manager/pkg/log" + "github.com/Peripli/service-manager/pkg/types" +) + +type serviceOfferingStorage struct { + db pgDB +} + +func (sos *serviceOfferingStorage) Create(ctx context.Context, serviceOffering *types.ServiceOffering) error { + so := &ServiceOffering{} + so.FromDTO(serviceOffering) + return create(ctx, sos.db, serviceOfferingTable, so) +} + +func (sos *serviceOfferingStorage) Get(ctx context.Context, id string) (*types.ServiceOffering, error) { + serviceOffering := &ServiceOffering{} + if err := get(ctx, sos.db, id, serviceOfferingTable, serviceOffering); err != nil { + return nil, err + } + return serviceOffering.ToDTO(), nil +} + +func (sos *serviceOfferingStorage) List(ctx context.Context) ([]*types.ServiceOffering, error) { + var serviceOfferings []ServiceOffering + err := list(ctx, sos.db, serviceOfferingTable, map[string]string{}, &serviceOfferings) + if err != nil || len(serviceOfferings) == 0 { + return []*types.ServiceOffering{}, err + } + serviceOfferingDTOs := make([]*types.ServiceOffering, 0, len(serviceOfferings)) + for _, so := range serviceOfferings { + serviceOfferingDTOs = append(serviceOfferingDTOs, so.ToDTO()) + } + return serviceOfferingDTOs, nil +} + +func (sos *serviceOfferingStorage) ListByCatalogName(ctx context.Context, name string) ([]*types.ServiceOffering, error) { + var serviceOfferings []ServiceOffering + err := list(ctx, sos.db, serviceOfferingTable, map[string]string{"catalog_name": name}, &serviceOfferings) + if err != nil || len(serviceOfferings) == 0 { + return []*types.ServiceOffering{}, err + } + serviceOfferingDTOs := make([]*types.ServiceOffering, 0, len(serviceOfferings)) + for _, so := range serviceOfferings { + serviceOfferingDTOs = append(serviceOfferingDTOs, so.ToDTO()) + } + return serviceOfferingDTOs, nil +} + +func (sos *serviceOfferingStorage) ListWithServicePlansByBrokerID(ctx context.Context, brokerID string) ([]*types.ServiceOffering, error) { + query := fmt.Sprintf(`SELECT + %[1]s.*, + %[2]s.id "%[2]s.id", + %[2]s.name "%[2]s.name", + %[2]s.description "%[2]s.description", + %[2]s.created_at "%[2]s.created_at", + %[2]s.updated_at "%[2]s.updated_at", + %[2]s.free "%[2]s.free", + %[2]s.bindable "%[2]s.bindable", + %[2]s.plan_updateable "%[2]s.plan_updateable", + %[2]s.catalog_id "%[2]s.catalog_id", + %[2]s.catalog_name "%[2]s.catalog_name", + %[2]s.metadata "%[2]s.metadata", + %[2]s.schemas "%[2]s.schemas", + %[2]s.service_offering_id "%[2]s.service_offering_id" + FROM %[1]s + JOIN %[2]s ON %[1]s.id = %[2]s.service_offering_id + WHERE %[1]s.broker_id=$1;`, serviceOfferingTable, servicePlanTable) + + log.C(ctx).Debugf("Executing query %s", query) + rows, err := sos.db.QueryxContext(ctx, query, brokerID) + + defer func() { + if err := rows.Close(); err != nil { + log.C(ctx).Errorf("Could not release connection when checking database s. Error: %s", err) + } + }() + if err != nil { + return nil, checkSQLNoRows(err) + } + + services := make(map[string]*types.ServiceOffering) + result := make([]*types.ServiceOffering, 0) + + for rows.Next() { + row := struct { + *ServiceOffering + *ServicePlan `db:"service_plans"` + }{} + + if err := rows.StructScan(&row); err != nil { + return nil, err + } + + if serviceOffering, ok := services[row.ServiceOffering.ID]; !ok { + serviceOffering = row.ServiceOffering.ToDTO() + serviceOffering.Plans = append(serviceOffering.Plans, row.ServicePlan.ToDTO()) + + services[row.ServiceOffering.ID] = serviceOffering + result = append(result, serviceOffering) + } else { + serviceOffering.Plans = append(serviceOffering.Plans, row.ServicePlan.ToDTO()) + } + } + + return result, nil +} + +func (sos *serviceOfferingStorage) Delete(ctx context.Context, id string) error { + return delete(ctx, sos.db, id, serviceOfferingTable) +} + +func (sos *serviceOfferingStorage) Update(ctx context.Context, serviceOffering *types.ServiceOffering) error { + so := &ServiceOffering{} + so.FromDTO(serviceOffering) + return update(ctx, sos.db, serviceOfferingTable, so) + +} diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/service_plan.go b/vendor/github.com/Peripli/service-manager/storage/postgres/service_plan.go new file mode 100644 index 00000000..1cdf2fe5 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/service_plan.go @@ -0,0 +1,77 @@ +/* + * Copyright 2018 The Service Manager 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 postgres + +import ( + "context" + + "github.com/Peripli/service-manager/pkg/types" +) + +type servicePlanStorage struct { + db pgDB +} + +func (sps *servicePlanStorage) Create(ctx context.Context, servicePlan *types.ServicePlan) error { + plan := &ServicePlan{} + plan.FromDTO(servicePlan) + return create(ctx, sps.db, servicePlanTable, plan) +} + +func (sps *servicePlanStorage) Get(ctx context.Context, id string) (*types.ServicePlan, error) { + plan := &ServicePlan{} + if err := get(ctx, sps.db, id, servicePlanTable, plan); err != nil { + return nil, err + } + return plan.ToDTO(), nil +} + +func (sps *servicePlanStorage) List(ctx context.Context) ([]*types.ServicePlan, error) { + var plans []ServicePlan + err := list(ctx, sps.db, servicePlanTable, map[string]string{}, &plans) + if err != nil || len(plans) == 0 { + return []*types.ServicePlan{}, err + } + servicePlans := make([]*types.ServicePlan, 0, len(plans)) + for _, plan := range plans { + servicePlans = append(servicePlans, plan.ToDTO()) + } + return servicePlans, nil +} + +func (sps *servicePlanStorage) ListByCatalogName(ctx context.Context, name string) ([]*types.ServicePlan, error) { + var plans []ServicePlan + err := list(ctx, sps.db, servicePlanTable, map[string]string{"catalog_name": name}, &plans) + if err != nil || len(plans) == 0 { + return []*types.ServicePlan{}, err + } + servicePlans := make([]*types.ServicePlan, 0, len(plans)) + for _, plan := range plans { + servicePlans = append(servicePlans, plan.ToDTO()) + } + return servicePlans, nil +} + +func (sps *servicePlanStorage) Delete(ctx context.Context, id string) error { + return delete(ctx, sps.db, id, servicePlanTable) +} + +func (sps *servicePlanStorage) Update(ctx context.Context, servicePlan *types.ServicePlan) error { + plan := &ServicePlan{} + plan.FromDTO(servicePlan) + return update(ctx, sps.db, servicePlanTable, plan) +} diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/storage.go b/vendor/github.com/Peripli/service-manager/storage/postgres/storage.go index 87b60683..8e3c89a0 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/storage.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/storage.go @@ -14,10 +14,11 @@ * limitations under the License. */ -// Package postgres implements the Service Manager storage interfaces for Postgresql Storage +// Package postgres implements the Service Manager storage interfaces for Postgresql Repository package postgres import ( + "context" "fmt" "sync" "time" @@ -28,7 +29,7 @@ import ( migratepg "github.com/golang-migrate/migrate/database/postgres" _ "github.com/golang-migrate/migrate/source/file" "github.com/jmoiron/sqlx" - ) +) // Storage defines the name of the PostgreSQL relational storage const Storage = "postgres" @@ -41,78 +42,153 @@ type postgresStorage struct { db *sqlx.DB state *storageState encryptionKey []byte - mutex *sync.Mutex } -func (storage *postgresStorage) checkOpen() { - if storage.db == nil { - log.D().Panicln("Storage is not yet Open") +type transactionalWarehouse struct { + tx *sqlx.Tx +} + +func (ts *transactionalWarehouse) ServiceOffering() storage.ServiceOffering { + ts.checkOpen() + return &serviceOfferingStorage{db: ts.tx} +} + +func (ts *transactionalWarehouse) ServicePlan() storage.ServicePlan { + ts.checkOpen() + return &servicePlanStorage{db: ts.tx} +} + +func (ts *transactionalWarehouse) Security() storage.Security { + ts.checkOpen() + return &securityStorage{db: ts.tx} +} + +func (ts *transactionalWarehouse) Broker() storage.Broker { + ts.checkOpen() + return &brokerStorage{db: ts.tx} +} + +func (ts *transactionalWarehouse) Platform() storage.Platform { + ts.checkOpen() + return &platformStorage{db: ts.tx} +} + +func (ts *transactionalWarehouse) Credentials() storage.Credentials { + ts.checkOpen() + return &credentialStorage{db: ts.tx} +} + +func (ts *transactionalWarehouse) checkOpen() { + if ts.tx == nil { + log.D().Panicln("Storage transaction is not present for transactional warehouse") + } +} + +func (ps *postgresStorage) InTransaction(ctx context.Context, f func(ctx context.Context, transactionalStorage storage.Warehouse) error) error { + ok := false + tx, err := ps.db.Beginx() + if err != nil { + return err } + defer func() { + if !ok { + if txError := tx.Rollback(); txError != nil { + log.C(ctx).Error("Could not rollback transaction", txError) + } + } + }() + + transactionalStorage := &transactionalWarehouse{ + tx: tx, + } + + if err := f(ctx, transactionalStorage); err != nil { + return err + } + + if err := tx.Commit(); err != nil { + return err + } + ok = true + return nil } -func (storage *postgresStorage) Ping() error { - storage.checkOpen() - return storage.state.Get() +func (ps *postgresStorage) Ping() error { + ps.checkOpen() + return ps.state.Get() } -func (storage *postgresStorage) Broker() storage.Broker { - storage.checkOpen() - return &brokerStorage{storage.db} +func (ps *postgresStorage) Broker() storage.Broker { + ps.checkOpen() + return &brokerStorage{ps.db} } -func (storage *postgresStorage) Platform() storage.Platform { - storage.checkOpen() - return &platformStorage{storage.db} +func (ps *postgresStorage) Platform() storage.Platform { + ps.checkOpen() + return &platformStorage{ps.db} } -func (storage *postgresStorage) Credentials() storage.Credentials { - storage.checkOpen() - return &credentialStorage{storage.db} +func (ps *postgresStorage) Credentials() storage.Credentials { + ps.checkOpen() + return &credentialStorage{ps.db} } -func (storage *postgresStorage) Security() storage.Security { - storage.checkOpen() - return &securityStorage{storage.db, storage.encryptionKey, false, storage.mutex} +func (ps *postgresStorage) ServiceOffering() storage.ServiceOffering { + return &serviceOfferingStorage{ps.db} } -func (storage *postgresStorage) Open(uri string, encryptionKey []byte) error { +func (ps *postgresStorage) ServicePlan() storage.ServicePlan { + return &servicePlanStorage{ps.db} +} + +func (ps *postgresStorage) Security() storage.Security { + ps.checkOpen() + return &securityStorage{ps.db, ps.encryptionKey, false, &sync.Mutex{}} +} + +func (ps *postgresStorage) Open(options *storage.Settings) error { var err error - if uri == "" { - return fmt.Errorf("storage URI cannot be empty") + if err = options.Validate(); err != nil { + return err + } + if len(options.MigrationsURL) == 0 { + return fmt.Errorf("validate Settings: StorageMigrationsURL missing") } - if storage.db == nil { - storage.db, err = sqlx.Connect(Storage, uri) + if ps.db == nil { + sslModeParam := "" + if options.SkipSSLValidation { + sslModeParam = "?sslmode=disable" + } + ps.db, err = sqlx.Connect(Storage, options.URI+sslModeParam) if err != nil { log.D().Panicln("Could not connect to PostgreSQL:", err) } - storage.state = &storageState{ - storageError: nil, - lastCheck: time.Now(), + ps.state = &storageState{ + lastCheckTime: time.Now(), mutex: &sync.RWMutex{}, - db: storage.db, + db: ps.db, storageCheckInterval: time.Second * 5, } - storage.mutex = &sync.Mutex{} - storage.encryptionKey = encryptionKey - log.D().Debug("Updating database schema") - if err := updateSchema(storage.db); err != nil { + ps.encryptionKey = []byte(options.EncryptionKey) + log.D().Debugf("Updating database schema using migrations from %s", options.MigrationsURL) + if err := ps.updateSchema(options.MigrationsURL); err != nil { log.D().Panicln("Could not update database schema:", err) } } return err } -func (storage *postgresStorage) Close() error { - storage.checkOpen() - return storage.db.Close() +func (ps *postgresStorage) Close() error { + ps.checkOpen() + return ps.db.Close() } -func updateSchema(db *sqlx.DB) error { - driver, err := migratepg.WithInstance(db.DB, &migratepg.Config{}) +func (ps *postgresStorage) updateSchema(migrationsURL string) error { + driver, err := migratepg.WithInstance(ps.db.DB, &migratepg.Config{}) if err != nil { return err } - m, err := migrate.NewWithDatabaseInstance("file://storage/postgres/migrations", "postgres", driver) + m, err := migrate.NewWithDatabaseInstance(migrationsURL, "postgres", driver) if err != nil { return err } @@ -123,3 +199,9 @@ func updateSchema(db *sqlx.DB) error { } return err } + +func (ps *postgresStorage) checkOpen() { + if ps.db == nil { + log.D().Panicln("Repository is not yet Open") + } +} diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state.go b/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state.go index fe545ff1..505cfd04 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state.go @@ -14,62 +14,30 @@ * limitations under the License. */ -// Package postgres implements the Service Manager storage interfaces for Postgresql Storage package postgres import ( "sync" "time" - "github.com/Peripli/service-manager/pkg/log" "github.com/jmoiron/sqlx" ) type storageState struct { - storageError error - lastCheck time.Time + lastCheckTime time.Time mutex *sync.RWMutex db *sqlx.DB storageCheckInterval time.Duration } -// Get returns error if the db connectivity is down and nil otherwise -func (state *storageState) Get() error { - if cacheIsValid, storageError := state.getCached(); cacheIsValid { - return storageError - } - return state.checkDB() -} - -func (state *storageState) cachedStateIsValid() bool { - return time.Since(state.lastCheck) < state.storageCheckInterval -} +func (s *storageState) Get() error { + s.mutex.Lock() + defer s.mutex.Unlock() -func (state *storageState) getCached() (cacheIsValid bool, storageError error) { - state.mutex.RLock() - defer state.mutex.RUnlock() - if state.cachedStateIsValid() { - return true, state.storageError + if time.Since(s.lastCheckTime) < s.storageCheckInterval { + return nil } - return false, nil -} -func (state *storageState) checkDB() error { - state.mutex.Lock() - defer state.mutex.Unlock() - // check if someone hasn't updated the cached state already - if state.cachedStateIsValid() { - return state.storageError - } - rows, err := state.db.Query("SELECT 1") - if err != nil { - state.storageError = err - } else { - state.storageError = nil - if err := rows.Close(); err != nil { - log.D().Errorf("Could not release connection when checking database state. Error: %v", err) - } - } - state.lastCheck = time.Now() - return state.storageError + m := make(map[string]interface{}) + return s.db.Get(&m, "SELECT 1") } diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state_test.go b/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state_test.go index fe5dd48e..64256e14 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state_test.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/storage_state_test.go @@ -17,73 +17,73 @@ package postgres import ( - "errors" - "io/ioutil" + "database/sql" + "fmt" "sync" "time" - "github.com/Peripli/service-manager/config" + "github.com/DATA-DOG/go-sqlmock" "github.com/jmoiron/sqlx" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/sirupsen/logrus" - yaml "gopkg.in/yaml.v2" ) -var _ = Describe("Postgres Storage State", func() { +var _ = Describe("Postgres StorageÆ’ State", func() { - var storageURI string + var ( + mockDB *sql.DB + sqlxDB *sqlx.DB + mock sqlmock.Sqlmock - BeforeSuite(func() { - config := config.DefaultSettings() - appYml, err := ioutil.ReadFile("../../test/common/application.yml") - Expect(err).ToNot(HaveOccurred()) - err = yaml.Unmarshal(appYml, config) - Expect(err).ToNot(HaveOccurred()) - storageURI = config.Storage.URI - Expect(storageURI).ToNot(BeEmpty()) + state *storageState + ) + BeforeEach(func() { + var err error + mockDB, mock, err = sqlmock.New() + Expect(err).To(Not(HaveOccurred())) + sqlxDB = sqlx.NewDb(mockDB, "sqlmock") + + state = &storageState{ + lastCheckTime: time.Now(), + mutex: &sync.RWMutex{}, + db: sqlxDB, + storageCheckInterval: time.Second * 1, + } + }) + + AfterEach(func() { + mockDB.Close() + sqlxDB.Close() }) Describe("Get", func() { - Context("With valid cache", func() { - It("should return cached storageError", func() { - state := newStorageState(errors.New("expected"), time.Now(), nil, time.Second*5) - err := state.Get() - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Equal("expected")) + Context("when cache has not yet expired", func() { + It("returns nil", func() { + Expect(state.Get()).To(Not(HaveOccurred())) }) }) - Context("With invalid cache", func() { - It("should return cached storageError", func() { - db, err := sqlx.Connect(Storage, storageURI) - if err != nil { - logrus.Panicln("Could not connect to PostgreSQL:", err) - } - state := newStorageState(errors.New("No"), time.Now(), db, time.Second*(-1)) - err = state.Get() - Expect(err).ToNot(HaveOccurred()) + Context("when cache has expired", func() { + Context("when storage query fails", func() { + BeforeEach(func() { + mock.ExpectQuery("^SELECT 1$").WillReturnError(fmt.Errorf("error")) + }) + + It("returns error", func() { + Eventually(func() error { return state.Get() }, time.Second*2).Should(Equal(fmt.Errorf("error"))) + }) }) - }) - }) - Describe("checkDB", func() { - Context("With valid cache", func() { - It("should return cached storageError", func() { - state := newStorageState(errors.New("expected"), time.Now(), nil, time.Second*5) - err := state.checkDB() - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Equal("expected")) + + Context("when storage query succeeds", func() { + BeforeEach(func() { + mock.ExpectQuery("^SELECT 1$").WillReturnRows(sqlmock.NewRows([]string{"1"})) + + }) + + It("returns nil", func() { + Eventually(func() error { return state.Get() }, time.Second*2).ShouldNot(HaveOccurred()) + }) }) }) }) }) - -func newStorageState(storageError error, lastCheck time.Time, db *sqlx.DB, storageCheckInterval time.Duration) *storageState { - return &storageState{ - storageError: storageError, - lastCheck: lastCheck, - mutex: &sync.RWMutex{}, - db: db, - storageCheckInterval: storageCheckInterval, - } -} diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/storage_test.go b/vendor/github.com/Peripli/service-manager/storage/postgres/storage_test.go index bdbeef8e..031dc1f7 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/storage_test.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/storage_test.go @@ -17,6 +17,8 @@ package postgres import ( + "github.com/Peripli/service-manager/storage" + . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -48,7 +50,7 @@ var _ = Describe("Postgres Storage", func() { }) }) - Context("Security Storage", func() { + Context("Security", func() { Context("Called with uninitialized db", func() { It("Should panic", func() { Expect(func() { pgStorage.Security() }).To(Panic()) @@ -67,15 +69,33 @@ var _ = Describe("Postgres Storage", func() { Describe("Open", func() { Context("Called with empty uri", func() { It("Should return error", func() { - err := pgStorage.Open("", nil) + err := pgStorage.Open(&storage.Settings{ + URI: "", + MigrationsURL: "file://migrations", + }) + Expect(err).To(HaveOccurred()) + }) + }) + + Context("Called with empty migrations", func() { + It("Should return error", func() { + err := pgStorage.Open(&storage.Settings{ + MigrationsURL: "", + }) Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(Equal("storage URI cannot be empty")) }) }) Context("Called with invalid postgres uri", func() { It("Should panic", func() { - Expect(func() { pgStorage.Open("invalid_uri", nil) }).To(Panic()) + Expect(func() { + pgStorage.Open(&storage.Settings{ + URI: "invalid", + MigrationsURL: "invalid", + EncryptionKey: "ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8", + SkipSSLValidation: true, + }) + }).To(Panic()) }) }) }) diff --git a/vendor/github.com/Peripli/service-manager/storage/postgres/types.go b/vendor/github.com/Peripli/service-manager/storage/postgres/types.go index 8464bb8f..df896d0e 100644 --- a/vendor/github.com/Peripli/service-manager/storage/postgres/types.go +++ b/vendor/github.com/Peripli/service-manager/storage/postgres/types.go @@ -31,16 +31,20 @@ const ( // brokerTable db table name for brokers brokerTable = "brokers" + + serviceOfferingTable = "service_offerings" + + servicePlanTable = "service_plans" ) -// Safe is a representation of how a secret is stored +// Safe represents a secret entity type Safe struct { Secret []byte `db:"secret"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` } -// Platform dto +// Platform entity type Platform struct { ID string `db:"id"` Type string `db:"type"` @@ -52,84 +56,203 @@ type Platform struct { Password string `db:"password"` } -// Broker dto +// Broker entity type Broker struct { - ID string `db:"id"` - Name string `db:"name"` - Description sql.NullString `db:"description"` - CreatedAt time.Time `db:"created_at"` - UpdatedAt time.Time `db:"updated_at"` - BrokerURL string `db:"broker_url"` - Username string `db:"username"` - Password string `db:"password"` - Catalog sqlxtypes.JSONText `db:"catalog"` + ID string `db:"id"` + Name string `db:"name"` + Description sql.NullString `db:"description"` + CreatedAt time.Time `db:"created_at"` + UpdatedAt time.Time `db:"updated_at"` + BrokerURL string `db:"broker_url"` + Username string `db:"username"` + Password string `db:"password"` } -// Convert converts to types.Broker -func (brokerDTO *Broker) Convert() *types.Broker { - broker := &types.Broker{ID: brokerDTO.ID, - Name: brokerDTO.Name, - Description: brokerDTO.Description.String, - CreatedAt: brokerDTO.CreatedAt, - UpdatedAt: brokerDTO.UpdatedAt, - BrokerURL: brokerDTO.BrokerURL, - Catalog: json.RawMessage(brokerDTO.Catalog), - } - if brokerDTO.Username != "" { - broker.Credentials = types.NewBasicCredentials(brokerDTO.Username, brokerDTO.Password) +type ServiceOffering struct { + ID string `db:"id"` + Name string `db:"name"` + Description string `db:"description"` + CreatedAt time.Time `db:"created_at"` + UpdatedAt time.Time `db:"updated_at"` + + Bindable bool `db:"bindable"` + InstancesRetrievable bool `db:"instances_retrievable"` + BindingsRetrievable bool `db:"bindings_retrievable"` + PlanUpdatable bool `db:"plan_updateable"` + CatalogID string `db:"catalog_id"` + CatalogName string `db:"catalog_name"` + + Tags sqlxtypes.JSONText `db:"tags"` + Requires sqlxtypes.JSONText `db:"requires"` + Metadata sqlxtypes.JSONText `db:"metadata"` + + BrokerID string `db:"broker_id"` +} + +type ServicePlan struct { + ID string `db:"id"` + Name string `db:"name"` + Description string `db:"description"` + CreatedAt time.Time `db:"created_at"` + UpdatedAt time.Time `db:"updated_at"` + + Free bool `db:"free"` + Bindable bool `db:"bindable"` + PlanUpdatable bool `db:"plan_updateable"` + CatalogID string `db:"catalog_id"` + CatalogName string `db:"catalog_name"` + + Metadata sqlxtypes.JSONText `db:"metadata"` + Schemas sqlxtypes.JSONText `db:"schemas"` + + ServiceOfferingID string `db:"service_offering_id"` +} + +func (b *Broker) ToDTO() *types.Broker { + broker := &types.Broker{ + ID: b.ID, + Name: b.Name, + Description: b.Description.String, + CreatedAt: b.CreatedAt, + UpdatedAt: b.UpdatedAt, + BrokerURL: b.BrokerURL, + Credentials: &types.Credentials{ + Basic: &types.Basic{ + Username: b.Username, + Password: b.Password, + }, + }, } return broker } -// Convert converts to types.Platform -func (platformDTO *Platform) Convert() *types.Platform { - platform := &types.Platform{ - ID: platformDTO.ID, - Type: platformDTO.Type, - Name: platformDTO.Name, - Description: platformDTO.Description.String, - CreatedAt: platformDTO.CreatedAt, - UpdatedAt: platformDTO.UpdatedAt, +func (b *Broker) FromDTO(broker *types.Broker) { + *b = Broker{ + ID: broker.ID, + Description: sql.NullString{String: broker.Description}, + Name: broker.Name, + BrokerURL: broker.BrokerURL, + CreatedAt: broker.CreatedAt, + UpdatedAt: broker.UpdatedAt, + } + + if broker.Description != "" { + b.Description.Valid = true } - if platformDTO.Username != "" { - platform.Credentials = types.NewBasicCredentials(platformDTO.Username, platformDTO.Password) + if broker.Credentials != nil && broker.Credentials.Basic != nil { + b.Username = broker.Credentials.Basic.Username + b.Password = broker.Credentials.Basic.Password } - return platform } -func convertPlatformToDTO(platform *types.Platform) *Platform { - result := &Platform{ - ID: platform.ID, - Type: platform.Type, - Name: platform.Name, - CreatedAt: platform.CreatedAt, - UpdatedAt: platform.UpdatedAt, +func (p *Platform) ToDTO() *types.Platform { + return &types.Platform{ + ID: p.ID, + Type: p.Type, + Name: p.Name, + Description: p.Description.String, + CreatedAt: p.CreatedAt, + UpdatedAt: p.UpdatedAt, + Credentials: &types.Credentials{ + Basic: &types.Basic{ + Username: p.Username, + Password: p.Password, + }, + }, } +} + +func (p *Platform) FromDTO(platform *types.Platform) { + *p = Platform{ + ID: platform.ID, + Type: platform.Type, + Name: platform.Name, + CreatedAt: platform.CreatedAt, + Description: sql.NullString{String: platform.Description}, + UpdatedAt: platform.UpdatedAt, + } + if platform.Description != "" { - result.Description = sql.NullString{String: platform.Description, Valid: true} + p.Description.Valid = true } - if platform.Credentials != nil { - result.Username = platform.Credentials.Basic.Username - result.Password = platform.Credentials.Basic.Password + if platform.Credentials != nil && platform.Credentials.Basic != nil { + p.Username = platform.Credentials.Basic.Username + p.Password = platform.Credentials.Basic.Password } - return result } -func convertBrokerToDTO(broker *types.Broker) *Broker { - result := &Broker{ - ID: broker.ID, - Name: broker.Name, - BrokerURL: broker.BrokerURL, - CreatedAt: broker.CreatedAt, - UpdatedAt: broker.UpdatedAt, - Catalog: sqlxtypes.JSONText(broker.Catalog), +func (so *ServiceOffering) ToDTO() *types.ServiceOffering { + return &types.ServiceOffering{ + ID: so.ID, + Name: so.Name, + Description: so.Description, + CreatedAt: so.CreatedAt, + UpdatedAt: so.UpdatedAt, + Bindable: so.Bindable, + InstancesRetrievable: so.InstancesRetrievable, + BindingsRetrievable: so.BindingsRetrievable, + PlanUpdatable: so.PlanUpdatable, + CatalogID: so.CatalogID, + CatalogName: so.CatalogName, + Tags: json.RawMessage(so.Tags), + Requires: json.RawMessage(so.Requires), + Metadata: json.RawMessage(so.Metadata), + BrokerID: so.BrokerID, } - if broker.Description != "" { - result.Description = sql.NullString{String: broker.Description, Valid: true} +} + +func (so *ServiceOffering) FromDTO(offering *types.ServiceOffering) { + *so = ServiceOffering{ + ID: offering.ID, + Name: offering.Name, + Description: offering.Description, + CreatedAt: offering.CreatedAt, + UpdatedAt: offering.UpdatedAt, + Bindable: offering.Bindable, + InstancesRetrievable: offering.InstancesRetrievable, + BindingsRetrievable: offering.BindingsRetrievable, + PlanUpdatable: offering.PlanUpdatable, + CatalogID: offering.CatalogID, + CatalogName: offering.CatalogName, + Tags: sqlxtypes.JSONText(offering.Tags), + Requires: sqlxtypes.JSONText(offering.Requires), + Metadata: sqlxtypes.JSONText(offering.Metadata), + BrokerID: offering.BrokerID, + } +} + +func (sp *ServicePlan) ToDTO() *types.ServicePlan { + return &types.ServicePlan{ + ID: sp.ID, + Name: sp.Name, + Description: sp.Description, + CreatedAt: sp.CreatedAt, + UpdatedAt: sp.UpdatedAt, + CatalogID: sp.CatalogID, + CatalogName: sp.CatalogName, + Free: sp.Free, + Bindable: sp.Bindable, + PlanUpdatable: sp.PlanUpdatable, + Metadata: json.RawMessage(sp.Metadata), + Schemas: json.RawMessage(sp.Schemas), + ServiceOfferingID: sp.ServiceOfferingID, } - if broker.Credentials != nil { - result.Username = broker.Credentials.Basic.Username - result.Password = broker.Credentials.Basic.Password +} + +func (sp *ServicePlan) FromDTO(plan *types.ServicePlan) { + *sp = ServicePlan{ + ID: plan.ID, + Name: plan.Name, + Description: plan.Description, + CreatedAt: plan.CreatedAt, + UpdatedAt: plan.UpdatedAt, + Free: plan.Free, + Bindable: plan.Bindable, + PlanUpdatable: plan.PlanUpdatable, + CatalogID: plan.CatalogID, + CatalogName: plan.CatalogName, + Metadata: sqlxtypes.JSONText(plan.Metadata), + Schemas: sqlxtypes.JSONText(plan.Schemas), + ServiceOfferingID: plan.ServiceOfferingID, } - return result } diff --git a/vendor/github.com/Peripli/service-manager/storage/registry.go b/vendor/github.com/Peripli/service-manager/storage/registry.go index 6612bbb3..bc365e44 100644 --- a/vendor/github.com/Peripli/service-manager/storage/registry.go +++ b/vendor/github.com/Peripli/service-manager/storage/registry.go @@ -46,14 +46,14 @@ func Register(name string, storage Storage) { // Use specifies the storage for the given name // Returns the storage ready to be used and an error if one occurred during initialization // Upon context.Done signal the storage will be closed -func Use(ctx context.Context, name string, uri string, encryptionKey []byte) (Storage, error) { +func Use(ctx context.Context, name string, options *Settings) (Storage, error) { mux.Lock() defer mux.Unlock() storage, exists := storages[name] if !exists { return nil, fmt.Errorf("error locating storage with name %s", name) } - if err := storage.Open(uri, encryptionKey); err != nil { + if err := storage.Open(options); err != nil { return nil, fmt.Errorf("error opening storage: %s", err) } storages[name] = storage diff --git a/vendor/github.com/Peripli/service-manager/storage/registry_test.go b/vendor/github.com/Peripli/service-manager/storage/registry_test.go index beaa90da..6ef7da27 100644 --- a/vendor/github.com/Peripli/service-manager/storage/registry_test.go +++ b/vendor/github.com/Peripli/service-manager/storage/registry_test.go @@ -17,9 +17,6 @@ package storage_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "context" "fmt" "testing" @@ -30,6 +27,9 @@ import ( "github.com/Peripli/service-manager/storage" "github.com/Peripli/service-manager/storage/storagefakes" "github.com/sirupsen/logrus" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" ) func TestStorage(t *testing.T) { @@ -67,11 +67,17 @@ func (interceptor *logInterceptor) VerifyData(emptyData bool) { var _ = Describe("Registry", func() { var testStorage *storagefakes.FakeStorage + var testSettings *storage.Settings BeforeEach(func() { testStorage = &storagefakes.FakeStorage{} testStorage.OpenReturns(nil) testStorage.CloseReturns(nil) + testSettings = &storage.Settings{ + URI: "uri", + MigrationsURL: "", + EncryptionKey: "", + } }) Describe("Storage registration", func() { @@ -108,7 +114,11 @@ var _ = Describe("Registry", func() { Describe("Use storage", func() { Context("With non-registered", func() { It("Should return an error", func() { - returnedStorage, err := storage.Use(context.TODO(), "non-existing-storage", "uri", nil) + returnedStorage, err := storage.Use(context.TODO(), "non-existing-storage", &storage.Settings{ + URI: "uri", + MigrationsURL: "", + EncryptionKey: "", + }) Expect(returnedStorage).To(BeNil()) Expect(err).To(Not(BeNil())) }) @@ -118,7 +128,7 @@ var _ = Describe("Registry", func() { It("Should return an error", func() { testStorage.OpenReturns(fmt.Errorf("Error")) storage.Register("openFailingStorage", testStorage) - _, err := storage.Use(context.TODO(), "openFailingStorage", "uri", nil) + _, err := storage.Use(context.TODO(), "openFailingStorage", testSettings) Expect(err).To(Not(BeNil())) }) }) @@ -127,7 +137,7 @@ var _ = Describe("Registry", func() { It("Should return storage", func() { testStorage.OpenReturns(nil) storage.Register("openOkStorage", testStorage) - configuredStorage, err := storage.Use(context.TODO(), "openOkStorage", "uri", nil) + configuredStorage, err := storage.Use(context.TODO(), "openOkStorage", testSettings) Expect(configuredStorage).To(Not(BeNil())) Expect(err).To(BeNil()) }) @@ -147,7 +157,7 @@ var _ = Describe("Registry", func() { testStorage.CloseReturns(fmt.Errorf("Error")) storage.Register("closeFailingStorage", testStorage) ctx, cancel := context.WithCancel(context.TODO()) - storage.Use(ctx, "closeFailingStorage", "uri", nil) + storage.Use(ctx, "closeFailingStorage", testSettings) cancel() time.Sleep(time.Millisecond * 100) interceptor.VerifyData(false) @@ -159,7 +169,7 @@ var _ = Describe("Registry", func() { testStorage.CloseReturns(nil) storage.Register("closeOkStorage", testStorage) ctx, cancel := context.WithCancel(context.TODO()) - storage.Use(ctx, "closeOkStorage", "uri", nil) + storage.Use(ctx, "closeOkStorage", testSettings) cancel() time.Sleep(time.Millisecond * 100) interceptor.VerifyData(true) diff --git a/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_credentials.go b/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_credentials.go index ab5bf635..616c9be9 100644 --- a/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_credentials.go +++ b/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_credentials.go @@ -2,19 +2,19 @@ package storagefakes import ( - "context" - "sync" + context "context" + sync "sync" - "github.com/Peripli/service-manager/pkg/types" - "github.com/Peripli/service-manager/storage" + types "github.com/Peripli/service-manager/pkg/types" + storage "github.com/Peripli/service-manager/storage" ) type FakeCredentials struct { - GetStub func(ctx context.Context, username string) (*types.Credentials, error) + GetStub func(context.Context, string) (*types.Credentials, error) getMutex sync.RWMutex getArgsForCall []struct { - ctx context.Context - username string + arg1 context.Context + arg2 string } getReturns struct { result1 *types.Credentials @@ -28,22 +28,23 @@ type FakeCredentials struct { invocationsMutex sync.RWMutex } -func (fake *FakeCredentials) Get(ctx context.Context, username string) (*types.Credentials, error) { +func (fake *FakeCredentials) Get(arg1 context.Context, arg2 string) (*types.Credentials, error) { fake.getMutex.Lock() ret, specificReturn := fake.getReturnsOnCall[len(fake.getArgsForCall)] fake.getArgsForCall = append(fake.getArgsForCall, struct { - ctx context.Context - username string - }{ctx, username}) - fake.recordInvocation("Get", []interface{}{ctx, username}) + arg1 context.Context + arg2 string + }{arg1, arg2}) + fake.recordInvocation("Get", []interface{}{arg1, arg2}) fake.getMutex.Unlock() if fake.GetStub != nil { - return fake.GetStub(ctx, username) + return fake.GetStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } - return fake.getReturns.result1, fake.getReturns.result2 + fakeReturns := fake.getReturns + return fakeReturns.result1, fakeReturns.result2 } func (fake *FakeCredentials) GetCallCount() int { @@ -52,13 +53,22 @@ func (fake *FakeCredentials) GetCallCount() int { return len(fake.getArgsForCall) } +func (fake *FakeCredentials) GetCalls(stub func(context.Context, string) (*types.Credentials, error)) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() + fake.GetStub = stub +} + func (fake *FakeCredentials) GetArgsForCall(i int) (context.Context, string) { fake.getMutex.RLock() defer fake.getMutex.RUnlock() - return fake.getArgsForCall[i].ctx, fake.getArgsForCall[i].username + argsForCall := fake.getArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 } func (fake *FakeCredentials) GetReturns(result1 *types.Credentials, result2 error) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() fake.GetStub = nil fake.getReturns = struct { result1 *types.Credentials @@ -67,6 +77,8 @@ func (fake *FakeCredentials) GetReturns(result1 *types.Credentials, result2 erro } func (fake *FakeCredentials) GetReturnsOnCall(i int, result1 *types.Credentials, result2 error) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() fake.GetStub = nil if fake.getReturnsOnCall == nil { fake.getReturnsOnCall = make(map[int]struct { diff --git a/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_service_offering.go b/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_service_offering.go new file mode 100644 index 00000000..a9675c26 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_service_offering.go @@ -0,0 +1,582 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package storagefakes + +import ( + context "context" + sync "sync" + + types "github.com/Peripli/service-manager/pkg/types" + storage "github.com/Peripli/service-manager/storage" +) + +type FakeServiceOffering struct { + CreateStub func(context.Context, *types.ServiceOffering) error + createMutex sync.RWMutex + createArgsForCall []struct { + arg1 context.Context + arg2 *types.ServiceOffering + } + createReturns struct { + result1 error + } + createReturnsOnCall map[int]struct { + result1 error + } + DeleteStub func(context.Context, string) error + deleteMutex sync.RWMutex + deleteArgsForCall []struct { + arg1 context.Context + arg2 string + } + deleteReturns struct { + result1 error + } + deleteReturnsOnCall map[int]struct { + result1 error + } + GetStub func(context.Context, string) (*types.ServiceOffering, error) + getMutex sync.RWMutex + getArgsForCall []struct { + arg1 context.Context + arg2 string + } + getReturns struct { + result1 *types.ServiceOffering + result2 error + } + getReturnsOnCall map[int]struct { + result1 *types.ServiceOffering + result2 error + } + ListStub func(context.Context) ([]*types.ServiceOffering, error) + listMutex sync.RWMutex + listArgsForCall []struct { + arg1 context.Context + } + listReturns struct { + result1 []*types.ServiceOffering + result2 error + } + listReturnsOnCall map[int]struct { + result1 []*types.ServiceOffering + result2 error + } + ListByCatalogNameStub func(context.Context, string) ([]*types.ServiceOffering, error) + listByCatalogNameMutex sync.RWMutex + listByCatalogNameArgsForCall []struct { + arg1 context.Context + arg2 string + } + listByCatalogNameReturns struct { + result1 []*types.ServiceOffering + result2 error + } + listByCatalogNameReturnsOnCall map[int]struct { + result1 []*types.ServiceOffering + result2 error + } + ListWithServicePlansByBrokerIDStub func(context.Context, string) ([]*types.ServiceOffering, error) + listWithServicePlansByBrokerIDMutex sync.RWMutex + listWithServicePlansByBrokerIDArgsForCall []struct { + arg1 context.Context + arg2 string + } + listWithServicePlansByBrokerIDReturns struct { + result1 []*types.ServiceOffering + result2 error + } + listWithServicePlansByBrokerIDReturnsOnCall map[int]struct { + result1 []*types.ServiceOffering + result2 error + } + UpdateStub func(context.Context, *types.ServiceOffering) error + updateMutex sync.RWMutex + updateArgsForCall []struct { + arg1 context.Context + arg2 *types.ServiceOffering + } + updateReturns struct { + result1 error + } + updateReturnsOnCall map[int]struct { + result1 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeServiceOffering) Create(arg1 context.Context, arg2 *types.ServiceOffering) error { + fake.createMutex.Lock() + ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)] + fake.createArgsForCall = append(fake.createArgsForCall, struct { + arg1 context.Context + arg2 *types.ServiceOffering + }{arg1, arg2}) + fake.recordInvocation("Create", []interface{}{arg1, arg2}) + fake.createMutex.Unlock() + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.createReturns + return fakeReturns.result1 +} + +func (fake *FakeServiceOffering) CreateCallCount() int { + fake.createMutex.RLock() + defer fake.createMutex.RUnlock() + return len(fake.createArgsForCall) +} + +func (fake *FakeServiceOffering) CreateCalls(stub func(context.Context, *types.ServiceOffering) error) { + fake.createMutex.Lock() + defer fake.createMutex.Unlock() + fake.CreateStub = stub +} + +func (fake *FakeServiceOffering) CreateArgsForCall(i int) (context.Context, *types.ServiceOffering) { + fake.createMutex.RLock() + defer fake.createMutex.RUnlock() + argsForCall := fake.createArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeServiceOffering) CreateReturns(result1 error) { + fake.createMutex.Lock() + defer fake.createMutex.Unlock() + fake.CreateStub = nil + fake.createReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeServiceOffering) CreateReturnsOnCall(i int, result1 error) { + fake.createMutex.Lock() + defer fake.createMutex.Unlock() + fake.CreateStub = nil + if fake.createReturnsOnCall == nil { + fake.createReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.createReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeServiceOffering) Delete(arg1 context.Context, arg2 string) error { + fake.deleteMutex.Lock() + ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)] + fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { + arg1 context.Context + arg2 string + }{arg1, arg2}) + fake.recordInvocation("Delete", []interface{}{arg1, arg2}) + fake.deleteMutex.Unlock() + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.deleteReturns + return fakeReturns.result1 +} + +func (fake *FakeServiceOffering) DeleteCallCount() int { + fake.deleteMutex.RLock() + defer fake.deleteMutex.RUnlock() + return len(fake.deleteArgsForCall) +} + +func (fake *FakeServiceOffering) DeleteCalls(stub func(context.Context, string) error) { + fake.deleteMutex.Lock() + defer fake.deleteMutex.Unlock() + fake.DeleteStub = stub +} + +func (fake *FakeServiceOffering) DeleteArgsForCall(i int) (context.Context, string) { + fake.deleteMutex.RLock() + defer fake.deleteMutex.RUnlock() + argsForCall := fake.deleteArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeServiceOffering) DeleteReturns(result1 error) { + fake.deleteMutex.Lock() + defer fake.deleteMutex.Unlock() + fake.DeleteStub = nil + fake.deleteReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeServiceOffering) DeleteReturnsOnCall(i int, result1 error) { + fake.deleteMutex.Lock() + defer fake.deleteMutex.Unlock() + fake.DeleteStub = nil + if fake.deleteReturnsOnCall == nil { + fake.deleteReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.deleteReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeServiceOffering) Get(arg1 context.Context, arg2 string) (*types.ServiceOffering, error) { + fake.getMutex.Lock() + ret, specificReturn := fake.getReturnsOnCall[len(fake.getArgsForCall)] + fake.getArgsForCall = append(fake.getArgsForCall, struct { + arg1 context.Context + arg2 string + }{arg1, arg2}) + fake.recordInvocation("Get", []interface{}{arg1, arg2}) + fake.getMutex.Unlock() + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2) + } + if specificReturn { + return ret.result1, ret.result2 + } + fakeReturns := fake.getReturns + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeServiceOffering) GetCallCount() int { + fake.getMutex.RLock() + defer fake.getMutex.RUnlock() + return len(fake.getArgsForCall) +} + +func (fake *FakeServiceOffering) GetCalls(stub func(context.Context, string) (*types.ServiceOffering, error)) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() + fake.GetStub = stub +} + +func (fake *FakeServiceOffering) GetArgsForCall(i int) (context.Context, string) { + fake.getMutex.RLock() + defer fake.getMutex.RUnlock() + argsForCall := fake.getArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeServiceOffering) GetReturns(result1 *types.ServiceOffering, result2 error) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() + fake.GetStub = nil + fake.getReturns = struct { + result1 *types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) GetReturnsOnCall(i int, result1 *types.ServiceOffering, result2 error) { + fake.getMutex.Lock() + defer fake.getMutex.Unlock() + fake.GetStub = nil + if fake.getReturnsOnCall == nil { + fake.getReturnsOnCall = make(map[int]struct { + result1 *types.ServiceOffering + result2 error + }) + } + fake.getReturnsOnCall[i] = struct { + result1 *types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) List(arg1 context.Context) ([]*types.ServiceOffering, error) { + fake.listMutex.Lock() + ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)] + fake.listArgsForCall = append(fake.listArgsForCall, struct { + arg1 context.Context + }{arg1}) + fake.recordInvocation("List", []interface{}{arg1}) + fake.listMutex.Unlock() + if fake.ListStub != nil { + return fake.ListStub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + fakeReturns := fake.listReturns + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeServiceOffering) ListCallCount() int { + fake.listMutex.RLock() + defer fake.listMutex.RUnlock() + return len(fake.listArgsForCall) +} + +func (fake *FakeServiceOffering) ListCalls(stub func(context.Context) ([]*types.ServiceOffering, error)) { + fake.listMutex.Lock() + defer fake.listMutex.Unlock() + fake.ListStub = stub +} + +func (fake *FakeServiceOffering) ListArgsForCall(i int) context.Context { + fake.listMutex.RLock() + defer fake.listMutex.RUnlock() + argsForCall := fake.listArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeServiceOffering) ListReturns(result1 []*types.ServiceOffering, result2 error) { + fake.listMutex.Lock() + defer fake.listMutex.Unlock() + fake.ListStub = nil + fake.listReturns = struct { + result1 []*types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) ListReturnsOnCall(i int, result1 []*types.ServiceOffering, result2 error) { + fake.listMutex.Lock() + defer fake.listMutex.Unlock() + fake.ListStub = nil + if fake.listReturnsOnCall == nil { + fake.listReturnsOnCall = make(map[int]struct { + result1 []*types.ServiceOffering + result2 error + }) + } + fake.listReturnsOnCall[i] = struct { + result1 []*types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) ListByCatalogName(arg1 context.Context, arg2 string) ([]*types.ServiceOffering, error) { + fake.listByCatalogNameMutex.Lock() + ret, specificReturn := fake.listByCatalogNameReturnsOnCall[len(fake.listByCatalogNameArgsForCall)] + fake.listByCatalogNameArgsForCall = append(fake.listByCatalogNameArgsForCall, struct { + arg1 context.Context + arg2 string + }{arg1, arg2}) + fake.recordInvocation("ListByCatalogName", []interface{}{arg1, arg2}) + fake.listByCatalogNameMutex.Unlock() + if fake.ListByCatalogNameStub != nil { + return fake.ListByCatalogNameStub(arg1, arg2) + } + if specificReturn { + return ret.result1, ret.result2 + } + fakeReturns := fake.listByCatalogNameReturns + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeServiceOffering) ListByCatalogNameCallCount() int { + fake.listByCatalogNameMutex.RLock() + defer fake.listByCatalogNameMutex.RUnlock() + return len(fake.listByCatalogNameArgsForCall) +} + +func (fake *FakeServiceOffering) ListByCatalogNameCalls(stub func(context.Context, string) ([]*types.ServiceOffering, error)) { + fake.listByCatalogNameMutex.Lock() + defer fake.listByCatalogNameMutex.Unlock() + fake.ListByCatalogNameStub = stub +} + +func (fake *FakeServiceOffering) ListByCatalogNameArgsForCall(i int) (context.Context, string) { + fake.listByCatalogNameMutex.RLock() + defer fake.listByCatalogNameMutex.RUnlock() + argsForCall := fake.listByCatalogNameArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeServiceOffering) ListByCatalogNameReturns(result1 []*types.ServiceOffering, result2 error) { + fake.listByCatalogNameMutex.Lock() + defer fake.listByCatalogNameMutex.Unlock() + fake.ListByCatalogNameStub = nil + fake.listByCatalogNameReturns = struct { + result1 []*types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) ListByCatalogNameReturnsOnCall(i int, result1 []*types.ServiceOffering, result2 error) { + fake.listByCatalogNameMutex.Lock() + defer fake.listByCatalogNameMutex.Unlock() + fake.ListByCatalogNameStub = nil + if fake.listByCatalogNameReturnsOnCall == nil { + fake.listByCatalogNameReturnsOnCall = make(map[int]struct { + result1 []*types.ServiceOffering + result2 error + }) + } + fake.listByCatalogNameReturnsOnCall[i] = struct { + result1 []*types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) ListWithServicePlansByBrokerID(arg1 context.Context, arg2 string) ([]*types.ServiceOffering, error) { + fake.listWithServicePlansByBrokerIDMutex.Lock() + ret, specificReturn := fake.listWithServicePlansByBrokerIDReturnsOnCall[len(fake.listWithServicePlansByBrokerIDArgsForCall)] + fake.listWithServicePlansByBrokerIDArgsForCall = append(fake.listWithServicePlansByBrokerIDArgsForCall, struct { + arg1 context.Context + arg2 string + }{arg1, arg2}) + fake.recordInvocation("ListWithServicePlansByBrokerID", []interface{}{arg1, arg2}) + fake.listWithServicePlansByBrokerIDMutex.Unlock() + if fake.ListWithServicePlansByBrokerIDStub != nil { + return fake.ListWithServicePlansByBrokerIDStub(arg1, arg2) + } + if specificReturn { + return ret.result1, ret.result2 + } + fakeReturns := fake.listWithServicePlansByBrokerIDReturns + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeServiceOffering) ListWithServicePlansByBrokerIDCallCount() int { + fake.listWithServicePlansByBrokerIDMutex.RLock() + defer fake.listWithServicePlansByBrokerIDMutex.RUnlock() + return len(fake.listWithServicePlansByBrokerIDArgsForCall) +} + +func (fake *FakeServiceOffering) ListWithServicePlansByBrokerIDCalls(stub func(context.Context, string) ([]*types.ServiceOffering, error)) { + fake.listWithServicePlansByBrokerIDMutex.Lock() + defer fake.listWithServicePlansByBrokerIDMutex.Unlock() + fake.ListWithServicePlansByBrokerIDStub = stub +} + +func (fake *FakeServiceOffering) ListWithServicePlansByBrokerIDArgsForCall(i int) (context.Context, string) { + fake.listWithServicePlansByBrokerIDMutex.RLock() + defer fake.listWithServicePlansByBrokerIDMutex.RUnlock() + argsForCall := fake.listWithServicePlansByBrokerIDArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeServiceOffering) ListWithServicePlansByBrokerIDReturns(result1 []*types.ServiceOffering, result2 error) { + fake.listWithServicePlansByBrokerIDMutex.Lock() + defer fake.listWithServicePlansByBrokerIDMutex.Unlock() + fake.ListWithServicePlansByBrokerIDStub = nil + fake.listWithServicePlansByBrokerIDReturns = struct { + result1 []*types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) ListWithServicePlansByBrokerIDReturnsOnCall(i int, result1 []*types.ServiceOffering, result2 error) { + fake.listWithServicePlansByBrokerIDMutex.Lock() + defer fake.listWithServicePlansByBrokerIDMutex.Unlock() + fake.ListWithServicePlansByBrokerIDStub = nil + if fake.listWithServicePlansByBrokerIDReturnsOnCall == nil { + fake.listWithServicePlansByBrokerIDReturnsOnCall = make(map[int]struct { + result1 []*types.ServiceOffering + result2 error + }) + } + fake.listWithServicePlansByBrokerIDReturnsOnCall[i] = struct { + result1 []*types.ServiceOffering + result2 error + }{result1, result2} +} + +func (fake *FakeServiceOffering) Update(arg1 context.Context, arg2 *types.ServiceOffering) error { + fake.updateMutex.Lock() + ret, specificReturn := fake.updateReturnsOnCall[len(fake.updateArgsForCall)] + fake.updateArgsForCall = append(fake.updateArgsForCall, struct { + arg1 context.Context + arg2 *types.ServiceOffering + }{arg1, arg2}) + fake.recordInvocation("Update", []interface{}{arg1, arg2}) + fake.updateMutex.Unlock() + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.updateReturns + return fakeReturns.result1 +} + +func (fake *FakeServiceOffering) UpdateCallCount() int { + fake.updateMutex.RLock() + defer fake.updateMutex.RUnlock() + return len(fake.updateArgsForCall) +} + +func (fake *FakeServiceOffering) UpdateCalls(stub func(context.Context, *types.ServiceOffering) error) { + fake.updateMutex.Lock() + defer fake.updateMutex.Unlock() + fake.UpdateStub = stub +} + +func (fake *FakeServiceOffering) UpdateArgsForCall(i int) (context.Context, *types.ServiceOffering) { + fake.updateMutex.RLock() + defer fake.updateMutex.RUnlock() + argsForCall := fake.updateArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeServiceOffering) UpdateReturns(result1 error) { + fake.updateMutex.Lock() + defer fake.updateMutex.Unlock() + fake.UpdateStub = nil + fake.updateReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeServiceOffering) UpdateReturnsOnCall(i int, result1 error) { + fake.updateMutex.Lock() + defer fake.updateMutex.Unlock() + fake.UpdateStub = nil + if fake.updateReturnsOnCall == nil { + fake.updateReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.updateReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeServiceOffering) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.createMutex.RLock() + defer fake.createMutex.RUnlock() + fake.deleteMutex.RLock() + defer fake.deleteMutex.RUnlock() + fake.getMutex.RLock() + defer fake.getMutex.RUnlock() + fake.listMutex.RLock() + defer fake.listMutex.RUnlock() + fake.listByCatalogNameMutex.RLock() + defer fake.listByCatalogNameMutex.RUnlock() + fake.listWithServicePlansByBrokerIDMutex.RLock() + defer fake.listWithServicePlansByBrokerIDMutex.RUnlock() + fake.updateMutex.RLock() + defer fake.updateMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeServiceOffering) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ storage.ServiceOffering = new(FakeServiceOffering) diff --git a/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_storage.go b/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_storage.go index dd440ef1..99ab90de 100644 --- a/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_storage.go +++ b/vendor/github.com/Peripli/service-manager/storage/storagefakes/fake_storage.go @@ -2,140 +2,177 @@ package storagefakes import ( - "sync" + context "context" + sync "sync" - "github.com/Peripli/service-manager/storage" + storage "github.com/Peripli/service-manager/storage" ) type FakeStorage struct { - OpenStub func(uri string, encryptionKey []byte) error - openMutex sync.RWMutex - openArgsForCall []struct { - uri string - encryptionKey []byte + BrokerStub func() storage.Broker + brokerMutex sync.RWMutex + brokerArgsForCall []struct { } - openReturns struct { - result1 error + brokerReturns struct { + result1 storage.Broker } - openReturnsOnCall map[int]struct { - result1 error + brokerReturnsOnCall map[int]struct { + result1 storage.Broker } CloseStub func() error closeMutex sync.RWMutex - closeArgsForCall []struct{} - closeReturns struct { + closeArgsForCall []struct { + } + closeReturns struct { result1 error } closeReturnsOnCall map[int]struct { result1 error } + CredentialsStub func() storage.Credentials + credentialsMutex sync.RWMutex + credentialsArgsForCall []struct { + } + credentialsReturns struct { + result1 storage.Credentials + } + credentialsReturnsOnCall map[int]struct { + result1 storage.Credentials + } + InTransactionStub func(context.Context, func(ctx context.Context, storage storage.Warehouse) error) error + inTransactionMutex sync.RWMutex + inTransactionArgsForCall []struct { + arg1 context.Context + arg2 func(ctx context.Context, storage storage.Warehouse) error + } + inTransactionReturns struct { + result1 error + } + inTransactionReturnsOnCall map[int]struct { + result1 error + } + OpenStub func(*storage.Settings) error + openMutex sync.RWMutex + openArgsForCall []struct { + arg1 *storage.Settings + } + openReturns struct { + result1 error + } + openReturnsOnCall map[int]struct { + result1 error + } PingStub func() error pingMutex sync.RWMutex - pingArgsForCall []struct{} - pingReturns struct { + pingArgsForCall []struct { + } + pingReturns struct { result1 error } pingReturnsOnCall map[int]struct { result1 error } - BrokerStub func() storage.Broker - brokerMutex sync.RWMutex - brokerArgsForCall []struct{} - brokerReturns struct { - result1 storage.Broker - } - brokerReturnsOnCall map[int]struct { - result1 storage.Broker - } PlatformStub func() storage.Platform platformMutex sync.RWMutex - platformArgsForCall []struct{} - platformReturns struct { + platformArgsForCall []struct { + } + platformReturns struct { result1 storage.Platform } platformReturnsOnCall map[int]struct { result1 storage.Platform } - CredentialsStub func() storage.Credentials - credentialsMutex sync.RWMutex - credentialsArgsForCall []struct{} - credentialsReturns struct { - result1 storage.Credentials - } - credentialsReturnsOnCall map[int]struct { - result1 storage.Credentials - } SecurityStub func() storage.Security securityMutex sync.RWMutex - securityArgsForCall []struct{} - securityReturns struct { + securityArgsForCall []struct { + } + securityReturns struct { result1 storage.Security } securityReturnsOnCall map[int]struct { result1 storage.Security } + ServiceOfferingStub func() storage.ServiceOffering + serviceOfferingMutex sync.RWMutex + serviceOfferingArgsForCall []struct { + } + serviceOfferingReturns struct { + result1 storage.ServiceOffering + } + serviceOfferingReturnsOnCall map[int]struct { + result1 storage.ServiceOffering + } + ServicePlanStub func() storage.ServicePlan + servicePlanMutex sync.RWMutex + servicePlanArgsForCall []struct { + } + servicePlanReturns struct { + result1 storage.ServicePlan + } + servicePlanReturnsOnCall map[int]struct { + result1 storage.ServicePlan + } invocations map[string][][]interface{} invocationsMutex sync.RWMutex } -func (fake *FakeStorage) Open(uri string, encryptionKey []byte) error { - var encryptionKeyCopy []byte - if encryptionKey != nil { - encryptionKeyCopy = make([]byte, len(encryptionKey)) - copy(encryptionKeyCopy, encryptionKey) - } - fake.openMutex.Lock() - ret, specificReturn := fake.openReturnsOnCall[len(fake.openArgsForCall)] - fake.openArgsForCall = append(fake.openArgsForCall, struct { - uri string - encryptionKey []byte - }{uri, encryptionKeyCopy}) - fake.recordInvocation("Open", []interface{}{uri, encryptionKeyCopy}) - fake.openMutex.Unlock() - if fake.OpenStub != nil { - return fake.OpenStub(uri, encryptionKey) +func (fake *FakeStorage) Broker() storage.Broker { + fake.brokerMutex.Lock() + ret, specificReturn := fake.brokerReturnsOnCall[len(fake.brokerArgsForCall)] + fake.brokerArgsForCall = append(fake.brokerArgsForCall, struct { + }{}) + fake.recordInvocation("Broker", []interface{}{}) + fake.brokerMutex.Unlock() + if fake.BrokerStub != nil { + return fake.BrokerStub() } if specificReturn { return ret.result1 } - return fake.openReturns.result1 + fakeReturns := fake.brokerReturns + return fakeReturns.result1 } -func (fake *FakeStorage) OpenCallCount() int { - fake.openMutex.RLock() - defer fake.openMutex.RUnlock() - return len(fake.openArgsForCall) +func (fake *FakeStorage) BrokerCallCount() int { + fake.brokerMutex.RLock() + defer fake.brokerMutex.RUnlock() + return len(fake.brokerArgsForCall) } -func (fake *FakeStorage) OpenArgsForCall(i int) (string, []byte) { - fake.openMutex.RLock() - defer fake.openMutex.RUnlock() - return fake.openArgsForCall[i].uri, fake.openArgsForCall[i].encryptionKey +func (fake *FakeStorage) BrokerCalls(stub func() storage.Broker) { + fake.brokerMutex.Lock() + defer fake.brokerMutex.Unlock() + fake.BrokerStub = stub } -func (fake *FakeStorage) OpenReturns(result1 error) { - fake.OpenStub = nil - fake.openReturns = struct { - result1 error +func (fake *FakeStorage) BrokerReturns(result1 storage.Broker) { + fake.brokerMutex.Lock() + defer fake.brokerMutex.Unlock() + fake.BrokerStub = nil + fake.brokerReturns = struct { + result1 storage.Broker }{result1} } -func (fake *FakeStorage) OpenReturnsOnCall(i int, result1 error) { - fake.OpenStub = nil - if fake.openReturnsOnCall == nil { - fake.openReturnsOnCall = make(map[int]struct { - result1 error +func (fake *FakeStorage) BrokerReturnsOnCall(i int, result1 storage.Broker) { + fake.brokerMutex.Lock() + defer fake.brokerMutex.Unlock() + fake.BrokerStub = nil + if fake.brokerReturnsOnCall == nil { + fake.brokerReturnsOnCall = make(map[int]struct { + result1 storage.Broker }) } - fake.openReturnsOnCall[i] = struct { - result1 error + fake.brokerReturnsOnCall[i] = struct { + result1 storage.Broker }{result1} } func (fake *FakeStorage) Close() error { fake.closeMutex.Lock() ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct{}{}) + fake.closeArgsForCall = append(fake.closeArgsForCall, struct { + }{}) fake.recordInvocation("Close", []interface{}{}) fake.closeMutex.Unlock() if fake.CloseStub != nil { @@ -144,7 +181,8 @@ func (fake *FakeStorage) Close() error { if specificReturn { return ret.result1 } - return fake.closeReturns.result1 + fakeReturns := fake.closeReturns + return fakeReturns.result1 } func (fake *FakeStorage) CloseCallCount() int { @@ -153,7 +191,15 @@ func (fake *FakeStorage) CloseCallCount() int { return len(fake.closeArgsForCall) } +func (fake *FakeStorage) CloseCalls(stub func() error) { + fake.closeMutex.Lock() + defer fake.closeMutex.Unlock() + fake.CloseStub = stub +} + func (fake *FakeStorage) CloseReturns(result1 error) { + fake.closeMutex.Lock() + defer fake.closeMutex.Unlock() fake.CloseStub = nil fake.closeReturns = struct { result1 error @@ -161,6 +207,8 @@ func (fake *FakeStorage) CloseReturns(result1 error) { } func (fake *FakeStorage) CloseReturnsOnCall(i int, result1 error) { + fake.closeMutex.Lock() + defer fake.closeMutex.Unlock() fake.CloseStub = nil if fake.closeReturnsOnCall == nil { fake.closeReturnsOnCall = make(map[int]struct { @@ -172,10 +220,184 @@ func (fake *FakeStorage) CloseReturnsOnCall(i int, result1 error) { }{result1} } +func (fake *FakeStorage) Credentials() storage.Credentials { + fake.credentialsMutex.Lock() + ret, specificReturn := fake.credentialsReturnsOnCall[len(fake.credentialsArgsForCall)] + fake.credentialsArgsForCall = append(fake.credentialsArgsForCall, struct { + }{}) + fake.recordInvocation("Credentials", []interface{}{}) + fake.credentialsMutex.Unlock() + if fake.CredentialsStub != nil { + return fake.CredentialsStub() + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.credentialsReturns + return fakeReturns.result1 +} + +func (fake *FakeStorage) CredentialsCallCount() int { + fake.credentialsMutex.RLock() + defer fake.credentialsMutex.RUnlock() + return len(fake.credentialsArgsForCall) +} + +func (fake *FakeStorage) CredentialsCalls(stub func() storage.Credentials) { + fake.credentialsMutex.Lock() + defer fake.credentialsMutex.Unlock() + fake.CredentialsStub = stub +} + +func (fake *FakeStorage) CredentialsReturns(result1 storage.Credentials) { + fake.credentialsMutex.Lock() + defer fake.credentialsMutex.Unlock() + fake.CredentialsStub = nil + fake.credentialsReturns = struct { + result1 storage.Credentials + }{result1} +} + +func (fake *FakeStorage) CredentialsReturnsOnCall(i int, result1 storage.Credentials) { + fake.credentialsMutex.Lock() + defer fake.credentialsMutex.Unlock() + fake.CredentialsStub = nil + if fake.credentialsReturnsOnCall == nil { + fake.credentialsReturnsOnCall = make(map[int]struct { + result1 storage.Credentials + }) + } + fake.credentialsReturnsOnCall[i] = struct { + result1 storage.Credentials + }{result1} +} + +func (fake *FakeStorage) InTransaction(arg1 context.Context, arg2 func(ctx context.Context, storage storage.Warehouse) error) error { + fake.inTransactionMutex.Lock() + ret, specificReturn := fake.inTransactionReturnsOnCall[len(fake.inTransactionArgsForCall)] + fake.inTransactionArgsForCall = append(fake.inTransactionArgsForCall, struct { + arg1 context.Context + arg2 func(ctx context.Context, storage storage.Warehouse) error + }{arg1, arg2}) + fake.recordInvocation("InTransaction", []interface{}{arg1, arg2}) + fake.inTransactionMutex.Unlock() + if fake.InTransactionStub != nil { + return fake.InTransactionStub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.inTransactionReturns + return fakeReturns.result1 +} + +func (fake *FakeStorage) InTransactionCallCount() int { + fake.inTransactionMutex.RLock() + defer fake.inTransactionMutex.RUnlock() + return len(fake.inTransactionArgsForCall) +} + +func (fake *FakeStorage) InTransactionCalls(stub func(context.Context, func(ctx context.Context, storage storage.Warehouse) error) error) { + fake.inTransactionMutex.Lock() + defer fake.inTransactionMutex.Unlock() + fake.InTransactionStub = stub +} + +func (fake *FakeStorage) InTransactionArgsForCall(i int) (context.Context, func(ctx context.Context, storage storage.Warehouse) error) { + fake.inTransactionMutex.RLock() + defer fake.inTransactionMutex.RUnlock() + argsForCall := fake.inTransactionArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeStorage) InTransactionReturns(result1 error) { + fake.inTransactionMutex.Lock() + defer fake.inTransactionMutex.Unlock() + fake.InTransactionStub = nil + fake.inTransactionReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeStorage) InTransactionReturnsOnCall(i int, result1 error) { + fake.inTransactionMutex.Lock() + defer fake.inTransactionMutex.Unlock() + fake.InTransactionStub = nil + if fake.inTransactionReturnsOnCall == nil { + fake.inTransactionReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.inTransactionReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeStorage) Open(arg1 *storage.Settings) error { + fake.openMutex.Lock() + ret, specificReturn := fake.openReturnsOnCall[len(fake.openArgsForCall)] + fake.openArgsForCall = append(fake.openArgsForCall, struct { + arg1 *storage.Settings + }{arg1}) + fake.recordInvocation("Open", []interface{}{arg1}) + fake.openMutex.Unlock() + if fake.OpenStub != nil { + return fake.OpenStub(arg1) + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.openReturns + return fakeReturns.result1 +} + +func (fake *FakeStorage) OpenCallCount() int { + fake.openMutex.RLock() + defer fake.openMutex.RUnlock() + return len(fake.openArgsForCall) +} + +func (fake *FakeStorage) OpenCalls(stub func(*storage.Settings) error) { + fake.openMutex.Lock() + defer fake.openMutex.Unlock() + fake.OpenStub = stub +} + +func (fake *FakeStorage) OpenArgsForCall(i int) *storage.Settings { + fake.openMutex.RLock() + defer fake.openMutex.RUnlock() + argsForCall := fake.openArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeStorage) OpenReturns(result1 error) { + fake.openMutex.Lock() + defer fake.openMutex.Unlock() + fake.OpenStub = nil + fake.openReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeStorage) OpenReturnsOnCall(i int, result1 error) { + fake.openMutex.Lock() + defer fake.openMutex.Unlock() + fake.OpenStub = nil + if fake.openReturnsOnCall == nil { + fake.openReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.openReturnsOnCall[i] = struct { + result1 error + }{result1} +} + func (fake *FakeStorage) Ping() error { fake.pingMutex.Lock() ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct{}{}) + fake.pingArgsForCall = append(fake.pingArgsForCall, struct { + }{}) fake.recordInvocation("Ping", []interface{}{}) fake.pingMutex.Unlock() if fake.PingStub != nil { @@ -184,7 +406,8 @@ func (fake *FakeStorage) Ping() error { if specificReturn { return ret.result1 } - return fake.pingReturns.result1 + fakeReturns := fake.pingReturns + return fakeReturns.result1 } func (fake *FakeStorage) PingCallCount() int { @@ -193,7 +416,15 @@ func (fake *FakeStorage) PingCallCount() int { return len(fake.pingArgsForCall) } +func (fake *FakeStorage) PingCalls(stub func() error) { + fake.pingMutex.Lock() + defer fake.pingMutex.Unlock() + fake.PingStub = stub +} + func (fake *FakeStorage) PingReturns(result1 error) { + fake.pingMutex.Lock() + defer fake.pingMutex.Unlock() fake.PingStub = nil fake.pingReturns = struct { result1 error @@ -201,6 +432,8 @@ func (fake *FakeStorage) PingReturns(result1 error) { } func (fake *FakeStorage) PingReturnsOnCall(i int, result1 error) { + fake.pingMutex.Lock() + defer fake.pingMutex.Unlock() fake.PingStub = nil if fake.pingReturnsOnCall == nil { fake.pingReturnsOnCall = make(map[int]struct { @@ -212,50 +445,11 @@ func (fake *FakeStorage) PingReturnsOnCall(i int, result1 error) { }{result1} } -func (fake *FakeStorage) Broker() storage.Broker { - fake.brokerMutex.Lock() - ret, specificReturn := fake.brokerReturnsOnCall[len(fake.brokerArgsForCall)] - fake.brokerArgsForCall = append(fake.brokerArgsForCall, struct{}{}) - fake.recordInvocation("Broker", []interface{}{}) - fake.brokerMutex.Unlock() - if fake.BrokerStub != nil { - return fake.BrokerStub() - } - if specificReturn { - return ret.result1 - } - return fake.brokerReturns.result1 -} - -func (fake *FakeStorage) BrokerCallCount() int { - fake.brokerMutex.RLock() - defer fake.brokerMutex.RUnlock() - return len(fake.brokerArgsForCall) -} - -func (fake *FakeStorage) BrokerReturns(result1 storage.Broker) { - fake.BrokerStub = nil - fake.brokerReturns = struct { - result1 storage.Broker - }{result1} -} - -func (fake *FakeStorage) BrokerReturnsOnCall(i int, result1 storage.Broker) { - fake.BrokerStub = nil - if fake.brokerReturnsOnCall == nil { - fake.brokerReturnsOnCall = make(map[int]struct { - result1 storage.Broker - }) - } - fake.brokerReturnsOnCall[i] = struct { - result1 storage.Broker - }{result1} -} - func (fake *FakeStorage) Platform() storage.Platform { fake.platformMutex.Lock() ret, specificReturn := fake.platformReturnsOnCall[len(fake.platformArgsForCall)] - fake.platformArgsForCall = append(fake.platformArgsForCall, struct{}{}) + fake.platformArgsForCall = append(fake.platformArgsForCall, struct { + }{}) fake.recordInvocation("Platform", []interface{}{}) fake.platformMutex.Unlock() if fake.PlatformStub != nil { @@ -264,7 +458,8 @@ func (fake *FakeStorage) Platform() storage.Platform { if specificReturn { return ret.result1 } - return fake.platformReturns.result1 + fakeReturns := fake.platformReturns + return fakeReturns.result1 } func (fake *FakeStorage) PlatformCallCount() int { @@ -273,7 +468,15 @@ func (fake *FakeStorage) PlatformCallCount() int { return len(fake.platformArgsForCall) } +func (fake *FakeStorage) PlatformCalls(stub func() storage.Platform) { + fake.platformMutex.Lock() + defer fake.platformMutex.Unlock() + fake.PlatformStub = stub +} + func (fake *FakeStorage) PlatformReturns(result1 storage.Platform) { + fake.platformMutex.Lock() + defer fake.platformMutex.Unlock() fake.PlatformStub = nil fake.platformReturns = struct { result1 storage.Platform @@ -281,6 +484,8 @@ func (fake *FakeStorage) PlatformReturns(result1 storage.Platform) { } func (fake *FakeStorage) PlatformReturnsOnCall(i int, result1 storage.Platform) { + fake.platformMutex.Lock() + defer fake.platformMutex.Unlock() fake.PlatformStub = nil if fake.platformReturnsOnCall == nil { fake.platformReturnsOnCall = make(map[int]struct { @@ -292,50 +497,11 @@ func (fake *FakeStorage) PlatformReturnsOnCall(i int, result1 storage.Platform) }{result1} } -func (fake *FakeStorage) Credentials() storage.Credentials { - fake.credentialsMutex.Lock() - ret, specificReturn := fake.credentialsReturnsOnCall[len(fake.credentialsArgsForCall)] - fake.credentialsArgsForCall = append(fake.credentialsArgsForCall, struct{}{}) - fake.recordInvocation("Credentials", []interface{}{}) - fake.credentialsMutex.Unlock() - if fake.CredentialsStub != nil { - return fake.CredentialsStub() - } - if specificReturn { - return ret.result1 - } - return fake.credentialsReturns.result1 -} - -func (fake *FakeStorage) CredentialsCallCount() int { - fake.credentialsMutex.RLock() - defer fake.credentialsMutex.RUnlock() - return len(fake.credentialsArgsForCall) -} - -func (fake *FakeStorage) CredentialsReturns(result1 storage.Credentials) { - fake.CredentialsStub = nil - fake.credentialsReturns = struct { - result1 storage.Credentials - }{result1} -} - -func (fake *FakeStorage) CredentialsReturnsOnCall(i int, result1 storage.Credentials) { - fake.CredentialsStub = nil - if fake.credentialsReturnsOnCall == nil { - fake.credentialsReturnsOnCall = make(map[int]struct { - result1 storage.Credentials - }) - } - fake.credentialsReturnsOnCall[i] = struct { - result1 storage.Credentials - }{result1} -} - func (fake *FakeStorage) Security() storage.Security { fake.securityMutex.Lock() ret, specificReturn := fake.securityReturnsOnCall[len(fake.securityArgsForCall)] - fake.securityArgsForCall = append(fake.securityArgsForCall, struct{}{}) + fake.securityArgsForCall = append(fake.securityArgsForCall, struct { + }{}) fake.recordInvocation("Security", []interface{}{}) fake.securityMutex.Unlock() if fake.SecurityStub != nil { @@ -344,7 +510,8 @@ func (fake *FakeStorage) Security() storage.Security { if specificReturn { return ret.result1 } - return fake.securityReturns.result1 + fakeReturns := fake.securityReturns + return fakeReturns.result1 } func (fake *FakeStorage) SecurityCallCount() int { @@ -353,7 +520,15 @@ func (fake *FakeStorage) SecurityCallCount() int { return len(fake.securityArgsForCall) } +func (fake *FakeStorage) SecurityCalls(stub func() storage.Security) { + fake.securityMutex.Lock() + defer fake.securityMutex.Unlock() + fake.SecurityStub = stub +} + func (fake *FakeStorage) SecurityReturns(result1 storage.Security) { + fake.securityMutex.Lock() + defer fake.securityMutex.Unlock() fake.SecurityStub = nil fake.securityReturns = struct { result1 storage.Security @@ -361,6 +536,8 @@ func (fake *FakeStorage) SecurityReturns(result1 storage.Security) { } func (fake *FakeStorage) SecurityReturnsOnCall(i int, result1 storage.Security) { + fake.securityMutex.Lock() + defer fake.securityMutex.Unlock() fake.SecurityStub = nil if fake.securityReturnsOnCall == nil { fake.securityReturnsOnCall = make(map[int]struct { @@ -372,23 +549,133 @@ func (fake *FakeStorage) SecurityReturnsOnCall(i int, result1 storage.Security) }{result1} } +func (fake *FakeStorage) ServiceOffering() storage.ServiceOffering { + fake.serviceOfferingMutex.Lock() + ret, specificReturn := fake.serviceOfferingReturnsOnCall[len(fake.serviceOfferingArgsForCall)] + fake.serviceOfferingArgsForCall = append(fake.serviceOfferingArgsForCall, struct { + }{}) + fake.recordInvocation("ServiceOffering", []interface{}{}) + fake.serviceOfferingMutex.Unlock() + if fake.ServiceOfferingStub != nil { + return fake.ServiceOfferingStub() + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.serviceOfferingReturns + return fakeReturns.result1 +} + +func (fake *FakeStorage) ServiceOfferingCallCount() int { + fake.serviceOfferingMutex.RLock() + defer fake.serviceOfferingMutex.RUnlock() + return len(fake.serviceOfferingArgsForCall) +} + +func (fake *FakeStorage) ServiceOfferingCalls(stub func() storage.ServiceOffering) { + fake.serviceOfferingMutex.Lock() + defer fake.serviceOfferingMutex.Unlock() + fake.ServiceOfferingStub = stub +} + +func (fake *FakeStorage) ServiceOfferingReturns(result1 storage.ServiceOffering) { + fake.serviceOfferingMutex.Lock() + defer fake.serviceOfferingMutex.Unlock() + fake.ServiceOfferingStub = nil + fake.serviceOfferingReturns = struct { + result1 storage.ServiceOffering + }{result1} +} + +func (fake *FakeStorage) ServiceOfferingReturnsOnCall(i int, result1 storage.ServiceOffering) { + fake.serviceOfferingMutex.Lock() + defer fake.serviceOfferingMutex.Unlock() + fake.ServiceOfferingStub = nil + if fake.serviceOfferingReturnsOnCall == nil { + fake.serviceOfferingReturnsOnCall = make(map[int]struct { + result1 storage.ServiceOffering + }) + } + fake.serviceOfferingReturnsOnCall[i] = struct { + result1 storage.ServiceOffering + }{result1} +} + +func (fake *FakeStorage) ServicePlan() storage.ServicePlan { + fake.servicePlanMutex.Lock() + ret, specificReturn := fake.servicePlanReturnsOnCall[len(fake.servicePlanArgsForCall)] + fake.servicePlanArgsForCall = append(fake.servicePlanArgsForCall, struct { + }{}) + fake.recordInvocation("ServicePlan", []interface{}{}) + fake.servicePlanMutex.Unlock() + if fake.ServicePlanStub != nil { + return fake.ServicePlanStub() + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.servicePlanReturns + return fakeReturns.result1 +} + +func (fake *FakeStorage) ServicePlanCallCount() int { + fake.servicePlanMutex.RLock() + defer fake.servicePlanMutex.RUnlock() + return len(fake.servicePlanArgsForCall) +} + +func (fake *FakeStorage) ServicePlanCalls(stub func() storage.ServicePlan) { + fake.servicePlanMutex.Lock() + defer fake.servicePlanMutex.Unlock() + fake.ServicePlanStub = stub +} + +func (fake *FakeStorage) ServicePlanReturns(result1 storage.ServicePlan) { + fake.servicePlanMutex.Lock() + defer fake.servicePlanMutex.Unlock() + fake.ServicePlanStub = nil + fake.servicePlanReturns = struct { + result1 storage.ServicePlan + }{result1} +} + +func (fake *FakeStorage) ServicePlanReturnsOnCall(i int, result1 storage.ServicePlan) { + fake.servicePlanMutex.Lock() + defer fake.servicePlanMutex.Unlock() + fake.ServicePlanStub = nil + if fake.servicePlanReturnsOnCall == nil { + fake.servicePlanReturnsOnCall = make(map[int]struct { + result1 storage.ServicePlan + }) + } + fake.servicePlanReturnsOnCall[i] = struct { + result1 storage.ServicePlan + }{result1} +} + func (fake *FakeStorage) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() - fake.openMutex.RLock() - defer fake.openMutex.RUnlock() + fake.brokerMutex.RLock() + defer fake.brokerMutex.RUnlock() fake.closeMutex.RLock() defer fake.closeMutex.RUnlock() + fake.credentialsMutex.RLock() + defer fake.credentialsMutex.RUnlock() + fake.inTransactionMutex.RLock() + defer fake.inTransactionMutex.RUnlock() + fake.openMutex.RLock() + defer fake.openMutex.RUnlock() fake.pingMutex.RLock() defer fake.pingMutex.RUnlock() - fake.brokerMutex.RLock() - defer fake.brokerMutex.RUnlock() fake.platformMutex.RLock() defer fake.platformMutex.RUnlock() - fake.credentialsMutex.RLock() - defer fake.credentialsMutex.RUnlock() fake.securityMutex.RLock() defer fake.securityMutex.RUnlock() + fake.serviceOfferingMutex.RLock() + defer fake.serviceOfferingMutex.RUnlock() + fake.servicePlanMutex.RLock() + defer fake.servicePlanMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value diff --git a/vendor/github.com/Peripli/service-manager/test/auth_test/auth_test.go b/vendor/github.com/Peripli/service-manager/test/auth_test/auth_test.go index 5b6d4ece..ceea789e 100644 --- a/vendor/github.com/Peripli/service-manager/test/auth_test/auth_test.go +++ b/vendor/github.com/Peripli/service-manager/test/auth_test/auth_test.go @@ -18,7 +18,6 @@ package auth_test import ( "net/http" - "os" "testing" "github.com/Peripli/service-manager/test/common" @@ -48,7 +47,6 @@ var _ = Describe("Service Manager Authentication", func() { ) BeforeSuite(func() { - os.Chdir("../..") ctx = common.NewTestContext(nil) }) @@ -68,18 +66,6 @@ var _ = Describe("Service Manager Authentication", func() { Expect(). Status(http.StatusUnauthorized). JSON().Object().Keys().Contains("error", "description") - - code := http.StatusOK - catalogResponse := []byte(common.Catalog) - brokerServer := common.FakeBrokerServer(&code, &catalogResponse) - defer brokerServer.Close() - - brokerJSON := common.MakeBroker("broker-id", brokerServer.URL(), "") - ctx.SMWithOAuth.POST("/v1/service_brokers"). - WithHeader("Content-type", "application/json"). - WithJSON(brokerJSON). - Expect(). - Status(http.StatusCreated) }) }) @@ -157,6 +143,28 @@ var _ = Describe("Service Manager Authentication", func() { {"Invalid authorization schema", "DELETE", "/v1/osb/999/v2/service_instances/111/service_bindings/222", "Basic abc"}, {"Missing token in authorization header", "DELETE", "/v1/osb/999/v2/service_instances/111/service_bindings/222", "Bearer "}, {"Invalid token in authorization header", "DELETE", "/v1/osb/999/v2/service_instances/111/service_bindings/222", "Bearer abc"}, + + // SERVICE OFFERINGS + {"Missing authorization header", "GET", "/v1/service_offerings/999", ""}, + {"Invalid basic credentials", "GET", "/v1/service_offerings/999", "Basic abc"}, + {"Missing token in authorization header", "GET", "/v1/service_offerings/999", "Bearer "}, + {"Invalid token in authorization header", "GET", "/v1/service_offerings/999", "Bearer abc"}, + + {"Missing authorization header", "GET", "/v1/service_offerings", ""}, + {"Invalid basic credentials", "GET", "/v1/service_offerings", "Basic abc"}, + {"Missing token in authorization header", "GET", "/v1/service_offerings", "Bearer "}, + {"Invalid token in authorization header", "GET", "/v1/service_offerings", "Bearer abc"}, + + // SERVICE PLANS + {"Missing authorization header", "GET", "/v1/service_plans/999", ""}, + {"Invalid basic credentials", "GET", "/v1/service_plans/999", "Basic abc"}, + {"Missing token in authorization header", "GET", "/v1/service_plans/999", "Bearer "}, + {"Invalid token in authorization header", "GET", "/v1/service_plans/999", "Bearer abc"}, + + {"Missing authorization header", "GET", "/v1/service_plans", ""}, + {"Invalid basic credentials", "GET", "/v1/service_plans", "Basic abc"}, + {"Missing token in authorization header", "GET", "/v1/service_plans", "Bearer "}, + {"Invalid token in authorization header", "GET", "/v1/service_plans", "Bearer abc"}, } for _, request := range authRequests { diff --git a/vendor/github.com/Peripli/service-manager/test/broker_test/broker_test.go b/vendor/github.com/Peripli/service-manager/test/broker_test/broker_test.go index 94be50b9..1908782f 100644 --- a/vendor/github.com/Peripli/service-manager/test/broker_test/broker_test.go +++ b/vendor/github.com/Peripli/service-manager/test/broker_test/broker_test.go @@ -17,16 +17,16 @@ package broker_test import ( "net/http" - "os" "strings" "testing" - "encoding/json" + "github.com/tidwall/gjson" + + "github.com/tidwall/sjson" "github.com/Peripli/service-manager/test/common" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/onsi/gomega/ghttp" "github.com/spf13/cast" ) @@ -39,46 +39,44 @@ var _ = Describe("Service Manager Broker API", func() { var ( ctx *common.TestContext - brokerServer *ghttp.Server - - testBroker common.Object - expectedBroker common.Object + brokerServer *common.BrokerServer - catalogResponse []byte - code int + brokerServerJSON common.Object + expectedBrokerResponse common.Object ) BeforeSuite(func() { - os.Chdir("../..") - + brokerServer = common.NewBrokerServer() ctx = common.NewTestContext(nil) }) AfterSuite(func() { ctx.Cleanup() + if brokerServer != nil { + brokerServer.Close() + } }) BeforeEach(func() { - code = http.StatusOK - catalogResponse = []byte(common.Catalog) - brokerServer = common.FakeBrokerServer(&code, &catalogResponse) - - testBroker = common.Object{ - "name": "name", - "broker_url": brokerServer.URL(), - "description": "description", + brokerServer.Reset() + brokerName := "brokerName" + brokerDescription := "description" + + brokerServerJSON = common.Object{ + "name": brokerName, + "broker_url": brokerServer.URL, + "description": brokerDescription, "credentials": common.Object{ "basic": common.Object{ - "username": "buser", - "password": "bpass", + "username": brokerServer.Username, + "password": brokerServer.Password, }, }, } - - expectedBroker = common.Object{ - "name": "name", - "broker_url": brokerServer.URL(), - "description": "description", + expectedBrokerResponse = common.Object{ + "name": brokerName, + "broker_url": brokerServer.URL, + "description": brokerDescription, } common.RemoveAllBrokers(ctx.SMWithOAuth) }) @@ -87,16 +85,12 @@ var _ = Describe("Service Manager Broker API", func() { var id string AfterEach(func() { - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) Context("when the broker does not exist", func() { - BeforeEach(func() { - id = "12345" - }) - It("returns 404", func() { - ctx.SMWithOAuth.GET("/v1/service_brokers/"+id). + ctx.SMWithOAuth.GET("/v1/service_brokers/12345"). Expect(). Status(http.StatusNotFound). JSON().Object(). @@ -106,16 +100,16 @@ var _ = Describe("Service Manager Broker API", func() { Context("when the broker exists", func() { BeforeEach(func() { - reply := ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + reply := ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated). JSON().Object(). - ContainsMap(expectedBroker) + ContainsMap(expectedBrokerResponse) id = reply.Value("id").String().Raw() - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) - common.ClearReceivedRequests(&code, &catalogResponse, brokerServer) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + brokerServer.ResetCallHistory() }) It("returns the broker with given id", func() { @@ -123,15 +117,15 @@ var _ = Describe("Service Manager Broker API", func() { Expect(). Status(http.StatusOK). JSON().Object(). - ContainsMap(expectedBroker). - Keys().NotContains("credentials", "catalog") + ContainsMap(expectedBrokerResponse). + Keys().NotContains("credentials", "services") }) }) }) - Describe("GET All", func() { + Describe("List", func() { AfterEach(func() { - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) Context("when no brokers exist", func() { @@ -146,16 +140,16 @@ var _ = Describe("Service Manager Broker API", func() { Context("when brokers exist", func() { BeforeEach(func() { - ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated). JSON().Object(). - ContainsMap(expectedBroker). + ContainsMap(expectedBrokerResponse). Keys(). - NotContains("credentials", "catalog") + NotContains("credentials", "services") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) - common.ClearReceivedRequests(&code, &catalogResponse, brokerServer) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + brokerServer.ResetCallHistory() }) It("returns all without catalog if no query parameter is provided", func() { @@ -163,9 +157,9 @@ var _ = Describe("Service Manager Broker API", func() { Expect(). Status(http.StatusOK). JSON().Object().Value("brokers").Array().First().Object(). - ContainsMap(expectedBroker). + ContainsMap(expectedBrokerResponse). Keys(). - NotContains("credentials", "catalog") + NotContains("credentials", "services") }) It("returns all with catalog if query parameter is provided", func() { @@ -173,8 +167,18 @@ var _ = Describe("Service Manager Broker API", func() { Expect(). Status(http.StatusOK). JSON().Object().Value("brokers").Array().First().Object(). - ContainsMap(expectedBroker). - ContainsKey("catalog"). + ContainsMap(expectedBrokerResponse). + ContainsKey("services"). + NotContainsKey("credentials") + }) + + It("is accessible with basic authentication", func() { + ctx.SMWithBasic.GET("/v1/service_brokers").WithQuery("catalog", true). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("brokers").Array().First().Object(). + ContainsMap(expectedBrokerResponse). + ContainsKey("services"). NotContainsKey("credentials") }) }) @@ -189,7 +193,7 @@ var _ = Describe("Service Manager Broker API", func() { JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) }) @@ -203,43 +207,43 @@ var _ = Describe("Service Manager Broker API", func() { JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) }) Context("when a request body field is missing", func() { assertPOSTReturns400WhenFieldIsMissing := func(field string) { BeforeEach(func() { - delete(testBroker, field) - delete(expectedBroker, field) + delete(brokerServerJSON, field) + delete(expectedBrokerResponse, field) }) It("returns 400", func() { - ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusBadRequest). JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) } assertPOSTReturns201WhenFieldIsMissing := func(field string) { BeforeEach(func() { - delete(testBroker, field) - delete(expectedBroker, field) + delete(brokerServerJSON, field) + delete(expectedBrokerResponse, field) }) It("returns 201", func() { - ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated). JSON().Object(). - ContainsMap(expectedBroker). - Keys().NotContains("catalog", "credentials") + ContainsMap(expectedBrokerResponse). + Keys().NotContains("services", "credentials") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) }) } @@ -263,38 +267,40 @@ var _ = Describe("Service Manager Broker API", func() { Context("when fetching catalog fails", func() { BeforeEach(func() { - code = http.StatusInternalServerError + brokerServer.CatalogHandler = func(w http.ResponseWriter, req *http.Request) { + common.SetResponse(w, http.StatusInternalServerError, common.Object{}) + } }) It("returns an error", func() { ctx.SMWithOAuth.POST("/v1/service_brokers"). - WithJSON(testBroker). + WithJSON(brokerServerJSON). Expect().Status(http.StatusInternalServerError). JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) }) }) Context("when request is successful", func() { assertPOSTReturns201 := func() { It("returns 201", func() { - ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated). JSON().Object(). - ContainsMap(expectedBroker). - Keys().NotContains("catalog", "credentials") + ContainsMap(expectedBrokerResponse). + Keys().NotContains("services", "credentials") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) }) } Context("when broker URL does not end with trailing slash", func() { BeforeEach(func() { - testBroker["broker_url"] = strings.TrimRight(cast.ToString(testBroker["broker_url"]), "/") - expectedBroker["broker_url"] = strings.TrimRight(cast.ToString(expectedBroker["broker_url"]), "/") + brokerServerJSON["broker_url"] = strings.TrimRight(cast.ToString(brokerServerJSON["broker_url"]), "/") + expectedBrokerResponse["broker_url"] = strings.TrimRight(cast.ToString(expectedBrokerResponse["broker_url"]), "/") }) assertPOSTReturns201() @@ -302,67 +308,63 @@ var _ = Describe("Service Manager Broker API", func() { Context("when broker URL ends with trailing slash", func() { BeforeEach(func() { - testBroker["broker_url"] = cast.ToString(testBroker["broker_url"]) + "/" - expectedBroker["broker_url"] = cast.ToString(expectedBroker["broker_url"]) + "/" + brokerServerJSON["broker_url"] = cast.ToString(brokerServerJSON["broker_url"]) + "/" + expectedBrokerResponse["broker_url"] = cast.ToString(expectedBrokerResponse["broker_url"]) + "/" }) assertPOSTReturns201() }) }) - Context("When broker with name already exists", func() { + Context("when broker with name already exists", func() { It("returns 409", func() { - ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated) - ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusConflict). JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 2) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 2) }) }) }) Describe("PATCH", func() { - var id string + var brokerID string BeforeEach(func() { - reply := ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + reply := ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated). JSON().Object(). - ContainsMap(expectedBroker) + ContainsMap(expectedBrokerResponse) - id = reply.Value("id").String().Raw() + brokerID = reply.Value("id").String().Raw() - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) - common.ClearReceivedRequests(&code, &catalogResponse, brokerServer) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + brokerServer.ResetCallHistory() }) Context("when content type is not JSON", func() { It("returns 415", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). WithText("text"). Expect().Status(http.StatusUnsupportedMediaType). JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) }) Context("when broker is missing", func() { - BeforeEach(func() { - id = "invalid_id" - }) - It("returns 404", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). - WithJSON(testBroker). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/no_such_id"). + WithJSON(brokerServerJSON). Expect().Status(http.StatusNotFound). JSON().Object(). Keys().Contains("error", "description") @@ -371,7 +373,7 @@ var _ = Describe("Service Manager Broker API", func() { Context("when request body is not valid JSON", func() { It("returns 400", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). WithText("invalid json"). WithHeader("content-type", "application/json"). Expect(). @@ -383,7 +385,7 @@ var _ = Describe("Service Manager Broker API", func() { Context("when request body contains invalid credentials", func() { It("returns 400", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). WithJSON(common.Object{"credentials": "123"}). Expect(). Status(http.StatusBadRequest). @@ -394,7 +396,7 @@ var _ = Describe("Service Manager Broker API", func() { Context("when request body contains incomplete credentials", func() { It("returns 400", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). WithJSON(common.Object{"credentials": common.Object{"basic": common.Object{"password": ""}}}). Expect(). Status(http.StatusBadRequest). @@ -405,240 +407,438 @@ var _ = Describe("Service Manager Broker API", func() { Context("when broker with the name already exists", func() { var anotherTestBroker common.Object - var anotherBrokerServer *ghttp.Server + var anotherBrokerServer *common.BrokerServer BeforeEach(func() { - anotherBrokerServer = common.FakeBrokerServer(&code, &catalogResponse) - + anotherBrokerServer = common.NewBrokerServer() + anotherBrokerServer.Username = "username" + anotherBrokerServer.Password = "password" anotherTestBroker = common.Object{ "name": "another_name", - "broker_url": anotherBrokerServer.URL(), + "broker_url": anotherBrokerServer.URL, "description": "another_description", "credentials": common.Object{ "basic": common.Object{ - "username": "buser", - "password": "bpass", + "username": anotherBrokerServer.Username, + "password": anotherBrokerServer.Password, }, }, } }) + AfterEach(func() { + if anotherBrokerServer != nil { + anotherBrokerServer.Close() + } + }) + It("returns 409", func() { ctx.SMWithOAuth.POST("/v1/service_brokers"). WithJSON(anotherTestBroker). Expect(). Status(http.StatusCreated) - common.VerifyBrokerCatalogEndpointInvoked(anotherBrokerServer, 1) + assertInvocationCount(anotherBrokerServer.CatalogEndpointRequests, 1) - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). WithJSON(anotherTestBroker). Expect().Status(http.StatusConflict). JSON().Object(). Keys().Contains("error", "description") - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) }) - Context("when updatable fields are being updated", func() { + Context("when credentials are updated", func() { + It("returns 200", func() { + brokerServer.Username = "updatedUsername" + brokerServer.Password = "updatedPassword" + updatedCredentials := common.Object{ + "credentials": common.Object{ + "basic": common.Object{ + "username": brokerServer.Username, + "password": brokerServer.Password, + }, + }, + } + reply := ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(updatedCredentials). + Expect(). + Status(http.StatusOK). + JSON().Object() + + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + + reply = ctx.SMWithOAuth.GET("/v1/service_brokers/" + brokerID). + Expect(). + Status(http.StatusOK). + JSON().Object() + reply.ContainsMap(expectedBrokerResponse) + }) + }) + + Context("when created_at provided in body", func() { + It("should not change created_at", func() { + createdAt := "2015-01-01T00:00:00Z" + + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). + WithJSON(common.Object{"created_at": createdAt}). + Expect(). + Status(http.StatusOK).JSON().Object(). + ContainsKey("created_at"). + ValueNotEqual("created_at", createdAt) + + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + + ctx.SMWithOAuth.GET("/v1/service_brokers/"+brokerID). + Expect(). + Status(http.StatusOK).JSON().Object(). + ContainsKey("created_at"). + ValueNotEqual("created_at", createdAt) + }) + }) + + Context("when new broker server is available", func() { var ( - updatedBrokerServer *ghttp.Server - updatedBroker common.Object - expectedUpdatedBroker common.Object + updatedBrokerServer *common.BrokerServer + updatedBrokerJSON common.Object + expectedUpdatedBrokerResponse common.Object ) BeforeEach(func() { - updatedBrokerServer = common.FakeBrokerServer(&code, &catalogResponse) - - updatedBroker = common.Object{ + updatedBrokerServer = common.NewBrokerServer() + updatedBrokerServer.Username = "updated_user" + updatedBrokerServer.Password = "updated_password" + updatedBrokerJSON = common.Object{ "name": "updated_name", "description": "updated_description", - "broker_url": updatedBrokerServer.URL(), + "broker_url": updatedBrokerServer.URL, "credentials": common.Object{ "basic": common.Object{ - "username": "updated_user", - "password": "updated_password", + "username": updatedBrokerServer.Username, + "password": updatedBrokerServer.Password, }, }, } - expectedUpdatedBroker = common.Object{ - "name": updatedBroker["name"], - "description": updatedBroker["description"], - "broker_url": updatedBroker["broker_url"], + expectedUpdatedBrokerResponse = common.Object{ + "name": updatedBrokerJSON["name"], + "description": updatedBrokerJSON["description"], + "broker_url": updatedBrokerJSON["broker_url"], } }) - Context("when created_at provided in body", func() { - It("should not change created_at", func() { - createdAt := "2015-01-01T00:00:00Z" + AfterEach(func() { + if updatedBrokerServer != nil { + updatedBrokerServer.Close() + } + }) - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). - WithJSON(common.Object{"created_at": createdAt}). + Context("when all updatable fields are updated at once", func() { + It("returns 200", func() { + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). + WithJSON(updatedBrokerJSON). Expect(). - Status(http.StatusOK).JSON().Object(). - ContainsKey("created_at"). - ValueNotEqual("created_at", createdAt) + Status(http.StatusOK). + JSON().Object(). + ContainsMap(expectedUpdatedBrokerResponse). + Keys().NotContains("services", "credentials") + + assertInvocationCount(updatedBrokerServer.CatalogEndpointRequests, 1) - ctx.SMWithOAuth.GET("/v1/service_brokers/"+id). + ctx.SMWithOAuth.GET("/v1/service_brokers/"+brokerID). Expect(). - Status(http.StatusOK).JSON().Object(). - ContainsKey("created_at"). - ValueNotEqual("created_at", createdAt) + Status(http.StatusOK). + JSON().Object(). + ContainsMap(expectedUpdatedBrokerResponse). + Keys().NotContains("services", "credentials") }) }) - Context("when all updatable fields are updated at once", func() { + Context("when broker_url is changed and the credentials are correct", func() { It("returns 200", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+id). - WithJSON(updatedBroker). + updatedBrokerJSON := common.Object{ + "broker_url": updatedBrokerServer.URL, + } + updatedBrokerServer.Username = brokerServer.Username + updatedBrokerServer.Password = brokerServer.Password + + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). + WithJSON(updatedBrokerJSON). Expect(). Status(http.StatusOK). JSON().Object(). - ContainsMap(expectedUpdatedBroker). - Keys().NotContains("catalog", "credentials") + ContainsMap(updatedBrokerJSON). + Keys().NotContains("services", "credentials") + + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) + assertInvocationCount(updatedBrokerServer.CatalogEndpointRequests, 1) - ctx.SMWithOAuth.GET("/v1/service_brokers/"+id). + ctx.SMWithOAuth.GET("/v1/service_brokers/"+brokerID). Expect(). Status(http.StatusOK). JSON().Object(). - ContainsMap(expectedUpdatedBroker). - Keys().NotContains("catalog", "credentials") - - common.VerifyBrokerCatalogEndpointInvoked(updatedBrokerServer, 1) + ContainsMap(updatedBrokerJSON). + Keys().NotContains("services", "credentials") }) }) - Context("when updatable fields are separately updated", func() { - It("returns 200", func() { - for prop, val := range updatedBroker { - update := common.Object{} - update[prop] = val - - reply := ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + id). - WithJSON(update). - Expect(). - Status(http.StatusOK). - JSON().Object() - if strings.ToLower(prop) != "credentials" { - reply.ContainsMap(update) - } - - reply = ctx.SMWithOAuth.GET("/v1/service_brokers/" + id). - Expect(). - Status(http.StatusOK). - JSON().Object() - if strings.ToLower(prop) != "credentials" { - reply.ContainsMap(update) - } + Context("when broker_url is changed but the credentials are wrong", func() { + It("returns 500", func() { + updatedBrokerJSON := common.Object{ + "broker_url": updatedBrokerServer.URL, } + ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(updatedBrokerJSON). + Expect(). + Status(http.StatusInternalServerError) - Expect(len(brokerServer.ReceivedRequests()) + len(updatedBrokerServer.ReceivedRequests())).To(Equal(len(updatedBroker))) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) + ctx.SMWithOAuth.GET("/v1/service_brokers/"+brokerID). + Expect(). + Status(http.StatusOK). + JSON().Object(). + ContainsMap(expectedBrokerResponse). + Keys().NotContains("services", "credentials") }) }) + }) + for _, prop := range []string{"name", "description"} { + Context("when only '"+prop+"' is updated", func() { + It("returns 200", func() { + updatedBrokerJSON := common.Object{} + updatedBrokerJSON[prop] = "updated" + ctx.SMWithOAuth.PATCH("/v1/service_brokers/"+brokerID). + WithJSON(updatedBrokerJSON). + Expect(). + Status(http.StatusOK). + JSON().Object(). + ContainsMap(updatedBrokerJSON). + Keys().NotContains("services", "credentials") + + ctx.SMWithOAuth.GET("/v1/service_brokers/"+brokerID). + Expect(). + Status(http.StatusOK). + JSON().Object(). + ContainsMap(updatedBrokerJSON). + Keys().NotContains("services", "credentials") + + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + }) + }) + } + Context("when not updatable fields are provided in the request body", func() { Context("when broker id is provided in request body", func() { It("should not create the broker", func() { - testBroker = common.Object{"id": "123"} - ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + id). - WithJSON(testBroker). + brokerServerJSON = common.Object{"id": "123"} + ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(brokerServerJSON). Expect(). Status(http.StatusOK). JSON().Object(). - NotContainsMap(testBroker) + NotContainsMap(brokerServerJSON) ctx.SMWithOAuth.GET("/v1/service_brokers/123"). Expect(). Status(http.StatusNotFound) - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) }) }) - Context("when unmodifiable fields are provided request body", func() { - var ( - unmarshaledCatalog common.Object - ) - + Context("when unmodifiable fields are provided in the request body", func() { BeforeEach(func() { - testBroker = common.Object{ + brokerServerJSON = common.Object{ "created_at": "2016-06-08T16:41:26Z", "updated_at": "2016-06-08T16:41:26Z", - "credentials": common.Object{ - "basic": common.Object{ - "username": "updated_user", - "password": "updated_password", - }, - }, - "catalog": common.Object{}, + "services": common.Array{common.Object{"name": "serviceName"}}, } - - unmarshaledCatalog = common.Object{} - json.Unmarshal([]byte(common.Catalog), &unmarshaledCatalog) }) It("should not change them", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + id). - WithJSON(testBroker). + ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(brokerServerJSON). Expect(). Status(http.StatusOK). JSON().Object(). - NotContainsMap(testBroker) + NotContainsMap(brokerServerJSON) ctx.SMWithOAuth.GET("/v1/service_brokers"). - WithQuery("catalog", true). Expect(). Status(http.StatusOK). JSON().Object().Value("brokers").Array().First().Object(). - ContainsMap(expectedBroker). - Value("catalog").Equal(unmarshaledCatalog) + ContainsMap(expectedBrokerResponse) - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) }) }) }) - Context("when underlying broker catalog is modified", func() { - var ( - err error - updatedCatalog common.Object - ) + Context("when the broker catalog is modified", func() { + Context("when an existing service offering is removed", func() { + var serviceOfferingID string - BeforeEach(func() { - updatedCatalog = common.Object{ - "services": []interface{}{}, - } + BeforeEach(func() { + catalogServiceID := gjson.Get(common.Catalog, "services.0.id").Str + Expect(catalogServiceID).ToNot(BeEmpty()) + + serviceOfferings := ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array().Iter() + + for _, so := range serviceOfferings { + sbID := so.Object().Value("broker_id").String().Raw() + Expect(catalogServiceID).ToNot(BeEmpty()) + + catalogID := so.Object().Value("catalog_id").String().Raw() + Expect(catalogServiceID).ToNot(BeEmpty()) - catalogResponse, err = json.Marshal(updatedCatalog) - Expect(err).ShouldNot(HaveOccurred()) + if catalogID == catalogServiceID && sbID == brokerID { + serviceOfferingID = so.Object().Value("id").String().Raw() + Expect(catalogServiceID).ToNot(BeEmpty()) + break + } + } + s, err := sjson.Delete(common.Catalog, "services.0") + Expect(err).ShouldNot(HaveOccurred()) + brokerServer.Catalog = common.JSONToMap(s) + }) + + It("is no longer returned by the Services and Plans API", func() { + plans := ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array().Iter() + + var planIDsForService []interface{} + for _, plan := range plans { + soID := plan.Object().Value("service_offering_id").String().Raw() + Expect(soID).ToNot(BeEmpty()) + if soID == serviceOfferingID { + planID := plan.Object().Value("id").String().Raw() + Expect(soID).ToNot(BeEmpty()) + + planIDsForService = append(planIDsForService, planID) + } + } + ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(common.Object{}). + Expect(). + Status(http.StatusOK) + + ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Path("$.service_offerings[*].id").Array().NotContains(serviceOfferingID) + + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Path("$.service_plans[*].id").Array().NotContains(planIDsForService) + + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + }) }) - It("updates the catalog for the broker", func() { - ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + id). - WithJSON(common.Object{}). - Expect(). - Status(http.StatusOK) + Context("when a new service plan is added", func() { + var anotherPlanID string + var serviceOfferingID string - ctx.SMWithOAuth.GET("/v1/service_brokers"). - WithQuery("catalog", true). - Expect(). - Status(http.StatusOK). - JSON().Object().Value("brokers").Array().First().Object(). - ContainsMap(expectedBroker). - Value("catalog").Equal(updatedCatalog) + BeforeEach(func() { + anotherPlan := common.JSONToMap(common.AnotherPlan) + anotherPlanID = anotherPlan["id"].(string) + Expect(anotherPlan).ToNot(BeEmpty()) + catalogServiceID := gjson.Get(common.Catalog, "services.0.id").Str + Expect(catalogServiceID).ToNot(BeEmpty()) + + serviceOfferings := ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array().Iter() + + for _, so := range serviceOfferings { + sbID := so.Object().Value("broker_id").String().Raw() + Expect(catalogServiceID).ToNot(BeEmpty()) + + catalogID := so.Object().Value("catalog_id").String().Raw() + Expect(catalogServiceID).ToNot(BeEmpty()) + + if catalogID == catalogServiceID && sbID == brokerID { + serviceOfferingID = so.Object().Value("id").String().Raw() + Expect(catalogServiceID).ToNot(BeEmpty()) + break + } + } + s, err := sjson.Set(common.Catalog, "services.0.plans.2", anotherPlan) + Expect(err).ShouldNot(HaveOccurred()) + brokerServer.Catalog = common.JSONToMap(s) + }) + + It("is returned from the Plans API associated with the correct service offering", func() { + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON(). + Path("$.service_plans[*].catalog_id").Array().NotContains(anotherPlanID) + + ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(common.Object{}). + Expect(). + Status(http.StatusOK) + + jsonResp := ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON() + jsonResp.Path("$.service_plans[*].catalog_id").Array().Contains(anotherPlanID) + jsonResp.Path("$.service_plans[*].service_offering_id").Array().Contains(serviceOfferingID) + + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + }) + }) + + Context("when an existing service plan is removed", func() { + var removedPlanCatalogID string + + BeforeEach(func() { + removedPlanCatalogID = gjson.Get(common.Catalog, "services.0.plans.0.id").Str + Expect(removedPlanCatalogID).ToNot(BeEmpty()) + s, err := sjson.Delete(common.Catalog, "services.0.plans.0") + Expect(err).ShouldNot(HaveOccurred()) + brokerServer.Catalog = common.JSONToMap(s) + }) + + It("is no longer returned by the Plans API", func() { + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Path("$.service_plans[*].catalog_id").Array().Contains(removedPlanCatalogID) + + ctx.SMWithOAuth.PATCH("/v1/service_brokers/" + brokerID). + WithJSON(common.Object{}). + Expect(). + Status(http.StatusOK) + + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Path("$.service_plans[*].catalog_id").Array().NotContains(removedPlanCatalogID) - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + }) }) }) }) Describe("DELETE", func() { AfterEach(func() { - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 0) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 0) }) Context("when broker does not exist", func() { @@ -655,16 +855,16 @@ var _ = Describe("Service Manager Broker API", func() { var id string BeforeEach(func() { - reply := ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(testBroker). + reply := ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). Expect(). Status(http.StatusCreated). JSON().Object(). - ContainsMap(expectedBroker) + ContainsMap(expectedBrokerResponse) id = reply.Value("id").String().Raw() - common.VerifyBrokerCatalogEndpointInvoked(brokerServer, 1) - common.ClearReceivedRequests(&code, &catalogResponse, brokerServer) + assertInvocationCount(brokerServer.CatalogEndpointRequests, 1) + brokerServer.ResetCallHistory() }) It("returns 200", func() { @@ -680,6 +880,75 @@ var _ = Describe("Service Manager Broker API", func() { Expect(). Status(http.StatusNotFound) }) + + It("deletes the related service offerings", func() { + ctx.SMWithOAuth.GET("/v1/service_brokers/" + id). + Expect(). + Status(http.StatusOK) + + ctx.SMWithOAuth.DELETE("/v1/service_brokers/" + id). + Expect(). + Status(http.StatusOK).JSON().Object().Empty() + + ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON(). + Path("$.service_offerings[*].broker_id").Array().NotContains(id) + }) + + It("deletes the related service plans", func() { + ctx.SMWithOAuth.GET("/v1/service_brokers/" + id). + Expect(). + Status(http.StatusOK) + + serviceOfferings := ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array().Iter() + + serviceIDsForBroker := make([]interface{}, 0) + for _, so := range serviceOfferings { + brokerID := so.Object().Value("broker_id").String().Raw() + Expect(brokerID).ToNot(BeEmpty()) + if brokerID == id { + id := so.Object().Value("id").Raw() + Expect(id).ToNot(BeEmpty()) + serviceIDsForBroker = append(serviceIDsForBroker, id) + } + } + + plans := ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array().Iter() + + planIDsForBroker := make([]interface{}, 0) + for _, plan := range plans { + serviceIDForPlan := plan.Object().Value("service_offering_id").String().Raw() + Expect(serviceIDForPlan).ToNot(BeEmpty()) + for _, serviceIDForBroker := range serviceIDsForBroker { + if serviceIDForPlan == serviceIDForBroker { + planID := plan.Object().Value("id").String().Raw() + Expect(planID).ToNot(BeEmpty()) + planIDsForBroker = append(planIDsForBroker, planID) + } + } + } + + ctx.SMWithOAuth.DELETE("/v1/service_brokers/" + id). + Expect(). + Status(http.StatusOK).JSON().Object().Empty() + + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Path("$.service_plans[*].id").Array().NotContains(planIDsForBroker) + }) }) }) }) + +func assertInvocationCount(requests []*http.Request, invocationCount int) { + Expect(len(requests)).To(Equal(invocationCount)) +} diff --git a/vendor/github.com/Peripli/service-manager/test/common/application.yml b/vendor/github.com/Peripli/service-manager/test/common/application.yml index 0473c6f3..9fe91997 100644 --- a/vendor/github.com/Peripli/service-manager/test/common/application.yml +++ b/vendor/github.com/Peripli/service-manager/test/common/application.yml @@ -7,9 +7,9 @@ log: format: text storage: uri: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable + encryption_key: ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8 api: -# token_issuer_url: https://uaa.local.pcfdev.io + token_issuer_url: http://localhost:8080/uaa client_id: sm skip_ssl_validation: false - security: - encryption_key: ejHjRNHbS0NaqARSRvnweVV9zcmhQEa8 + diff --git a/vendor/github.com/Peripli/service-manager/test/common/broker.go b/vendor/github.com/Peripli/service-manager/test/common/broker.go index 4484c0d0..69e2dcbb 100644 --- a/vendor/github.com/Peripli/service-manager/test/common/broker.go +++ b/vendor/github.com/Peripli/service-manager/test/common/broker.go @@ -1,73 +1,400 @@ +/* + * Copyright 2018 The Service Manager 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 common import ( + "encoding/base64" "encoding/json" + "fmt" "io/ioutil" "net/http" "net/http/httptest" - "github.com/gavv/httpexpect" - . "github.com/onsi/ginkgo" + "github.com/Peripli/service-manager/pkg/util" + "github.com/gorilla/mux" ) -type Broker struct { - StatusCode int - ResponseBody []byte - Request *http.Request - RequestBody *httpexpect.Value - RawRequestBody []byte - OSBURL string - Server *httptest.Server - ID string -} - -const serviceCatalog = `{ - "services": [{ - "id": "1234", - "name": "service1", - "description": "sample-test", - "bindable": true, - "plans": [{ - "id": "plan-id", - "name": "plan-name", - "description": "plan-desc" - }] - }] -}` - -func (b *Broker) ServeHTTP(rw http.ResponseWriter, req *http.Request) { - b.Request = req - responseBody := b.ResponseBody - switch req.Method { - case http.MethodPatch, http.MethodPost, http.MethodPut: - var err error - b.RawRequestBody, err = ioutil.ReadAll(req.Body) - if err != nil { - panic(err) +var Catalog = ` +{ + "services": [{ + "name": "fake-service", + "id": "acb56d7c-XXXX-XXXX-XXXX-feb140a59a66", + "description": "A fake service.", + "tags": ["no-sql", "relational"], + "requires": ["route_forwarding"], + "bindable": true, + "instances_retrievable": true, + "bindings_retrievable": true, + "metadata": { + "provider": { + "name": "The name" + }, + "listing": { + "imageUrl": "http://example.com/cat.gif", + "blurb": "Add a blurb here", + "longDescription": "A long time ago, in a galaxy far far away..." + }, + "displayName": "The Fake Service Broker" + }, + "plan_updateable": true, + "plans": [{ + "name": "fake-plan-1", + "id": "d3031751-XXXX-XXXX-XXXX-a42377d3320e", + "description": "Shared fake Server, 5tb persistent disk, 40 max concurrent connections.", + "free": false, + "metadata": { + "max_storage_tb": 5, + "costs":[ + { + "amount":{ + "usd":99.0 + }, + "unit":"MONTHLY" + }, + { + "amount":{ + "usd":0.99 + }, + "unit":"1GB of messages over 20GB" + } + ], + "bullets": [ + "Shared fake server", + "5 TB storage", + "40 concurrent connections" + ] + }, + "schemas": { + "service_instance": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + }, + "update": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + } + }, + "service_binding": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + } + } + } + }, + { + "name": "fake-plan-2", + "id": "0f4008b5-XXXX-XXXX-XXXX-dace631cd648", + "description": "Shared fake Server, 5tb persistent disk, 40 max concurrent connections. 100 async.", + "free": false, + "metadata": { + "max_storage_tb": 5, + "costs":[ + { + "amount":{ + "usd":199.0 + }, + "unit":"MONTHLY" + }, + { + "amount":{ + "usd":0.99 + }, + "unit":"1GB of messages over 20GB" + } + ], + "bullets": [ + "40 concurrent connections" + ] + } + }] + }] +} +` + +var AnotherService = ` +{ + "name": "another-fake-service", + "id": "another7c-XXXX-XXXX-XXXX-feb140a59a66", + "description": "another description", + "tags": ["another-no-sql", "another-relational"], + "requires": ["another-route_forwarding"], + "bindable": true, + "instances_retrievable": true, + "bindings_retrievable": true, + "metadata": { + "provider": { + "name": "another name" + }, + "listing": { + "imageUrl": "http://example.com/cat.gif", + "blurb": "another blurb here", + "longDescription": "A long time ago, in a another galaxy far far away..." + }, + "displayName": "another Fake Service Broker" + }, + "plan_updateable": true, + "plans": [] + } +` + +var AnotherPlan = ` + { + "name": "another-fake-plan", + "id": "123008b5-XXXX-XXXX-XXXX-dace631cd648", + "description": "Shared fake Server, 5tb persistent disk, 40 max concurrent connections. 100 async.", + "free": false, + "metadata": { + "max_storage_tb": 5, + "costs":[ + { + "amount":{ + "usd":199.0 + }, + "unit":"MONTHLY" + }, + { + "amount":{ + "usd":0.99 + }, + "unit":"1GB of messages over 20GB" + } + ], + "bullets": [ + "40 concurrent connections" + ] + } + } +` + +type BrokerServer struct { + *httptest.Server + + CatalogHandler http.HandlerFunc // /v2/catalog + ServiceInstanceHandler http.HandlerFunc // /v2/service_instances/{instance_id} + ServiceInstanceLastOpHandler http.HandlerFunc // /v2/service_instances/{instance_id}/last_operation + BindingHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id} + BindingLastOpHandler http.HandlerFunc // /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation + + Username, Password string + Catalog interface{} + LastRequestBody []byte + LastRequest *http.Request + + CatalogEndpointRequests []*http.Request + ServiceInstanceEndpointRequests []*http.Request + ServiceInstanceLastOpEndpointRequests []*http.Request + BindingEndpointRequests []*http.Request + BindingLastOpEndpointRequests []*http.Request + + router *mux.Router +} + +func JSONToMap(j string) map[string]interface{} { + jsonMap := make(map[string]interface{}) + if err := json.Unmarshal([]byte(j), &jsonMap); err != nil { + panic(err) + } + return jsonMap +} + +func DefaultCatalog() map[string]interface{} { + return JSONToMap(Catalog) +} + +func NewBrokerServer() *BrokerServer { + brokerServer := &BrokerServer{} + brokerServer.initRouter() + brokerServer.Reset() + + brokerServer.Server = httptest.NewServer(brokerServer.router) + + return brokerServer +} + +func (b *BrokerServer) Reset() { + b.ResetProperties() + b.ResetHandlers() + b.ResetCallHistory() +} + +func (b *BrokerServer) ResetProperties() { + b.Username = "buser" + b.Password = "bpassword" + b.Catalog = DefaultCatalog() + b.LastRequestBody = []byte{} + b.LastRequest = nil +} + +func (b *BrokerServer) ResetHandlers() { + b.CatalogHandler = b.defaultCatalogHandler + b.ServiceInstanceHandler = b.defaultServiceInstanceHandler + b.ServiceInstanceLastOpHandler = b.defaultServiceInstanceLastOpHandler + b.BindingHandler = b.defaultBindingHandler + b.BindingLastOpHandler = b.defaultBindingLastOpHandler +} + +func (b *BrokerServer) ResetCallHistory() { + b.CatalogEndpointRequests = make([]*http.Request, 0) + b.ServiceInstanceEndpointRequests = make([]*http.Request, 0) + b.ServiceInstanceLastOpEndpointRequests = make([]*http.Request, 0) + b.BindingEndpointRequests = make([]*http.Request, 0) + b.BindingLastOpEndpointRequests = make([]*http.Request, 0) +} + +func (b *BrokerServer) initRouter() { + router := mux.NewRouter() + router.HandleFunc("/v2/catalog", func(rw http.ResponseWriter, req *http.Request) { + b.CatalogEndpointRequests = append(b.CatalogEndpointRequests, req) + b.CatalogHandler(rw, req) + }).Methods(http.MethodGet) + + router.HandleFunc("/v2/service_instances/{instance_id}", func(rw http.ResponseWriter, req *http.Request) { + b.ServiceInstanceEndpointRequests = append(b.ServiceInstanceEndpointRequests, req) + b.ServiceInstanceHandler(rw, req) + }).Methods(http.MethodPut, http.MethodDelete, http.MethodGet, http.MethodPatch) + + router.HandleFunc("/v2/service_instances/{instance_id}/service_bindings/{binding_id}", func(rw http.ResponseWriter, req *http.Request) { + b.BindingEndpointRequests = append(b.BindingEndpointRequests, req) + b.BindingHandler(rw, req) + }).Methods(http.MethodPut, http.MethodDelete, http.MethodGet) + + router.HandleFunc("/v2/service_instances/{instance_id}/last_operation", func(rw http.ResponseWriter, req *http.Request) { + b.ServiceInstanceLastOpEndpointRequests = append(b.ServiceInstanceLastOpEndpointRequests, req) + b.ServiceInstanceLastOpHandler(rw, req) + }).Methods(http.MethodGet) + + router.HandleFunc("/v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation", func(rw http.ResponseWriter, req *http.Request) { + b.BindingLastOpEndpointRequests = append(b.BindingLastOpEndpointRequests, req) + b.BindingLastOpHandler(rw, req) + }).Methods(http.MethodGet) + + router.Use(b.authenticationMiddleware) + router.Use(b.saveRequestMiddleware) + + b.router = router +} + +func (b *BrokerServer) authenticationMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + auth := req.Header.Get("Authorization") + if auth == "" { + w.WriteHeader(http.StatusUnauthorized) + w.Write([]byte("Missing authorization header")) + return } - var reqData interface{} - err = json.Unmarshal(b.RawRequestBody, &reqData) + const basicHeaderPrefixLength = len("Basic ") + decoded, err := base64.StdEncoding.DecodeString(auth[basicHeaderPrefixLength:]) if err != nil { - panic(err) + w.WriteHeader(http.StatusUnauthorized) + w.Write([]byte(err.Error())) + return } - b.RequestBody = httpexpect.NewValue(GinkgoT(), reqData) + if string(decoded) != fmt.Sprintf("%s:%s", b.Username, b.Password) { + w.WriteHeader(http.StatusUnauthorized) + w.Write([]byte("Credentials mismatch")) + return + } + next.ServeHTTP(w, req) + }) +} - case http.MethodGet: - if responseBody == nil && req.URL.Path == "/v2/catalog" { - responseBody = []byte(serviceCatalog) +func (b *BrokerServer) saveRequestMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + b.LastRequest = req + bodyBytes, err := ioutil.ReadAll(req.Body) + if err != nil { + SetResponse(w, http.StatusInternalServerError, Object{ + "description": "Could not read body", + "error": err.Error(), + }) + return } + b.LastRequestBody = bodyBytes + next.ServeHTTP(w, req) + }) +} + +func (b *BrokerServer) defaultCatalogHandler(rw http.ResponseWriter, req *http.Request) { + SetResponse(rw, http.StatusOK, b.Catalog) +} + +func (b *BrokerServer) defaultServiceInstanceHandler(rw http.ResponseWriter, req *http.Request) { + if req.Method == http.MethodPut { + SetResponse(rw, http.StatusCreated, Object{}) + } else { + SetResponse(rw, http.StatusOK, Object{}) } +} + +func (b *BrokerServer) defaultServiceInstanceLastOpHandler(rw http.ResponseWriter, req *http.Request) { + SetResponse(rw, http.StatusOK, Object{ + "state": "succeeded", + }) +} - code := b.StatusCode - if code == 0 { - code = http.StatusOK +func (b *BrokerServer) defaultBindingHandler(rw http.ResponseWriter, req *http.Request) { + if req.Method == http.MethodPut { + SetResponse(rw, http.StatusCreated, Object{ + "credentials": Object{ + "instance_id": mux.Vars(req)["instance_id"], + "binding_id": mux.Vars(req)["binding_id"], + }, + }) + } else { + SetResponse(rw, http.StatusOK, Object{}) } - rw.Header().Set("Content-Type", "application/json") - rw.WriteHeader(code) +} - rw.Write(responseBody) +func (b *BrokerServer) defaultBindingLastOpHandler(rw http.ResponseWriter, req *http.Request) { + SetResponse(rw, http.StatusOK, Object{ + "state": "succeeded", + }) } -func (b *Broker) Called() bool { - return b.Request != nil +func SetResponse(rw http.ResponseWriter, status int, message interface{}) { + err := util.WriteJSON(rw, status, message) + if err != nil { + rw.WriteHeader(http.StatusInternalServerError) + rw.Write([]byte(err.Error())) + } } diff --git a/vendor/github.com/Peripli/service-manager/test/common/common.go b/vendor/github.com/Peripli/service-manager/test/common/common.go index 6af98dc9..1708c9e0 100644 --- a/vendor/github.com/Peripli/service-manager/test/common/common.go +++ b/vendor/github.com/Peripli/service-manager/test/common/common.go @@ -23,11 +23,7 @@ import ( "encoding/binary" "fmt" "net/http" - "net/http/httptest" - "net/url" - "reflect" - "regexp" "strings" "bytes" @@ -36,49 +32,13 @@ import ( "github.com/Peripli/service-manager/pkg/types" "github.com/gavv/httpexpect" - "github.com/gorilla/mux" "github.com/mitchellh/mapstructure" . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/ghttp" ) type Object = map[string]interface{} type Array = []interface{} -const Catalog = `{ - "services": [ - { - "bindable": true, - "description": "service", - "id": "98418a7a-002e-4ff9-b66a-d03fc3d56b16", - "metadata": { - "displayName": "test", - "longDescription": "test" - }, - "name": "test", - "plan_updateable": false, - "plans": [ - { - "description": "test", - "free": true, - "id": "9bb3b29e-bbf9-4900-b926-2f8e9c9a3347", - "metadata": { - "bullets": [ - "Plan with basic functionality and relaxed security, excellent for development and try-out purposes" - ], - "displayName": "lite" - }, - "name": "lite" - } - ], - "tags": [ - "test" - ] - } - ] -}` - func MapContains(actual Object, expected Object) { for k, v := range expected { value, ok := actual[k] @@ -111,14 +71,14 @@ func removeAll(SM *httpexpect.Expect, entity, rootURLPath string) { } } -func RegisterBroker(brokerJSON Object, SM *httpexpect.Expect) string { +func RegisterBrokerInSM(brokerJSON Object, SM *httpexpect.Expect) string { reply := SM.POST("/v1/service_brokers"). WithJSON(brokerJSON). Expect().Status(http.StatusCreated).JSON().Object() return reply.Value("id").String().Raw() } -func RegisterPlatform(platformJSON Object, SM *httpexpect.Expect) *types.Platform { +func RegisterPlatformInSM(platformJSON Object, SM *httpexpect.Expect) *types.Platform { reply := SM.POST("/v1/platforms"). WithJSON(platformJSON). Expect().Status(http.StatusCreated).JSON().Object().Raw() @@ -127,71 +87,6 @@ func RegisterPlatform(platformJSON Object, SM *httpexpect.Expect) *types.Platfor return platform } -func setResponse(rw http.ResponseWriter, status int, message, brokerID string) { - rw.Header().Set("Content-Type", "application/json") - rw.Header().Set("X-Broker-ID", brokerID) - rw.WriteHeader(status) - rw.Write([]byte(message)) -} - -func SetupFakeServiceBrokerServerWithPrefix(brokerID, prefix string) *httptest.Server { - router := mux.NewRouter() - - router.HandleFunc(prefix+"/v2/catalog", func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusOK, Catalog, brokerID) - }) - - router.HandleFunc(prefix+"/v2/service_instances/{instance_id}", func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusCreated, "{}", brokerID) - }).Methods("PUT") - - router.HandleFunc(prefix+"/v2/service_instances/{instance_id}", func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusOK, "{}", brokerID) - }).Methods("DELETE") - - router.HandleFunc(prefix+"/v2/service_instances/{instance_id}/service_bindings/{binding_id}", func(rw http.ResponseWriter, req *http.Request) { - response := fmt.Sprintf(`{"credentials": {"instance_id": "%s" , "binding_id": "%s"}}`, mux.Vars(req)["instance_id"], mux.Vars(req)["binding_id"]) - setResponse(rw, http.StatusCreated, response, brokerID) - }).Methods("PUT") - - router.HandleFunc(prefix+"/v2/service_instances/{instance_id}/service_bindings/{binding_id}", func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusOK, "{}", brokerID) - }).Methods("DELETE") - - router.HandleFunc(prefix+"/v2/service_instances/{instance_id}/last_operation", func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusOK, `{"state": "succeeded"}`, brokerID) - }).Methods("GET") - - router.HandleFunc(prefix+"/v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation", func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusOK, `{"state": "succeeded"}`, brokerID) - }).Methods("GET") - - server := httptest.NewServer(router) - if prefix != "" { - server.URL = server.URL + prefix - } - - return server -} - -func SetupFakeServiceBrokerServer(brokerID string) *httptest.Server { - return SetupFakeServiceBrokerServerWithPrefix(brokerID, "") -} - -func SetupFakeFailingBrokerServer(brokerID string) *httptest.Server { - router := mux.NewRouter() - - router.PathPrefix("/v2/catalog").HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusOK, Catalog, brokerID) - }) - - router.PathPrefix("/").HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { - setResponse(rw, http.StatusNotAcceptable, `{"description": "expected error"}`, brokerID) - }) - - return httptest.NewServer(router) -} - func generatePrivateKey() *rsa.PrivateKey { privateKey, _ := rsa.GenerateKey(rand.Reader, 2048) return privateKey @@ -227,20 +122,6 @@ func newJwkResponse(keyID string, publicKey rsa.PublicKey) *jwkResponse { } } -func MakeBroker(name string, url string, description string) Object { - return Object{ - "name": name, - "broker_url": url, - "description": description, - "credentials": Object{ - "basic": Object{ - "username": "buser", - "password": "bpass", - }, - }, - } -} - func MakePlatform(id string, name string, atype string, description string) Object { return Object{ "id": id, @@ -250,42 +131,6 @@ func MakePlatform(id string, name string, atype string, description string) Obje } } -func FakeBrokerServer(code *int, response interface{}) *ghttp.Server { - brokerServer := ghttp.NewServer() - brokerServer.RouteToHandler(http.MethodGet, regexp.MustCompile(".*"), ghttp.RespondWithPtr(code, response)) - return brokerServer -} - -func VerifyReqReceived(server *ghttp.Server, times int, method, path string, rawQuery ...string) { - timesReceived := 0 - for _, req := range server.ReceivedRequests() { - if req.Method == method && strings.Contains(req.URL.Path, path) { - if len(rawQuery) == 0 { - timesReceived++ - continue - } - values, err := url.ParseQuery(rawQuery[0]) - Expect(err).ShouldNot(HaveOccurred()) - if reflect.DeepEqual(req.URL.Query(), values) { - timesReceived++ - } - } - } - if times != timesReceived { - Fail(fmt.Sprintf("Request with method = %s, path = %s, rawQuery = %s expected to be received atleast "+ - "%d times but was received %d times", method, path, rawQuery, times, timesReceived)) - } -} - -func VerifyBrokerCatalogEndpointInvoked(server *ghttp.Server, times int) { - VerifyReqReceived(server, times, http.MethodGet, "/v2/catalog") -} - -func ClearReceivedRequests(code *int, response interface{}, server *ghttp.Server) { - server.Reset() - server.RouteToHandler(http.MethodGet, regexp.MustCompile(".*"), ghttp.RespondWithPtr(code, response)) -} - type HTTPReaction struct { Status int Body string diff --git a/vendor/github.com/Peripli/service-manager/test/common/test_context.go b/vendor/github.com/Peripli/service-manager/test/common/test_context.go index ae6fb074..7b6815f4 100644 --- a/vendor/github.com/Peripli/service-manager/test/common/test_context.go +++ b/vendor/github.com/Peripli/service-manager/test/common/test_context.go @@ -18,37 +18,97 @@ package common import ( "context" + "flag" "net/http/httptest" + "path" + "runtime" - . "github.com/onsi/ginkgo" + "github.com/gofrs/uuid" "github.com/spf13/pflag" "github.com/Peripli/service-manager/pkg/env" "github.com/Peripli/service-manager/pkg/sm" "github.com/Peripli/service-manager/pkg/web" "github.com/gavv/httpexpect" + . "github.com/onsi/ginkgo" +) + +var ( + e env.Environment + _, b, _, _ = runtime.Caller(0) + basePath = path.Dir(b) ) +type FlagValue struct { + pflagValue pflag.Value +} + +func (f FlagValue) Set(s string) error { + return f.pflagValue.Set(s) +} + +func (f FlagValue) String() string { + return f.pflagValue.String() +} + +func init() { + e = TestEnv() +} + +func SetTestFileLocation(set *pflag.FlagSet) { + set.Set("file.location", basePath) +} + +func TestEnv(additionalFlagFuncs ...func(set *pflag.FlagSet)) env.Environment { + f := func(set *pflag.FlagSet) { + if set == nil { + return + } + + set.VisitAll(func(pflag *pflag.Flag) { + if flag.Lookup(pflag.Name) != nil { + return + } + + flag.Var(FlagValue{ + pflagValue: pflag.Value, + }, pflag.Name, pflag.Usage) + }) + } + + additionalFlagFuncs = append(additionalFlagFuncs, f) + + // will be used as default value and overridden if --file.location={{location}} is passed to go test + additionalFlagFuncs = append(additionalFlagFuncs, SetTestFileLocation) + + return sm.DefaultEnv(additionalFlagFuncs...) +} + type ContextParams struct { - Environment env.Environment RegisterExtensions func(api *web.API) DefaultTokenClaims map[string]interface{} + Env env.Environment } -func LoadEnvironment(confgiFileDir string) env.Environment { - return sm.DefaultEnv(func(set *pflag.FlagSet) { - set.Set("file.location", confgiFileDir) - }) -} +func NewSMServer(params *ContextParams, issuerURL string) *httptest.Server { + var smEnv env.Environment + if params.Env != nil { + smEnv = params.Env + } else { + smEnv = e + } -func buildSM(params *ContextParams, issuerURL string) *httptest.Server { - if params.Environment == nil { - params.Environment = LoadEnvironment("./test/common") + flag.VisitAll(func(flag *flag.Flag) { + if flag.Value.String() != "" { + smEnv.Set(flag.Name, flag.Value.String()) + } + }) + if flag.Lookup("api.token_issuer_url") != nil && flag.Lookup("api.token_issuer_url").Value.String() == "" { + smEnv.Set("api.token_issuer_url", issuerURL) } - params.Environment.Set("api.token_issuer_url", issuerURL) ctx, cancel := context.WithCancel(context.Background()) - smanagerBuilder := sm.New(ctx, cancel, params.Environment) + smanagerBuilder := sm.New(ctx, cancel, smEnv) if params.RegisterExtensions != nil { params.RegisterExtensions(smanagerBuilder.API) } @@ -64,7 +124,7 @@ func NewTestContext(params *ContextParams) *TestContext { oauthServer := NewOAuthServer() oauthServer.Start() - smServer := buildSM(params, oauthServer.URL) + smServer := NewSMServer(params, oauthServer.URL) SM := httpexpect.New(GinkgoT(), smServer.URL) accessToken := oauthServer.CreateToken(params.DefaultTokenClaims) @@ -76,7 +136,7 @@ func NewTestContext(params *ContextParams) *TestContext { RemoveAllPlatforms(SMWithOAuth) platformJSON := MakePlatform("ctx-platform-test", "ctx-platform-test", "platform-type", "test-platform") - platform := RegisterPlatform(platformJSON, SMWithOAuth) + platform := RegisterPlatformInSM(platformJSON, SMWithOAuth) SMWithBasic := SM.Builder(func(req *httpexpect.Request) { username, password := platform.Credentials.Basic.Username, platform.Credentials.Basic.Password req.WithBasicAuth(username, password) @@ -86,7 +146,7 @@ func NewTestContext(params *ContextParams) *TestContext { SM: SM, SMWithOAuth: SMWithOAuth, SMWithBasic: SMWithBasic, - brokers: make(map[string]*Broker), + brokers: make(map[string]*BrokerServer), smServer: smServer, OAuthServer: oauthServer, } @@ -99,33 +159,40 @@ type TestContext struct { smServer *httptest.Server OAuthServer *OAuthServer - brokers map[string]*Broker + brokers map[string]*BrokerServer } -func (ctx *TestContext) RegisterBroker(name string, server *httptest.Server) *Broker { - broker := &Broker{} - if server == nil { - server = httptest.NewServer(broker) +func (ctx *TestContext) RegisterBroker() (string, *BrokerServer) { + brokerServer := NewBrokerServer() + UUID, err := uuid.NewV4() + if err != nil { + panic(err) + } + brokerJSON := Object{ + "name": UUID.String(), + "broker_url": brokerServer.URL, + "description": "", + "credentials": Object{ + "basic": Object{ + "username": brokerServer.Username, + "password": brokerServer.Password, + }, + }, } - brokerJSON := MakeBroker(name, server.URL, "") - broker.ID = RegisterBroker(brokerJSON, ctx.SMWithOAuth) - - broker.OSBURL = "/v1/osb/" + broker.ID - broker.Server = server - - broker.Request = nil - ctx.brokers[name] = broker - return broker + brokerID := RegisterBrokerInSM(brokerJSON, ctx.SMWithOAuth) + brokerServer.ResetCallHistory() + ctx.brokers[brokerID] = brokerServer + return brokerID, brokerServer } -func (ctx *TestContext) CleanupBroker(name string) { - broker := ctx.brokers[name] - ctx.SMWithOAuth.DELETE("/v1/service_brokers/" + broker.ID).Expect() - if broker.Server != nil { +func (ctx *TestContext) CleanupBroker(id string) { + broker := ctx.brokers[id] + ctx.SMWithOAuth.DELETE("/v1/service_brokers/" + id).Expect() + if broker != nil && broker.Server != nil { broker.Server.Close() } - delete(ctx.brokers, name) + delete(ctx.brokers, id) } func (ctx *TestContext) Cleanup() { @@ -139,7 +206,7 @@ func (ctx *TestContext) Cleanup() { } for _, broker := range ctx.brokers { - if broker.Server != nil { + if broker != nil && broker.Server != nil { broker.Server.Close() } } diff --git a/vendor/github.com/Peripli/service-manager/test/filter_test/filter_test.go b/vendor/github.com/Peripli/service-manager/test/filter_test/filter_test.go index 80aaf3d4..1990f457 100644 --- a/vendor/github.com/Peripli/service-manager/test/filter_test/filter_test.go +++ b/vendor/github.com/Peripli/service-manager/test/filter_test/filter_test.go @@ -2,7 +2,6 @@ package filter_test import ( "net/http" - "os" "testing" "github.com/Peripli/service-manager/pkg/web" @@ -14,14 +13,13 @@ import ( type object = common.Object func TestFilters(t *testing.T) { - os.Chdir("../..") RegisterFailHandler(Fail) RunSpecs(t, "Filter Tests Suite") } var _ = Describe("Service Manager Filters", func() { var ctx *common.TestContext - var testBroker *common.Broker + var osbURL string var testFilters []web.Filter var order string @@ -32,7 +30,8 @@ var _ = Describe("Service Manager Filters", func() { api.RegisterFilters(testFilters...) }, }) - testBroker = ctx.RegisterBroker("broker1", nil) + brokerID, _ := ctx.RegisterBroker() + osbURL = "/v1/osb/" + brokerID order = "" }) @@ -49,22 +48,21 @@ var _ = Describe("Service Manager Filters", func() { Context("should be called only on OSB API", func() { Specify("/v2/catalog", func() { - ctx.SMWithBasic.GET(testBroker.OSBURL + "/v2/catalog"). + ctx.SMWithBasic.GET(osbURL + "/v2/catalog"). Expect().Status(http.StatusOK) Expect(order).To(Equal("osb1osb2")) }) Specify("/v2/service_instances/1234", func() { - ctx.SMWithBasic.PUT(testBroker.OSBURL+"/v2/service_instances/1234"). + ctx.SMWithBasic.PUT(osbURL+"/v2/service_instances/1234"). WithHeader("Content-Type", "application/json"). WithJSON(object{}). - Expect().Status(http.StatusOK) + Expect().Status(http.StatusCreated) Expect(order).To(Equal("osb1osb2")) - }) Specify("/v2/service_instances/1234/service_bindings/111", func() { - ctx.SMWithBasic.DELETE(testBroker.OSBURL + "/v2/service_instances/1234/service_bindings/111"). + ctx.SMWithBasic.DELETE(osbURL + "/v2/service_instances/1234/service_bindings/111"). Expect().Status(http.StatusOK) Expect(order).To(Equal("osb1osb2")) }) @@ -76,7 +74,7 @@ var _ = Describe("Service Manager Filters", func() { }) Specify("/v1/platforms", func() { - ctx.SMWithOAuth.GET("/v1/service_brokers"). + ctx.SMWithOAuth.GET("/v1/platforms"). Expect().Status(http.StatusOK) Expect(order).ToNot(Equal("osb1osb2")) }) diff --git a/vendor/github.com/Peripli/service-manager/test/healthcheck_test/healthcheck_test.go b/vendor/github.com/Peripli/service-manager/test/healthcheck_test/healthcheck_test.go index b879cd67..b6911deb 100644 --- a/vendor/github.com/Peripli/service-manager/test/healthcheck_test/healthcheck_test.go +++ b/vendor/github.com/Peripli/service-manager/test/healthcheck_test/healthcheck_test.go @@ -18,7 +18,6 @@ package healthcheck_test import ( "net/http" - "os" "testing" "github.com/Peripli/service-manager/api/healthcheck" @@ -27,7 +26,6 @@ import ( ) func Test(t *testing.T) { - os.Chdir("../..") RunSpecs(t, "Healthcheck Suite") } diff --git a/vendor/github.com/Peripli/service-manager/test/info_test/info_test.go b/vendor/github.com/Peripli/service-manager/test/info_test/info_test.go index 4eb52bde..8e917af9 100644 --- a/vendor/github.com/Peripli/service-manager/test/info_test/info_test.go +++ b/vendor/github.com/Peripli/service-manager/test/info_test/info_test.go @@ -18,7 +18,6 @@ package info_test import ( "net/http" - "os" "testing" "github.com/Peripli/service-manager/api/info" @@ -27,7 +26,6 @@ import ( ) func Test(t *testing.T) { - os.Chdir("../..") RunSpecs(t, "Info Suite") } diff --git a/vendor/github.com/Peripli/service-manager/test/osb_test/osb_test.go b/vendor/github.com/Peripli/service-manager/test/osb_test/osb_test.go index 3a9b4186..962f3d6a 100644 --- a/vendor/github.com/Peripli/service-manager/test/osb_test/osb_test.go +++ b/vendor/github.com/Peripli/service-manager/test/osb_test/osb_test.go @@ -17,35 +17,52 @@ package osb_test import ( "net/http" + "net/http/httptest" + "strings" + + "github.com/gofrs/uuid" "github.com/Peripli/service-manager/test/common" "github.com/gavv/httpexpect" - "os" "testing" . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" ) type object = common.Object +type array = common.Array // TestOSB tests for OSB API func TestOSB(t *testing.T) { - os.Chdir("../..") + RegisterFailHandler(Fail) RunSpecs(t, "OSB API Tests Suite") } -func assertBadBrokerError(req *httpexpect.Request) { - body := req.Expect().Status(http.StatusNotAcceptable).JSON().Object() - body.ContainsKey("description") - body.Value("description").Equal("expected error") +func assertBrokenBrokerError(req *httpexpect.Request) { + req.Expect().Status(http.StatusNotAcceptable).JSON().Object(). + Value("description").String().Contains("broken service broker error") } func assertMissingBrokerError(req *httpexpect.Request) { - body := req.Expect().Status(http.StatusNotFound).JSON().Object() - body.ContainsKey("description"). - Value("description").String(). - Equal("could not find broker with id missing_broker_id") + req.Expect().Status(http.StatusNotFound).JSON().Object(). + Value("description").String().Contains("could not find broker") +} + +func assertStoppedBrokerError(req *httpexpect.Request) { + req.Expect().Status(http.StatusBadGateway).JSON().Object(). + Value("description").String().Contains("could not reach service broker") +} + +func assertWorkingBrokerResponse(req *httpexpect.Request, expectedStatusCode int, expectedKeys ...string) { + if expectedKeys == nil { + expectedKeys = make([]string, 0, 0) + } + keys := req.Expect().Status(expectedStatusCode).JSON().Object().Keys() + for _, key := range expectedKeys { + keys.Contains(key) + } } func getDummyService(idsToRemove ...string) *object { @@ -61,17 +78,80 @@ func getDummyService(idsToRemove ...string) *object { return result } +func generateRandomQueryParam() (string, string) { + key, err := uuid.NewV4() + Expect(err).ToNot(HaveOccurred()) + value, err := uuid.NewV4() + Expect(err).ToNot(HaveOccurred()) + return key.String(), value.String() +} + +func failingHandler(rw http.ResponseWriter, _ *http.Request) { + common.SetResponse(rw, http.StatusNotAcceptable, object{"description": "broken service broker error", "error": "error"}) +} + +func queryParameterVerificationHandler(key, value string) http.HandlerFunc { + return func(writer http.ResponseWriter, request *http.Request) { + var status int + query := request.URL.Query() + actualValue := query.Get(key) + Expect(actualValue).To(Equal(value)) + if request.Method == http.MethodPut { + status = http.StatusCreated + } else { + status = http.StatusOK + } + common.SetResponse(writer, status, object{}) + defer GinkgoRecover() + } +} + var _ = Describe("Service Manager OSB API", func() { var ( - ctx *common.TestContext - validBroker, failingBroker, brokerWithPrefix *common.Broker + ctx *common.TestContext + + workingBrokerURL string + brokerBrokerURL string + missingBrokerURL string + stoppedBrokerURL string + queryParamVerificationBrokerOSBURL string + headerKey string + headerValue string ) BeforeSuite(func() { ctx = common.NewTestContext(nil) - validBroker = ctx.RegisterBroker("broker1", common.SetupFakeServiceBrokerServer("broker1")) - failingBroker = ctx.RegisterBroker("broker2", common.SetupFakeFailingBrokerServer("broker2")) - brokerWithPrefix = ctx.RegisterBroker("broker3", common.SetupFakeServiceBrokerServerWithPrefix("broker3", "/sm")) + validBrokerID, validBrokerServer := ctx.RegisterBroker() + workingBrokerURL = validBrokerServer.URL + "/v1/osb/" + validBrokerID + + failingBrokerID, failingBrokerServer := ctx.RegisterBroker() + brokerBrokerURL = failingBrokerServer.URL + "/v1/osb/" + failingBrokerID + failingBrokerServer.ServiceInstanceHandler = failingHandler + failingBrokerServer.BindingHandler = failingHandler + failingBrokerServer.CatalogHandler = failingHandler + failingBrokerServer.ServiceInstanceLastOpHandler = failingHandler + failingBrokerServer.BindingLastOpHandler = failingHandler + + UUID, err := uuid.NewV4() + if err != nil { + Expect(err).ToNot(HaveOccurred()) + } + missingBrokerURL = "http://localhost:32123/v1/osb/" + UUID.String() + + stoppedBrokerID, stoppedBrokerServer := ctx.RegisterBroker() + stoppedBrokerServer.Close() + + stoppedBrokerURL = stoppedBrokerServer.URL + "/v1/osb/" + stoppedBrokerID + + headerKey, headerValue = generateRandomQueryParam() + queryParameterVerificationServerID, queryParameterVerificationServer := ctx.RegisterBroker() + queryParameterVerificationServer.ServiceInstanceHandler = queryParameterVerificationHandler(headerKey, headerValue) + queryParameterVerificationServer.BindingHandler = queryParameterVerificationHandler(headerKey, headerValue) + queryParameterVerificationServer.CatalogHandler = queryParameterVerificationHandler(headerKey, headerValue) + queryParameterVerificationServer.ServiceInstanceLastOpHandler = queryParameterVerificationHandler(headerKey, headerValue) + queryParameterVerificationServer.BindingLastOpHandler = queryParameterVerificationHandler(headerKey, headerValue) + queryParamVerificationBrokerOSBURL = queryParameterVerificationServer.URL + "/v1/osb/" + queryParameterVerificationServerID + }) AfterSuite(func() { @@ -79,126 +159,182 @@ var _ = Describe("Service Manager OSB API", func() { }) Describe("Catalog", func() { - assertGETCatalogReturns200 := func() { - It("should get catalog", func() { - resp := ctx.SMWithBasic.GET(validBroker.OSBURL+"/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13"). - Expect().Status(http.StatusOK).JSON().Object() + Context("when call to working service broker", func() { + It("should succeed", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.GET(workingBrokerURL+"/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13"), + http.StatusOK, "services") - resp.ContainsKey("services") }) - } - - Context("when call to working broker", func() { - assertGETCatalogReturns200() }) - Context("when call to broken broker", func() { - assertGETCatalogReturns200() + Context("when call to broken service broker", func() { + It("should fail", func() { + assertBrokenBrokerError( + ctx.SMWithBasic.GET(brokerBrokerURL+"/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + + }) }) - Context("when call to missing broker", func() { - It("should get error", func() { + Context("when call to missing service broker", func() { + It("should fail", func() { assertMissingBrokerError( - ctx.SMWithBasic.GET("/v1/osb/missing_broker_id/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + ctx.SMWithBasic.GET(missingBrokerURL+"/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + }) + }) + + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError( + ctx.SMWithBasic.GET(stoppedBrokerURL+"/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + }) + }) + + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.GET(queryParamVerificationBrokerOSBURL+"/v2/catalog").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusOK) }) }) }) Describe("Provision", func() { - Context("when call to working broker", func() { - It("provisions successfully", func() { - resp := ctx.SMWithBasic.PUT(validBroker.OSBURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). - WithJSON(getDummyService()). - Expect().Status(http.StatusCreated).JSON().Object() - resp.Empty() + Context("call to working service broker", func() { + It("should succeed", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.PUT(workingBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()), http.StatusCreated) }) }) - Context("when call to broken broker", func() { - It("should get error", func() { - assertBadBrokerError( - ctx.SMWithBasic.PUT(failingBroker.OSBURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + Context("when call to broken service broker", func() { + It("should fail", func() { + assertBrokenBrokerError( + ctx.SMWithBasic.PUT(brokerBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithJSON(getDummyService())) }) }) Context("when call to missing broker", func() { - It("provision fails", func() { + It("should fail", func() { assertMissingBrokerError( - ctx.SMWithBasic.PUT("/v1/osb/missing_broker_id/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + ctx.SMWithBasic.PUT(missingBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService())) + }) + }) + + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError( + ctx.SMWithBasic.PUT(stoppedBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithJSON(getDummyService())) }) }) - }) + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.PUT(queryParamVerificationBrokerOSBURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusCreated) + }) + }) + }) Describe("Deprovision", func() { Context("when trying to deprovision existing service", func() { It("should be successfull", func() { - ctx.SMWithBasic.DELETE(validBroker.OSBURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + ctx.SMWithBasic.DELETE(workingBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithQueryObject(getDummyService()). Expect().Status(http.StatusOK).JSON().Object() }) }) Context("when call to broken broker", func() { - It("should get error", func() { - assertBadBrokerError( - ctx.SMWithBasic.DELETE(failingBroker.OSBURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + It("should fail", func() { + assertBrokenBrokerError( + ctx.SMWithBasic.DELETE(brokerBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithQueryObject(getDummyService())) }) }) - Context("when call to missing broker", func() { - It("deprovision fails", func() { + Context("when call to missing service broker", func() { + It("should fail", func() { assertMissingBrokerError( - ctx.SMWithBasic.DELETE("/v1/osb/missing_broker_id/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + ctx.SMWithBasic.DELETE(missingBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithQueryObject(getDummyService())) }) }) + + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError(ctx.SMWithBasic.DELETE(stoppedBrokerURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithQueryObject(getDummyService())) + }) + }) + + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.DELETE(queryParamVerificationBrokerOSBURL+"/v2/service_instances/12345").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusOK) + }) + }) }) Describe("Bind", func() { - Context("when broker is working properly", func() { - It("should be successfull", func() { - resp := ctx.SMWithBasic.PUT(validBroker.OSBURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). - WithJSON(getDummyService()). - Expect().Status(http.StatusCreated).JSON().Object() - credentials := resp.Value("credentials").Object() - credentials.Value("instance_id").String().Equal("iid") - credentials.Value("binding_id").String().Equal("bid") + Context("call to working service broker", func() { + It("should succeed", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.PUT(workingBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()), http.StatusCreated, "credentials") }) }) - Context("when broker is not working properly", func() { + Context("when call to broker service broker", func() { It("should fail", func() { - assertBadBrokerError( - ctx.SMWithBasic.PUT(failingBroker.OSBURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + assertBrokenBrokerError( + ctx.SMWithBasic.PUT(brokerBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithJSON(getDummyService())) }) }) - Context("when call to missing broker", func() { - It("bind fails", func() { - assertMissingBrokerError(ctx.SMWithBasic.PUT("/v1/osb/missing_broker_id/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + Context("when call to missing service broker", func() { + It("should fail", func() { + assertMissingBrokerError(ctx.SMWithBasic.PUT(missingBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithJSON(getDummyService())) }) }) + + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError(ctx.SMWithBasic.PUT(stoppedBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService())) + }) + }) + + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.PUT(queryParamVerificationBrokerOSBURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusCreated) + }) + }) }) Describe("Unbind", func() { Context("when trying to delete binding", func() { It("should be successfull", func() { - ctx.SMWithBasic.DELETE(validBroker.OSBURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + ctx.SMWithBasic.DELETE(workingBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithQueryObject(getDummyService()). Expect().Status(http.StatusOK).JSON().Object() }) }) - Context("for brokern broker", func() { + Context("when call to broken service broker", func() { It("should return error", func() { - assertBadBrokerError( - ctx.SMWithBasic.DELETE(failingBroker.OSBURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + assertBrokenBrokerError( + ctx.SMWithBasic.DELETE(brokerBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithQueryObject(getDummyService())) }) }) @@ -206,42 +342,163 @@ var _ = Describe("Service Manager OSB API", func() { Context("when call to missing broker", func() { It("unbind fails", func() { assertMissingBrokerError( - ctx.SMWithBasic.DELETE("/v1/osb/missing_broker_id/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + ctx.SMWithBasic.DELETE(missingBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). WithQueryObject(getDummyService())) }) }) + + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError( + ctx.SMWithBasic.DELETE(stoppedBrokerURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithQueryObject(getDummyService())) + + }) + }) + + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.DELETE(queryParamVerificationBrokerOSBURL+"/v2/service_instances/iid/service_bindings/bid").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusOK) + }) + }) }) - Describe("Get Last Operation", func() { + Describe("Get Service Instance Last Operation", func() { + Context("when call to working service broker", func() { + It("should succeed", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.GET(workingBrokerURL+"/v2/service_instances/iid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13"), + http.StatusOK, "state") + }) + }) + + Context("when call to broken service broker", func() { + It("should fail", func() { + assertBrokenBrokerError( + ctx.SMWithBasic.GET(brokerBrokerURL+"/v2/service_instances/iid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13")) - assertLastOperationHasState := func(url string) { - resp := ctx.SMWithBasic.GET(url).WithHeader("X-Broker-API-Version", "oidc_authn.13"). - Expect().Status(http.StatusOK).JSON().Object() + }) + }) - resp.ContainsKey("state") - } + Context("when call to missing service broker", func() { + It("should fail", func() { + assertMissingBrokerError( + ctx.SMWithBasic.GET(missingBrokerURL+"/v2/service_instances/iid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + }) + }) - Context("For service instance", func() { - It("should return state", func() { - assertLastOperationHasState(validBroker.OSBURL + "/v2/service_instances/iid/last_operation") + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError( + ctx.SMWithBasic.GET(stoppedBrokerURL+"/v2/service_instances/iid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13")) }) }) - Context("For service binding", func() { - It("should return state", func() { - assertLastOperationHasState(validBroker.OSBURL + "/v2/service_instances/iid/service_bindings/bid/last_operation") + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.GET(queryParamVerificationBrokerOSBURL+"/v2/service_instances/iid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusOK) + }) + }) + }) + + Describe("Get Binding Last Operation", func() { + Context("when call to working service broker", func() { + It("should succeed", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.GET(workingBrokerURL+"/v2/service_instances/iid/service_bindings/bid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13"), + http.StatusOK, "state") + }) + }) + + Context("when call to broken service broker", func() { + It("should fail", func() { + assertBrokenBrokerError( + ctx.SMWithBasic.GET(brokerBrokerURL+"/v2/service_instances/iid/service_bindings/bid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + + }) + }) + + Context("when call to missing service broker", func() { + It("should fail", func() { + assertMissingBrokerError( + ctx.SMWithBasic.GET(missingBrokerURL+"/v2/service_instances/iid/service_bindings/bid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + }) + }) + + Context("when call to stopped service broker", func() { + It("should fail", func() { + assertStoppedBrokerError( + ctx.SMWithBasic.GET(stoppedBrokerURL+"/v2/service_instances/iid/service_bindings/bid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13")) + }) + }) + + Context("when call contains query params", func() { + It("propagates them to the service broker", func() { + assertWorkingBrokerResponse( + ctx.SMWithBasic.GET(queryParamVerificationBrokerOSBURL+"/v2/service_instances/iid/service_bindings/bid/last_operation").WithHeader("X-Broker-API-Version", "oidc_authn.13"). + WithJSON(getDummyService()).WithQuery(headerKey, headerValue), http.StatusOK) }) }) }) Describe("Prefixed broker path", func() { Context("when call to working broker", func() { - It("should get catalog", func() { - resp := ctx.SMWithBasic.GET(brokerWithPrefix.OSBURL + "/v2/catalog"). - Expect().Status(http.StatusOK).JSON().Object() - resp.ContainsKey("services") + const brokerPathPrefix = "/broker_prefix" + var ( + prefixedBrokerServer *httptest.Server + osbURL string + prefixedBrokerID string + ) + + BeforeEach(func() { + brokerHandler := &prefixedBrokerHandler{brokerPathPrefix} + prefixedBrokerServer = httptest.NewServer(brokerHandler) + brokerURL := prefixedBrokerServer.URL + brokerPathPrefix + + brokerJSON := object{ + "name": "prefixed_broker", + "broker_url": brokerURL, + "description": "", + "credentials": object{ + "basic": object{ + "username": "buser", + "password": "bpass", + }, + }, + } + prefixedBrokerID = common.RegisterBrokerInSM(brokerJSON, ctx.SMWithOAuth) + osbURL = "/v1/osb/" + prefixedBrokerID + }) + + AfterEach(func() { + ctx.CleanupBroker(prefixedBrokerID) + if prefixedBrokerServer != nil { + prefixedBrokerServer.Close() + } + }) + + It("should get catalog", func() { + ctx.SMWithBasic.GET(osbURL + "/v2/catalog"). + Expect().Status(http.StatusOK).JSON().Object().ContainsKey("services") }) }) }) + }) + +type prefixedBrokerHandler struct { + brokerPathPrefix string +} + +func (pbh *prefixedBrokerHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { + if strings.HasPrefix(req.URL.Path, pbh.brokerPathPrefix) { + common.SetResponse(w, http.StatusOK, object{"services": array{}}) + } else { + common.SetResponse(w, http.StatusNotFound, object{}) + } +} diff --git a/vendor/github.com/Peripli/service-manager/test/platform_test/platform_test.go b/vendor/github.com/Peripli/service-manager/test/platform_test/platform_test.go index c40f2538..38fb3c87 100644 --- a/vendor/github.com/Peripli/service-manager/test/platform_test/platform_test.go +++ b/vendor/github.com/Peripli/service-manager/test/platform_test/platform_test.go @@ -18,7 +18,6 @@ package platform_test import ( "net/http" - "os" "testing" "github.com/Peripli/service-manager/test/common" @@ -30,7 +29,6 @@ type array = common.Array // TestPlatforms tests for platform API func TestPlatforms(t *testing.T) { - os.Chdir("../..") RunSpecs(t, "Platform API Tests Suite") } @@ -76,7 +74,7 @@ var _ = Describe("Service Manager Platform API", func() { }) }) }) - Describe("GET All", func() { + Describe("List", func() { Context("With no platforms", func() { It("returns empty array", func() { ctx.SMWithOAuth.GET("/v1/platforms"). diff --git a/vendor/github.com/Peripli/service-manager/test/plugin_test/plugin_test.go b/vendor/github.com/Peripli/service-manager/test/plugin_test/plugin_test.go index 1300a037..1ce1df1d 100644 --- a/vendor/github.com/Peripli/service-manager/test/plugin_test/plugin_test.go +++ b/vendor/github.com/Peripli/service-manager/test/plugin_test/plugin_test.go @@ -1,9 +1,9 @@ package plugin_test import ( + "encoding/json" "fmt" "net/http" - "os" "strconv" "testing" @@ -19,17 +19,19 @@ import ( type object = common.Object func TestPlugins(t *testing.T) { - os.Chdir("../..") RegisterFailHandler(Fail) RunSpecs(t, "Plugin Tests Suite") } var _ = Describe("Service Manager Plugins", func() { var ctx *common.TestContext - var testBroker *common.Broker + var brokerServer *common.BrokerServer + var osbURL string AfterEach(func() { - ctx.Cleanup() + if ctx != nil { + ctx.Cleanup() + } }) Describe("Partial plugin", func() { @@ -39,17 +41,18 @@ var _ = Describe("Service Manager Plugins", func() { api.RegisterPlugins(&PartialPlugin{}) }, }) - testBroker = ctx.RegisterBroker("broker1", nil) - + var brokerID string + brokerID, brokerServer = ctx.RegisterBroker() + osbURL = "/v1/osb/" + brokerID }) It("should be called for provision and not for deprovision", func() { - ctx.SMWithBasic.PUT(testBroker.OSBURL+"/v2/service_instances/1234"). + ctx.SMWithBasic.PUT(osbURL+"/v2/service_instances/1234"). WithHeader("Content-Type", "application/json"). WithJSON(object{}). - Expect().Status(http.StatusOK).Header("X-Plugin").Equal("provision") + Expect().Status(http.StatusCreated).Header("X-Plugin").Equal("provision") - ctx.SMWithBasic.DELETE(testBroker.OSBURL+"/v2/service_instances/1234"). + ctx.SMWithBasic.DELETE(osbURL+"/v2/service_instances/1234"). WithHeader("Content-Type", "application/json"). WithJSON(object{}). Expect().Status(http.StatusOK).Header("X-Plugin").Empty() @@ -61,15 +64,15 @@ var _ = Describe("Service Manager Plugins", func() { BeforeEach(func() { testPlugin = TestPlugin{} - }) - JustBeforeEach(func() { ctx = common.NewTestContext(&common.ContextParams{ RegisterExtensions: func(api *web.API) { api.RegisterPlugins(testPlugin) }, }) - testBroker = ctx.RegisterBroker("broker1", nil) + var brokerID string + brokerID, brokerServer = ctx.RegisterBroker() + osbURL = "/v1/osb/" + brokerID }) It("Plugin modifies the request & response body", func() { @@ -93,25 +96,27 @@ var _ = Describe("Service Manager Plugins", func() { resBodySize = len(res.Body) return res, nil }) - testBroker.StatusCode = http.StatusCreated provisionBody := object{ "service_id": "s123", "plan_id": "p123", } - resp := ctx.SMWithBasic.PUT(testBroker.OSBURL + "/v2/service_instances/1234"). + resp := ctx.SMWithBasic.PUT(osbURL + "/v2/service_instances/1234"). WithJSON(provisionBody).Expect().Status(http.StatusCreated) resp.Header("content-length").Equal(strconv.Itoa(resBodySize)) reply := resp.JSON().Object() - Expect(testBroker.Request.Header.Get("content-length")).To(Equal( - strconv.Itoa(len(testBroker.RawRequestBody)))) + Expect(brokerServer.LastRequest.Header.Get("content-length")).To(Equal( + strconv.Itoa(len(brokerServer.LastRequestBody)))) + reply.ValueEqual("extra", "response") - testBroker.RequestBody.Object().Equal(object{ + jsonBody := object{} + json.Unmarshal(brokerServer.LastRequestBody, &jsonBody) + Expect(jsonBody).To(Equal(object{ "service_id": "s123", "plan_id": "p123", "extra": "request", - }) + })) }) It("Plugin modifies the request & response headers", func() { @@ -127,12 +132,11 @@ var _ = Describe("Service Manager Plugins", func() { res.Header.Set("extra", h+"-response") return res, nil }) - testBroker.StatusCode = http.StatusOK - ctx.SMWithBasic.GET(testBroker.OSBURL+"/v2/catalog").WithHeader("extra", "value"). + ctx.SMWithBasic.GET(osbURL+"/v2/catalog").WithHeader("extra", "value"). Expect().Status(http.StatusOK).Header("extra").Equal("value-response") - Expect(testBroker.Request.Header.Get("extra")).To(Equal("value-request")) + Expect(brokerServer.LastRequest.Header.Get("extra")).To(Equal("value-request")) }) It("Plugin aborts the request", func() { @@ -144,38 +148,39 @@ var _ = Describe("Service Manager Plugins", func() { } }) - ctx.SMWithBasic.GET(testBroker.OSBURL + "/v2/catalog"). + ctx.SMWithBasic.GET(osbURL + "/v2/catalog"). Expect().Status(http.StatusBadRequest).JSON().Object().Equal(object{ "error": "PluginErr", "description": "Plugin error", }) - Expect(testBroker.Called()).To(BeFalse()) + Expect(len(brokerServer.CatalogEndpointRequests)).To(Equal(0)) }) - It("Request host header is properly set", func() { - ctx.SMWithBasic.GET(testBroker.OSBURL + "/v2/catalog"). + It("Request host header is properly set to the service broker's host", func() { + ctx.SMWithBasic.GET(osbURL + "/v2/catalog"). Expect().Status(http.StatusOK) - Expect(testBroker.Server.URL).To(ContainSubstring(testBroker.Request.Host)) + Expect(brokerServer.Server.URL).To(ContainSubstring(brokerServer.LastRequest.Host)) }) osbOperations := []struct { - name string - method string - path string - queries []string + name string + method string + path string + queries []string + expectedStatus int }{ - {"fetchCatalog", "GET", "/v2/catalog", []string{""}}, - {"provision", "PUT", "/v2/service_instances/1234", []string{"", "accepts_incomplete=true"}}, - {"deprovision", "DELETE", "/v2/service_instances/1234", []string{""}}, - {"updateService", "PATCH", "/v2/service_instances/1234", []string{""}}, - {"fetchService", "GET", "/v2/service_instances/1234", []string{""}}, - {"bind", "PUT", "/v2/service_instances/1234/service_bindings/111", []string{""}}, - {"unbind", "DELETE", "/v2/service_instances/1234/service_bindings/111", []string{""}}, - {"fetchBinding", "GET", "/v2/service_instances/1234/service_bindings/111", []string{""}}, - {"pollInstance", "GET", "/v2/service_instances/1234/last_operation", []string{"", "service_id=serviceId", "plan_id=planId", "operation=provision", "service_id=serviceId&plan_id=planId&operation=provision"}}, - {"pollBinding", "GET", "/v2/service_instances/1234/service_bindings/111/last_operation", []string{"", "service_id=serviceId", "plan_id=planId", "operation=provision", "service_id=serviceId&plan_id=planId&operation=provision"}}, + {"fetchCatalog", "GET", "/v2/catalog", []string{""}, http.StatusOK}, + {"provision", "PUT", "/v2/service_instances/1234", []string{"", "accepts_incomplete=true"}, http.StatusCreated}, + {"deprovision", "DELETE", "/v2/service_instances/1234", []string{""}, http.StatusOK}, + {"updateService", "PATCH", "/v2/service_instances/1234", []string{""}, http.StatusOK}, + {"fetchService", "GET", "/v2/service_instances/1234", []string{""}, http.StatusOK}, + {"bind", "PUT", "/v2/service_instances/1234/service_bindings/111", []string{""}, http.StatusCreated}, + {"unbind", "DELETE", "/v2/service_instances/1234/service_bindings/111", []string{""}, http.StatusOK}, + {"fetchBinding", "GET", "/v2/service_instances/1234/service_bindings/111", []string{""}, http.StatusOK}, + {"pollInstance", "GET", "/v2/service_instances/1234/last_operation", []string{"", "service_id=serviceId", "plan_id=planId", "operation=provision", "service_id=serviceId&plan_id=planId&operation=provision"}, http.StatusOK}, + {"pollBinding", "GET", "/v2/service_instances/1234/service_bindings/111/last_operation", []string{"", "service_id=serviceId", "plan_id=planId", "operation=provision", "service_id=serviceId&plan_id=planId&operation=provision"}, http.StatusOK}, } for _, op := range osbOperations { @@ -190,11 +195,11 @@ var _ = Describe("Service Manager Plugins", func() { }) for _, query := range op.queries { - ctx.SMWithBasic.Request(op.method, testBroker.OSBURL+op.path). + ctx.SMWithBasic.Request(op.method, osbURL+op.path). WithHeader("Content-Type", "application/json"). WithJSON(object{}). WithQueryString(query). - Expect().Status(http.StatusOK).Header("X-Plugin").Equal(op.name) + Expect().Status(op.expectedStatus).Header("X-Plugin").Equal(op.name) } }) } diff --git a/vendor/github.com/Peripli/service-manager/test/service_offering_test/service_offering_test.go b/vendor/github.com/Peripli/service-manager/test/service_offering_test/service_offering_test.go new file mode 100644 index 00000000..458e22ba --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/test/service_offering_test/service_offering_test.go @@ -0,0 +1,150 @@ +/* + * Copyright 2018 The Service Manager 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 service_test + +import ( + "net/http" + "testing" + + "github.com/Peripli/service-manager/test/common" + + . "github.com/onsi/ginkgo" + + . "github.com/onsi/gomega" +) + +func TestServiceOfferings(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Service Offerings Tests Suite") +} + +var _ = Describe("Service Manager Service Offerings API", func() { + var ( + ctx *common.TestContext + brokerServer *common.BrokerServer + brokerServerJSON common.Object + ) + + BeforeSuite(func() { + brokerServer = common.NewBrokerServer() + ctx = common.NewTestContext(nil) + }) + + AfterSuite(func() { + ctx.Cleanup() + if brokerServer != nil { + brokerServer.Close() + } + }) + + BeforeEach(func() { + brokerServer.Reset() + brokerServerJSON = common.Object{ + "name": "brokerName", + "broker_url": brokerServer.URL, + "description": "description", + "credentials": common.Object{ + "basic": common.Object{ + "username": brokerServer.Username, + "password": brokerServer.Password, + }, + }, + } + common.RemoveAllBrokers(ctx.SMWithOAuth) + }) + + Describe("GET", func() { + Context("when the service offering does not exist", func() { + It("returns 404", func() { + ctx.SMWithOAuth.GET("/v1/service_offerings/12345"). + Expect(). + Status(http.StatusNotFound). + JSON().Object(). + Keys().Contains("error", "description") + }) + }) + + Context("when the service offering exists", func() { + BeforeEach(func() { + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). + Expect(). + Status(http.StatusCreated) + + brokerServer.ResetCallHistory() + }) + + It("returns the service offering with the given id", func() { + id := ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array().First().Object(). + Value("id").String().Raw() + + Expect(id).ToNot(BeEmpty()) + + ctx.SMWithOAuth.GET("/v1/service_offerings/"+id). + Expect(). + Status(http.StatusOK). + JSON().Object(). + Keys().Contains("id", "description") + }) + }) + }) + + Describe("List", func() { + Context("when no service offerings exist", func() { + It("returns an empty array", func() { + ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array(). + Empty() + }) + }) + + Context("when a broker is registered", func() { + BeforeEach(func() { + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). + Expect(). + Status(http.StatusCreated) + + brokerServer.ResetCallHistory() + }) + + Context("when catalog_name parameter is not provided", func() { + It("returns the broker's service offerings as part of the response", func() { + ctx.SMWithOAuth.GET("/v1/service_offerings"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array().Length().Equal(1) + }) + }) + + Context("when catalog_name query parameter is provided", func() { + It("returns the service offering with the specified catalog_name", func() { + serviceCatalogName := common.DefaultCatalog()["services"].([]interface{})[0].(map[string]interface{})["name"] + Expect(serviceCatalogName).ToNot(BeEmpty()) + + ctx.SMWithOAuth.GET("/v1/service_offerings").WithQuery("catalog_name", serviceCatalogName). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_offerings").Array().Length().Equal(1) + }) + }) + }) + }) +}) diff --git a/vendor/github.com/Peripli/service-manager/test/service_plan_test/service_plan_test.go b/vendor/github.com/Peripli/service-manager/test/service_plan_test/service_plan_test.go new file mode 100644 index 00000000..e7d99489 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/test/service_plan_test/service_plan_test.go @@ -0,0 +1,157 @@ +/* + * Copyright 2018 The Service Manager 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 service_test + +import ( + "net/http" + "testing" + + "github.com/Peripli/service-manager/test/common" + + . "github.com/onsi/ginkgo" + + . "github.com/onsi/gomega" +) + +func TestServicePlans(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Service Plans Tests Suite") +} + +var _ = Describe("Service Manager Service Plans API", func() { + var ( + ctx *common.TestContext + brokerServer *common.BrokerServer + brokerServerJSON common.Object + ) + + BeforeSuite(func() { + brokerServer = common.NewBrokerServer() + ctx = common.NewTestContext(nil) + }) + + AfterSuite(func() { + ctx.Cleanup() + if brokerServer != nil { + brokerServer.Close() + } + }) + + BeforeEach(func() { + brokerServer.Reset() + brokerServerJSON = common.Object{ + "name": "brokerName", + "broker_url": brokerServer.URL, + "description": "description", + "credentials": common.Object{ + "basic": common.Object{ + "username": brokerServer.Username, + "password": brokerServer.Password, + }, + }, + } + common.RemoveAllBrokers(ctx.SMWithOAuth) + }) + + Describe("GET", func() { + Context("when the service plan does not exist", func() { + It("returns 404", func() { + ctx.SMWithOAuth.GET("/v1/service_plans/12345"). + Expect(). + Status(http.StatusNotFound). + JSON().Object(). + Keys().Contains("error", "description") + }) + }) + + Context("when the service plan exists", func() { + BeforeEach(func() { + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). + Expect(). + Status(http.StatusCreated) + + brokerServer.ResetCallHistory() + }) + + It("returns the service plan with the given id", func() { + id := ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array().First().Object(). + Value("id").String().Raw() + + Expect(id).ToNot(BeEmpty()) + + ctx.SMWithOAuth.GET("/v1/service_plans/"+id). + Expect(). + Status(http.StatusOK). + JSON().Object(). + Keys().Contains("id", "description") + }) + }) + }) + + Describe("List", func() { + Context("when no service plans exist", func() { + It("returns an empty array", func() { + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array(). + Empty() + }) + }) + + Context("when a broker is registered", func() { + BeforeEach(func() { + ctx.SMWithOAuth.POST("/v1/service_brokers").WithJSON(brokerServerJSON). + Expect(). + Status(http.StatusCreated) + + brokerServer.ResetCallHistory() + }) + + It("is accessible with basic authentication", func() { + ctx.SMWithBasic.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array().Length().Equal(2) + }) + + Context("when catalog_name parameter is not provided", func() { + It("returns the broker's service plans as part of the response", func() { + ctx.SMWithOAuth.GET("/v1/service_plans"). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array().Length().Equal(2) + }) + }) + + Context("when catalog_name query parameter is provided", func() { + It("returns the service plan with the specified catalog_name", func() { + serviceCatalogName := common.DefaultCatalog()["services"].([]interface{})[0].(map[string]interface{})["plans"].([]interface{})[0].(map[string]interface{})["name"] + Expect(serviceCatalogName).ToNot(BeEmpty()) + + ctx.SMWithOAuth.GET("/v1/service_plans").WithQuery("catalog_name", serviceCatalogName). + Expect(). + Status(http.StatusOK). + JSON().Object().Value("service_plans").Array().Length().Equal(1) + }) + }) + }) + }) +}) diff --git a/vendor/github.com/Peripli/service-manager/test/sm/sm_test.go b/vendor/github.com/Peripli/service-manager/test/sm_test/sm_test.go similarity index 83% rename from vendor/github.com/Peripli/service-manager/test/sm/sm_test.go rename to vendor/github.com/Peripli/service-manager/test/sm_test/sm_test.go index 83d621da..9ed1c3a7 100644 --- a/vendor/github.com/Peripli/service-manager/test/sm/sm_test.go +++ b/vendor/github.com/Peripli/service-manager/test/sm_test/sm_test.go @@ -19,14 +19,11 @@ package sm_test import ( "context" "net/http/httptest" - "os" + "testing" "github.com/gavv/httpexpect" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/spf13/pflag" - - "testing" "net/http" @@ -54,18 +51,14 @@ var _ = Describe("SM", func() { BeforeSuite(func() { // TODO: storage must be refactored and so that context be in BeforeEach ctx, cancel = context.WithCancel(context.Background()) - os.Chdir("../..") - os.Setenv("FILE_LOCATION", "test/common") + oauthServer = common.NewOAuthServer() oauthServer.Start() - os.Setenv("API_TOKEN_ISSUER_URL", oauthServer.URL) }) AfterSuite(func() { defer cancel() - os.Unsetenv("FILE_LOCATION") oauthServer.Close() - os.Unsetenv("API_TOKEN_ISSUER_URL") }) Describe("New", func() { @@ -83,9 +76,10 @@ var _ = Describe("SM", func() { Context("when validating config fails", func() { It("should panic", func() { Expect(func() { - sm.New(ctx, cancel, sm.DefaultEnv(func(set *pflag.FlagSet) { - set.Set("log.level", "") - })) + env := sm.DefaultEnv(common.SetTestFileLocation) + env.Set("api.token_issuer_url", oauthServer.URL) + env.Set("log.level", "invalid") + sm.New(ctx, cancel, env) }).To(Panic()) }) }) @@ -93,9 +87,10 @@ var _ = Describe("SM", func() { Context("when setting up storage fails", func() { It("should panic", func() { Expect(func() { - sm.New(ctx, cancel, sm.DefaultEnv(func(set *pflag.FlagSet) { - set.Set("storage.uri", "invalid") - })) + env := sm.DefaultEnv(common.SetTestFileLocation) + env.Set("api.token_issuer_url", oauthServer.URL) + env.Set("storage.uri", "invalid") + sm.New(ctx, cancel, env) }).To(Panic()) }) }) @@ -103,16 +98,18 @@ var _ = Describe("SM", func() { Context("when setting up API fails", func() { It("should panic", func() { Expect(func() { - sm.New(ctx, cancel, sm.DefaultEnv(func(set *pflag.FlagSet) { - set.Set("api.token_issuer_url", "") - })) + env := sm.DefaultEnv(common.SetTestFileLocation) + env.Set("api.token_issuer_url", "") + sm.New(ctx, cancel, env) }).To(Panic()) }) }) Context("when no API extensions are registered", func() { It("should return working service manager", func() { - smanager := sm.New(ctx, cancel, sm.DefaultEnv()) + env := sm.DefaultEnv(common.SetTestFileLocation) + env.Set("api.token_issuer_url", oauthServer.URL) + smanager := sm.New(ctx, cancel, env) verifyServiceManagerStartsSuccessFully(httptest.NewServer(smanager.Build().Server.Router)) @@ -121,7 +118,9 @@ var _ = Describe("SM", func() { Context("when additional filter is registered", func() { It("should return working service manager with a new filter", func() { - smanager := sm.New(ctx, cancel, sm.DefaultEnv()) + env := sm.DefaultEnv(common.SetTestFileLocation) + env.Set("api.token_issuer_url", oauthServer.URL) + smanager := sm.New(ctx, cancel, env) smanager.RegisterFilters(testFilter{}) SM := verifyServiceManagerStartsSuccessFully(httptest.NewServer(smanager.Build().Server.Router)) @@ -134,7 +133,9 @@ var _ = Describe("SM", func() { Context("when additional controller is registered", func() { It("should return working service manager with additional controller", func() { - smanager := sm.New(ctx, cancel, sm.DefaultEnv()) + env := sm.DefaultEnv(common.SetTestFileLocation) + env.Set("api.token_issuer_url", oauthServer.URL) + smanager := sm.New(ctx, cancel, env) smanager.RegisterControllers(testController{}) SM := verifyServiceManagerStartsSuccessFully(httptest.NewServer(smanager.Build().Server.Router)) diff --git a/vendor/github.com/Peripli/service-manager/version/version.go b/vendor/github.com/Peripli/service-manager/version/version.go new file mode 100644 index 00000000..1474efd0 --- /dev/null +++ b/vendor/github.com/Peripli/service-manager/version/version.go @@ -0,0 +1,14 @@ +package version + +import "github.com/sirupsen/logrus" + +// GitCommit is the commit id, injected by the build +var GitCommit string + +// Version is the SM version, injected by the build +var Version string + +// Log writes the Service Manager version info in the log +func Log() { + logrus.Infof("Service Manager Version: %s (%s)", Version, GitCommit) +} diff --git a/vendor/github.com/ghodss/yaml/.travis.yml b/vendor/github.com/ghodss/yaml/.travis.yml deleted file mode 100644 index 0e9d6edc..00000000 --- a/vendor/github.com/ghodss/yaml/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -go: - - 1.3 - - 1.4 -script: - - go test - - go build diff --git a/vendor/github.com/gregjones/httpcache/redis/redis.go b/vendor/github.com/gregjones/httpcache/redis/redis.go index 3143d443..3d69c6c7 100644 --- a/vendor/github.com/gregjones/httpcache/redis/redis.go +++ b/vendor/github.com/gregjones/httpcache/redis/redis.go @@ -2,7 +2,7 @@ package redis import ( - "github.com/garyburd/redigo/redis" + "github.com/gomodule/redigo/redis" "github.com/gregjones/httpcache" ) diff --git a/vendor/github.com/gregjones/httpcache/redis/redis_test.go b/vendor/github.com/gregjones/httpcache/redis/redis_test.go index 72f6f619..56f7dd52 100644 --- a/vendor/github.com/gregjones/httpcache/redis/redis_test.go +++ b/vendor/github.com/gregjones/httpcache/redis/redis_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/garyburd/redigo/redis" + "github.com/gomodule/redigo/redis" ) func TestRedisCache(t *testing.T) { diff --git a/vendor/github.com/kubernetes-incubator/service-catalog/docsite/docs b/vendor/github.com/kubernetes-incubator/service-catalog/docsite/docs deleted file mode 120000 index a9594bfe..00000000 --- a/vendor/github.com/kubernetes-incubator/service-catalog/docsite/docs +++ /dev/null @@ -1 +0,0 @@ -../docs \ No newline at end of file diff --git a/vendor/github.com/onsi/ginkgo/.gitignore b/vendor/github.com/onsi/ginkgo/.gitignore index 18793c24..b9f9659d 100644 --- a/vendor/github.com/onsi/ginkgo/.gitignore +++ b/vendor/github.com/onsi/ginkgo/.gitignore @@ -4,4 +4,4 @@ tmp/**/* *.coverprofile .vscode .idea/ -*.log \ No newline at end of file +*.log diff --git a/vendor/github.com/onsi/ginkgo/.travis.yml b/vendor/github.com/onsi/ginkgo/.travis.yml index 7ad39b78..3900878b 100644 --- a/vendor/github.com/onsi/ginkgo/.travis.yml +++ b/vendor/github.com/onsi/ginkgo/.travis.yml @@ -5,6 +5,7 @@ go: - 1.8.x - 1.9.x - 1.10.x + - 1.11.x install: - go get -v -t ./... diff --git a/vendor/github.com/onsi/ginkgo/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/CHANGELOG.md index 32370206..d7d79701 100644 --- a/vendor/github.com/onsi/ginkgo/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/CHANGELOG.md @@ -1,3 +1,12 @@ +## 1.7.0 + +### New Features +- Add JustAfterEach (#484) [0d4f080] + +### Fixes +- Correctly round suite time in junit reporter [2445fc1] +- Avoid using -i argument to go test for Golang 1.10+ [46bbc26] + ## 1.6.0 ### New Features diff --git a/vendor/github.com/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go index d4ed1fa5..5e509313 100644 --- a/vendor/github.com/onsi/ginkgo/config/config.go +++ b/vendor/github.com/onsi/ginkgo/config/config.go @@ -20,7 +20,7 @@ import ( "fmt" ) -const VERSION = "1.6.0" +const VERSION = "1.7.0" type GinkgoConfigType struct { RandomSeed int64 diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_suite_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_suite_test.go index ca4613e6..72b73321 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_suite_test.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot_suite_test.go @@ -47,6 +47,7 @@ var SynchronizedBeforeSuite = ginkgo.SynchronizedBeforeSuite var SynchronizedAfterSuite = ginkgo.SynchronizedAfterSuite var BeforeEach = ginkgo.BeforeEach var JustBeforeEach = ginkgo.JustBeforeEach +var JustAfterEach = ginkgo.JustAfterEach var AfterEach = ginkgo.AfterEach // Declarations for Gomega DSL diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args.go new file mode 100644 index 00000000..3b1a238c --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args.go @@ -0,0 +1,7 @@ +// +build go1.10 + +package testrunner + +var ( + buildArgs = []string{"test", "-c"} +) diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args_old.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args_old.go new file mode 100644 index 00000000..14d70dbc --- /dev/null +++ b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args_old.go @@ -0,0 +1,7 @@ +// +build !go1.10 + +package testrunner + +var ( + buildArgs = []string{"test", "-c", "-i"} +) diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go index 97a83145..a0113e13 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go @@ -64,7 +64,9 @@ func (t *TestRunner) Compile() error { } func (t *TestRunner) BuildArgs(path string) []string { - args := []string{"test", "-c", "-i", "-o", path, t.Suite.Path} + args := make([]string, len(buildArgs), len(buildArgs)+3) + copy(args, buildArgs) + args = append(args, "-o", path, t.Suite.Path) if t.getCoverMode() != "" { args = append(args, "-cover", fmt.Sprintf("-covermode=%s", t.getCoverMode())) diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go index b6f55677..69191704 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner_test.go @@ -36,10 +36,13 @@ var _ = Describe("TestRunner", func() { tr := testrunner.New(testsuite.TestSuite{}, 1, false, 0, opts, []string{}) args := tr.BuildArgs(".") + // Remove the "-i" argument; This is discarded in Golang 1.10+. + if args[2] == "-i" { + args = append(args[0:2], args[3:]...) + } Ω(args).Should(Equal([]string{ "test", "-c", - "-i", "-o", ".", "", diff --git a/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go b/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go index 158acdd5..5aa96b4d 100644 --- a/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go +++ b/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go @@ -590,6 +590,16 @@ func JustBeforeEach(body interface{}, timeout ...float64) bool { return true } +//JustAfterEach blocks are run after It blocks but *before* all AfterEach blocks. For more details, +//read the [documentation](http://onsi.github.io/ginkgo/#separating_creation_and_configuration_) +// +//Like It blocks, JustAfterEach blocks can be made asynchronous by providing a body function that accepts +//a Done channel +func JustAfterEach(body interface{}, timeout ...float64) bool { + globalSuite.PushJustAfterEachNode(body, codelocation.New(1), parseTimeout(timeout...)) + return true +} + //AfterEach blocks are run after It blocks. When multiple AfterEach blocks are defined in nested //Describe and Context blocks the innermost AfterEach blocks are run first. // diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go index b4654cd2..e3e9cb7c 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go @@ -40,3 +40,9 @@ func NewJustBeforeEachNode(body interface{}, codeLocation types.CodeLocation, ti runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeJustBeforeEach, componentIndex), } } + +func NewJustAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode { + return &SetupNode{ + runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeJustAfterEach, componentIndex), + } +} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go index d5b9251f..9810688c 100644 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go +++ b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes_test.go @@ -37,4 +37,12 @@ var _ = Describe("Setup Nodes", func() { Ω(justBeforeEach.CodeLocation()).Should(Equal(codeLocation)) }) }) + Describe("JustAfterEachNodes", func() { + It("should report the correct type and code location", func() { + codeLocation := codelocation.New(0) + justAfterEach := NewJustAfterEachNode(func() {}, codeLocation, 0, nil, 3) + Ω(justAfterEach.Type()).Should(Equal(types.SpecComponentTypeJustAfterEach)) + Ω(justAfterEach.CodeLocation()).Should(Equal(codeLocation)) + }) + }) }) diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/spec.go b/vendor/github.com/onsi/ginkgo/internal/spec/spec.go index 77b23a4c..7fd68ee8 100644 --- a/vendor/github.com/onsi/ginkgo/internal/spec/spec.go +++ b/vendor/github.com/onsi/ginkgo/internal/spec/spec.go @@ -161,6 +161,18 @@ func (spec *Spec) runSample(sample int, writer io.Writer) { innerMostContainerIndexToUnwind := -1 defer func() { + for i := innerMostContainerIndexToUnwind; i >= 0; i-- { + container := spec.containers[i] + for _, justAfterEach := range container.SetupNodesOfType(types.SpecComponentTypeJustAfterEach) { + spec.announceSetupNode(writer, "JustAfterEach", container, justAfterEach) + justAfterEachState, justAfterEachFailure := justAfterEach.Run() + if justAfterEachState != types.SpecStatePassed && spec.state == types.SpecStatePassed { + spec.state = justAfterEachState + spec.failure = justAfterEachFailure + } + } + } + for i := innerMostContainerIndexToUnwind; i >= 0; i-- { container := spec.containers[i] for _, afterEach := range container.SetupNodesOfType(types.SpecComponentTypeAfterEach) { diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go b/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go index 7011a42e..b4a2c9c7 100644 --- a/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go +++ b/vendor/github.com/onsi/ginkgo/internal/spec/spec_test.go @@ -67,6 +67,10 @@ var _ = Describe("Spec", func() { return leafnodes.NewJustBeforeEachNode(newBody(text, fail), codeLocation, 0, failer, 0) } + newJusAft := func(text string, fail bool) leafnodes.BasicNode { + return leafnodes.NewJustAfterEachNode(newBody(text, fail), codeLocation, 0, failer, 0) + } + newContainer := func(text string, flag types.FlagType, setupNodes ...leafnodes.BasicNode) *containernode.ContainerNode { c := containernode.New(text, flag, codeLocation) for _, node := range setupNodes { @@ -279,6 +283,8 @@ var _ = Describe("Spec", func() { newBef("outer bef B", failingNodes["outer bef B"]), newJusBef("outer jusbef A", failingNodes["outer jusbef A"]), newJusBef("outer jusbef B", failingNodes["outer jusbef B"]), + newJusAft("outer jusaft A", failingNodes["outer jusaft A"]), + newJusAft("outer jusaft B", failingNodes["outer jusaft B"]), newAft("outer aft A", failingNodes["outer aft A"]), newAft("outer aft B", failingNodes["outer aft B"]), ), @@ -287,6 +293,8 @@ var _ = Describe("Spec", func() { newBef("inner bef B", failingNodes["inner bef B"]), newJusBef("inner jusbef A", failingNodes["inner jusbef A"]), newJusBef("inner jusbef B", failingNodes["inner jusbef B"]), + newJusAft("inner jusaft A", failingNodes["inner jusaft A"]), + newJusAft("inner jusaft B", failingNodes["inner jusaft B"]), newAft("inner aft A", failingNodes["inner aft A"]), newAft("inner aft B", failingNodes["inner aft B"]), ), @@ -310,6 +318,10 @@ var _ = Describe("Spec", func() { "inner jusbef A", "inner jusbef B", "it node", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", "inner aft A", "inner aft B", "outer aft A", @@ -336,6 +348,10 @@ var _ = Describe("Spec", func() { "inner jusbef A", "inner jusbef B", "it node", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", "inner aft A", "inner aft B", "outer aft A", @@ -357,6 +373,10 @@ var _ = Describe("Spec", func() { "outer bef A", "outer bef B", "inner bef A", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", "inner aft A", "inner aft B", "outer aft A", @@ -377,6 +397,8 @@ var _ = Describe("Spec", func() { Ω(nodesThatRan).Should(Equal([]string{ "outer bef A", "outer bef B", + "outer jusaft A", + "outer jusaft B", "outer aft A", "outer aft B", })) @@ -402,6 +424,10 @@ var _ = Describe("Spec", func() { "inner jusbef A", "inner jusbef B", "it node", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", "inner aft A", "inner aft B", "outer aft A", @@ -426,6 +452,10 @@ var _ = Describe("Spec", func() { "inner bef B", "outer jusbef A", "outer jusbef B", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", "inner aft A", "inner aft B", "outer aft A", @@ -435,6 +465,37 @@ var _ = Describe("Spec", func() { }) }) + Context("when a just after each fails", func() { + BeforeEach(func() { + failingNodes["outer jusaft A"] = true + }) + + It("should run all other afters, but mark the test as failed", func() { + Ω(spec.Passed()).Should(BeFalse()) + Ω(spec.Failed()).Should(BeTrue()) + Ω(nodesThatRan).Should(Equal([]string{ + "outer bef A", + "outer bef B", + "inner bef A", + "inner bef B", + "outer jusbef A", + "outer jusbef B", + "inner jusbef A", + "inner jusbef B", + "it node", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", + "inner aft A", + "inner aft B", + "outer aft A", + "outer aft B", + })) + Ω(spec.Summary("").Failure.Message).Should(Equal("outer jusaft A")) + }) + }) + Context("when an after fails after an earlier node has failed", func() { BeforeEach(func() { failingNodes["it node"] = true @@ -454,6 +515,10 @@ var _ = Describe("Spec", func() { "inner jusbef A", "inner jusbef B", "it node", + "inner jusaft A", + "inner jusaft B", + "outer jusaft A", + "outer jusaft B", "inner aft A", "inner aft B", "outer aft A", @@ -474,6 +539,7 @@ var _ = Describe("Spec", func() { newContainer("container", noneFlag, newBef("bef A", false), newJusBef("jusbef A", false), + newJusAft("jusaft A", false), newAft("aft A", false), ), ), @@ -487,14 +553,17 @@ var _ = Describe("Spec", func() { "bef A", "jusbef A", "measure node", + "jusaft A", "aft A", "bef A", "jusbef A", "measure node", + "jusaft A", "aft A", "bef A", "jusbef A", "measure node", + "jusaft A", "aft A", })) }) @@ -508,6 +577,7 @@ var _ = Describe("Spec", func() { newContainer("container", noneFlag, newBef("bef A", false), newJusBef("jusbef A", false), + newJusAft("jusaft A", false), newAft("aft A", false), ), ), @@ -521,6 +591,7 @@ var _ = Describe("Spec", func() { "bef A", "jusbef A", "measure node", + "jusaft A", "aft A", })) }) @@ -628,11 +699,13 @@ var _ = Describe("Spec", func() { newContainer("outer container", noneFlag, newBef("outer bef A", false), newJusBef("outer jusbef A", false), + newJusAft("outer jusaft A", false), newAft("outer aft A", false), ), newContainer("inner container", noneFlag, newBef("inner bef A", false), newJusBef("inner jusbef A", false), + newJusAft("inner jusaft A", false), newAft("inner aft A", false), ), ), @@ -645,11 +718,13 @@ var _ = Describe("Spec", func() { Ω(buffer).Should(gbytes.Say(`\[JustBeforeEach\] outer container`)) Ω(buffer).Should(gbytes.Say(`\[JustBeforeEach\] inner container`)) Ω(buffer).Should(gbytes.Say(`\[It\] it node`)) + Ω(buffer).Should(gbytes.Say(`\[JustAfterEach\] inner container`)) + Ω(buffer).Should(gbytes.Say(`\[JustAfterEach\] outer container`)) Ω(buffer).Should(gbytes.Say(`\[AfterEach\] inner container`)) Ω(buffer).Should(gbytes.Say(`\[AfterEach\] outer container`)) }) - It("should emit progress to the writer as it runs Befores, JustBefores, Afters, and Measures", func() { + It("should emit progress to the writer as it runs Befores, JustBefores, JustAfters, Afters, and Measures", func() { spec = New( newMeasure("measure node", noneFlag, false, 2), containers(), diff --git a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go index f311e9a0..3104bbc8 100644 --- a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go +++ b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go @@ -175,6 +175,13 @@ func (suite *Suite) PushJustBeforeEachNode(body interface{}, codeLocation types. suite.currentContainer.PushSetupNode(leafnodes.NewJustBeforeEachNode(body, codeLocation, timeout, suite.failer, suite.containerIndex)) } +func (suite *Suite) PushJustAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { + if suite.running { + suite.failer.Fail("You may only call JustAfterEach from within a Describe or Context", codeLocation) + } + suite.currentContainer.PushSetupNode(leafnodes.NewJustAfterEachNode(body, codeLocation, timeout, suite.failer, suite.containerIndex)) +} + func (suite *Suite) PushAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { if suite.running { suite.failer.Fail("You may only call AfterEach from within a Describe, Context or When", codeLocation) diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go index 65b8964e..2c9f3c79 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go +++ b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go @@ -121,7 +121,7 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) { func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { reporter.suite.Tests = summary.NumberOfSpecsThatWillBeRun - reporter.suite.Time = math.Trunc(summary.RunTime.Seconds() * 1000 / 1000) + reporter.suite.Time = math.Trunc(summary.RunTime.Seconds()*1000) / 1000 reporter.suite.Failures = summary.NumberOfFailedSpecs reporter.suite.Errors = 0 file, err := os.Create(reporter.filename) diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go index 605169cb..9b75dc00 100644 --- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go +++ b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter_test.go @@ -19,7 +19,8 @@ var _ = Describe("JUnit Reporter", func() { outputFile string reporter Reporter ) - testSuiteTime := 12345 * time.Millisecond + testSuiteTime := 12456999 * time.Microsecond + reportedSuiteTime := 12.456 readOutputFile := func() reporters.JUnitTestSuite { bytes, err := ioutil.ReadFile(outputFile) @@ -80,7 +81,7 @@ var _ = Describe("JUnit Reporter", func() { Ω(output.Name).Should(Equal("My test suite")) Ω(output.Tests).Should(Equal(1)) Ω(output.Failures).Should(Equal(0)) - Ω(output.Time).Should(Equal(12.0)) + Ω(output.Time).Should(Equal(reportedSuiteTime)) Ω(output.Errors).Should(Equal(0)) Ω(output.TestCases).Should(HaveLen(1)) Ω(output.TestCases[0].Name).Should(Equal("A B C")) @@ -118,7 +119,7 @@ var _ = Describe("JUnit Reporter", func() { Ω(output.Name).Should(Equal("My test suite")) Ω(output.Tests).Should(Equal(1)) Ω(output.Failures).Should(Equal(1)) - Ω(output.Time).Should(Equal(12.0)) + Ω(output.Time).Should(Equal(reportedSuiteTime)) Ω(output.Errors).Should(Equal(0)) Ω(output.TestCases[0].Name).Should(Equal("BeforeSuite")) Ω(output.TestCases[0].Time).Should(Equal(3.0)) @@ -158,7 +159,7 @@ var _ = Describe("JUnit Reporter", func() { Ω(output.Name).Should(Equal("My test suite")) Ω(output.Tests).Should(Equal(1)) Ω(output.Failures).Should(Equal(1)) - Ω(output.Time).Should(Equal(12.0)) + Ω(output.Time).Should(Equal(reportedSuiteTime)) Ω(output.Errors).Should(Equal(0)) Ω(output.TestCases[0].Name).Should(Equal("AfterSuite")) Ω(output.TestCases[0].Time).Should(Equal(3.0)) @@ -210,7 +211,7 @@ var _ = Describe("JUnit Reporter", func() { Ω(output.Name).Should(Equal("My test suite")) Ω(output.Tests).Should(Equal(1)) Ω(output.Failures).Should(Equal(1)) - Ω(output.Time).Should(Equal(12.0)) + Ω(output.Time).Should(Equal(reportedSuiteTime)) Ω(output.Errors).Should(Equal(0)) Ω(output.TestCases[0].Name).Should(Equal("A B C")) Ω(output.TestCases[0].ClassName).Should(Equal("My test suite")) @@ -247,7 +248,7 @@ var _ = Describe("JUnit Reporter", func() { output := readOutputFile() Ω(output.Tests).Should(Equal(1)) Ω(output.Failures).Should(Equal(0)) - Ω(output.Time).Should(Equal(12.0)) + Ω(output.Time).Should(Equal(reportedSuiteTime)) Ω(output.Errors).Should(Equal(0)) Ω(output.TestCases[0].Name).Should(Equal("A B C")) Ω(output.TestCases[0].Skipped).ShouldNot(BeNil()) diff --git a/vendor/github.com/onsi/ginkgo/types/types.go b/vendor/github.com/onsi/ginkgo/types/types.go index baf1bd1c..0e89521b 100644 --- a/vendor/github.com/onsi/ginkgo/types/types.go +++ b/vendor/github.com/onsi/ginkgo/types/types.go @@ -159,6 +159,7 @@ const ( SpecComponentTypeAfterSuite SpecComponentTypeBeforeEach SpecComponentTypeJustBeforeEach + SpecComponentTypeJustAfterEach SpecComponentTypeAfterEach SpecComponentTypeIt SpecComponentTypeMeasure diff --git a/vendor/github.com/onsi/gomega/.travis.yml b/vendor/github.com/onsi/gomega/.travis.yml index 783fb3b4..4d71367f 100644 --- a/vendor/github.com/onsi/gomega/.travis.yml +++ b/vendor/github.com/onsi/gomega/.travis.yml @@ -1,4 +1,5 @@ language: go + go: - 1.6.x - 1.7.x @@ -7,10 +8,16 @@ go: - 1.10.x - 1.11.x +env: + - GO111MODULE=on + install: - - env GO111MODULE=on go get -v ./... - - env GO111MODULE=on go build ./... + - go get -v ./... + - go build ./... - go get github.com/onsi/ginkgo - go install github.com/onsi/ginkgo/ginkgo -script: env GO111MODULE=on $HOME/gopath/bin/ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race && env GO111MODULE=on go vet +script: | + $HOME/gopath/bin/ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race && + go vet && + [ -z "`gofmt -l -e -s -w .`" ] diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md index f2aaea4e..9153294f 100644 --- a/vendor/github.com/onsi/gomega/CHANGELOG.md +++ b/vendor/github.com/onsi/gomega/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.4.3 + +### Fixes: + +- ensure file name and line numbers are correctly reported for XUnit [6fff58f] +- Fixed matcher for content-type (#305) [69d9b43] + ## 1.4.2 ### Fixes: diff --git a/vendor/github.com/onsi/gomega/ghttp/handlers.go b/vendor/github.com/onsi/gomega/ghttp/handlers.go index 82bc1412..894eae6d 100644 --- a/vendor/github.com/onsi/gomega/ghttp/handlers.go +++ b/vendor/github.com/onsi/gomega/ghttp/handlers.go @@ -8,6 +8,7 @@ import ( "net/http" "net/url" "reflect" + "strings" "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" @@ -55,6 +56,14 @@ func VerifyContentType(contentType string) http.HandlerFunc { } } +//VerifyMimeType returns a handler that verifies that a request has a specified mime type set +//in Content-Type header +func VerifyMimeType(mimeType string) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + Expect(strings.Split(req.Header.Get("Content-Type"), ";")[0]).Should(Equal(mimeType)) + } +} + //VerifyBasicAuth returns a handler that verifies the request contains a BasicAuth Authorization header //matching the passed in username and password func VerifyBasicAuth(username string, password string) http.HandlerFunc { @@ -109,7 +118,7 @@ func VerifyBody(expectedBody []byte) http.HandlerFunc { //VerifyJSON also verifies that the request's content type is application/json func VerifyJSON(expectedJSON string) http.HandlerFunc { return CombineHandlers( - VerifyContentType("application/json"), + VerifyMimeType("application/json"), func(w http.ResponseWriter, req *http.Request) { body, err := ioutil.ReadAll(req.Body) req.Body.Close() diff --git a/vendor/github.com/onsi/gomega/ghttp/test_server_test.go b/vendor/github.com/onsi/gomega/ghttp/test_server_test.go index ac6a269a..be1c58e8 100644 --- a/vendor/github.com/onsi/gomega/ghttp/test_server_test.go +++ b/vendor/github.com/onsi/gomega/ghttp/test_server_test.go @@ -372,6 +372,17 @@ var _ = Describe("TestServer", func() { }) Expect(failures).Should(HaveLen(1)) }) + + It("should verify the content type", func() { + req, err := http.NewRequest("GET", s.URL()+"/foo", nil) + Expect(err).ShouldNot(HaveOccurred()) + req.Header.Set("Content-Type", "application/octet-stream; charset=utf-8") + + failures := InterceptGomegaFailures(func() { + http.DefaultClient.Do(req) + }) + Expect(failures).Should(HaveLen(1)) + }) }) Describe("Verify BasicAuth", func() { @@ -509,6 +520,26 @@ var _ = Describe("TestServer", func() { }) }) + Describe("VerifyMimeType", func() { + BeforeEach(func() { + s.AppendHandlers(CombineHandlers( + VerifyMimeType("application/json"), + )) + }) + + It("should verify the mime type in content-type header", func() { + resp, err = http.Post(s.URL()+"/foo", "application/json; charset=utf-8", bytes.NewReader([]byte(`{}`))) + Expect(err).ShouldNot(HaveOccurred()) + }) + + It("should verify the mime type in content-type header", func() { + failures := InterceptGomegaFailures(func() { + http.Post(s.URL()+"/foo", "text/plain", bytes.NewReader([]byte(`{}`))) + }) + Expect(failures).Should(HaveLen(1)) + }) + }) + Describe("VerifyJSON", func() { BeforeEach(func() { s.AppendHandlers(CombineHandlers( @@ -535,6 +566,11 @@ var _ = Describe("TestServer", func() { }) Expect(failures).Should(HaveLen(1)) }) + + It("should verify the json body and the content type", func() { + resp, err = http.Post(s.URL()+"/foo", "application/json; charset=utf-8", bytes.NewReader([]byte(`{"b":2, "a":3}`))) + Expect(err).ShouldNot(HaveOccurred()) + }) }) Describe("VerifyJSONRepresenting", func() { diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go index 51d7872f..471f691a 100644 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ b/vendor/github.com/onsi/gomega/gomega_dsl.go @@ -24,7 +24,7 @@ import ( "github.com/onsi/gomega/types" ) -const GOMEGA_VERSION = "1.4.2" +const GOMEGA_VERSION = "1.4.3" const nilFailHandlerPanic = `You are trying to make an assertion, but Gomega's fail handler is nil. If you're using Ginkgo then you probably forgot to put your assertion in an It(). @@ -46,12 +46,25 @@ func RegisterFailHandler(handler types.GomegaFailHandler) { globalFailWrapper = nil return } + globalFailWrapper = &types.GomegaFailWrapper{ Fail: handler, TWithHelper: testingtsupport.EmptyTWithHelper{}, } } +func RegisterFailHandlerWithT(t types.TWithHelper, handler types.GomegaFailHandler) { + if handler == nil { + globalFailWrapper = nil + return + } + + globalFailWrapper = &types.GomegaFailWrapper{ + Fail: handler, + TWithHelper: t, + } +} + //RegisterTestingT connects Gomega to Golang's XUnit style //Testing.T tests. It is now deprecated and you should use NewGomegaWithT() instead. // @@ -74,7 +87,12 @@ func RegisterFailHandler(handler types.GomegaFailHandler) { // // (As an aside: Ginkgo gets around this limitation by running parallel tests in different *processes*). func RegisterTestingT(t types.GomegaTestingT) { - RegisterFailHandler(testingtsupport.BuildTestingTGomegaFailWrapper(t).Fail) + tWithHelper, hasHelper := t.(types.TWithHelper) + if !hasHelper { + RegisterFailHandler(testingtsupport.BuildTestingTGomegaFailWrapper(t).Fail) + return + } + RegisterFailHandlerWithT(tWithHelper, testingtsupport.BuildTestingTGomegaFailWrapper(t).Fail) } //InterceptGomegaHandlers runs a given callback and returns an array of diff --git a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go index ed6f6928..80c9c8bb 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go @@ -23,8 +23,8 @@ func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err err } winnerIndex, _, open := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectRecv, Chan: channelValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, + {Dir: reflect.SelectRecv, Chan: channelValue}, + {Dir: reflect.SelectDefault}, }) var closed bool diff --git a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go index c7d7c3f7..a32d2b8b 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go +++ b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher_test.go @@ -75,13 +75,13 @@ var _ = Describe("BeNumerically", func() { Expect(5.00000001).ShouldNot(BeNumerically("~", 5.0000001)) }) - It("should show failure message", func(){ + It("should show failure message", func() { actual := BeNumerically("~", 4.98).FailureMessage(123) expected := "Expected\n : 123\nto be ~\n : 4.98" Expect(actual).To(Equal(expected)) }) - It("should show negated failure message", func(){ + It("should show negated failure message", func() { actual := BeNumerically("~", 4.98).NegatedFailureMessage(123) expected := "Expected\n : 123\nnot to be ~\n : 4.98" Expect(actual).To(Equal(expected)) @@ -96,13 +96,13 @@ var _ = Describe("BeNumerically", func() { Expect(5.1).ShouldNot(BeNumerically("~", 4.98, 0.1)) }) - It("should show precision in failure message", func(){ + It("should show precision in failure message", func() { actual := BeNumerically("~", 4.98, 0.1).FailureMessage(123) expected := "Expected\n : 123\nto be within 0.1 of ~\n : 4.98" Expect(actual).To(Equal(expected)) }) - It("should show precision in negated failure message", func(){ + It("should show precision in negated failure message", func() { actual := BeNumerically("~", 4.98, 0.1).NegatedFailureMessage(123) expected := "Expected\n : 123\nnot to be within 0.1 of ~\n : 4.98" Expect(actual).To(Equal(expected)) diff --git a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go index d7c32233..302dd1a0 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go @@ -42,8 +42,8 @@ func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error }() winnerIndex, _, _ := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectSend, Chan: channelValue, Send: argValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, + {Dir: reflect.SelectSend, Chan: channelValue, Send: argValue}, + {Dir: reflect.SelectDefault}, }) var didSend bool diff --git a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go index 015d87d1..c89e1033 100644 --- a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go +++ b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher_test.go @@ -6,7 +6,7 @@ import ( ) var _ = Describe("BeZero", func() { - It("should succeed if the passed in object is the zero value for its type", func() { + It("succeeds for zero values for its type", func() { Expect(nil).Should(BeZero()) Expect("").Should(BeZero()) @@ -27,4 +27,14 @@ var _ = Describe("BeZero", func() { Expect(myCustomType{}).Should(BeZero()) Expect(myCustomType{s: "a"}).ShouldNot(BeZero()) }) + + It("builds failure message", func() { + actual := BeZero().FailureMessage(123) + Expect(actual).To(Equal("Expected\n : 123\nto be zero-valued")) + }) + + It("builds negated failure message", func() { + actual := BeZero().NegatedFailureMessage(123) + Expect(actual).To(Equal("Expected\n : 123\nnot to be zero-valued")) + }) }) diff --git a/vendor/github.com/onsi/gomega/matchers/consist_of_test.go b/vendor/github.com/onsi/gomega/matchers/consist_of_test.go index 081830f5..f6971c4f 100644 --- a/vendor/github.com/onsi/gomega/matchers/consist_of_test.go +++ b/vendor/github.com/onsi/gomega/matchers/consist_of_test.go @@ -55,8 +55,8 @@ var _ = Describe("ConsistOf", func() { }) It("should not depend on the order of the matchers", func() { - Expect([][]int{[]int{1, 2}, []int{2}}).Should(ConsistOf(ContainElement(1), ContainElement(2))) - Expect([][]int{[]int{1, 2}, []int{2}}).Should(ConsistOf(ContainElement(2), ContainElement(1))) + Expect([][]int{{1, 2}, {2}}).Should(ConsistOf(ContainElement(1), ContainElement(2))) + Expect([][]int{{1, 2}, {2}}).Should(ConsistOf(ContainElement(2), ContainElement(1))) }) Context("when a matcher errors", func() { diff --git a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go index 070d6026..0c83c2b6 100644 --- a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go @@ -53,11 +53,11 @@ func normalise(input string) string { var val interface{} err := yaml.Unmarshal([]byte(input), &val) if err != nil { - panic(err) // guarded by Match + panic(err) // unreachable since Match already calls Unmarshal } output, err := yaml.Marshal(val) if err != nil { - panic(err) // guarded by Unmarshal + panic(err) // untested section, unreachable since we Unmarshal above } return strings.TrimSpace(string(output)) } diff --git a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher_test.go index 8e63de19..1b0044fd 100644 --- a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher_test.go +++ b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher_test.go @@ -62,6 +62,13 @@ var _ = Describe("MatchYAMLMatcher", func() { Expect(err).Should(HaveOccurred()) Expect(err.Error()).Should(ContainSubstring("Expected 'good:\nbad' should be valid YAML")) }) + + It("errors when passed directly to Message", func() { + Expect(func() { + matcher := MatchYAMLMatcher{YAMLToMatch: "good"} + matcher.FailureMessage("good:\nbad") + }).To(Panic()) + }) }) Context("when the expected is neither a string nor a stringer nor a byte array", func() { diff --git a/vendor/github.com/onsi/gomega/matchers/not_test.go b/vendor/github.com/onsi/gomega/matchers/not_test.go index b3c1fdbf..06d3ebd1 100644 --- a/vendor/github.com/onsi/gomega/matchers/not_test.go +++ b/vendor/github.com/onsi/gomega/matchers/not_test.go @@ -15,6 +15,13 @@ var _ = Describe("NotMatcher", func() { Expect(input).ToNot(Not(Not(false1))) Expect(input).To(Not(Not(Not(false2)))) }) + + It("fails on error", func() { + failuresMessages := InterceptGomegaFailures(func() { + Expect(input).To(Not(Panic())) + }) + Expect(failuresMessages).To(Equal([]string{"PanicMatcher expects a function. Got:\n : hi"})) + }) }) Context("De Morgan's laws", func() { diff --git a/vendor/github.com/onsi/gomega/matchers/or_test.go b/vendor/github.com/onsi/gomega/matchers/or_test.go index 9589a174..1f6dfaf6 100644 --- a/vendor/github.com/onsi/gomega/matchers/or_test.go +++ b/vendor/github.com/onsi/gomega/matchers/or_test.go @@ -23,6 +23,13 @@ var _ = Describe("OrMatcher", func() { Expect(input).To(SatisfyAny(false1, false2, true3)) }) + It("stops on errors", func() { + failuresMessages := InterceptGomegaFailures(func() { + Expect(input).To(Or(Panic(), true1)) + }) + Expect(failuresMessages).To(Equal([]string{"PanicMatcher expects a function. Got:\n : hi"})) + }) + It("works with negative cases", func() { Expect(input).ToNot(Or()) Expect(input).ToNot(Or(false1)) diff --git a/vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go index 96270d5a..326bb10a 100644 --- a/vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go +++ b/vendor/github.com/onsi/gomega/matchers/panic_matcher_test.go @@ -10,36 +10,43 @@ var _ = Describe("Panic", func() { Context("when passed something that's not a function that takes zero arguments and returns nothing", func() { It("should error", func() { success, err := (&PanicMatcher{}).Match("foo") - Expect(success).Should(BeFalse()) - Expect(err).Should(HaveOccurred()) + Expect(success).To(BeFalse()) + Expect(err).To(HaveOccurred()) success, err = (&PanicMatcher{}).Match(nil) - Expect(success).Should(BeFalse()) - Expect(err).Should(HaveOccurred()) + Expect(success).To(BeFalse()) + Expect(err).To(HaveOccurred()) success, err = (&PanicMatcher{}).Match(func(foo string) {}) - Expect(success).Should(BeFalse()) - Expect(err).Should(HaveOccurred()) + Expect(success).To(BeFalse()) + Expect(err).To(HaveOccurred()) success, err = (&PanicMatcher{}).Match(func() string { return "bar" }) - Expect(success).Should(BeFalse()) - Expect(err).Should(HaveOccurred()) + Expect(success).To(BeFalse()) + Expect(err).To(HaveOccurred()) }) }) Context("when passed a function of the correct type", func() { It("should call the function and pass if the function panics", func() { - Expect(func() { panic("ack!") }).Should(Panic()) - Expect(func() {}).ShouldNot(Panic()) + Expect(func() { panic("ack!") }).To(Panic()) + Expect(func() {}).NotTo(Panic()) }) }) Context("when assertion fails", func() { - It("should print the object passed to Panic", func() { + It("prints the object passed to Panic when negative", func() { failuresMessages := InterceptGomegaFailures(func() { - Expect(func() { panic("ack!") }).ShouldNot(Panic()) + Expect(func() { panic("ack!") }).NotTo(Panic()) }) - Expect(failuresMessages).Should(ConsistOf(MatchRegexp("not to panic, but panicked with\\s*: ack!"))) + Expect(failuresMessages).To(ConsistOf(ContainSubstring("not to panic, but panicked with\n : ack!"))) + }) + + It("prints simple message when positive", func() { + failuresMessages := InterceptGomegaFailures(func() { + Expect(func() {}).To(Panic()) + }) + Expect(failuresMessages).To(ConsistOf(MatchRegexp("Expected\n\\s+: .+\nto panic"))) }) }) }) diff --git a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go index fc179916..2018a612 100644 --- a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go +++ b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go @@ -39,8 +39,8 @@ func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err erro } winnerIndex, value, open := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectRecv, Chan: channelValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, + {Dir: reflect.SelectRecv, Chan: channelValue}, + {Dir: reflect.SelectDefault}, }) var closed bool diff --git a/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go index 21ea64c8..e42dd8a6 100644 --- a/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go +++ b/vendor/github.com/onsi/gomega/matchers/succeed_matcher_test.go @@ -2,10 +2,10 @@ package matchers_test import ( "errors" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/matchers" + "regexp" ) func Erroring() error { @@ -59,4 +59,14 @@ var _ = Describe("Succeed", func() { Expect(err).Should(Succeed()) }) + It("builds failure message", func() { + actual := Succeed().FailureMessage(errors.New("oops")) + actual = regexp.MustCompile(" 0x.*>").ReplaceAllString(actual, " 0x00000000>") + Expect(actual).To(Equal("Expected success, but got an error:\n <*errors.errorString | 0x00000000>: {s: \"oops\"}\n oops")) + }) + + It("builds negated failure message", func() { + actual := Succeed().NegatedFailureMessage(123) + Expect(actual).To(Equal("Expected failure, but got no error.")) + }) }) diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go index 81b37711..8aaf8759 100644 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go +++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go @@ -14,12 +14,12 @@ type BipartiteGraph struct { func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) (*BipartiteGraph, error) { left := NodeOrderedSet{} - for i, _ := range leftValues { + for i := range leftValues { left = append(left, Node{Id: i}) } right := NodeOrderedSet{} - for j, _ := range rightValues { + for j := range rightValues { right = append(right, Node{Id: j + len(left)}) } diff --git a/vendor/golang.org/x/crypto/acme/acme.go b/vendor/golang.org/x/crypto/acme/acme.go index 7df64764..c6fd9989 100644 --- a/vendor/golang.org/x/crypto/acme/acme.go +++ b/vendor/golang.org/x/crypto/acme/acme.go @@ -77,6 +77,10 @@ const ( type Client struct { // Key is the account key used to register with a CA and sign requests. // Key.Public() must return a *rsa.PublicKey or *ecdsa.PublicKey. + // + // The following algorithms are supported: + // RS256, ES256, ES384 and ES512. + // See RFC7518 for more details about the algorithms. Key crypto.Signer // HTTPClient optionally specifies an HTTP client to use diff --git a/vendor/golang.org/x/crypto/acme/autocert/autocert.go b/vendor/golang.org/x/crypto/acme/autocert/autocert.go index 4c2fc072..a50d9bfc 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/autocert.go +++ b/vendor/golang.org/x/crypto/acme/autocert/autocert.go @@ -69,7 +69,7 @@ func HostWhitelist(hosts ...string) HostPolicy { } return func(_ context.Context, host string) error { if !whitelist[host] { - return errors.New("acme/autocert: host not configured") + return fmt.Errorf("acme/autocert: host %q not configured in HostWhitelist", host) } return nil } diff --git a/vendor/golang.org/x/crypto/acme/jws.go b/vendor/golang.org/x/crypto/acme/jws.go index 6cbca25d..1093b503 100644 --- a/vendor/golang.org/x/crypto/acme/jws.go +++ b/vendor/golang.org/x/crypto/acme/jws.go @@ -25,7 +25,7 @@ func jwsEncodeJSON(claimset interface{}, key crypto.Signer, nonce string) ([]byt if err != nil { return nil, err } - alg, sha := jwsHasher(key) + alg, sha := jwsHasher(key.Public()) if alg == "" || !sha.Available() { return nil, ErrUnsupportedKey } @@ -97,13 +97,16 @@ func jwkEncode(pub crypto.PublicKey) (string, error) { } // jwsSign signs the digest using the given key. -// It returns ErrUnsupportedKey if the key type is unknown. -// The hash is used only for RSA keys. +// The hash is unused for ECDSA keys. +// +// Note: non-stdlib crypto.Signer implementations are expected to return +// the signature in the format as specified in RFC7518. +// See https://tools.ietf.org/html/rfc7518 for more details. func jwsSign(key crypto.Signer, hash crypto.Hash, digest []byte) ([]byte, error) { - switch key := key.(type) { - case *rsa.PrivateKey: - return key.Sign(rand.Reader, digest, hash) - case *ecdsa.PrivateKey: + if key, ok := key.(*ecdsa.PrivateKey); ok { + // The key.Sign method of ecdsa returns ASN1-encoded signature. + // So, we use the package Sign function instead + // to get R and S values directly and format the result accordingly. r, s, err := ecdsa.Sign(rand.Reader, key, digest) if err != nil { return nil, err @@ -118,18 +121,18 @@ func jwsSign(key crypto.Signer, hash crypto.Hash, digest []byte) ([]byte, error) copy(sig[size*2-len(sb):], sb) return sig, nil } - return nil, ErrUnsupportedKey + return key.Sign(rand.Reader, digest, hash) } // jwsHasher indicates suitable JWS algorithm name and a hash function // to use for signing a digest with the provided key. // It returns ("", 0) if the key is not supported. -func jwsHasher(key crypto.Signer) (string, crypto.Hash) { - switch key := key.(type) { - case *rsa.PrivateKey: +func jwsHasher(pub crypto.PublicKey) (string, crypto.Hash) { + switch pub := pub.(type) { + case *rsa.PublicKey: return "RS256", crypto.SHA256 - case *ecdsa.PrivateKey: - switch key.Params().Name { + case *ecdsa.PublicKey: + switch pub.Params().Name { case "P-256": return "ES256", crypto.SHA256 case "P-384": diff --git a/vendor/golang.org/x/crypto/acme/jws_test.go b/vendor/golang.org/x/crypto/acme/jws_test.go index 0ff0fb5a..ee30b1e1 100644 --- a/vendor/golang.org/x/crypto/acme/jws_test.go +++ b/vendor/golang.org/x/crypto/acme/jws_test.go @@ -5,6 +5,7 @@ package acme import ( + "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rsa" @@ -13,6 +14,7 @@ import ( "encoding/json" "encoding/pem" "fmt" + "io" "math/big" "testing" ) @@ -241,6 +243,79 @@ func TestJWSEncodeJSONEC(t *testing.T) { } } +type customTestSigner struct { + sig []byte + pub crypto.PublicKey +} + +func (s *customTestSigner) Public() crypto.PublicKey { return s.pub } +func (s *customTestSigner) Sign(io.Reader, []byte, crypto.SignerOpts) ([]byte, error) { + return s.sig, nil +} + +func TestJWSEncodeJSONCustom(t *testing.T) { + claims := struct{ Msg string }{"hello"} + const ( + // printf '{"Msg":"hello"}' | base64 | tr -d '=' | tr '/+' '_-' + payload = "eyJNc2ciOiJoZWxsbyJ9" + // printf 'testsig' | base64 | tr -d '=' + testsig = "dGVzdHNpZw" + + // printf '{"alg":"ES256","jwk":{"crv":"P-256","kty":"EC","x":,"y":,"nonce":"nonce"}' | \ + // base64 | tr -d '=' | tr '/+' '_-' + es256phead = "eyJhbGciOiJFUzI1NiIsImp3ayI6eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6IjVsaEV1" + + "ZzV4SzR4QkRaMm5BYmF4THRhTGl2ODVieEo3ZVBkMWRrTzIzSFEiLCJ5IjoiNGFpSzcyc0JlVUFH" + + "a3YwVGFMc213b2tZVVl5TnhHc1M1RU1JS3dzTklLayJ9LCJub25jZSI6Im5vbmNlIn0" + + // {"alg":"RS256","jwk":{"e":"AQAB","kty":"RSA","n":"..."},"nonce":"nonce"} + rs256phead = "eyJhbGciOiJSUzI1NiIsImp3ayI6eyJlIjoiQVFBQiIsImt0eSI6" + + "IlJTQSIsIm4iOiI0eGdaM2VSUGt3b1J2eTdxZVJVYm1NRGUwVi14" + + "SDllV0xkdTBpaGVlTGxybUQybXFXWGZQOUllU0tBcGJuMzRnOFR1" + + "QVM5ZzV6aHE4RUxRM2ttanItS1Y4NkdBTWdJNlZBY0dscTNRcnpw" + + "VENmXzMwQWI3LXphd3JmUmFGT05hMUh3RXpQWTFLSG5HVmt4SmM4" + + "NWdOa3dZSTlTWTJSSFh0dmxuM3pzNXdJVE5yZG9zcUVYZWFJa1ZZ" + + "QkVoYmhOdTU0cHAza3hvNlR1V0xpOWU2cFhlV2V0RXdtbEJ3dFda" + + "bFBvaWIyajNUeExCa3NLWmZveUZ5ZWszODBtSGdKQXVtUV9JMmZq" + + "ajk4Xzk3bWszaWhPWTRBZ1ZkQ0RqMXpfR0NvWmtHNVJxN25iQ0d5" + + "b3N5S1d5RFgwMFpzLW5OcVZob0xlSXZYQzRubldkSk1aNnJvZ3h5" + + "UVEifSwibm9uY2UiOiJub25jZSJ9" + ) + + tt := []struct { + alg, phead string + pub crypto.PublicKey + }{ + {"RS256", rs256phead, testKey.Public()}, + {"ES256", es256phead, testKeyEC.Public()}, + } + for _, tc := range tt { + tc := tc + t.Run(tc.alg, func(t *testing.T) { + signer := &customTestSigner{ + sig: []byte("testsig"), + pub: tc.pub, + } + b, err := jwsEncodeJSON(claims, signer, "nonce") + if err != nil { + t.Fatal(err) + } + var j struct{ Protected, Payload, Signature string } + if err := json.Unmarshal(b, &j); err != nil { + t.Fatal(err) + } + if j.Protected != tc.phead { + t.Errorf("j.Protected = %q\nwant %q", j.Protected, tc.phead) + } + if j.Payload != payload { + t.Errorf("j.Payload = %q\nwant %q", j.Payload, payload) + } + if j.Signature != testsig { + t.Errorf("j.Signature = %q\nwant %q", j.Signature, testsig) + } + }) + } +} + func TestJWKThumbprintRSA(t *testing.T) { // Key example from RFC 7638 const base64N = "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAt" + diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go index aecf759e..b7162d82 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go @@ -209,19 +209,19 @@ func TestMinorNotRequired(t *testing.T) { func BenchmarkEqual(b *testing.B) { b.StopTimer() passwd := []byte("somepasswordyoulike") - hash, _ := GenerateFromPassword(passwd, 10) + hash, _ := GenerateFromPassword(passwd, DefaultCost) b.StartTimer() for i := 0; i < b.N; i++ { CompareHashAndPassword(hash, passwd) } } -func BenchmarkGeneration(b *testing.B) { +func BenchmarkDefaultCost(b *testing.B) { b.StopTimer() passwd := []byte("mylongpassword1234") b.StartTimer() for i := 0; i < b.N; i++ { - GenerateFromPassword(passwd, 10) + GenerateFromPassword(passwd, DefaultCost) } } diff --git a/vendor/golang.org/x/crypto/blake2b/blake2x.go b/vendor/golang.org/x/crypto/blake2b/blake2x.go index c814496a..52c414db 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2x.go +++ b/vendor/golang.org/x/crypto/blake2b/blake2x.go @@ -29,7 +29,7 @@ type XOF interface { } // OutputLengthUnknown can be used as the size argument to NewXOF to indicate -// the the length of the output is not known in advance. +// the length of the output is not known in advance. const OutputLengthUnknown = 0 // magicUnknownOutputLength is a magic value for the output size that indicates diff --git a/vendor/golang.org/x/crypto/blake2s/blake2x.go b/vendor/golang.org/x/crypto/blake2s/blake2x.go index eaff2a7f..828749ff 100644 --- a/vendor/golang.org/x/crypto/blake2s/blake2x.go +++ b/vendor/golang.org/x/crypto/blake2s/blake2x.go @@ -29,7 +29,7 @@ type XOF interface { } // OutputLengthUnknown can be used as the size argument to NewXOF to indicate -// the the length of the output is not known in advance. +// the length of the output is not known in advance. const OutputLengthUnknown = 0 // magicUnknownOutputLength is a magic value for the output size that indicates diff --git a/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/golang.org/x/crypto/cryptobyte/builder.go index 29b4c764..ca7b1db5 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/builder.go +++ b/vendor/golang.org/x/crypto/cryptobyte/builder.go @@ -50,8 +50,14 @@ func NewFixedBuilder(buffer []byte) *Builder { } } +// SetError sets the value to be returned as the error from Bytes. Writes +// performed after calling SetError are ignored. +func (b *Builder) SetError(err error) { + b.err = err +} + // Bytes returns the bytes written by the builder or an error if one has -// occurred during during building. +// occurred during building. func (b *Builder) Bytes() ([]byte, error) { if b.err != nil { return nil, b.err @@ -94,7 +100,7 @@ func (b *Builder) AddBytes(v []byte) { b.add(v...) } -// BuilderContinuation is continuation-passing interface for building +// BuilderContinuation is a continuation-passing interface for building // length-prefixed byte sequences. Builder methods for length-prefixed // sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation // supplied to them. The child builder passed to the continuation can be used @@ -268,9 +274,11 @@ func (b *Builder) flushChild() { return } - if !b.fixedSize { - b.result = child.result // In case child reallocated result. + if b.fixedSize && &b.result[0] != &child.result[0] { + panic("cryptobyte: BuilderContinuation reallocated a fixed-size buffer") } + + b.result = child.result } func (b *Builder) add(bytes ...byte) { @@ -278,7 +286,7 @@ func (b *Builder) add(bytes ...byte) { return } if b.child != nil { - panic("attempted write while child is pending") + panic("cryptobyte: attempted write while child is pending") } if len(b.result)+len(bytes) < len(bytes) { b.err = errors.New("cryptobyte: length overflow") @@ -290,6 +298,26 @@ func (b *Builder) add(bytes ...byte) { b.result = append(b.result, bytes...) } +// Unwrite rolls back n bytes written directly to the Builder. An attempt by a +// child builder passed to a continuation to unwrite bytes from its parent will +// panic. +func (b *Builder) Unwrite(n int) { + if b.err != nil { + return + } + if b.child != nil { + panic("cryptobyte: attempted unwrite while child is pending") + } + length := len(b.result) - b.pendingLenLen - b.offset + if length < 0 { + panic("cryptobyte: internal error") + } + if n > length { + panic("cryptobyte: attempted to unwrite more than was written") + } + b.result = b.result[:len(b.result)-n] +} + // A MarshalingValue marshals itself into a Builder. type MarshalingValue interface { // Marshal is called by Builder.AddValue. It receives a pointer to a builder diff --git a/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go b/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go index f294dd55..fb637091 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go +++ b/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go @@ -327,12 +327,14 @@ func TestWriteWithPendingChild(t *testing.T) { var b Builder b.AddUint8LengthPrefixed(func(c *Builder) { c.AddUint8LengthPrefixed(func(d *Builder) { - defer func() { - if recover() == nil { - t.Errorf("recover() = nil, want error; c.AddUint8() did not panic") - } + func() { + defer func() { + if recover() == nil { + t.Errorf("recover() = nil, want error; c.AddUint8() did not panic") + } + }() + c.AddUint8(2) // panics }() - c.AddUint8(2) // panics defer func() { if recover() == nil { @@ -351,6 +353,92 @@ func TestWriteWithPendingChild(t *testing.T) { }) } +func TestSetError(t *testing.T) { + const errorStr = "TestSetError" + var b Builder + b.SetError(errors.New(errorStr)) + + ret, err := b.Bytes() + if ret != nil { + t.Error("expected nil result") + } + if err == nil { + t.Fatal("unexpected nil error") + } + if s := err.Error(); s != errorStr { + t.Errorf("expected error %q, got %v", errorStr, s) + } +} + +func TestUnwrite(t *testing.T) { + var b Builder + b.AddBytes([]byte{1, 2, 3, 4, 5}) + b.Unwrite(2) + if err := builderBytesEq(&b, 1, 2, 3); err != nil { + t.Error(err) + } + + func() { + defer func() { + if recover() == nil { + t.Errorf("recover() = nil, want error; b.Unwrite() did not panic") + } + }() + b.Unwrite(4) // panics + }() + + b = Builder{} + b.AddBytes([]byte{1, 2, 3, 4, 5}) + b.AddUint8LengthPrefixed(func(b *Builder) { + b.AddBytes([]byte{1, 2, 3, 4, 5}) + + defer func() { + if recover() == nil { + t.Errorf("recover() = nil, want error; b.Unwrite() did not panic") + } + }() + b.Unwrite(6) // panics + }) + + b = Builder{} + b.AddBytes([]byte{1, 2, 3, 4, 5}) + b.AddUint8LengthPrefixed(func(c *Builder) { + defer func() { + if recover() == nil { + t.Errorf("recover() = nil, want error; b.Unwrite() did not panic") + } + }() + b.Unwrite(2) // panics (attempted unwrite while child is pending) + }) +} + +func TestFixedBuilderLengthPrefixed(t *testing.T) { + bufCap := 10 + inner := bytes.Repeat([]byte{0xff}, bufCap-2) + buf := make([]byte, 0, bufCap) + b := NewFixedBuilder(buf) + b.AddUint16LengthPrefixed(func(b *Builder) { + b.AddBytes(inner) + }) + if got := b.BytesOrPanic(); len(got) != bufCap { + t.Errorf("Expected output length to be %d, got %d", bufCap, len(got)) + } +} + +func TestFixedBuilderPanicReallocate(t *testing.T) { + defer func() { + recover() + }() + + b := NewFixedBuilder(make([]byte, 0, 10)) + b1 := NewFixedBuilder(make([]byte, 0, 10)) + b.AddUint16LengthPrefixed(func(b *Builder) { + *b = *b1 + }) + + t.Error("Builder did not panic") +} + // ASN.1 func TestASN1Int64(t *testing.T) { diff --git a/vendor/golang.org/x/crypto/hkdf/example_test.go b/vendor/golang.org/x/crypto/hkdf/example_test.go index df843951..e89c260e 100644 --- a/vendor/golang.org/x/crypto/hkdf/example_test.go +++ b/vendor/golang.org/x/crypto/hkdf/example_test.go @@ -9,49 +9,44 @@ import ( "crypto/rand" "crypto/sha256" "fmt" - "golang.org/x/crypto/hkdf" "io" + + "golang.org/x/crypto/hkdf" ) -// Usage example that expands one master key into three other cryptographically -// secure keys. +// Usage example that expands one master secret into three other +// cryptographically secure keys. func Example_usage() { - // Underlying hash function to use + // Underlying hash function for HMAC. hash := sha256.New - // Cryptographically secure master key. - master := []byte{0x00, 0x01, 0x02, 0x03} // i.e. NOT this. + // Cryptographically secure master secret. + secret := []byte{0x00, 0x01, 0x02, 0x03} // i.e. NOT this. - // Non secret salt, optional (can be nil) - // Recommended: hash-length sized random + // Non-secret salt, optional (can be nil). + // Recommended: hash-length random value. salt := make([]byte, hash().Size()) - n, err := io.ReadFull(rand.Reader, salt) - if n != len(salt) || err != nil { - fmt.Println("error:", err) - return + if _, err := rand.Read(salt); err != nil { + panic(err) } - // Non secret context specific info, optional (can be nil). - // Note, independent from the master key. - info := []byte{0x03, 0x14, 0x15, 0x92, 0x65} - - // Create the key derivation function - hkdf := hkdf.New(hash, master, salt, info) - - // Generate the required keys - keys := make([][]byte, 3) - for i := 0; i < len(keys); i++ { - keys[i] = make([]byte, 24) - n, err := io.ReadFull(hkdf, keys[i]) - if n != len(keys[i]) || err != nil { - fmt.Println("error:", err) - return + // Non-secret context info, optional (can be nil). + info := []byte("hkdf example") + + // Generate three 128-bit derived keys. + hkdf := hkdf.New(hash, secret, salt, info) + + var keys [][]byte + for i := 0; i < 3; i++ { + key := make([]byte, 16) + if _, err := io.ReadFull(hkdf, key); err != nil { + panic(err) } + keys = append(keys, key) } - // Keys should contain 192 bit random keys - for i := 1; i <= len(keys); i++ { - fmt.Printf("Key #%d: %v\n", i, !bytes.Equal(keys[i-1], make([]byte, 24))) + for i := range keys { + fmt.Printf("Key #%d: %v\n", i+1, !bytes.Equal(keys[i], make([]byte, 16))) } // Output: diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/golang.org/x/crypto/hkdf/hkdf.go index 5bc24635..dda3f143 100644 --- a/vendor/golang.org/x/crypto/hkdf/hkdf.go +++ b/vendor/golang.org/x/crypto/hkdf/hkdf.go @@ -8,8 +8,6 @@ // HKDF is a cryptographic key derivation function (KDF) with the goal of // expanding limited input keying material into one or more cryptographically // strong secret keys. -// -// RFC 5869: https://tools.ietf.org/html/rfc5869 package hkdf // import "golang.org/x/crypto/hkdf" import ( @@ -19,6 +17,21 @@ import ( "io" ) +// Extract generates a pseudorandom key for use with Expand from an input secret +// and an optional independent salt. +// +// Only use this function if you need to reuse the extracted key with multiple +// Expand invocations and different context values. Most common scenarios, +// including the generation of multiple keys, should use New instead. +func Extract(hash func() hash.Hash, secret, salt []byte) []byte { + if salt == nil { + salt = make([]byte, hash().Size()) + } + extractor := hmac.New(hash, salt) + extractor.Write(secret) + return extractor.Sum(nil) +} + type hkdf struct { expander hash.Hash size int @@ -26,22 +39,22 @@ type hkdf struct { info []byte counter byte - prev []byte - cache []byte + prev []byte + buf []byte } func (f *hkdf) Read(p []byte) (int, error) { // Check whether enough data can be generated need := len(p) - remains := len(f.cache) + int(255-f.counter+1)*f.size + remains := len(f.buf) + int(255-f.counter+1)*f.size if remains < need { return 0, errors.New("hkdf: entropy limit reached") } - // Read from the cache, if enough data is present - n := copy(p, f.cache) + // Read any leftover from the buffer + n := copy(p, f.buf) p = p[n:] - // Fill the buffer + // Fill the rest of the buffer for len(p) > 0 { f.expander.Reset() f.expander.Write(f.prev) @@ -51,25 +64,30 @@ func (f *hkdf) Read(p []byte) (int, error) { f.counter++ // Copy the new batch into p - f.cache = f.prev - n = copy(p, f.cache) + f.buf = f.prev + n = copy(p, f.buf) p = p[n:] } // Save leftovers for next run - f.cache = f.cache[n:] + f.buf = f.buf[n:] return need, nil } -// New returns a new HKDF using the given hash, the secret keying material to expand -// and optional salt and info fields. -func New(hash func() hash.Hash, secret, salt, info []byte) io.Reader { - if salt == nil { - salt = make([]byte, hash().Size()) - } - extractor := hmac.New(hash, salt) - extractor.Write(secret) - prk := extractor.Sum(nil) +// Expand returns a Reader, from which keys can be read, using the given +// pseudorandom key and optional context info, skipping the extraction step. +// +// The pseudorandomKey should have been generated by Extract, or be a uniformly +// random or pseudorandom cryptographically strong key. See RFC 5869, Section +// 3.3. Most common scenarios will want to use New instead. +func Expand(hash func() hash.Hash, pseudorandomKey, info []byte) io.Reader { + expander := hmac.New(hash, pseudorandomKey) + return &hkdf{expander, expander.Size(), info, 1, nil, nil} +} - return &hkdf{hmac.New(hash, prk), extractor.Size(), info, 1, nil, nil} +// New returns a Reader, from which keys can be read, using the given hash, +// secret, salt and context info. Salt and info can be nil. +func New(hash func() hash.Hash, secret, salt, info []byte) io.Reader { + prk := Extract(hash, secret, salt) + return Expand(hash, prk, info) } diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf_test.go b/vendor/golang.org/x/crypto/hkdf/hkdf_test.go index cee659bc..ea575772 100644 --- a/vendor/golang.org/x/crypto/hkdf/hkdf_test.go +++ b/vendor/golang.org/x/crypto/hkdf/hkdf_test.go @@ -18,6 +18,7 @@ type hkdfTest struct { hash func() hash.Hash master []byte salt []byte + prk []byte info []byte out []byte } @@ -35,6 +36,12 @@ var hkdfTests = []hkdfTest{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, }, + []byte{ + 0x07, 0x77, 0x09, 0x36, 0x2c, 0x2e, 0x32, 0xdf, + 0x0d, 0xdc, 0x3f, 0x0d, 0xc4, 0x7b, 0xba, 0x63, + 0x90, 0xb6, 0xc7, 0x3b, 0xb5, 0x0f, 0x9c, 0x31, + 0x22, 0xec, 0x84, 0x4a, 0xd7, 0xc2, 0xb3, 0xe5, + }, []byte{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, @@ -74,6 +81,12 @@ var hkdfTests = []hkdfTest{ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, }, + []byte{ + 0x06, 0xa6, 0xb8, 0x8c, 0x58, 0x53, 0x36, 0x1a, + 0x06, 0x10, 0x4c, 0x9c, 0xeb, 0x35, 0xb4, 0x5c, + 0xef, 0x76, 0x00, 0x14, 0x90, 0x46, 0x71, 0x01, + 0x4a, 0x19, 0x3f, 0x40, 0xc1, 0x5f, 0xc2, 0x44, + }, []byte{ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, @@ -108,6 +121,12 @@ var hkdfTests = []hkdfTest{ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, }, []byte{}, + []byte{ + 0x19, 0xef, 0x24, 0xa3, 0x2c, 0x71, 0x7b, 0x16, + 0x7f, 0x33, 0xa9, 0x1d, 0x6f, 0x64, 0x8b, 0xdf, + 0x96, 0x59, 0x67, 0x76, 0xaf, 0xdb, 0x63, 0x77, + 0xac, 0x43, 0x4c, 0x1c, 0x29, 0x3c, 0xcb, 0x04, + }, []byte{}, []byte{ 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, @@ -118,6 +137,30 @@ var hkdfTests = []hkdfTest{ 0x96, 0xc8, }, }, + { + sha256.New, + []byte{ + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, + }, + nil, + []byte{ + 0x19, 0xef, 0x24, 0xa3, 0x2c, 0x71, 0x7b, 0x16, + 0x7f, 0x33, 0xa9, 0x1d, 0x6f, 0x64, 0x8b, 0xdf, + 0x96, 0x59, 0x67, 0x76, 0xaf, 0xdb, 0x63, 0x77, + 0xac, 0x43, 0x4c, 0x1c, 0x29, 0x3c, 0xcb, 0x04, + }, + nil, + []byte{ + 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, + 0x71, 0x5f, 0x80, 0x2a, 0x06, 0x3c, 0x5a, 0x31, + 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e, + 0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, + 0x9d, 0x20, 0x13, 0x95, 0xfa, 0xa4, 0xb6, 0x1a, + 0x96, 0xc8, + }, + }, { sha1.New, []byte{ @@ -128,6 +171,11 @@ var hkdfTests = []hkdfTest{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, }, + []byte{ + 0x9b, 0x6c, 0x18, 0xc4, 0x32, 0xa7, 0xbf, 0x8f, + 0x0e, 0x71, 0xc8, 0xeb, 0x88, 0xf4, 0xb3, 0x0b, + 0xaa, 0x2b, 0xa2, 0x43, + }, []byte{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, @@ -167,6 +215,11 @@ var hkdfTests = []hkdfTest{ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, }, + []byte{ + 0x8a, 0xda, 0xe0, 0x9a, 0x2a, 0x30, 0x70, 0x59, + 0x47, 0x8d, 0x30, 0x9b, 0x26, 0xc4, 0x11, 0x5a, + 0x22, 0x4c, 0xfa, 0xf6, + }, []byte{ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, @@ -201,6 +254,11 @@ var hkdfTests = []hkdfTest{ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, }, []byte{}, + []byte{ + 0xda, 0x8c, 0x8a, 0x73, 0xc7, 0xfa, 0x77, 0x28, + 0x8e, 0xc6, 0xf5, 0xe7, 0xc2, 0x97, 0x78, 0x6a, + 0xa0, 0xd3, 0x2d, 0x01, + }, []byte{}, []byte{ 0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, @@ -219,7 +277,12 @@ var hkdfTests = []hkdfTest{ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, }, nil, - []byte{}, + []byte{ + 0x2a, 0xdc, 0xca, 0xda, 0x18, 0x77, 0x9e, 0x7c, + 0x20, 0x77, 0xad, 0x2e, 0xb1, 0x9d, 0x3f, 0x3e, + 0x73, 0x13, 0x85, 0xdd, + }, + nil, []byte{ 0x2c, 0x91, 0x11, 0x72, 0x04, 0xd7, 0x45, 0xf3, 0x50, 0x0d, 0x63, 0x6a, 0x62, 0xf6, 0x4f, 0x0a, @@ -233,6 +296,11 @@ var hkdfTests = []hkdfTest{ func TestHKDF(t *testing.T) { for i, tt := range hkdfTests { + prk := Extract(tt.hash, tt.master, tt.salt) + if !bytes.Equal(prk, tt.prk) { + t.Errorf("test %d: incorrect PRK: have %v, need %v.", i, prk, tt.prk) + } + hkdf := New(tt.hash, tt.master, tt.salt, tt.info) out := make([]byte, len(tt.out)) @@ -244,6 +312,17 @@ func TestHKDF(t *testing.T) { if !bytes.Equal(out, tt.out) { t.Errorf("test %d: incorrect output: have %v, need %v.", i, out, tt.out) } + + hkdf = Expand(tt.hash, prk, tt.info) + + n, err = io.ReadFull(hkdf, out) + if n != len(tt.out) || err != nil { + t.Errorf("test %d: not enough output bytes from Expand: %d.", i, n) + } + + if !bytes.Equal(out, tt.out) { + t.Errorf("test %d: incorrect output from Expand: have %v, need %v.", i, out, tt.out) + } } } diff --git a/vendor/golang.org/x/crypto/ocsp/ocsp.go b/vendor/golang.org/x/crypto/ocsp/ocsp.go index 5edc9c97..f079d9ea 100644 --- a/vendor/golang.org/x/crypto/ocsp/ocsp.go +++ b/vendor/golang.org/x/crypto/ocsp/ocsp.go @@ -63,7 +63,7 @@ func (r ResponseStatus) String() string { } // ResponseError is an error that may be returned by ParseResponse to indicate -// that the response itself is an error, not just that its indicating that a +// that the response itself is an error, not just that it's indicating that a // certificate is revoked, unknown, etc. type ResponseError struct { Status ResponseStatus diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go index 625bb5ac..5af64c54 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/packet.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -404,14 +404,16 @@ const ( type PublicKeyAlgorithm uint8 const ( - PubKeyAlgoRSA PublicKeyAlgorithm = 1 - PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2 - PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3 - PubKeyAlgoElGamal PublicKeyAlgorithm = 16 - PubKeyAlgoDSA PublicKeyAlgorithm = 17 + PubKeyAlgoRSA PublicKeyAlgorithm = 1 + PubKeyAlgoElGamal PublicKeyAlgorithm = 16 + PubKeyAlgoDSA PublicKeyAlgorithm = 17 // RFC 6637, Section 5. PubKeyAlgoECDH PublicKeyAlgorithm = 18 PubKeyAlgoECDSA PublicKeyAlgorithm = 19 + + // Deprecated in RFC 4880, Section 13.5. Use key flags instead. + PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2 + PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3 ) // CanEncrypt returns true if it's possible to encrypt a message to a public diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go index 87fc461a..bd31ccea 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go @@ -64,7 +64,7 @@ func NewECDSAPrivateKey(currentTime time.Time, priv *ecdsa.PrivateKey) *PrivateK return pk } -// NewSignerPrivateKey creates a sign-only PrivateKey from a crypto.Signer that +// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that // implements RSA or ECDSA. func NewSignerPrivateKey(currentTime time.Time, signer crypto.Signer) *PrivateKey { pk := new(PrivateKey) @@ -73,10 +73,8 @@ func NewSignerPrivateKey(currentTime time.Time, signer crypto.Signer) *PrivateKe switch pubkey := signer.Public().(type) { case *rsa.PublicKey: pk.PublicKey = *NewRSAPublicKey(currentTime, pubkey) - pk.PubKeyAlgo = PubKeyAlgoRSASignOnly case rsa.PublicKey: pk.PublicKey = *NewRSAPublicKey(currentTime, &pubkey) - pk.PubKeyAlgo = PubKeyAlgoRSASignOnly case *ecdsa.PublicKey: pk.PublicKey = *NewECDSAPublicKey(currentTime, pubkey) case ecdsa.PublicKey: diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go index 794d746a..cc08b483 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go @@ -172,12 +172,8 @@ func TestRSASignerPrivateKey(t *testing.T) { priv := NewSignerPrivateKey(time.Now(), &rsaSigner{rsaPriv}) - if priv.PubKeyAlgo != PubKeyAlgoRSASignOnly { - t.Fatal("NewSignerPrivateKey should have made a sign-only RSA private key") - } - sig := &Signature{ - PubKeyAlgo: PubKeyAlgoRSASignOnly, + PubKeyAlgo: PubKeyAlgoRSA, Hash: crypto.SHA256, } msg := []byte("Hello World!") diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature.go b/vendor/golang.org/x/crypto/openpgp/packet/signature.go index 6ce0cbed..b2a24a53 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/signature.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/signature.go @@ -542,7 +542,7 @@ func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err e r, s, err = ecdsa.Sign(config.Random(), pk, digest) } else { var b []byte - b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, nil) + b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) if err == nil { r, s, err = unwrapECDSASig(b) } diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go index 96a2b382..d19ffbc7 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go @@ -80,7 +80,7 @@ func (uat *UserAttribute) Serialize(w io.Writer) (err error) { // ImageData returns zero or more byte slices, each containing // JPEG File Interchange Format (JFIF), for each photo in the -// the user attribute packet. +// user attribute packet. func (uat *UserAttribute) ImageData() (imageData [][]byte) { for _, sp := range uat.Contents { if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 { diff --git a/vendor/golang.org/x/crypto/ripemd160/ripemd160.go b/vendor/golang.org/x/crypto/ripemd160/ripemd160.go index 6c6e8423..fd97ba1b 100644 --- a/vendor/golang.org/x/crypto/ripemd160/ripemd160.go +++ b/vendor/golang.org/x/crypto/ripemd160/ripemd160.go @@ -5,7 +5,7 @@ // Package ripemd160 implements the RIPEMD-160 hash algorithm. package ripemd160 // import "golang.org/x/crypto/ripemd160" -// RIPEMD-160 is designed by by Hans Dobbertin, Antoon Bosselaers, and Bart +// RIPEMD-160 is designed by Hans Dobbertin, Antoon Bosselaers, and Bart // Preneel with specifications available at: // http://homes.esat.kuleuven.be/~cosicart/pdf/AB-9601/AB-9601.pdf. diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go index 9b25b5ac..3362afd1 100644 --- a/vendor/golang.org/x/crypto/scrypt/scrypt.go +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -29,7 +29,7 @@ func blockXOR(dst, src []uint32, n int) { } // salsaXOR applies Salsa20/8 to the XOR of 16 numbers from tmp and in, -// and puts the result into both both tmp and out. +// and puts the result into both tmp and out. func salsaXOR(tmp *[16]uint32, in, out []uint32) { w0 := tmp[0] ^ in[0] w1 := tmp[1] ^ in[1] diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go index a0ee3ae7..c2fef30a 100644 --- a/vendor/golang.org/x/crypto/sha3/doc.go +++ b/vendor/golang.org/x/crypto/sha3/doc.go @@ -43,7 +43,7 @@ // is then "full" and the permutation is applied to "empty" it. This process is // repeated until all the input has been "absorbed". The input is then padded. // The digest is "squeezed" from the sponge in the same way, except that output -// output is copied out instead of input being XORed in. +// is copied out instead of input being XORed in. // // A sponge is parameterized by its generic security strength, which is equal // to half its capacity; capacity + rate is equal to the permutation's width. diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go index b1808dd2..51f74050 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client.go @@ -25,10 +25,22 @@ import ( "math/big" "sync" + "crypto" "golang.org/x/crypto/ed25519" "golang.org/x/crypto/ssh" ) +// SignatureFlags represent additional flags that can be passed to the signature +// requests an defined in [PROTOCOL.agent] section 4.5.1. +type SignatureFlags uint32 + +// SignatureFlag values as defined in [PROTOCOL.agent] section 5.3. +const ( + SignatureFlagReserved SignatureFlags = 1 << iota + SignatureFlagRsaSha256 + SignatureFlagRsaSha512 +) + // Agent represents the capabilities of an ssh-agent. type Agent interface { // List returns the identities known to the agent. @@ -57,6 +69,26 @@ type Agent interface { Signers() ([]ssh.Signer, error) } +type ExtendedAgent interface { + Agent + + // SignWithFlags signs like Sign, but allows for additional flags to be sent/received + SignWithFlags(key ssh.PublicKey, data []byte, flags SignatureFlags) (*ssh.Signature, error) + + // Extension processes a custom extension request. Standard-compliant agents are not + // required to support any extensions, but this method allows agents to implement + // vendor-specific methods or add experimental features. See [PROTOCOL.agent] section 4.7. + // If agent extensions are unsupported entirely this method MUST return an + // ErrExtensionUnsupported error. Similarly, if just the specific extensionType in + // the request is unsupported by the agent then ErrExtensionUnsupported MUST be + // returned. + // + // In the case of success, since [PROTOCOL.agent] section 4.7 specifies that the contents + // of the response are unspecified (including the type of the message), the complete + // response will be returned as a []byte slice, including the "type" byte of the message. + Extension(extensionType string, contents []byte) ([]byte, error) +} + // ConstraintExtension describes an optional constraint defined by users. type ConstraintExtension struct { // ExtensionName consist of a UTF-8 string suffixed by the @@ -179,6 +211,23 @@ type constrainExtensionAgentMsg struct { Rest []byte `ssh:"rest"` } +// See [PROTOCOL.agent], section 4.7 +const agentExtension = 27 +const agentExtensionFailure = 28 + +// ErrExtensionUnsupported indicates that an extension defined in +// [PROTOCOL.agent] section 4.7 is unsupported by the agent. Specifically this +// error indicates that the agent returned a standard SSH_AGENT_FAILURE message +// as the result of a SSH_AGENTC_EXTENSION request. Note that the protocol +// specification (and therefore this error) does not distinguish between a +// specific extension being unsupported and extensions being unsupported entirely. +var ErrExtensionUnsupported = errors.New("agent: extension unsupported") + +type extensionAgentMsg struct { + ExtensionType string `sshtype:"27"` + Contents []byte +} + // Key represents a protocol 2 public key as defined in // [PROTOCOL.agent], section 2.5.2. type Key struct { @@ -260,7 +309,7 @@ type client struct { // NewClient returns an Agent that talks to an ssh-agent process over // the given connection. -func NewClient(rw io.ReadWriter) Agent { +func NewClient(rw io.ReadWriter) ExtendedAgent { return &client{conn: rw} } @@ -268,6 +317,21 @@ func NewClient(rw io.ReadWriter) Agent { // unmarshaled into reply and replyType is set to the first byte of // the reply, which contains the type of the message. func (c *client) call(req []byte) (reply interface{}, err error) { + buf, err := c.callRaw(req) + if err != nil { + return nil, err + } + reply, err = unmarshal(buf) + if err != nil { + return nil, clientErr(err) + } + return reply, nil +} + +// callRaw sends an RPC to the agent. On success, the raw +// bytes of the response are returned; no unmarshalling is +// performed on the response. +func (c *client) callRaw(req []byte) (reply []byte, err error) { c.mu.Lock() defer c.mu.Unlock() @@ -284,18 +348,14 @@ func (c *client) call(req []byte) (reply interface{}, err error) { } respSize := binary.BigEndian.Uint32(respSizeBuf[:]) if respSize > maxAgentResponseBytes { - return nil, clientErr(err) + return nil, clientErr(errors.New("response too large")) } buf := make([]byte, respSize) if _, err = io.ReadFull(c.conn, buf); err != nil { return nil, clientErr(err) } - reply, err = unmarshal(buf) - if err != nil { - return nil, clientErr(err) - } - return reply, err + return buf, nil } func (c *client) simpleCall(req []byte) error { @@ -369,9 +429,14 @@ func (c *client) List() ([]*Key, error) { // Sign has the agent sign the data using a protocol 2 key as defined // in [PROTOCOL.agent] section 2.6.2. func (c *client) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) { + return c.SignWithFlags(key, data, 0) +} + +func (c *client) SignWithFlags(key ssh.PublicKey, data []byte, flags SignatureFlags) (*ssh.Signature, error) { req := ssh.Marshal(signRequestAgentMsg{ KeyBlob: key.Marshal(), Data: data, + Flags: uint32(flags), }) msg, err := c.call(req) @@ -681,3 +746,44 @@ func (s *agentKeyringSigner) Sign(rand io.Reader, data []byte) (*ssh.Signature, // The agent has its own entropy source, so the rand argument is ignored. return s.agent.Sign(s.pub, data) } + +func (s *agentKeyringSigner) SignWithOpts(rand io.Reader, data []byte, opts crypto.SignerOpts) (*ssh.Signature, error) { + var flags SignatureFlags + if opts != nil { + switch opts.HashFunc() { + case crypto.SHA256: + flags = SignatureFlagRsaSha256 + case crypto.SHA512: + flags = SignatureFlagRsaSha512 + } + } + return s.agent.SignWithFlags(s.pub, data, flags) +} + +// Calls an extension method. It is up to the agent implementation as to whether or not +// any particular extension is supported and may always return an error. Because the +// type of the response is up to the implementation, this returns the bytes of the +// response and does not attempt any type of unmarshalling. +func (c *client) Extension(extensionType string, contents []byte) ([]byte, error) { + req := ssh.Marshal(extensionAgentMsg{ + ExtensionType: extensionType, + Contents: contents, + }) + buf, err := c.callRaw(req) + if err != nil { + return nil, err + } + if len(buf) == 0 { + return nil, errors.New("agent: failure; empty response") + } + // [PROTOCOL.agent] section 4.7 indicates that an SSH_AGENT_FAILURE message + // represents an agent that does not support the extension + if buf[0] == agentFailure { + return nil, ErrExtensionUnsupported + } + if buf[0] == agentExtensionFailure { + return nil, errors.New("agent: generic extension failure") + } + + return buf, nil +} diff --git a/vendor/golang.org/x/crypto/ssh/agent/client_test.go b/vendor/golang.org/x/crypto/ssh/agent/client_test.go index 266fd6d4..2f798f94 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client_test.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client_test.go @@ -20,7 +20,7 @@ import ( ) // startOpenSSHAgent executes ssh-agent, and returns an Agent interface to it. -func startOpenSSHAgent(t *testing.T) (client Agent, socket string, cleanup func()) { +func startOpenSSHAgent(t *testing.T) (client ExtendedAgent, socket string, cleanup func()) { if testing.Short() { // ssh-agent is not always available, and the key // types supported vary by platform. @@ -79,13 +79,12 @@ func startOpenSSHAgent(t *testing.T) (client Agent, socket string, cleanup func( } } -// startKeyringAgent uses Keyring to simulate a ssh-agent Server and returns a client. -func startKeyringAgent(t *testing.T) (client Agent, cleanup func()) { +func startAgent(t *testing.T, agent Agent) (client ExtendedAgent, cleanup func()) { c1, c2, err := netPipe() if err != nil { t.Fatalf("netPipe: %v", err) } - go ServeAgent(NewKeyring(), c2) + go ServeAgent(agent, c2) return NewClient(c1), func() { c1.Close() @@ -93,6 +92,11 @@ func startKeyringAgent(t *testing.T) (client Agent, cleanup func()) { } } +// startKeyringAgent uses Keyring to simulate a ssh-agent Server and returns a client. +func startKeyringAgent(t *testing.T) (client ExtendedAgent, cleanup func()) { + return startAgent(t, NewKeyring()) +} + func testOpenSSHAgent(t *testing.T, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { agent, _, cleanup := startOpenSSHAgent(t) defer cleanup() @@ -107,7 +111,7 @@ func testKeyringAgent(t *testing.T, key interface{}, cert *ssh.Certificate, life testAgentInterface(t, agent, key, cert, lifetimeSecs) } -func testAgentInterface(t *testing.T, agent Agent, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { +func testAgentInterface(t *testing.T, agent ExtendedAgent, key interface{}, cert *ssh.Certificate, lifetimeSecs uint32) { signer, err := ssh.NewSignerFromKey(key) if err != nil { t.Fatalf("NewSignerFromKey(%T): %v", key, err) @@ -159,6 +163,25 @@ func testAgentInterface(t *testing.T, agent Agent, key interface{}, cert *ssh.Ce t.Fatalf("Verify(%s): %v", pubKey.Type(), err) } + // For tests on RSA keys, try signing with SHA-256 and SHA-512 flags + if pubKey.Type() == "ssh-rsa" { + sshFlagTest := func(flag SignatureFlags, expectedSigFormat string) { + sig, err = agent.SignWithFlags(pubKey, data, flag) + if err != nil { + t.Fatalf("SignWithFlags(%s): %v", pubKey.Type(), err) + } + if sig.Format != expectedSigFormat { + t.Fatalf("Signature format didn't match expected value: %s != %s", sig.Format, expectedSigFormat) + } + if err := pubKey.Verify(data, sig); err != nil { + t.Fatalf("Verify(%s): %v", pubKey.Type(), err) + } + } + sshFlagTest(0, ssh.SigAlgoRSA) + sshFlagTest(SignatureFlagRsaSha256, ssh.SigAlgoRSASHA2256) + sshFlagTest(SignatureFlagRsaSha512, ssh.SigAlgoRSASHA2512) + } + // If the key has a lifetime, is it removed when it should be? if lifetimeSecs > 0 { time.Sleep(time.Second*time.Duration(lifetimeSecs) + 100*time.Millisecond) @@ -218,6 +241,35 @@ func netPipe() (net.Conn, net.Conn, error) { return c1, c2, nil } +func TestServerResponseTooLarge(t *testing.T) { + a, b, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + + defer a.Close() + defer b.Close() + + var response identitiesAnswerAgentMsg + response.NumKeys = 1 + response.Keys = make([]byte, maxAgentResponseBytes+1) + + agent := NewClient(a) + go func() { + n, _ := b.Write(ssh.Marshal(response)) + if n < 4 { + t.Fatalf("At least 4 bytes (the response size) should have been successfully written: %d < 4", n) + } + }() + _, err = agent.List() + if err == nil { + t.Fatal("Did not get error result") + } + if err.Error() != "agent: client error: response too large" { + t.Fatal("Did not get expected error result") + } +} + func TestAuth(t *testing.T) { agent, _, cleanup := startOpenSSHAgent(t) defer cleanup() @@ -377,3 +429,38 @@ func testAgentLifetime(t *testing.T, agent Agent) { t.Errorf("Want 0 keys, got %v", len(keys)) } } + +type keyringExtended struct { + *keyring +} + +func (r *keyringExtended) Extension(extensionType string, contents []byte) ([]byte, error) { + if extensionType != "my-extension@example.com" { + return []byte{agentExtensionFailure}, nil + } + return append([]byte{agentSuccess}, contents...), nil +} + +func TestAgentExtensions(t *testing.T) { + agent, _, cleanup := startOpenSSHAgent(t) + defer cleanup() + result, err := agent.Extension("my-extension@example.com", []byte{0x00, 0x01, 0x02}) + if err == nil { + t.Fatal("should have gotten agent extension failure") + } + + agent, cleanup = startAgent(t, &keyringExtended{}) + defer cleanup() + result, err = agent.Extension("my-extension@example.com", []byte{0x00, 0x01, 0x02}) + if err != nil { + t.Fatalf("agent extension failure: %v", err) + } + if len(result) != 4 || !bytes.Equal(result, []byte{agentSuccess, 0x00, 0x01, 0x02}) { + t.Fatalf("agent extension result invalid: %v", result) + } + + result, err = agent.Extension("bad-extension@example.com", []byte{0x00, 0x01, 0x02}) + if err == nil { + t.Fatal("should have gotten agent extension failure") + } +} diff --git a/vendor/golang.org/x/crypto/ssh/agent/keyring.go b/vendor/golang.org/x/crypto/ssh/agent/keyring.go index 1a516327..c9d97943 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/keyring.go +++ b/vendor/golang.org/x/crypto/ssh/agent/keyring.go @@ -182,6 +182,10 @@ func (r *keyring) Add(key AddedKey) error { // Sign returns a signature for the data. func (r *keyring) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) { + return r.SignWithFlags(key, data, 0) +} + +func (r *keyring) SignWithFlags(key ssh.PublicKey, data []byte, flags SignatureFlags) (*ssh.Signature, error) { r.mu.Lock() defer r.mu.Unlock() if r.locked { @@ -192,7 +196,24 @@ func (r *keyring) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error) { wanted := key.Marshal() for _, k := range r.keys { if bytes.Equal(k.signer.PublicKey().Marshal(), wanted) { - return k.signer.Sign(rand.Reader, data) + if flags == 0 { + return k.signer.Sign(rand.Reader, data) + } else { + if algorithmSigner, ok := k.signer.(ssh.AlgorithmSigner); !ok { + return nil, fmt.Errorf("agent: signature does not support non-default signature algorithm: %T", k.signer) + } else { + var algorithm string + switch flags { + case SignatureFlagRsaSha256: + algorithm = ssh.SigAlgoRSASHA2256 + case SignatureFlagRsaSha512: + algorithm = ssh.SigAlgoRSASHA2512 + default: + return nil, fmt.Errorf("agent: unsupported signature flags: %d", flags) + } + return algorithmSigner.SignWithAlgorithm(rand.Reader, data, algorithm) + } + } } } return nil, errors.New("not found") @@ -213,3 +234,8 @@ func (r *keyring) Signers() ([]ssh.Signer, error) { } return s, nil } + +// The keyring does not support any extensions +func (r *keyring) Extension(extensionType string, contents []byte) ([]byte, error) { + return nil, ErrExtensionUnsupported +} diff --git a/vendor/golang.org/x/crypto/ssh/agent/server.go b/vendor/golang.org/x/crypto/ssh/agent/server.go index 2e4692cb..a1949762 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/server.go +++ b/vendor/golang.org/x/crypto/ssh/agent/server.go @@ -128,7 +128,14 @@ func (s *server) processRequest(data []byte) (interface{}, error) { Blob: req.KeyBlob, } - sig, err := s.agent.Sign(k, req.Data) // TODO(hanwen): flags. + var sig *ssh.Signature + var err error + if extendedAgent, ok := s.agent.(ExtendedAgent); ok { + sig, err = extendedAgent.SignWithFlags(k, req.Data, SignatureFlags(req.Flags)) + } else { + sig, err = s.agent.Sign(k, req.Data) + } + if err != nil { return nil, err } @@ -150,6 +157,43 @@ func (s *server) processRequest(data []byte) (interface{}, error) { case agentAddIDConstrained, agentAddIdentity: return nil, s.insertIdentity(data) + + case agentExtension: + // Return a stub object where the whole contents of the response gets marshaled. + var responseStub struct { + Rest []byte `ssh:"rest"` + } + + if extendedAgent, ok := s.agent.(ExtendedAgent); !ok { + // If this agent doesn't implement extensions, [PROTOCOL.agent] section 4.7 + // requires that we return a standard SSH_AGENT_FAILURE message. + responseStub.Rest = []byte{agentFailure} + } else { + var req extensionAgentMsg + if err := ssh.Unmarshal(data, &req); err != nil { + return nil, err + } + res, err := extendedAgent.Extension(req.ExtensionType, req.Contents) + if err != nil { + // If agent extensions are unsupported, return a standard SSH_AGENT_FAILURE + // message as required by [PROTOCOL.agent] section 4.7. + if err == ErrExtensionUnsupported { + responseStub.Rest = []byte{agentFailure} + } else { + // As the result of any other error processing an extension request, + // [PROTOCOL.agent] section 4.7 requires that we return a + // SSH_AGENT_EXTENSION_FAILURE code. + responseStub.Rest = []byte{agentExtensionFailure} + } + } else { + if len(res) == 0 { + return nil, nil + } + responseStub.Rest = res + } + } + + return responseStub, nil } return nil, fmt.Errorf("unknown opcode %d", data[0]) diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go index 42106f3f..00ed9923 100644 --- a/vendor/golang.org/x/crypto/ssh/certs.go +++ b/vendor/golang.org/x/crypto/ssh/certs.go @@ -222,6 +222,11 @@ type openSSHCertSigner struct { signer Signer } +type algorithmOpenSSHCertSigner struct { + *openSSHCertSigner + algorithmSigner AlgorithmSigner +} + // NewCertSigner returns a Signer that signs with the given Certificate, whose // private key is held by signer. It returns an error if the public key in cert // doesn't match the key used by signer. @@ -230,7 +235,12 @@ func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) { return nil, errors.New("ssh: signer and cert have different public key") } - return &openSSHCertSigner{cert, signer}, nil + if algorithmSigner, ok := signer.(AlgorithmSigner); ok { + return &algorithmOpenSSHCertSigner{ + &openSSHCertSigner{cert, signer}, algorithmSigner}, nil + } else { + return &openSSHCertSigner{cert, signer}, nil + } } func (s *openSSHCertSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { @@ -241,6 +251,10 @@ func (s *openSSHCertSigner) PublicKey() PublicKey { return s.pub } +func (s *algorithmOpenSSHCertSigner) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { + return s.algorithmSigner.SignWithAlgorithm(rand, data, algorithm) +} + const sourceAddressCriticalOption = "source-address" // CertChecker does the work of verifying a certificate. Its methods diff --git a/vendor/golang.org/x/crypto/ssh/client.go b/vendor/golang.org/x/crypto/ssh/client.go index ae6ca775..7b00bff1 100644 --- a/vendor/golang.org/x/crypto/ssh/client.go +++ b/vendor/golang.org/x/crypto/ssh/client.go @@ -185,7 +185,7 @@ func Dial(network, addr string, config *ClientConfig) (*Client, error) { // keys. A HostKeyCallback must return nil if the host key is OK, or // an error to reject it. It receives the hostname as passed to Dial // or NewClientConn. The remote address is the RemoteAddr of the -// net.Conn underlying the the SSH connection. +// net.Conn underlying the SSH connection. type HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error // BannerCallback is the function type used for treat the banner sent by diff --git a/vendor/golang.org/x/crypto/ssh/client_auth_test.go b/vendor/golang.org/x/crypto/ssh/client_auth_test.go index 5fbb20d8..026d137e 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth_test.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth_test.go @@ -9,6 +9,7 @@ import ( "crypto/rand" "errors" "fmt" + "io" "os" "strings" "testing" @@ -28,8 +29,14 @@ func (cr keyboardInteractive) Challenge(user string, instruction string, questio var clientPassword = "tiger" // tryAuth runs a handshake with a given config against an SSH server -// with config serverConfig +// with config serverConfig. Returns both client and server side errors. func tryAuth(t *testing.T, config *ClientConfig) error { + err, _ := tryAuthBothSides(t, config) + return err +} + +// tryAuthBothSides runs the handshake and returns the resulting errors from both sides of the connection. +func tryAuthBothSides(t *testing.T, config *ClientConfig) (clientError error, serverAuthErrors []error) { c1, c2, err := netPipe() if err != nil { t.Fatalf("netPipe: %v", err) @@ -79,9 +86,13 @@ func tryAuth(t *testing.T, config *ClientConfig) error { } serverConfig.AddHostKey(testSigners["rsa"]) + serverConfig.AuthLogCallback = func(conn ConnMetadata, method string, err error) { + serverAuthErrors = append(serverAuthErrors, err) + } + go newServer(c1, serverConfig) _, _, _, err = NewClientConn(c2, "", config) - return err + return err, serverAuthErrors } func TestClientAuthPublicKey(t *testing.T) { @@ -213,6 +224,45 @@ func TestAuthMethodRSAandDSA(t *testing.T) { } } +type invalidAlgSigner struct { + Signer +} + +func (s *invalidAlgSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { + sig, err := s.Signer.Sign(rand, data) + if sig != nil { + sig.Format = "invalid" + } + return sig, err +} + +func TestMethodInvalidAlgorithm(t *testing.T) { + config := &ClientConfig{ + User: "testuser", + Auth: []AuthMethod{ + PublicKeys(&invalidAlgSigner{testSigners["rsa"]}), + }, + HostKeyCallback: InsecureIgnoreHostKey(), + } + + err, serverErrors := tryAuthBothSides(t, config) + if err == nil { + t.Fatalf("login succeeded") + } + + found := false + want := "algorithm \"invalid\"" + + var errStrings []string + for _, err := range serverErrors { + found = found || (err != nil && strings.Contains(err.Error(), want)) + errStrings = append(errStrings, err.Error()) + } + if !found { + t.Errorf("server got error %q, want substring %q", errStrings, want) + } +} + func TestClientHMAC(t *testing.T) { for _, mac := range supportedMACs { config := &ClientConfig{ diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index 2261dc38..96980479 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -38,6 +38,16 @@ const ( KeyAlgoED25519 = "ssh-ed25519" ) +// These constants represent non-default signature algorithms that are supported +// as algorithm parameters to AlgorithmSigner.SignWithAlgorithm methods. See +// [PROTOCOL.agent] section 4.5.1 and +// https://tools.ietf.org/html/draft-ietf-curdle-rsa-sha2-10 +const ( + SigAlgoRSA = "ssh-rsa" + SigAlgoRSASHA2256 = "rsa-sha2-256" + SigAlgoRSASHA2512 = "rsa-sha2-512" +) + // parsePubKey parses a public key of the given algorithm. // Use ParsePublicKey for keys with prepended algorithm. func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err error) { @@ -301,6 +311,19 @@ type Signer interface { Sign(rand io.Reader, data []byte) (*Signature, error) } +// A AlgorithmSigner is a Signer that also supports specifying a specific +// algorithm to use for signing. +type AlgorithmSigner interface { + Signer + + // SignWithAlgorithm is like Signer.Sign, but allows specification of a + // non-default signing algorithm. See the SigAlgo* constants in this + // package for signature algorithms supported by this package. Callers may + // pass an empty string for the algorithm in which case the AlgorithmSigner + // will use its default algorithm. + SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) +} + type rsaPublicKey rsa.PublicKey func (r *rsaPublicKey) Type() string { @@ -349,13 +372,21 @@ func (r *rsaPublicKey) Marshal() []byte { } func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != r.Type() { + var hash crypto.Hash + switch sig.Format { + case SigAlgoRSA: + hash = crypto.SHA1 + case SigAlgoRSASHA2256: + hash = crypto.SHA256 + case SigAlgoRSASHA2512: + hash = crypto.SHA512 + default: return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, r.Type()) } - h := crypto.SHA1.New() + h := hash.New() h.Write(data) digest := h.Sum(nil) - return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), crypto.SHA1, digest, sig.Blob) + return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), hash, digest, sig.Blob) } func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey { @@ -459,6 +490,14 @@ func (k *dsaPrivateKey) PublicKey() PublicKey { } func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { + return k.SignWithAlgorithm(rand, data, "") +} + +func (k *dsaPrivateKey) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { + if algorithm != "" && algorithm != k.PublicKey().Type() { + return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) + } + h := crypto.SHA1.New() h.Write(data) digest := h.Sum(nil) @@ -691,16 +730,42 @@ func (s *wrappedSigner) PublicKey() PublicKey { } func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { + return s.SignWithAlgorithm(rand, data, "") +} + +func (s *wrappedSigner) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { var hashFunc crypto.Hash - switch key := s.pubKey.(type) { - case *rsaPublicKey, *dsaPublicKey: - hashFunc = crypto.SHA1 - case *ecdsaPublicKey: - hashFunc = ecHash(key.Curve) - case ed25519PublicKey: - default: - return nil, fmt.Errorf("ssh: unsupported key type %T", key) + if _, ok := s.pubKey.(*rsaPublicKey); ok { + // RSA keys support a few hash functions determined by the requested signature algorithm + switch algorithm { + case "", SigAlgoRSA: + algorithm = SigAlgoRSA + hashFunc = crypto.SHA1 + case SigAlgoRSASHA2256: + hashFunc = crypto.SHA256 + case SigAlgoRSASHA2512: + hashFunc = crypto.SHA512 + default: + return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) + } + } else { + // The only supported algorithm for all other key types is the same as the type of the key + if algorithm == "" { + algorithm = s.pubKey.Type() + } else if algorithm != s.pubKey.Type() { + return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) + } + + switch key := s.pubKey.(type) { + case *dsaPublicKey: + hashFunc = crypto.SHA1 + case *ecdsaPublicKey: + hashFunc = ecHash(key.Curve) + case ed25519PublicKey: + default: + return nil, fmt.Errorf("ssh: unsupported key type %T", key) + } } var digest []byte @@ -745,7 +810,7 @@ func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { } return &Signature{ - Format: s.pubKey.Type(), + Format: algorithm, Blob: signature, }, nil } diff --git a/vendor/golang.org/x/crypto/ssh/keys_test.go b/vendor/golang.org/x/crypto/ssh/keys_test.go index f28725f1..3847b3bf 100644 --- a/vendor/golang.org/x/crypto/ssh/keys_test.go +++ b/vendor/golang.org/x/crypto/ssh/keys_test.go @@ -109,6 +109,49 @@ func TestKeySignVerify(t *testing.T) { } } +func TestKeySignWithAlgorithmVerify(t *testing.T) { + for _, priv := range testSigners { + if algorithmSigner, ok := priv.(AlgorithmSigner); !ok { + t.Errorf("Signers constructed by ssh package should always implement the AlgorithmSigner interface: %T", priv) + } else { + pub := priv.PublicKey() + data := []byte("sign me") + + signWithAlgTestCase := func(algorithm string, expectedAlg string) { + sig, err := algorithmSigner.SignWithAlgorithm(rand.Reader, data, algorithm) + if err != nil { + t.Fatalf("Sign(%T): %v", priv, err) + } + if sig.Format != expectedAlg { + t.Errorf("signature format did not match requested signature algorithm: %s != %s", sig.Format, expectedAlg) + } + + if err := pub.Verify(data, sig); err != nil { + t.Errorf("publicKey.Verify(%T): %v", priv, err) + } + sig.Blob[5]++ + if err := pub.Verify(data, sig); err == nil { + t.Errorf("publicKey.Verify on broken sig did not fail") + } + } + + // Using the empty string as the algorithm name should result in the same signature format as the algorithm-free Sign method. + defaultSig, err := priv.Sign(rand.Reader, data) + if err != nil { + t.Fatalf("Sign(%T): %v", priv, err) + } + signWithAlgTestCase("", defaultSig.Format) + + // RSA keys are the only ones which currently support more than one signing algorithm + if pub.Type() == KeyAlgoRSA { + for _, algorithm := range []string{SigAlgoRSA, SigAlgoRSASHA2256, SigAlgoRSASHA2512} { + signWithAlgTestCase(algorithm, algorithm) + } + } + } + } +} + func TestParseRSAPrivateKey(t *testing.T) { key := testPrivateKeys["rsa"] diff --git a/vendor/golang.org/x/crypto/ssh/mux_test.go b/vendor/golang.org/x/crypto/ssh/mux_test.go index d88b64e4..94596ec2 100644 --- a/vendor/golang.org/x/crypto/ssh/mux_test.go +++ b/vendor/golang.org/x/crypto/ssh/mux_test.go @@ -20,7 +20,7 @@ func muxPair() (*mux, *mux) { return s, c } -// Returns both ends of a channel, and the mux for the the 2nd +// Returns both ends of a channel, and the mux for the 2nd // channel. func channelPair(t *testing.T) (*channel, *channel, *mux) { c, s := muxPair() diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 122c03e7..e86e8966 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -484,6 +484,7 @@ userAuthLoop: // sig.Format. This is usually the same, but // for certs, the names differ. if !isAcceptableAlgo(sig.Format) { + authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } signedData := buildDataSignedForAuth(sessionID, userAuthReq, algoBytes, pubKeyData) diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go index 731c89a2..39110408 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd +// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd // Package terminal provides support functions for dealing with terminals, as // commonly found on UNIX systems. @@ -25,7 +25,7 @@ type State struct { termios unix.Termios } -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) return err == nil diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_aix.go b/vendor/golang.org/x/crypto/ssh/terminal/util_aix.go new file mode 100644 index 00000000..dfcd6278 --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_aix.go @@ -0,0 +1,12 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build aix + +package terminal + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS +const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go b/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go index 799f049f..9317ac7e 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go @@ -21,7 +21,7 @@ import ( type State struct{} -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { return false } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go index 9e41b9f4..3d5f06a9 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go @@ -17,7 +17,7 @@ type State struct { termios unix.Termios } -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { _, err := unix.IoctlGetTermio(fd, unix.TCGETA) return err == nil diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go index 8618955d..6cb8a950 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go @@ -26,7 +26,7 @@ type State struct { mode uint32 } -// IsTerminal returns true if the given file descriptor is a terminal. +// IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { var st uint32 err := windows.GetConsoleMode(windows.Handle(fd), &st) diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go index 606cf1f9..37dc0cfd 100644 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +++ b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go @@ -2,18 +2,15 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.7 - // Package ctxhttp provides helper functions for performing context-aware HTTP requests. package ctxhttp // import "golang.org/x/net/context/ctxhttp" import ( + "context" "io" "net/http" "net/url" "strings" - - "golang.org/x/net/context" ) // Do sends an HTTP request with the provided http.Client and returns diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go deleted file mode 100644 index 72411b1b..00000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9,go1.7 - -package ctxhttp - -import ( - "io" - "net/http" - "net/http/httptest" - "testing" - - "context" -) - -func TestGo17Context(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "ok") - })) - defer ts.Close() - ctx := context.Background() - resp, err := Get(ctx, http.DefaultClient, ts.URL) - if resp == nil || err != nil { - t.Fatalf("error received from client: %v %v", err, resp) - } - resp.Body.Close() -} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go deleted file mode 100644 index 926870cc..00000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package ctxhttp // import "golang.org/x/net/context/ctxhttp" - -import ( - "io" - "net/http" - "net/url" - "strings" - - "golang.org/x/net/context" -) - -func nop() {} - -var ( - testHookContextDoneBeforeHeaders = nop - testHookDoReturned = nop - testHookDidBodyClose = nop -) - -// Do sends an HTTP request with the provided http.Client and returns an HTTP response. -// If the client is nil, http.DefaultClient is used. -// If the context is canceled or times out, ctx.Err() will be returned. -func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - - // TODO(djd): Respect any existing value of req.Cancel. - cancel := make(chan struct{}) - req.Cancel = cancel - - type responseAndError struct { - resp *http.Response - err error - } - result := make(chan responseAndError, 1) - - // Make local copies of test hooks closed over by goroutines below. - // Prevents data races in tests. - testHookDoReturned := testHookDoReturned - testHookDidBodyClose := testHookDidBodyClose - - go func() { - resp, err := client.Do(req) - testHookDoReturned() - result <- responseAndError{resp, err} - }() - - var resp *http.Response - - select { - case <-ctx.Done(): - testHookContextDoneBeforeHeaders() - close(cancel) - // Clean up after the goroutine calling client.Do: - go func() { - if r := <-result; r.resp != nil { - testHookDidBodyClose() - r.resp.Body.Close() - } - }() - return nil, ctx.Err() - case r := <-result: - var err error - resp, err = r.resp, r.err - if err != nil { - return resp, err - } - } - - c := make(chan struct{}) - go func() { - select { - case <-ctx.Done(): - close(cancel) - case <-c: - // The response's Body is closed. - } - }() - resp.Body = ¬ifyingReader{resp.Body, c} - - return resp, nil -} - -// Get issues a GET request via the Do function. -func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Head issues a HEAD request via the Do function. -func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Post issues a POST request via the Do function. -func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { - req, err := http.NewRequest("POST", url, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", bodyType) - return Do(ctx, client, req) -} - -// PostForm issues a POST request via the Do function. -func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { - return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} - -// notifyingReader is an io.ReadCloser that closes the notify channel after -// Close is called or a Read fails on the underlying ReadCloser. -type notifyingReader struct { - io.ReadCloser - notify chan<- struct{} -} - -func (r *notifyingReader) Read(p []byte) (int, error) { - n, err := r.ReadCloser.Read(p) - if err != nil && r.notify != nil { - close(r.notify) - r.notify = nil - } - return n, err -} - -func (r *notifyingReader) Close() error { - err := r.ReadCloser.Close() - if r.notify != nil { - close(r.notify) - r.notify = nil - } - return err -} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go deleted file mode 100644 index 9159cf02..00000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9,!go1.7 - -package ctxhttp - -import ( - "net" - "net/http" - "net/http/httptest" - "sync" - "testing" - "time" - - "golang.org/x/net/context" -) - -// golang.org/issue/14065 -func TestClosesResponseBodyOnCancel(t *testing.T) { - defer func() { testHookContextDoneBeforeHeaders = nop }() - defer func() { testHookDoReturned = nop }() - defer func() { testHookDidBodyClose = nop }() - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) - defer ts.Close() - - ctx, cancel := context.WithCancel(context.Background()) - - // closed when Do enters select case <-ctx.Done() - enteredDonePath := make(chan struct{}) - - testHookContextDoneBeforeHeaders = func() { - close(enteredDonePath) - } - - testHookDoReturned = func() { - // We now have the result (the Flush'd headers) at least, - // so we can cancel the request. - cancel() - - // But block the client.Do goroutine from sending - // until Do enters into the <-ctx.Done() path, since - // otherwise if both channels are readable, select - // picks a random one. - <-enteredDonePath - } - - sawBodyClose := make(chan struct{}) - testHookDidBodyClose = func() { close(sawBodyClose) } - - tr := &http.Transport{} - defer tr.CloseIdleConnections() - c := &http.Client{Transport: tr} - req, _ := http.NewRequest("GET", ts.URL, nil) - _, doErr := Do(ctx, c, req) - - select { - case <-sawBodyClose: - case <-time.After(5 * time.Second): - t.Fatal("timeout waiting for body to close") - } - - if doErr != ctx.Err() { - t.Errorf("Do error = %v; want %v", doErr, ctx.Err()) - } -} - -type noteCloseConn struct { - net.Conn - onceClose sync.Once - closefn func() -} - -func (c *noteCloseConn) Close() error { - c.onceClose.Do(c.closefn) - return c.Conn.Close() -} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go index 1e415518..c4339c4e 100644 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go +++ b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go @@ -7,16 +7,28 @@ package ctxhttp import ( + "context" "io" "io/ioutil" "net/http" "net/http/httptest" "testing" "time" - - "golang.org/x/net/context" ) +func TestGo17Context(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, "ok") + })) + defer ts.Close() + ctx := context.Background() + resp, err := Get(ctx, http.DefaultClient, ts.URL) + if resp == nil || err != nil { + t.Fatalf("error received from client: %v %v", err, resp) + } + resp.Body.Close() +} + const ( requestDuration = 100 * time.Millisecond requestBody = "ok" diff --git a/vendor/golang.org/x/net/http2/configure_transport.go b/vendor/golang.org/x/net/http2/configure_transport.go deleted file mode 100644 index 6356b328..00000000 --- a/vendor/golang.org/x/net/http2/configure_transport.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.6 - -package http2 - -import ( - "crypto/tls" - "fmt" - "net/http" -) - -func configureTransport(t1 *http.Transport) (*Transport, error) { - connPool := new(clientConnPool) - t2 := &Transport{ - ConnPool: noDialClientConnPool{connPool}, - t1: t1, - } - connPool.t = t2 - if err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil { - return nil, err - } - if t1.TLSClientConfig == nil { - t1.TLSClientConfig = new(tls.Config) - } - if !strSliceContains(t1.TLSClientConfig.NextProtos, "h2") { - t1.TLSClientConfig.NextProtos = append([]string{"h2"}, t1.TLSClientConfig.NextProtos...) - } - if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") { - t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1") - } - upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper { - addr := authorityAddr("https", authority) - if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil { - go c.Close() - return erringRoundTripper{err} - } else if !used { - // Turns out we don't need this c. - // For example, two goroutines made requests to the same host - // at the same time, both kicking off TCP dials. (since protocol - // was unknown) - go c.Close() - } - return t2 - } - if m := t1.TLSNextProto; len(m) == 0 { - t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{ - "h2": upgradeFn, - } - } else { - m["h2"] = upgradeFn - } - return t2, nil -} - -// registerHTTPSProtocol calls Transport.RegisterProtocol but -// converting panics into errors. -func registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err error) { - defer func() { - if e := recover(); e != nil { - err = fmt.Errorf("%v", e) - } - }() - t.RegisterProtocol("https", rt) - return nil -} - -// noDialH2RoundTripper is a RoundTripper which only tries to complete the request -// if there's already has a cached connection to the host. -// (The field is exported so it can be accessed via reflect from net/http; tested -// by TestNoDialH2RoundTripperType) -type noDialH2RoundTripper struct{ *Transport } - -func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := rt.Transport.RoundTrip(req) - if isNoCachedConnError(err) { - return nil, http.ErrSkipAltProtocol - } - return res, err -} diff --git a/vendor/golang.org/x/net/http2/databuffer_test.go b/vendor/golang.org/x/net/http2/databuffer_test.go index 028e12e5..32cd5f38 100644 --- a/vendor/golang.org/x/net/http2/databuffer_test.go +++ b/vendor/golang.org/x/net/http2/databuffer_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.7 - package http2 import ( diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go index c85e31f2..b46791d1 100644 --- a/vendor/golang.org/x/net/http2/frame.go +++ b/vendor/golang.org/x/net/http2/frame.go @@ -1477,7 +1477,7 @@ func (fr *Framer) maxHeaderStringLen() int { } // readMetaFrame returns 0 or more CONTINUATION frames from fr and -// merge them into into the provided hf and returns a MetaHeadersFrame +// merge them into the provided hf and returns a MetaHeadersFrame // with the decoded hpack values. func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { if fr.AllowIllegalReads { diff --git a/vendor/golang.org/x/net/http2/go111.go b/vendor/golang.org/x/net/http2/go111.go index 9749dc0b..3a131016 100644 --- a/vendor/golang.org/x/net/http2/go111.go +++ b/vendor/golang.org/x/net/http2/go111.go @@ -6,19 +6,22 @@ package http2 -import "net/textproto" +import ( + "net/http/httptrace" + "net/textproto" +) -func traceHasWroteHeaderField(trace *clientTrace) bool { +func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { return trace != nil && trace.WroteHeaderField != nil } -func traceWroteHeaderField(trace *clientTrace, k, v string) { +func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) { if trace != nil && trace.WroteHeaderField != nil { trace.WroteHeaderField(k, []string{v}) } } -func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error { +func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { if trace != nil { return trace.Got1xxResponse } diff --git a/vendor/golang.org/x/net/http2/go16.go b/vendor/golang.org/x/net/http2/go16.go deleted file mode 100644 index 00b2e9e3..00000000 --- a/vendor/golang.org/x/net/http2/go16.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.6 - -package http2 - -import ( - "net/http" - "time" -) - -func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { - return t1.ExpectContinueTimeout -} diff --git a/vendor/golang.org/x/net/http2/go17.go b/vendor/golang.org/x/net/http2/go17.go deleted file mode 100644 index d957b7bc..00000000 --- a/vendor/golang.org/x/net/http2/go17.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package http2 - -import ( - "context" - "net" - "net/http" - "net/http/httptrace" - "time" -) - -type contextContext interface { - context.Context -} - -var errCanceled = context.Canceled - -func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) { - ctx, cancel = context.WithCancel(context.Background()) - ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr()) - if hs := opts.baseConfig(); hs != nil { - ctx = context.WithValue(ctx, http.ServerContextKey, hs) - } - return -} - -func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) { - return context.WithCancel(ctx) -} - -func requestWithContext(req *http.Request, ctx contextContext) *http.Request { - return req.WithContext(ctx) -} - -type clientTrace httptrace.ClientTrace - -func reqContext(r *http.Request) context.Context { return r.Context() } - -func (t *Transport) idleConnTimeout() time.Duration { - if t.t1 != nil { - return t.t1.IdleConnTimeout - } - return 0 -} - -func setResponseUncompressed(res *http.Response) { res.Uncompressed = true } - -func traceGetConn(req *http.Request, hostPort string) { - trace := httptrace.ContextClientTrace(req.Context()) - if trace == nil || trace.GetConn == nil { - return - } - trace.GetConn(hostPort) -} - -func traceGotConn(req *http.Request, cc *ClientConn) { - trace := httptrace.ContextClientTrace(req.Context()) - if trace == nil || trace.GotConn == nil { - return - } - ci := httptrace.GotConnInfo{Conn: cc.tconn} - cc.mu.Lock() - ci.Reused = cc.nextStreamID > 1 - ci.WasIdle = len(cc.streams) == 0 && ci.Reused - if ci.WasIdle && !cc.lastActive.IsZero() { - ci.IdleTime = time.Now().Sub(cc.lastActive) - } - cc.mu.Unlock() - - trace.GotConn(ci) -} - -func traceWroteHeaders(trace *clientTrace) { - if trace != nil && trace.WroteHeaders != nil { - trace.WroteHeaders() - } -} - -func traceGot100Continue(trace *clientTrace) { - if trace != nil && trace.Got100Continue != nil { - trace.Got100Continue() - } -} - -func traceWait100Continue(trace *clientTrace) { - if trace != nil && trace.Wait100Continue != nil { - trace.Wait100Continue() - } -} - -func traceWroteRequest(trace *clientTrace, err error) { - if trace != nil && trace.WroteRequest != nil { - trace.WroteRequest(httptrace.WroteRequestInfo{Err: err}) - } -} - -func traceFirstResponseByte(trace *clientTrace) { - if trace != nil && trace.GotFirstResponseByte != nil { - trace.GotFirstResponseByte() - } -} - -func requestTrace(req *http.Request) *clientTrace { - trace := httptrace.ContextClientTrace(req.Context()) - return (*clientTrace)(trace) -} - -// Ping sends a PING frame to the server and waits for the ack. -func (cc *ClientConn) Ping(ctx context.Context) error { - return cc.ping(ctx) -} - -// Shutdown gracefully closes the client connection, waiting for running streams to complete. -func (cc *ClientConn) Shutdown(ctx context.Context) error { - return cc.shutdown(ctx) -} diff --git a/vendor/golang.org/x/net/http2/go17_not18.go b/vendor/golang.org/x/net/http2/go17_not18.go deleted file mode 100644 index b4c52ece..00000000 --- a/vendor/golang.org/x/net/http2/go17_not18.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7,!go1.8 - -package http2 - -import "crypto/tls" - -// temporary copy of Go 1.7's private tls.Config.clone: -func cloneTLSConfig(c *tls.Config) *tls.Config { - return &tls.Config{ - Rand: c.Rand, - Time: c.Time, - Certificates: c.Certificates, - NameToCertificate: c.NameToCertificate, - GetCertificate: c.GetCertificate, - RootCAs: c.RootCAs, - NextProtos: c.NextProtos, - ServerName: c.ServerName, - ClientAuth: c.ClientAuth, - ClientCAs: c.ClientCAs, - InsecureSkipVerify: c.InsecureSkipVerify, - CipherSuites: c.CipherSuites, - PreferServerCipherSuites: c.PreferServerCipherSuites, - SessionTicketsDisabled: c.SessionTicketsDisabled, - SessionTicketKey: c.SessionTicketKey, - ClientSessionCache: c.ClientSessionCache, - MinVersion: c.MinVersion, - MaxVersion: c.MaxVersion, - CurvePreferences: c.CurvePreferences, - DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled, - Renegotiation: c.Renegotiation, - } -} diff --git a/vendor/golang.org/x/net/http2/go18.go b/vendor/golang.org/x/net/http2/go18.go deleted file mode 100644 index 4f30d228..00000000 --- a/vendor/golang.org/x/net/http2/go18.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.8 - -package http2 - -import ( - "crypto/tls" - "io" - "net/http" -) - -func cloneTLSConfig(c *tls.Config) *tls.Config { - c2 := c.Clone() - c2.GetClientCertificate = c.GetClientCertificate // golang.org/issue/19264 - return c2 -} - -var _ http.Pusher = (*responseWriter)(nil) - -// Push implements http.Pusher. -func (w *responseWriter) Push(target string, opts *http.PushOptions) error { - internalOpts := pushOptions{} - if opts != nil { - internalOpts.Method = opts.Method - internalOpts.Header = opts.Header - } - return w.push(target, internalOpts) -} - -func configureServer18(h1 *http.Server, h2 *Server) error { - if h2.IdleTimeout == 0 { - if h1.IdleTimeout != 0 { - h2.IdleTimeout = h1.IdleTimeout - } else { - h2.IdleTimeout = h1.ReadTimeout - } - } - return nil -} - -func shouldLogPanic(panicValue interface{}) bool { - return panicValue != nil && panicValue != http.ErrAbortHandler -} - -func reqGetBody(req *http.Request) func() (io.ReadCloser, error) { - return req.GetBody -} - -func reqBodyIsNoBody(body io.ReadCloser) bool { - return body == http.NoBody -} - -func go18httpNoBody() io.ReadCloser { return http.NoBody } // for tests only diff --git a/vendor/golang.org/x/net/http2/go18_test.go b/vendor/golang.org/x/net/http2/go18_test.go deleted file mode 100644 index 30e3b038..00000000 --- a/vendor/golang.org/x/net/http2/go18_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.8 - -package http2 - -import ( - "crypto/tls" - "net/http" - "testing" - "time" -) - -// Tests that http2.Server.IdleTimeout is initialized from -// http.Server.{Idle,Read}Timeout. http.Server.IdleTimeout was -// added in Go 1.8. -func TestConfigureServerIdleTimeout_Go18(t *testing.T) { - const timeout = 5 * time.Second - const notThisOne = 1 * time.Second - - // With a zero http2.Server, verify that it copies IdleTimeout: - { - s1 := &http.Server{ - IdleTimeout: timeout, - ReadTimeout: notThisOne, - } - s2 := &Server{} - if err := ConfigureServer(s1, s2); err != nil { - t.Fatal(err) - } - if s2.IdleTimeout != timeout { - t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) - } - } - - // And that it falls back to ReadTimeout: - { - s1 := &http.Server{ - ReadTimeout: timeout, - } - s2 := &Server{} - if err := ConfigureServer(s1, s2); err != nil { - t.Fatal(err) - } - if s2.IdleTimeout != timeout { - t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) - } - } - - // Verify that s1's IdleTimeout doesn't overwrite an existing setting: - { - s1 := &http.Server{ - IdleTimeout: notThisOne, - } - s2 := &Server{ - IdleTimeout: timeout, - } - if err := ConfigureServer(s1, s2); err != nil { - t.Fatal(err) - } - if s2.IdleTimeout != timeout { - t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) - } - } -} - -func TestCertClone(t *testing.T) { - c := &tls.Config{ - GetClientCertificate: func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { - panic("shouldn't be called") - }, - } - c2 := cloneTLSConfig(c) - if c2.GetClientCertificate == nil { - t.Error("GetClientCertificate is nil") - } -} diff --git a/vendor/golang.org/x/net/http2/go19.go b/vendor/golang.org/x/net/http2/go19.go deleted file mode 100644 index 38124ba5..00000000 --- a/vendor/golang.org/x/net/http2/go19.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package http2 - -import ( - "net/http" -) - -func configureServer19(s *http.Server, conf *Server) error { - s.RegisterOnShutdown(conf.state.startGracefulShutdown) - return nil -} diff --git a/vendor/golang.org/x/net/http2/go19_test.go b/vendor/golang.org/x/net/http2/go19_test.go deleted file mode 100644 index 22b00066..00000000 --- a/vendor/golang.org/x/net/http2/go19_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package http2 - -import ( - "context" - "net/http" - "reflect" - "testing" - "time" -) - -func TestServerGracefulShutdown(t *testing.T) { - var st *serverTester - handlerDone := make(chan struct{}) - st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - defer close(handlerDone) - go st.ts.Config.Shutdown(context.Background()) - - ga := st.wantGoAway() - if ga.ErrCode != ErrCodeNo { - t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) - } - if ga.LastStreamID != 1 { - t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID) - } - - w.Header().Set("x-foo", "bar") - }) - defer st.Close() - - st.greet() - st.bodylessReq1() - - select { - case <-handlerDone: - case <-time.After(5 * time.Second): - t.Fatalf("server did not shutdown?") - } - hf := st.wantHeaders() - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"x-foo", "bar"}, - {"content-length", "0"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - - n, err := st.cc.Read([]byte{0}) - if n != 0 || err == nil { - t.Errorf("Read = %v, %v; want 0, non-nil", n, err) - } -} diff --git a/vendor/golang.org/x/net/http2/h2c/h2c.go b/vendor/golang.org/x/net/http2/h2c/h2c.go index f2d60f84..03a31c80 100644 --- a/vendor/golang.org/x/net/http2/h2c/h2c.go +++ b/vendor/golang.org/x/net/http2/h2c/h2c.go @@ -293,7 +293,7 @@ func (c *rwConn) Write(p []byte) (int, error) { return n, err } -// settingsAckSwallowWriter is a writer that normally forwards bytes to it's +// settingsAckSwallowWriter is a writer that normally forwards bytes to its // underlying Writer, but swallows the first SettingsAck frame that it sees. type settingsAckSwallowWriter struct { Writer *bufio.Writer diff --git a/vendor/golang.org/x/net/http2/h2i/h2i.go b/vendor/golang.org/x/net/http2/h2i/h2i.go index 12d325eb..0f0e5528 100644 --- a/vendor/golang.org/x/net/http2/h2i/h2i.go +++ b/vendor/golang.org/x/net/http2/h2i/h2i.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !js,!nacl,!plan9,!solaris +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows /* The h2i command is an interactive HTTP/2 console. diff --git a/vendor/golang.org/x/net/http2/http2_test.go b/vendor/golang.org/x/net/http2/http2_test.go index 667db488..dda67439 100644 --- a/vendor/golang.org/x/net/http2/http2_test.go +++ b/vendor/golang.org/x/net/http2/http2_test.go @@ -225,3 +225,56 @@ func waitErrCondition(waitFor, checkEvery time.Duration, fn func() error) error } return err } + +// Tests that http2.Server.IdleTimeout is initialized from +// http.Server.{Idle,Read}Timeout. http.Server.IdleTimeout was +// added in Go 1.8. +func TestConfigureServerIdleTimeout_Go18(t *testing.T) { + const timeout = 5 * time.Second + const notThisOne = 1 * time.Second + + // With a zero http2.Server, verify that it copies IdleTimeout: + { + s1 := &http.Server{ + IdleTimeout: timeout, + ReadTimeout: notThisOne, + } + s2 := &Server{} + if err := ConfigureServer(s1, s2); err != nil { + t.Fatal(err) + } + if s2.IdleTimeout != timeout { + t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) + } + } + + // And that it falls back to ReadTimeout: + { + s1 := &http.Server{ + ReadTimeout: timeout, + } + s2 := &Server{} + if err := ConfigureServer(s1, s2); err != nil { + t.Fatal(err) + } + if s2.IdleTimeout != timeout { + t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) + } + } + + // Verify that s1's IdleTimeout doesn't overwrite an existing setting: + { + s1 := &http.Server{ + IdleTimeout: notThisOne, + } + s2 := &Server{ + IdleTimeout: timeout, + } + if err := ConfigureServer(s1, s2); err != nil { + t.Fatal(err) + } + if s2.IdleTimeout != timeout { + t.Errorf("s2.IdleTimeout = %v; want %v", s2.IdleTimeout, timeout) + } + } +} diff --git a/vendor/golang.org/x/net/http2/not_go111.go b/vendor/golang.org/x/net/http2/not_go111.go index 0df34e6d..161bca7c 100644 --- a/vendor/golang.org/x/net/http2/not_go111.go +++ b/vendor/golang.org/x/net/http2/not_go111.go @@ -6,12 +6,15 @@ package http2 -import "net/textproto" +import ( + "net/http/httptrace" + "net/textproto" +) -func traceHasWroteHeaderField(trace *clientTrace) bool { return false } +func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { return false } -func traceWroteHeaderField(trace *clientTrace, k, v string) {} +func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {} -func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error { +func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { return nil } diff --git a/vendor/golang.org/x/net/http2/not_go16.go b/vendor/golang.org/x/net/http2/not_go16.go deleted file mode 100644 index 508cebcc..00000000 --- a/vendor/golang.org/x/net/http2/not_go16.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.6 - -package http2 - -import ( - "net/http" - "time" -) - -func configureTransport(t1 *http.Transport) (*Transport, error) { - return nil, errTransportVersion -} - -func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { - return 0 - -} diff --git a/vendor/golang.org/x/net/http2/not_go17.go b/vendor/golang.org/x/net/http2/not_go17.go deleted file mode 100644 index 7ffb2504..00000000 --- a/vendor/golang.org/x/net/http2/not_go17.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package http2 - -import ( - "crypto/tls" - "errors" - "net" - "net/http" - "time" -) - -type contextContext interface { - Done() <-chan struct{} - Err() error -} - -var errCanceled = errors.New("canceled") - -type fakeContext struct{} - -func (fakeContext) Done() <-chan struct{} { return nil } -func (fakeContext) Err() error { panic("should not be called") } - -func reqContext(r *http.Request) fakeContext { - return fakeContext{} -} - -func setResponseUncompressed(res *http.Response) { - // Nothing. -} - -type clientTrace struct{} - -func requestTrace(*http.Request) *clientTrace { return nil } -func traceGetConn(*http.Request, string) {} -func traceGotConn(*http.Request, *ClientConn) {} -func traceFirstResponseByte(*clientTrace) {} -func traceWroteHeaders(*clientTrace) {} -func traceWroteRequest(*clientTrace, error) {} -func traceGot100Continue(trace *clientTrace) {} -func traceWait100Continue(trace *clientTrace) {} - -func nop() {} - -func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) { - return nil, nop -} - -func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) { - return ctx, nop -} - -func requestWithContext(req *http.Request, ctx contextContext) *http.Request { - return req -} - -// temporary copy of Go 1.6's private tls.Config.clone: -func cloneTLSConfig(c *tls.Config) *tls.Config { - return &tls.Config{ - Rand: c.Rand, - Time: c.Time, - Certificates: c.Certificates, - NameToCertificate: c.NameToCertificate, - GetCertificate: c.GetCertificate, - RootCAs: c.RootCAs, - NextProtos: c.NextProtos, - ServerName: c.ServerName, - ClientAuth: c.ClientAuth, - ClientCAs: c.ClientCAs, - InsecureSkipVerify: c.InsecureSkipVerify, - CipherSuites: c.CipherSuites, - PreferServerCipherSuites: c.PreferServerCipherSuites, - SessionTicketsDisabled: c.SessionTicketsDisabled, - SessionTicketKey: c.SessionTicketKey, - ClientSessionCache: c.ClientSessionCache, - MinVersion: c.MinVersion, - MaxVersion: c.MaxVersion, - CurvePreferences: c.CurvePreferences, - } -} - -func (cc *ClientConn) Ping(ctx contextContext) error { - return cc.ping(ctx) -} - -func (cc *ClientConn) Shutdown(ctx contextContext) error { - return cc.shutdown(ctx) -} - -func (t *Transport) idleConnTimeout() time.Duration { return 0 } diff --git a/vendor/golang.org/x/net/http2/not_go18.go b/vendor/golang.org/x/net/http2/not_go18.go deleted file mode 100644 index 6f8d3f86..00000000 --- a/vendor/golang.org/x/net/http2/not_go18.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.8 - -package http2 - -import ( - "io" - "net/http" -) - -func configureServer18(h1 *http.Server, h2 *Server) error { - // No IdleTimeout to sync prior to Go 1.8. - return nil -} - -func shouldLogPanic(panicValue interface{}) bool { - return panicValue != nil -} - -func reqGetBody(req *http.Request) func() (io.ReadCloser, error) { - return nil -} - -func reqBodyIsNoBody(io.ReadCloser) bool { return false } - -func go18httpNoBody() io.ReadCloser { return nil } // for tests only diff --git a/vendor/golang.org/x/net/http2/not_go19.go b/vendor/golang.org/x/net/http2/not_go19.go deleted file mode 100644 index 5ae07726..00000000 --- a/vendor/golang.org/x/net/http2/not_go19.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package http2 - -import ( - "net/http" -) - -func configureServer19(s *http.Server, conf *Server) error { - // not supported prior to go1.9 - return nil -} diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 56859d1f..b57b6e2d 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -28,6 +28,7 @@ package http2 import ( "bufio" "bytes" + "context" "crypto/tls" "errors" "fmt" @@ -209,12 +210,14 @@ func ConfigureServer(s *http.Server, conf *Server) error { conf = new(Server) } conf.state = &serverInternalState{activeConns: make(map[*serverConn]struct{})} - if err := configureServer18(s, conf); err != nil { - return err - } - if err := configureServer19(s, conf); err != nil { - return err + if h1, h2 := s, conf; h2.IdleTimeout == 0 { + if h1.IdleTimeout != 0 { + h2.IdleTimeout = h1.IdleTimeout + } else { + h2.IdleTimeout = h1.ReadTimeout + } } + s.RegisterOnShutdown(conf.state.startGracefulShutdown) if s.TLSConfig == nil { s.TLSConfig = new(tls.Config) @@ -435,6 +438,15 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { sc.serve() } +func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) { + ctx, cancel = context.WithCancel(context.Background()) + ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr()) + if hs := opts.baseConfig(); hs != nil { + ctx = context.WithValue(ctx, http.ServerContextKey, hs) + } + return +} + func (sc *serverConn) rejectConn(err ErrCode, debug string) { sc.vlogf("http2: server rejecting conn: %v, %s", err, debug) // ignoring errors. hanging up anyway. @@ -450,7 +462,7 @@ type serverConn struct { conn net.Conn bw *bufferedWriter // writing to conn handler http.Handler - baseCtx contextContext + baseCtx context.Context framer *Framer doneServing chan struct{} // closed when serverConn.serve ends readFrameCh chan readFrameResult // written by serverConn.readFrames @@ -530,7 +542,7 @@ type stream struct { id uint32 body *pipe // non-nil if expecting DATA frames cw closeWaiter // closed wait stream transitions to closed state - ctx contextContext + ctx context.Context cancelCtx func() // owned by serverConn's serve loop: @@ -1110,7 +1122,7 @@ func (sc *serverConn) startFrameWrite(wr FrameWriteRequest) { // errHandlerPanicked is the error given to any callers blocked in a read from // Request.Body when the main goroutine panics. Since most handlers read in the -// the main ServeHTTP goroutine, this will show up rarely. +// main ServeHTTP goroutine, this will show up rarely. var errHandlerPanicked = errors.New("http2: handler panicked") // wroteFrame is called on the serve goroutine with the result of @@ -1882,7 +1894,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream panic("internal error: cannot create stream with id 0") } - ctx, cancelCtx := contextWithCancel(sc.baseCtx) + ctx, cancelCtx := context.WithCancel(sc.baseCtx) st := &stream{ sc: sc, id: id, @@ -2048,7 +2060,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r Body: body, Trailer: trailer, } - req = requestWithContext(req, st.ctx) + req = req.WithContext(st.ctx) rws := responseWriterStatePool.Get().(*responseWriterState) bwSave := rws.bw @@ -2076,7 +2088,7 @@ func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler stream: rw.rws.stream, }) // Same as net/http: - if shouldLogPanic(e) { + if e != nil && e != http.ErrAbortHandler { const size = 64 << 10 buf := make([]byte, size) buf = buf[:runtime.Stack(buf, false)] @@ -2638,14 +2650,9 @@ var ( ErrPushLimitReached = errors.New("http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS") ) -// pushOptions is the internal version of http.PushOptions, which we -// cannot include here because it's only defined in Go 1.8 and later. -type pushOptions struct { - Method string - Header http.Header -} +var _ http.Pusher = (*responseWriter)(nil) -func (w *responseWriter) push(target string, opts pushOptions) error { +func (w *responseWriter) Push(target string, opts *http.PushOptions) error { st := w.rws.stream sc := st.sc sc.serveG.checkNotOn() @@ -2656,6 +2663,10 @@ func (w *responseWriter) push(target string, opts pushOptions) error { return ErrRecursivePush } + if opts == nil { + opts = new(http.PushOptions) + } + // Default options. if opts.Method == "" { opts.Method = "GET" diff --git a/vendor/golang.org/x/net/http2/server_push_test.go b/vendor/golang.org/x/net/http2/server_push_test.go index 918fd30d..6e57de0b 100644 --- a/vendor/golang.org/x/net/http2/server_push_test.go +++ b/vendor/golang.org/x/net/http2/server_push_test.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.8 - package http2 import ( diff --git a/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go index bb19c966..b0a117f7 100644 --- a/vendor/golang.org/x/net/http2/server_test.go +++ b/vendor/golang.org/x/net/http2/server_test.go @@ -6,6 +6,7 @@ package http2 import ( "bytes" + "context" "crypto/tls" "errors" "flag" @@ -2415,6 +2416,7 @@ func testRejectTLS(t *testing.T, max uint16) { func TestServer_Rejects_TLSBadCipher(t *testing.T) { st := newServerTester(t, nil, func(c *tls.Config) { + c.MaxVersion = tls.VersionTLS12 // workaround for golang.org/issue/28762 // Only list bad ones: c.CipherSuites = []uint16{ tls.TLS_RSA_WITH_RC4_128_SHA, @@ -3850,3 +3852,47 @@ func TestServer_Headers_HalfCloseRemote(t *testing.T) { st.wantRSTStream(1, ErrCodeStreamClosed) } + +func TestServerGracefulShutdown(t *testing.T) { + var st *serverTester + handlerDone := make(chan struct{}) + st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + defer close(handlerDone) + go st.ts.Config.Shutdown(context.Background()) + + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeNo { + t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) + } + if ga.LastStreamID != 1 { + t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID) + } + + w.Header().Set("x-foo", "bar") + }) + defer st.Close() + + st.greet() + st.bodylessReq1() + + select { + case <-handlerDone: + case <-time.After(5 * time.Second): + t.Fatalf("server did not shutdown?") + } + hf := st.wantHeaders() + goth := st.decodeHeader(hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"x-foo", "bar"}, + {"content-length", "0"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + + n, err := st.cc.Read([]byte{0}) + if n != 0 || err == nil { + t.Errorf("Read = %v, %v; want 0, non-nil", n, err) + } +} diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 9d1f2fad..3fe29188 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -10,6 +10,7 @@ import ( "bufio" "bytes" "compress/gzip" + "context" "crypto/rand" "crypto/tls" "errors" @@ -21,6 +22,7 @@ import ( mathrand "math/rand" "net" "net/http" + "net/http/httptrace" "net/textproto" "sort" "strconv" @@ -118,16 +120,56 @@ func (t *Transport) disableCompression() bool { return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) } -var errTransportVersion = errors.New("http2: ConfigureTransport is only supported starting at Go 1.6") - // ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. -// It requires Go 1.6 or later and returns an error if the net/http package is too old -// or if t1 has already been HTTP/2-enabled. +// It returns an error if t1 has already been HTTP/2-enabled. func ConfigureTransport(t1 *http.Transport) error { - _, err := configureTransport(t1) // in configure_transport.go (go1.6) or not_go16.go + _, err := configureTransport(t1) return err } +func configureTransport(t1 *http.Transport) (*Transport, error) { + connPool := new(clientConnPool) + t2 := &Transport{ + ConnPool: noDialClientConnPool{connPool}, + t1: t1, + } + connPool.t = t2 + if err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil { + return nil, err + } + if t1.TLSClientConfig == nil { + t1.TLSClientConfig = new(tls.Config) + } + if !strSliceContains(t1.TLSClientConfig.NextProtos, "h2") { + t1.TLSClientConfig.NextProtos = append([]string{"h2"}, t1.TLSClientConfig.NextProtos...) + } + if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") { + t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1") + } + upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper { + addr := authorityAddr("https", authority) + if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil { + go c.Close() + return erringRoundTripper{err} + } else if !used { + // Turns out we don't need this c. + // For example, two goroutines made requests to the same host + // at the same time, both kicking off TCP dials. (since protocol + // was unknown) + go c.Close() + } + return t2 + } + if m := t1.TLSNextProto; len(m) == 0 { + t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{ + "h2": upgradeFn, + } + } else { + m["h2"] = upgradeFn + } + return t2, nil +} + func (t *Transport) connPool() ClientConnPool { t.connPoolOnce.Do(t.initConnPool) return t.connPoolOrDef @@ -192,7 +234,7 @@ type ClientConn struct { type clientStream struct { cc *ClientConn req *http.Request - trace *clientTrace // or nil + trace *httptrace.ClientTrace // or nil ID uint32 resc chan resAndError bufPipe pipe // buffered pipe with the flow-controlled response payload @@ -226,7 +268,7 @@ type clientStream struct { // channel to be signaled. A non-nil error is returned only if the request was // canceled. func awaitRequestCancel(req *http.Request, done <-chan struct{}) error { - ctx := reqContext(req) + ctx := req.Context() if req.Cancel == nil && ctx.Done() == nil { return nil } @@ -401,8 +443,8 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res select { case <-time.After(time.Second * time.Duration(backoff)): continue - case <-reqContext(req).Done(): - return nil, reqContext(req).Err() + case <-req.Context().Done(): + return nil, req.Context().Err() } } } @@ -439,16 +481,15 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt } // If the Body is nil (or http.NoBody), it's safe to reuse // this request and its Body. - if req.Body == nil || reqBodyIsNoBody(req.Body) { + if req.Body == nil || req.Body == http.NoBody { return req, nil } // If the request body can be reset back to its original // state via the optional req.GetBody, do that. - getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody - if getBody != nil { + if req.GetBody != nil { // TODO: consider a req.Body.Close here? or audit that all caller paths do? - body, err := getBody() + body, err := req.GetBody() if err != nil { return nil, err } @@ -494,7 +535,7 @@ func (t *Transport) dialClientConn(addr string, singleUse bool) (*ClientConn, er func (t *Transport) newTLSConfig(host string) *tls.Config { cfg := new(tls.Config) if t.TLSClientConfig != nil { - *cfg = *cloneTLSConfig(t.TLSClientConfig) + *cfg = *t.TLSClientConfig.Clone() } if !strSliceContains(cfg.NextProtos, NextProtoTLS) { cfg.NextProtos = append([]string{NextProtoTLS}, cfg.NextProtos...) @@ -545,7 +586,7 @@ func (t *Transport) expectContinueTimeout() time.Duration { if t.t1 == nil { return 0 } - return transportExpectContinueTimeout(t.t1) + return t.t1.ExpectContinueTimeout } func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { @@ -711,8 +752,7 @@ func (cc *ClientConn) closeIfIdle() { var shutdownEnterWaitStateHook = func() {} // Shutdown gracefully close the client connection, waiting for running streams to complete. -// Public implementation is in go17.go and not_go17.go -func (cc *ClientConn) shutdown(ctx contextContext) error { +func (cc *ClientConn) Shutdown(ctx context.Context) error { if err := cc.sendGoAway(); err != nil { return err } @@ -882,7 +922,7 @@ func checkConnHeaders(req *http.Request) error { // req.ContentLength, where 0 actually means zero (not unknown) and -1 // means unknown. func actualContentLength(req *http.Request) int64 { - if req.Body == nil || reqBodyIsNoBody(req.Body) { + if req.Body == nil || req.Body == http.NoBody { return 0 } if req.ContentLength != 0 { @@ -952,7 +992,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cs := cc.newStream() cs.req = req - cs.trace = requestTrace(req) + cs.trace = httptrace.ContextClientTrace(req.Context()) cs.requestedGzip = requestedGzip bodyWriter := cc.t.getBodyWriterState(cs, body) cs.on100 = bodyWriter.on100 @@ -990,7 +1030,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf readLoopResCh := cs.resc bodyWritten := false - ctx := reqContext(req) + ctx := req.Context() handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) { res := re.res @@ -1060,6 +1100,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf default: } if err != nil { + cc.forgetStreamID(cs.ID) return nil, cs.getStartedWrite(), err } bodyWritten = true @@ -1181,6 +1222,7 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) ( sawEOF = true err = nil } else if err != nil { + cc.writeStreamReset(cs.ID, ErrCodeCancel, err) return err } @@ -1416,7 +1458,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail return nil, errRequestHeaderListSize } - trace := requestTrace(req) + trace := httptrace.ContextClientTrace(req.Context()) traceHeaders := traceHasWroteHeaderField(trace) // Header list size is ok. Write the headers. @@ -1839,7 +1881,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra res.Header.Del("Content-Length") res.ContentLength = -1 res.Body = &gzipReader{body: res.Body} - setResponseUncompressed(res) + res.Uncompressed = true } return res, nil } @@ -2216,8 +2258,7 @@ func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { } // Ping sends a PING frame to the server and waits for the ack. -// Public implementation is in go17.go and not_go17.go -func (cc *ClientConn) ping(ctx contextContext) error { +func (cc *ClientConn) Ping(ctx context.Context) error { c := make(chan struct{}) // Generate a random payload var p [8]byte @@ -2451,3 +2492,91 @@ func (s bodyWriterState) scheduleBodyWrite() { func isConnectionCloseRequest(req *http.Request) bool { return req.Close || httpguts.HeaderValuesContainsToken(req.Header["Connection"], "close") } + +// registerHTTPSProtocol calls Transport.RegisterProtocol but +// converting panics into errors. +func registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err error) { + defer func() { + if e := recover(); e != nil { + err = fmt.Errorf("%v", e) + } + }() + t.RegisterProtocol("https", rt) + return nil +} + +// noDialH2RoundTripper is a RoundTripper which only tries to complete the request +// if there's already has a cached connection to the host. +// (The field is exported so it can be accessed via reflect from net/http; tested +// by TestNoDialH2RoundTripperType) +type noDialH2RoundTripper struct{ *Transport } + +func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + res, err := rt.Transport.RoundTrip(req) + if isNoCachedConnError(err) { + return nil, http.ErrSkipAltProtocol + } + return res, err +} + +func (t *Transport) idleConnTimeout() time.Duration { + if t.t1 != nil { + return t.t1.IdleConnTimeout + } + return 0 +} + +func traceGetConn(req *http.Request, hostPort string) { + trace := httptrace.ContextClientTrace(req.Context()) + if trace == nil || trace.GetConn == nil { + return + } + trace.GetConn(hostPort) +} + +func traceGotConn(req *http.Request, cc *ClientConn) { + trace := httptrace.ContextClientTrace(req.Context()) + if trace == nil || trace.GotConn == nil { + return + } + ci := httptrace.GotConnInfo{Conn: cc.tconn} + cc.mu.Lock() + ci.Reused = cc.nextStreamID > 1 + ci.WasIdle = len(cc.streams) == 0 && ci.Reused + if ci.WasIdle && !cc.lastActive.IsZero() { + ci.IdleTime = time.Now().Sub(cc.lastActive) + } + cc.mu.Unlock() + + trace.GotConn(ci) +} + +func traceWroteHeaders(trace *httptrace.ClientTrace) { + if trace != nil && trace.WroteHeaders != nil { + trace.WroteHeaders() + } +} + +func traceGot100Continue(trace *httptrace.ClientTrace) { + if trace != nil && trace.Got100Continue != nil { + trace.Got100Continue() + } +} + +func traceWait100Continue(trace *httptrace.ClientTrace) { + if trace != nil && trace.Wait100Continue != nil { + trace.Wait100Continue() + } +} + +func traceWroteRequest(trace *httptrace.ClientTrace, err error) { + if trace != nil && trace.WroteRequest != nil { + trace.WroteRequest(httptrace.WroteRequestInfo{Err: err}) + } +} + +func traceFirstResponseByte(trace *httptrace.ClientTrace) { + if trace != nil && trace.GotFirstResponseByte != nil { + trace.GotFirstResponseByte() + } +} diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go index 5b5c0768..f6efa61d 100644 --- a/vendor/golang.org/x/net/http2/transport_test.go +++ b/vendor/golang.org/x/net/http2/transport_test.go @@ -7,6 +7,7 @@ package http2 import ( "bufio" "bytes" + "context" "crypto/tls" "errors" "flag" @@ -31,7 +32,6 @@ import ( "testing" "time" - "golang.org/x/net/context" "golang.org/x/net/http2/hpack" ) @@ -424,7 +424,7 @@ func TestActualContentLength(t *testing.T) { }, // http.NoBody means 0, not -1. 3: { - req: &http.Request{Body: go18httpNoBody()}, + req: &http.Request{Body: http.NoBody}, want: 0, }, } @@ -564,9 +564,6 @@ func TestTransportDialTLS(t *testing.T) { func TestConfigureTransport(t *testing.T) { t1 := &http.Transport{} err := ConfigureTransport(t1) - if err == errTransportVersion { - t.Skip(err) - } if err != nil { t.Fatal(err) } @@ -3784,7 +3781,7 @@ func TestTransportNoBodyMeansNoDATA(t *testing.T) { unblockClient := make(chan bool) ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", go18httpNoBody()) + req, _ := http.NewRequest("GET", "https://dummy.tld/", http.NoBody) ct.tr.RoundTrip(req) <-unblockClient return nil @@ -4024,8 +4021,8 @@ func testClientConnClose(t *testing.T, closeMode closeMode) { } switch closeMode { case shutdownCancel: - if err = cc.Shutdown(canceledCtx); err != errCanceled { - t.Errorf("got %v, want %v", err, errCanceled) + if err = cc.Shutdown(canceledCtx); err != context.Canceled { + t.Errorf("got %v, want %v", err, context.Canceled) } if cc.closing == false { t.Error("expected closing to be true") @@ -4183,3 +4180,99 @@ func TestNoDialH2RoundTripperType(t *testing.T) { t.Fatalf("wrong kind %T; want *Transport", v.Interface()) } } + +type errReader struct { + body []byte + err error +} + +func (r *errReader) Read(p []byte) (int, error) { + if len(r.body) > 0 { + n := copy(p, r.body) + r.body = r.body[n:] + return n, nil + } + return 0, r.err +} + +func testTransportBodyReadError(t *testing.T, body []byte) { + clientDone := make(chan struct{}) + ct := newClientTester(t) + ct.client = func() error { + defer ct.cc.(*net.TCPConn).CloseWrite() + defer close(clientDone) + + checkNoStreams := func() error { + cp, ok := ct.tr.connPool().(*clientConnPool) + if !ok { + return fmt.Errorf("conn pool is %T; want *clientConnPool", ct.tr.connPool()) + } + cp.mu.Lock() + defer cp.mu.Unlock() + conns, ok := cp.conns["dummy.tld:443"] + if !ok { + return fmt.Errorf("missing connection") + } + if len(conns) != 1 { + return fmt.Errorf("conn pool size: %v; expect 1", len(conns)) + } + if activeStreams(conns[0]) != 0 { + return fmt.Errorf("active streams count: %v; want 0", activeStreams(conns[0])) + } + return nil + } + bodyReadError := errors.New("body read error") + body := &errReader{body, bodyReadError} + req, err := http.NewRequest("PUT", "https://dummy.tld/", body) + if err != nil { + return err + } + _, err = ct.tr.RoundTrip(req) + if err != bodyReadError { + return fmt.Errorf("err = %v; want %v", err, bodyReadError) + } + if err = checkNoStreams(); err != nil { + return err + } + return nil + } + ct.server = func() error { + ct.greet() + var receivedBody []byte + var resetCount int + for { + f, err := ct.fr.ReadFrame() + if err != nil { + select { + case <-clientDone: + // If the client's done, it + // will have reported any + // errors on its side. + if bytes.Compare(receivedBody, body) != 0 { + return fmt.Errorf("body: %v; expected %v", receivedBody, body) + } + if resetCount != 1 { + return fmt.Errorf("stream reset count: %v; expected: 1", resetCount) + } + return nil + default: + return err + } + } + switch f := f.(type) { + case *WindowUpdateFrame, *SettingsFrame: + case *HeadersFrame: + case *DataFrame: + receivedBody = append(receivedBody, f.Data()...) + case *RSTStreamFrame: + resetCount++ + default: + return fmt.Errorf("Unexpected client frame %v", f) + } + } + } + ct.run() +} + +func TestTransportBodyReadError_Immediately(t *testing.T) { testTransportBodyReadError(t, nil) } +func TestTransportBodyReadError_Some(t *testing.T) { testTransportBodyReadError(t, []byte("123")) } diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go index fae5c8ad..3849bc26 100644 --- a/vendor/golang.org/x/net/http2/write.go +++ b/vendor/golang.org/x/net/http2/write.go @@ -329,7 +329,7 @@ func (wu writeWindowUpdate) writeFrame(ctx writeContext) error { } // encodeHeaders encodes an http.Header. If keys is not nil, then (k, h[k]) -// is encoded only only if k is in keys. +// is encoded only if k is in keys. func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) { if keys == nil { sorter := sorterPool.Get().(*sorter) diff --git a/vendor/golang.org/x/net/icmp/extension_test.go b/vendor/golang.org/x/net/icmp/extension_test.go index a7669dae..ff513091 100644 --- a/vendor/golang.org/x/net/icmp/extension_test.go +++ b/vendor/golang.org/x/net/icmp/extension_test.go @@ -277,8 +277,7 @@ func TestMarshalAndParseExtension(t *testing.T) { 0x20, 0x00, 0x00, 0x00, }, obj: []byte{ - 0x00, 0x0c, 0x03, 0x02, - 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x03, 0x02, 0x00, 0x00, 0x03, 0x8f, }, ext: &InterfaceIdent{ diff --git a/vendor/golang.org/x/net/icmp/interface.go b/vendor/golang.org/x/net/icmp/interface.go index 617f757b..ae14818d 100644 --- a/vendor/golang.org/x/net/icmp/interface.go +++ b/vendor/golang.org/x/net/icmp/interface.go @@ -259,7 +259,7 @@ func (ifi *InterfaceIdent) Len(_ int) int { } return 4 + (l+3)&^3 case typeInterfaceByIndex: - return 4 + 8 + return 4 + 4 case typeInterfaceByAddress: return 4 + 4 + (len(ifi.Addr)+3)&^3 default: @@ -284,7 +284,7 @@ func (ifi *InterfaceIdent) marshal(proto int, b []byte) error { case typeInterfaceByName: copy(b[4:], ifi.Name) case typeInterfaceByIndex: - binary.BigEndian.PutUint64(b[4:4+8], uint64(ifi.Index)) + binary.BigEndian.PutUint32(b[4:4+4], uint32(ifi.Index)) case typeInterfaceByAddress: binary.BigEndian.PutUint16(b[4:4+2], uint16(ifi.AFI)) b[4+2] = byte(len(ifi.Addr)) @@ -302,10 +302,10 @@ func parseInterfaceIdent(b []byte) (Extension, error) { case typeInterfaceByName: ifi.Name = strings.Trim(string(b[4:]), string(0)) case typeInterfaceByIndex: - if len(b[4:]) < 8 { + if len(b[4:]) < 4 { return nil, errInvalidExtension } - ifi.Index = int(binary.BigEndian.Uint64(b[4 : 4+8])) + ifi.Index = int(binary.BigEndian.Uint32(b[4 : 4+4])) case typeInterfaceByAddress: if len(b[4:]) < 4 { return nil, errInvalidExtension diff --git a/vendor/golang.org/x/net/icmp/message.go b/vendor/golang.org/x/net/icmp/message.go index 75aac6c5..b7883cc9 100644 --- a/vendor/golang.org/x/net/icmp/message.go +++ b/vendor/golang.org/x/net/icmp/message.go @@ -24,7 +24,8 @@ import ( "golang.org/x/net/ipv6" ) -// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9. +// BUG(mikio): This package is not implemented on AIX, JS, NaCl and +// Plan 9. var ( errInvalidConn = errors.New("invalid connection") diff --git a/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go b/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go index bc7da5e0..1611a907 100644 --- a/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go +++ b/vendor/golang.org/x/net/internal/nettest/helper_nobsd.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux solaris +// +build aix linux solaris package nettest diff --git a/vendor/golang.org/x/net/internal/nettest/helper_posix.go b/vendor/golang.org/x/net/internal/nettest/helper_posix.go index 963ed996..efc67a8e 100644 --- a/vendor/golang.org/x/net/internal/nettest/helper_posix.go +++ b/vendor/golang.org/x/net/internal/nettest/helper_posix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows package nettest diff --git a/vendor/golang.org/x/net/internal/nettest/helper_unix.go b/vendor/golang.org/x/net/internal/nettest/helper_unix.go index ed13e448..b6839dcd 100644 --- a/vendor/golang.org/x/net/internal/nettest/helper_unix.go +++ b/vendor/golang.org/x/net/internal/nettest/helper_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux netbsd openbsd solaris +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package nettest diff --git a/vendor/golang.org/x/net/internal/nettest/stack.go b/vendor/golang.org/x/net/internal/nettest/stack.go index 46d2fcca..3b8a01e9 100644 --- a/vendor/golang.org/x/net/internal/nettest/stack.go +++ b/vendor/golang.org/x/net/internal/nettest/stack.go @@ -72,7 +72,7 @@ func TestableNetwork(network string) bool { } case "unixpacket": switch runtime.GOOS { - case "android", "darwin", "freebsd", "js", "nacl", "plan9", "windows": + case "aix", "android", "darwin", "freebsd", "js", "nacl", "plan9", "windows": return false case "netbsd": // It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown. diff --git a/vendor/golang.org/x/net/internal/socket/empty.s b/vendor/golang.org/x/net/internal/socket/empty.s new file mode 100644 index 00000000..bff0231c --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/empty.s @@ -0,0 +1,7 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin,go1.12 + +// This exists solely so we can linkname in symbols from syscall. diff --git a/vendor/golang.org/x/net/internal/socket/sys_go1_11_darwin.go b/vendor/golang.org/x/net/internal/socket/sys_go1_11_darwin.go new file mode 100644 index 00000000..02d2b3cc --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/sys_go1_11_darwin.go @@ -0,0 +1,33 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.12 + +package socket + +import ( + "syscall" + "unsafe" +) + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) + return int(l), errnoErr(errno) +} + +func setsockopt(s uintptr, level, name int, b []byte) error { + _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) + return errnoErr(errno) +} + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) + return int(n), errnoErr(errno) +} + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) + return int(n), errnoErr(errno) +} diff --git a/vendor/golang.org/x/net/internal/socket/sys_go1_12_darwin.go b/vendor/golang.org/x/net/internal/socket/sys_go1_12_darwin.go new file mode 100644 index 00000000..0999a19f --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/sys_go1_12_darwin.go @@ -0,0 +1,42 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.12 + +package socket + +import ( + "syscall" + "unsafe" +) + +//go:linkname syscall_getsockopt syscall.getsockopt +func syscall_getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *uint32) error + +func getsockopt(s uintptr, level, name int, b []byte) (int, error) { + l := uint32(len(b)) + err := syscall_getsockopt(int(s), level, name, unsafe.Pointer(&b[0]), &l) + return int(l), err +} + +//go:linkname syscall_setsockopt syscall.setsockopt +func syscall_setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error + +func setsockopt(s uintptr, level, name int, b []byte) error { + return syscall_setsockopt(int(s), level, name, unsafe.Pointer(&b[0]), uintptr(len(b))) +} + +//go:linkname syscall_recvmsg syscall.recvmsg +func syscall_recvmsg(s int, msg *syscall.Msghdr, flags int) (n int, err error) + +func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { + return syscall_recvmsg(int(s), (*syscall.Msghdr)(unsafe.Pointer(h)), flags) +} + +//go:linkname syscall_sendmsg syscall.sendmsg +func syscall_sendmsg(s int, msg *syscall.Msghdr, flags int) (n int, err error) + +func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { + return syscall_sendmsg(int(s), (*syscall.Msghdr)(unsafe.Pointer(h)), flags) +} diff --git a/vendor/golang.org/x/net/internal/socket/sys_posix.go b/vendor/golang.org/x/net/internal/socket/sys_posix.go index dc130c27..9a9bc476 100644 --- a/vendor/golang.org/x/net/internal/socket/sys_posix.go +++ b/vendor/golang.org/x/net/internal/socket/sys_posix.go @@ -121,18 +121,21 @@ var zoneCache = ipv6ZoneCache{ toName: make(map[int]string), } -func (zc *ipv6ZoneCache) update(ift []net.Interface) { +// update refreshes the network interface information if the cache was last +// updated more than 1 minute ago, or if force is set. It returns whether the +// cache was updated. +func (zc *ipv6ZoneCache) update(ift []net.Interface, force bool) (updated bool) { zc.Lock() defer zc.Unlock() now := time.Now() - if zc.lastFetched.After(now.Add(-60 * time.Second)) { - return + if !force && zc.lastFetched.After(now.Add(-60*time.Second)) { + return false } zc.lastFetched = now if len(ift) == 0 { var err error if ift, err = net.Interfaces(); err != nil { - return + return false } } zc.toIndex = make(map[string]int, len(ift)) @@ -143,25 +146,38 @@ func (zc *ipv6ZoneCache) update(ift []net.Interface) { zc.toName[ifi.Index] = ifi.Name } } + return true } func (zc *ipv6ZoneCache) name(zone int) string { - zoneCache.update(nil) + updated := zoneCache.update(nil, false) zoneCache.RLock() - defer zoneCache.RUnlock() name, ok := zoneCache.toName[zone] - if !ok { + zoneCache.RUnlock() + if !ok && !updated { + zoneCache.update(nil, true) + zoneCache.RLock() + name, ok = zoneCache.toName[zone] + zoneCache.RUnlock() + } + if !ok { // last resort name = strconv.Itoa(zone) } return name } func (zc *ipv6ZoneCache) index(zone string) int { - zoneCache.update(nil) + updated := zoneCache.update(nil, false) zoneCache.RLock() - defer zoneCache.RUnlock() index, ok := zoneCache.toIndex[zone] - if !ok { + zoneCache.RUnlock() + if !ok && !updated { + zoneCache.update(nil, true) + zoneCache.RLock() + index, ok = zoneCache.toIndex[zone] + zoneCache.RUnlock() + } + if !ok { // last resort index, _ = strconv.Atoi(zone) } return index diff --git a/vendor/golang.org/x/net/internal/socket/sys_unix.go b/vendor/golang.org/x/net/internal/socket/sys_unix.go index 18eba308..0eb71283 100644 --- a/vendor/golang.org/x/net/internal/socket/sys_unix.go +++ b/vendor/golang.org/x/net/internal/socket/sys_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux,!s390x,!386 netbsd openbsd +// +build dragonfly freebsd linux,!s390x,!386 netbsd openbsd package socket diff --git a/vendor/golang.org/x/net/ipv4/doc.go b/vendor/golang.org/x/net/ipv4/doc.go index 3efa2903..863d55b8 100644 --- a/vendor/golang.org/x/net/ipv4/doc.go +++ b/vendor/golang.org/x/net/ipv4/doc.go @@ -241,4 +241,5 @@ // IncludeSourceSpecificGroup may return an error. package ipv4 // import "golang.org/x/net/ipv4" -// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9. +// BUG(mikio): This package is not implemented on AIX, JS, NaCl and +// Plan 9. diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg.go b/vendor/golang.org/x/net/ipv4/payload_cmsg.go index 204a49fe..a7c892dc 100644 --- a/vendor/golang.org/x/net/ipv4/payload_cmsg.go +++ b/vendor/golang.org/x/net/ipv4/payload_cmsg.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !js,!nacl,!plan9,!windows +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package ipv4 diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go index 8d45599f..15a27b7a 100644 --- a/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go +++ b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // +build !go1.9 -// +build !js,!nacl,!plan9,!windows +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package ipv4 diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go index 4081aad8..aab3b224 100644 --- a/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go +++ b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // +build go1.9 -// +build !js,!nacl,!plan9,!windows +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package ipv4 diff --git a/vendor/golang.org/x/net/ipv4/payload_nocmsg.go b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go index 1d434c61..d57f05c1 100644 --- a/vendor/golang.org/x/net/ipv4/payload_nocmsg.go +++ b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build js nacl plan9 windows +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris package ipv4 diff --git a/vendor/golang.org/x/net/ipv6/doc.go b/vendor/golang.org/x/net/ipv6/doc.go index e0be9d50..d38ea0da 100644 --- a/vendor/golang.org/x/net/ipv6/doc.go +++ b/vendor/golang.org/x/net/ipv6/doc.go @@ -240,4 +240,5 @@ // IncludeSourceSpecificGroup may return an error. package ipv6 // import "golang.org/x/net/ipv6" -// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9. +// BUG(mikio): This package is not implemented on AIX, JS, NaCl and +// Plan 9. diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg.go b/vendor/golang.org/x/net/ipv6/payload_cmsg.go index 3f23b5d2..e17847d0 100644 --- a/vendor/golang.org/x/net/ipv6/payload_cmsg.go +++ b/vendor/golang.org/x/net/ipv6/payload_cmsg.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !js,!nacl,!plan9,!windows +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package ipv6 diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go index bc4209db..a48a6ed6 100644 --- a/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go +++ b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // +build !go1.9 -// +build !js,!nacl,!plan9,!windows +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package ipv6 diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go index 7dd65048..fb196ed8 100644 --- a/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go +++ b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // +build go1.9 -// +build !js,!nacl,!plan9,!windows +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package ipv6 diff --git a/vendor/golang.org/x/net/ipv6/payload_nocmsg.go b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go index 459142d2..bfb54478 100644 --- a/vendor/golang.org/x/net/ipv6/payload_nocmsg.go +++ b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build js nacl plan9 windows +// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris package ipv6 diff --git a/vendor/golang.org/x/net/route/empty.s b/vendor/golang.org/x/net/route/empty.s new file mode 100644 index 00000000..bff0231c --- /dev/null +++ b/vendor/golang.org/x/net/route/empty.s @@ -0,0 +1,7 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin,go1.12 + +// This exists solely so we can linkname in symbols from syscall. diff --git a/vendor/golang.org/x/net/route/syscall.go b/vendor/golang.org/x/net/route/syscall.go index 5f69ea63..72431b03 100644 --- a/vendor/golang.org/x/net/route/syscall.go +++ b/vendor/golang.org/x/net/route/syscall.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd netbsd openbsd +// +build dragonfly freebsd netbsd openbsd package route diff --git a/vendor/golang.org/x/net/route/syscall_go1_11_darwin.go b/vendor/golang.org/x/net/route/syscall_go1_11_darwin.go new file mode 100644 index 00000000..7228e443 --- /dev/null +++ b/vendor/golang.org/x/net/route/syscall_go1_11_darwin.go @@ -0,0 +1,28 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.12 + +package route + +import ( + "syscall" + "unsafe" +) + +var zero uintptr + +func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { + var p unsafe.Pointer + if len(mib) > 0 { + p = unsafe.Pointer(&mib[0]) + } else { + p = unsafe.Pointer(&zero) + } + _, _, errno := syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(p), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), newlen) + if errno != 0 { + return error(errno) + } + return nil +} diff --git a/vendor/golang.org/x/net/route/syscall_go1_12_darwin.go b/vendor/golang.org/x/net/route/syscall_go1_12_darwin.go new file mode 100644 index 00000000..7922a683 --- /dev/null +++ b/vendor/golang.org/x/net/route/syscall_go1_12_darwin.go @@ -0,0 +1,12 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.12 + +package route + +import _ "unsafe" // for linkname + +//go:linkname sysctl syscall.sysctl +func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error diff --git a/vendor/golang.org/x/net/trace/trace.go b/vendor/golang.org/x/net/trace/trace.go index f00d869f..43711c67 100644 --- a/vendor/golang.org/x/net/trace/trace.go +++ b/vendor/golang.org/x/net/trace/trace.go @@ -64,6 +64,7 @@ package trace // import "golang.org/x/net/trace" import ( "bytes" + "context" "fmt" "html/template" "io" @@ -124,6 +125,18 @@ func init() { http.HandleFunc("/debug/events", Events) } +// NewContext returns a copy of the parent context +// and associates it with a Trace. +func NewContext(ctx context.Context, tr Trace) context.Context { + return context.WithValue(ctx, contextKey, tr) +} + +// FromContext returns the Trace bound to the context, if any. +func FromContext(ctx context.Context) (tr Trace, ok bool) { + tr, ok = ctx.Value(contextKey).(Trace) + return +} + // Traces responds with traces from the program. // The package initialization registers it in http.DefaultServeMux // at /debug/requests. diff --git a/vendor/golang.org/x/net/trace/trace_go16.go b/vendor/golang.org/x/net/trace/trace_go16.go deleted file mode 100644 index d6081911..00000000 --- a/vendor/golang.org/x/net/trace/trace_go16.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package trace - -import "golang.org/x/net/context" - -// NewContext returns a copy of the parent context -// and associates it with a Trace. -func NewContext(ctx context.Context, tr Trace) context.Context { - return context.WithValue(ctx, contextKey, tr) -} - -// FromContext returns the Trace bound to the context, if any. -func FromContext(ctx context.Context) (tr Trace, ok bool) { - tr, ok = ctx.Value(contextKey).(Trace) - return -} diff --git a/vendor/golang.org/x/net/trace/trace_go17.go b/vendor/golang.org/x/net/trace/trace_go17.go deleted file mode 100644 index df6e1fba..00000000 --- a/vendor/golang.org/x/net/trace/trace_go17.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package trace - -import "context" - -// NewContext returns a copy of the parent context -// and associates it with a Trace. -func NewContext(ctx context.Context, tr Trace) context.Context { - return context.WithValue(ctx, contextKey, tr) -} - -// FromContext returns the Trace bound to the context, if any. -func FromContext(ctx context.Context) (tr Trace, ok bool) { - tr, ok = ctx.Value(contextKey).(Trace) - return -} diff --git a/vendor/golang.org/x/net/webdav/file.go b/vendor/golang.org/x/net/webdav/file.go index 748118dd..9f537787 100644 --- a/vendor/golang.org/x/net/webdav/file.go +++ b/vendor/golang.org/x/net/webdav/file.go @@ -5,6 +5,7 @@ package webdav import ( + "context" "encoding/xml" "io" "net/http" @@ -14,8 +15,6 @@ import ( "strings" "sync" "time" - - "golang.org/x/net/context" ) // slashClean is equivalent to but slightly more efficient than diff --git a/vendor/golang.org/x/net/webdav/file_go1.6.go b/vendor/golang.org/x/net/webdav/file_go1.6.go deleted file mode 100644 index fa387700..00000000 --- a/vendor/golang.org/x/net/webdav/file_go1.6.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package webdav - -import ( - "net/http" - - "golang.org/x/net/context" -) - -func getContext(r *http.Request) context.Context { - return context.Background() -} diff --git a/vendor/golang.org/x/net/webdav/file_go1.7.go b/vendor/golang.org/x/net/webdav/file_go1.7.go deleted file mode 100644 index d1c3de83..00000000 --- a/vendor/golang.org/x/net/webdav/file_go1.7.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package webdav - -import ( - "context" - "net/http" -) - -func getContext(r *http.Request) context.Context { - return r.Context() -} diff --git a/vendor/golang.org/x/net/webdav/file_test.go b/vendor/golang.org/x/net/webdav/file_test.go index bfd96e19..04b8a455 100644 --- a/vendor/golang.org/x/net/webdav/file_test.go +++ b/vendor/golang.org/x/net/webdav/file_test.go @@ -5,6 +5,7 @@ package webdav import ( + "context" "encoding/xml" "fmt" "io" @@ -18,8 +19,6 @@ import ( "strconv" "strings" "testing" - - "golang.org/x/net/context" ) func TestSlashClean(t *testing.T) { diff --git a/vendor/golang.org/x/net/webdav/prop.go b/vendor/golang.org/x/net/webdav/prop.go index 4d7be349..2c48bc4e 100644 --- a/vendor/golang.org/x/net/webdav/prop.go +++ b/vendor/golang.org/x/net/webdav/prop.go @@ -6,6 +6,7 @@ package webdav import ( "bytes" + "context" "encoding/xml" "errors" "fmt" @@ -15,8 +16,6 @@ import ( "os" "path/filepath" "strconv" - - "golang.org/x/net/context" ) // Proppatch describes a property update instruction as defined in RFC 4918. diff --git a/vendor/golang.org/x/net/webdav/prop_test.go b/vendor/golang.org/x/net/webdav/prop_test.go index bc42b913..855446b8 100644 --- a/vendor/golang.org/x/net/webdav/prop_test.go +++ b/vendor/golang.org/x/net/webdav/prop_test.go @@ -5,6 +5,7 @@ package webdav import ( + "context" "encoding/xml" "fmt" "net/http" @@ -13,8 +14,6 @@ import ( "regexp" "sort" "testing" - - "golang.org/x/net/context" ) func TestMemPS(t *testing.T) { diff --git a/vendor/golang.org/x/net/webdav/webdav.go b/vendor/golang.org/x/net/webdav/webdav.go index 7b56687f..744d2d52 100644 --- a/vendor/golang.org/x/net/webdav/webdav.go +++ b/vendor/golang.org/x/net/webdav/webdav.go @@ -174,7 +174,7 @@ func (h *Handler) handleOptions(w http.ResponseWriter, r *http.Request) (status if err != nil { return status, err } - ctx := getContext(r) + ctx := r.Context() allow := "OPTIONS, LOCK, PUT, MKCOL" if fi, err := h.FileSystem.Stat(ctx, reqPath); err == nil { if fi.IsDir() { @@ -197,7 +197,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta return status, err } // TODO: check locks for read-only access?? - ctx := getContext(r) + ctx := r.Context() f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDONLY, 0) if err != nil { return http.StatusNotFound, err @@ -231,7 +231,7 @@ func (h *Handler) handleDelete(w http.ResponseWriter, r *http.Request) (status i } defer release() - ctx := getContext(r) + ctx := r.Context() // TODO: return MultiStatus where appropriate. @@ -262,7 +262,7 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int, defer release() // TODO(rost): Support the If-Match, If-None-Match headers? See bradfitz' // comments in http.checkEtag. - ctx := getContext(r) + ctx := r.Context() f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) if err != nil { @@ -300,7 +300,7 @@ func (h *Handler) handleMkcol(w http.ResponseWriter, r *http.Request) (status in } defer release() - ctx := getContext(r) + ctx := r.Context() if r.ContentLength > 0 { return http.StatusUnsupportedMediaType, nil @@ -344,7 +344,7 @@ func (h *Handler) handleCopyMove(w http.ResponseWriter, r *http.Request) (status return http.StatusForbidden, errDestinationEqualsSource } - ctx := getContext(r) + ctx := r.Context() if r.Method == "COPY" { // Section 7.5.1 says that a COPY only needs to lock the destination, @@ -399,7 +399,7 @@ func (h *Handler) handleLock(w http.ResponseWriter, r *http.Request) (retStatus return status, err } - ctx := getContext(r) + ctx := r.Context() token, ld, now, created := "", LockDetails{}, time.Now(), false if li == (lockInfo{}) { // An empty lockInfo means to refresh the lock. @@ -511,7 +511,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status if err != nil { return status, err } - ctx := getContext(r) + ctx := r.Context() fi, err := h.FileSystem.Stat(ctx, reqPath) if err != nil { if os.IsNotExist(err) { @@ -581,7 +581,7 @@ func (h *Handler) handleProppatch(w http.ResponseWriter, r *http.Request) (statu } defer release() - ctx := getContext(r) + ctx := r.Context() if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil { if os.IsNotExist(err) { diff --git a/vendor/golang.org/x/net/webdav/webdav_test.go b/vendor/golang.org/x/net/webdav/webdav_test.go index 25e0d542..46d1bb62 100644 --- a/vendor/golang.org/x/net/webdav/webdav_test.go +++ b/vendor/golang.org/x/net/webdav/webdav_test.go @@ -5,6 +5,7 @@ package webdav import ( + "context" "errors" "fmt" "io" @@ -18,8 +19,6 @@ import ( "sort" "strings" "testing" - - "golang.org/x/net/context" ) // TODO: add tests to check XML responses with the expected prefix path diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md index eb8dcee1..68f436ed 100644 --- a/vendor/golang.org/x/oauth2/README.md +++ b/vendor/golang.org/x/oauth2/README.md @@ -24,7 +24,9 @@ See godoc for further documentation and examples. In change 96e89be (March 2015), we removed the `oauth2.Context2` type in favor of the [`context.Context`](https://golang.org/x/net/context#Context) type from -the `golang.org/x/net/context` package +the `golang.org/x/net/context` package. Later replaced by the standard `context` package +of the [`context.Context`](https://golang.org/pkg/context#Context) type. + This means it's no longer possible to use the "Classic App Engine" `appengine.Context` type with the `oauth2` package. (You're using @@ -44,7 +46,7 @@ with the `oauth2` package. ```go import ( - "golang.org/x/net/context" + "context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" newappengine "google.golang.org/appengine" @@ -68,6 +70,13 @@ func handler(w http.ResponseWriter, r *http.Request) { } ``` +## Policy for new packages + +We no longer accept new provider-specific packages in this repo. For +defining provider endpoints and provider-specific OAuth2 behavior, we +encourage you to create packages elsewhere. We'll keep the existing +packages for compatibility. + ## Report Issues / Send Patches This repository uses Gerrit for code changes. To learn how to submit changes to diff --git a/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go b/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go index c4e840d2..3c816bb8 100644 --- a/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go +++ b/vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go @@ -14,12 +14,12 @@ package clientcredentials // import "golang.org/x/oauth2/clientcredentials" import ( + "context" "fmt" "net/http" "net/url" "strings" - "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/internal" ) @@ -45,16 +45,19 @@ type Config struct { } // Token uses client credentials to retrieve a token. -// The HTTP client to use is derived from the context. -// If nil, http.DefaultClient is used. +// +// The provided context optionally controls which HTTP client is used. See the oauth2.HTTPClient variable. func (c *Config) Token(ctx context.Context) (*oauth2.Token, error) { return c.TokenSource(ctx).Token() } // Client returns an HTTP client using the provided token. -// The token will auto-refresh as necessary. The underlying -// HTTP transport will be obtained using the provided context. -// The returned client and its Transport should not be modified. +// The token will auto-refresh as necessary. +// +// The provided context optionally controls which HTTP client +// is returned. See the oauth2.HTTPClient variable. +// +// The returned Client and its Transport should not be modified. func (c *Config) Client(ctx context.Context) *http.Client { return oauth2.NewClient(ctx, c.TokenSource(ctx)) } diff --git a/vendor/golang.org/x/oauth2/facebook/facebook.go b/vendor/golang.org/x/oauth2/facebook/facebook.go index 14c801a2..21c49e7f 100644 --- a/vendor/golang.org/x/oauth2/facebook/facebook.go +++ b/vendor/golang.org/x/oauth2/facebook/facebook.go @@ -11,6 +11,6 @@ import ( // Endpoint is Facebook's OAuth 2.0 endpoint. var Endpoint = oauth2.Endpoint{ - AuthURL: "https://www.facebook.com/dialog/oauth", - TokenURL: "https://graph.facebook.com/oauth/access_token", + AuthURL: "https://www.facebook.com/v3.1/dialog/oauth", + TokenURL: "https://graph.facebook.com/v3.1/oauth/access_token", } diff --git a/vendor/golang.org/x/oauth2/google/appengine.go b/vendor/golang.org/x/oauth2/google/appengine.go index 50d918b8..feb1157b 100644 --- a/vendor/golang.org/x/oauth2/google/appengine.go +++ b/vendor/golang.org/x/oauth2/google/appengine.go @@ -5,85 +5,34 @@ package google import ( - "sort" - "strings" - "sync" + "context" "time" - "golang.org/x/net/context" "golang.org/x/oauth2" ) -// appengineFlex is set at init time by appengineflex_hook.go. If true, we are on App Engine Flex. -var appengineFlex bool - -// Set at init time by appengine_hook.go. If nil, we're not on App Engine. +// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible. var appengineTokenFunc func(c context.Context, scopes ...string) (token string, expiry time.Time, err error) -// Set at init time by appengine_hook.go. If nil, we're not on App Engine. +// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible. var appengineAppIDFunc func(c context.Context) string -// AppEngineTokenSource returns a token source that fetches tokens -// issued to the current App Engine application's service account. -// If you are implementing a 3-legged OAuth 2.0 flow on App Engine -// that involves user accounts, see oauth2.Config instead. +// AppEngineTokenSource returns a token source that fetches tokens from either +// the current application's service account or from the metadata server, +// depending on the App Engine environment. See below for environment-specific +// details. If you are implementing a 3-legged OAuth 2.0 flow on App Engine that +// involves user accounts, see oauth2.Config instead. +// +// First generation App Engine runtimes (<= Go 1.9): +// AppEngineTokenSource returns a token source that fetches tokens issued to the +// current App Engine application's service account. The provided context must have +// come from appengine.NewContext. // -// The provided context must have come from appengine.NewContext. +// Second generation App Engine runtimes (>= Go 1.11) and App Engine flexible: +// AppEngineTokenSource is DEPRECATED on second generation runtimes and on the +// flexible environment. It delegates to ComputeTokenSource, and the provided +// context and scopes are not used. Please use DefaultTokenSource (or ComputeTokenSource, +// which DefaultTokenSource will use in this case) instead. func AppEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { - if appengineTokenFunc == nil { - panic("google: AppEngineTokenSource can only be used on App Engine.") - } - scopes := append([]string{}, scope...) - sort.Strings(scopes) - return &appEngineTokenSource{ - ctx: ctx, - scopes: scopes, - key: strings.Join(scopes, " "), - } -} - -// aeTokens helps the fetched tokens to be reused until their expiration. -var ( - aeTokensMu sync.Mutex - aeTokens = make(map[string]*tokenLock) // key is space-separated scopes -) - -type tokenLock struct { - mu sync.Mutex // guards t; held while fetching or updating t - t *oauth2.Token -} - -type appEngineTokenSource struct { - ctx context.Context - scopes []string - key string // to aeTokens map; space-separated scopes -} - -func (ts *appEngineTokenSource) Token() (*oauth2.Token, error) { - if appengineTokenFunc == nil { - panic("google: AppEngineTokenSource can only be used on App Engine.") - } - - aeTokensMu.Lock() - tok, ok := aeTokens[ts.key] - if !ok { - tok = &tokenLock{} - aeTokens[ts.key] = tok - } - aeTokensMu.Unlock() - - tok.mu.Lock() - defer tok.mu.Unlock() - if tok.t.Valid() { - return tok.t, nil - } - access, exp, err := appengineTokenFunc(ts.ctx, ts.scopes...) - if err != nil { - return nil, err - } - tok.t = &oauth2.Token{ - AccessToken: access, - Expiry: exp, - } - return tok.t, nil + return appEngineTokenSource(ctx, scope...) } diff --git a/vendor/golang.org/x/oauth2/google/appengine_gen1.go b/vendor/golang.org/x/oauth2/google/appengine_gen1.go new file mode 100644 index 00000000..83dacac3 --- /dev/null +++ b/vendor/golang.org/x/oauth2/google/appengine_gen1.go @@ -0,0 +1,77 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build appengine + +// This file applies to App Engine first generation runtimes (<= Go 1.9). + +package google + +import ( + "context" + "sort" + "strings" + "sync" + + "golang.org/x/oauth2" + "google.golang.org/appengine" +) + +func init() { + appengineTokenFunc = appengine.AccessToken + appengineAppIDFunc = appengine.AppID +} + +// See comment on AppEngineTokenSource in appengine.go. +func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { + scopes := append([]string{}, scope...) + sort.Strings(scopes) + return &gaeTokenSource{ + ctx: ctx, + scopes: scopes, + key: strings.Join(scopes, " "), + } +} + +// aeTokens helps the fetched tokens to be reused until their expiration. +var ( + aeTokensMu sync.Mutex + aeTokens = make(map[string]*tokenLock) // key is space-separated scopes +) + +type tokenLock struct { + mu sync.Mutex // guards t; held while fetching or updating t + t *oauth2.Token +} + +type gaeTokenSource struct { + ctx context.Context + scopes []string + key string // to aeTokens map; space-separated scopes +} + +func (ts *gaeTokenSource) Token() (*oauth2.Token, error) { + aeTokensMu.Lock() + tok, ok := aeTokens[ts.key] + if !ok { + tok = &tokenLock{} + aeTokens[ts.key] = tok + } + aeTokensMu.Unlock() + + tok.mu.Lock() + defer tok.mu.Unlock() + if tok.t.Valid() { + return tok.t, nil + } + access, exp, err := appengineTokenFunc(ts.ctx, ts.scopes...) + if err != nil { + return nil, err + } + tok.t = &oauth2.Token{ + AccessToken: access, + Expiry: exp, + } + return tok.t, nil +} diff --git a/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go b/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go new file mode 100644 index 00000000..04c2c221 --- /dev/null +++ b/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go @@ -0,0 +1,27 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !appengine + +// This file applies to App Engine second generation runtimes (>= Go 1.11) and App Engine flexible. + +package google + +import ( + "context" + "log" + "sync" + + "golang.org/x/oauth2" +) + +var logOnce sync.Once // only spam about deprecation once + +// See comment on AppEngineTokenSource in appengine.go. +func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { + logOnce.Do(func() { + log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.") + }) + return ComputeTokenSource("") +} diff --git a/vendor/golang.org/x/oauth2/google/appengine_hook.go b/vendor/golang.org/x/oauth2/google/appengine_hook.go deleted file mode 100644 index 56669eaa..00000000 --- a/vendor/golang.org/x/oauth2/google/appengine_hook.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appengine appenginevm - -package google - -import "google.golang.org/appengine" - -func init() { - appengineTokenFunc = appengine.AccessToken - appengineAppIDFunc = appengine.AppID -} diff --git a/vendor/golang.org/x/oauth2/google/appengineflex_hook.go b/vendor/golang.org/x/oauth2/google/appengineflex_hook.go deleted file mode 100644 index 5d0231af..00000000 --- a/vendor/golang.org/x/oauth2/google/appengineflex_hook.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appenginevm - -package google - -func init() { - appengineFlex = true // Flex doesn't support appengine.AccessToken; depend on metadata server. -} diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go index a3160743..5087d845 100644 --- a/vendor/golang.org/x/oauth2/google/default.go +++ b/vendor/golang.org/x/oauth2/google/default.go @@ -5,6 +5,7 @@ package google import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -14,10 +15,28 @@ import ( "runtime" "cloud.google.com/go/compute/metadata" - "golang.org/x/net/context" "golang.org/x/oauth2" ) +// Credentials holds Google credentials, including "Application Default Credentials". +// For more details, see: +// https://developers.google.com/accounts/docs/application-default-credentials +type Credentials struct { + ProjectID string // may be empty + TokenSource oauth2.TokenSource + + // JSON contains the raw bytes from a JSON credentials file. + // This field may be nil if authentication is provided by the + // environment and not with a credentials file, e.g. when code is + // running on Google Cloud Platform. + JSON []byte +} + +// DefaultCredentials is the old name of Credentials. +// +// Deprecated: use Credentials instead. +type DefaultCredentials = Credentials + // DefaultClient returns an HTTP Client that uses the // DefaultTokenSource to obtain authentication credentials. func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) { @@ -39,8 +58,23 @@ func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSourc return creds.TokenSource, nil } -// Common implementation for FindDefaultCredentials. -func findDefaultCredentials(ctx context.Context, scopes []string) (*DefaultCredentials, error) { +// FindDefaultCredentials searches for "Application Default Credentials". +// +// It looks for credentials in the following places, +// preferring the first location found: +// +// 1. A JSON file whose path is specified by the +// GOOGLE_APPLICATION_CREDENTIALS environment variable. +// 2. A JSON file in a location known to the gcloud command-line tool. +// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. +// On other systems, $HOME/.config/gcloud/application_default_credentials.json. +// 3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses +// the appengine.AccessToken function. +// 4. On Google Compute Engine, Google App Engine standard second generation runtimes +// (>= Go 1.11), and Google App Engine flexible environment, it fetches +// credentials from the metadata server. +// (In this final case any provided scopes are ignored.) +func FindDefaultCredentials(ctx context.Context, scopes ...string) (*Credentials, error) { // First, try the environment variable. const envVar = "GOOGLE_APPLICATION_CREDENTIALS" if filename := os.Getenv(envVar); filename != "" { @@ -59,15 +93,18 @@ func findDefaultCredentials(ctx context.Context, scopes []string) (*DefaultCrede return nil, fmt.Errorf("google: error getting credentials using well-known file (%v): %v", filename, err) } - // Third, if we're on Google App Engine use those credentials. - if appengineTokenFunc != nil && !appengineFlex { + // Third, if we're on a Google App Engine standard first generation runtime (<= Go 1.9) + // use those credentials. App Engine standard second generation runtimes (>= Go 1.11) + // and App Engine flexible use ComputeTokenSource and the metadata server. + if appengineTokenFunc != nil { return &DefaultCredentials{ ProjectID: appengineAppIDFunc(ctx), TokenSource: AppEngineTokenSource(ctx, scopes...), }, nil } - // Fourth, if we're on Google Compute Engine use the metadata server. + // Fourth, if we're on Google Compute Engine, an App Engine standard second generation runtime, + // or App Engine flexible, use the metadata server. if metadata.OnGCE() { id, _ := metadata.ProjectID() return &DefaultCredentials{ @@ -81,8 +118,11 @@ func findDefaultCredentials(ctx context.Context, scopes []string) (*DefaultCrede return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url) } -// Common implementation for CredentialsFromJSON. -func credentialsFromJSON(ctx context.Context, jsonData []byte, scopes []string) (*DefaultCredentials, error) { +// CredentialsFromJSON obtains Google credentials from a JSON value. The JSON can +// represent either a Google Developers Console client_credentials.json file (as in +// ConfigFromJSON) or a Google Developers service account key file (as in +// JWTConfigFromJSON). +func CredentialsFromJSON(ctx context.Context, jsonData []byte, scopes ...string) (*Credentials, error) { var f credentialsFile if err := json.Unmarshal(jsonData, &f); err != nil { return nil, err diff --git a/vendor/golang.org/x/oauth2/google/doc_go19.go b/vendor/golang.org/x/oauth2/google/doc.go similarity index 99% rename from vendor/golang.org/x/oauth2/google/doc_go19.go rename to vendor/golang.org/x/oauth2/google/doc.go index 2a86325f..73be6290 100644 --- a/vendor/golang.org/x/oauth2/google/doc_go19.go +++ b/vendor/golang.org/x/oauth2/google/doc.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.9 - // Package google provides support for making OAuth2 authorized and authenticated // HTTP requests to Google APIs. It supports the Web server flow, client-side // credentials, service accounts, Google Compute Engine service accounts, and Google diff --git a/vendor/golang.org/x/oauth2/google/doc_not_go19.go b/vendor/golang.org/x/oauth2/google/doc_not_go19.go deleted file mode 100644 index 5c3c6e14..00000000 --- a/vendor/golang.org/x/oauth2/google/doc_not_go19.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -// Package google provides support for making OAuth2 authorized and authenticated -// HTTP requests to Google APIs. It supports the Web server flow, client-side -// credentials, service accounts, Google Compute Engine service accounts, and Google -// App Engine service accounts. -// -// A brief overview of the package follows. For more information, please read -// https://developers.google.com/accounts/docs/OAuth2 -// and -// https://developers.google.com/accounts/docs/application-default-credentials. -// -// OAuth2 Configs -// -// Two functions in this package return golang.org/x/oauth2.Config values from Google credential -// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON, -// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or -// create an http.Client. -// -// -// Credentials -// -// The DefaultCredentials type represents Google Application Default Credentials, as -// well as other forms of credential. -// -// Use FindDefaultCredentials to obtain Application Default Credentials. -// FindDefaultCredentials looks in some well-known places for a credentials file, and -// will call AppEngineTokenSource or ComputeTokenSource as needed. -// -// DefaultClient and DefaultTokenSource are convenience methods. They first call FindDefaultCredentials, -// then use the credentials to construct an http.Client or an oauth2.TokenSource. -// -// Use CredentialsFromJSON to obtain credentials from either of the two JSON -// formats described in OAuth2 Configs, above. (The DefaultCredentials returned may -// not be "Application Default Credentials".) The TokenSource in the returned value -// is the same as the one obtained from the oauth2.Config returned from -// ConfigFromJSON or JWTConfigFromJSON, but the DefaultCredentials may contain -// additional information that is useful is some circumstances. -package google // import "golang.org/x/oauth2/google" diff --git a/vendor/golang.org/x/oauth2/google/example_test.go b/vendor/golang.org/x/oauth2/google/example_test.go index 643f5071..d9c5a104 100644 --- a/vendor/golang.org/x/oauth2/google/example_test.go +++ b/vendor/golang.org/x/oauth2/google/example_test.go @@ -5,12 +5,12 @@ package google_test import ( + "context" "fmt" "io/ioutil" "log" "net/http" - "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "golang.org/x/oauth2/jwt" diff --git a/vendor/golang.org/x/oauth2/google/go19.go b/vendor/golang.org/x/oauth2/google/go19.go deleted file mode 100644 index 4d0318b1..00000000 --- a/vendor/golang.org/x/oauth2/google/go19.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package google - -import ( - "golang.org/x/net/context" - "golang.org/x/oauth2" -) - -// Credentials holds Google credentials, including "Application Default Credentials". -// For more details, see: -// https://developers.google.com/accounts/docs/application-default-credentials -type Credentials struct { - ProjectID string // may be empty - TokenSource oauth2.TokenSource - - // JSON contains the raw bytes from a JSON credentials file. - // This field may be nil if authentication is provided by the - // environment and not with a credentials file, e.g. when code is - // running on Google Cloud Platform. - JSON []byte -} - -// DefaultCredentials is the old name of Credentials. -// -// Deprecated: use Credentials instead. -type DefaultCredentials = Credentials - -// FindDefaultCredentials searches for "Application Default Credentials". -// -// It looks for credentials in the following places, -// preferring the first location found: -// -// 1. A JSON file whose path is specified by the -// GOOGLE_APPLICATION_CREDENTIALS environment variable. -// 2. A JSON file in a location known to the gcloud command-line tool. -// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. -// On other systems, $HOME/.config/gcloud/application_default_credentials.json. -// 3. On Google App Engine it uses the appengine.AccessToken function. -// 4. On Google Compute Engine and Google App Engine Managed VMs, it fetches -// credentials from the metadata server. -// (In this final case any provided scopes are ignored.) -func FindDefaultCredentials(ctx context.Context, scopes ...string) (*Credentials, error) { - return findDefaultCredentials(ctx, scopes) -} - -// CredentialsFromJSON obtains Google credentials from a JSON value. The JSON can -// represent either a Google Developers Console client_credentials.json file (as in -// ConfigFromJSON) or a Google Developers service account key file (as in -// JWTConfigFromJSON). -func CredentialsFromJSON(ctx context.Context, jsonData []byte, scopes ...string) (*Credentials, error) { - return credentialsFromJSON(ctx, jsonData, scopes) -} diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go index f7481fbc..ca7d208d 100644 --- a/vendor/golang.org/x/oauth2/google/google.go +++ b/vendor/golang.org/x/oauth2/google/google.go @@ -5,6 +5,7 @@ package google import ( + "context" "encoding/json" "errors" "fmt" @@ -12,7 +13,6 @@ import ( "time" "cloud.google.com/go/compute/metadata" - "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/jwt" ) diff --git a/vendor/golang.org/x/oauth2/google/not_go19.go b/vendor/golang.org/x/oauth2/google/not_go19.go deleted file mode 100644 index 544e4062..00000000 --- a/vendor/golang.org/x/oauth2/google/not_go19.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package google - -import ( - "golang.org/x/net/context" - "golang.org/x/oauth2" -) - -// DefaultCredentials holds Google credentials, including "Application Default Credentials". -// For more details, see: -// https://developers.google.com/accounts/docs/application-default-credentials -type DefaultCredentials struct { - ProjectID string // may be empty - TokenSource oauth2.TokenSource - - // JSON contains the raw bytes from a JSON credentials file. - // This field may be nil if authentication is provided by the - // environment and not with a credentials file, e.g. when code is - // running on Google Cloud Platform. - JSON []byte -} - -// FindDefaultCredentials searches for "Application Default Credentials". -// -// It looks for credentials in the following places, -// preferring the first location found: -// -// 1. A JSON file whose path is specified by the -// GOOGLE_APPLICATION_CREDENTIALS environment variable. -// 2. A JSON file in a location known to the gcloud command-line tool. -// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. -// On other systems, $HOME/.config/gcloud/application_default_credentials.json. -// 3. On Google App Engine it uses the appengine.AccessToken function. -// 4. On Google Compute Engine and Google App Engine Managed VMs, it fetches -// credentials from the metadata server. -// (In this final case any provided scopes are ignored.) -func FindDefaultCredentials(ctx context.Context, scopes ...string) (*DefaultCredentials, error) { - return findDefaultCredentials(ctx, scopes) -} - -// CredentialsFromJSON obtains Google credentials from a JSON value. The JSON can -// represent either a Google Developers Console client_credentials.json file (as in -// ConfigFromJSON) or a Google Developers service account key file (as in -// JWTConfigFromJSON). -// -// Note: despite the name, the returned credentials may not be Application Default Credentials. -func CredentialsFromJSON(ctx context.Context, jsonData []byte, scopes ...string) (*DefaultCredentials, error) { - return credentialsFromJSON(ctx, jsonData, scopes) -} diff --git a/vendor/golang.org/x/oauth2/google/sdk.go b/vendor/golang.org/x/oauth2/google/sdk.go index b9660cad..456224bc 100644 --- a/vendor/golang.org/x/oauth2/google/sdk.go +++ b/vendor/golang.org/x/oauth2/google/sdk.go @@ -6,6 +6,7 @@ package google import ( "bufio" + "context" "encoding/json" "errors" "fmt" @@ -18,7 +19,6 @@ import ( "strings" "time" - "golang.org/x/net/context" "golang.org/x/oauth2" ) diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go index fc63fcab..c0ab196c 100644 --- a/vendor/golang.org/x/oauth2/internal/oauth2.go +++ b/vendor/golang.org/x/oauth2/internal/oauth2.go @@ -26,7 +26,7 @@ func ParseKey(key []byte) (*rsa.PrivateKey, error) { if err != nil { parsedKey, err = x509.ParsePKCS1PrivateKey(key) if err != nil { - return nil, fmt.Errorf("private key should be a PEM or plain PKSC1 or PKCS8; parse error: %v", err) + return nil, fmt.Errorf("private key should be a PEM or plain PKCS1 or PKCS8; parse error: %v", err) } } parsed, ok := parsedKey.(*rsa.PrivateKey) diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go index 53259a41..0f5b989d 100644 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ b/vendor/golang.org/x/oauth2/internal/token.go @@ -5,6 +5,7 @@ package internal import ( + "context" "encoding/json" "errors" "fmt" @@ -17,7 +18,6 @@ import ( "strings" "time" - "golang.org/x/net/context" "golang.org/x/net/context/ctxhttp" ) @@ -134,6 +134,7 @@ var brokenAuthHeaderProviders = []string{ "https://stackoverflow.com/oauth/access_token", "https://account.health.nokia.com", "https://accounts.zoho.com", + "https://gitter.im/login/oauth/token", } // brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints. diff --git a/vendor/golang.org/x/oauth2/internal/token_test.go b/vendor/golang.org/x/oauth2/internal/token_test.go index 7b52e511..d1da8bb0 100644 --- a/vendor/golang.org/x/oauth2/internal/token_test.go +++ b/vendor/golang.org/x/oauth2/internal/token_test.go @@ -5,14 +5,13 @@ package internal import ( + "context" "fmt" "io" "net/http" "net/http/httptest" "net/url" "testing" - - "golang.org/x/net/context" ) func TestRegisterBrokenAuthHeaderProvider(t *testing.T) { diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go index d16f9ae1..572074a6 100644 --- a/vendor/golang.org/x/oauth2/internal/transport.go +++ b/vendor/golang.org/x/oauth2/internal/transport.go @@ -5,9 +5,8 @@ package internal import ( + "context" "net/http" - - "golang.org/x/net/context" ) // HTTPClient is the context key to use with golang.org/x/net/context's diff --git a/vendor/golang.org/x/oauth2/jwt/jwt.go b/vendor/golang.org/x/oauth2/jwt/jwt.go index e08f3159..0783a94c 100644 --- a/vendor/golang.org/x/oauth2/jwt/jwt.go +++ b/vendor/golang.org/x/oauth2/jwt/jwt.go @@ -9,6 +9,7 @@ package jwt import ( + "context" "encoding/json" "fmt" "io" @@ -18,7 +19,6 @@ import ( "strings" "time" - "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/internal" "golang.org/x/oauth2/jws" diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 16775d08..1e8e1b74 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -10,13 +10,13 @@ package oauth2 // import "golang.org/x/oauth2" import ( "bytes" + "context" "errors" "net/http" "net/url" "strings" "sync" - "golang.org/x/net/context" "golang.org/x/oauth2/internal" ) @@ -164,8 +164,7 @@ func (c *Config) AuthCodeURL(state string, opts ...AuthCodeOption) string { // and when other authorization grant types are not available." // See https://tools.ietf.org/html/rfc6749#section-4.3 for more info. // -// The HTTP client to use is derived from the context. -// If nil, http.DefaultClient is used. +// The provided context optionally controls which HTTP client is used. See the HTTPClient variable. func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*Token, error) { v := url.Values{ "grant_type": {"password"}, @@ -183,8 +182,7 @@ func (c *Config) PasswordCredentialsToken(ctx context.Context, username, passwor // It is used after a resource provider redirects the user back // to the Redirect URI (the URL obtained from AuthCodeURL). // -// The HTTP client to use is derived from the context. -// If a client is not provided via the context, http.DefaultClient is used. +// The provided context optionally controls which HTTP client is used. See the HTTPClient variable. // // The code will be in the *http.Request.FormValue("code"). Before // calling Exchange, be sure to validate FormValue("state"). diff --git a/vendor/golang.org/x/oauth2/oauth2_test.go b/vendor/golang.org/x/oauth2/oauth2_test.go index ef12ebc5..19aaf6b2 100644 --- a/vendor/golang.org/x/oauth2/oauth2_test.go +++ b/vendor/golang.org/x/oauth2/oauth2_test.go @@ -5,6 +5,7 @@ package oauth2 import ( + "context" "errors" "fmt" "io/ioutil" @@ -13,8 +14,6 @@ import ( "net/url" "testing" "time" - - "golang.org/x/net/context" ) type mockTransport struct { diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go index 34db8cdc..9be1ae53 100644 --- a/vendor/golang.org/x/oauth2/token.go +++ b/vendor/golang.org/x/oauth2/token.go @@ -5,6 +5,7 @@ package oauth2 import ( + "context" "fmt" "net/http" "net/url" @@ -12,7 +13,6 @@ import ( "strings" "time" - "golang.org/x/net/context" "golang.org/x/oauth2/internal" ) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s index 649e5871..88f71255 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s @@ -15,12 +15,6 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-56 - BR syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-80 - BR syscall·Syscall6(SB) - TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 BL runtime·entersyscall(SB) MOVD a1+8(FP), R3 @@ -36,12 +30,6 @@ TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 BL runtime·exitsyscall(SB) RET -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - BR syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - BR syscall·RawSyscall6(SB) - TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVD a1+8(FP), R3 MOVD a2+16(FP), R4 diff --git a/vendor/golang.org/x/sys/unix/linux/types.go b/vendor/golang.org/x/sys/unix/linux/types.go index dca55a5a..273bd469 100644 --- a/vendor/golang.org/x/sys/unix/linux/types.go +++ b/vendor/golang.org/x/sys/unix/linux/types.go @@ -48,6 +48,7 @@ package unix #include #include #include +#include #include #include #include @@ -168,6 +169,7 @@ union sockaddr_all { struct sockaddr_un s4; struct sockaddr_ll s5; struct sockaddr_nl s6; + struct sockaddr_pppox s7; }; struct sockaddr_any { @@ -432,6 +434,8 @@ type RawSockaddrVM C.struct_sockaddr_vm type RawSockaddrXDP C.struct_sockaddr_xdp +type RawSockaddrPPPoX [C.sizeof_struct_sockaddr_pppox]byte + type RawSockaddr C.struct_sockaddr type RawSockaddrAny C.struct_sockaddr_any @@ -480,6 +484,7 @@ const ( SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm SizeofSockaddrXDP = C.sizeof_struct_sockaddr_xdp + SizeofSockaddrPPPoX = C.sizeof_struct_sockaddr_pppox SizeofLinger = C.sizeof_struct_linger SizeofIovec = C.sizeof_struct_iovec SizeofIPMreq = C.sizeof_struct_ip_mreq diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 7943853f..955dd50f 100755 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -101,7 +101,7 @@ includes_DragonFly=' ' includes_FreeBSD=' -#include +#include #include #include #include @@ -187,6 +187,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -197,6 +198,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -449,6 +451,7 @@ ccflags="$@" $2 ~ /^KEXEC_/ || $2 ~ /^LINUX_REBOOT_CMD_/ || $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || + $2 ~ /^MODULE_INIT_/ || $2 !~ "NLA_TYPE_MASK" && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SIOC/ || @@ -498,6 +501,7 @@ ccflags="$@" $2 ~ /^(HDIO|WIN|SMART)_/ || $2 !~ "WMESGLEN" && $2 ~ /^W[A-Z0-9]+$/ || + $2 ~/^PPPIOC/ || $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)} $2 ~ /^__WCOREFLAG$/ {next} $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go index 7e5c22c4..6d263cf1 100644 --- a/vendor/golang.org/x/sys/unix/mkpost.go +++ b/vendor/golang.org/x/sys/unix/mkpost.go @@ -46,6 +46,10 @@ func main() { valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`) b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}")) + // Intentionally export __fds_bits field in FdSet + fdSetRegex := regexp.MustCompile(`type (FdSet) struct {(\s+)X__fds_bits(\s+\S+\s+)}`) + b = fdSetRegex.ReplaceAll(b, []byte("type $1 struct {${2}Bits$3}")) + // If we have empty Ptrace structs, we should delete them. Only s390x emits // nonempty Ptrace structs. ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`) @@ -65,6 +69,10 @@ func main() { convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`) b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte")) + // Convert [1024]int8 to [1024]byte in Ptmget members + convertPtmget := regexp.MustCompile(`([SC]n)(\s+)\[(\d+)\]u?int8`) + b = convertPtmget.ReplaceAll(b, []byte("$1[$3]byte")) + // Remove spare fields (e.g. in Statx_t) spareFieldsRegex := regexp.MustCompile(`X__spare\S*`) b = spareFieldsRegex.ReplaceAll(b, []byte("_")) diff --git a/vendor/golang.org/x/sys/unix/openbsd_pledge.go b/vendor/golang.org/x/sys/unix/openbsd_pledge.go index 8a9c8799..230a36d2 100644 --- a/vendor/golang.org/x/sys/unix/openbsd_pledge.go +++ b/vendor/golang.org/x/sys/unix/openbsd_pledge.go @@ -30,15 +30,9 @@ func Pledge(promises, execpromises string) error { return err } - // If OpenBSD <= 5.9, pledge is not available. - if (maj == 5 && min != 9) || maj < 5 { - return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min) - } - - // If OpenBSD <= 6.2 and execpromises is not empty - // return an error - execpromises is not available before 6.3 - if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" { - return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min) + err = pledgeAvailable(maj, min, execpromises) + if err != nil { + return err } pptr, err := syscall.BytePtrFromString(promises) @@ -67,6 +61,70 @@ func Pledge(promises, execpromises string) error { return nil } +// PledgePromises implements the pledge syscall. +// +// This changes the promises and leaves the execpromises untouched. +// +// For more information see pledge(2). +func PledgePromises(promises string) error { + maj, min, err := majmin() + if err != nil { + return err + } + + err = pledgeAvailable(maj, min, "") + if err != nil { + return err + } + + // This variable holds the execpromises and is always nil. + var expr unsafe.Pointer + + pptr, err := syscall.BytePtrFromString(promises) + if err != nil { + return err + } + + _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0) + if e != 0 { + return e + } + + return nil +} + +// PledgeExecpromises implements the pledge syscall. +// +// This changes the execpromises and leaves the promises untouched. +// +// For more information see pledge(2). +func PledgeExecpromises(execpromises string) error { + maj, min, err := majmin() + if err != nil { + return err + } + + err = pledgeAvailable(maj, min, execpromises) + if err != nil { + return err + } + + // This variable holds the promises and is always nil. + var pptr unsafe.Pointer + + exptr, err := syscall.BytePtrFromString(execpromises) + if err != nil { + return err + } + + _, _, e := syscall.Syscall(SYS_PLEDGE, uintptr(pptr), uintptr(unsafe.Pointer(exptr)), 0) + if e != 0 { + return e + } + + return nil +} + // majmin returns major and minor version number for an OpenBSD system. func majmin() (major int, minor int, err error) { var v Utsname @@ -89,3 +147,20 @@ func majmin() (major int, minor int, err error) { return } + +// pledgeAvailable checks for availability of the pledge(2) syscall +// based on the running OpenBSD version. +func pledgeAvailable(maj, min int, execpromises string) error { + // If OpenBSD <= 5.9, pledge is not available. + if (maj == 5 && min != 9) || maj < 5 { + return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min) + } + + // If OpenBSD <= 6.2 and execpromises is not empty, + // return an error - execpromises is not available before 6.3 + if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" { + return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min) + } + + return nil +} diff --git a/vendor/golang.org/x/sys/unix/openbsd_unveil.go b/vendor/golang.org/x/sys/unix/openbsd_unveil.go new file mode 100644 index 00000000..aebc2dc5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/openbsd_unveil.go @@ -0,0 +1,44 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build openbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +// Unveil implements the unveil syscall. +// For more information see unveil(2). +// Note that the special case of blocking further +// unveil calls is handled by UnveilBlock. +func Unveil(path string, flags string) error { + pathPtr, err := syscall.BytePtrFromString(path) + if err != nil { + return err + } + flagsPtr, err := syscall.BytePtrFromString(flags) + if err != nil { + return err + } + _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0) + if e != 0 { + return e + } + return nil +} + +// UnveilBlock blocks future unveil calls. +// For more information see unveil(2). +func UnveilBlock() error { + // Both pointers must be nil. + var pathUnsafe, flagsUnsafe unsafe.Pointer + _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0) + if e != 0 { + return e + } + return nil +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_test.go b/vendor/golang.org/x/sys/unix/syscall_darwin_test.go index 65691d5c..7faa295f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_test.go @@ -4,6 +4,13 @@ package unix_test +import ( + "os" + "testing" + + "golang.org/x/sys/unix" +) + // stringsFromByteSlice converts a sequence of attributes to a []string. // On Darwin, each entry is a NULL-terminated string. func stringsFromByteSlice(buf []byte) []string { @@ -17,3 +24,40 @@ func stringsFromByteSlice(buf []byte) []string { } return result } + +func TestUtimesNanoAt(t *testing.T) { + defer chtmpdir(t)() + + symlink := "symlink1" + os.Remove(symlink) + err := os.Symlink("nonexisting", symlink) + if err != nil { + t.Fatal(err) + } + + ts := []unix.Timespec{ + {Sec: 1111, Nsec: 2222}, + {Sec: 3333, Nsec: 4444}, + } + err = unix.UtimesNanoAt(unix.AT_FDCWD, symlink, ts, unix.AT_SYMLINK_NOFOLLOW) + if err != nil { + t.Fatalf("UtimesNanoAt: %v", err) + } + + var st unix.Stat_t + err = unix.Lstat(symlink, &st) + if err != nil { + t.Fatalf("Lstat: %v", err) + } + + // Only check Mtimespec, Atimespec might not be supported by the underlying filesystem + expected := ts[1] + if st.Mtimespec.Nsec == 0 { + // Some filesystems only support 1-second time stamp resolution + // and will always set Nsec to 0. + expected.Nsec = 0 + } + if st.Mtimespec != expected { + t.Errorf("UtimesNanoAt: wrong mtime: got %v, expected %v", st.Mtimespec, expected) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 79d125b3..75651057 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -248,11 +248,13 @@ func Uname(uname *Utsname) error { //sys Dup(fd int) (nfd int, err error) //sys Dup2(from int, to int) (err error) //sys Exit(code int) +//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchflags(fd int, flags int) (err error) //sys Fchmod(fd int, mode uint32) (err error) //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) @@ -280,13 +282,17 @@ func Uname(uname *Utsname) error { //sys Kqueue() (fd int, err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) +//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) //sys Listen(s int, backlog int) (err error) //sys Lstat(path string, stat *Stat_t) (err error) //sys Mkdir(path string, mode uint32) (err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mknodat(fd int, path string, mode uint32, dev int) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) @@ -312,11 +318,13 @@ func Uname(uname *Utsname) error { //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, stat *Statfs_t) (err error) //sys Symlink(path string, link string) (err error) +//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) //sys Sync() (err error) //sys Truncate(path string, length int64) (err error) //sys Umask(newmask int) (oldmask int) //sys Undelete(path string) (err error) //sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index bfa20a97..466b2576 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -12,6 +12,8 @@ package unix import ( + "encoding/binary" + "net" "syscall" "unsafe" ) @@ -55,6 +57,15 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { // ioctl itself should not be exposed directly, but additional get/set // functions for specific types are permissible. +// IoctlSetPointerInt performs an ioctl operation which sets an +// integer value on fd, using the specified request number. The ioctl +// argument is called with a pointer to the integer value, rather than +// passing the integer value directly. +func IoctlSetPointerInt(fd int, req uint, value int) error { + v := int32(value) + return ioctl(fd, req, uintptr(unsafe.Pointer(&v))) +} + // IoctlSetInt performs an ioctl operation which sets an integer value // on fd, using the specified request number. func IoctlSetInt(fd int, req uint, value int) error { @@ -710,6 +721,51 @@ func (sa *SockaddrXDP) sockaddr() (unsafe.Pointer, _Socklen, error) { return unsafe.Pointer(&sa.raw), SizeofSockaddrXDP, nil } +// This constant mirrors the #define of PX_PROTO_OE in +// linux/if_pppox.h. We're defining this by hand here instead of +// autogenerating through mkerrors.sh because including +// linux/if_pppox.h causes some declaration conflicts with other +// includes (linux/if_pppox.h includes linux/in.h, which conflicts +// with netinet/in.h). Given that we only need a single zero constant +// out of that file, it's cleaner to just define it by hand here. +const px_proto_oe = 0 + +type SockaddrPPPoE struct { + SID uint16 + Remote net.HardwareAddr + Dev string + raw RawSockaddrPPPoX +} + +func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) { + if len(sa.Remote) != 6 { + return nil, 0, EINVAL + } + if len(sa.Dev) > IFNAMSIZ-1 { + return nil, 0, EINVAL + } + + *(*uint16)(unsafe.Pointer(&sa.raw[0])) = AF_PPPOX + // This next field is in host-endian byte order. We can't use the + // same unsafe pointer cast as above, because this value is not + // 32-bit aligned and some architectures don't allow unaligned + // access. + // + // However, the value of px_proto_oe is 0, so we can use + // encoding/binary helpers to write the bytes without worrying + // about the ordering. + binary.BigEndian.PutUint32(sa.raw[2:6], px_proto_oe) + // This field is deliberately big-endian, unlike the previous + // one. The kernel expects SID to be in network byte order. + binary.BigEndian.PutUint16(sa.raw[6:8], sa.SID) + copy(sa.raw[8:14], sa.Remote) + for i := 14; i < 14+IFNAMSIZ; i++ { + sa.raw[i] = 0 + } + copy(sa.raw[14:], sa.Dev) + return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil +} + func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_NETLINK: @@ -820,6 +876,22 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { SharedUmemFD: pp.Shared_umem_fd, } return sa, nil + case AF_PPPOX: + pp := (*RawSockaddrPPPoX)(unsafe.Pointer(rsa)) + if binary.BigEndian.Uint32(pp[2:6]) != px_proto_oe { + return nil, EINVAL + } + sa := &SockaddrPPPoE{ + SID: binary.BigEndian.Uint16(pp[6:8]), + Remote: net.HardwareAddr(pp[8:14]), + } + for i := 14; i < 14+IFNAMSIZ; i++ { + if pp[i] == 0 { + sa.Dev = string(pp[14:i]) + break + } + } + return sa, nil } return nil, EAFNOSUPPORT } @@ -1304,6 +1376,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri //sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) +//sys DeleteModule(name string, flags int) (err error) //sys Dup(oldfd int) (fd int, err error) //sys Dup3(oldfd int, newfd int, flags int) (err error) //sysnb EpollCreate1(flag int) (fd int, err error) @@ -1317,6 +1390,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri //sys fcntl(fd int, cmd int, arg int) (val int, err error) //sys Fdatasync(fd int) (err error) //sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) +//sys FinitModule(fd int, params string, flags int) (err error) //sys Flistxattr(fd int, dest []byte) (sz int, err error) //sys Flock(fd int, how int) (err error) //sys Fremovexattr(fd int, attr string) (err error) @@ -1338,6 +1412,7 @@ func Getpgrp() (pid int) { //sysnb Getsid(pid int) (sid int, err error) //sysnb Gettid() (tid int) //sys Getxattr(path string, attr string, dest []byte) (sz int, err error) +//sys InitModule(moduleImage []byte, params string) (err error) //sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) //sysnb InotifyInit1(flags int) (fd int, err error) //sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) @@ -1527,8 +1602,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { // ClockNanosleep // ClockSettime // Clone -// CreateModule -// DeleteModule // EpollCtlOld // EpollPwait // EpollWaitOld @@ -1572,7 +1645,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { // Pselect6 // Ptrace // Putpmsg -// QueryModule // Quotactl // Readahead // Readv diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 646f295a..fa5a9a6f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -191,12 +191,9 @@ func Dup2(oldfd int, newfd int) (err error) { return Dup3(oldfd, newfd, 0) } -func Pause() (err error) { - _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return +func Pause() error { + _, err := ppoll(nil, 0, nil, nil) + return err } func Poll(fds []PollFd, timeout int) (n int, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 512077fe..44aa1227 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -191,12 +191,9 @@ func Dup2(oldfd int, newfd int) (err error) { return Dup3(oldfd, newfd, 0) } -func Pause() (err error) { - _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return +func Pause() error { + _, err := ppoll(nil, 0, nil, nil) + return err } func Poll(fds []PollFd, timeout int) (n int, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 206ce2af..059327a3 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -13,6 +13,7 @@ package unix import ( + "runtime" "syscall" "unsafe" ) @@ -190,6 +191,13 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { return &value, err } +func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) { + var value Ptmget + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + runtime.KeepAlive(value) + return &value, err +} + func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) @@ -269,6 +277,7 @@ func Uname(uname *Utsname) error { //sys Fchmod(fd int, mode uint32) (err error) //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) @@ -293,19 +302,26 @@ func Uname(uname *Utsname) error { //sys Kqueue() (fd int, err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) +//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) //sys Listen(s int, backlog int) (err error) //sys Lstat(path string, stat *Stat_t) (err error) //sys Mkdir(path string, mode uint32) (err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) +//sys Mkfifoat(dirfd int, path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) +//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) +//sys Renameat(fromfd int, from string, tofd int, to string) (err error) //sys Revoke(path string) (err error) //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK @@ -323,10 +339,12 @@ func Uname(uname *Utsname) error { //sysnb Setuid(uid int) (err error) //sys Stat(path string, stat *Stat_t) (err error) //sys Symlink(path string, link string) (err error) +//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) //sys Sync() (err error) //sys Truncate(path string, length int64) (err error) //sys Umask(newmask int) (oldmask int) //sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_test.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_test.go index 3573a133..41141f96 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_test.go @@ -5,6 +5,7 @@ package unix_test import ( + "bytes" "testing" "golang.org/x/sys/unix" @@ -33,3 +34,18 @@ func TestSysctlClockinfo(t *testing.T) { t.Logf("tick = %v, tickadj = %v, hz = %v, profhz = %v, stathz = %v", ci.Tick, ci.Tickadj, ci.Hz, ci.Profhz, ci.Stathz) } + +func TestIoctlPtmget(t *testing.T) { + fd, err := unix.Open("/dev/ptmx", unix.O_NOCTTY|unix.O_RDWR, 0666) + if err != nil { + t.Skip("failed to open /dev/ptmx, skipping test") + } + defer unix.Close(fd) + + ptm, err := unix.IoctlGetPtmget(fd, unix.TIOCPTSNAME) + if err != nil { + t.Fatalf("IoctlGetPtmget: %v\n", err) + } + + t.Logf("sfd = %v, ptsname = %v", ptm.Sfd, string(ptm.Sn[:bytes.IndexByte(ptm.Sn[:], 0)])) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 2c674a5c..5a398f81 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -158,6 +158,15 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { return &value, err } +//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) + +func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + if len(fds) == 0 { + return ppoll(nil, 0, timeout, sigmask) + } + return ppoll(&fds[0], len(fds), timeout, sigmask) +} + func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) @@ -224,6 +233,7 @@ func Uname(uname *Utsname) error { //sys Fchmod(fd int, mode uint32) (err error) //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) @@ -250,19 +260,26 @@ func Uname(uname *Utsname) error { //sys Kqueue() (fd int, err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) +//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) //sys Listen(s int, backlog int) (err error) //sys Lstat(path string, stat *Stat_t) (err error) //sys Mkdir(path string, mode uint32) (err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) //sys Mkfifo(path string, mode uint32) (err error) +//sys Mkfifoat(dirfd int, path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) //sys Pathconf(path string, name int) (val int, err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error) //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error) +//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) +//sys Renameat(fromfd int, from string, tofd int, to string) (err error) //sys Revoke(path string) (err error) //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK @@ -285,10 +302,12 @@ func Uname(uname *Utsname) error { //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, stat *Statfs_t) (err error) //sys Symlink(path string, link string) (err error) +//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) //sys Sync() (err error) //sys Truncate(path string, length int64) (err error) //sys Umask(newmask int) (oldmask int) //sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Unmount(path string, flags int) (err error) //sys write(fd int, p []byte) (n int, err error) //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) @@ -311,15 +330,11 @@ func Uname(uname *Utsname) error { // clock_settime // closefrom // execve -// faccessat -// fchmodat -// fchownat // fcntl // fhopen // fhstat // fhstatfs // fork -// fstatat // futimens // getfh // getgid @@ -333,12 +348,8 @@ func Uname(uname *Utsname) error { // lfs_markv // lfs_segclean // lfs_segwait -// linkat // mincore // minherit -// mkdirat -// mkfifoat -// mknodat // mount // mquery // msgctl @@ -347,12 +358,10 @@ func Uname(uname *Utsname) error { // msgsnd // nfssvc // nnpfspioctl -// openat // preadv // profil // pwritev // quotactl -// readlinkat // readv // reboot // renameat @@ -373,13 +382,11 @@ func Uname(uname *Utsname) error { // sigprocmask // sigreturn // sigsuspend -// symlinkat // sysarch // syscall // threxit // thrsigdivert // thrsleep // thrwakeup -// unlinkat // vfork // writev diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go index 65ad1d1d..b95f334e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go @@ -6,10 +6,40 @@ package unix_test import ( "testing" + "time" "golang.org/x/sys/unix" ) +func TestPpoll(t *testing.T) { + f, cleanup := mktmpfifo(t) + defer cleanup() + + const timeout = 100 * time.Millisecond + + ok := make(chan bool, 1) + go func() { + select { + case <-time.After(10 * timeout): + t.Errorf("Ppoll: failed to timeout after %d", 10*timeout) + case <-ok: + } + }() + + fds := []unix.PollFd{{Fd: int32(f.Fd()), Events: unix.POLLIN}} + timeoutTs := unix.NsecToTimespec(int64(timeout)) + n, err := unix.Ppoll(fds, &timeoutTs, nil) + ok <- true + if err != nil { + t.Errorf("Ppoll: unexpected error: %v", err) + return + } + if n != 0 { + t.Errorf("Ppoll: wrong number of events: got %v, expected %v", n, 0) + return + } +} + func TestSysctlUvmexp(t *testing.T) { uvm, err := unix.SysctlUvmexp("vm.uvmexp") if err != nil { diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go index 4cb8e8ed..1c70d1b6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // +build darwin dragonfly freebsd linux netbsd openbsd solaris -// +build !gccgo +// +build !gccgo,!ppc64le,!ppc64 package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go new file mode 100644 index 00000000..86dc765a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go @@ -0,0 +1,24 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build ppc64le ppc64 +// +build !gccgo + +package unix + +import "syscall" + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { + return syscall.Syscall(trap, a1, a2, a3) +} +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { + return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) +} +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { + return syscall.RawSyscall(trap, a1, a2, a3) +} +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { + return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_test.go b/vendor/golang.org/x/sys/unix/syscall_unix_test.go index f84902da..0a28f6e5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_test.go @@ -453,9 +453,9 @@ func TestGetwd(t *testing.T) { t.Fatalf("Open .: %s", err) } defer fd.Close() - // These are chosen carefully not to be symlinks on a Mac - // (unlike, say, /var, /etc) - dirs := []string{"/", "/usr/bin"} + // Directory list for test. Do not worry if any are symlinks or do not + // exist on some common unix desktop environments. That will be checked. + dirs := []string{"/", "/usr/bin", "/etc", "/var", "/opt"} switch runtime.GOOS { case "android": dirs = []string{"/", "/system/bin"} @@ -475,6 +475,17 @@ func TestGetwd(t *testing.T) { } oldwd := os.Getenv("PWD") for _, d := range dirs { + // Check whether d exists, is a dir and that d's path does not contain a symlink + fi, err := os.Stat(d) + if err != nil || !fi.IsDir() { + t.Logf("Test dir %s stat error (%v) or not a directory, skipping", d, err) + continue + } + check, err := filepath.EvalSymlinks(d) + if err != nil || check != d { + t.Logf("Test dir %s (%s) is symlink or other error (%v), skipping", d, check, err) + continue + } err = os.Chdir(d) if err != nil { t.Fatalf("Chdir: %v", err) diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go index 8421ccf1..74707989 100644 --- a/vendor/golang.org/x/sys/unix/types_freebsd.go +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go @@ -26,7 +26,7 @@ package unix #include #include #include -#include +#include #include #include #include diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go index 1edbf1ba..2dd4f954 100644 --- a/vendor/golang.org/x/sys/unix/types_netbsd.go +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go @@ -248,6 +248,8 @@ type Termios C.struct_termios type Winsize C.struct_winsize +type Ptmget C.struct_ptmget + // fchmodat-like syscalls. const ( diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go index 297e40d3..4e5e57f9 100644 --- a/vendor/golang.org/x/sys/unix/types_openbsd.go +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -261,6 +261,10 @@ const ( POLLWRNORM = C.POLLWRNORM ) +// Signal Sets + +type Sigset_t C.sigset_t + // Uname type Utsname C.struct_utsname diff --git a/vendor/golang.org/x/sys/unix/xattr_bsd.go b/vendor/golang.org/x/sys/unix/xattr_bsd.go index 93049932..30c1d71f 100644 --- a/vendor/golang.org/x/sys/unix/xattr_bsd.go +++ b/vendor/golang.org/x/sys/unix/xattr_bsd.go @@ -81,7 +81,10 @@ func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { // flags are unused on FreeBSD func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) { - d := unsafe.Pointer(&data[0]) + var d unsafe.Pointer + if len(data) > 0 { + d = unsafe.Pointer(&data[0]) + } datasiz := len(data) nsid, a, err := xattrnamespace(attr) @@ -94,7 +97,10 @@ func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) { } func Setxattr(file string, attr string, data []byte, flags int) (err error) { - d := unsafe.Pointer(&data[0]) + var d unsafe.Pointer + if len(data) > 0 { + d = unsafe.Pointer(&data[0]) + } datasiz := len(data) nsid, a, err := xattrnamespace(attr) @@ -107,7 +113,10 @@ func Setxattr(file string, attr string, data []byte, flags int) (err error) { } func Lsetxattr(link string, attr string, data []byte, flags int) (err error) { - d := unsafe.Pointer(&data[0]) + var d unsafe.Pointer + if len(data) > 0 { + d = unsafe.Pointer(&data[0]) + } datasiz := len(data) nsid, a, err := xattrnamespace(attr) diff --git a/vendor/golang.org/x/sys/unix/xattr_test.go b/vendor/golang.org/x/sys/unix/xattr_test.go index 11a76ce2..57fc84fb 100644 --- a/vendor/golang.org/x/sys/unix/xattr_test.go +++ b/vendor/golang.org/x/sys/unix/xattr_test.go @@ -24,13 +24,19 @@ func TestXattr(t *testing.T) { xattrName := "user.test" xattrDataSet := "gopher" - err := unix.Setxattr(f, xattrName, []byte(xattrDataSet), 0) + + err := unix.Setxattr(f, xattrName, []byte{}, 0) if err == unix.ENOTSUP || err == unix.EOPNOTSUPP { t.Skip("filesystem does not support extended attributes, skipping test") } else if err != nil { t.Fatalf("Setxattr: %v", err) } + err = unix.Setxattr(f, xattrName, []byte(xattrDataSet), 0) + if err != nil { + t.Fatalf("Setxattr: %v", err) + } + // find size size, err := unix.Listxattr(f, nil) if err != nil { diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 7d93bdf0..db3c31ef 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -1023,6 +1023,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1291,6 +1293,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x40042406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8008743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x40087446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x400c744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40087447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1694,6 +1726,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1749,6 +1782,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index bd57833b..4785835b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -1023,6 +1023,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1291,6 +1293,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1695,6 +1727,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1750,6 +1783,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index b059c287..5e902423 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x40042406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8008743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x40087446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x400c744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40087447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1701,6 +1733,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1756,6 +1789,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 97d5e224..ebe9d8b4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -1024,6 +1024,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1292,6 +1294,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1685,6 +1717,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1740,6 +1773,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 059d1fc1..d467d211 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x80042406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4008743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x80087446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x800c744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80087447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1694,6 +1726,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1749,6 +1782,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x40047309 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 355f749b..9c293ed1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1694,6 +1726,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1749,6 +1782,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x40047309 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 5218cf5a..e2162508 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1694,6 +1726,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1749,6 +1782,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x40047309 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 73e35b9e..836c0c65 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x80042406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4008743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x80087446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x800c744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80087447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1694,6 +1726,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1749,6 +1782,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x40047309 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 82f44ce3..7ca61843 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -1020,6 +1020,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1290,6 +1292,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1750,6 +1782,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1805,6 +1838,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 8734df99..839ac214 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -1020,6 +1020,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1290,6 +1292,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x8004743d + PPPIOCATTCHAN = 0x80047438 + PPPIOCCONNECT = 0x8004743a + PPPIOCDETACH = 0x8004743c + PPPIOCDISCONN = 0x20007439 + PPPIOCGASYNCMAP = 0x40047458 + PPPIOCGCHAN = 0x40047437 + PPPIOCGDEBUG = 0x40047441 + PPPIOCGFLAGS = 0x4004745a + PPPIOCGIDLE = 0x4010743f + PPPIOCGL2TPSTATS = 0x40487436 + PPPIOCGMRU = 0x40047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x40047455 + PPPIOCGUNIT = 0x40047456 + PPPIOCGXASYNCMAP = 0x40207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x80107446 + PPPIOCSASYNCMAP = 0x80047457 + PPPIOCSCOMPRESS = 0x8010744d + PPPIOCSDEBUG = 0x80047440 + PPPIOCSFLAGS = 0x80047459 + PPPIOCSMAXCID = 0x80047451 + PPPIOCSMRRU = 0x8004743b + PPPIOCSMRU = 0x80047452 + PPPIOCSNPMODE = 0x8008744b + PPPIOCSPASS = 0x80107447 + PPPIOCSRASYNCMAP = 0x80047454 + PPPIOCSXASYNCMAP = 0x8020744f + PPPIOCXFERUNIT = 0x2000744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1750,6 +1782,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1805,6 +1838,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 0954f472..a747aa1b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1682,6 +1714,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1737,6 +1770,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 61a96aba..96aff508 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -1021,6 +1021,8 @@ const ( MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 + MODULE_INIT_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 MSG_CMSG_CLOEXEC = 0x40000000 @@ -1289,6 +1291,36 @@ const ( PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PIPEFS_MAGIC = 0x50495045 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCCONNECT = 0x4004743a + PPPIOCDETACH = 0x4004743c + PPPIOCDISCONN = 0x7439 + PPPIOCGASYNCMAP = 0x80047458 + PPPIOCGCHAN = 0x80047437 + PPPIOCGDEBUG = 0x80047441 + PPPIOCGFLAGS = 0x8004745a + PPPIOCGIDLE = 0x8010743f + PPPIOCGL2TPSTATS = 0x80487436 + PPPIOCGMRU = 0x80047453 + PPPIOCGNPMODE = 0xc008744c + PPPIOCGRASYNCMAP = 0x80047455 + PPPIOCGUNIT = 0x80047456 + PPPIOCGXASYNCMAP = 0x80207450 + PPPIOCNEWUNIT = 0xc004743e + PPPIOCSACTIVE = 0x40107446 + PPPIOCSASYNCMAP = 0x40047457 + PPPIOCSCOMPRESS = 0x4010744d + PPPIOCSDEBUG = 0x40047440 + PPPIOCSFLAGS = 0x40047459 + PPPIOCSMAXCID = 0x40047451 + PPPIOCSMRRU = 0x4004743b + PPPIOCSMRU = 0x40047452 + PPPIOCSNPMODE = 0x4008744b + PPPIOCSPASS = 0x40107447 + PPPIOCSRASYNCMAP = 0x40047454 + PPPIOCSXASYNCMAP = 0x4020744f + PPPIOCXFERUNIT = 0x744e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1755,6 +1787,7 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SC_LOG_FLUSH = 0x100000 SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 @@ -1810,6 +1843,9 @@ const ( SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPGRP = 0x8904 + SIOCGPPPCSTATS = 0x89f2 + SIOCGPPPSTATS = 0x89f0 + SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 91f36e9e..96a67134 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -588,6 +588,21 @@ func Exit(code int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { @@ -643,6 +658,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -927,6 +957,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -967,6 +1017,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -997,6 +1062,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(fd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1023,6 +1103,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1345,6 +1441,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1408,6 +1524,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 35b155a0..cd94680d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 46e9ddfb..96e9df7d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index 914f25f0..e8d82d14 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 1d6c5562..41f2d0cf 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 260631d1..7e65fe0b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index ff2d84fb..fd06fb89 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index 48d14e60..9e8ec28c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 12c17a92..b4d2ccbb 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index c8ca4279..bca3d253 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 870c8f6d..e34089c6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index 542f3a3a..312b2afa 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 55e79d64..04ec8bef 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -458,6 +458,21 @@ func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags in // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func DeleteModule(name string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -606,6 +621,21 @@ func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func FinitModule(fd int, params string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { @@ -807,6 +837,27 @@ func Getxattr(path string, attr string, dest []byte) (sz int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func InitModule(moduleImage []byte, params string) (err error) { + var _p0 unsafe.Pointer + if len(moduleImage) > 0 { + _p0 = unsafe.Pointer(&moduleImage[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 *byte + _p1, err = BytePtrFromString(params) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index f1874d5a..9ed7c71f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -865,6 +865,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -1114,6 +1129,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -1154,6 +1189,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1169,6 +1219,21 @@ func Mkfifo(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1184,6 +1249,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1210,6 +1290,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1299,6 +1395,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1319,6 +1437,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1516,6 +1654,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1564,6 +1722,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index eb802839..613b7fd9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -865,6 +865,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -1114,6 +1129,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -1154,6 +1189,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1169,6 +1219,21 @@ func Mkfifo(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1184,6 +1249,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1210,6 +1290,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1299,6 +1395,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1319,6 +1437,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1516,6 +1654,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1564,6 +1722,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 7b36499d..08475087 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -865,6 +865,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -1114,6 +1129,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -1154,6 +1189,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1169,6 +1219,21 @@ func Mkfifo(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1184,6 +1249,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1210,6 +1290,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1299,6 +1395,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1319,6 +1437,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1516,6 +1654,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1564,6 +1722,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 1942049b..414cd13c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -431,6 +431,17 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -639,6 +650,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -909,6 +935,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -949,6 +995,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -964,6 +1025,21 @@ func Mkfifo(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -979,6 +1055,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1005,6 +1096,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1094,6 +1201,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1114,6 +1243,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1371,6 +1520,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1419,6 +1588,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index d351c72c..846f5fa6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -431,6 +431,17 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -639,6 +650,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -909,6 +935,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -949,6 +995,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -964,6 +1025,21 @@ func Mkfifo(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -979,6 +1055,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1005,6 +1096,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1094,6 +1201,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1114,6 +1243,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1371,6 +1520,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1419,6 +1588,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 617d47f0..59911659 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -431,6 +431,17 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -639,6 +650,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { @@ -909,6 +935,26 @@ func Link(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { @@ -949,6 +995,21 @@ func Mkdir(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -964,6 +1025,21 @@ func Mkfifo(path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -979,6 +1055,21 @@ func Mknod(path string, mode uint32, dev int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { @@ -1005,6 +1096,22 @@ func Open(path string, mode int, perm uint32) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1094,6 +1201,28 @@ func Readlink(path string, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) @@ -1114,6 +1243,26 @@ func Rename(from string, to string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1371,6 +1520,26 @@ func Symlink(path string, link string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { @@ -1419,6 +1588,21 @@ func Unlink(path string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 28ef5242..c146c1ad 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -339,7 +339,7 @@ type Kevent_t struct { } type FdSet struct { - _ [32]uint32 + Bits [32]uint32 } const ( diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index e2d984a4..ac33a8dd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -337,7 +337,7 @@ type Kevent_t struct { } type FdSet struct { - _ [16]uint64 + Bits [16]uint64 } const ( diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 9b415aba..e27511a6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -337,7 +337,7 @@ type Kevent_t struct { } type FdSet struct { - _ [32]uint32 + Bits [32]uint32 } const ( diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 5f8f0349..f56e164b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -286,6 +286,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -421,6 +423,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index aa52a439..ac5f636a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -288,6 +288,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -425,6 +427,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 23c8438b..eb7562da 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -289,6 +289,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -424,6 +426,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index d7a993e2..3c4fb88d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -289,6 +289,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -426,6 +428,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index b8c3d0a4..647e40a7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -287,6 +287,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -422,6 +424,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index a6f76149..e0159b01 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -289,6 +289,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -426,6 +428,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 3dd19417..c1a024df 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -289,6 +289,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -426,6 +428,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 210de76c..7e525eb7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -287,6 +287,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -422,6 +424,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index b46d54e3..85ae2954 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -290,6 +290,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -427,6 +429,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 6ee799ce..d0c930a1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -290,6 +290,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -427,6 +429,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 60ae71e6..c1a20bcd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -289,6 +289,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]uint8 @@ -426,6 +428,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index dea88f7b..3c26ea82 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -288,6 +288,8 @@ type RawSockaddrXDP struct { Shared_umem_fd uint32 } +type RawSockaddrPPPoX [0x1e]byte + type RawSockaddr struct { Family uint16 Data [14]int8 @@ -425,6 +427,7 @@ const ( SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 + SizeofSockaddrPPPoX = 0x1e SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index 1fdc5fd2..2dae0c17 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -402,6 +402,13 @@ type Winsize struct { Ypixel uint16 } +type Ptmget struct { + Cfd int32 + Sfd int32 + Cn [1024]byte + Sn [1024]byte +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x200 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 711f7806..1f0e76c0 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -409,6 +409,13 @@ type Winsize struct { Ypixel uint16 } +type Ptmget struct { + Cfd int32 + Sfd int32 + Cn [1024]byte + Sn [1024]byte +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x200 diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index fa1a16ba..53f2159c 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -407,6 +407,13 @@ type Winsize struct { Ypixel uint16 } +type Ptmget struct { + Cfd int32 + Sfd int32 + Cn [1024]byte + Sn [1024]byte +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x200 diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index c8509bf0..8b37d839 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -458,6 +458,8 @@ const ( POLLWRNORM = 0x4 ) +type Sigset_t uint32 + type Utsname struct { Sysname [256]byte Nodename [256]byte diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index 200575d9..6efea463 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -458,6 +458,8 @@ const ( POLLWRNORM = 0x4 ) +type Sigset_t uint32 + type Utsname struct { Sysname [256]byte Nodename [256]byte diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index 3e20cdf0..87a637e3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -451,6 +451,8 @@ const ( POLLWRNORM = 0x4 ) +type Sigset_t uint32 + type Utsname struct { Sysname [256]byte Nodename [256]byte diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index 7228d97e..ae93e247 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -6,6 +6,7 @@ package rate import ( + "context" "fmt" "math" "sync" @@ -212,19 +213,8 @@ func (lim *Limiter) ReserveN(now time.Time, n int) *Reservation { return &r } -// contextContext is a temporary(?) copy of the context.Context type -// to support both Go 1.6 using golang.org/x/net/context and Go 1.7+ -// with the built-in context package. If people ever stop using Go 1.6 -// we can remove this. -type contextContext interface { - Deadline() (deadline time.Time, ok bool) - Done() <-chan struct{} - Err() error - Value(key interface{}) interface{} -} - // Wait is shorthand for WaitN(ctx, 1). -func (lim *Limiter) wait(ctx contextContext) (err error) { +func (lim *Limiter) Wait(ctx context.Context) (err error) { return lim.WaitN(ctx, 1) } @@ -232,7 +222,7 @@ func (lim *Limiter) wait(ctx contextContext) (err error) { // It returns an error if n exceeds the Limiter's burst size, the Context is // canceled, or the expected wait time exceeds the Context's Deadline. // The burst limit is ignored if the rate limit is Inf. -func (lim *Limiter) waitN(ctx contextContext, n int) (err error) { +func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { if n > lim.burst && lim.limit != Inf { return fmt.Errorf("rate: Wait(n=%d) exceeds limiter's burst %d", n, lim.burst) } diff --git a/vendor/golang.org/x/time/rate/rate_go16.go b/vendor/golang.org/x/time/rate/rate_go16.go deleted file mode 100644 index 6bab1850..00000000 --- a/vendor/golang.org/x/time/rate/rate_go16.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package rate - -import "golang.org/x/net/context" - -// Wait is shorthand for WaitN(ctx, 1). -func (lim *Limiter) Wait(ctx context.Context) (err error) { - return lim.waitN(ctx, 1) -} - -// WaitN blocks until lim permits n events to happen. -// It returns an error if n exceeds the Limiter's burst size, the Context is -// canceled, or the expected wait time exceeds the Context's Deadline. -func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { - return lim.waitN(ctx, n) -} diff --git a/vendor/golang.org/x/time/rate/rate_go17.go b/vendor/golang.org/x/time/rate/rate_go17.go deleted file mode 100644 index f90d85f5..00000000 --- a/vendor/golang.org/x/time/rate/rate_go17.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package rate - -import "context" - -// Wait is shorthand for WaitN(ctx, 1). -func (lim *Limiter) Wait(ctx context.Context) (err error) { - return lim.waitN(ctx, 1) -} - -// WaitN blocks until lim permits n events to happen. -// It returns an error if n exceeds the Limiter's burst size, the Context is -// canceled, or the expected wait time exceeds the Context's Deadline. -func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { - return lim.waitN(ctx, n) -} diff --git a/vendor/google.golang.org/appengine/.travis.yml b/vendor/google.golang.org/appengine/.travis.yml index 7ef8b6c7..70ffe89d 100644 --- a/vendor/google.golang.org/appengine/.travis.yml +++ b/vendor/google.golang.org/appengine/.travis.yml @@ -1,24 +1,20 @@ language: go -go: - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - go_import_path: google.golang.org/appengine install: - - go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v appengine) - - mkdir /tmp/sdk - - curl -o /tmp/sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.40.zip" - - unzip -q /tmp/sdk.zip -d /tmp/sdk - - export PATH="$PATH:/tmp/sdk/go_appengine" - - export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py + - ./travis_install.sh script: - - goapp version - - go version - - go test -v google.golang.org/appengine/... - - go test -v -race google.golang.org/appengine/... - - goapp test -v google.golang.org/appengine/... + - ./travis_test.sh + +matrix: + include: + - go: 1.8.x + env: GOAPP=true + - go: 1.9.x + env: GOAPP=true + - go: 1.10.x + env: GOAPP=false + - go: 1.11.x + env: GO111MODULE=on diff --git a/vendor/google.golang.org/appengine/appengine.go b/vendor/google.golang.org/appengine/appengine.go index 76dedc81..79525454 100644 --- a/vendor/google.golang.org/appengine/appengine.go +++ b/vendor/google.golang.org/appengine/appengine.go @@ -60,6 +60,24 @@ func IsDevAppServer() bool { return internal.IsDevAppServer() } +// IsStandard reports whether the App Engine app is running in the standard +// environment. This includes both the first generation runtimes (<= Go 1.9) +// and the second generation runtimes (>= Go 1.11). +func IsStandard() bool { + return internal.IsStandard() +} + +// IsFlex reports whether the App Engine app is running in the flexible environment. +func IsFlex() bool { + return internal.IsFlex() +} + +// IsAppEngine reports whether the App Engine app is running on App Engine, in either +// the standard or flexible environment. +func IsAppEngine() bool { + return internal.IsAppEngine() +} + // NewContext returns a context for an in-flight HTTP request. // This function is cheap. func NewContext(req *http.Request) context.Context { diff --git a/vendor/google.golang.org/appengine/delay/delay.go b/vendor/google.golang.org/appengine/delay/delay.go index 52915a42..2809f427 100644 --- a/vendor/google.golang.org/appengine/delay/delay.go +++ b/vendor/google.golang.org/appengine/delay/delay.go @@ -46,6 +46,7 @@ package delay // import "google.golang.org/appengine/delay" import ( "bytes" + stdctx "context" "encoding/gob" "errors" "fmt" @@ -89,8 +90,14 @@ var ( // context keys headersContextKey contextKey = 0 + stdContextType = reflect.TypeOf((*stdctx.Context)(nil)).Elem() + netContextType = reflect.TypeOf((*context.Context)(nil)).Elem() ) +func isContext(t reflect.Type) bool { + return t == stdContextType || t == netContextType +} + // Func declares a new Function. The second argument must be a function with a // first argument of type context.Context. // This function must be called at program initialization time. That means it diff --git a/vendor/google.golang.org/appengine/delay/delay_go17.go b/vendor/google.golang.org/appengine/delay/delay_go17.go deleted file mode 100644 index 9a59e8b0..00000000 --- a/vendor/google.golang.org/appengine/delay/delay_go17.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//+build go1.7 - -package delay - -import ( - stdctx "context" - "reflect" - - netctx "golang.org/x/net/context" -) - -var ( - stdContextType = reflect.TypeOf((*stdctx.Context)(nil)).Elem() - netContextType = reflect.TypeOf((*netctx.Context)(nil)).Elem() -) - -func isContext(t reflect.Type) bool { - return t == stdContextType || t == netContextType -} diff --git a/vendor/google.golang.org/appengine/delay/delay_go17_test.go b/vendor/google.golang.org/appengine/delay/delay_go17_test.go deleted file mode 100644 index 0e708d00..00000000 --- a/vendor/google.golang.org/appengine/delay/delay_go17_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2017 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//+build go1.7 - -package delay - -import ( - "bytes" - stdctx "context" - "net/http" - "net/http/httptest" - "testing" - - netctx "golang.org/x/net/context" - "google.golang.org/appengine/taskqueue" -) - -var ( - stdCtxRuns = 0 - stdCtxFunc = Func("stdctx", func(c stdctx.Context) { - stdCtxRuns++ - }) -) - -func TestStandardContext(t *testing.T) { - // Fake out the adding of a task. - var task *taskqueue.Task - taskqueueAdder = func(_ netctx.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { - if queue != "" { - t.Errorf(`Got queue %q, expected ""`, queue) - } - task = tk - return tk, nil - } - - c := newFakeContext() - stdCtxRuns = 0 // reset state - if err := stdCtxFunc.Call(c.ctx); err != nil { - t.Fatal("Function.Call:", err) - } - - // Simulate the Task Queue service. - req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) - if err != nil { - t.Fatalf("Failed making http.Request: %v", err) - } - rw := httptest.NewRecorder() - runFunc(c.ctx, rw, req) - - if stdCtxRuns != 1 { - t.Errorf("stdCtxRuns: got %d, want 1", stdCtxRuns) - } -} diff --git a/vendor/google.golang.org/appengine/delay/delay_pre17.go b/vendor/google.golang.org/appengine/delay/delay_pre17.go deleted file mode 100644 index d30c75df..00000000 --- a/vendor/google.golang.org/appengine/delay/delay_pre17.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//+build !go1.7 - -package delay - -import ( - "reflect" - - "golang.org/x/net/context" -) - -var contextType = reflect.TypeOf((*context.Context)(nil)).Elem() - -func isContext(t reflect.Type) bool { - return t == contextType -} diff --git a/vendor/google.golang.org/appengine/delay/delay_test.go b/vendor/google.golang.org/appengine/delay/delay_test.go index 3df2bf7e..1cb9609c 100644 --- a/vendor/google.golang.org/appengine/delay/delay_test.go +++ b/vendor/google.golang.org/appengine/delay/delay_test.go @@ -6,6 +6,7 @@ package delay import ( "bytes" + stdctx "context" "encoding/gob" "errors" "fmt" @@ -102,6 +103,11 @@ var ( reqFuncRuns++ reqFuncHeaders, reqFuncErr = RequestHeaders(c) }) + + stdCtxRuns = 0 + stdCtxFunc = Func("stdctx", func(c stdctx.Context) { + stdCtxRuns++ + }) ) type fakeContext struct { @@ -426,3 +432,33 @@ func TestGetRequestHeadersFromContext(t *testing.T) { t.Errorf("reqFuncErr: got %v, want nil", reqFuncErr) } } + +func TestStandardContext(t *testing.T) { + // Fake out the adding of a task. + var task *taskqueue.Task + taskqueueAdder = func(_ context.Context, tk *taskqueue.Task, queue string) (*taskqueue.Task, error) { + if queue != "" { + t.Errorf(`Got queue %q, expected ""`, queue) + } + task = tk + return tk, nil + } + + c := newFakeContext() + stdCtxRuns = 0 // reset state + if err := stdCtxFunc.Call(c.ctx); err != nil { + t.Fatal("Function.Call:", err) + } + + // Simulate the Task Queue service. + req, err := http.NewRequest("POST", path, bytes.NewBuffer(task.Payload)) + if err != nil { + t.Fatalf("Failed making http.Request: %v", err) + } + rw := httptest.NewRecorder() + runFunc(c.ctx, rw, req) + + if stdCtxRuns != 1 { + t.Errorf("stdCtxRuns: got %d, want 1", stdCtxRuns) + } +} diff --git a/vendor/google.golang.org/appengine/go.sum b/vendor/google.golang.org/appengine/go.sum index 5e644c2e..1a221c08 100644 --- a/vendor/google.golang.org/appengine/go.sum +++ b/vendor/google.golang.org/appengine/go.sum @@ -1,3 +1,6 @@ +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225 h1:kNX+jCowfMYzvlSvJu5pQWEmyWFrBXJ3PBy10xKMXK8= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/google.golang.org/appengine/internal/api.go b/vendor/google.golang.org/appengine/internal/api.go index 16f87c5d..c9514952 100644 --- a/vendor/google.golang.org/appengine/internal/api.go +++ b/vendor/google.golang.org/appengine/internal/api.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // +build !appengine -// +build go1.7 package internal @@ -130,7 +129,13 @@ func handleHTTP(w http.ResponseWriter, r *http.Request) { flushes++ } c.pendingLogs.Unlock() - go c.flushLog(false) + flushed := make(chan struct{}) + go func() { + defer close(flushed) + // Force a log flush, because with very short requests we + // may not ever flush logs. + c.flushLog(true) + }() w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) // Avoid nil Write call if c.Write is never called. @@ -140,6 +145,9 @@ func handleHTTP(w http.ResponseWriter, r *http.Request) { if c.outBody != nil { w.Write(c.outBody) } + // Wait for the last flush to complete before returning, + // otherwise the security ticket will not be valid. + <-flushed } func executeRequestSafely(c *context, r *http.Request) { diff --git a/vendor/google.golang.org/appengine/internal/api_pre17.go b/vendor/google.golang.org/appengine/internal/api_pre17.go deleted file mode 100644 index 028b4f05..00000000 --- a/vendor/google.golang.org/appengine/internal/api_pre17.go +++ /dev/null @@ -1,682 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// +build !appengine -// +build !go1.7 - -package internal - -import ( - "bytes" - "errors" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "net/url" - "os" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/golang/protobuf/proto" - netcontext "golang.org/x/net/context" - - basepb "google.golang.org/appengine/internal/base" - logpb "google.golang.org/appengine/internal/log" - remotepb "google.golang.org/appengine/internal/remote_api" -) - -const ( - apiPath = "/rpc_http" - defaultTicketSuffix = "/default.20150612t184001.0" -) - -var ( - // Incoming headers. - ticketHeader = http.CanonicalHeaderKey("X-AppEngine-API-Ticket") - dapperHeader = http.CanonicalHeaderKey("X-Google-DapperTraceInfo") - traceHeader = http.CanonicalHeaderKey("X-Cloud-Trace-Context") - curNamespaceHeader = http.CanonicalHeaderKey("X-AppEngine-Current-Namespace") - userIPHeader = http.CanonicalHeaderKey("X-AppEngine-User-IP") - remoteAddrHeader = http.CanonicalHeaderKey("X-AppEngine-Remote-Addr") - - // Outgoing headers. - apiEndpointHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Endpoint") - apiEndpointHeaderValue = []string{"app-engine-apis"} - apiMethodHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Method") - apiMethodHeaderValue = []string{"/VMRemoteAPI.CallRemoteAPI"} - apiDeadlineHeader = http.CanonicalHeaderKey("X-Google-RPC-Service-Deadline") - apiContentType = http.CanonicalHeaderKey("Content-Type") - apiContentTypeValue = []string{"application/octet-stream"} - logFlushHeader = http.CanonicalHeaderKey("X-AppEngine-Log-Flush-Count") - - apiHTTPClient = &http.Client{ - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - Dial: limitDial, - }, - } - - defaultTicketOnce sync.Once - defaultTicket string -) - -func apiURL() *url.URL { - host, port := "appengine.googleapis.internal", "10001" - if h := os.Getenv("API_HOST"); h != "" { - host = h - } - if p := os.Getenv("API_PORT"); p != "" { - port = p - } - return &url.URL{ - Scheme: "http", - Host: host + ":" + port, - Path: apiPath, - } -} - -func handleHTTP(w http.ResponseWriter, r *http.Request) { - c := &context{ - req: r, - outHeader: w.Header(), - apiURL: apiURL(), - } - stopFlushing := make(chan int) - - ctxs.Lock() - ctxs.m[r] = c - ctxs.Unlock() - defer func() { - ctxs.Lock() - delete(ctxs.m, r) - ctxs.Unlock() - }() - - // Patch up RemoteAddr so it looks reasonable. - if addr := r.Header.Get(userIPHeader); addr != "" { - r.RemoteAddr = addr - } else if addr = r.Header.Get(remoteAddrHeader); addr != "" { - r.RemoteAddr = addr - } else { - // Should not normally reach here, but pick a sensible default anyway. - r.RemoteAddr = "127.0.0.1" - } - // The address in the headers will most likely be of these forms: - // 123.123.123.123 - // 2001:db8::1 - // net/http.Request.RemoteAddr is specified to be in "IP:port" form. - if _, _, err := net.SplitHostPort(r.RemoteAddr); err != nil { - // Assume the remote address is only a host; add a default port. - r.RemoteAddr = net.JoinHostPort(r.RemoteAddr, "80") - } - - // Start goroutine responsible for flushing app logs. - // This is done after adding c to ctx.m (and stopped before removing it) - // because flushing logs requires making an API call. - go c.logFlusher(stopFlushing) - - executeRequestSafely(c, r) - c.outHeader = nil // make sure header changes aren't respected any more - - stopFlushing <- 1 // any logging beyond this point will be dropped - - // Flush any pending logs asynchronously. - c.pendingLogs.Lock() - flushes := c.pendingLogs.flushes - if len(c.pendingLogs.lines) > 0 { - flushes++ - } - c.pendingLogs.Unlock() - go c.flushLog(false) - w.Header().Set(logFlushHeader, strconv.Itoa(flushes)) - - // Avoid nil Write call if c.Write is never called. - if c.outCode != 0 { - w.WriteHeader(c.outCode) - } - if c.outBody != nil { - w.Write(c.outBody) - } -} - -func executeRequestSafely(c *context, r *http.Request) { - defer func() { - if x := recover(); x != nil { - logf(c, 4, "%s", renderPanic(x)) // 4 == critical - c.outCode = 500 - } - }() - - http.DefaultServeMux.ServeHTTP(c, r) -} - -func renderPanic(x interface{}) string { - buf := make([]byte, 16<<10) // 16 KB should be plenty - buf = buf[:runtime.Stack(buf, false)] - - // Remove the first few stack frames: - // this func - // the recover closure in the caller - // That will root the stack trace at the site of the panic. - const ( - skipStart = "internal.renderPanic" - skipFrames = 2 - ) - start := bytes.Index(buf, []byte(skipStart)) - p := start - for i := 0; i < skipFrames*2 && p+1 < len(buf); i++ { - p = bytes.IndexByte(buf[p+1:], '\n') + p + 1 - if p < 0 { - break - } - } - if p >= 0 { - // buf[start:p+1] is the block to remove. - // Copy buf[p+1:] over buf[start:] and shrink buf. - copy(buf[start:], buf[p+1:]) - buf = buf[:len(buf)-(p+1-start)] - } - - // Add panic heading. - head := fmt.Sprintf("panic: %v\n\n", x) - if len(head) > len(buf) { - // Extremely unlikely to happen. - return head - } - copy(buf[len(head):], buf) - copy(buf, head) - - return string(buf) -} - -var ctxs = struct { - sync.Mutex - m map[*http.Request]*context - bg *context // background context, lazily initialized - // dec is used by tests to decorate the netcontext.Context returned - // for a given request. This allows tests to add overrides (such as - // WithAppIDOverride) to the context. The map is nil outside tests. - dec map[*http.Request]func(netcontext.Context) netcontext.Context -}{ - m: make(map[*http.Request]*context), -} - -// context represents the context of an in-flight HTTP request. -// It implements the appengine.Context and http.ResponseWriter interfaces. -type context struct { - req *http.Request - - outCode int - outHeader http.Header - outBody []byte - - pendingLogs struct { - sync.Mutex - lines []*logpb.UserAppLogLine - flushes int - } - - apiURL *url.URL -} - -var contextKey = "holds a *context" - -// fromContext returns the App Engine context or nil if ctx is not -// derived from an App Engine context. -func fromContext(ctx netcontext.Context) *context { - c, _ := ctx.Value(&contextKey).(*context) - return c -} - -func withContext(parent netcontext.Context, c *context) netcontext.Context { - ctx := netcontext.WithValue(parent, &contextKey, c) - if ns := c.req.Header.Get(curNamespaceHeader); ns != "" { - ctx = withNamespace(ctx, ns) - } - return ctx -} - -func toContext(c *context) netcontext.Context { - return withContext(netcontext.Background(), c) -} - -func IncomingHeaders(ctx netcontext.Context) http.Header { - if c := fromContext(ctx); c != nil { - return c.req.Header - } - return nil -} - -func ReqContext(req *http.Request) netcontext.Context { - return WithContext(netcontext.Background(), req) -} - -func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context { - ctxs.Lock() - c := ctxs.m[req] - d := ctxs.dec[req] - ctxs.Unlock() - - if d != nil { - parent = d(parent) - } - - if c == nil { - // Someone passed in an http.Request that is not in-flight. - // We panic here rather than panicking at a later point - // so that stack traces will be more sensible. - log.Panic("appengine: NewContext passed an unknown http.Request") - } - return withContext(parent, c) -} - -// DefaultTicket returns a ticket used for background context or dev_appserver. -func DefaultTicket() string { - defaultTicketOnce.Do(func() { - if IsDevAppServer() { - defaultTicket = "testapp" + defaultTicketSuffix - return - } - appID := partitionlessAppID() - escAppID := strings.Replace(strings.Replace(appID, ":", "_", -1), ".", "_", -1) - majVersion := VersionID(nil) - if i := strings.Index(majVersion, "."); i > 0 { - majVersion = majVersion[:i] - } - defaultTicket = fmt.Sprintf("%s/%s.%s.%s", escAppID, ModuleName(nil), majVersion, InstanceID()) - }) - return defaultTicket -} - -func BackgroundContext() netcontext.Context { - ctxs.Lock() - defer ctxs.Unlock() - - if ctxs.bg != nil { - return toContext(ctxs.bg) - } - - // Compute background security ticket. - ticket := DefaultTicket() - - ctxs.bg = &context{ - req: &http.Request{ - Header: http.Header{ - ticketHeader: []string{ticket}, - }, - }, - apiURL: apiURL(), - } - - // TODO(dsymonds): Wire up the shutdown handler to do a final flush. - go ctxs.bg.logFlusher(make(chan int)) - - return toContext(ctxs.bg) -} - -// RegisterTestRequest registers the HTTP request req for testing, such that -// any API calls are sent to the provided URL. It returns a closure to delete -// the registration. -// It should only be used by aetest package. -func RegisterTestRequest(req *http.Request, apiURL *url.URL, decorate func(netcontext.Context) netcontext.Context) (*http.Request, func()) { - c := &context{ - req: req, - apiURL: apiURL, - } - ctxs.Lock() - defer ctxs.Unlock() - if _, ok := ctxs.m[req]; ok { - log.Panic("req already associated with context") - } - if _, ok := ctxs.dec[req]; ok { - log.Panic("req already associated with context") - } - if ctxs.dec == nil { - ctxs.dec = make(map[*http.Request]func(netcontext.Context) netcontext.Context) - } - ctxs.m[req] = c - ctxs.dec[req] = decorate - - return req, func() { - ctxs.Lock() - delete(ctxs.m, req) - delete(ctxs.dec, req) - ctxs.Unlock() - } -} - -var errTimeout = &CallError{ - Detail: "Deadline exceeded", - Code: int32(remotepb.RpcError_CANCELLED), - Timeout: true, -} - -func (c *context) Header() http.Header { return c.outHeader } - -// Copied from $GOROOT/src/pkg/net/http/transfer.go. Some response status -// codes do not permit a response body (nor response entity headers such as -// Content-Length, Content-Type, etc). -func bodyAllowedForStatus(status int) bool { - switch { - case status >= 100 && status <= 199: - return false - case status == 204: - return false - case status == 304: - return false - } - return true -} - -func (c *context) Write(b []byte) (int, error) { - if c.outCode == 0 { - c.WriteHeader(http.StatusOK) - } - if len(b) > 0 && !bodyAllowedForStatus(c.outCode) { - return 0, http.ErrBodyNotAllowed - } - c.outBody = append(c.outBody, b...) - return len(b), nil -} - -func (c *context) WriteHeader(code int) { - if c.outCode != 0 { - logf(c, 3, "WriteHeader called multiple times on request.") // error level - return - } - c.outCode = code -} - -func (c *context) post(body []byte, timeout time.Duration) (b []byte, err error) { - hreq := &http.Request{ - Method: "POST", - URL: c.apiURL, - Header: http.Header{ - apiEndpointHeader: apiEndpointHeaderValue, - apiMethodHeader: apiMethodHeaderValue, - apiContentType: apiContentTypeValue, - apiDeadlineHeader: []string{strconv.FormatFloat(timeout.Seconds(), 'f', -1, 64)}, - }, - Body: ioutil.NopCloser(bytes.NewReader(body)), - ContentLength: int64(len(body)), - Host: c.apiURL.Host, - } - if info := c.req.Header.Get(dapperHeader); info != "" { - hreq.Header.Set(dapperHeader, info) - } - if info := c.req.Header.Get(traceHeader); info != "" { - hreq.Header.Set(traceHeader, info) - } - - tr := apiHTTPClient.Transport.(*http.Transport) - - var timedOut int32 // atomic; set to 1 if timed out - t := time.AfterFunc(timeout, func() { - atomic.StoreInt32(&timedOut, 1) - tr.CancelRequest(hreq) - }) - defer t.Stop() - defer func() { - // Check if timeout was exceeded. - if atomic.LoadInt32(&timedOut) != 0 { - err = errTimeout - } - }() - - hresp, err := apiHTTPClient.Do(hreq) - if err != nil { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge HTTP failed: %v", err), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - defer hresp.Body.Close() - hrespBody, err := ioutil.ReadAll(hresp.Body) - if hresp.StatusCode != 200 { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge returned HTTP %d (%q)", hresp.StatusCode, hrespBody), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - if err != nil { - return nil, &CallError{ - Detail: fmt.Sprintf("service bridge response bad: %v", err), - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - return hrespBody, nil -} - -func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error { - if ns := NamespaceFromContext(ctx); ns != "" { - if fn, ok := NamespaceMods[service]; ok { - fn(in, ns) - } - } - - if f, ctx, ok := callOverrideFromContext(ctx); ok { - return f(ctx, service, method, in, out) - } - - // Handle already-done contexts quickly. - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - c := fromContext(ctx) - if c == nil { - // Give a good error message rather than a panic lower down. - return errNotAppEngineContext - } - - // Apply transaction modifications if we're in a transaction. - if t := transactionFromContext(ctx); t != nil { - if t.finished { - return errors.New("transaction context has expired") - } - applyTransaction(in, &t.transaction) - } - - // Default RPC timeout is 60s. - timeout := 60 * time.Second - if deadline, ok := ctx.Deadline(); ok { - timeout = deadline.Sub(time.Now()) - } - - data, err := proto.Marshal(in) - if err != nil { - return err - } - - ticket := c.req.Header.Get(ticketHeader) - // Use a test ticket under test environment. - if ticket == "" { - if appid := ctx.Value(&appIDOverrideKey); appid != nil { - ticket = appid.(string) + defaultTicketSuffix - } - } - // Fall back to use background ticket when the request ticket is not available in Flex or dev_appserver. - if ticket == "" { - ticket = DefaultTicket() - } - req := &remotepb.Request{ - ServiceName: &service, - Method: &method, - Request: data, - RequestId: &ticket, - } - hreqBody, err := proto.Marshal(req) - if err != nil { - return err - } - - hrespBody, err := c.post(hreqBody, timeout) - if err != nil { - return err - } - - res := &remotepb.Response{} - if err := proto.Unmarshal(hrespBody, res); err != nil { - return err - } - if res.RpcError != nil { - ce := &CallError{ - Detail: res.RpcError.GetDetail(), - Code: *res.RpcError.Code, - } - switch remotepb.RpcError_ErrorCode(ce.Code) { - case remotepb.RpcError_CANCELLED, remotepb.RpcError_DEADLINE_EXCEEDED: - ce.Timeout = true - } - return ce - } - if res.ApplicationError != nil { - return &APIError{ - Service: *req.ServiceName, - Detail: res.ApplicationError.GetDetail(), - Code: *res.ApplicationError.Code, - } - } - if res.Exception != nil || res.JavaException != nil { - // This shouldn't happen, but let's be defensive. - return &CallError{ - Detail: "service bridge returned exception", - Code: int32(remotepb.RpcError_UNKNOWN), - } - } - return proto.Unmarshal(res.Response, out) -} - -func (c *context) Request() *http.Request { - return c.req -} - -func (c *context) addLogLine(ll *logpb.UserAppLogLine) { - // Truncate long log lines. - // TODO(dsymonds): Check if this is still necessary. - const lim = 8 << 10 - if len(*ll.Message) > lim { - suffix := fmt.Sprintf("...(length %d)", len(*ll.Message)) - ll.Message = proto.String((*ll.Message)[:lim-len(suffix)] + suffix) - } - - c.pendingLogs.Lock() - c.pendingLogs.lines = append(c.pendingLogs.lines, ll) - c.pendingLogs.Unlock() -} - -var logLevelName = map[int64]string{ - 0: "DEBUG", - 1: "INFO", - 2: "WARNING", - 3: "ERROR", - 4: "CRITICAL", -} - -func logf(c *context, level int64, format string, args ...interface{}) { - if c == nil { - panic("not an App Engine context") - } - s := fmt.Sprintf(format, args...) - s = strings.TrimRight(s, "\n") // Remove any trailing newline characters. - c.addLogLine(&logpb.UserAppLogLine{ - TimestampUsec: proto.Int64(time.Now().UnixNano() / 1e3), - Level: &level, - Message: &s, - }) - log.Print(logLevelName[level] + ": " + s) -} - -// flushLog attempts to flush any pending logs to the appserver. -// It should not be called concurrently. -func (c *context) flushLog(force bool) (flushed bool) { - c.pendingLogs.Lock() - // Grab up to 30 MB. We can get away with up to 32 MB, but let's be cautious. - n, rem := 0, 30<<20 - for ; n < len(c.pendingLogs.lines); n++ { - ll := c.pendingLogs.lines[n] - // Each log line will require about 3 bytes of overhead. - nb := proto.Size(ll) + 3 - if nb > rem { - break - } - rem -= nb - } - lines := c.pendingLogs.lines[:n] - c.pendingLogs.lines = c.pendingLogs.lines[n:] - c.pendingLogs.Unlock() - - if len(lines) == 0 && !force { - // Nothing to flush. - return false - } - - rescueLogs := false - defer func() { - if rescueLogs { - c.pendingLogs.Lock() - c.pendingLogs.lines = append(lines, c.pendingLogs.lines...) - c.pendingLogs.Unlock() - } - }() - - buf, err := proto.Marshal(&logpb.UserAppLogGroup{ - LogLine: lines, - }) - if err != nil { - log.Printf("internal.flushLog: marshaling UserAppLogGroup: %v", err) - rescueLogs = true - return false - } - - req := &logpb.FlushRequest{ - Logs: buf, - } - res := &basepb.VoidProto{} - c.pendingLogs.Lock() - c.pendingLogs.flushes++ - c.pendingLogs.Unlock() - if err := Call(toContext(c), "logservice", "Flush", req, res); err != nil { - log.Printf("internal.flushLog: Flush RPC: %v", err) - rescueLogs = true - return false - } - return true -} - -const ( - // Log flushing parameters. - flushInterval = 1 * time.Second - forceFlushInterval = 60 * time.Second -) - -func (c *context) logFlusher(stop <-chan int) { - lastFlush := time.Now() - tick := time.NewTicker(flushInterval) - for { - select { - case <-stop: - // Request finished. - tick.Stop() - return - case <-tick.C: - force := time.Now().Sub(lastFlush) > forceFlushInterval - if c.flushLog(force) { - lastFlush = time.Now() - } - } - } -} - -func ContextForTesting(req *http.Request) netcontext.Context { - return toContext(&context{req: req}) -} diff --git a/vendor/google.golang.org/appengine/internal/api_test.go b/vendor/google.golang.org/appengine/internal/api_test.go index 1743254f..8369b335 100644 --- a/vendor/google.golang.org/appengine/internal/api_test.go +++ b/vendor/google.golang.org/appengine/internal/api_test.go @@ -250,11 +250,12 @@ func TestDelayedLogFlushing(t *testing.T) { f, c, cleanup := setup() defer cleanup() - http.HandleFunc("/quick_log", func(w http.ResponseWriter, r *http.Request) { + http.HandleFunc("/slow_log", func(w http.ResponseWriter, r *http.Request) { logC := WithContext(netcontext.Background(), r) fromContext(logC).apiURL = c.apiURL // Otherwise it will try to use the default URL. Logf(logC, 1, "It's a lovely day.") w.WriteHeader(200) + time.Sleep(1200 * time.Millisecond) w.Write(make([]byte, 100<<10)) // write 100 KB to force HTTP flush }) @@ -262,31 +263,65 @@ func TestDelayedLogFlushing(t *testing.T) { Method: "GET", URL: &url.URL{ Scheme: "http", - Path: "/quick_log", + Path: "/slow_log", }, Header: c.req.Header, Body: ioutil.NopCloser(bytes.NewReader(nil)), } w := httptest.NewRecorder() - // Check that log flushing does not hold up the HTTP response. - start := time.Now() - handleHTTP(w, r) - if d := time.Since(start); d > 10*time.Millisecond { - t.Errorf("handleHTTP took %v, want under 10ms", d) + handled := make(chan struct{}) + go func() { + defer close(handled) + handleHTTP(w, r) + }() + // Check that the log flush eventually comes in. + time.Sleep(1200 * time.Millisecond) + if f := atomic.LoadInt32(&f.LogFlushes); f != 1 { + t.Errorf("After 1.2s: f.LogFlushes = %d, want 1", f) } + + <-handled const hdr = "X-AppEngine-Log-Flush-Count" - if h := w.HeaderMap.Get(hdr); h != "1" { - t.Errorf("%s header = %q, want %q", hdr, h, "1") + if got, want := w.HeaderMap.Get(hdr), "1"; got != want { + t.Errorf("%s header = %q, want %q", hdr, got, want) } - if f := atomic.LoadInt32(&f.LogFlushes); f != 0 { - t.Errorf("After HTTP response: f.LogFlushes = %d, want 0", f) + if got, want := atomic.LoadInt32(&f.LogFlushes), int32(2); got != want { + t.Errorf("After HTTP response: f.LogFlushes = %d, want %d", got, want) } - // Check that the log flush eventually comes in. - time.Sleep(100 * time.Millisecond) - if f := atomic.LoadInt32(&f.LogFlushes); f != 1 { - t.Errorf("After 100ms: f.LogFlushes = %d, want 1", f) +} + +func TestLogFlushing(t *testing.T) { + f, c, cleanup := setup() + defer cleanup() + + http.HandleFunc("/quick_log", func(w http.ResponseWriter, r *http.Request) { + logC := WithContext(netcontext.Background(), r) + fromContext(logC).apiURL = c.apiURL // Otherwise it will try to use the default URL. + Logf(logC, 1, "It's a lovely day.") + w.WriteHeader(200) + w.Write(make([]byte, 100<<10)) // write 100 KB to force HTTP flush + }) + + r := &http.Request{ + Method: "GET", + URL: &url.URL{ + Scheme: "http", + Path: "/quick_log", + }, + Header: c.req.Header, + Body: ioutil.NopCloser(bytes.NewReader(nil)), + } + w := httptest.NewRecorder() + + handleHTTP(w, r) + const hdr = "X-AppEngine-Log-Flush-Count" + if got, want := w.HeaderMap.Get(hdr), "1"; got != want { + t.Errorf("%s header = %q, want %q", hdr, got, want) + } + if got, want := atomic.LoadInt32(&f.LogFlushes), int32(1); got != want { + t.Errorf("After HTTP response: f.LogFlushes = %d, want %d", got, want) } } diff --git a/vendor/google.golang.org/appengine/internal/identity.go b/vendor/google.golang.org/appengine/internal/identity.go index d538701a..6d89d637 100644 --- a/vendor/google.golang.org/appengine/internal/identity.go +++ b/vendor/google.golang.org/appengine/internal/identity.go @@ -4,11 +4,46 @@ package internal -import netcontext "golang.org/x/net/context" +import ( + "os" -// These functions are implementations of the wrapper functions -// in ../appengine/identity.go. See that file for commentary. + netcontext "golang.org/x/net/context" +) +var ( + // This is set to true in identity_classic.go, which is behind the appengine build tag. + // The appengine build tag is set for the first generation runtimes (<= Go 1.9) but not + // the second generation runtimes (>= Go 1.11), so this indicates whether we're on a + // first-gen runtime. See IsStandard below for the second-gen check. + appengineStandard bool + + // This is set to true in identity_flex.go, which is behind the appenginevm build tag. + appengineFlex bool +) + +// AppID is the implementation of the wrapper function of the same name in +// ../identity.go. See that file for commentary. func AppID(c netcontext.Context) string { return appID(FullyQualifiedAppID(c)) } + +// IsStandard is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsStandard() bool { + // appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not + // second-gen (>= Go 1.11). Second-gen runtimes set $GAE_ENV so we use that + // to check if we're on a second-gen runtime. + return appengineStandard || os.Getenv("GAE_ENV") == "standard" +} + +// IsFlex is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsFlex() bool { + return appengineFlex +} + +// IsAppEngine is the implementation of the wrapper function of the same name in +// ../appengine.go. See that file for commentary. +func IsAppEngine() bool { + return IsStandard() || IsFlex() +} diff --git a/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/google.golang.org/appengine/internal/identity_classic.go index b59603f1..4e979f45 100644 --- a/vendor/google.golang.org/appengine/internal/identity_classic.go +++ b/vendor/google.golang.org/appengine/internal/identity_classic.go @@ -12,6 +12,10 @@ import ( netcontext "golang.org/x/net/context" ) +func init() { + appengineStandard = true +} + func DefaultVersionHostname(ctx netcontext.Context) string { c := fromContext(ctx) if c == nil { diff --git a/vendor/google.golang.org/appengine/internal/identity_flex.go b/vendor/google.golang.org/appengine/internal/identity_flex.go new file mode 100644 index 00000000..d5e2e7b5 --- /dev/null +++ b/vendor/google.golang.org/appengine/internal/identity_flex.go @@ -0,0 +1,11 @@ +// Copyright 2018 Google LLC. All rights reserved. +// Use of this source code is governed by the Apache 2.0 +// license that can be found in the LICENSE file. + +// +build appenginevm + +package internal + +func init() { + appengineFlex = true +} diff --git a/vendor/google.golang.org/appengine/travis_install.sh b/vendor/google.golang.org/appengine/travis_install.sh new file mode 100644 index 00000000..785b62f4 --- /dev/null +++ b/vendor/google.golang.org/appengine/travis_install.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +if [[ $GO111MODULE == "on" ]]; then + go get . +else + go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v appengine) +fi + +if [[ $GOAPP == "true" ]]; then + mkdir /tmp/sdk + curl -o /tmp/sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.68.zip" + unzip -q /tmp/sdk.zip -d /tmp/sdk + # NOTE: Set the following env vars in the test script: + # export PATH="$PATH:/tmp/sdk/go_appengine" + # export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py +fi + diff --git a/vendor/google.golang.org/appengine/travis_test.sh b/vendor/google.golang.org/appengine/travis_test.sh new file mode 100644 index 00000000..d4390f04 --- /dev/null +++ b/vendor/google.golang.org/appengine/travis_test.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +go version +go test -v google.golang.org/appengine/... +go test -v -race google.golang.org/appengine/... +if [[ $GOAPP == "true" ]]; then + export PATH="$PATH:/tmp/sdk/go_appengine" + export APPENGINE_DEV_APPSERVER=/tmp/sdk/go_appengine/dev_appserver.py + goapp version + goapp test -v google.golang.org/appengine/... +fi diff --git a/vendor/k8s.io/api/Godeps/Godeps.json b/vendor/k8s.io/api/Godeps/Godeps.json index 0276490f..43aa8f31 100644 --- a/vendor/k8s.io/api/Godeps/Godeps.json +++ b/vendor/k8s.io/api/Godeps/Godeps.json @@ -10,10 +10,6 @@ "ImportPath": "github.com/davecgh/go-spew/spew", "Rev": "782f4967f2dc4564575ca782fe2d04090b5faca8" }, - { - "ImportPath": "github.com/ghodss/yaml", - "Rev": "c7ce16629ff4cd059ed96ed06419dd3856fd3577" - }, { "ImportPath": "github.com/gogo/protobuf/proto", "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" @@ -22,10 +18,6 @@ "ImportPath": "github.com/gogo/protobuf/sortkeys", "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" }, - { - "ImportPath": "github.com/golang/glog", - "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" - }, { "ImportPath": "github.com/golang/protobuf/proto", "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" @@ -36,7 +28,7 @@ }, { "ImportPath": "github.com/json-iterator/go", - "Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682" + "Rev": "ab8a2e0c74be9d3be70b3184d9acc634935ded82" }, { "ImportPath": "github.com/modern-go/concurrent", @@ -64,19 +56,19 @@ }, { "ImportPath": "golang.org/x/net/http2", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/http2/hpack", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/idna", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/lex/httplex", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/text/secure/bidirule", @@ -104,151 +96,159 @@ }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/naming", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "60666be32c5de527b69dabe8e4400b4f0aa897de" + "Rev": "d4f83ca2e2604a4c3444295a8aca957c3a784f06" + }, + { + "ImportPath": "k8s.io/klog", + "Rev": "8139d8cb77af419532b33dfa7dd09fbc5f1d344f" + }, + { + "ImportPath": "sigs.k8s.io/yaml", + "Rev": "fd68e9863619f6ec2fdd8625fe1f02e7c877e480" } ] } diff --git a/vendor/k8s.io/api/OWNERS b/vendor/k8s.io/api/OWNERS index 7b9fd5db..67952cac 100644 --- a/vendor/k8s.io/api/OWNERS +++ b/vendor/k8s.io/api/OWNERS @@ -2,54 +2,9 @@ options: no_parent_owners: true approvers: -- erictune -- lavalamp -- smarterclayton -- thockin -- liggitt -# - bgrant0607 # manual escalations only +- api-approvers reviewers: -- brendandburns -- caesarxuchao -- davidopp -- dchen1107 -- deads2k -- derekwaynecarr -- dims -- eparis -- erictune -- errordeveloper -- feiskyer -- gmarek -- janetkuo -- jbeda -- jsafrane -- jszczepkowski -- justinsb -- krousey -- lavalamp -- liggitt -- luxas -- madhusudancs -- mikedanese -- mwielgus -- ncdc -- nikhiljindal -- piosz -- pmorie -- pwittrock -- roberthbailey -- rootfs -- saad-ali -- smarterclayton -- soltysh -- sttts -- tallclair -- thockin -- vishh -- wojtek-t -- yifan-gu -- yujuhong -- zmerlynn +- api-reviewers labels: - sig/architecture +- kind/api-change diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto index e17b5596..98e9a571 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto @@ -88,7 +88,7 @@ message Rule { repeated string apiVersions = 2; // Resources is a list of resources this rule applies to. - // + // // For example: // 'pods' means pods. // 'pods/log' means the log subresource of pods. @@ -96,10 +96,10 @@ message Rule { // 'pods/*' means all subresources of pods. // '*/scale' means all scale subresources. // '*/*' means all resources and their subresources. - // + // // If wildcard is present, the validation rule will ensure resources do not // overlap with each other. - // + // // Depending on the enclosing object, subresources might not be allowed. // Required. repeated string resources = 3; diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto index 4d55ca87..1c40ae53 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -66,7 +66,7 @@ message Rule { repeated string apiVersions = 2; // Resources is a list of resources this rule applies to. - // + // // For example: // 'pods' means pods. // 'pods/log' means the log subresource of pods. @@ -74,10 +74,10 @@ message Rule { // 'pods/*' means all subresources of pods. // '*/scale' means all scale subresources. // '*/*' means all resources and their subresources. - // + // // If wildcard is present, the validation rule will ensure resources do not // overlap with each other. - // + // // Depending on the enclosing object, subresources might not be allowed. // Required. repeated string resources = 3; @@ -168,7 +168,7 @@ message Webhook { // object itself is a namespace, the matching is performed on // object.metadata.labels. If the object is another cluster scoped resource, // it never skips the webhook. - // + // // For example, to run the webhook on any objects whose namespace is not // associated with "runlevel" of "0" or "1"; you will set the selector as // follows: @@ -184,7 +184,7 @@ message Webhook { // } // ] // } - // + // // If instead you want to only run the webhook on any objects whose // namespace is associated with the "environment" of "prod" or "staging"; // you will set the selector as follows: @@ -200,11 +200,11 @@ message Webhook { // } // ] // } - // + // // See // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ // for more examples of label selectors. - // + // // Default to the empty LabelSelector, which matches everything. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5; @@ -223,47 +223,47 @@ message Webhook { // connection with the webhook message WebhookClientConfig { // `url` gives the location of the webhook, in standard URL form - // (`[scheme://]host:port/path`). Exactly one of `url` or `service` + // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. - // + // // The `host` should not refer to a service running in the cluster; use // the `service` field instead. The host might be resolved via external // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve // in-cluster DNS as that would be a layering violation). `host` may // also be an IP address. - // + // // Please note that using `localhost` or `127.0.0.1` as a `host` is // risky unless you take great care to run this webhook on all hosts // which run an apiserver which might need to make calls to this // webhook. Such installs are likely to be non-portable, i.e., not easy // to turn up in a new cluster. - // + // // The scheme must be "https"; the URL must begin with "https://". - // + // // A path is optional, and if present may be any string permissible in // a URL. You may use the path to pass an arbitrary string to the // webhook, for example, a cluster identifier. - // + // // Attempting to use a user or basic auth e.g. "user:password@" is not // allowed. Fragments ("#...") and query parameters ("?...") are not // allowed, either. - // + // // +optional optional string url = 3; // `service` is a reference to the service for this webhook. Either // `service` or `url` must be specified. - // + // // If the webhook is running within the cluster, then you should use `service`. - // + // // Port 443 will be used if it is open, otherwise it is an error. - // + // // +optional optional ServiceReference service = 1; - // `caBundle` is a PEM encoded CA bundle which will be used to validate - // the webhook's server certificate. - // Required. + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. + // +optional optional bytes caBundle = 2; } diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go index 0b948ba1..49d94ec0 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go @@ -246,7 +246,7 @@ const ( // connection with the webhook type WebhookClientConfig struct { // `url` gives the location of the webhook, in standard URL form - // (`[scheme://]host:port/path`). Exactly one of `url` or `service` + // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. // // The `host` should not refer to a service running in the cluster; use @@ -282,12 +282,12 @@ type WebhookClientConfig struct { // Port 443 will be used if it is open, otherwise it is an error. // // +optional - Service *ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"` + Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` - // `caBundle` is a PEM encoded CA bundle which will be used to validate - // the webhook's server certificate. - // Required. - CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"` + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. + // +optional + CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` } // ServiceReference holds a reference to Service.legacy.k8s.io diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go index aab917a4..e97628aa 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go @@ -114,9 +114,9 @@ func (Webhook) SwaggerDoc() map[string]string { var map_WebhookClientConfig = map[string]string{ "": "WebhookClientConfig contains the information to make a TLS connection with the webhook", - "url": "`url` gives the location of the webhook, in standard URL form (`[scheme://]host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + "url": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", "service": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nPort 443 will be used if it is open, otherwise it is an error.", - "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. Required.", + "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", } func (WebhookClientConfig) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/apps/v1/generated.proto b/vendor/k8s.io/api/apps/v1/generated.proto index c8a957ac..fea81922 100644 --- a/vendor/k8s.io/api/apps/v1/generated.proto +++ b/vendor/k8s.io/api/apps/v1/generated.proto @@ -280,6 +280,7 @@ message DeploymentSpec { // The deployment strategy to use to replace existing pods with new ones. // +optional + // +patchStrategy=retainKeys optional DeploymentStrategy strategy = 4; // Minimum number of seconds for which a newly created pod should be ready diff --git a/vendor/k8s.io/api/apps/v1/types.go b/vendor/k8s.io/api/apps/v1/types.go index 4431ca2c..68ac55bf 100644 --- a/vendor/k8s.io/api/apps/v1/types.go +++ b/vendor/k8s.io/api/apps/v1/types.go @@ -32,6 +32,8 @@ const ( ) // +genclient +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // StatefulSet represents a set of pods with consistent identities. @@ -244,6 +246,8 @@ type StatefulSetList struct { } // +genclient +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Deployment enables declarative updates for Pods and ReplicaSets. @@ -279,7 +283,8 @@ type DeploymentSpec struct { // The deployment strategy to use to replace existing pods with new ones. // +optional - Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` + // +patchStrategy=retainKeys + Strategy DeploymentStrategy `json:"strategy,omitempty" patchStrategy:"retainKeys" protobuf:"bytes,4,opt,name=strategy"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. @@ -653,6 +658,8 @@ type DaemonSetList struct { } // +genclient +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ReplicaSet ensures that a specified number of pod replicas are running at any given time. diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.proto b/vendor/k8s.io/api/apps/v1beta1/generated.proto index 6f41f06b..f87f39fe 100644 --- a/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -143,6 +143,7 @@ message DeploymentSpec { // The deployment strategy to use to replace existing pods with new ones. // +optional + // +patchStrategy=retainKeys optional DeploymentStrategy strategy = 4; // Minimum number of seconds for which a newly created pod should be ready diff --git a/vendor/k8s.io/api/apps/v1beta1/types.go b/vendor/k8s.io/api/apps/v1beta1/types.go index d462604d..326902fd 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/vendor/k8s.io/api/apps/v1beta1/types.go @@ -55,8 +55,6 @@ type ScaleStatus struct { TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"` } -// +genclient -// +genclient:noVerbs // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Scale represents a scaling request for a resource. @@ -323,7 +321,8 @@ type DeploymentSpec struct { // The deployment strategy to use to replace existing pods with new ones. // +optional - Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` + // +patchStrategy=retainKeys + Strategy DeploymentStrategy `json:"strategy,omitempty" patchStrategy:"retainKeys" protobuf:"bytes,4,opt,name=strategy"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.proto b/vendor/k8s.io/api/apps/v1beta2/generated.proto index cc3656d2..5d11cbe8 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta2/generated.proto @@ -286,6 +286,7 @@ message DeploymentSpec { // The deployment strategy to use to replace existing pods with new ones. // +optional + // +patchStrategy=retainKeys optional DeploymentStrategy strategy = 4; // Minimum number of seconds for which a newly created pod should be ready diff --git a/vendor/k8s.io/api/apps/v1beta2/types.go b/vendor/k8s.io/api/apps/v1beta2/types.go index e5525222..e75589ad 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/vendor/k8s.io/api/apps/v1beta2/types.go @@ -57,8 +57,6 @@ type ScaleStatus struct { TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"` } -// +genclient -// +genclient:noVerbs // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Scale represents a scaling request for a resource. @@ -331,7 +329,8 @@ type DeploymentSpec struct { // The deployment strategy to use to replace existing pods with new ones. // +optional - Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"` + // +patchStrategy=retainKeys + Strategy DeploymentStrategy `json:"strategy,omitempty" patchStrategy:"retainKeys" protobuf:"bytes,4,opt,name=strategy"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. diff --git a/vendor/k8s.io/api/auditregistration/OWNERS b/vendor/k8s.io/api/auditregistration/OWNERS index df96f16b..c342e5e0 100644 --- a/vendor/k8s.io/api/auditregistration/OWNERS +++ b/vendor/k8s.io/api/auditregistration/OWNERS @@ -1,5 +1,6 @@ reviewers: -- lavalamp -- sttts -- tallclair -- pbarker \ No newline at end of file +- sig-auth-audit-approvers +- sig-auth-audit-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto b/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto index ba42a1cf..70801a6c 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto @@ -99,47 +99,46 @@ message Webhook { // WebhookClientConfig contains the information to make a connection with the webhook message WebhookClientConfig { // `url` gives the location of the webhook, in standard URL form - // (`[scheme://]host:port/path`). Exactly one of `url` or `service` + // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. - // + // // The `host` should not refer to a service running in the cluster; use // the `service` field instead. The host might be resolved via external // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve // in-cluster DNS as that would be a layering violation). `host` may // also be an IP address. - // + // // Please note that using `localhost` or `127.0.0.1` as a `host` is // risky unless you take great care to run this webhook on all hosts // which run an apiserver which might need to make calls to this // webhook. Such installs are likely to be non-portable, i.e., not easy // to turn up in a new cluster. - // + // // The scheme must be "https"; the URL must begin with "https://". - // + // // A path is optional, and if present may be any string permissible in // a URL. You may use the path to pass an arbitrary string to the // webhook, for example, a cluster identifier. - // + // // Attempting to use a user or basic auth e.g. "user:password@" is not // allowed. Fragments ("#...") and query parameters ("?...") are not // allowed, either. - // + // // +optional optional string url = 1; // `service` is a reference to the service for this webhook. Either // `service` or `url` must be specified. - // + // // If the webhook is running within the cluster, then you should use `service`. - // + // // Port 443 will be used if it is open, otherwise it is an error. - // + // // +optional optional ServiceReference service = 2; - // `caBundle` is a PEM encoded CA bundle which will be used to validate - // the webhook's server certificate. - // defaults to the apiservers CA bundle for the endpoint type + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. // +optional optional bytes caBundle = 3; } diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/types.go b/vendor/k8s.io/api/auditregistration/v1alpha1/types.go index a7ef9d13..af31cfe2 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/types.go +++ b/vendor/k8s.io/api/auditregistration/v1alpha1/types.go @@ -133,7 +133,7 @@ type WebhookThrottleConfig struct { // WebhookClientConfig contains the information to make a connection with the webhook type WebhookClientConfig struct { // `url` gives the location of the webhook, in standard URL form - // (`[scheme://]host:port/path`). Exactly one of `url` or `service` + // (`scheme://host:port/path`). Exactly one of `url` or `service` // must be specified. // // The `host` should not refer to a service running in the cluster; use @@ -169,13 +169,12 @@ type WebhookClientConfig struct { // Port 443 will be used if it is open, otherwise it is an error. // // +optional - Service *ServiceReference `json:"service" protobuf:"bytes,2,opt,name=service"` + Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,2,opt,name=service"` - // `caBundle` is a PEM encoded CA bundle which will be used to validate - // the webhook's server certificate. - // defaults to the apiservers CA bundle for the endpoint type + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // If unspecified, system trust roots on the apiserver are used. // +optional - CABundle []byte `json:"caBundle" protobuf:"bytes,3,opt,name=caBundle"` + CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,3,opt,name=caBundle"` } // ServiceReference holds a reference to Service.legacy.k8s.io diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go index 914932e6..edd608f3 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go @@ -88,9 +88,9 @@ func (Webhook) SwaggerDoc() map[string]string { var map_WebhookClientConfig = map[string]string{ "": "WebhookClientConfig contains the information to make a connection with the webhook", - "url": "`url` gives the location of the webhook, in standard URL form (`[scheme://]host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + "url": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", "service": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nPort 443 will be used if it is open, otherwise it is an error.", - "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. defaults to the apiservers CA bundle for the endpoint type", + "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", } func (WebhookClientConfig) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/authentication/OWNERS b/vendor/k8s.io/api/authentication/OWNERS index 2bdfd0ce..1b888f0b 100755 --- a/vendor/k8s.io/api/authentication/OWNERS +++ b/vendor/k8s.io/api/authentication/OWNERS @@ -1,9 +1,6 @@ reviewers: -- liggitt -- lavalamp -- wojtek-t -- deads2k -- sttts -- mbohlool -- jianhuiz -- enj +- sig-auth-authenticators-approvers +- sig-auth-authenticators-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/api/authentication/v1/generated.pb.go b/vendor/k8s.io/api/authentication/v1/generated.pb.go index dcea4228..4e7f28d8 100644 --- a/vendor/k8s.io/api/authentication/v1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1/generated.pb.go @@ -355,6 +355,21 @@ func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token))) i += copy(dAtA[i:], m.Token) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -393,6 +408,21 @@ func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error))) i += copy(dAtA[i:], m.Error) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -561,6 +591,12 @@ func (m *TokenReviewSpec) Size() (n int) { _ = l l = len(m.Token) n += 1 + l + sovGenerated(uint64(l)) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -572,6 +608,12 @@ func (m *TokenReviewStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Error) n += 1 + l + sovGenerated(uint64(l)) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -679,6 +721,7 @@ func (this *TokenReviewSpec) String() string { } s := strings.Join([]string{`&TokenReviewSpec{`, `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `Audiences:` + fmt.Sprintf("%v", this.Audiences) + `,`, `}`, }, "") return s @@ -691,6 +734,7 @@ func (this *TokenReviewStatus) String() string { `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`, `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`, `Error:` + fmt.Sprintf("%v", this.Error) + `,`, + `Audiences:` + fmt.Sprintf("%v", this.Audiences) + `,`, `}`, }, "") return s @@ -1550,6 +1594,35 @@ func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error { } m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Audiences", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Audiences = append(m.Audiences, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -1679,6 +1752,35 @@ func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error { } m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Audiences", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Audiences = append(m.Audiences, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2070,61 +2172,62 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 892 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x8e, 0xf3, 0x63, 0xb5, 0x99, 0x74, 0x97, 0xdd, 0x29, 0x95, 0xa2, 0x05, 0xec, 0x60, 0x24, - 0x14, 0x01, 0xb5, 0x9b, 0x08, 0x95, 0xaa, 0x48, 0x48, 0x6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8, 0x67, 0x10, 0xd0, 0xe5, 0x3a, 0xf3, 0x4f, 0x0d, 0xbd, 0xea, 0x84, 0x29, 0xf3, 0x1e, 0x0c, - 0xbe, 0x05, 0x97, 0x13, 0x38, 0x85, 0x18, 0x98, 0x0b, 0xb8, 0x85, 0xaa, 0x23, 0x9f, 0x79, 0x4d, - 0xad, 0xa5, 0xb5, 0xeb, 0xce, 0x8d, 0xf3, 0xa9, 0x51, 0xca, 0xa6, 0x46, 0xf5, 0x33, 0x9f, 0x79, - 0x44, 0x66, 0x70, 0x17, 0x21, 0xfa, 0xb0, 0x7f, 0x02, 0x71, 0xe2, 0x87, 0xac, 0x59, 0x96, 0x38, - 0xac, 0x70, 0xe8, 0x70, 0x96, 0x21, 0x73, 0x28, 0xc1, 0xca, 0x68, 0x00, 0xcd, 0xca, 0x22, 0xeb, - 0x17, 0x34, 0x00, 0x22, 0x33, 0xd8, 0x41, 0x95, 0xb4, 0x7f, 0xd4, 0xac, 0x4a, 0xc0, 0x1d, 0x05, - 0xa8, 0x1c, 0xf7, 0x8f, 0xfe, 0x9b, 0x1a, 0x6f, 0x5e, 0x37, 0x24, 0x9f, 0x44, 0x90, 0x58, 0xc7, - 0xfd, 0x23, 0x22, 0x8a, 0xcd, 0x0f, 0x10, 0xea, 0x3d, 0xe1, 0x31, 0x3d, 0xa1, 0xdf, 0xa5, 0x80, - 0x0d, 0x54, 0xf3, 0x39, 0x04, 0x49, 0x53, 0x6b, 0x55, 0xda, 0x75, 0xa7, 0x9e, 0x4d, 0x8d, 0x5a, - 0x5f, 0x04, 0x48, 0x1e, 0xbf, 0xbf, 0xfd, 0xd3, 0xaf, 0x46, 0xe9, 0xe9, 0x5f, 0xad, 0x92, 0xf9, - 0x4b, 0x19, 0xdd, 0x78, 0x1c, 0x8e, 0x80, 0x11, 0xf8, 0x3e, 0x85, 0x84, 0xe3, 0x6f, 0xd0, 0xb6, - 0x78, 0x22, 0x8f, 0x72, 0x2a, 0x95, 0x68, 0x74, 0xef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xa2, 0x32, 0xf8, 0x04, 0xd5, 0x40, 0x6c, 0xe6, 0x66, 0xb5, - 0x55, 0x69, 0x37, 0xba, 0x9d, 0xcd, 0xa6, 0xb5, 0xe4, 0x36, 0xef, 0x31, 0x1e, 0x4f, 0xe6, 0xa6, - 0x12, 0x31, 0x92, 0xd3, 0x1d, 0x0c, 0xd4, 0xc6, 0x97, 0x18, 0xbc, 0x87, 0x2a, 0x23, 0x98, 0xe4, - 0x13, 0x11, 0xf1, 0x13, 0x7f, 0x84, 0x6a, 0x63, 0xf1, 0x31, 0x50, 0x2a, 0xb7, 0xd7, 0xdf, 0x5b, - 0x7c, 0x3c, 0x48, 0x5e, 0x76, 0xbf, 0x7c, 0x4f, 0x73, 0xda, 0xe7, 0x17, 0x7a, 0xe9, 0xd9, 0x85, - 0x5e, 0x7a, 0x7e, 0xa1, 0x97, 0x9e, 0x66, 0xba, 0x76, 0x9e, 0xe9, 0xda, 0xb3, 0x4c, 0xd7, 0x9e, - 0x67, 0xba, 0xf6, 0x77, 0xa6, 0x6b, 0x3f, 0xfe, 0xa3, 0x97, 0xbe, 0x2e, 0x8f, 0x3b, 0xff, 0x07, - 0x00, 0x00, 0xff, 0xff, 0x5e, 0x8d, 0x94, 0x78, 0x88, 0x08, 0x00, 0x00, + // 900 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0xf3, 0xa3, 0x4a, 0x26, 0xdb, 0xd2, 0xce, 0xb2, 0x52, 0x54, 0xc0, 0x2e, 0x41, 0x42, + 0x15, 0xb0, 0xf6, 0x26, 0x42, 0xb0, 0x5a, 0x24, 0xa4, 0x9a, 0x46, 0x10, 0x21, 0xd8, 0xd5, 0xec, + 0xb6, 0x20, 0x4e, 0x4c, 0xec, 0xd7, 0xc4, 0x04, 0x8f, 0x8d, 0x3d, 0x0e, 0x9b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, 0x10, 0x01, 0x73, 0x00, 0x1f, 0xa0, 0xea, 0xd8, 0x63, 0x6e, 0x4b, 0x3b, + 0xd0, 0x0e, 0x1b, 0xf6, 0xad, 0xf3, 0x99, 0x51, 0x4a, 0x67, 0x46, 0xf5, 0x53, 0x8f, 0xb9, 0x44, + 0x66, 0x70, 0x17, 0x21, 0xfa, 0xa8, 0x7f, 0x0a, 0x51, 0xec, 0x05, 0xac, 0x55, 0x96, 0x38, 0xac, + 0x70, 0xe8, 0x68, 0x9e, 0x21, 0x0b, 0x28, 0xc1, 0xca, 0xa8, 0x0f, 0xad, 0x4a, 0x91, 0xf5, 0x73, + 0xea, 0x03, 0x91, 0x19, 0x6c, 0xa3, 0x4a, 0xd2, 0x3f, 0x6e, 0x55, 0x25, 0xe0, 0x9e, 0x02, 0x54, + 0x4e, 0xfa, 0xc7, 0xff, 0xce, 0x8c, 0xd7, 0xaf, 0xdb, 0x24, 0x9f, 0x86, 0x10, 0x9b, 0x27, 0xfd, + 0x63, 0x22, 0x8a, 0xdb, 0xef, 0x23, 0xd4, 0x7b, 0xca, 0x23, 0x7a, 0x4a, 0xbf, 0x4d, 0x00, 0x1b, + 0xa8, 0xe6, 0x71, 0xf0, 0xe3, 0x96, 0x76, 0x50, 0x39, 0x6c, 0xd8, 0x8d, 0x74, 0x66, 0xd4, 0xfa, + 0x22, 0x40, 0xb2, 0xf8, 0x83, 0xfa, 0x8f, 0xbf, 0x18, 0xa5, 0x67, 0x7f, 0x1c, 0x94, 0xda, 0x3f, + 0x97, 0xd1, 0xad, 0x27, 0xc1, 0x18, 0x18, 0x81, 0xef, 0x12, 0x88, 0x39, 0xfe, 0x1a, 0xd5, 0xc5, + 0x11, 0xb9, 0x94, 0x53, 0xa9, 0x44, 0xb3, 0x7b, 0xcf, 0xcc, 0xdd, 0x31, 0x1f, 0xc2, 0x0c, 0xc7, + 0x43, 0x11, 0x88, 0x4d, 0x81, 0x36, 0x27, 0x1d, 0x33, 0x93, 0xf3, 0x33,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 0x66, 0xb7, 0xb3, 0x99, 0x34, 0xa6, + 0x7c, 0x27, 0x7a, 0x8c, 0x47, 0xd3, 0x05, 0x09, 0x44, 0x8c, 0x64, 0x74, 0xfb, 0x03, 0xf5, 0x96, + 0x48, 0x0c, 0xde, 0x45, 0x95, 0x31, 0x4c, 0xb3, 0x1d, 0x11, 0xf1, 0x89, 0x3f, 0x44, 0xb5, 0x89, + 0x78, 0x66, 0xd4, 0x91, 0x1c, 0xae, 0xef, 0x9b, 0x3f, 0x4b, 0x24, 0x2b, 0x7b, 0x50, 0xbe, 0xaf, + 0xd9, 0x87, 0xe7, 0x17, 0x7a, 0xe9, 0xf9, 0x85, 0x5e, 0x7a, 0x71, 0xa1, 0x97, 0x9e, 0xa5, 0xba, + 0x76, 0x9e, 0xea, 0xda, 0xf3, 0x54, 0xd7, 0x5e, 0xa4, 0xba, 0xf6, 0x67, 0xaa, 0x6b, 0x3f, 0xfc, + 0xa5, 0x97, 0xbe, 0x2a, 0x4f, 0x3a, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x04, 0x81, 0x6f, + 0xe2, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/authentication/v1/generated.proto b/vendor/k8s.io/api/authentication/v1/generated.proto index 10c79217..b69636a8 100644 --- a/vendor/k8s.io/api/authentication/v1/generated.proto +++ b/vendor/k8s.io/api/authentication/v1/generated.proto @@ -118,6 +118,14 @@ message TokenReviewSpec { // Token is the opaque bearer token. // +optional optional string token = 1; + + // Audiences is a list of the identifiers that the resource server presented + // with the token identifies as. Audience-aware token authenticators will + // verify that the token was intended for at least one of the audiences in + // this list. If no audiences are provided, the audience will default to the + // audience of the Kubernetes apiserver. + // +optional + repeated string audiences = 2; } // TokenReviewStatus is the result of the token authentication request. @@ -130,6 +138,18 @@ message TokenReviewStatus { // +optional optional UserInfo user = 2; + // Audiences are audience identifiers chosen by the authenticator that are + // compatible with both the TokenReview and token. An identifier is any + // identifier in the intersection of the TokenReviewSpec audiences and the + // token's audiences. A client of the TokenReview API that sets the + // spec.audiences field should validate that a compatible audience identifier + // is returned in the status.audiences field to ensure that the TokenReview + // server is audience aware. If a TokenReview returns an empty + // status.audience field where status.authenticated is "true", the token is + // valid against the audience of the Kubernetes API server. + // +optional + repeated string audiences = 4; + // Error indicates that the token couldn't be checked // +optional optional string error = 3; diff --git a/vendor/k8s.io/api/authentication/v1/types.go b/vendor/k8s.io/api/authentication/v1/types.go index 723457a3..d348c6fd 100644 --- a/vendor/k8s.io/api/authentication/v1/types.go +++ b/vendor/k8s.io/api/authentication/v1/types.go @@ -64,6 +64,13 @@ type TokenReviewSpec struct { // Token is the opaque bearer token. // +optional Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"` + // Audiences is a list of the identifiers that the resource server presented + // with the token identifies as. Audience-aware token authenticators will + // verify that the token was intended for at least one of the audiences in + // this list. If no audiences are provided, the audience will default to the + // audience of the Kubernetes apiserver. + // +optional + Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } // TokenReviewStatus is the result of the token authentication request. @@ -74,6 +81,17 @@ type TokenReviewStatus struct { // User is the UserInfo associated with the provided token. // +optional User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"` + // Audiences are audience identifiers chosen by the authenticator that are + // compatible with both the TokenReview and token. An identifier is any + // identifier in the intersection of the TokenReviewSpec audiences and the + // token's audiences. A client of the TokenReview API that sets the + // spec.audiences field should validate that a compatible audience identifier + // is returned in the status.audiences field to ensure that the TokenReview + // server is audience aware. If a TokenReview returns an empty + // status.audience field where status.authenticated is "true", the token is + // valid against the audience of the Kubernetes API server. + // +optional + Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"` diff --git a/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go index 6632a5dd..f2c9b95c 100644 --- a/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/authentication/v1/types_swagger_doc_generated.go @@ -79,8 +79,9 @@ func (TokenReview) SwaggerDoc() map[string]string { } var map_TokenReviewSpec = map[string]string{ - "": "TokenReviewSpec is a description of the token authentication request.", - "token": "Token is the opaque bearer token.", + "": "TokenReviewSpec is a description of the token authentication request.", + "token": "Token is the opaque bearer token.", + "audiences": "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", } func (TokenReviewSpec) SwaggerDoc() map[string]string { @@ -91,6 +92,7 @@ var map_TokenReviewStatus = map[string]string{ "": "TokenReviewStatus is the result of the token authentication request.", "authenticated": "Authenticated indicates that the token was associated with a known user.", "user": "User is the UserInfo associated with the provided token.", + "audiences": "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", "error": "Error indicates that the token couldn't be checked", } diff --git a/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go index f36c253b..aca99c42 100644 --- a/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/authentication/v1/zz_generated.deepcopy.go @@ -141,7 +141,7 @@ func (in *TokenReview) DeepCopyInto(out *TokenReview) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } @@ -167,6 +167,11 @@ func (in *TokenReview) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TokenReviewSpec) DeepCopyInto(out *TokenReviewSpec) { *out = *in + if in.Audiences != nil { + in, out := &in.Audiences, &out.Audiences + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -184,6 +189,11 @@ func (in *TokenReviewSpec) DeepCopy() *TokenReviewSpec { func (in *TokenReviewStatus) DeepCopyInto(out *TokenReviewStatus) { *out = *in in.User.DeepCopyInto(&out.User) + if in.Audiences != nil { + in, out := &in.Audiences, &out.Audiences + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go index 55886b47..5f34e76a 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -175,6 +175,21 @@ func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token))) i += copy(dAtA[i:], m.Token) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -213,6 +228,21 @@ func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error))) i += copy(dAtA[i:], m.Error) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + dAtA[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -326,6 +356,12 @@ func (m *TokenReviewSpec) Size() (n int) { _ = l l = len(m.Token) n += 1 + l + sovGenerated(uint64(l)) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -337,6 +373,12 @@ func (m *TokenReviewStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Error) n += 1 + l + sovGenerated(uint64(l)) + if len(m.Audiences) > 0 { + for _, s := range m.Audiences { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -396,6 +438,7 @@ func (this *TokenReviewSpec) String() string { } s := strings.Join([]string{`&TokenReviewSpec{`, `Token:` + fmt.Sprintf("%v", this.Token) + `,`, + `Audiences:` + fmt.Sprintf("%v", this.Audiences) + `,`, `}`, }, "") return s @@ -408,6 +451,7 @@ func (this *TokenReviewStatus) String() string { `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`, `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`, `Error:` + fmt.Sprintf("%v", this.Error) + `,`, + `Audiences:` + fmt.Sprintf("%v", this.Audiences) + `,`, `}`, }, "") return s @@ -720,6 +764,35 @@ func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error { } m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Audiences", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Audiences = append(m.Audiences, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -849,6 +922,35 @@ func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error { } m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Audiences", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Audiences = append(m.Audiences, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -1240,45 +1342,47 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 635 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcf, 0x4f, 0xd4, 0x40, - 0x14, 0x6e, 0xf7, 0x07, 0xee, 0xce, 0x8a, 0xe2, 0x24, 0x26, 0x9b, 0x4d, 0xec, 0xae, 0xeb, 0x85, - 0x44, 0x99, 0x0a, 0x21, 0x48, 0xf0, 0x64, 0x95, 0x18, 0x4c, 0x88, 0xc9, 0x08, 0x1e, 0xd4, 0x83, - 0xb3, 0xdd, 0x47, 0xb7, 0xae, 0xed, 0x34, 0xd3, 0x69, 0x95, 0x1b, 0x7f, 0x82, 0x47, 0x8f, 0x26, - 0xfe, 0x25, 0x26, 0x1e, 0x38, 0x72, 0xe4, 0x60, 0x88, 0xd4, 0x7f, 0xc4, 0xcc, 0x74, 0x64, 0x17, - 0x88, 0x01, 0x6e, 0xf3, 0xbe, 0xf7, 0xbe, 0x6f, 0xde, 0xf7, 0x66, 0x1e, 0x7a, 0x31, 0x5e, 0x4d, - 0x49, 0xc8, 0xdd, 0x71, 0x36, 0x00, 0x11, 0x83, 0x84, 0xd4, 0xcd, 0x21, 0x1e, 0x72, 0xe1, 0x9a, - 0x04, 0x4b, 0x42, 0x97, 0x65, 0x72, 0x04, 0xb1, 0x0c, 0x7d, 0x26, 0x43, 0x1e, 0xbb, 0xf9, 0xe2, - 0x00, 0x24, 0x5b, 0x74, 0x03, 0x88, 0x41, 0x30, 0x09, 0x43, 0x92, 0x08, 0x2e, 0x39, 0xbe, 0x5b, - 0x52, 0x08, 0x4b, 0x42, 0x72, 0x9a, 0x42, 0x0c, 0xa5, 0xb3, 0x10, 0x84, 0x72, 0x94, 0x0d, 0x88, - 0xcf, 0x23, 0x37, 0xe0, 0x01, 0x77, 0x35, 0x73, 0x90, 0xed, 0xe8, 0x48, 0x07, 0xfa, 0x54, 0x2a, - 0x76, 0x96, 0x27, 0x4d, 0x44, 0xcc, 0x1f, 0x85, 0x31, 0x88, 0x5d, 0x37, 0x19, 0x07, 0x0a, 0x48, - 0xdd, 0x08, 0x24, 0x73, 0xf3, 0x73, 0x7d, 0x74, 0xdc, 0xff, 0xb1, 0x44, 0x16, 0xcb, 0x30, 0x82, - 0x73, 0x84, 0x95, 0x8b, 0x08, 0xa9, 0x3f, 0x82, 0x88, 0x9d, 0xe5, 0xf5, 0x1f, 0x21, 0xb4, 0xfe, - 0x59, 0x0a, 0xf6, 0x9a, 0x7d, 0xcc, 0x00, 0x77, 0x51, 0x3d, 0x94, 0x10, 0xa5, 0x6d, 0xbb, 0x57, - 0x9d, 0x6f, 0x7a, 0xcd, 0xe2, 0xa8, 0x5b, 0xdf, 0x50, 0x00, 0x2d, 0xf1, 0xb5, 0xc6, 0xd7, 0x6f, - 0x5d, 0x6b, 0xef, 0x57, 0xcf, 0xea, 0x7f, 0xaf, 0xa0, 0xd6, 0x16, 0x1f, 0x43, 0x4c, 0x21, 0x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x00, 0x00, + // 663 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcd, 0x4e, 0x14, 0x4d, + 0x14, 0xed, 0x9e, 0x1f, 0xbe, 0x99, 0x9a, 0x6f, 0x14, 0x2b, 0x31, 0x99, 0x4c, 0x62, 0x0f, 0x8e, + 0x1b, 0x12, 0xa4, 0x5a, 0x08, 0x41, 0x82, 0x2b, 0x5a, 0x89, 0xc1, 0x84, 0x98, 0x94, 0xe0, 0x42, + 0x5d, 0x58, 0xd3, 0x73, 0xe9, 0x69, 0xc7, 0xfe, 0x49, 0x55, 0xf5, 0x28, 0x3b, 0x1e, 0xc1, 0xa5, + 0x4b, 0x13, 0x9f, 0xc4, 0x1d, 0x4b, 0x96, 0x2c, 0xcc, 0x44, 0xda, 0x27, 0xf0, 0x0d, 0x4c, 0x55, + 0x17, 0xcc, 0x00, 0x31, 0xc0, 0xae, 0xeb, 0xdc, 0x7b, 0xce, 0x3d, 0xf7, 0x54, 0x17, 0x7a, 0x31, + 0x5c, 0x13, 0x24, 0x4c, 0xdc, 0x61, 0xd6, 0x03, 0x1e, 0x83, 0x04, 0xe1, 0x8e, 0x20, 0xee, 0x27, + 0xdc, 0x35, 0x05, 0x96, 0x86, 0x2e, 0xcb, 0xe4, 0x00, 0x62, 0x19, 0xfa, 0x4c, 0x86, 0x49, 0xec, + 0x8e, 0x96, 0x7a, 0x20, 0xd9, 0x92, 0x1b, 0x40, 0x0c, 0x9c, 0x49, 0xe8, 0x93, 0x94, 0x27, 0x32, + 0xc1, 0xf7, 0x0b, 0x0a, 0x61, 0x69, 0x48, 0xce, 0x53, 0x88, 0xa1, 0xb4, 0x17, 0x83, 0x50, 0x0e, + 0xb2, 0x1e, 0xf1, 0x93, 0xc8, 0x0d, 0x92, 0x20, 0x71, 0x35, 0xb3, 0x97, 0xed, 0xe9, 0x93, 0x3e, + 0xe8, 0xaf, 0x42, 0xb1, 0xbd, 0x32, 0x31, 0x11, 0x31, 0x7f, 0x10, 0xc6, 0xc0, 0xf7, 0xdd, 0x74, + 0x18, 0x28, 0x40, 0xb8, 0x11, 0x48, 0xe6, 0x8e, 0x2e, 0xf9, 0x68, 0xbb, 0xff, 0x62, 0xf1, 0x2c, + 0x96, 0x61, 0x04, 0x97, 0x08, 0xab, 0x57, 0x11, 0x84, 0x3f, 0x80, 0x88, 0x5d, 0xe4, 0x75, 0x1f, + 0x23, 0xb4, 0xf9, 0x59, 0x72, 0xf6, 0x9a, 0x7d, 0xcc, 0x00, 0x77, 0x50, 0x35, 0x94, 0x10, 0x89, + 0x96, 0x3d, 0x57, 0x9e, 0xaf, 0x7b, 0xf5, 0x7c, 0xdc, 0xa9, 0x6e, 0x29, 0x80, 0x16, 0xf8, 0x7a, + 0xed, 0xeb, 0xb7, 0x8e, 0x75, 0xf0, 0x73, 0xce, 0xea, 0x7e, 0x2f, 0xa1, 0xc6, 0x4e, 0x32, 0x84, + 0x98, 0xc2, 0x28, 0x84, 0x4f, 0xf8, 0x3d, 0xaa, 0xa9, 0x65, 0xfa, 0x4c, 0xb2, 0x96, 0x3d, 0x67, + 0xcf, 0x37, 0x96, 0x1f, 0x91, 0x49, 0x98, 0x67, 0x9e, 0x48, 0x3a, 0x0c, 0x14, 0x20, 0x88, 0xea, + 0x26, 0xa3, 0x25, 0xf2, 0xb2, 0xf7, 0x01, 0x7c, 0xb9, 0x0d, 0x92, 0x79, 0xf8, 0x70, 0xdc, 0xb1, + 0xf2, 0x71, 0x07, 0x4d, 0x30, 0x7a, 0xa6, 0x8a, 0x77, 0x50, 0x45, 0xa4, 0xe0, 0xb7, 0x4a, 0x5a, + 0x7d, 0x99, 0x5c, 0x79, 0x55, 0x64, 0xca, 0xdf, 0xab, 0x14, 0x7c, 0xef, 0x7f, 0xa3, 0x5f, 0x51, + 0x27, 0xaa, 0xd5, 0xf0, 0x3b, 0x34, 0x23, 0x24, 0x93, 0x99, 0x68, 0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x5a, 0x9f, 0x6b, 0x84, 0x9a, 0x0a, 0x7e, 0x8b, 0xaa, 0xa0, 0x5e, 0x8d, 0xb6, 0xd9, 0x58, + 0x5e, 0xbd, 0x41, 0x3e, 0x44, 0x3f, 0xb7, 0xcd, 0x58, 0xf2, 0xfd, 0xa9, 0x1c, 0x14, 0x46, 0x0b, + 0xcd, 0x76, 0x60, 0x9e, 0xa4, 0xee, 0xc1, 0xb3, 0xa8, 0x3c, 0x84, 0xfd, 0x62, 0x2d, 0xaa, 0x3e, + 0xf1, 0x53, 0x54, 0x1d, 0xa9, 0xd7, 0x6a, 0x2e, 0x67, 0xf1, 0x1a, 0xc3, 0x27, 0x4f, 0x9c, 0x16, + 0xdc, 0xf5, 0xd2, 0x9a, 0xed, 0x2d, 0x1e, 0x9e, 0x38, 0xd6, 0xd1, 0x89, 0x63, 0x1d, 0x9f, 0x38, + 0xd6, 0x41, 0xee, 0xd8, 0x87, 0xb9, 0x63, 0x1f, 0xe5, 0x8e, 0x7d, 0x9c, 0x3b, 0xf6, 0xaf, 0xdc, + 0xb1, 0xbf, 0xfc, 0x76, 0xac, 0x37, 0xff, 0x19, 0x91, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf7, + 0xd6, 0x32, 0x28, 0x68, 0x05, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/authentication/v1beta1/generated.proto b/vendor/k8s.io/api/authentication/v1beta1/generated.proto index a057bc59..caf2a6a5 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/generated.proto +++ b/vendor/k8s.io/api/authentication/v1beta1/generated.proto @@ -57,6 +57,14 @@ message TokenReviewSpec { // Token is the opaque bearer token. // +optional optional string token = 1; + + // Audiences is a list of the identifiers that the resource server presented + // with the token identifies as. Audience-aware token authenticators will + // verify that the token was intended for at least one of the audiences in + // this list. If no audiences are provided, the audience will default to the + // audience of the Kubernetes apiserver. + // +optional + repeated string audiences = 2; } // TokenReviewStatus is the result of the token authentication request. @@ -69,6 +77,18 @@ message TokenReviewStatus { // +optional optional UserInfo user = 2; + // Audiences are audience identifiers chosen by the authenticator that are + // compatible with both the TokenReview and token. An identifier is any + // identifier in the intersection of the TokenReviewSpec audiences and the + // token's audiences. A client of the TokenReview API that sets the + // spec.audiences field should validate that a compatible audience identifier + // is returned in the status.audiences field to ensure that the TokenReview + // server is audience aware. If a TokenReview returns an empty + // status.audience field where status.authenticated is "true", the token is + // valid against the audience of the Kubernetes API server. + // +optional + repeated string audiences = 4; + // Error indicates that the token couldn't be checked // +optional optional string error = 3; diff --git a/vendor/k8s.io/api/authentication/v1beta1/types.go b/vendor/k8s.io/api/authentication/v1beta1/types.go index a90949dc..0b6cba82 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/types.go +++ b/vendor/k8s.io/api/authentication/v1beta1/types.go @@ -48,6 +48,13 @@ type TokenReviewSpec struct { // Token is the opaque bearer token. // +optional Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"` + // Audiences is a list of the identifiers that the resource server presented + // with the token identifies as. Audience-aware token authenticators will + // verify that the token was intended for at least one of the audiences in + // this list. If no audiences are provided, the audience will default to the + // audience of the Kubernetes apiserver. + // +optional + Audiences []string `json:"audiences,omitempty" protobuf:"bytes,2,rep,name=audiences"` } // TokenReviewStatus is the result of the token authentication request. @@ -58,6 +65,17 @@ type TokenReviewStatus struct { // User is the UserInfo associated with the provided token. // +optional User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"` + // Audiences are audience identifiers chosen by the authenticator that are + // compatible with both the TokenReview and token. An identifier is any + // identifier in the intersection of the TokenReviewSpec audiences and the + // token's audiences. A client of the TokenReview API that sets the + // spec.audiences field should validate that a compatible audience identifier + // is returned in the status.audiences field to ensure that the TokenReview + // server is audience aware. If a TokenReview returns an empty + // status.audience field where status.authenticated is "true", the token is + // valid against the audience of the Kubernetes API server. + // +optional + Audiences []string `json:"audiences,omitempty" protobuf:"bytes,4,rep,name=audiences"` // Error indicates that the token couldn't be checked // +optional Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"` diff --git a/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go index 968999d1..8c9acfb5 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go @@ -38,8 +38,9 @@ func (TokenReview) SwaggerDoc() map[string]string { } var map_TokenReviewSpec = map[string]string{ - "": "TokenReviewSpec is a description of the token authentication request.", - "token": "Token is the opaque bearer token.", + "": "TokenReviewSpec is a description of the token authentication request.", + "token": "Token is the opaque bearer token.", + "audiences": "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", } func (TokenReviewSpec) SwaggerDoc() map[string]string { @@ -50,6 +51,7 @@ var map_TokenReviewStatus = map[string]string{ "": "TokenReviewStatus is the result of the token authentication request.", "authenticated": "Authenticated indicates that the token was associated with a known user.", "user": "User is the UserInfo associated with the provided token.", + "audiences": "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", "error": "Error indicates that the token couldn't be checked", } diff --git a/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go index 3a5f6d5a..a5d82a81 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go @@ -49,7 +49,7 @@ func (in *TokenReview) DeepCopyInto(out *TokenReview) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } @@ -75,6 +75,11 @@ func (in *TokenReview) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TokenReviewSpec) DeepCopyInto(out *TokenReviewSpec) { *out = *in + if in.Audiences != nil { + in, out := &in.Audiences, &out.Audiences + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -92,6 +97,11 @@ func (in *TokenReviewSpec) DeepCopy() *TokenReviewSpec { func (in *TokenReviewStatus) DeepCopyInto(out *TokenReviewStatus) { *out = *in in.User.DeepCopyInto(&out.User) + if in.Audiences != nil { + in, out := &in.Audiences, &out.Audiences + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/api/authorization/OWNERS b/vendor/k8s.io/api/authorization/OWNERS index c1613fc2..ff4a7f4b 100755 --- a/vendor/k8s.io/api/authorization/OWNERS +++ b/vendor/k8s.io/api/authorization/OWNERS @@ -1,17 +1,7 @@ +# approval on api packages bubbles to api-approvers reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- liggitt -- nikhiljindal -- erictune -- sttts -- ncdc -- dims -- mml -- mbohlool -- david-mcmahon -- jianhuiz -- enj +- sig-auth-authorizers-approvers +- sig-auth-authorizers-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/api/core/v1/annotation_key_constants.go b/vendor/k8s.io/api/core/v1/annotation_key_constants.go index 16a0cfce..2c72ec2d 100644 --- a/vendor/k8s.io/api/core/v1/annotation_key_constants.go +++ b/vendor/k8s.io/api/core/v1/annotation_key_constants.go @@ -78,4 +78,23 @@ const ( // // Not all cloud providers support this annotation, though AWS & GCE do. AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges" + + // EndpointsLastChangeTriggerTime is the annotation key, set for endpoints objects, that + // represents the timestamp (stored as RFC 3339 date-time string, e.g. '2018-10-22T19:32:52.1Z') + // of the last change, of some Pod or Service object, that triggered the endpoints object change. + // In other words, if a Pod / Service changed at time T0, that change was observed by endpoints + // controller at T1, and the Endpoints object was changed at T2, the + // EndpointsLastChangeTriggerTime would be set to T0. + // + // The "endpoints change trigger" here means any Pod or Service change that resulted in the + // Endpoints object change. + // + // Given the definition of the "endpoints change trigger", please note that this annotation will + // be set ONLY for endpoints object changes triggered by either Pod or Service change. If the + // Endpoints object changes due to other reasons, this annotation won't be set (or updated if it's + // already set). + // + // This annotation will be used to compute the in-cluster network programming latency SLI, see + // https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md + EndpointsLastChangeTriggerTime = "endpoints.kubernetes.io/last-change-trigger-time" ) diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 80e8aad5..05cc6d62 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -81,6 +81,7 @@ limitations under the License. FlockerVolumeSource GCEPersistentDiskVolumeSource GitRepoVolumeSource + GlusterfsPersistentVolumeSource GlusterfsVolumeSource HTTPGetAction HTTPHeader @@ -498,604 +499,610 @@ func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSou func (*GitRepoVolumeSource) ProtoMessage() {} func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } +func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} } +func (*GlusterfsPersistentVolumeSource) ProtoMessage() {} +func (*GlusterfsPersistentVolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{57} +} + func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } func (*GlusterfsVolumeSource) ProtoMessage() {} -func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } +func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} } func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } func (*HTTPGetAction) ProtoMessage() {} -func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} } +func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } func (*HTTPHeader) ProtoMessage() {} -func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } +func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } func (m *Handler) Reset() { *m = Handler{} } func (*Handler) ProtoMessage() {} -func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } +func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } func (m *HostAlias) Reset() { *m = HostAlias{} } func (*HostAlias) ProtoMessage() {} -func (*HostAlias) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } +func (*HostAlias) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} } func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } func (*HostPathVolumeSource) ProtoMessage() {} -func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} } +func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} } func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } func (*ISCSIPersistentVolumeSource) ProtoMessage() {} func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{63} + return fileDescriptorGenerated, []int{64} } func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } func (*ISCSIVolumeSource) ProtoMessage() {} -func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} } +func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } func (m *KeyToPath) Reset() { *m = KeyToPath{} } func (*KeyToPath) ProtoMessage() {} -func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } +func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } func (m *Lifecycle) Reset() { *m = Lifecycle{} } func (*Lifecycle) ProtoMessage() {} -func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } +func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} } func (m *LimitRange) Reset() { *m = LimitRange{} } func (*LimitRange) ProtoMessage() {} -func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} } +func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } func (*LimitRangeItem) ProtoMessage() {} -func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } +func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} } func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } func (*LimitRangeList) ProtoMessage() {} -func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} } +func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} } func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } func (*LimitRangeSpec) ProtoMessage() {} -func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} } +func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} } func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} -func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} } +func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{72} } func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } func (*LoadBalancerIngress) ProtoMessage() {} -func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{72} } +func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{73} } func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } func (*LoadBalancerStatus) ProtoMessage() {} -func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{73} } +func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{74} } func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } func (*LocalObjectReference) ProtoMessage() {} -func (*LocalObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{74} } +func (*LocalObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{75} } func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} } func (*LocalVolumeSource) ProtoMessage() {} -func (*LocalVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{75} } +func (*LocalVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{76} } func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } func (*NFSVolumeSource) ProtoMessage() {} -func (*NFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{76} } +func (*NFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{77} } func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{77} } +func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{78} } func (m *NamespaceList) Reset() { *m = NamespaceList{} } func (*NamespaceList) ProtoMessage() {} -func (*NamespaceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{78} } +func (*NamespaceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{79} } func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } func (*NamespaceSpec) ProtoMessage() {} -func (*NamespaceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{79} } +func (*NamespaceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{80} } func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } func (*NamespaceStatus) ProtoMessage() {} -func (*NamespaceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{80} } +func (*NamespaceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{81} } func (m *Node) Reset() { *m = Node{} } func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{81} } +func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{82} } func (m *NodeAddress) Reset() { *m = NodeAddress{} } func (*NodeAddress) ProtoMessage() {} -func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{82} } +func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{83} } func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } func (*NodeAffinity) ProtoMessage() {} -func (*NodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{83} } +func (*NodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{84} } func (m *NodeCondition) Reset() { *m = NodeCondition{} } func (*NodeCondition) ProtoMessage() {} -func (*NodeCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{84} } +func (*NodeCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} } func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } func (*NodeConfigSource) ProtoMessage() {} -func (*NodeConfigSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} } +func (*NodeConfigSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} } func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } func (*NodeConfigStatus) ProtoMessage() {} -func (*NodeConfigStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} } +func (*NodeConfigStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} } func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} -func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} } +func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} } func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} -func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} } +func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} } func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} -func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} } +func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} } func (m *NodeResources) Reset() { *m = NodeResources{} } func (*NodeResources) ProtoMessage() {} -func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} } +func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{91} } func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} -func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{91} } +func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{92} } func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{92} + return fileDescriptorGenerated, []int{93} } func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} -func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{93} } +func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{94} } func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} -func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{94} } +func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{95} } func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{95} } +func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{96} } func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} -func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{96} } +func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} } func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} -func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} } +func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{98} } func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} -func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{98} } +func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} } func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} -func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} } +func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{100} } func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} -func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{100} } +func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{101} } func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{101} + return fileDescriptorGenerated, []int{102} } func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{102} + return fileDescriptorGenerated, []int{103} } func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{103} + return fileDescriptorGenerated, []int{104} } func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{104} + return fileDescriptorGenerated, []int{105} } func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{105} + return fileDescriptorGenerated, []int{106} } func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} -func (*PersistentVolumeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} } +func (*PersistentVolumeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{107} + return fileDescriptorGenerated, []int{108} } func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} -func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } +func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{109} + return fileDescriptorGenerated, []int{110} } func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{110} + return fileDescriptorGenerated, []int{111} } func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} -func (*Pod) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } +func (*Pod) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} -func (*PodAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } +func (*PodAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} -func (*PodAffinityTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } +func (*PodAffinityTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} -func (*PodAntiAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } +func (*PodAntiAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} -func (*PodAttachOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } +func (*PodAttachOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} -func (*PodCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } +func (*PodCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } func (*PodDNSConfig) ProtoMessage() {} -func (*PodDNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } +func (*PodDNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} } func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } func (*PodDNSConfigOption) ProtoMessage() {} -func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} } +func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} } func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} -func (*PodExecOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} } +func (*PodExecOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} -func (*PodList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } +func (*PodList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} -func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } +func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } func (*PodPortForwardOptions) ProtoMessage() {} -func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } +func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} -func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } +func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } func (*PodReadinessGate) ProtoMessage() {} -func (*PodReadinessGate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } +func (*PodReadinessGate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} } func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} -func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} } +func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} } func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} -func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} } +func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} } func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} } +func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } +func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} -func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } +func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} -func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } +func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} -func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } +func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} -func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } +func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} -func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } +func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} -func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } +func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{136} + return fileDescriptorGenerated, []int{137} } func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} -func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } +func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} -func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } +func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} -func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } +func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{140} + return fileDescriptorGenerated, []int{141} } func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} -func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } +func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} -func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } +func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } +func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{144} + return fileDescriptorGenerated, []int{145} } func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{145} + return fileDescriptorGenerated, []int{146} } func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{146} + return fileDescriptorGenerated, []int{147} } func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{147} + return fileDescriptorGenerated, []int{148} } func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} -func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } +func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} -func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } +func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} -func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } +func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} -func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } +func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} -func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } +func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} -func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } +func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{155} + return fileDescriptorGenerated, []int{156} } func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} -func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} } +func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } func (*ScopeSelector) ProtoMessage() {} -func (*ScopeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } +func (*ScopeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{158} } func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } func (*ScopedResourceSelectorRequirement) ProtoMessage() {} func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{158} + return fileDescriptorGenerated, []int{159} } func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{159} } +func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} } func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} -func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} } +func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} } func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} -func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} } +func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} } func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} } +func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} } func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} -func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} } +func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} } func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} -func (*SecretReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} } +func (*SecretReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{165} } func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} -func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{165} } +func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{166} } func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} -func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{166} } +func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{167} } func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} -func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{167} } +func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{168} } func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{168} } +func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{169} } func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{169} } +func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{170} } func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} -func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{170} } +func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{171} } func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } func (*ServiceAccountTokenProjection) ProtoMessage() {} func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{171} + return fileDescriptorGenerated, []int{172} } func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{172} } +func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{173} } func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{173} } +func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{174} } func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} -func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{174} } +func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{175} } func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{175} } +func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{176} } func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{176} } +func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{177} } func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} -func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{177} } +func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{178} } func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{178} + return fileDescriptorGenerated, []int{179} } func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} -func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{179} } +func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{180} } func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} -func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{180} } +func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{181} } func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} -func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{181} } +func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{182} } func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{182} } +func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{183} } func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} -func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{183} } +func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{184} } func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{184} + return fileDescriptorGenerated, []int{185} } func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (*TopologySelectorTerm) ProtoMessage() {} -func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{185} } +func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{186} } func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } func (*TypedLocalObjectReference) ProtoMessage() {} func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{186} + return fileDescriptorGenerated, []int{187} } func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{187} } +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{188} } func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} -func (*VolumeDevice) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{188} } +func (*VolumeDevice) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{189} } func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{189} } +func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{190} } func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } func (*VolumeNodeAffinity) ProtoMessage() {} -func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{190} } +func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{191} } func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} -func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{191} } +func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{192} } func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} -func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{192} } +func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{193} } func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{193} + return fileDescriptorGenerated, []int{194} } func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{194} + return fileDescriptorGenerated, []int{195} } func init() { @@ -1156,6 +1163,7 @@ func init() { proto.RegisterType((*FlockerVolumeSource)(nil), "k8s.io.api.core.v1.FlockerVolumeSource") proto.RegisterType((*GCEPersistentDiskVolumeSource)(nil), "k8s.io.api.core.v1.GCEPersistentDiskVolumeSource") proto.RegisterType((*GitRepoVolumeSource)(nil), "k8s.io.api.core.v1.GitRepoVolumeSource") + proto.RegisterType((*GlusterfsPersistentVolumeSource)(nil), "k8s.io.api.core.v1.GlusterfsPersistentVolumeSource") proto.RegisterType((*GlusterfsVolumeSource)(nil), "k8s.io.api.core.v1.GlusterfsVolumeSource") proto.RegisterType((*HTTPGetAction)(nil), "k8s.io.api.core.v1.HTTPGetAction") proto.RegisterType((*HTTPHeader)(nil), "k8s.io.api.core.v1.HTTPHeader") @@ -3948,6 +3956,46 @@ func (m *GitRepoVolumeSource) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *GlusterfsPersistentVolumeSource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GlusterfsPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.EndpointsName))) + i += copy(dAtA[i:], m.EndpointsName) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + dAtA[i] = 0x18 + i++ + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if m.EndpointsNamespace != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.EndpointsNamespace))) + i += copy(dAtA[i:], *m.EndpointsNamespace) + } + return i, nil +} + func (m *GlusterfsVolumeSource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -11946,6 +11994,21 @@ func (m *GitRepoVolumeSource) Size() (n int) { return n } +func (m *GlusterfsPersistentVolumeSource) Size() (n int) { + var l int + _ = l + l = len(m.EndpointsName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + if m.EndpointsNamespace != nil { + l = len(*m.EndpointsNamespace) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *GlusterfsVolumeSource) Size() (n int) { var l int _ = l @@ -15291,6 +15354,19 @@ func (this *GitRepoVolumeSource) String() string { }, "") return s } +func (this *GlusterfsPersistentVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GlusterfsPersistentVolumeSource{`, + `EndpointsName:` + fmt.Sprintf("%v", this.EndpointsName) + `,`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `EndpointsNamespace:` + valueToStringGenerated(this.EndpointsNamespace) + `,`, + `}`, + }, "") + return s +} func (this *GlusterfsVolumeSource) String() string { if this == nil { return "nil" @@ -16006,7 +16082,7 @@ func (this *PersistentVolumeSource) String() string { `GCEPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.GCEPersistentDisk), "GCEPersistentDiskVolumeSource", "GCEPersistentDiskVolumeSource", 1) + `,`, `AWSElasticBlockStore:` + strings.Replace(fmt.Sprintf("%v", this.AWSElasticBlockStore), "AWSElasticBlockStoreVolumeSource", "AWSElasticBlockStoreVolumeSource", 1) + `,`, `HostPath:` + strings.Replace(fmt.Sprintf("%v", this.HostPath), "HostPathVolumeSource", "HostPathVolumeSource", 1) + `,`, - `Glusterfs:` + strings.Replace(fmt.Sprintf("%v", this.Glusterfs), "GlusterfsVolumeSource", "GlusterfsVolumeSource", 1) + `,`, + `Glusterfs:` + strings.Replace(fmt.Sprintf("%v", this.Glusterfs), "GlusterfsPersistentVolumeSource", "GlusterfsPersistentVolumeSource", 1) + `,`, `NFS:` + strings.Replace(fmt.Sprintf("%v", this.NFS), "NFSVolumeSource", "NFSVolumeSource", 1) + `,`, `RBD:` + strings.Replace(fmt.Sprintf("%v", this.RBD), "RBDPersistentVolumeSource", "RBDPersistentVolumeSource", 1) + `,`, `ISCSI:` + strings.Replace(fmt.Sprintf("%v", this.ISCSI), "ISCSIPersistentVolumeSource", "ISCSIPersistentVolumeSource", 1) + `,`, @@ -26700,6 +26776,164 @@ func (m *GitRepoVolumeSource) Unmarshal(dAtA []byte) error { } return nil } +func (m *GlusterfsPersistentVolumeSource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GlusterfsPersistentVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GlusterfsPersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndpointsName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EndpointsName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndpointsNamespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.EndpointsNamespace = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GlusterfsVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -35062,7 +35296,7 @@ func (m *PersistentVolumeSource) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Glusterfs == nil { - m.Glusterfs = &GlusterfsVolumeSource{} + m.Glusterfs = &GlusterfsPersistentVolumeSource{} } if err := m.Glusterfs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -51414,806 +51648,808 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 12807 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x6b, 0x70, 0x24, 0xd7, - 0x75, 0x18, 0xac, 0x9e, 0x19, 0x3c, 0xe6, 0xe0, 0x7d, 0x77, 0x97, 0xc4, 0x82, 0xdc, 0x9d, 0x65, - 0x53, 0x5a, 0x2e, 0x45, 0x12, 0x2b, 0x2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0xba, 0x17, 0x84, 0x3b, 0xae, 0xbf, 0x55, 0x75, 0x43, - 0xb1, 0x25, 0xd4, 0x5d, 0xf8, 0x96, 0x82, 0x60, 0x0d, 0x0b, 0xad, 0xc0, 0x50, 0x3b, 0x08, 0xe3, - 0x68, 0x76, 0x98, 0x0d, 0xf7, 0x13, 0x39, 0x07, 0x11, 0xff, 0xda, 0x7a, 0x10, 0xc6, 0xc9, 0x07, - 0xd0, 0x7f, 0x11, 0xe6, 0xd5, 0xd1, 0x77, 0x40, 0x91, 0xf8, 0x7b, 0xb3, 0x23, 0x8c, 0xca, 0x5c, - 0x16, 0x95, 0x65, 0x7f, 0xef, 0xae, 0x13, 0x26, 0xa7, 0xf4, 0xb2, 0xbf, 0x87, 0x69, 0x1d, 0xf4, - 0x79, 0x28, 0xcb, 0x2d, 0x1e, 0x09, 0x35, 0x47, 0xe6, 0x12, 0x93, 0x07, 0x03, 0x26, 0xef, 0x75, - 0xdc, 0x90, 0xec, 0x12, 0x3f, 0x8e, 0x92, 0x33, 0x4d, 0x42, 0x23, 0x9c, 0x50, 0x43, 0x9f, 0x97, - 0xba, 0xb5, 0xd5, 0xa0, 0xe3, 0xc7, 0xd1, 0x6c, 0x99, 0x75, 0x2f, 0xf3, 0xd5, 0xe3, 0x6e, 0x82, - 0x97, 0x56, 0xbe, 0xf1, 0xca, 0xd8, 0x20, 0x85, 0x30, 0x4c, 0x78, 0xee, 0x1e, 0xf1, 0x49, 0x14, - 0xd5, 0xc3, 0x60, 0x83, 0xcc, 0x02, 0xeb, 0xf9, 0xf9, 0xec, 0xc7, 0x80, 0x60, 0x83, 0x2c, 0xce, - 0x1c, 0x1e, 0x54, 0x26, 0x6e, 0xe9, 0x75, 0xb0, 0x49, 0x02, 0xdd, 0x81, 0x49, 0x2a, 0xd7, 0xb8, - 0x09, 0xd1, 0xb1, 0x7e, 0x44, 0x99, 0xf4, 0x81, 0x8d, 0x4a, 0x38, 0x45, 0x04, 0xbd, 0x01, 0x65, - 0x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0, 0x89, 0x62, 0x2c, 0x49, 0xa0, 0xfb, 0x30, 0x9b, 0x31, 0x23, - 0x7c, 0x02, 0xce, 0xb2, 0x09, 0x78, 0x4d, 0xd4, 0x9d, 0x5d, 0xcf, 0xc1, 0x3b, 0xea, 0x01, 0xc3, - 0xb9, 0xd4, 0xd1, 0x17, 0x60, 0x82, 0x6f, 0x28, 0xfe, 0xf8, 0x16, 0xcd, 0x9e, 0x63, 0x5f, 0x73, - 0x29, 0x7f, 0x73, 0x72, 0xc4, 0xc5, 0x73, 0xa2, 0x43, 0x13, 0x7a, 0x69, 0x84, 0x4d, 0x6a, 0xf6, - 0x06, 0x4c, 0xaa, 0x73, 0x8b, 0x2d, 0x1d, 0x54, 0x81, 0x21, 0xc6, 0xed, 0x08, 0xfd, 0x56, 0x99, - 0xce, 0x14, 0xe3, 0x84, 0x30, 0x2f, 0x67, 0x33, 0xe5, 0xbe, 0x4f, 0x16, 0xf7, 0x63, 0xc2, 0xa5, - 0xea, 0xa2, 0x36, 0x53, 0x12, 0x80, 0x13, 0x1c, 0xfb, 0xff, 0x72, 0xae, 0x31, 0x39, 0x1c, 0x07, - 0xb8, 0x0e, 0x9e, 0x85, 0xd1, 0xed, 0x20, 0x8a, 0x29, 0x36, 0x6b, 0x63, 0x28, 0xe1, 0x13, 0x6f, - 0x88, 0x72, 0xac, 0x30, 0xd0, 0xab, 0x30, 0xd1, 0xd4, 0x1b, 0x10, 0x77, 0x99, 0x1a, 0x02, 0xa3, - 0x75, 0x6c, 0xe2, 0xa2, 0x57, 0x60, 0x94, 0x3d, 0x9d, 0x37, 0x03, 0x4f, 0x30, 0x59, 0xf2, 0x42, - 0x1e, 0xad, 0x8b, 0xf2, 0x23, 0xed, 0x37, 0x56, 0xd8, 0xe8, 0x32, 0x0c, 0xd3, 0x2e, 0xd4, 0xea, - 0xe2, 0x16, 0x51, 0xaa, 0x9a, 0x1b, 0xac, 0x14, 0x0b, 0xa8, 0xfd, 0xd7, 0x0a, 0xda, 0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7e, 0x75, 0xd3, - 0x8a, 0x52, 0x2c, 0x89, 0xcf, 0x7d, 0x06, 0xc6, 0x75, 0xcc, 0x63, 0x59, 0x93, 0xff, 0x85, 0x22, - 0x4c, 0xd3, 0x1e, 0x3c, 0xd4, 0x89, 0xb8, 0xd3, 0x3d, 0x11, 0x27, 0x6d, 0x51, 0xdc, 0x7f, 0x36, - 0xde, 0x49, 0xcf, 0xc6, 0xf3, 0x79, 0xb3, 0x71, 0xda, 0x73, 0xf0, 0xfd, 0x16, 0x9c, 0x59, 0xf1, - 0x82, 0xe6, 0x4e, 0xca, 0xea, 0xf7, 0x25, 0x18, 0xa3, 0xe7, 0x78, 0x64, 0x78, 0x11, 0x19, 0x7e, - 0x65, 0x02, 0x84, 0x75, 0x3c, 0xad, 0xda, 0x9d, 0x3b, 0xb5, 0x6a, 0x96, 0x3b, 0x9a, 0x00, 0x61, - 0x1d, 0xcf, 0xfe, 0x86, 0x05, 0x17, 0xae, 0x2f, 0x2d, 0x27, 0x4b, 0xb1, 0xcb, 0x23, 0x8e, 0x4a, - 0x81, 0x2d, 0xad, 0x2b, 0x89, 0x14, 0x58, 0x65, 0xbd, 0x10, 0xd0, 0x8f, 0x8a, 0xb7, 0xe7, 0xcf, - 0x58, 0x70, 0xe6, 0xba, 0x1b, 0xd3, 0x6b, 0x39, 0xed, 0x9b, 0x45, 0xef, 0xe5, 0xc8, 0x8d, 0x83, - 0x70, 0x3f, 0xed, 0x9b, 0x85, 0x15, 0x04, 0x6b, 0x58, 0xbc, 0xe5, 0x3d, 0x97, 0x99, 0x51, 0x15, - 0x4c, 0x55, 0x14, 0x16, 0xe5, 0x58, 0x61, 0xd0, 0x0f, 0x6b, 0xb9, 0x21, 0x13, 0x25, 0xf6, 0xc5, - 0x09, 0xab, 0x3e, 0xac, 0x2a, 0x01, 0x38, 0xc1, 0xb1, 0x7f, 0xdc, 0x82, 0x73, 0xd7, 0xbd, 0x4e, - 0x14, 0x93, 0x70, 0x33, 0x32, 0x3a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xb7, 0x9d, 0xf6, 0x42, 0x27, 0xde, 0xae, 0xba, 0x51, 0x33, 0xd8, 0x23, 0xe1, 0x3e, - 0x13, 0x9e, 0x47, 0x13, 0x09, 0x4c, 0x01, 0x96, 0x6e, 0x2c, 0xd4, 0x29, 0x26, 0xee, 0xae, 0x63, - 0x72, 0x85, 0x70, 0x12, 0x5c, 0xe1, 0x02, 0x4c, 0xc9, 0x66, 0x1a, 0x24, 0x62, 0x77, 0xc4, 0x18, - 0xeb, 0x98, 0x32, 0xb5, 0x15, 0xc5, 0xaa, 0x5b, 0x69, 0x7c, 0xf4, 0x32, 0x4c, 0xb8, 0xbe, 0x1b, - 0xbb, 0x4e, 0x1c, 0x84, 0xec, 0x86, 0xe5, 0x72, 0x32, 0xb3, 0x64, 0xab, 0xe9, 0x00, 0x6c, 0xe2, - 0xd9, 0xff, 0xb1, 0x04, 0x33, 0x6c, 0xda, 0xbe, 0xbd, 0xc2, 0x3e, 0x32, 0x2b, 0xec, 0x4e, 0xf7, - 0x0a, 0x3b, 0x09, 0x76, 0xf7, 0xc3, 0x5c, 0x66, 0xef, 0x42, 0x59, 0xd9, 0x02, 0x4b, 0x67, 0x00, - 0x2b, 0xc7, 0x19, 0xa0, 0x3f, 0xf7, 0x21, 0x9f, 0x71, 0x8b, 0x99, 0xcf, 0xb8, 0x7f, 0xcb, 0x82, - 0xc4, 0x24, 0x12, 0xdd, 0x80, 0x72, 0x3b, 0x60, 0x66, 0x07, 0xa1, 0xb4, 0xe5, 0x79, 0x2c, 0xf3, - 0xa2, 0xe2, 0x97, 0x22, 0x1f, 0xbf, 0xba, 0xac, 0x81, 0x93, 0xca, 0x68, 0x11, 0x46, 0xda, 0x21, - 0x69, 0xc4, 0xcc, 0x05, 0xb6, 0x2f, 0x1d, 0xbe, 0x46, 0x38, 0x3e, 0x96, 0x15, 0xed, 0x5f, 0xb4, - 0x00, 0xf8, 0x4b, 0xa9, 0xe3, 0x6f, 0x91, 0x53, 0xd0, 0xfe, 0x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 0x66, 0x37, 0x4a, 0x45, 0x73, 0x2b, 0x4d, 0x0c, 0x77, 0xd3, 0x47, 0x7b, - 0x80, 0x98, 0x3d, 0x4e, 0xe8, 0xf8, 0x11, 0xff, 0x16, 0x57, 0xbc, 0x19, 0x1c, 0xaf, 0xd5, 0x39, - 0xd1, 0x2a, 0xba, 0xd5, 0x45, 0x0d, 0x67, 0xb4, 0xa0, 0xd9, 0x59, 0x0d, 0x0d, 0x6a, 0x67, 0x35, - 0xdc, 0xc7, 0xd3, 0xc4, 0x87, 0xe9, 0xae, 0x98, 0x04, 0x6f, 0x43, 0x59, 0xd9, 0xc3, 0x89, 0x43, - 0xa7, 0x77, 0x68, 0x8f, 0x34, 0x05, 0xae, 0x46, 0x49, 0x6c, 0x31, 0x13, 0x72, 0xf6, 0x3f, 0x2a, - 0x18, 0x0d, 0xf2, 0x49, 0x5c, 0x83, 0x51, 0x27, 0x8a, 0xdc, 0x2d, 0x9f, 0xb4, 0xc4, 0x8e, 0xfd, - 0x78, 0xde, 0x8e, 0x35, 0x9a, 0x61, 0x36, 0x89, 0x0b, 0xa2, 0x26, 0x56, 0x34, 0xd0, 0x0d, 0x6e, - 0x30, 0xb4, 0x27, 0x79, 0xfe, 0xc1, 0xa8, 0x81, 0x34, 0x29, 0xda, 0x23, 0x58, 0xd4, 0x47, 0x5f, - 0xe0, 0x16, 0x5d, 0x37, 0xfd, 0xe0, 0x9e, 0x7f, 0x3d, 0x08, 0xa4, 0x17, 0xda, 0x60, 0x04, 0x67, - 0xa4, 0x1d, 0x97, 0xaa, 0x8e, 0x4d, 0x6a, 0x83, 0xc5, 0xed, 0xf9, 0x5e, 0x38, 0x43, 0x49, 0x9b, - 0xbe, 0x24, 0x11, 0x22, 0x30, 0x25, 0xa2, 0x25, 0xc8, 0x32, 0x31, 0x76, 0x99, 0xec, 0xbc, 0x59, - 0x3b, 0x51, 0xfa, 0xdd, 0x34, 0x49, 0xe0, 0x34, 0x4d, 0xfb, 0xa7, 0x2d, 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0x35, 0x29, 0x73, - 0x24, 0xfe, 0xcb, 0xa8, 0xf4, 0xb3, 0x90, 0xdf, 0x3d, 0x33, 0x72, 0x7d, 0x32, 0x9c, 0x77, 0x4d, - 0x12, 0x38, 0x4d, 0x93, 0x32, 0x9a, 0x7c, 0xe7, 0x0a, 0xf3, 0xf6, 0x7e, 0xfb, 0x9f, 0xcb, 0xd7, - 0xec, 0x92, 0xe1, 0x25, 0x58, 0xd4, 0x3f, 0xd5, 0x5b, 0x7f, 0xce, 0x87, 0xe9, 0xf4, 0x16, 0x7d, - 0xa8, 0x5c, 0xc6, 0x1f, 0x96, 0x60, 0xd2, 0x5c, 0x52, 0xe8, 0x2a, 0x94, 0x05, 0x11, 0x15, 0x94, - 0x54, 0xed, 0x92, 0x55, 0x09, 0xc0, 0x09, 0x0e, 0x8b, 0x45, 0xcb, 0xaa, 0x6b, 0x66, 0x89, 0x49, - 0x2c, 0x5a, 0x05, 0xc1, 0x1a, 0x16, 0x95, 0x97, 0x36, 0x82, 0x20, 0x56, 0x97, 0x8a, 0x5a, 0x77, - 0x8b, 0xac, 0x14, 0x0b, 0x28, 0xbd, 0x4c, 0x76, 0x48, 0xe8, 0x13, 0xcf, 0x8c, 0x75, 0xa6, 0x2e, - 0x93, 0x9b, 0x3a, 0x10, 0x9b, 0xb8, 0xf4, 0x96, 0x0c, 0x22, 0xb6, 0x90, 0x85, 0x54, 0x96, 0x98, - 0x79, 0x36, 0xb8, 0xc7, 0xb9, 0x84, 0xa3, 0xcf, 0xc3, 0xa3, 0xca, 0x41, 0x1c, 0x73, 0x45, 0xb5, - 0x6c, 0x71, 0xd8, 0x50, 0xa2, 0x3c, 0xba, 0x94, 0x8d, 0x86, 0xf3, 0xea, 0xa3, 0xd7, 0x61, 0x52, - 0x70, 0xee, 0x92, 0xe2, 0x88, 0x69, 0x3b, 0x71, 0xd3, 0x80, 0xe2, 0x14, 0xb6, 0x8c, 0xd6, 0xc6, - 0x98, 0x67, 0x49, 0x61, 0xb4,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6, 0x83, 0xd8, 0x1e, 0x17, 0x7b, 0xe5, 0x58, 0x17, 0x94, 0x99, 0xd5, 0x94, 0x74, 0xbd, - 0xfb, 0x73, 0x66, 0x82, 0xfc, 0x16, 0x71, 0xb7, 0xb6, 0x63, 0xd2, 0x4a, 0x7f, 0xce, 0xe9, 0x99, - 0x20, 0xff, 0x67, 0x0b, 0xa6, 0x52, 0xad, 0x23, 0x0f, 0x26, 0x3c, 0x5d, 0xff, 0x27, 0xd6, 0xe9, - 0x03, 0xa9, 0x0e, 0x85, 0x09, 0xa7, 0x56, 0x84, 0x4d, 0xe2, 0x68, 0x1e, 0x40, 0xbd, 0xcf, 0x49, - 0xbd, 0x17, 0xe3, 0xfa, 0xd5, 0x03, 0x5e, 0x84, 0x35, 0x0c, 0xf4, 0x12, 0x8c, 0xc5, 0x41, 0x3b, - 0xf0, 0x82, 0xad, 0xfd, 0x9b, 0x44, 0xc6, 0x77, 0x51, 0x86, 0x59, 0xeb, 0x09, 0x08, 0xeb, 0x78, - 0xf6, 0xcf, 0x14, 0x21, 0x9d, 0x84, 0xff, 0xdb, 0x6b, 0xf2, 0xa3, 0xb9, 0x26, 0xbf, 0x69, 0xc1, - 0x34, 0x6d, 0x9d, 0x19, 0x89, 0xc8, 0xcb, 0x56, 0xe5, 0xa0, 0xb1, 0x7a, 0xe4, 0xa0, 0xb9, 0x4c, - 0xcf, 0xae, 0x56, 0xd0, 0x89, 0x85, 0xde, 0x4c, 0x3b, 0x9c, 0x68, 0x29, 0x16, 0x50, 0x81, 0x47, - 0xc2, 0x50, 0x78, 0x3e, 0xe9, 0x78, 0x24, 0x0c, 0xb1, 0x80, 0xca, 0x14, 0x35, 0xa5, 0x9c, 0x14, - 0x35, 0x2c, 0x5a, 0x9d, 0x30, 0x27, 0x10, 0x6c, 0x8f, 0x16, 0xad, 0x4e, 0xda, 0x19, 0x24, 0x38, - 0xf6, 0x2f, 0x14, 0x61, 0xbc, 0x1e, 0xb4, 0x92, 0x17, 0xb2,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fa, 0xfd, 0x50, 0x67, - 0xfd, 0xc7, 0x2c, 0x48, 0x99, 0x59, 0x2a, 0x75, 0x97, 0x95, 0xab, 0xee, 0xba, 0x04, 0xa5, 0x30, - 0xf0, 0x48, 0x3a, 0x13, 0x0d, 0x0e, 0x3c, 0x82, 0x19, 0x84, 0x62, 0xc4, 0x89, 0xb2, 0x63, 0x5c, - 0x17, 0xe4, 0x84, 0x88, 0xf6, 0x24, 0x0c, 0x79, 0x64, 0x8f, 0x78, 0xe9, 0x30, 0xef, 0xb7, 0x68, - 0x21, 0xe6, 0x30, 0xfb, 0x97, 0x4a, 0x70, 0xa1, 0xa7, 0x2b, 0x36, 0x15, 0x87, 0xb6, 0x9c, 0x98, - 0xdc, 0x73, 0xf6, 0xd3, 0xf1, 0x98, 0xaf, 0xf3, 0x62, 0x2c, 0xe1, 0xcc, 0xf2, 0x9c, 0xc7, 0x5f, - 0x4c, 0x29, 0x07, 0x45, 0xd8, 0x45, 0x01, 0x7d, 0x08, 0x49, 0xee, 0xaf, 0x01, 0x44, 0x91, 0xc7, - 0xed, 0x06, 0x5a, 0xc2, 0xa4, 0x3d, 0x89, 0xd3, 0xd9, 0xb8, 0x25, 0x20, 0x58, 0xc3, 0x42, 0x55, - 0x98, 0x6e, 0x87, 0x41, 0xcc, 0x75, 0xad, 0x55, 0x6e, 0x70, 0x34, 0x64, 0x7a, 0xc1, 0xd6, 0x53, - 0x70, 0xdc, 0x55, 0x03, 0xbd, 0x04, 0x63, 0xc2, 0x33, 0xb6, 0x1e, 0x04, 0x9e, 0x50, 0x03, 0x29, - 0xf3, 0x95, 0x46, 0x02, 0xc2, 0x3a, 0x9e, 0x56, 0x8d, 0x29, 0x70, 0x47, 0x32, 0xab, 0x71, 0x25, - 0xae, 0x86, 0x97, 0x8a, 0x67, 0x35, 0x3a, 0x50, 0x3c, 0xab, 0x44, 0x31, 0x56, 0x1e, 0xf8, 0xcd, - 0x0a, 0xfa, 0xaa, 0x92, 0x7e, 0xbe, 0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 0x15, - 0xdc, 0xf3, 0xef, 0x39, 0x61, 0x6b, 0xa1, 0x5e, 0x13, 0xeb, 0x32, 0x93, 0x67, 0xae, 0x26, 0x68, - 0xba, 0x73, 0x22, 0x7b, 0x5c, 0x48, 0x40, 0x58, 0x27, 0x87, 0xd6, 0x59, 0xac, 0xc4, 0x4d, 0x77, - 0x6b, 0xd5, 0x69, 0xf7, 0xb2, 0xab, 0x5d, 0x92, 0x48, 0x1a, 0xe5, 0x09, 0x11, 0x50, 0x91, 0x03, - 0x70, 0x42, 0x08, 0x7d, 0x2f, 0x9c, 0x89, 0x72, 0xd4, 0x6c, 0x79, 0x69, 0x26, 0x7a, 0x69, 0x9e, - 0x16, 0x1f, 0xa5, 0xd2, 0x4c, 0x96, 0x42, 0x2e, 0xab, 0x19, 0xfb, 0xcb, 0x67, 0xc0, 0xd8, 0x8d, - 0x46, 0xae, 0x21, 0xeb, 0x84, 0x72, 0x0d, 0x61, 0x18, 0x25, 0xbb, 0xed, 0x78, 0xbf, 0xea, 0x86, - 0xbd, 0x72, 0xe1, 0x2d, 0x0b, 0x9c, 0x6e, 0x9a, 0x12, 0x82, 0x15, 0x9d, 0xec, 0x84, 0x50, 0xc5, - 0x0f, 0x31, 0x21, 0x54, 0xe9, 0x14, 0x13, 0x42, 0xad, 0xc1, 0xc8, 0x96, 0x1b, 0x63, 0xd2, 0x0e, - 0x04, 0x9b, 0x99, 0xb9, 0x0e, 0xaf, 0x73, 0x94, 0xee, 0x24, 0x24, 0x02, 0x80, 0x25, 0x11, 0xf4, - 0x86, 0xda, 0x81, 0xc3, 0xf9, 0x52, 0x5a, 0xf7, 0xcb, 0x60, 0xe6, 0x1e, 0x14, 0x09, 0xa0, 0x46, - 0x1e, 0x34, 0x01, 0xd4, 0x8a, 0x4c, 0xdb, 0x34, 0x9a, 0x6f, 0x04, 0xcf, 0xb2, 0x32, 0xf5, 0x49, - 0xd6, 0x64, 0x24, 0xb8, 0x2a, 0x9f, 0x5c, 0x82, 0xab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x44, 0x98, 0x55, 0xe7, 0x00, 0x00, + // 12835 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x70, 0x64, 0x57, + 0x56, 0xd8, 0xbe, 0xee, 0xd6, 0x47, 0x1f, 0x7d, 0xdf, 0x99, 0xb1, 0x35, 0xb2, 0x67, 0x7a, 0xfc, + 0xbc, 0x3b, 0x1e, 0xaf, 0x6d, 0xcd, 0x7a, 0x6c, 0xaf, 0xcd, 0xda, 0x6b, 0x90, 0xd4, 0xd2, 0x4c, + 0x7b, 0x46, 0x9a, 0xf6, 0x6d, 0xcd, 0x78, 0xd7, 0x78, 0x97, 0x7d, 0xea, 0xbe, 0x92, 0x9e, 0xf5, + 0xf4, 0x5e, 0xfb, 0xbd, 0xd7, 0x9a, 0x91, 0x03, 0x55, 0xc9, 0x12, 0x48, 0x36, 0x50, 0xa9, 0xad, + 0xb0, 0x95, 0x0f, 0xa0, 0x48, 0x15, 0x21, 0x05, 0x84, 0x24, 0x15, 0x02, 0x01, 0xc2, 0x42, 0x42, + 0x20, 0x3f, 0xc8, 0x9f, 0x0d, 0x49, 0x55, 0x6a, 0xa9, 0xa2, 0xa2, 0x80, 0x48, 0x25, 0xc5, 0x8f, + 0x40, 0x2a, 0xe4, 0x47, 0x50, 0xa8, 0x90, 0xba, 0x9f, 0xef, 0xde, 0xd7, 0xef, 0x75, 0xb7, 0xc6, + 0x1a, 0xd9, 0x50, 0xfb, 0xaf, 0xfb, 0x9e, 0x73, 0xcf, 0xbd, 0xef, 0x7e, 0x9e, 0x73, 0xee, 0xf9, + 0x80, 0x57, 0x77, 0x5e, 0x89, 0xe6, 0xdd, 0xe0, 0xea, 0x4e, 0x67, 0x83, 0x84, 0x3e, 0x89, 0x49, + 0x74, 0x75, 0x8f, 0xf8, 0xad, 0x20, 0xbc, 0x2a, 0x00, 0x4e, 0xdb, 0xbd, 0xda, 0x0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, 0x3f, 0x6e, 0xd3, 0x13, 0x74, 0x86, 0x21, 0x26, 0xfa, 0x73, 0x09, 0xc0, 0x09, 0x0e, 0x65, + 0x6a, 0xe2, 0x78, 0x7f, 0x16, 0x31, 0x54, 0xb5, 0x5d, 0xd6, 0xd7, 0x3f, 0x8f, 0x69, 0x39, 0xba, + 0x05, 0x23, 0xc4, 0xdf, 0x5b, 0x09, 0x83, 0xdd, 0xd9, 0x33, 0xf9, 0x7b, 0x76, 0x99, 0xa3, 0xf0, + 0x03, 0x3d, 0x11, 0xf0, 0x44, 0x31, 0x96, 0x24, 0xd0, 0x7d, 0x98, 0xcd, 0x98, 0x11, 0x3e, 0x01, + 0x67, 0xd9, 0x04, 0xbc, 0x26, 0xea, 0xce, 0xae, 0xe7, 0xe0, 0x1d, 0xf5, 0x80, 0xe1, 0x5c, 0xea, + 0xe8, 0x0b, 0x30, 0xc1, 0x37, 0x14, 0x7f, 0x7c, 0x8b, 0x66, 0xcf, 0xb1, 0xaf, 0xb9, 0x94, 0xbf, + 0x39, 0x39, 0xe2, 0xe2, 0x39, 0xd1, 0xa1, 0x09, 0xbd, 0x34, 0xc2, 0x26, 0x35, 0x7b, 0x03, 0x26, + 0xd5, 0xb9, 0xc5, 0x96, 0x0e, 0xaa, 0xc0, 0x10, 0xe3, 0x76, 0x84, 0x7e, 0xab, 0x4c, 0x67, 0x8a, + 0x71, 0x42, 0x98, 0x97, 0xb3, 0x99, 0x72, 0xdf, 0x27, 0x8b, 0xfb, 0x31, 0xe1, 0x52, 0x75, 0x51, + 0x9b, 0x29, 0x09, 0xc0, 0x09, 0x8e, 0xfd, 0xff, 0x38, 0xd7, 0x98, 0x1c, 0x8e, 0x03, 0x5c, 0x07, + 0xcf, 0xc2, 0xe8, 0x76, 0x10, 0xc5, 0x14, 0x9b, 0xb5, 0x31, 0x94, 0xf0, 0x89, 0x37, 0x44, 0x39, + 0x56, 0x18, 0xe8, 0x55, 0x98, 0x68, 0xea, 0x0d, 0x88, 0xb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0x66, 0xc2, 0xca, 0x0f, 0xf7, 0x60, 0xe5, 0x9f, 0x86, + 0x11, 0xf6, 0x43, 0xad, 0x00, 0x35, 0x1b, 0x35, 0x5e, 0x8c, 0x25, 0x3c, 0xbd, 0x60, 0x46, 0x07, + 0x5c, 0x30, 0x9f, 0x84, 0xc9, 0xaa, 0x43, 0x76, 0x03, 0x7f, 0xd9, 0x6f, 0xb5, 0x03, 0xd7, 0x8f, + 0xd1, 0x2c, 0x94, 0xd8, 0xed, 0xc0, 0xf7, 0x76, 0x89, 0x52, 0xc0, 0x25, 0xca, 0x98, 0xdb, 0x5b, + 0x70, 0xae, 0x1a, 0xdc, 0xf3, 0xef, 0x39, 0x61, 0x6b, 0xa1, 0x5e, 0xd3, 0xe4, 0xdc, 0x35, 0x29, + 0x67, 0x71, 0x23, 0x96, 0xcc, 0x33, 0x55, 0xab, 0xc9, 0xef, 0xda, 0x15, 0xd7, 0x23, 0x39, 0xda, + 0x88, 0xbf, 0x53, 0x30, 0x5a, 0x4a, 0xf0, 0xd5, 0x83, 0x91, 0x95, 0xfb, 0x60, 0xf4, 0x26, 0x8c, + 0x6e, 0xba, 0xc4, 0x6b, 0x61, 0xb2, 0x29, 0x96, 0xd8, 0x53, 0xf9, 0xef, 0xf2, 0x2b, 0x14, 0x53, + 0x6a, 0x9f, 0xb8, 0x94, 0xb6, 0x22, 0x2a, 0x63, 0x45, 0x06, 0xed, 0xc0, 0xb4, 0x14, 0x03, 0x24, + 0x54, 0x2c, 0xb8, 0xa7, 0x7b, 0xc9, 0x16, 0x26, 0xf1, 0xb3, 0x87, 0x07, 0x95, 0x69, 0x9c, 0x22, + 0x83, 0xbb, 0x08, 0x53, 0xb1, 0x6c, 0x97, 0x1e, 0xad, 0x25, 0x36, 0xfc, 0x4c, 0x2c, 0x63, 0x12, + 0x26, 0x2b, 0xb5, 0x7f, 0xd4, 0x82, 0x47, 0xbb, 0x46, 0x46, 0x48, 0xda, 0x27, 0x3c, 0x0b, 0x69, + 0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, 0x41, 0x85, 0x9c, 0xa4, 0xa9, 0x91, 0x63, 0x37, 0xa5, 0x54, 0x46, 0xb7, 0x74, 0x42, + 0xd8, 0xa4, 0x4b, 0x0f, 0x93, 0x26, 0x13, 0x8a, 0x46, 0x19, 0x47, 0xa1, 0x0e, 0x13, 0x2e, 0x0d, + 0x71, 0x18, 0x3d, 0x93, 0x98, 0xd9, 0x4a, 0xd9, 0x3c, 0x93, 0x34, 0xe3, 0x94, 0x2f, 0x41, 0x99, + 0xd0, 0x21, 0xa4, 0x84, 0x85, 0x62, 0xfc, 0xea, 0x60, 0x7d, 0x5d, 0x75, 0x9b, 0x61, 0x60, 0xca, + 0xf2, 0xcb, 0x92, 0x12, 0x4e, 0x88, 0xa2, 0x25, 0x18, 0x8e, 0x48, 0xe8, 0x92, 0x48, 0xa8, 0xc8, + 0x7b, 0x4c, 0x23, 0x43, 0xe3, 0xb6, 0xe7, 0xfc, 0x37, 0x16, 0x55, 0xe9, 0xf2, 0x72, 0x98, 0x34, + 0xc4, 0xb4, 0xe2, 0xda, 0xf2, 0x5a, 0x60, 0xa5, 0x58, 0x40, 0xd1, 0x1b, 0x30, 0x12, 0x12, 0x8f, + 0x29, 0x8b, 0x26, 0x06, 0x5f, 0xe4, 0x5c, 0xf7, 0xc4, 0xeb, 0x61, 0x49, 0x00, 0xdd, 0x04, 0x14, + 0x12, 0xca, 0x43, 0xb8, 0xfe, 0x96, 0x32, 0xe6, 0x10, 0xba, 0xee, 0xc7, 0x44, 0xfb, 0x67, 0x70, + 0x82, 0x21, 0xad, 0x52, 0x71, 0x46, 0x35, 0x74, 0x1d, 0x66, 0x54, 0x69, 0xcd, 0x8f, 0x62, 0xc7, + 0x6f, 0x12, 0xa6, 0xe6, 0x2e, 0x27, 0x5c, 0x11, 0x4e, 0x23, 0xe0, 0xee, 0x3a, 0xf6, 0x4f, 0x53, + 0x76, 0x86, 0x8e, 0xd6, 0x29, 0xf0, 0x02, 0xaf, 0x9b, 0xbc, 0xc0, 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x37, 0xa0, 0x18, 0x6e, 0xb4, 0x84, 0x06, 0x2f, 0xf3, 0x0c, 0xc7, 0x8b, + 0xd5, 0x9c, 0x5e, 0x31, 0x4a, 0x78, 0xb1, 0x8a, 0x29, 0x09, 0x54, 0x87, 0x21, 0xe6, 0xe0, 0x20, + 0xee, 0x83, 0x4c, 0xce, 0xb7, 0x87, 0xa3, 0x10, 0x77, 0x19, 0x67, 0x08, 0x98, 0x13, 0x42, 0xeb, + 0x30, 0xdc, 0x64, 0xf9, 0x70, 0x44, 0xc0, 0xea, 0x4f, 0x65, 0xea, 0xea, 0x7a, 0x24, 0x0a, 0x12, + 0xaa, 0x2b, 0x86, 0x81, 0x05, 0x2d, 0x46, 0x95, 0xb4, 0xb7, 0x37, 0x23, 0x26, 0xeb, 0xe7, 0x51, + 0xed, 0x91, 0xff, 0x4a, 0x50, 0x65, 0x18, 0x58, 0xd0, 0x42, 0x9f, 0x81, 0xc2, 0x66, 0x53, 0xf8, + 0x3f, 0x64, 0x2a, 0xed, 0x4c, 0x87, 0xfe, 0xc5, 0xe1, 0xc3, 0x83, 0x4a, 0x61, 0x65, 0x09, 0x17, + 0x36, 0x9b, 0x68, 0x0d, 0x46, 0x36, 0xb9, 0x0b, 0xb0, 0xd0, 0xcb, 0x3d, 0x95, 0xed, 0x9d, 0xdc, + 0xe5, 0x25, 0xcc, 0xed, 0xf6, 0x05, 0x00, 0x4b, 0x22, 0x2c, 0x04, 0xa7, 0x72, 0x65, 0x16, 0xb1, + 0xa8, 0xe7, 0x8f, 0xe7, 0x7e, 0xce, 0xef, 0xe7, 0xc4, 0x21, 0x1a, 0x6b, 0x14, 0xe9, 0xaa, 0x76, + 0x64, 0xe6, 0x43, 0x11, 0xab, 0x23, 0x73, 0x55, 0xf7, 0x49, 0x0a, 0xc9, 0x57, 0xb5, 0x42, 0xc2, + 0x09, 0x51, 0xb4, 0x03, 0x13, 0x7b, 0x51, 0x7b, 0x9b, 0xc8, 0x2d, 0xcd, 0x42, 0x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47, 0x7b, 0x4d, 0x7e, 0xd3, 0x82, 0x69, 0xda, 0x3a, 0x33, 0x17, 0x91, 0x97, 0xad, 0x4a, + 0xbf, 0x63, 0xf5, 0x48, 0xbf, 0x73, 0x99, 0x9e, 0x5d, 0xad, 0xa0, 0x13, 0x0b, 0x0d, 0x9a, 0x76, + 0x38, 0xd1, 0x52, 0x2c, 0xa0, 0x02, 0x8f, 0x84, 0xa1, 0xf0, 0x81, 0xd2, 0xf1, 0x48, 0x18, 0x62, + 0x01, 0x95, 0xd9, 0x79, 0x4a, 0x39, 0xd9, 0x79, 0x58, 0xa0, 0x3e, 0x61, 0x58, 0x20, 0xd8, 0x1e, + 0x2d, 0x50, 0x9f, 0xb4, 0x38, 0x48, 0x70, 0xec, 0x9f, 0x2b, 0xc2, 0x78, 0x3d, 0x68, 0x25, 0x6f, + 0x65, 0x2f, 0x1a, 0x6f, 0x65, 0x97, 0x52, 0x6f, 0x65, 0xd3, 0x3a, 0xee, 0xb7, 0x5e, 0xc6, 0x3e, + 0xac, 0x97, 0xb1, 0x7f, 0x65, 0xb1, 0x59, 0xab, 0xae, 0x35, 0x44, 0x76, 0xe0, 0xe7, 0x61, 0x8c, + 0x1d, 0x48, 0xcc, 0xe9, 0x4e, 0x3e, 0x20, 0xb1, 0xc0, 0xfb, 0x6b, 0x49, 0x31, 0xd6, 0x71, 0xd0, + 0x15, 0x18, 0x8d, 0x88, 0x13, 0x36, 0xb7, 0xd5, 0x19, 0x27, 0x9e, 0x57, 0x78, 0x19, 0x56, 0x50, + 0xf4, 0x66, 0x12, 0x23, 0xae, 0x98, 0x9f, 0xe7, 0x56, 0xef, 0x0f, 0xdf, 0x22, 0xf9, 0x81, 0xe1, + 0xec, 0xb7, 0x00, 0x75, 0xe3, 0x0f, 0x10, 0x1c, 0xa9, 0x62, 0x06, 0x47, 0x2a, 0x77, 0x05, 0x46, + 0xfa, 0x53, 0x0b, 0x26, 0xeb, 0x41, 0x8b, 0x6e, 0xdd, 0xbf, 0x48, 0xfb, 0x54, 0x0f, 0x90, 0x39, + 0xdc, 0x23, 0x40, 0xe6, 0x3f, 0xb4, 0x60, 0xa4, 0x1e, 0xb4, 0x4e, 0x41, 0xef, 0xfe, 0x9a, 0xa9, + 0x77, 0x7f, 0x34, 0x67, 0x49, 0xe4, 0xa8, 0xda, 0x7f, 0xa1, 0x08, 0x13, 0xb4, 0x9f, 0xc1, 0x96, + 0x9c, 0x25, 0x63, 0x44, 0xac, 0x01, 0x46, 0x84, 0xb2, 0xb9, 0x81, 0xe7, 0x05, 0xf7, 0xd2, 0x33, + 0xb6, 0xc2, 0x4a, 0xb1, 0x80, 0xa2, 0x67, 0x61, 0xb4, 0x1d, 0x92, 0x3d, 0x37, 0x10, 0xfc, 0xa3, + 0xf6, 0x8a, 0x51, 0x17, 0xe5, 0x58, 0x61, 0x50, 0xb9, 0x2b, 0x72, 0xfd, 0x26, 0x91, 0x49, 0xb6, + 0x4b, 0x2c, 0x0f, 0x17, 0x8f, 0x7c, 0xad, 0x95, 0x63, 0x03, 0x0b, 0xbd, 0x05, 0x65, 0xf6, 0x9f, + 0x9d, 0x28, 0xc7, 0xcf, 0x1b, 0x24, 0xd2, 0x4d, 0x08, 0x02, 0x38, 0xa1, 0x85, 0xae, 0x01, 0xc4, + 0x32, 0x3a, 0x72, 0x24, 0x62, 0xdc, 0x28, 0x5e, 0x5b, 0xc5, 0x4d, 0x8e, 0xb0, 0x86, 0x85, 0x9e, + 0x81, 0x72, 0xec, 0xb8, 0xde, 0x2d, 0xd7, 0x27, 0x11, 0x53, 0x39, 0x17, 0x65, 0x36, 0x09, 0x51, + 0x88, 0x13, 0x38, 0xe5, 0x75, 0x98, 0x03, 0x38, 0xcf, 0x3a, 0x36, 0xca, 0xb0, 0x19, 0xaf, 0x73, + 0x4b, 0x95, 0x62, 0x0d, 0xc3, 0x7e, 0x05, 0xce, 0xd5, 0x83, 0x56, 0x3d, 0x08, 0xe3, 0x95, 0x20, + 0xbc, 0xe7, 0x84, 0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, 0x68, 0x47, 0x15, 0x2f, 0xc7, 0x0a, 0x83, 0xee, 0x07, + 0x7e, 0x18, 0xa6, 0x0f, 0x40, 0x61, 0x67, 0x26, 0xa0, 0xc7, 0xcc, 0x4e, 0x73, 0x09, 0x4a, 0x9d, + 0x88, 0xc8, 0xd0, 0x54, 0xea, 0xfc, 0x66, 0x1a, 0x66, 0x06, 0xa1, 0xac, 0xe9, 0x96, 0x52, 0xee, + 0x6a, 0xac, 0x29, 0xd7, 0xd8, 0x72, 0x98, 0xfd, 0xd5, 0x22, 0x9c, 0xcf, 0xb5, 0x78, 0xa7, 0x5d, + 0xda, 0x0d, 0x7c, 0x37, 0x0e, 0xd4, 0xeb, 0x23, 0x0f, 0x8e, 0x42, 0xda, 0xdb, 0xab, 0xa2, 0x1c, + 0x2b, 0x0c, 0x74, 0x59, 0x66, 0xb2, 0x4f, 0x67, 0x0d, 0x5a, 0xac, 0x1a, 0xc9, 0xec, 0x07, 0xcd, + 0xc8, 0xf6, 0x24, 0x94, 0xda, 0x41, 0xe0, 0xa5, 0x0f, 0x23, 0xda, 0xdd, 0x20, 0xf0, 0x30, 0x03, + 0xa2, 0x4f, 0x88, 0x71, 0x48, 0x3d, 0xb7, 0x61, 0xa7, 0x15, 0x44, 0xda, 0x60, 0x3c, 0x0d, 0x23, + 0x3b, 0x64, 0x3f, 0x74, 0xfd, 0xad, 0xf4, 0x33, 0xec, 0x4d, 0x5e, 0x8c, 0x25, 0xdc, 0xcc, 0x21, + 0x31, 0x72, 0xd2, 0xa9, 0xd4, 0x46, 0xfb, 0x5e, 0x6d, 0x3f, 0x50, 0x84, 0x29, 0xbc, 0x58, 0xfd, + 0xd6, 0x44, 0xdc, 0xe9, 0x9e, 0x88, 0x93, 0x4e, 0xa5, 0xd6, 0x7f, 0x36, 0x7e, 0xc1, 0x82, 0x29, + 0x16, 0x67, 0x59, 0x84, 0xe4, 0x70, 0x03, 0xff, 0x14, 0x58, 0xb7, 0x27, 0x61, 0x28, 0xa4,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83, 0xbe, 0x3b, 0x95, 0x24, 0xe7, 0xc5, 0x41, 0xe3, 0xe0, 0xf0, 0xcc, 0x39, 0x22, 0xc7, 0xf5, + 0xbc, 0x99, 0x36, 0xa7, 0xef, 0x30, 0x8b, 0x36, 0x99, 0x23, 0x69, 0xc8, 0x93, 0x1b, 0xc9, 0xe3, + 0xe3, 0xd3, 0x03, 0x77, 0x40, 0x64, 0x45, 0x8a, 0x52, 0x8e, 0xa4, 0xb2, 0xb8, 0xbf, 0x23, 0xa9, + 0x6c, 0x79, 0xce, 0x85, 0x31, 0xed, 0x6b, 0x1e, 0xea, 0x8c, 0xef, 0xd0, 0xdb, 0x4a, 0xeb, 0xf7, + 0x43, 0x9d, 0xf5, 0x1f, 0xb1, 0x20, 0x65, 0x66, 0xa9, 0xd4, 0x5d, 0x56, 0xae, 0xba, 0xeb, 0x12, + 0x94, 0xc2, 0xc0, 0x23, 0xe9, 0x9c, 0x34, 0x38, 0xf0, 0x08, 0x66, 0x10, 0x8a, 0x11, 0x27, 0xca, + 0x8e, 0x71, 0x5d, 0x90, 0x13, 0x22, 0xda, 0x93, 0x30, 0xe4, 0x91, 0x3d, 0xe2, 0xa5, 0x03, 0xbe, + 0xdf, 0xa2, 0x85, 0x98, 0xc3, 0xec, 0x5f, 0x28, 0xc1, 0x85, 0x9e, 0xae, 0xd8, 0x54, 0x1c, 0xda, + 0x72, 0x62, 0x72, 0xcf, 0xd9, 0x4f, 0x47, 0x66, 0xbe, 0xce, 0x8b, 0xb1, 0x84, 0x33, 0xcb, 0x73, + 0x1e, 0x89, 0x31, 0xa5, 0x1c, 0x14, 0x01, 0x18, 0x05, 0xf4, 0x21, 0xe4, 0xf7, 0xbf, 0x06, 0x10, + 0x45, 0x1e, 0xb7, 0x1b, 0x68, 0x09, 0x93, 0xf6, 0x24, 0x62, 0x67, 0xe3, 0x96, 0x80, 0x60, 0x0d, + 0x0b, 0x55, 0x61, 0xba, 0x1d, 0x06, 0x31, 0xd7, 0xb5, 0x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7, 0xad, + 0xd9, 0x84, 0xa9, 0xb6, 0x59, 0xb5, 0x4f, 0x78, 0x2b, 0x23, 0xbd, 0x85, 0xea, 0x6b, 0x0a, 0x80, + 0xd3, 0x44, 0x17, 0xaf, 0xfc, 0xe6, 0xef, 0x5d, 0xfc, 0xd8, 0x6f, 0xfd, 0xde, 0xc5, 0x8f, 0xfd, + 0xf6, 0xef, 0x5d, 0xfc, 0xd8, 0x5f, 0x3e, 0xbc, 0x68, 0xfd, 0xe6, 0xe1, 0x45, 0xeb, 0xb7, 0x0e, + 0x2f, 0x5a, 0xbf, 0x7d, 0x78, 0xd1, 0xfa, 0xdd, 0xc3, 0x8b, 0xd6, 0x57, 0x7f, 0xff, 0xe2, 0xc7, + 0xde, 0x2e, 0xec, 0x3d, 0xff, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x84, 0x97, 0x9c, 0xb4, 0x50, + 0xe8, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index fa32f76f..165aa2a2 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -31,7 +31,7 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; option go_package = "v1"; // Represents a Persistent Disk resource in AWS. -// +// // An AWS EBS disk must exist before mounting to a container. The disk // must also be in the same AWS zone as the kubelet. An AWS EBS disk // can only be mounted as read/write once. AWS EBS volumes support @@ -436,7 +436,7 @@ message ConfigMap { // ConfigMapEnvSource selects a ConfigMap to populate the environment // variables with. -// +// // The contents of the target ConfigMap's Data field will represent the // key-value pairs as environment variables. message ConfigMapEnvSource { @@ -497,7 +497,7 @@ message ConfigMapNodeConfigSource { } // Adapts a ConfigMap into a projected volume. -// +// // The contents of the target ConfigMap's Data field will be presented in a // projected volume as files using the keys in the Data field as the file names, // unless the items element is populated with specific mappings of keys to paths. @@ -522,7 +522,7 @@ message ConfigMapProjection { } // Adapts a ConfigMap into a volume. -// +// // The contents of the target ConfigMap's Data field will be presented in a // volume as files using the keys in the Data field as the file names, unless // the items element is populated with specific mappings of keys to paths. @@ -606,6 +606,9 @@ message Container { // +optional // +patchMergeKey=containerPort // +patchStrategy=merge + // +listType=map + // +listMapKey=containerPort + // +listMapKey=protocol repeated ContainerPort ports = 6; // List of sources to populate environment variables in the container. @@ -638,7 +641,7 @@ message Container { repeated VolumeMount volumeMounts = 9; // volumeDevices is the list of block devices to be used by the container. - // This is an alpha feature and may change in the future. + // This is a beta feature. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional @@ -1314,7 +1317,7 @@ message FlockerVolumeSource { } // Represents a Persistent Disk resource in Google Compute Engine. -// +// // A GCE PD must exist before mounting to a container. The disk must // also be in the same GCE project and zone as the kubelet. A GCE PD // can only be mounted as read/write once or read-only many times. GCE @@ -1350,7 +1353,7 @@ message GCEPersistentDiskVolumeSource { // Represents a volume that is populated with the contents of a git repository. // Git repo volumes do not support ownership management. // Git repo volumes support SELinux relabeling. -// +// // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. @@ -1370,6 +1373,30 @@ message GitRepoVolumeSource { optional string directory = 3; } +// Represents a Glusterfs mount that lasts the lifetime of a pod. +// Glusterfs volumes do not support ownership management or SELinux relabeling. +message GlusterfsPersistentVolumeSource { + // EndpointsName is the endpoint name that details Glusterfs topology. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + optional string endpoints = 1; + + // Path is the Glusterfs volume path. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + optional string path = 2; + + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // Defaults to false. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + // +optional + optional bool readOnly = 3; + + // EndpointsNamespace is the namespace that contains Glusterfs endpoint. + // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + // +optional + optional string endpointsNamespace = 4; +} + // Represents a Glusterfs mount that lasts the lifetime of a pod. // Glusterfs volumes do not support ownership management or SELinux relabeling. message GlusterfsVolumeSource { @@ -2293,7 +2320,7 @@ message PersistentVolumeClaimSpec { // volumeMode defines what type of volume is required by the claim. // Value of Filesystem is implied when not included in claim spec. - // This is an alpha feature and may change in the future. + // This is a beta feature. // +optional optional string volumeMode = 6; @@ -2386,7 +2413,7 @@ message PersistentVolumeSource { // exposed to the pod. Provisioned by an admin. // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md // +optional - optional GlusterfsVolumeSource glusterfs = 4; + optional GlusterfsPersistentVolumeSource glusterfs = 4; // NFS represents an NFS mount on the host. Provisioned by an admin. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs @@ -2509,7 +2536,7 @@ message PersistentVolumeSpec { // volumeMode defines if a volume is intended to be used with a formatted filesystem // or to remain in raw block state. Value of Filesystem is implied when not included in spec. - // This is an alpha feature and may change in the future. + // This is a beta feature. // +optional optional string volumeMode = 8; @@ -2899,11 +2926,11 @@ message PodSecurityContext { // A special supplemental group that applies to all containers in a pod. // Some volume types allow the Kubelet to change the ownership of that volume // to be owned by the pod: - // + // // 1. The owning GID will be the FSGroup // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) // 3. The permission bits are OR'd with rw-rw---- - // + // // If unset, the Kubelet will not modify the ownership and permissions of any volume. // +optional optional int64 fsGroup = 5; @@ -3141,7 +3168,7 @@ message PodStatus { // The conditions array, the reason and message fields, and the individual container status // arrays contain more detail about the pod's status. // There are five possible phase values: - // + // // Pending: The pod has been accepted by the Kubernetes system, but one or more of the // container images has not been created. This includes time before being scheduled as // well as time spent downloading images over the network, which could take a while. @@ -3153,7 +3180,7 @@ message PodStatus { // by the system. // Unknown: For some reason the state of the pod could not be obtained, typically due to an // error in communicating with the host of the pod. - // + // // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase // +optional optional string phase = 1; @@ -3884,7 +3911,7 @@ message Secret { // SecretEnvSource selects a Secret to populate the environment // variables with. -// +// // The contents of the target Secret's Data field will represent the // key-value pairs as environment variables. message SecretEnvSource { @@ -3922,7 +3949,7 @@ message SecretList { } // Adapts a secret into a projected volume. -// +// // The contents of the target Secret's Data field will be presented in a // projected volume as files using the keys in the Data field as the file names. // Note that this is identical to a secret volume source without the default @@ -3958,7 +3985,7 @@ message SecretReference { } // Adapts a Secret into a volume. -// +// // The contents of the target Secret's Data field will be presented in a volume // as files using the keys in the Data field as the file names. // Secret volumes support ownership management and SELinux relabeling. diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index 475e9d01..43e70b9b 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -191,7 +191,7 @@ type PersistentVolumeSource struct { // exposed to the pod. Provisioned by an admin. // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md // +optional - Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"` + Glusterfs *GlusterfsPersistentVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"` // NFS represents an NFS mount on the host. Provisioned by an admin. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional @@ -326,7 +326,7 @@ type PersistentVolumeSpec struct { MountOptions []string `json:"mountOptions,omitempty" protobuf:"bytes,7,opt,name=mountOptions"` // volumeMode defines if a volume is intended to be used with a formatted filesystem // or to remain in raw block state. Value of Filesystem is implied when not included in spec. - // This is an alpha feature and may change in the future. + // This is a beta feature. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"` // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. @@ -455,7 +455,7 @@ type PersistentVolumeClaimSpec struct { StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` // volumeMode defines what type of volume is required by the claim. // Value of Filesystem is implied when not included in claim spec. - // This is an alpha feature and may change in the future. + // This is a beta feature. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` // This field requires the VolumeSnapshotDataSource alpha feature gate to be @@ -636,6 +636,30 @@ type GlusterfsVolumeSource struct { ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` } +// Represents a Glusterfs mount that lasts the lifetime of a pod. +// Glusterfs volumes do not support ownership management or SELinux relabeling. +type GlusterfsPersistentVolumeSource struct { + // EndpointsName is the endpoint name that details Glusterfs topology. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"` + + // Path is the Glusterfs volume path. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + Path string `json:"path" protobuf:"bytes,2,opt,name=path"` + + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // Defaults to false. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` + + // EndpointsNamespace is the namespace that contains Glusterfs endpoint. + // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. + // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + // +optional + EndpointsNamespace *string `json:"endpointsNamespace,omitempty" protobuf:"bytes,4,opt,name=endpointsNamespace"` +} + // Represents a Rados Block Device mount that lasts the lifetime of a pod. // RBD volumes support ownership management and SELinux relabeling. type RBDVolumeSource struct { @@ -2060,6 +2084,9 @@ type Container struct { // +optional // +patchMergeKey=containerPort // +patchStrategy=merge + // +listType=map + // +listMapKey=containerPort + // +listMapKey=protocol Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"` // List of sources to populate environment variables in the container. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys @@ -2087,7 +2114,7 @@ type Container struct { // +patchStrategy=merge VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // volumeDevices is the list of block devices to be used by the container. - // This is an alpha feature and may change in the future. + // This is a beta feature. // +patchMergeKey=devicePath // +patchStrategy=merge // +optional @@ -3282,8 +3309,8 @@ type ReplicationControllerCondition struct { } // +genclient -// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/extensions/v1beta1.Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/extensions/v1beta1.Scale,result=k8s.io/api/extensions/v1beta1.Scale +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ReplicationController represents the configuration of a replication controller. @@ -4996,6 +5023,10 @@ const ( TLSCertKey = "tls.crt" // TLSPrivateKeyKey is the key for the private key field in a TLS secret. TLSPrivateKeyKey = "tls.key" + // SecretTypeBootstrapToken is used during the automated bootstrap process (first + // implemented by kubeadm). It stores tokens that are used to sign well known + // ConfigMaps. They are used for authn. + SecretTypeBootstrapToken SecretType = "bootstrap.kubernetes.io/token" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index ba95e388..71f90685 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -321,7 +321,7 @@ var map_Container = map[string]string{ "env": "List of environment variables to set in the container. Cannot be updated.", "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", - "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.", + "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is a beta feature.", "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", @@ -695,6 +695,18 @@ func (GitRepoVolumeSource) SwaggerDoc() map[string]string { return map_GitRepoVolumeSource } +var map_GlusterfsPersistentVolumeSource = map[string]string{ + "": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + "endpoints": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "path": "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "readOnly": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "endpointsNamespace": "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", +} + +func (GlusterfsPersistentVolumeSource) SwaggerDoc() map[string]string { + return map_GlusterfsPersistentVolumeSource +} + var map_GlusterfsVolumeSource = map[string]string{ "": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", "endpoints": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", @@ -1210,7 +1222,7 @@ var map_PersistentVolumeClaimSpec = map[string]string{ "resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", - "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is an alpha feature and may change in the future.", + "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.", "dataSource": "This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.", } @@ -1288,7 +1300,7 @@ var map_PersistentVolumeSpec = map[string]string{ "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", "mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", - "volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is an alpha feature and may change in the future.", + "volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is a beta feature.", "nodeAffinity": "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", } diff --git a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 42a5ca07..4219c95e 100644 --- a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -1498,6 +1498,27 @@ func (in *GitRepoVolumeSource) DeepCopy() *GitRepoVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlusterfsPersistentVolumeSource) DeepCopyInto(out *GlusterfsPersistentVolumeSource) { + *out = *in + if in.EndpointsNamespace != nil { + in, out := &in.EndpointsNamespace, &out.EndpointsNamespace + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlusterfsPersistentVolumeSource. +func (in *GlusterfsPersistentVolumeSource) DeepCopy() *GlusterfsPersistentVolumeSource { + if in == nil { + return nil + } + out := new(GlusterfsPersistentVolumeSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlusterfsVolumeSource) DeepCopyInto(out *GlusterfsVolumeSource) { *out = *in @@ -2806,8 +2827,8 @@ func (in *PersistentVolumeSource) DeepCopyInto(out *PersistentVolumeSource) { } if in.Glusterfs != nil { in, out := &in.Glusterfs, &out.Glusterfs - *out = new(GlusterfsVolumeSource) - **out = **in + *out = new(GlusterfsPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.NFS != nil { in, out := &in.NFS, &out.NFS diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index 7bf49f31..a0dfa966 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -26,10 +26,6 @@ limitations under the License. It has these top-level messages: AllowedFlexVolume AllowedHostPath - CustomMetricCurrentStatus - CustomMetricCurrentStatusList - CustomMetricTarget - CustomMetricTargetList DaemonSet DaemonSetCondition DaemonSetList @@ -91,7 +87,6 @@ import fmt "fmt" import math "math" import k8s_io_api_core_v1 "k8s.io/api/core/v1" - import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -122,261 +117,235 @@ func (m *AllowedHostPath) Reset() { *m = AllowedHostPath{} } func (*AllowedHostPath) ProtoMessage() {} func (*AllowedHostPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } -func (m *CustomMetricCurrentStatus) Reset() { *m = CustomMetricCurrentStatus{} } -func (*CustomMetricCurrentStatus) ProtoMessage() {} -func (*CustomMetricCurrentStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} -} - -func (m *CustomMetricCurrentStatusList) Reset() { *m = CustomMetricCurrentStatusList{} } -func (*CustomMetricCurrentStatusList) ProtoMessage() {} -func (*CustomMetricCurrentStatusList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} -} - -func (m *CustomMetricTarget) Reset() { *m = CustomMetricTarget{} } -func (*CustomMetricTarget) ProtoMessage() {} -func (*CustomMetricTarget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } - -func (m *CustomMetricTargetList) Reset() { *m = CustomMetricTargetList{} } -func (*CustomMetricTargetList) ProtoMessage() {} -func (*CustomMetricTargetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } - func (m *DaemonSet) Reset() { *m = DaemonSet{} } func (*DaemonSet) ProtoMessage() {} -func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } func (m *DaemonSetCondition) Reset() { *m = DaemonSetCondition{} } func (*DaemonSetCondition) ProtoMessage() {} -func (*DaemonSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*DaemonSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *DaemonSetList) Reset() { *m = DaemonSetList{} } func (*DaemonSetList) ProtoMessage() {} -func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} } func (*DaemonSetSpec) ProtoMessage() {} -func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} } func (*DaemonSetStatus) ProtoMessage() {} -func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } -func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } -func (*DaemonSetUpdateStrategy) ProtoMessage() {} -func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{11} -} +func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} } +func (*DaemonSetUpdateStrategy) ProtoMessage() {} +func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *Deployment) Reset() { *m = Deployment{} } func (*Deployment) ProtoMessage() {} -func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } func (*DeploymentCondition) ProtoMessage() {} -func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *DeploymentList) Reset() { *m = DeploymentList{} } func (*DeploymentList) ProtoMessage() {} -func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} } func (*DeploymentRollback) ProtoMessage() {} -func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} } func (*DeploymentSpec) ProtoMessage() {} -func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} } func (*DeploymentStatus) ProtoMessage() {} -func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } func (*DeploymentStrategy) ProtoMessage() {} -func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } func (*FSGroupStrategyOptions) ProtoMessage() {} -func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } func (*HTTPIngressPath) ProtoMessage() {} -func (*HTTPIngressPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*HTTPIngressPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } func (*HTTPIngressRuleValue) ProtoMessage() {} -func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } func (m *HostPortRange) Reset() { *m = HostPortRange{} } func (*HostPortRange) ProtoMessage() {} -func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } func (m *IDRange) Reset() { *m = IDRange{} } func (*IDRange) ProtoMessage() {} -func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} -func (*IPBlock) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*IPBlock) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} -func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} -func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} -func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} -func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } +func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} -func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } +func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} -func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } +func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} -func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } +func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} -func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } +func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} -func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } +func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{34} + return fileDescriptorGenerated, []int{30} } func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{35} + return fileDescriptorGenerated, []int{31} } func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} -func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } +func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} -func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } +func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} -func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } +func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} -func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } +func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} } func (*PodSecurityPolicy) ProtoMessage() {} -func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } +func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} } func (*PodSecurityPolicyList) ProtoMessage() {} -func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } +func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} } func (*PodSecurityPolicySpec) ProtoMessage() {} -func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } +func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} -func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } +func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} -func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} } +func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} -func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } +func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} -func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } +func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} -func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} } +func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} } func (*ReplicationControllerDummy) ProtoMessage() {} func (*ReplicationControllerDummy) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{48} + return fileDescriptorGenerated, []int{44} } func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} -func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } +func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} -func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } +func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{51} + return fileDescriptorGenerated, []int{47} } func (m *RunAsGroupStrategyOptions) Reset() { *m = RunAsGroupStrategyOptions{} } func (*RunAsGroupStrategyOptions) ProtoMessage() {} func (*RunAsGroupStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{52} + return fileDescriptorGenerated, []int{48} } func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} } func (*RunAsUserStrategyOptions) ProtoMessage() {} func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{53} + return fileDescriptorGenerated, []int{49} } func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } func (*SELinuxStrategyOptions) ProtoMessage() {} -func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} } +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} } +func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} } func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } +func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } +func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{58} + return fileDescriptorGenerated, []int{54} } func init() { proto.RegisterType((*AllowedFlexVolume)(nil), "k8s.io.api.extensions.v1beta1.AllowedFlexVolume") proto.RegisterType((*AllowedHostPath)(nil), "k8s.io.api.extensions.v1beta1.AllowedHostPath") - proto.RegisterType((*CustomMetricCurrentStatus)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricCurrentStatus") - proto.RegisterType((*CustomMetricCurrentStatusList)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricCurrentStatusList") - proto.RegisterType((*CustomMetricTarget)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricTarget") - proto.RegisterType((*CustomMetricTargetList)(nil), "k8s.io.api.extensions.v1beta1.CustomMetricTargetList") proto.RegisterType((*DaemonSet)(nil), "k8s.io.api.extensions.v1beta1.DaemonSet") proto.RegisterType((*DaemonSetCondition)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetCondition") proto.RegisterType((*DaemonSetList)(nil), "k8s.io.api.extensions.v1beta1.DaemonSetList") @@ -483,126 +452,6 @@ func (m *AllowedHostPath) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CustomMetricCurrentStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomMetricCurrentStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size())) - n1, err := m.CurrentValue.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - return i, nil -} - -func (m *CustomMetricCurrentStatusList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomMetricCurrentStatusList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for _, msg := range m.Items { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *CustomMetricTarget) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomMetricTarget) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size())) - n2, err := m.TargetValue.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - return i, nil -} - -func (m *CustomMetricTargetList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomMetricTargetList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for _, msg := range m.Items { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - func (m *DaemonSet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -621,27 +470,27 @@ func (m *DaemonSet) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n3, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n1 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n4, err := m.Spec.MarshalTo(dAtA[i:]) + n2, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n2 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n5, err := m.Status.MarshalTo(dAtA[i:]) + n3, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n3 return i, nil } @@ -671,11 +520,11 @@ func (m *DaemonSetCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n6, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n4 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -705,11 +554,11 @@ func (m *DaemonSetList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n7, err := m.ListMeta.MarshalTo(dAtA[i:]) + n5, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n5 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -744,28 +593,28 @@ func (m *DaemonSetSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size())) - n8, err := m.Selector.MarshalTo(dAtA[i:]) + n6, err := m.Selector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n6 } dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n9, err := m.Template.MarshalTo(dAtA[i:]) + n7, err := m.Template.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n7 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size())) - n10, err := m.UpdateStrategy.MarshalTo(dAtA[i:]) + n8, err := m.UpdateStrategy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n8 dAtA[i] = 0x20 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds)) @@ -862,11 +711,11 @@ func (m *DaemonSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size())) - n11, err := m.RollingUpdate.MarshalTo(dAtA[i:]) + n9, err := m.RollingUpdate.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n9 } return i, nil } @@ -889,27 +738,27 @@ func (m *Deployment) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n12, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n10, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n10 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n13, err := m.Spec.MarshalTo(dAtA[i:]) + n11, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n11 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n14, err := m.Status.MarshalTo(dAtA[i:]) + n12, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n12 return i, nil } @@ -947,19 +796,19 @@ func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size())) - n15, err := m.LastUpdateTime.MarshalTo(dAtA[i:]) + n13, err := m.LastUpdateTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n13 dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n16, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n14, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n14 return i, nil } @@ -981,11 +830,11 @@ func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n17, err := m.ListMeta.MarshalTo(dAtA[i:]) + n15, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n15 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -1045,11 +894,11 @@ func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size())) - n18, err := m.RollbackTo.MarshalTo(dAtA[i:]) + n16, err := m.RollbackTo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n16 return i, nil } @@ -1077,28 +926,28 @@ func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size())) - n19, err := m.Selector.MarshalTo(dAtA[i:]) + n17, err := m.Selector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n17 } dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n20, err := m.Template.MarshalTo(dAtA[i:]) + n18, err := m.Template.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n18 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size())) - n21, err := m.Strategy.MarshalTo(dAtA[i:]) + n19, err := m.Strategy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n19 dAtA[i] = 0x28 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds)) @@ -1119,11 +968,11 @@ func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size())) - n22, err := m.RollbackTo.MarshalTo(dAtA[i:]) + n20, err := m.RollbackTo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n20 } if m.ProgressDeadlineSeconds != nil { dAtA[i] = 0x48 @@ -1209,11 +1058,11 @@ func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size())) - n23, err := m.RollingUpdate.MarshalTo(dAtA[i:]) + n21, err := m.RollingUpdate.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n21 } return i, nil } @@ -1274,11 +1123,11 @@ func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size())) - n24, err := m.Backend.MarshalTo(dAtA[i:]) + n22, err := m.Backend.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n22 return i, nil } @@ -1415,27 +1264,27 @@ func (m *Ingress) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n25, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n23, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n23 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n26, err := m.Spec.MarshalTo(dAtA[i:]) + n24, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n24 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n27, err := m.Status.MarshalTo(dAtA[i:]) + n25, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n25 return i, nil } @@ -1461,11 +1310,11 @@ func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ServicePort.Size())) - n28, err := m.ServicePort.MarshalTo(dAtA[i:]) + n26, err := m.ServicePort.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n26 return i, nil } @@ -1487,11 +1336,11 @@ func (m *IngressList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n29, err := m.ListMeta.MarshalTo(dAtA[i:]) + n27, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n29 + i += n27 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -1529,11 +1378,11 @@ func (m *IngressRule) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.IngressRuleValue.Size())) - n30, err := m.IngressRuleValue.MarshalTo(dAtA[i:]) + n28, err := m.IngressRuleValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n28 return i, nil } @@ -1556,11 +1405,11 @@ func (m *IngressRuleValue) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.HTTP.Size())) - n31, err := m.HTTP.MarshalTo(dAtA[i:]) + n29, err := m.HTTP.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n29 } return i, nil } @@ -1584,11 +1433,11 @@ func (m *IngressSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size())) - n32, err := m.Backend.MarshalTo(dAtA[i:]) + n30, err := m.Backend.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n30 } if len(m.TLS) > 0 { for _, msg := range m.TLS { @@ -1635,11 +1484,11 @@ func (m *IngressStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size())) - n33, err := m.LoadBalancer.MarshalTo(dAtA[i:]) + n31, err := m.LoadBalancer.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n31 return i, nil } @@ -1698,19 +1547,19 @@ func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n34, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n32, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n32 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n35, err := m.Spec.MarshalTo(dAtA[i:]) + n33, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n33 return i, nil } @@ -1816,11 +1665,11 @@ func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n36, err := m.ListMeta.MarshalTo(dAtA[i:]) + n34, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n34 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -1855,31 +1704,31 @@ func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size())) - n37, err := m.PodSelector.MarshalTo(dAtA[i:]) + n35, err := m.PodSelector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n35 } if m.NamespaceSelector != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size())) - n38, err := m.NamespaceSelector.MarshalTo(dAtA[i:]) + n36, err := m.NamespaceSelector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n36 } if m.IPBlock != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.IPBlock.Size())) - n39, err := m.IPBlock.MarshalTo(dAtA[i:]) + n37, err := m.IPBlock.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n37 } return i, nil } @@ -1909,11 +1758,11 @@ func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size())) - n40, err := m.Port.MarshalTo(dAtA[i:]) + n38, err := m.Port.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n38 } return i, nil } @@ -1936,11 +1785,11 @@ func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size())) - n41, err := m.PodSelector.MarshalTo(dAtA[i:]) + n39, err := m.PodSelector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n39 if len(m.Ingress) > 0 { for _, msg := range m.Ingress { dAtA[i] = 0x12 @@ -2001,19 +1850,19 @@ func (m *PodSecurityPolicy) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n42, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n40, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n42 + i += n40 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n43, err := m.Spec.MarshalTo(dAtA[i:]) + n41, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n43 + i += n41 return i, nil } @@ -2035,11 +1884,11 @@ func (m *PodSecurityPolicyList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n44, err := m.ListMeta.MarshalTo(dAtA[i:]) + n42, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n44 + i += n42 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -2177,35 +2026,35 @@ func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinux.Size())) - n45, err := m.SELinux.MarshalTo(dAtA[i:]) + n43, err := m.SELinux.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n45 + i += n43 dAtA[i] = 0x5a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsUser.Size())) - n46, err := m.RunAsUser.MarshalTo(dAtA[i:]) + n44, err := m.RunAsUser.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n46 + i += n44 dAtA[i] = 0x62 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SupplementalGroups.Size())) - n47, err := m.SupplementalGroups.MarshalTo(dAtA[i:]) + n45, err := m.SupplementalGroups.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n47 + i += n45 dAtA[i] = 0x6a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FSGroup.Size())) - n48, err := m.FSGroup.MarshalTo(dAtA[i:]) + n46, err := m.FSGroup.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n48 + i += n46 dAtA[i] = 0x70 i++ if m.ReadOnlyRootFilesystem { @@ -2321,11 +2170,11 @@ func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsGroup.Size())) - n49, err := m.RunAsGroup.MarshalTo(dAtA[i:]) + n47, err := m.RunAsGroup.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n49 + i += n47 } return i, nil } @@ -2348,27 +2197,27 @@ func (m *ReplicaSet) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n50, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n48, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n50 + i += n48 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n51, err := m.Spec.MarshalTo(dAtA[i:]) + n49, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n51 + i += n49 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n52, err := m.Status.MarshalTo(dAtA[i:]) + n50, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n52 + i += n50 return i, nil } @@ -2398,11 +2247,11 @@ func (m *ReplicaSetCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n53, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n51, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n53 + i += n51 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -2432,11 +2281,11 @@ func (m *ReplicaSetList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n54, err := m.ListMeta.MarshalTo(dAtA[i:]) + n52, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n54 + i += n52 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -2476,20 +2325,20 @@ func (m *ReplicaSetSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size())) - n55, err := m.Selector.MarshalTo(dAtA[i:]) + n53, err := m.Selector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n55 + i += n53 } dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n56, err := m.Template.MarshalTo(dAtA[i:]) + n54, err := m.Template.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n56 + i += n54 dAtA[i] = 0x20 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds)) @@ -2599,11 +2448,11 @@ func (m *RollingUpdateDaemonSet) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size())) - n57, err := m.MaxUnavailable.MarshalTo(dAtA[i:]) + n55, err := m.MaxUnavailable.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n57 + i += n55 } return i, nil } @@ -2627,21 +2476,21 @@ func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size())) - n58, err := m.MaxUnavailable.MarshalTo(dAtA[i:]) + n56, err := m.MaxUnavailable.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n58 + i += n56 } if m.MaxSurge != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size())) - n59, err := m.MaxSurge.MarshalTo(dAtA[i:]) + n57, err := m.MaxSurge.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n59 + i += n57 } return i, nil } @@ -2737,11 +2586,11 @@ func (m *SELinuxStrategyOptions) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size())) - n60, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) + n58, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n60 + i += n58 } return i, nil } @@ -2764,27 +2613,27 @@ func (m *Scale) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n61, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n59, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n61 + i += n59 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n62, err := m.Spec.MarshalTo(dAtA[i:]) + n60, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n62 + i += n60 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n63, err := m.Status.MarshalTo(dAtA[i:]) + n61, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n63 + i += n61 return i, nil } @@ -2916,50 +2765,6 @@ func (m *AllowedHostPath) Size() (n int) { return n } -func (m *CustomMetricCurrentStatus) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.CurrentValue.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomMetricCurrentStatusList) Size() (n int) { - var l int - _ = l - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomMetricTarget) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.TargetValue.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomMetricTargetList) Size() (n int) { - var l int - _ = l - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func (m *DaemonSet) Size() (n int) { var l int _ = l @@ -3813,101 +3618,59 @@ func (this *AllowedHostPath) String() string { }, "") return s } -func (this *CustomMetricCurrentStatus) String() string { +func (this *DaemonSet) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CustomMetricCurrentStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&DaemonSet{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *CustomMetricCurrentStatusList) String() string { +func (this *DaemonSetCondition) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CustomMetricCurrentStatusList{`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricCurrentStatus", "CustomMetricCurrentStatus", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&DaemonSetCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, }, "") return s } -func (this *CustomMetricTarget) String() string { +func (this *DaemonSetList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CustomMetricTarget{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&DaemonSetList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *CustomMetricTargetList) String() string { +func (this *DaemonSetSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CustomMetricTargetList{`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricTarget", "CustomMetricTarget", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&DaemonSetSpec{`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, + `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`, + `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, + `TemplateGeneration:` + fmt.Sprintf("%v", this.TemplateGeneration) + `,`, + `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, `}`, }, "") return s } -func (this *DaemonSet) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DaemonSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DaemonSetCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DaemonSetCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *DaemonSetList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DaemonSetList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DaemonSetSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DaemonSetSpec{`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, - `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_api_core_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`, - `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, - `TemplateGeneration:` + fmt.Sprintf("%v", this.TemplateGeneration) + `,`, - `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, - `}`, - }, "") - return s -} -func (this *DaemonSetStatus) String() string { +func (this *DaemonSetStatus) String() string { if this == nil { return "nil" } @@ -4708,386 +4471,6 @@ func (m *AllowedHostPath) Unmarshal(dAtA []byte) error { } return nil } -func (m *CustomMetricCurrentStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomMetricCurrentStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomMetricCurrentStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomMetricCurrentStatusList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomMetricCurrentStatusList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomMetricCurrentStatusList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, CustomMetricCurrentStatus{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomMetricTarget) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomMetricTarget: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomMetricTarget: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomMetricTargetList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomMetricTargetList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomMetricTargetList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, CustomMetricTarget{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *DaemonSet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -12686,237 +12069,230 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 3709 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x24, 0x49, - 0x56, 0xef, 0xac, 0x2a, 0xbb, 0xca, 0xcf, 0xed, 0xaf, 0xb0, 0xdb, 0x5d, 0xd3, 0x33, 0xed, 0xea, - 0xcd, 0x91, 0x9a, 0x9e, 0xa1, 0xa7, 0x6a, 0xba, 0x67, 0xa6, 0xb7, 0x99, 0x16, 0xbb, 0xeb, 0xb2, - 0xfb, 0xc3, 0x8b, 0x3f, 0x6a, 0xa2, 0xec, 0x66, 0x19, 0x31, 0xcb, 0xa4, 0xab, 0xc2, 0xe5, 0x1c, - 0x67, 0x65, 0xe6, 0x66, 0x44, 0x7a, 0x5d, 0x12, 0x42, 0x1c, 0x00, 0x09, 0x09, 0x04, 0x1c, 0x96, - 0x8f, 0x1b, 0x2b, 0x24, 0x4e, 0x20, 0xb8, 0xc1, 0x61, 0x35, 0x12, 0xd2, 0x22, 0x8d, 0xd0, 0x22, - 0xed, 0x8d, 0x3d, 0x59, 0x8c, 0xf7, 0x84, 0xf8, 0x07, 0x50, 0x1f, 0x10, 0x8a, 0xc8, 0xc8, 0xef, - 0x4c, 0x57, 0x95, 0xa7, 0xdb, 0x42, 0x88, 0x9b, 0x2b, 0xde, 0x7b, 0xbf, 0xf7, 0x22, 0xe2, 0xc5, - 0x7b, 0x2f, 0x23, 0x9e, 0xe1, 0xc9, 0xd1, 0x43, 0x5a, 0xd7, 0xad, 0xc6, 0x91, 0xbb, 0x4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0x78, - 0x2c, 0x85, 0x3c, 0x8c, 0x45, 0x52, 0x31, 0x87, 0xc1, 0x1e, 0x1a, 0xda, 0x84, 0x02, 0xb3, 0xa4, - 0xab, 0x8e, 0x87, 0x49, 0x88, 0xd3, 0x04, 0x89, 0x59, 0xd8, 0xb5, 0x70, 0x81, 0x59, 0x7c, 0x23, - 0xaa, 0x31, 0xae, 0x68, 0xf0, 0x79, 0x45, 0x33, 0xc0, 0x50, 0x3a, 0x70, 0xac, 0xfe, 0x85, 0xe7, - 0x10, 0x6c, 0xc4, 0x13, 0xc7, 0xea, 0x63, 0x81, 0xa5, 0xfe, 0x58, 0x81, 0x85, 0x18, 0xe7, 0x25, - 0x04, 0xfe, 0x8f, 0xe2, 0x81, 0xff, 0xee, 0x38, 0x13, 0xc9, 0x09, 0xff, 0x3f, 0x2e, 0x24, 0xa6, - 0xc1, 0x27, 0x8c, 0x0e, 0x60, 0xda, 0xb6, 0xba, 0xed, 0x97, 0xf0, 0x1c, 0x38, 0xc7, 0xf3, 0x66, - 0x2b, 0xc4, 0xc2, 0x51, 0x60, 0x74, 0x02, 0x0b, 0xa6, 0xd6, 0x27, 0xd4, 0xd6, 0x3a, 0xa4, 0xfd, - 0x12, 0x2e, 0x48, 0xae, 0x89, 0xf7, 0x86, 0x24, 0x22, 0x4e, 0x2b, 0x41, 0x5b, 0x50, 0xd6, 0x6d, - 0x51, 0xc7, 0xc9, 0xda, 0x65, 0x68, 0x16, 0xf5, 0xaa, 0x3e, 0x2f, 0x9e, 0xcb, 0x1f, 0xd8, 0xc7, - 0x50, 0xff, 0x26, 0xe9, 0x0d, 0xdc, 0xff, 0xd0, 0x53, 0xa8, 0x88, 0x26, 0x9c, 0x8e, 0x65, 0xf8, - 0x2f, 0x03, 0x7c, 0x67, 0x5b, 0x72, 0xec, 0xc5, 0x69, 0xed, 0xf5, 0x8c, 0x4b, 0x5f, 0x9f, 0x8c, - 0x03, 0x61, 0xb4, 0x0d, 0x25, 0xfb, 0xab, 0x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2d, 0xca, 0xb4, 0xba, 0x30, 0xd2, 0x45, 0x64, 0xa2, 0xb3, - 0x39, 0xbc, 0x8c, 0x48, 0x10, 0x28, 0x4e, 0x69, 0x40, 0xbf, 0x09, 0x48, 0x4b, 0x76, 0x55, 0xd3, - 0x2a, 0x1a, 0x29, 0xfd, 0xa4, 0xda, 0xb1, 0x43, 0xb7, 0x4b, 0x91, 0x28, 0xce, 0xd0, 0x83, 0x36, - 0x61, 0x49, 0x8e, 0xee, 0x99, 0x54, 0x3b, 0x20, 0xed, 0x01, 0xed, 0x30, 0x83, 0x56, 0x17, 0x45, - 0xec, 0x13, 0x0f, 0x5f, 0xab, 0x19, 0x74, 0x9c, 0x29, 0x85, 0xbe, 0x05, 0xf3, 0x07, 0x96, 0xb3, - 0xaf, 0x77, 0xbb, 0xc4, 0xf4, 0x91, 0x96, 0x04, 0xd2, 0x12, 0x5f, 0x8d, 0x27, 0x09, 0x1a, 0x4e, - 0x71, 0x23, 0x0a, 0xd7, 0x24, 0x72, 0xcb, 0xb1, 0x3a, 0x5b, 0x96, 0x6b, 0x32, 0xaf, 0x24, 0xba, - 0x16, 0xa4, 0x98, 0x6b, 0xab, 0x59, 0x0c, 0x2f, 0x4e, 0x6b, 0xb7, 0xb2, 0x2b, 0xe0, 0x90, 0x09, - 0x67, 0x63, 0xa3, 0x43, 0x00, 0x11, 0x17, 0xbc, 0xe3, 0xb7, 0x2c, 0x8e, 0xdf, 0xc3, 0x51, 0xa2, - 0x4e, 0xe6, 0x09, 0xf4, 0x9e, 0xe4, 0x02, 0x32, 0x8e, 0x60, 0x8b, 0x5e, 0x19, 0xf9, 0x72, 0x72, - 0x39, 0xfd, 0xc6, 0xe3, 0xf5, 0xca, 0x84, 0xa6, 0xbd, 0xb4, 0x5e, 0x99, 0x08, 0xe4, 0xf9, 0x77, - 0xb5, 0xff, 0x59, 0x80, 0xc5, 0x90, 0x79, 0xe4, 0x5e, 0x99, 0x0c, 0x91, 0xff, 0xef, 0x39, 0x1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 0x76, 0xde, 0x8d, 0x51, - 0x71, 0x82, 0xfb, 0xc6, 0x23, 0x98, 0x89, 0x29, 0x1b, 0xab, 0xed, 0xf4, 0x1f, 0x14, 0xf8, 0xda, - 0xd0, 0x7b, 0x0b, 0xd4, 0x8c, 0x1d, 0x92, 0x7a, 0xe2, 0x90, 0xac, 0xe4, 0x03, 0xbc, 0xba, 0xf6, - 0xa5, 0xe6, 0x3b, 0x5f, 0x7c, 0xb9, 0x72, 0xe5, 0xa7, 0x5f, 0xae, 0x5c, 0xf9, 0xd9, 0x97, 0x2b, - 0x57, 0x7e, 0xfb, 0x6c, 0x45, 0xf9, 0xe2, 0x6c, 0x45, 0xf9, 0xe9, 0xd9, 0x8a, 0xf2, 0xb3, 0xb3, - 0x15, 0xe5, 0xdf, 0xcf, 0x56, 0x94, 0x3f, 0xfe, 0xf9, 0xca, 0x95, 0x8f, 0xcb, 0x12, 0xee, 0x7f, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x73, 0x7f, 0xfe, 0x70, 0x6c, 0x3e, 0x00, 0x00, + // 3587 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x1c, 0x47, + 0x76, 0x57, 0xcf, 0x0c, 0x39, 0xc3, 0x47, 0xf1, 0xab, 0x48, 0x91, 0x63, 0xc9, 0xe2, 0xc8, 0x6d, + 0x40, 0x91, 0x1d, 0x69, 0xc6, 0x92, 0x2d, 0x59, 0xb1, 0x10, 0xdb, 0x1c, 0x52, 0x94, 0xe8, 0xf0, + 0x63, 0x5c, 0x43, 0x2a, 0x86, 0x11, 0x3b, 0x6e, 0xce, 0x14, 0x87, 0x2d, 0xf6, 0x74, 0xb7, 0xbb, + 0x6b, 0x68, 0x0e, 0x90, 0x43, 0x0e, 0x49, 0x80, 0x00, 0x09, 0x92, 0x8b, 0x93, 0x1c, 0x63, 0x04, + 0xc8, 0x69,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 0x7a, 0x9a, 0xd6, 0xe7, 0xcb, 0x10, 0x78, 0x70, 0x77, 0xde, + 0xca, 0x9e, 0x17, 0x92, 0x33, 0xcb, 0x09, 0x3c, 0x38, 0x51, 0x32, 0xa5, 0x6f, 0x20, 0x7f, 0xa2, + 0xbe, 0x81, 0xd8, 0x33, 0x76, 0xe1, 0x18, 0xcf, 0xd8, 0x89, 0x3d, 0x00, 0x43, 0x27, 0xe8, 0x01, + 0x38, 0xc9, 0xa3, 0x7d, 0x42, 0x10, 0x1b, 0xd8, 0x43, 0xfa, 0x3c, 0x9c, 0x17, 0x62, 0x94, 0xbf, + 0xa7, 0xeb, 0xd4, 0x32, 0x34, 0x8d, 0x58, 0x4b, 0xbd, 0x6e, 0xb7, 0x2f, 0xbf, 0x09, 0xe3, 0xe1, + 0x4e, 0x11, 0x67, 0xa7, 0x9d, 0x66, 0x15, 0xf1, 0x62, 0x19, 0xd8, 0x69, 0x67, 0x1c, 0x7b, 0x1c, + 0xf2, 0xbf, 0x48, 0x30, 0x9b, 0xdc, 0x11, 0x8a, 0x34, 0x18, 0xef, 0x2a, 0x07, 0xc1, 0x2e, 0x5d, + 0xe9, 0x84, 0x77, 0x49, 0xbc, 0x45, 0x60, 0x2d, 0x84, 0x85, 0x23, 0xd8, 0xf2, 0x77, 0x12, 0xcc, + 0xa5, 0x3c, 0xce, 0x9f, 0xae, 0x25, 0xe8, 0x7d, 0x28, 0x75, 0x95, 0x83, 0x66, 0xcf, 0xea, 0x90, + 0x13, 0xdf, 0x9e, 0xf1, 0x88, 0xb1, 0x26, 0x50, 0xb0, 0x87, 0x27, 0xff, 0x9f, 0x04, 0xcf, 0xa5, + 0x56, 0x14, 0xe8, 0x56, 0xa8, 0x8f, 0x40, 0x8e, 0xf4, 0x11, 0xa0, 0xb8, 0xe0, 0x33, 0x6a, 0x23, + 0xf8, 0x4c, 0x82, 0x72, 0xda, 0xd7, 0x16, 0xba, 0x19, 0x32, 0xf2, 0x85, 0x88, 0x91, 0x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ed, 0xfc, 0x99, 0x7f, 0x3c, 0x9a, 0x97, 0x1e, 0x1d, 0xcd, 0x4b, + 0x5f, 0x1f, 0xcd, 0x4b, 0xdf, 0x1c, 0xcd, 0x4b, 0xbf, 0x3e, 0x9a, 0x97, 0xfe, 0xf3, 0xbb, 0xf9, + 0x33, 0xef, 0x17, 0x05, 0xdc, 0x1f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x51, 0x7e, 0x9f, 0x62, 0x14, + 0x3c, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto index 84fe2a70..efcda7eb 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -22,7 +22,6 @@ syntax = 'proto2'; package k8s.io.api.extensions.v1beta1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -45,7 +44,7 @@ message AllowedHostPath { // pathPrefix is the path prefix that the host volume must match. // It does not support `*`. // Trailing slashes are trimmed when validating the path prefix with a host path. - // + // // Examples: // `/foo` would allow `/foo`, `/foo/` and `/foo/bar` // `/foo` would not allow `/food` or `/etc/foo` @@ -56,31 +55,6 @@ message AllowedHostPath { optional bool readOnly = 2; } -message CustomMetricCurrentStatus { - // Custom Metric name. - optional string name = 1; - - // Custom Metric value (average). - optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; -} - -message CustomMetricCurrentStatusList { - repeated CustomMetricCurrentStatus items = 1; -} - -// Alpha-level support for Custom Metrics in HPA (as annotations). -message CustomMetricTarget { - // Custom Metric name. - optional string name = 1; - - // Custom Metric value (average). - optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2; -} - -message CustomMetricTargetList { - repeated CustomMetricTarget items = 1; -} - // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for // more information. // DaemonSet represents the configuration of a daemon set. @@ -690,7 +664,7 @@ message NetworkPolicyList { message NetworkPolicyPeer { // This is a label selector which selects Pods. This field follows standard label // selector semantics; if present but empty, it selects all pods. - // + // // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. @@ -699,7 +673,7 @@ message NetworkPolicyPeer { // Selects Namespaces using cluster-scoped labels. This field follows standard label // selector semantics; if present but empty, it selects all namespaces. - // + // // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. @@ -894,7 +868,7 @@ message PodSecurityPolicySpec { // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. - // + // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. @@ -904,7 +878,7 @@ message PodSecurityPolicySpec { // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. - // + // // Examples: // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. diff --git a/vendor/k8s.io/api/extensions/v1beta1/types.go b/vendor/k8s.io/api/extensions/v1beta1/types.go index 63c78e2f..5ba6f958 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -19,7 +19,6 @@ package v1beta1 import ( appsv1beta1 "k8s.io/api/apps/v1beta1" "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) @@ -50,8 +49,6 @@ type ScaleStatus struct { TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"` } -// +genclient -// +genclient:noVerbs // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // represents a scaling request for a resource. @@ -77,29 +74,6 @@ type ReplicationControllerDummy struct { metav1.TypeMeta `json:",inline"` } -// Alpha-level support for Custom Metrics in HPA (as annotations). -type CustomMetricTarget struct { - // Custom Metric name. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Custom Metric value (average). - TargetValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"` -} - -type CustomMetricTargetList struct { - Items []CustomMetricTarget `json:"items" protobuf:"bytes,1,rep,name=items"` -} - -type CustomMetricCurrentStatus struct { - // Custom Metric name. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Custom Metric value (average). - CurrentValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"` -} - -type CustomMetricCurrentStatusList struct { - Items []CustomMetricCurrentStatus `json:"items" protobuf:"bytes,1,rep,name=items"` -} - // +genclient // +genclient:method=GetScale,verb=get,subresource=scale,result=Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index a6f5aaee..bce6036c 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -46,25 +46,6 @@ func (AllowedHostPath) SwaggerDoc() map[string]string { return map_AllowedHostPath } -var map_CustomMetricCurrentStatus = map[string]string{ - "name": "Custom Metric name.", - "value": "Custom Metric value (average).", -} - -func (CustomMetricCurrentStatus) SwaggerDoc() map[string]string { - return map_CustomMetricCurrentStatus -} - -var map_CustomMetricTarget = map[string]string{ - "": "Alpha-level support for Custom Metrics in HPA (as annotations).", - "name": "Custom Metric name.", - "value": "Custom Metric value (average).", -} - -func (CustomMetricTarget) SwaggerDoc() map[string]string { - return map_CustomMetricTarget -} - var map_DaemonSet = map[string]string{ "": "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", diff --git a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go index 0e4e82fa..8128c079 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go @@ -59,86 +59,6 @@ func (in *AllowedHostPath) DeepCopy() *AllowedHostPath { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomMetricCurrentStatus) DeepCopyInto(out *CustomMetricCurrentStatus) { - *out = *in - out.CurrentValue = in.CurrentValue.DeepCopy() - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricCurrentStatus. -func (in *CustomMetricCurrentStatus) DeepCopy() *CustomMetricCurrentStatus { - if in == nil { - return nil - } - out := new(CustomMetricCurrentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomMetricCurrentStatusList) DeepCopyInto(out *CustomMetricCurrentStatusList) { - *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomMetricCurrentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricCurrentStatusList. -func (in *CustomMetricCurrentStatusList) DeepCopy() *CustomMetricCurrentStatusList { - if in == nil { - return nil - } - out := new(CustomMetricCurrentStatusList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomMetricTarget) DeepCopyInto(out *CustomMetricTarget) { - *out = *in - out.TargetValue = in.TargetValue.DeepCopy() - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricTarget. -func (in *CustomMetricTarget) DeepCopy() *CustomMetricTarget { - if in == nil { - return nil - } - out := new(CustomMetricTarget) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomMetricTargetList) DeepCopyInto(out *CustomMetricTargetList) { - *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomMetricTarget, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomMetricTargetList. -func (in *CustomMetricTargetList) DeepCopy() *CustomMetricTargetList { - if in == nil { - return nil - } - out := new(CustomMetricTargetList) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DaemonSet) DeepCopyInto(out *DaemonSet) { *out = *in diff --git a/vendor/k8s.io/api/imagepolicy/OWNERS b/vendor/k8s.io/api/imagepolicy/OWNERS index 96ae42e0..02b8511e 100755 --- a/vendor/k8s.io/api/imagepolicy/OWNERS +++ b/vendor/k8s.io/api/imagepolicy/OWNERS @@ -1,4 +1,7 @@ +# approval on api packages bubbles to api-approvers reviewers: -- deads2k -- mbohlool -- jianhuiz +- sig-auth-policy-approvers +- sig-auth-policy-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/api/networking/v1/generated.proto b/vendor/k8s.io/api/networking/v1/generated.proto index 4e068d08..ab3731e9 100644 --- a/vendor/k8s.io/api/networking/v1/generated.proto +++ b/vendor/k8s.io/api/networking/v1/generated.proto @@ -114,7 +114,7 @@ message NetworkPolicyList { message NetworkPolicyPeer { // This is a label selector which selects Pods. This field follows standard label // selector semantics; if present but empty, it selects all pods. - // + // // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. @@ -123,7 +123,7 @@ message NetworkPolicyPeer { // Selects Namespaces using cluster-scoped labels. This field follows standard label // selector semantics; if present but empty, it selects all namespaces. - // + // // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. diff --git a/vendor/k8s.io/api/policy/OWNERS b/vendor/k8s.io/api/policy/OWNERS index 872e1632..61a5da4c 100755 --- a/vendor/k8s.io/api/policy/OWNERS +++ b/vendor/k8s.io/api/policy/OWNERS @@ -1,7 +1,8 @@ -approvers: -- sig-apps-api-approvers +# approval on api packages bubbles to api-approvers reviewers: - sig-apps-reviewers -- pweil- -- liggitt -- tallclair +- sig-auth-policy-approvers +- sig-auth-policy-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.proto b/vendor/k8s.io/api/policy/v1beta1/generated.proto index b6f147d1..e9df3c16 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ b/vendor/k8s.io/api/policy/v1beta1/generated.proto @@ -42,7 +42,7 @@ message AllowedHostPath { // pathPrefix is the path prefix that the host volume must match. // It does not support `*`. // Trailing slashes are trimmed when validating the path prefix with a host path. - // + // // Examples: // `/foo` would allow `/foo`, `/foo/` and `/foo/bar` // `/foo` would not allow `/food` or `/etc/foo` @@ -58,9 +58,11 @@ message AllowedHostPath { // created by POSTing to .../pods//evictions. message Eviction { // ObjectMeta describes the pod that is being evicted. + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // DeleteOptions may be provided + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2; } @@ -97,17 +99,21 @@ message IDRange { // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods message PodDisruptionBudget { + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the PodDisruptionBudget. + // +optional optional PodDisruptionBudgetSpec spec = 2; // Most recently observed status of the PodDisruptionBudget. + // +optional optional PodDisruptionBudgetStatus status = 3; } // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. message PodDisruptionBudgetList { + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; repeated PodDisruptionBudget items = 2; @@ -119,16 +125,19 @@ message PodDisruptionBudgetSpec { // "selector" will still be available after the eviction, i.e. even in the // absence of the evicted pod. So for example you can prevent all voluntary // evictions by specifying "100%". + // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1; // Label query over pods whose evictions are managed by the disruption // budget. + // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; // An eviction is allowed if at most "maxUnavailable" pods selected by // "selector" are unavailable after the eviction, i.e. even in absence of // the evicted pod. For example, one can prevent all voluntary evictions // by specifying 0. This is a mutually exclusive setting with "minAvailable". + // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3; } @@ -287,7 +296,7 @@ message PodSecurityPolicySpec { // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. - // + // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. @@ -297,7 +306,7 @@ message PodSecurityPolicySpec { // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. - // + // // Examples: // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. diff --git a/vendor/k8s.io/api/policy/v1beta1/types.go b/vendor/k8s.io/api/policy/v1beta1/types.go index 808d6fd0..91ea1185 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types.go +++ b/vendor/k8s.io/api/policy/v1beta1/types.go @@ -28,16 +28,19 @@ type PodDisruptionBudgetSpec struct { // "selector" will still be available after the eviction, i.e. even in the // absence of the evicted pod. So for example you can prevent all voluntary // evictions by specifying "100%". + // +optional MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` // Label query over pods whose evictions are managed by the disruption // budget. + // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` // An eviction is allowed if at most "maxUnavailable" pods selected by // "selector" are unavailable after the eviction, i.e. even in absence of // the evicted pod. For example, one can prevent all voluntary evictions // by specifying 0. This is a mutually exclusive setting with "minAvailable". + // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"` } @@ -81,12 +84,15 @@ type PodDisruptionBudgetStatus struct { // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudget struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the PodDisruptionBudget. + // +optional Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the PodDisruptionBudget. + // +optional Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -95,6 +101,7 @@ type PodDisruptionBudget struct { // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. type PodDisruptionBudgetList struct { metav1.TypeMeta `json:",inline"` + // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -110,9 +117,11 @@ type Eviction struct { metav1.TypeMeta `json:",inline"` // ObjectMeta describes the pod that is being evicted. + // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // DeleteOptions may be provided + // +optional DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` } @@ -250,13 +259,13 @@ type AllowedHostPath struct { ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` } -// FSType gives strong typing to different file systems that are used by volumes. -type FSType string - // AllowAllCapabilities can be used as a value for the PodSecurityPolicy.AllowAllCapabilities // field and means that any capabilities are allowed to be requested. var AllowAllCapabilities v1.Capability = "*" +// FSType gives strong typing to different file systems that are used by volumes. +type FSType string + var ( AzureFile FSType = "azureFile" Flocker FSType = "flocker" diff --git a/vendor/k8s.io/api/rbac/OWNERS b/vendor/k8s.io/api/rbac/OWNERS index 45b66b0a..ff4a7f4b 100755 --- a/vendor/k8s.io/api/rbac/OWNERS +++ b/vendor/k8s.io/api/rbac/OWNERS @@ -1,16 +1,7 @@ +# approval on api packages bubbles to api-approvers reviewers: -- thockin -- lavalamp -- smarterclayton -- deads2k -- sttts -- ncdc -- dims -- krousey -- mml -- mbohlool -- david-mcmahon -- lixiaobing10051267 -- jianhuiz -- liggitt -- enj +- sig-auth-authorizers-approvers +- sig-auth-authorizers-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/api/storage/v1/generated.pb.go b/vendor/k8s.io/api/storage/v1/generated.pb.go index 9ad0a015..e4b29311 100644 --- a/vendor/k8s.io/api/storage/v1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1/generated.pb.go @@ -26,6 +26,12 @@ limitations under the License. It has these top-level messages: StorageClass StorageClassList + VolumeAttachment + VolumeAttachmentList + VolumeAttachmentSource + VolumeAttachmentSpec + VolumeAttachmentStatus + VolumeError */ package v1 @@ -61,9 +67,39 @@ func (m *StorageClassList) Reset() { *m = StorageClassList{} func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } +func (*VolumeAttachment) ProtoMessage() {} +func (*VolumeAttachment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } +func (*VolumeAttachmentList) ProtoMessage() {} +func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } +func (*VolumeAttachmentSource) ProtoMessage() {} +func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } +func (*VolumeAttachmentSpec) ProtoMessage() {} +func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } +func (*VolumeAttachmentStatus) ProtoMessage() {} +func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *VolumeError) Reset() { *m = VolumeError{} } +func (*VolumeError) ProtoMessage() {} +func (*VolumeError) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + func init() { proto.RegisterType((*StorageClass)(nil), "k8s.io.api.storage.v1.StorageClass") proto.RegisterType((*StorageClassList)(nil), "k8s.io.api.storage.v1.StorageClassList") + proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1.VolumeAttachment") + proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1.VolumeAttachmentList") + proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1.VolumeAttachmentSource") + proto.RegisterType((*VolumeAttachmentSpec)(nil), "k8s.io.api.storage.v1.VolumeAttachmentSpec") + proto.RegisterType((*VolumeAttachmentStatus)(nil), "k8s.io.api.storage.v1.VolumeAttachmentStatus") + proto.RegisterType((*VolumeError)(nil), "k8s.io.api.storage.v1.VolumeError") } func (m *StorageClass) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -204,6 +240,242 @@ func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *VolumeAttachment) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeAttachment) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n3, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) + n4, err := m.Spec.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) + n5, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + return i, nil +} + +func (m *VolumeAttachmentList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeAttachmentList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n6, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *VolumeAttachmentSource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeAttachmentSource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.PersistentVolumeName != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PersistentVolumeName))) + i += copy(dAtA[i:], *m.PersistentVolumeName) + } + return i, nil +} + +func (m *VolumeAttachmentSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeAttachmentSpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Attacher))) + i += copy(dAtA[i:], m.Attacher) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size())) + n7, err := m.Source.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i += copy(dAtA[i:], m.NodeName) + return i, nil +} + +func (m *VolumeAttachmentStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeAttachmentStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + if m.Attached { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(m.AttachmentMetadata) > 0 { + keysForAttachmentMetadata := make([]string, 0, len(m.AttachmentMetadata)) + for k := range m.AttachmentMetadata { + keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + for _, k := range keysForAttachmentMetadata { + dAtA[i] = 0x12 + i++ + v := m.AttachmentMetadata[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.AttachError != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.AttachError.Size())) + n8, err := m.AttachError.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.DetachError != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.DetachError.Size())) + n9, err := m.DetachError.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *VolumeError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VolumeError) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Time.Size())) + n10, err := m.Time.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + return i, nil +} + func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -268,6 +540,87 @@ func (m *StorageClassList) Size() (n int) { return n } +func (m *VolumeAttachment) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *VolumeAttachmentList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *VolumeAttachmentSource) Size() (n int) { + var l int + _ = l + if m.PersistentVolumeName != nil { + l = len(*m.PersistentVolumeName) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *VolumeAttachmentSpec) Size() (n int) { + var l int + _ = l + l = len(m.Attacher) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Source.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *VolumeAttachmentStatus) Size() (n int) { + var l int + _ = l + n += 2 + if len(m.AttachmentMetadata) > 0 { + for k, v := range m.AttachmentMetadata { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if m.AttachError != nil { + l = m.AttachError.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DetachError != nil { + l = m.DetachError.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *VolumeError) Size() (n int) { + var l int + _ = l + l = m.Time.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func sovGenerated(x uint64) (n int) { for { n++ @@ -312,22 +665,911 @@ func (this *StorageClassList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&StorageClassList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + s := strings.Join([]string{`&StorageClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeAttachment) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeAttachment{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "VolumeAttachmentSpec", "VolumeAttachmentSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "VolumeAttachmentStatus", "VolumeAttachmentStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeAttachmentList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeAttachmentList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "VolumeAttachment", "VolumeAttachment", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeAttachmentSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeAttachmentSource{`, + `PersistentVolumeName:` + valueToStringGenerated(this.PersistentVolumeName) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeAttachmentSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeAttachmentSpec{`, + `Attacher:` + fmt.Sprintf("%v", this.Attacher) + `,`, + `Source:` + strings.Replace(strings.Replace(this.Source.String(), "VolumeAttachmentSource", "VolumeAttachmentSource", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeAttachmentStatus) String() string { + if this == nil { + return "nil" + } + keysForAttachmentMetadata := make([]string, 0, len(this.AttachmentMetadata)) + for k := range this.AttachmentMetadata { + keysForAttachmentMetadata = append(keysForAttachmentMetadata, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata) + mapStringForAttachmentMetadata := "map[string]string{" + for _, k := range keysForAttachmentMetadata { + mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k]) + } + mapStringForAttachmentMetadata += "}" + s := strings.Join([]string{`&VolumeAttachmentStatus{`, + `Attached:` + fmt.Sprintf("%v", this.Attached) + `,`, + `AttachmentMetadata:` + mapStringForAttachmentMetadata + `,`, + `AttachError:` + strings.Replace(fmt.Sprintf("%v", this.AttachError), "VolumeError", "VolumeError", 1) + `,`, + `DetachError:` + strings.Replace(fmt.Sprintf("%v", this.DetachError), "VolumeError", "VolumeError", 1) + `,`, + `}`, + }, "") + return s +} +func (this *VolumeError) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeError{`, + `Time:` + strings.Replace(strings.Replace(this.Time.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *StorageClass) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provisioner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Parameters == nil { + m.Parameters = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Parameters[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReclaimPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := k8s_io_api_core_v1.PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex]) + m.ReclaimPolicy = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MountOptions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MountOptions = append(m.MountOptions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowVolumeExpansion", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AllowVolumeExpansion = &b + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeBindingMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := VolumeBindingMode(dAtA[iNdEx:postIndex]) + m.VolumeBindingMode = &s + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedTopologies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedTopologies = append(m.AllowedTopologies, k8s_io_api_core_v1.TopologySelectorTerm{}) + if err := m.AllowedTopologies[len(m.AllowedTopologies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageClassList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, StorageClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeAttachment) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeAttachment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeAttachment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeAttachmentList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeAttachmentList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeAttachmentList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, VolumeAttachment{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeAttachmentSource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeAttachmentSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeAttachmentSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.PersistentVolumeName = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *StorageClass) Unmarshal(dAtA []byte) error { +func (m *VolumeAttachmentSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -350,15 +1592,44 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StorageClass: wiretype end group for non-group") + return fmt.Errorf("proto: VolumeAttachmentSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VolumeAttachmentSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attacher", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attacher = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -382,13 +1653,13 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -413,11 +1684,81 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Provisioner = string(dAtA[iNdEx:postIndex]) + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VolumeAttachmentStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VolumeAttachmentStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeAttachmentStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Attached", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Attached = bool(v != 0) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttachmentMetadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -441,8 +1782,8 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Parameters == nil { - m.Parameters = make(map[string]string) + if m.AttachmentMetadata == nil { + m.AttachmentMetadata = make(map[string]string) } var mapkey string var mapvalue string @@ -531,43 +1872,13 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Parameters[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReclaimPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := k8s_io_api_core_v1.PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex]) - m.ReclaimPolicy = &s + m.AttachmentMetadata[mapkey] = mapvalue iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MountOptions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AttachError", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -577,75 +1888,28 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.MountOptions = append(m.MountOptions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowVolumeExpansion", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.AllowVolumeExpansion = &b - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VolumeBindingMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated + if m.AttachError == nil { + m.AttachError = &VolumeError{} } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.AttachError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - s := VolumeBindingMode(dAtA[iNdEx:postIndex]) - m.VolumeBindingMode = &s iNdEx = postIndex - case 8: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedTopologies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DetachError", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -669,8 +1933,10 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AllowedTopologies = append(m.AllowedTopologies, k8s_io_api_core_v1.TopologySelectorTerm{}) - if err := m.AllowedTopologies[len(m.AllowedTopologies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.DetachError == nil { + m.DetachError = &VolumeError{} + } + if err := m.DetachError.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -695,7 +1961,7 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *StorageClassList) Unmarshal(dAtA []byte) error { +func (m *VolumeError) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -718,15 +1984,15 @@ func (m *StorageClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group") + return fmt.Errorf("proto: VolumeError: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VolumeError: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -750,15 +2016,15 @@ func (m *StorageClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -768,22 +2034,20 @@ func (m *StorageClassList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, StorageClass{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -916,46 +2180,67 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 656 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x8e, 0x93, 0x9b, 0xde, 0x74, 0xd2, 0xea, 0x26, 0xbe, 0xbd, 0x92, 0x6f, 0x16, 0x4e, 0x54, - 0x36, 0x11, 0x12, 0xe3, 0xa6, 0x14, 0x54, 0x21, 0x81, 0x54, 0xa3, 0x4a, 0x20, 0xb5, 0x6a, 0xe4, - 0x56, 0x15, 0x42, 0x2c, 0x98, 0x38, 0x07, 0x77, 0x88, 0xed, 0x31, 0x33, 0x63, 0x43, 0x76, 0xbc, - 0x00, 0x12, 0xcf, 0xc3, 0x13, 0x74, 0xd9, 0x65, 0x57, 0x16, 0x35, 0x6f, 0xd1, 0x15, 0xf2, 0x0f, - 0x8d, 0x9b, 0x04, 0xd1, 0xdd, 0xcc, 0x77, 0xbe, 0xef, 0x3b, 0x33, 0xe7, 0x07, 0x3d, 0x9b, 0xec, - 0x0a, 0x4c, 0x99, 0x31, 0x09, 0x47, 0xc0, 0x7d, 0x90, 0x20, 0x8c, 0x08, 0xfc, 0x31, 0xe3, 0x46, - 0x11, 0x20, 0x01, 0x35, 0x84, 0x64, 0x9c, 0x38, 0x60, 0x44, 0x03, 0xc3, 0x01, 0x1f, 0x38, 0x91, - 0x30, 0xc6, 0x01, 0x67, 0x92, 0xa9, 0xff, 0xe5, 0x34, 0x4c, 0x02, 0x8a, 0x0b, 0x1a, 0x8e, 0x06, - 0x9d, 0x07, 0x0e, 0x95, 0x67, 0xe1, 0x08, 0xdb, 0xcc, 0x33, 0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 0x8b, 0xee, 0x9d, 0xa7, 0xe8, 0x9f, 0xb9, 0x86, 0xab, - 0x2d, 0x54, 0x9b, 0xc0, 0x34, 0x9b, 0xe6, 0x55, 0x2b, 0x3d, 0xaa, 0x1b, 0xa8, 0x1e, 0x11, 0x37, - 0x84, 0x7c, 0xf8, 0xac, 0xfc, 0xf2, 0xa4, 0xba, 0xab, 0x6c, 0x7e, 0x53, 0x50, 0xab, 0x3c, 0x3d, - 0x07, 0x54, 0x48, 0xf5, 0xcd, 0xc2, 0x4e, 0xe0, 0xbb, 0xed, 0x44, 0xaa, 0xce, 0x36, 0xa2, 0x55, - 0xfc, 0xa1, 0xf1, 0x0b, 0x29, 0xed, 0xc3, 0x0b, 0x54, 0xa7, 0x12, 0x3c, 0xa1, 0x55, 0xb3, 0xc2, - 0xdc, 0xbb, 0xc3, 0x4c, 0x9b, 0xeb, 0x85, 0x5f, 0xfd, 0x65, 0xaa, 0xb4, 0x72, 0x03, 0xb3, 0x7f, - 0x7e, 0xa5, 0x57, 0x2e, 0xae, 0xf4, 0xca, 0xe5, 0x95, 0x5e, 0xf9, 0x9c, 0xe8, 0xca, 0x79, 0xa2, - 0x2b, 0x17, 0x89, 0xae, 0x5c, 0x26, 0xba, 0xf2, 0x3d, 0xd1, 0x95, 0xaf, 0x3f, 0xf4, 0xca, 0xeb, - 0x6a, 0x34, 0xf8, 0x19, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x64, 0x41, 0x83, 0x40, 0x05, 0x00, 0x00, + // 984 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x3d, 0x6f, 0x23, 0x45, + 0x18, 0xce, 0xc6, 0xf9, 0x70, 0xc6, 0x09, 0x97, 0x0c, 0x01, 0x8c, 0x0b, 0x3b, 0x32, 0x05, 0xe6, + 0xe0, 0x76, 0x2f, 0xe1, 0x40, 0x27, 0x24, 0x90, 0xbc, 0x60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ad, 0x5b, 0xcf, 0xd2, 0xba, 0xf5, 0x3c, 0xad, 0x5b, 0x7f, 0xa7, + 0x75, 0xeb, 0xd7, 0x7f, 0xea, 0x4b, 0x5f, 0x2f, 0x0f, 0xf7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, + 0x85, 0x2a, 0x88, 0xc0, 0xcf, 0x0a, 0x00, 0x00, } diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto index d1785659..668c8544 100644 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ b/vendor/k8s.io/api/storage/v1/generated.proto @@ -31,7 +31,7 @@ option go_package = "v1"; // StorageClass describes the parameters for a class of storage for // which PersistentVolumes can be dynamically provisioned. -// +// // StorageClasses are non-namespaced; the name of the storage class // according to etcd is in ObjectMeta.Name. message StorageClass { @@ -88,3 +88,99 @@ message StorageClassList { repeated StorageClass items = 2; } +// VolumeAttachment captures the intent to attach or detach the specified volume +// to/from the specified node. +// +// VolumeAttachment objects are non-namespaced. +message VolumeAttachment { + // Standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired attach/detach volume behavior. + // Populated by the Kubernetes system. + optional VolumeAttachmentSpec spec = 2; + + // Status of the VolumeAttachment request. + // Populated by the entity completing the attach or detach + // operation, i.e. the external-attacher. + // +optional + optional VolumeAttachmentStatus status = 3; +} + +// VolumeAttachmentList is a collection of VolumeAttachment objects. +message VolumeAttachmentList { + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of VolumeAttachments + repeated VolumeAttachment items = 2; +} + +// VolumeAttachmentSource represents a volume that should be attached. +// Right now only PersistenVolumes can be attached via external attacher, +// in future we may allow also inline volumes in pods. +// Exactly one member can be set. +message VolumeAttachmentSource { + // Name of the persistent volume to attach. + // +optional + optional string persistentVolumeName = 1; +} + +// VolumeAttachmentSpec is the specification of a VolumeAttachment request. +message VolumeAttachmentSpec { + // Attacher indicates the name of the volume driver that MUST handle this + // request. This is the name returned by GetPluginName(). + optional string attacher = 1; + + // Source represents the volume that should be attached. + optional VolumeAttachmentSource source = 2; + + // The node that the volume should be attached to. + optional string nodeName = 3; +} + +// VolumeAttachmentStatus is the status of a VolumeAttachment request. +message VolumeAttachmentStatus { + // Indicates the volume is successfully attached. + // This field must only be set by the entity completing the attach + // operation, i.e. the external-attacher. + optional bool attached = 1; + + // Upon successful attach, this field is populated with any + // information returned by the attach operation that must be passed + // into subsequent WaitForAttach or Mount calls. + // This field must only be set by the entity completing the attach + // operation, i.e. the external-attacher. + // +optional + map attachmentMetadata = 2; + + // The last error encountered during attach operation, if any. + // This field must only be set by the entity completing the attach + // operation, i.e. the external-attacher. + // +optional + optional VolumeError attachError = 3; + + // The last error encountered during detach operation, if any. + // This field must only be set by the entity completing the detach + // operation, i.e. the external-attacher. + // +optional + optional VolumeError detachError = 4; +} + +// VolumeError captures an error encountered during a volume operation. +message VolumeError { + // Time the error was encountered. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1; + + // String detailing the error encountered during Attach or Detach operation. + // This string maybe logged, so it should not contain sensitive + // information. + // +optional + optional string message = 2; +} + diff --git a/vendor/k8s.io/api/storage/v1/register.go b/vendor/k8s.io/api/storage/v1/register.go index c058add8..473c6872 100644 --- a/vendor/k8s.io/api/storage/v1/register.go +++ b/vendor/k8s.io/api/storage/v1/register.go @@ -46,6 +46,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StorageClass{}, &StorageClassList{}, + + &VolumeAttachment{}, + &VolumeAttachmentList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go index 30e6d6d2..9f2f67b6 100644 --- a/vendor/k8s.io/api/storage/v1/types.go +++ b/vendor/k8s.io/api/storage/v1/types.go @@ -102,3 +102,110 @@ const ( // binding will occur during Pod scheduing. VolumeBindingWaitForFirstConsumer VolumeBindingMode = "WaitForFirstConsumer" ) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeAttachment captures the intent to attach or detach the specified volume +// to/from the specified node. +// +// VolumeAttachment objects are non-namespaced. +type VolumeAttachment struct { + metav1.TypeMeta `json:",inline"` + + // Standard object metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the desired attach/detach volume behavior. + // Populated by the Kubernetes system. + Spec VolumeAttachmentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // Status of the VolumeAttachment request. + // Populated by the entity completing the attach or detach + // operation, i.e. the external-attacher. + // +optional + Status VolumeAttachmentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeAttachmentList is a collection of VolumeAttachment objects. +type VolumeAttachmentList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of VolumeAttachments + Items []VolumeAttachment `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// VolumeAttachmentSpec is the specification of a VolumeAttachment request. +type VolumeAttachmentSpec struct { + // Attacher indicates the name of the volume driver that MUST handle this + // request. This is the name returned by GetPluginName(). + Attacher string `json:"attacher" protobuf:"bytes,1,opt,name=attacher"` + + // Source represents the volume that should be attached. + Source VolumeAttachmentSource `json:"source" protobuf:"bytes,2,opt,name=source"` + + // The node that the volume should be attached to. + NodeName string `json:"nodeName" protobuf:"bytes,3,opt,name=nodeName"` +} + +// VolumeAttachmentSource represents a volume that should be attached. +// Right now only PersistenVolumes can be attached via external attacher, +// in future we may allow also inline volumes in pods. +// Exactly one member can be set. +type VolumeAttachmentSource struct { + // Name of the persistent volume to attach. + // +optional + PersistentVolumeName *string `json:"persistentVolumeName,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeName"` + + // Placeholder for *VolumeSource to accommodate inline volumes in pods. +} + +// VolumeAttachmentStatus is the status of a VolumeAttachment request. +type VolumeAttachmentStatus struct { + // Indicates the volume is successfully attached. + // This field must only be set by the entity completing the attach + // operation, i.e. the external-attacher. + Attached bool `json:"attached" protobuf:"varint,1,opt,name=attached"` + + // Upon successful attach, this field is populated with any + // information returned by the attach operation that must be passed + // into subsequent WaitForAttach or Mount calls. + // This field must only be set by the entity completing the attach + // operation, i.e. the external-attacher. + // +optional + AttachmentMetadata map[string]string `json:"attachmentMetadata,omitempty" protobuf:"bytes,2,rep,name=attachmentMetadata"` + + // The last error encountered during attach operation, if any. + // This field must only be set by the entity completing the attach + // operation, i.e. the external-attacher. + // +optional + AttachError *VolumeError `json:"attachError,omitempty" protobuf:"bytes,3,opt,name=attachError,casttype=VolumeError"` + + // The last error encountered during detach operation, if any. + // This field must only be set by the entity completing the detach + // operation, i.e. the external-attacher. + // +optional + DetachError *VolumeError `json:"detachError,omitempty" protobuf:"bytes,4,opt,name=detachError,casttype=VolumeError"` +} + +// VolumeError captures an error encountered during a volume operation. +type VolumeError struct { + // Time the error was encountered. + // +optional + Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"` + + // String detailing the error encountered during Attach or Detach operation. + // This string maybe logged, so it should not contain sensitive + // information. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` +} diff --git a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index 23b76e28..d4a022d5 100644 --- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -53,4 +53,67 @@ func (StorageClassList) SwaggerDoc() map[string]string { return map_StorageClassList } +var map_VolumeAttachment = map[string]string{ + "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + "status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", +} + +func (VolumeAttachment) SwaggerDoc() map[string]string { + return map_VolumeAttachment +} + +var map_VolumeAttachmentList = map[string]string{ + "": "VolumeAttachmentList is a collection of VolumeAttachment objects.", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "items": "Items is the list of VolumeAttachments", +} + +func (VolumeAttachmentList) SwaggerDoc() map[string]string { + return map_VolumeAttachmentList +} + +var map_VolumeAttachmentSource = map[string]string{ + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "persistentVolumeName": "Name of the persistent volume to attach.", +} + +func (VolumeAttachmentSource) SwaggerDoc() map[string]string { + return map_VolumeAttachmentSource +} + +var map_VolumeAttachmentSpec = map[string]string{ + "": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + "attacher": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + "source": "Source represents the volume that should be attached.", + "nodeName": "The node that the volume should be attached to.", +} + +func (VolumeAttachmentSpec) SwaggerDoc() map[string]string { + return map_VolumeAttachmentSpec +} + +var map_VolumeAttachmentStatus = map[string]string{ + "": "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + "attached": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "attachmentMetadata": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "attachError": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "detachError": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", +} + +func (VolumeAttachmentStatus) SwaggerDoc() map[string]string { + return map_VolumeAttachmentStatus +} + +var map_VolumeError = map[string]string{ + "": "VolumeError captures an error encountered during a volume operation.", + "time": "Time the error was encountered.", + "message": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.", +} + +func (VolumeError) SwaggerDoc() map[string]string { + return map_VolumeError +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go index 0e850dc3..3157ec67 100644 --- a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go @@ -117,3 +117,152 @@ func (in *StorageClassList) DeepCopyObject() runtime.Object { } return nil } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAttachment) DeepCopyInto(out *VolumeAttachment) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachment. +func (in *VolumeAttachment) DeepCopy() *VolumeAttachment { + if in == nil { + return nil + } + out := new(VolumeAttachment) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeAttachment) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAttachmentList) DeepCopyInto(out *VolumeAttachmentList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VolumeAttachment, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentList. +func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList { + if in == nil { + return nil + } + out := new(VolumeAttachmentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) { + *out = *in + if in.PersistentVolumeName != nil { + in, out := &in.PersistentVolumeName, &out.PersistentVolumeName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSource. +func (in *VolumeAttachmentSource) DeepCopy() *VolumeAttachmentSource { + if in == nil { + return nil + } + out := new(VolumeAttachmentSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAttachmentSpec) DeepCopyInto(out *VolumeAttachmentSpec) { + *out = *in + in.Source.DeepCopyInto(&out.Source) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentSpec. +func (in *VolumeAttachmentSpec) DeepCopy() *VolumeAttachmentSpec { + if in == nil { + return nil + } + out := new(VolumeAttachmentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) { + *out = *in + if in.AttachmentMetadata != nil { + in, out := &in.AttachmentMetadata, &out.AttachmentMetadata + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AttachError != nil { + in, out := &in.AttachError, &out.AttachError + *out = new(VolumeError) + (*in).DeepCopyInto(*out) + } + if in.DetachError != nil { + in, out := &in.DetachError, &out.DetachError + *out = new(VolumeError) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeAttachmentStatus. +func (in *VolumeAttachmentStatus) DeepCopy() *VolumeAttachmentStatus { + if in == nil { + return nil + } + out := new(VolumeAttachmentStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeError) DeepCopyInto(out *VolumeError) { + *out = *in + in.Time.DeepCopyInto(&out.Time) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeError. +func (in *VolumeError) DeepCopy() *VolumeError { + if in == nil { + return nil + } + out := new(VolumeError) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto index ccb94754..fdc4ad25 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -30,7 +30,7 @@ option go_package = "v1alpha1"; // VolumeAttachment captures the intent to attach or detach the specified volume // to/from the specified node. -// +// // VolumeAttachment objects are non-namespaced. message VolumeAttachment { // Standard object metadata. diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto index ecf53bef..db1f302a 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -31,7 +31,7 @@ option go_package = "v1beta1"; // StorageClass describes the parameters for a class of storage for // which PersistentVolumes can be dynamically provisioned. -// +// // StorageClasses are non-namespaced; the name of the storage class // according to etcd is in ObjectMeta.Name. message StorageClass { @@ -90,7 +90,7 @@ message StorageClassList { // VolumeAttachment captures the intent to attach or detach the specified volume // to/from the specified node. -// +// // VolumeAttachment objects are non-namespaced. message VolumeAttachment { // Standard object metadata. diff --git a/vendor/k8s.io/apimachinery/Godeps/Godeps.json b/vendor/k8s.io/apimachinery/Godeps/Godeps.json index cb500974..82e51c66 100644 --- a/vendor/k8s.io/apimachinery/Godeps/Godeps.json +++ b/vendor/k8s.io/apimachinery/Godeps/Godeps.json @@ -26,10 +26,6 @@ "ImportPath": "github.com/evanphx/json-patch", "Rev": "36442dbdb585210f8d5a1b45e67aa323c197d5c4" }, - { - "ImportPath": "github.com/ghodss/yaml", - "Rev": "c7ce16629ff4cd059ed96ed06419dd3856fd3577" - }, { "ImportPath": "github.com/gogo/protobuf/proto", "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" @@ -38,10 +34,6 @@ "ImportPath": "github.com/gogo/protobuf/sortkeys", "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" }, - { - "ImportPath": "github.com/golang/glog", - "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" - }, { "ImportPath": "github.com/golang/groupcache/lru", "Rev": "02826c3e79038b59d737d3b1c0a1d937f71a4433" @@ -92,7 +84,7 @@ }, { "ImportPath": "github.com/json-iterator/go", - "Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682" + "Rev": "ab8a2e0c74be9d3be70b3184d9acc634935ded82" }, { "ImportPath": "github.com/modern-go/concurrent", @@ -128,31 +120,31 @@ }, { "ImportPath": "golang.org/x/net/html", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/html/atom", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/http2", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/http2/hpack", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/idna", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/lex/httplex", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/net/websocket", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "Rev": "0ed95abb35c445290478a5348a7b38bb154135fd" }, { "ImportPath": "golang.org/x/text/secure/bidirule", @@ -178,9 +170,17 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "5420a8b6744d3b0345ab293f6fcba19c978f1183" }, + { + "ImportPath": "k8s.io/klog", + "Rev": "8139d8cb77af419532b33dfa7dd09fbc5f1d344f" + }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" + "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + }, + { + "ImportPath": "sigs.k8s.io/yaml", + "Rev": "fd68e9863619f6ec2fdd8625fe1f02e7c877e480" } ] } diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go index bcc032df..e736a986 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" "net/http" + "reflect" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -82,7 +83,20 @@ func (u *UnexpectedObjectError) Error() string { func FromObject(obj runtime.Object) error { switch t := obj.(type) { case *metav1.Status: - return &StatusError{*t} + return &StatusError{ErrStatus: *t} + case runtime.Unstructured: + var status metav1.Status + obj := t.UnstructuredContent() + if !reflect.DeepEqual(obj["kind"], "Status") { + break + } + if err := runtime.DefaultUnstructuredConverter.FromUnstructured(t.UnstructuredContent(), &status); err != nil { + return err + } + if status.APIVersion != "v1" && status.APIVersion != "meta.k8s.io/v1" { + break + } + return &StatusError{ErrStatus: status} } return &UnexpectedObjectError{obj} } diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index 854bd30f..6fe7458f 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -20,7 +20,7 @@ import ( "fmt" "reflect" - "github.com/golang/glog" + "k8s.io/klog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" @@ -607,7 +607,7 @@ func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference { var ret []metav1.OwnerReference s := a.ownerReferences if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice { - glog.Errorf("expect %v to be a pointer to slice", s) + klog.Errorf("expect %v to be a pointer to slice", s) return ret } s = s.Elem() @@ -615,7 +615,7 @@ func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference { ret = make([]metav1.OwnerReference, s.Len(), s.Len()+1) for i := 0; i < s.Len(); i++ { if err := extractFromOwnerReference(s.Index(i), &ret[i]); err != nil { - glog.Errorf("extractFromOwnerReference failed: %v", err) + klog.Errorf("extractFromOwnerReference failed: %v", err) return ret } } @@ -625,13 +625,13 @@ func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference { func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) { s := a.ownerReferences if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice { - glog.Errorf("expect %v to be a pointer to slice", s) + klog.Errorf("expect %v to be a pointer to slice", s) } s = s.Elem() newReferences := reflect.MakeSlice(s.Type(), len(references), len(references)) for i := 0; i < len(references); i++ { if err := setOwnerReference(newReferences.Index(i), &references[i]); err != nil { - glog.Errorf("setOwnerReference failed: %v", err) + klog.Errorf("setOwnerReference failed: %v", err) return } } diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go index a08b42b8..ede58c25 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go @@ -24,7 +24,7 @@ import ( ) // TestOnlyStaticRESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order: -// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy +// 1. legacy kube group preferred version, extensions preferred version, metrics preferred version, legacy // kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version, // all other groups alphabetical. // TODO callers of this method should be updated to build their own specific restmapper based on their scheme for their tests diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto index 2c615d51..acc90444 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -27,9 +27,9 @@ option go_package = "resource"; // Quantity is a fixed-point representation of a number. // It provides convenient marshaling/unmarshaling in JSON and YAML, // in addition to String() and Int64() accessors. -// +// // The serialization format is: -// +// // ::= // (Note that may be empty, from the "" case in .) // ::= 0 | 1 | ... | 9 @@ -43,16 +43,16 @@ option go_package = "resource"; // ::= m | "" | k | M | G | T | P | E // (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) // ::= "e" | "E" -// +// // No matter which of the three exponent forms is used, no quantity may represent // a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal // places. Numbers larger or more precise will be capped or rounded up. // (E.g.: 0.1m will rounded up to 1m.) // This may be extended in the future if we require larger or smaller quantities. -// +// // When a Quantity is parsed from a string, it will remember the type of suffix // it had, and will use the same type again when it is serialized. -// +// // Before serializing, Quantity will be put in "canonical form". // This means that Exponent/suffix will be adjusted up or down (with a // corresponding increase or decrease in Mantissa) such that: @@ -60,22 +60,22 @@ option go_package = "resource"; // b. No fractional digits will be emitted // c. The exponent (or suffix) is as large as possible. // The sign will be omitted unless the number is negative. -// +// // Examples: // 1.5 will be serialized as "1500m" // 1.5Gi will be serialized as "1536Mi" -// +// // Note that the quantity will NEVER be internally represented by a // floating point number. That is the whole point of this exercise. -// +// // Non-canonical values will still parse as long as they are well formed, // but will be re-emitted in their canonical form. (So always use canonical // form, or don't diff.) -// +// // This format is intended to make it difficult to use these numbers without // writing some sort of special handling code in the hopes that that will // cause implementors to also use a fixed point implementation. -// +// // +protobuf=true // +protobuf.embed=string // +protobuf.options.marshal=false diff --git a/vendor/k8s.io/apimachinery/pkg/apis/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/OWNERS new file mode 100644 index 00000000..bae178f8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/OWNERS @@ -0,0 +1,9 @@ +# Disable inheritance as this is an api owners file +options: + no_parent_owners: true +approvers: +- api-approvers +reviewers: +- api-reviewers +labels: +- kind/api-change diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go index 7230cb28..34ca6b5d 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) type DurationHolder struct { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index eb3237f2..989f076a 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -107,7 +107,7 @@ message APIResourceList { // APIVersions lists the versions that are available, to allow clients to // discover the API at /api, which is the root path of the legacy v1 API. -// +// // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message APIVersions { @@ -211,7 +211,7 @@ message GetOptions { // GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying // concepts during lookup stages without having partially valid types -// +// // +protobuf.options.(gogoproto.goproto_stringer)=false message GroupKind { optional string group = 1; @@ -221,7 +221,7 @@ message GroupKind { // GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying // concepts during lookup stages without having partially valid types -// +// // +protobuf.options.(gogoproto.goproto_stringer)=false message GroupResource { optional string group = 1; @@ -230,7 +230,7 @@ message GroupResource { } // GroupVersion contains the "group" and the "version", which uniquely identifies the API. -// +// // +protobuf.options.(gogoproto.goproto_stringer)=false message GroupVersion { optional string group = 1; @@ -251,7 +251,7 @@ message GroupVersionForDiscovery { // GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion // to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// +// // +protobuf.options.(gogoproto.goproto_stringer)=false message GroupVersionKind { optional string group = 1; @@ -263,7 +263,7 @@ message GroupVersionKind { // GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion // to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// +// // +protobuf.options.(gogoproto.goproto_stringer)=false message GroupVersionResource { optional string group = 1; @@ -411,7 +411,7 @@ message ListOptions { // more results are available. Servers may choose not to support the limit argument and will return // all of the available results. If limit is specified and the continue field is empty, clients may // assume that no more results are available. This field is not supported if watch is true. - // + // // The server guarantees that the objects returned when using continue will be identical to issuing // a single list call without a limit - that is, no objects created, modified, or deleted after the // first request is issued will be included in any subsequent continued requests. This is sometimes @@ -432,14 +432,14 @@ message ListOptions { // a list starting from the next key, but from the latest snapshot, which is inconsistent from the // previous list results - objects that are created, modified, or deleted after the first list request // will be included in the response, as long as their keys are after the "next key". - // + // // This field is not supported when watch is true. Clients may start a watch from the last // resourceVersion value returned by the server and not miss any modifications. optional string continue = 8; } // MicroTime is version of Time with microsecond level precision. -// +// // +protobuf.options.marshal=false // +protobuf.as=Timestamp // +protobuf.options.(gogoproto.goproto_stringer)=false @@ -475,12 +475,12 @@ message ObjectMeta { // The provided value has the same validation rules as the Name field, // and may be truncated by the length of the suffix required to make the value // unique on the server. - // + // // If this field is specified and the generated name exists, the server will // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason // ServerTimeout indicating a unique name could not be found in the time allotted, and the client // should retry (optionally after the time indicated in the Retry-After header). - // + // // Applied only if Name is not specified. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency // +optional @@ -490,7 +490,7 @@ message ObjectMeta { // equivalent to the "default" namespace, but "default" is the canonical representation. // Not all objects are required to be scoped to a namespace - the value of this field for // those objects will be empty. - // + // // Must be a DNS_LABEL. // Cannot be updated. // More info: http://kubernetes.io/docs/user-guide/namespaces @@ -506,7 +506,7 @@ message ObjectMeta { // UID is the unique in time and space value for this object. It is typically generated by // the server on successful creation of a resource and is not allowed to change on PUT // operations. - // + // // Populated by the system. // Read-only. // More info: http://kubernetes.io/docs/user-guide/identifiers#uids @@ -518,7 +518,7 @@ message ObjectMeta { // concurrency, change detection, and the watch operation on a resource or set of resources. // Clients must treat these values as opaque and passed unmodified back to the server. // They may only be valid for a particular resource or set of resources. - // + // // Populated by the system. // Read-only. // Value must be treated as opaque by clients and . @@ -534,7 +534,7 @@ message ObjectMeta { // CreationTimestamp is a timestamp representing the server time when this object was // created. It is not guaranteed to be set in happens-before order across separate operations. // Clients may not set this value. It is represented in RFC3339 form and is in UTC. - // + // // Populated by the system. // Read-only. // Null for lists. @@ -556,7 +556,7 @@ message ObjectMeta { // exist after this timestamp, until an administrator or automated process can determine the // resource is fully terminated. // If not set, graceful deletion of the object has not been requested. - // + // // Populated by the system when a graceful deletion is requested. // Read-only. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata @@ -598,7 +598,7 @@ message ObjectMeta { // this object has been completely initialized. Otherwise, the object is considered uninitialized // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to // observe uninitialized objects. - // + // // When an object is created, the system will populate this list with the current set of initializers. // Only privileged users may set or modify this list. Once it is empty, it may not be modified further // by any user. @@ -620,8 +620,8 @@ message ObjectMeta { } // OwnerReference contains enough information to let you identify an owning -// object. Currently, an owning object must be in the same namespace, so there -// is no namespace field. +// object. An owning object must be in the same namespace as the dependent, or +// be cluster-scoped, so there is no namespace field. message OwnerReference { // API version of the referent. optional string apiVersion = 5; @@ -734,7 +734,7 @@ message StatusCause { // Arrays are zero-indexed. Fields may appear more than once in an array of // causes due to fields having multiple errors. // Optional. - // + // // Examples: // "name" - the field "name" on the current resource // "items[0].name" - the field "name" on the first array entry in "items" @@ -785,7 +785,7 @@ message StatusDetails { // Time is a wrapper around time.Time which supports correct // marshaling to YAML and JSON. Wrappers are provided for many // of the factory methods that the time package offers. -// +// // +protobuf.options.marshal=false // +protobuf.as=Timestamp // +protobuf.options.(gogoproto.goproto_stringer)=false @@ -821,7 +821,7 @@ message Timestamp { // TypeMeta describes an individual object in an API response or request // with strings representing the type of the object and its API schema version. // Structures that are versioned or persisted should inline TypeMeta. -// +// // +k8s:deepcopy-gen=false message TypeMeta { // Kind is a string value representing the REST resource this object represents. @@ -852,7 +852,7 @@ message UpdateOptions { } // Verbs masks the value so protobuf can generate -// +// // +protobuf.nullable=true // +protobuf.options.(gogoproto.goproto_stringer)=false message Verbs { @@ -862,7 +862,7 @@ message Verbs { } // Event represents a single event to a watched resource. -// +// // +protobuf=true // +k8s:deepcopy-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go index 985aa70b..b08e3f23 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) type MicroTimeHolder struct { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go index 0bf6c360..7ade16f6 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) type TimeHolder struct { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 4d3a55d7..8f488ba7 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -286,8 +286,8 @@ const ( ) // OwnerReference contains enough information to let you identify an owning -// object. Currently, an owning object must be in the same namespace, so there -// is no namespace field. +// object. An owning object must be in the same namespace as the dependent, or +// be cluster-scoped, so there is no namespace field. type OwnerReference struct { // API version of the referent. APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 35e800f8..679e709e 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -240,7 +240,7 @@ func (ObjectMeta) SwaggerDoc() map[string]string { } var map_OwnerReference = map[string]string{ - "": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", "apiVersion": "API version of the referent.", "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go index 374d2ef1..f5a08889 100644 --- a/vendor/k8s.io/apimachinery/pkg/labels/selector.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -23,10 +23,10 @@ import ( "strconv" "strings" - "github.com/golang/glog" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/klog" ) // Requirements is AND of all requirements. @@ -211,13 +211,13 @@ func (r *Requirement) Matches(ls Labels) bool { } lsValue, err := strconv.ParseInt(ls.Get(r.key), 10, 64) if err != nil { - glog.V(10).Infof("ParseInt failed for value %+v in label %+v, %+v", ls.Get(r.key), ls, err) + klog.V(10).Infof("ParseInt failed for value %+v in label %+v, %+v", ls.Get(r.key), ls, err) return false } // There should be only one strValue in r.strValues, and can be converted to a integer. if len(r.strValues) != 1 { - glog.V(10).Infof("Invalid values count %+v of requirement %#v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r) + klog.V(10).Infof("Invalid values count %+v of requirement %#v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r) return false } @@ -225,7 +225,7 @@ func (r *Requirement) Matches(ls Labels) bool { for i := range r.strValues { rValue, err = strconv.ParseInt(r.strValues[i], 10, 64) if err != nil { - glog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", r.strValues[i], r) + klog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", r.strValues[i], r) return false } } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go index 291d7a4e..dff56e03 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/util/json" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "github.com/golang/glog" + "k8s.io/klog" ) // UnstructuredConverter is an interface for converting between interface{} @@ -133,10 +133,10 @@ func (c *unstructuredConverter) FromUnstructured(u map[string]interface{}, obj i newObj := reflect.New(t.Elem()).Interface() newErr := fromUnstructuredViaJSON(u, newObj) if (err != nil) != (newErr != nil) { - glog.Fatalf("FromUnstructured unexpected error for %v: error: %v", u, err) + klog.Fatalf("FromUnstructured unexpected error for %v: error: %v", u, err) } if err == nil && !c.comparison.DeepEqual(obj, newObj) { - glog.Fatalf("FromUnstructured mismatch\nobj1: %#v\nobj2: %#v", obj, newObj) + klog.Fatalf("FromUnstructured mismatch\nobj1: %#v\nobj2: %#v", obj, newObj) } } return err @@ -424,10 +424,10 @@ func (c *unstructuredConverter) ToUnstructured(obj interface{}) (map[string]inte newUnstr := map[string]interface{}{} newErr := toUnstructuredViaJSON(obj, &newUnstr) if (err != nil) != (newErr != nil) { - glog.Fatalf("ToUnstructured unexpected error for %v: error: %v; newErr: %v", obj, err, newErr) + klog.Fatalf("ToUnstructured unexpected error for %v: error: %v; newErr: %v", obj, err, newErr) } if err == nil && !c.comparison.DeepEqual(u, newUnstr) { - glog.Fatalf("ToUnstructured mismatch\nobj1: %#v\nobj2: %#v", u, newUnstr) + klog.Fatalf("ToUnstructured mismatch\nobj1: %#v\nobj2: %#v", u, newUnstr) } } if err != nil { diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto index fb61ac96..0e212ec9 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto @@ -25,11 +25,11 @@ package k8s.io.apimachinery.pkg.runtime; option go_package = "runtime"; // RawExtension is used to hold extensions in external versions. -// +// // To use this, make a field which has RawExtension as its type in your external, versioned // struct, and Object in your internal struct. You also need to register your // various plugin types. -// +// // // Internal package: // type MyAPIObject struct { // runtime.TypeMeta `json:",inline"` @@ -38,7 +38,7 @@ option go_package = "runtime"; // type PluginA struct { // AOption string `json:"aOption"` // } -// +// // // External package: // type MyAPIObject struct { // runtime.TypeMeta `json:",inline"` @@ -47,7 +47,7 @@ option go_package = "runtime"; // type PluginA struct { // AOption string `json:"aOption"` // } -// +// // // On the wire, the JSON will look something like this: // { // "kind":"MyAPIObject", @@ -57,7 +57,7 @@ option go_package = "runtime"; // "aOption":"foo", // }, // } -// +// // So what happens? Decode first uses json or yaml to unmarshal the serialized data into // your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. // The next step is to copy (using pkg/conversion) into the internal struct. The runtime @@ -65,13 +65,13 @@ option go_package = "runtime"; // JSON stored in RawExtension, turning it into the correct object type, and storing it // in the Object. (TODO: In the case where the object is of an unknown type, a // runtime.Unknown object will be created and stored.) -// +// // +k8s:deepcopy-gen=true // +protobuf=true // +k8s:openapi-gen=true message RawExtension { // Raw is the underlying serialization of this object. - // + // // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. optional bytes raw = 1; } @@ -83,10 +83,10 @@ message RawExtension { // ... // other fields // } // func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind -// +// // TypeMeta is provided here for convenience. You may use it directly from this package or define // your own with the same fields. -// +// // +k8s:deepcopy-gen=false // +protobuf=true // +k8s:openapi-gen=true @@ -103,7 +103,7 @@ message TypeMeta { // TypeMeta features-- kind, version, etc. // TODO: Make this object have easy access to field based accessors and settors for // metadata and field mutatation. -// +// // +k8s:deepcopy-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +protobuf=true diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go index d27da113..90a2962b 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go @@ -32,9 +32,9 @@ import ( serializertesting "k8s.io/apimachinery/pkg/runtime/serializer/testing" "k8s.io/apimachinery/pkg/util/diff" - "github.com/ghodss/yaml" "github.com/google/gofuzz" flag "github.com/spf13/pflag" + "sigs.k8s.io/yaml" ) var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go index 382c4858..8987e74c 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go @@ -22,9 +22,9 @@ import ( "strconv" "unsafe" - "github.com/ghodss/yaml" jsoniter "github.com/json-iterator/go" "github.com/modern-go/reflect2" + "sigs.k8s.io/yaml" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go index a5ae3ac4..00184710 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go @@ -18,6 +18,7 @@ package versioning import ( "io" + "reflect" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" @@ -90,7 +91,16 @@ func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into ru into = versioned.Last() } - obj, gvk, err := c.decoder.Decode(data, defaultGVK, into) + // If the into object is unstructured and expresses an opinion about its group/version, + // create a new instance of the type so we always exercise the conversion path (skips short-circuiting on `into == obj`) + decodeInto := into + if into != nil { + if _, ok := into.(runtime.Unstructured); ok && !into.GetObjectKind().GroupVersionKind().GroupVersion().Empty() { + decodeInto = reflect.New(reflect.TypeOf(into).Elem()).Interface().(runtime.Object) + } + } + + obj, gvk, err := c.decoder.Decode(data, defaultGVK, decodeInto) if err != nil { return nil, gvk, err } diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go index 7c9b791d..50d9a366 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go @@ -136,12 +136,12 @@ func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []strin negotiatedProtocol := negotiateProtocol(clientProtocols, serverProtocols) if len(negotiatedProtocol) == 0 { - w.WriteHeader(http.StatusForbidden) for i := range serverProtocols { w.Header().Add(HeaderAcceptedProtocolVersions, serverProtocols[i]) } - fmt.Fprintf(w, "unable to upgrade: unable to negotiate protocol: client supports %v, server accepts %v", clientProtocols, serverProtocols) - return "", fmt.Errorf("unable to upgrade: unable to negotiate protocol: client supports %v, server supports %v", clientProtocols, serverProtocols) + err := fmt.Errorf("unable to upgrade: unable to negotiate protocol: client supports %v, server accepts %v", clientProtocols, serverProtocols) + http.Error(w, err.Error(), http.StatusForbidden) + return "", err } w.Header().Add(HeaderProtocolVersion, negotiatedProtocol) diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go index 3dc8e23a..9d222faa 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go @@ -23,8 +23,8 @@ import ( "time" "github.com/docker/spdystream" - "github.com/golang/glog" "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/klog" ) // connection maintains state about a spdystream.Connection and its associated @@ -128,7 +128,7 @@ func (c *connection) newSpdyStream(stream *spdystream.Stream) { err := c.newStreamHandler(stream, replySent) rejectStream := (err != nil) if rejectStream { - glog.Warningf("Stream rejected: %v", err) + klog.Warningf("Stream rejected: %v", err) stream.Reset() return } diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go index 13353988..045d214d 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go @@ -74,15 +74,15 @@ func (u responseUpgrader) UpgradeResponse(w http.ResponseWriter, req *http.Reque connectionHeader := strings.ToLower(req.Header.Get(httpstream.HeaderConnection)) upgradeHeader := strings.ToLower(req.Header.Get(httpstream.HeaderUpgrade)) if !strings.Contains(connectionHeader, strings.ToLower(httpstream.HeaderUpgrade)) || !strings.Contains(upgradeHeader, strings.ToLower(HeaderSpdy31)) { - w.WriteHeader(http.StatusBadRequest) - fmt.Fprintf(w, "unable to upgrade: missing upgrade headers in request: %#v", req.Header) + errorMsg := fmt.Sprintf("unable to upgrade: missing upgrade headers in request: %#v", req.Header) + http.Error(w, errorMsg, http.StatusBadRequest) return nil } hijacker, ok := w.(http.Hijacker) if !ok { - w.WriteHeader(http.StatusInternalServerError) - fmt.Fprintf(w, "unable to upgrade: unable to hijack response") + errorMsg := fmt.Sprintf("unable to upgrade: unable to hijack response") + http.Error(w, errorMsg, http.StatusInternalServerError) return nil } diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto index 1c3ec732..e79fb9e5 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto @@ -29,7 +29,7 @@ option go_package = "intstr"; // inner type. This allows you to have, for example, a JSON field that can // accept a name or number. // TODO: Rename to Int32OrString -// +// // +protobuf=true // +protobuf.options.(gogoproto.goproto_stringer)=false // +k8s:openapi-gen=true diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go index 642b83ce..5b26ed26 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -25,8 +25,8 @@ import ( "strconv" "strings" - "github.com/golang/glog" "github.com/google/gofuzz" + "k8s.io/klog" ) // IntOrString is a type that can hold an int32 or a string. When used in @@ -58,7 +58,7 @@ const ( // TODO: convert to (val int32) func FromInt(val int) IntOrString { if val > math.MaxInt32 || val < math.MinInt32 { - glog.Errorf("value: %d overflows int32\n%s\n", val, debug.Stack()) + klog.Errorf("value: %d overflows int32\n%s\n", val, debug.Stack()) } return IntOrString{Type: Int, IntVal: int32(val)} } diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go index 690fe2d5..f6e08298 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) func TestFromInt(t *testing.T) { diff --git a/vendor/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go b/vendor/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go index 9672deaa..25435206 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go +++ b/vendor/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go @@ -23,8 +23,8 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/evanphx/json-patch" - "github.com/ghodss/yaml" "k8s.io/apimachinery/pkg/util/json" + "sigs.k8s.io/yaml" ) type FilterNullTestCases struct { diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go index d09a939b..990fa0d4 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go +++ b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go @@ -21,7 +21,7 @@ import ( "reflect" "github.com/davecgh/go-spew/spew" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) // PreconditionFunc asserts that an incompatible change is not present within a patch. diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go index 7c2a5e62..155667cd 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -31,8 +31,8 @@ import ( "strconv" "strings" - "github.com/golang/glog" "golang.org/x/net/http2" + "k8s.io/klog" ) // JoinPreservingTrailingSlash does a path.Join of the specified elements, @@ -107,10 +107,10 @@ func SetTransportDefaults(t *http.Transport) *http.Transport { t = SetOldTransportDefaults(t) // Allow clients to disable http2 if needed. if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { - glog.Infof("HTTP2 has been explicitly disabled") + klog.Infof("HTTP2 has been explicitly disabled") } else { if err := http2.ConfigureTransport(t); err != nil { - glog.Warningf("Transport failed http2 configuration: %v", err) + klog.Warningf("Transport failed http2 configuration: %v", err) } } return t @@ -368,7 +368,7 @@ redirectLoop: resp, err := http.ReadResponse(respReader, nil) if err != nil { // Unable to read the backend response; let the client handle it. - glog.Warningf("Error reading backend response: %v", err) + klog.Warningf("Error reading backend response: %v", err) break redirectLoop } diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/interface.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go index 0ab9b360..daf5d249 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/interface.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go @@ -26,7 +26,7 @@ import ( "strings" - "github.com/golang/glog" + "k8s.io/klog" ) type AddressFamily uint @@ -193,7 +193,7 @@ func isInterfaceUp(intf *net.Interface) bool { return false } if intf.Flags&net.FlagUp != 0 { - glog.V(4).Infof("Interface %v is up", intf.Name) + klog.V(4).Infof("Interface %v is up", intf.Name) return true } return false @@ -208,20 +208,20 @@ func isLoopbackOrPointToPoint(intf *net.Interface) bool { func getMatchingGlobalIP(addrs []net.Addr, family AddressFamily) (net.IP, error) { if len(addrs) > 0 { for i := range addrs { - glog.V(4).Infof("Checking addr %s.", addrs[i].String()) + klog.V(4).Infof("Checking addr %s.", addrs[i].String()) ip, _, err := net.ParseCIDR(addrs[i].String()) if err != nil { return nil, err } if memberOf(ip, family) { if ip.IsGlobalUnicast() { - glog.V(4).Infof("IP found %v", ip) + klog.V(4).Infof("IP found %v", ip) return ip, nil } else { - glog.V(4).Infof("Non-global unicast address found %v", ip) + klog.V(4).Infof("Non-global unicast address found %v", ip) } } else { - glog.V(4).Infof("%v is not an IPv%d address", ip, int(family)) + klog.V(4).Infof("%v is not an IPv%d address", ip, int(family)) } } @@ -241,13 +241,13 @@ func getIPFromInterface(intfName string, forFamily AddressFamily, nw networkInte if err != nil { return nil, err } - glog.V(4).Infof("Interface %q has %d addresses :%v.", intfName, len(addrs), addrs) + klog.V(4).Infof("Interface %q has %d addresses :%v.", intfName, len(addrs), addrs) matchingIP, err := getMatchingGlobalIP(addrs, forFamily) if err != nil { return nil, err } if matchingIP != nil { - glog.V(4).Infof("Found valid IPv%d address %v for interface %q.", int(forFamily), matchingIP, intfName) + klog.V(4).Infof("Found valid IPv%d address %v for interface %q.", int(forFamily), matchingIP, intfName) return matchingIP, nil } } @@ -275,14 +275,14 @@ func chooseIPFromHostInterfaces(nw networkInterfacer) (net.IP, error) { return nil, fmt.Errorf("no interfaces found on host.") } for _, family := range []AddressFamily{familyIPv4, familyIPv6} { - glog.V(4).Infof("Looking for system interface with a global IPv%d address", uint(family)) + klog.V(4).Infof("Looking for system interface with a global IPv%d address", uint(family)) for _, intf := range intfs { if !isInterfaceUp(&intf) { - glog.V(4).Infof("Skipping: down interface %q", intf.Name) + klog.V(4).Infof("Skipping: down interface %q", intf.Name) continue } if isLoopbackOrPointToPoint(&intf) { - glog.V(4).Infof("Skipping: LB or P2P interface %q", intf.Name) + klog.V(4).Infof("Skipping: LB or P2P interface %q", intf.Name) continue } addrs, err := nw.Addrs(&intf) @@ -290,7 +290,7 @@ func chooseIPFromHostInterfaces(nw networkInterfacer) (net.IP, error) { return nil, err } if len(addrs) == 0 { - glog.V(4).Infof("Skipping: no addresses on interface %q", intf.Name) + klog.V(4).Infof("Skipping: no addresses on interface %q", intf.Name) continue } for _, addr := range addrs { @@ -299,15 +299,15 @@ func chooseIPFromHostInterfaces(nw networkInterfacer) (net.IP, error) { return nil, fmt.Errorf("Unable to parse CIDR for interface %q: %s", intf.Name, err) } if !memberOf(ip, family) { - glog.V(4).Infof("Skipping: no address family match for %q on interface %q.", ip, intf.Name) + klog.V(4).Infof("Skipping: no address family match for %q on interface %q.", ip, intf.Name) continue } // TODO: Decide if should open up to allow IPv6 LLAs in future. if !ip.IsGlobalUnicast() { - glog.V(4).Infof("Skipping: non-global address %q on interface %q.", ip, intf.Name) + klog.V(4).Infof("Skipping: non-global address %q on interface %q.", ip, intf.Name) continue } - glog.V(4).Infof("Found global unicast address %q on interface %q.", ip, intf.Name) + klog.V(4).Infof("Found global unicast address %q on interface %q.", ip, intf.Name) return ip, nil } } @@ -381,23 +381,23 @@ func getAllDefaultRoutes() ([]Route, error) { // an IPv4 IP, and then will look at each IPv6 route for an IPv6 IP. func chooseHostInterfaceFromRoute(routes []Route, nw networkInterfacer) (net.IP, error) { for _, family := range []AddressFamily{familyIPv4, familyIPv6} { - glog.V(4).Infof("Looking for default routes with IPv%d addresses", uint(family)) + klog.V(4).Infof("Looking for default routes with IPv%d addresses", uint(family)) for _, route := range routes { if route.Family != family { continue } - glog.V(4).Infof("Default route transits interface %q", route.Interface) + klog.V(4).Infof("Default route transits interface %q", route.Interface) finalIP, err := getIPFromInterface(route.Interface, family, nw) if err != nil { return nil, err } if finalIP != nil { - glog.V(4).Infof("Found active IP %v ", finalIP) + klog.V(4).Infof("Found active IP %v ", finalIP) return finalIP, nil } } } - glog.V(4).Infof("No active IP found by looking at default routes") + klog.V(4).Infof("No active IP found by looking at default routes") return nil, fmt.Errorf("unable to select an IP from default routes.") } diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go index 37a5be48..a59b24c8 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go @@ -24,7 +24,7 @@ import ( "net/http" "net/url" - "github.com/golang/glog" + "k8s.io/klog" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/third_party/forked/golang/netutil" @@ -35,7 +35,7 @@ func DialURL(ctx context.Context, url *url.URL, transport http.RoundTripper) (ne dialer, err := utilnet.DialerFor(transport) if err != nil { - glog.V(5).Infof("Unable to unwrap transport %T to get dialer: %v", transport, err) + klog.V(5).Infof("Unable to unwrap transport %T to get dialer: %v", transport, err) } switch url.Scheme { @@ -52,7 +52,7 @@ func DialURL(ctx context.Context, url *url.URL, transport http.RoundTripper) (ne var err error tlsConfig, err = utilnet.TLSClientConfig(transport) if err != nil { - glog.V(5).Infof("Unable to unwrap transport %T to get at TLS config: %v", transport, err) + klog.V(5).Infof("Unable to unwrap transport %T to get at TLS config: %v", transport, err) } if dialer != nil { @@ -64,7 +64,7 @@ func DialURL(ctx context.Context, url *url.URL, transport http.RoundTripper) (ne } if tlsConfig == nil { // tls.Client requires non-nil config - glog.Warningf("using custom dialer with no TLSClientConfig. Defaulting to InsecureSkipVerify") + klog.Warningf("using custom dialer with no TLSClientConfig. Defaulting to InsecureSkipVerify") // tls.Handshake() requires ServerName or InsecureSkipVerify tlsConfig = &tls.Config{ InsecureSkipVerify: true, diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go index 6c34ab52..3c8cf6da 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go @@ -27,9 +27,9 @@ import ( "path" "strings" - "github.com/golang/glog" "golang.org/x/net/html" "golang.org/x/net/html/atom" + "k8s.io/klog" "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" @@ -236,7 +236,7 @@ func (t *Transport) rewriteResponse(req *http.Request, resp *http.Response) (*ht // This is fine default: // Some encoding we don't understand-- don't try to parse this - glog.Errorf("Proxy encountered encoding %v for text/html; can't understand this so not fixing links.", encoding) + klog.Errorf("Proxy encountered encoding %v for text/html; can't understand this so not fixing links.", encoding) return resp, nil } @@ -245,7 +245,7 @@ func (t *Transport) rewriteResponse(req *http.Request, resp *http.Response) (*ht } err := rewriteHTML(reader, writer, urlRewriter) if err != nil { - glog.Errorf("Failed to rewrite URLs: %v", err) + klog.Errorf("Failed to rewrite URLs: %v", err) return resp, err } diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go index 269c5331..2cabb894 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go @@ -17,6 +17,7 @@ limitations under the License. package proxy import ( + "bufio" "bytes" "context" "fmt" @@ -34,8 +35,8 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "github.com/golang/glog" "github.com/mxk/go-flowrate/flowrate" + "k8s.io/klog" ) // UpgradeRequestRoundTripper provides an additional method to decorate a request @@ -235,7 +236,7 @@ func (h *UpgradeAwareHandler) ServeHTTP(w http.ResponseWriter, req *http.Request // tryUpgrade returns true if the request was handled. func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Request) bool { if !httpstream.IsUpgradeRequest(req) { - glog.V(6).Infof("Request was not an upgrade") + klog.V(6).Infof("Request was not an upgrade") return false } @@ -257,31 +258,43 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques // handles this in the non-upgrade path. utilnet.AppendForwardedForHeader(clone) if h.InterceptRedirects { - glog.V(6).Infof("Connecting to backend proxy (intercepting redirects) %s\n Headers: %v", &location, clone.Header) + klog.V(6).Infof("Connecting to backend proxy (intercepting redirects) %s\n Headers: %v", &location, clone.Header) backendConn, rawResponse, err = utilnet.ConnectWithRedirects(req.Method, &location, clone.Header, req.Body, utilnet.DialerFunc(h.DialForUpgrade), h.RequireSameHostRedirects) } else { - glog.V(6).Infof("Connecting to backend proxy (direct dial) %s\n Headers: %v", &location, clone.Header) + klog.V(6).Infof("Connecting to backend proxy (direct dial) %s\n Headers: %v", &location, clone.Header) clone.URL = &location backendConn, err = h.DialForUpgrade(clone) } if err != nil { - glog.V(6).Infof("Proxy connection error: %v", err) + klog.V(6).Infof("Proxy connection error: %v", err) h.Responder.Error(w, req, err) return true } defer backendConn.Close() + // determine the http response code from the backend by reading from rawResponse+backendConn + rawResponseCode, headerBytes, err := getResponseCode(io.MultiReader(bytes.NewReader(rawResponse), backendConn)) + if err != nil { + klog.V(6).Infof("Proxy connection error: %v", err) + h.Responder.Error(w, req, err) + return true + } + if len(headerBytes) > len(rawResponse) { + // we read beyond the bytes stored in rawResponse, update rawResponse to the full set of bytes read from the backend + rawResponse = headerBytes + } + // Once the connection is hijacked, the ErrorResponder will no longer work, so // hijacking should be the last step in the upgrade. requestHijacker, ok := w.(http.Hijacker) if !ok { - glog.V(6).Infof("Unable to hijack response writer: %T", w) + klog.V(6).Infof("Unable to hijack response writer: %T", w) h.Responder.Error(w, req, fmt.Errorf("request connection cannot be hijacked: %T", w)) return true } requestHijackedConn, _, err := requestHijacker.Hijack() if err != nil { - glog.V(6).Infof("Unable to hijack response: %v", err) + klog.V(6).Infof("Unable to hijack response: %v", err) h.Responder.Error(w, req, fmt.Errorf("error hijacking connection: %v", err)) return true } @@ -289,12 +302,23 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques // Forward raw response bytes back to client. if len(rawResponse) > 0 { - glog.V(6).Infof("Writing %d bytes to hijacked connection", len(rawResponse)) + klog.V(6).Infof("Writing %d bytes to hijacked connection", len(rawResponse)) if _, err = requestHijackedConn.Write(rawResponse); err != nil { utilruntime.HandleError(fmt.Errorf("Error proxying response from backend to client: %v", err)) } } + if rawResponseCode != http.StatusSwitchingProtocols { + // If the backend did not upgrade the request, finish echoing the response from the backend to the client and return, closing the connection. + klog.V(6).Infof("Proxy upgrade error, status code %d", rawResponseCode) + _, err := io.Copy(requestHijackedConn, backendConn) + if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { + klog.Errorf("Error proxying data from backend to client: %v", err) + } + // Indicate we handled the request + return true + } + // Proxy the connection. This is bidirectional, so we need a goroutine // to copy in each direction. Once one side of the connection exits, we // exit the function which performs cleanup and in the process closes @@ -311,7 +335,7 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques } _, err := io.Copy(writer, requestHijackedConn) if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { - glog.Errorf("Error proxying data from client to backend: %v", err) + klog.Errorf("Error proxying data from client to backend: %v", err) } close(writerComplete) }() @@ -325,7 +349,7 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques } _, err := io.Copy(requestHijackedConn, reader) if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { - glog.Errorf("Error proxying data from backend to client: %v", err) + klog.Errorf("Error proxying data from backend to client: %v", err) } close(readerComplete) }() @@ -336,7 +360,7 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques case <-writerComplete: case <-readerComplete: } - glog.V(6).Infof("Disconnecting from backend proxy %s\n Headers: %v", &location, clone.Header) + klog.V(6).Infof("Disconnecting from backend proxy %s\n Headers: %v", &location, clone.Header) return true } @@ -356,6 +380,19 @@ func (h *UpgradeAwareHandler) DialForUpgrade(req *http.Request) (net.Conn, error return dial(updatedReq, h.UpgradeTransport) } +// getResponseCode reads a http response from the given reader, returns the status code, +// the bytes read from the reader, and any error encountered +func getResponseCode(r io.Reader) (int, []byte, error) { + rawResponse := bytes.NewBuffer(make([]byte, 0, 256)) + // Save the bytes read while reading the response headers into the rawResponse buffer + resp, err := http.ReadResponse(bufio.NewReader(io.TeeReader(r, rawResponse)), nil) + if err != nil { + return 0, nil, err + } + // return the http status code and the raw bytes consumed from the reader in the process + return resp.StatusCode, rawResponse.Bytes(), nil +} + // dial dials the backend at req.URL and writes req to it. func dial(req *http.Request, transport http.RoundTripper) (net.Conn, error) { conn, err := DialURL(req.Context(), req.URL, transport) diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go index da32fe12..8e34f926 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "github.com/golang/glog" + "k8s.io/klog" ) var ( @@ -63,7 +63,11 @@ func HandleCrash(additionalHandlers ...func(interface{})) { // logPanic logs the caller tree when a panic occurs. func logPanic(r interface{}) { callers := getCallers(r) - glog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers) + if _, ok := r.(string); ok { + klog.Errorf("Observed a panic: %s\n%v", r, callers) + } else { + klog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers) + } } func getCallers(r interface{}) string { @@ -111,7 +115,7 @@ func HandleError(err error) { // logError prints an error with the call stack of the location it was reported func logError(err error) { - glog.ErrorDepth(2, err) + klog.ErrorDepth(2, err) } type rudimentaryErrorBackoff struct { diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go index 4721803c..6a0166e5 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go +++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/json" diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/testing/openapi.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/testing/openapi.go index c101f301..68b5e196 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/testing/openapi.go +++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/testing/openapi.go @@ -74,7 +74,7 @@ func getSchema(f Fake, model string) (openapi.Schema, error) { return m.LookupModel(model), nil } -// GetSchemaOrDie returns returns the openapi schema. +// GetSchemaOrDie returns the openapi schema. func GetSchemaOrDie(f Fake, model string) openapi.Schema { s, err := getSchema(f, model) if err != nil { diff --git a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go index 3cd85515..63d735a8 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go +++ b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go @@ -26,8 +26,8 @@ import ( "strings" "unicode" - "github.com/ghodss/yaml" - "github.com/golang/glog" + "k8s.io/klog" + "sigs.k8s.io/yaml" ) // ToJSON converts a single YAML document into a JSON document @@ -217,11 +217,11 @@ func (d *YAMLOrJSONDecoder) Decode(into interface{}) error { if d.decoder == nil { buffer, origData, isJSON := GuessJSONStream(d.r, d.bufferSize) if isJSON { - glog.V(4).Infof("decoding stream as JSON") + klog.V(4).Infof("decoding stream as JSON") d.decoder = json.NewDecoder(buffer) d.rawData = origData } else { - glog.V(4).Infof("decoding stream as YAML") + klog.V(4).Infof("decoding stream as YAML") d.decoder = NewYAMLToJSONDecoder(buffer) } } @@ -230,7 +230,7 @@ func (d *YAMLOrJSONDecoder) Decode(into interface{}) error { if syntax, ok := err.(*json.SyntaxError); ok { data, readErr := ioutil.ReadAll(jsonDecoder.Buffered()) if readErr != nil { - glog.V(4).Infof("reading stream failed: %v", readErr) + klog.V(4).Infof("reading stream failed: %v", readErr) } js := string(data) diff --git a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go index 93bb1cdf..d61cf5a2 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go @@ -20,10 +20,10 @@ import ( "io" "sync" - "github.com/golang/glog" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/net" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/klog" ) // Decoder allows StreamWatcher to watch any stream for which a Decoder can be written. @@ -100,13 +100,13 @@ func (sw *StreamWatcher) receive() { case io.EOF: // watch closed normally case io.ErrUnexpectedEOF: - glog.V(1).Infof("Unexpected EOF during watch stream event decoding: %v", err) + klog.V(1).Infof("Unexpected EOF during watch stream event decoding: %v", err) default: msg := "Unable to decode an event from the watch stream: %v" if net.IsProbableEOF(err) { - glog.V(5).Infof(msg, err) + klog.V(5).Infof(msg, err) } else { - glog.Errorf(msg, err) + klog.Errorf(msg, err) } } return diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go index a627d1d5..be9c90c0 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/watch.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go @@ -20,7 +20,7 @@ import ( "fmt" "sync" - "github.com/golang/glog" + "k8s.io/klog" "k8s.io/apimachinery/pkg/runtime" ) @@ -106,7 +106,7 @@ func (f *FakeWatcher) Stop() { f.Lock() defer f.Unlock() if !f.Stopped { - glog.V(4).Infof("Stopping fake watcher.") + klog.V(4).Infof("Stopping fake watcher.") close(f.result) f.Stopped = true } @@ -173,7 +173,7 @@ func (f *RaceFreeFakeWatcher) Stop() { f.Lock() defer f.Unlock() if !f.Stopped { - glog.V(4).Infof("Stopping fake watcher.") + klog.V(4).Infof("Stopping fake watcher.") close(f.result) f.Stopped = true } diff --git a/vendor/k8s.io/klog/.travis.yml b/vendor/k8s.io/klog/.travis.yml new file mode 100644 index 00000000..fc0d2caf --- /dev/null +++ b/vendor/k8s.io/klog/.travis.yml @@ -0,0 +1,14 @@ +language: go +dist: xenial +go: + - 1.9.x + - 1.10.x + - 1.11.x +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) + - diff -u <(echo -n) <(golint $(go list -e ./...)) + - go tool vet . + - go test -v -race ./... +install: + - go get golang.org/x/lint/golint diff --git a/vendor/k8s.io/klog/CONTRIBUTING.md b/vendor/k8s.io/klog/CONTRIBUTING.md new file mode 100644 index 00000000..de471151 --- /dev/null +++ b/vendor/k8s.io/klog/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_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._ + +## Getting Started + +We have full documentation on how to get started contributing here: + + + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + + diff --git a/vendor/k8s.io/klog/LICENSE b/vendor/k8s.io/klog/LICENSE new file mode 100644 index 00000000..37ec93a1 --- /dev/null +++ b/vendor/k8s.io/klog/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: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +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 +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/k8s.io/klog/OWNERS b/vendor/k8s.io/klog/OWNERS new file mode 100644 index 00000000..56b0eb04 --- /dev/null +++ b/vendor/k8s.io/klog/OWNERS @@ -0,0 +1,11 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: + - dims + - thockin + - justinsb + - tallclair + - piosz + - brancz + - DirectXMan12 + - lavalamp diff --git a/vendor/k8s.io/klog/README.md b/vendor/k8s.io/klog/README.md new file mode 100644 index 00000000..a747f538 --- /dev/null +++ b/vendor/k8s.io/klog/README.md @@ -0,0 +1,51 @@ +klog +==== + +klog is a permanant fork of https://github.com/golang/glog. original README from glog is below + +---- + +glog +==== + +Leveled execution logs for Go. + +This is an efficient pure Go implementation of leveled logs in the +manner of the open source C++ package + https://github.com/google/glog + +By binding methods to booleans it is possible to use the log package +without paying the expense of evaluating the arguments to the log. +Through the -vmodule flag, the package also provides fine-grained +control over logging at the file level. + +The comment from glog.go introduces the ideas: + + Package glog implements logging analogous to the Google-internal + C++ INFO/ERROR/V setup. It provides functions Info, Warning, + Error, Fatal, plus formatting variants such as Infof. It + also provides V-style logging controlled by the -v and + -vmodule=file=2 flags. + + Basic examples: + + glog.Info("Prepare to repel boarders") + + glog.Fatalf("Initialization failed: %s", err) + + See the documentation for the V function for an explanation + of these examples: + + if glog.V(2) { + glog.Info("Starting transaction...") + } + + glog.V(2).Infoln("Processed", nItems, "elements") + + +The repository contains an open source version of the log package +used inside Google. The master copy of the source lives inside +Google, not here. The code in this repo is for export only and is not itself +under development. Feature requests will be ignored. + +Send bug reports to golang-nuts@googlegroups.com. diff --git a/vendor/k8s.io/klog/RELEASE.md b/vendor/k8s.io/klog/RELEASE.md new file mode 100644 index 00000000..b53eb960 --- /dev/null +++ b/vendor/k8s.io/klog/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The `klog` is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/vendor/k8s.io/klog/SECURITY_CONTACTS b/vendor/k8s.io/klog/SECURITY_CONTACTS new file mode 100644 index 00000000..520ddb52 --- /dev/null +++ b/vendor/k8s.io/klog/SECURITY_CONTACTS @@ -0,0 +1,20 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +dims +thockin +justinsb +tallclair +piosz +brancz +DirectXMan12 +lavalamp diff --git a/vendor/k8s.io/klog/examples/coexist_glog/coexist_glog.go b/vendor/k8s.io/klog/examples/coexist_glog/coexist_glog.go new file mode 100644 index 00000000..71087bc0 --- /dev/null +++ b/vendor/k8s.io/klog/examples/coexist_glog/coexist_glog.go @@ -0,0 +1,28 @@ +package main + +import ( + "flag" + "github.com/golang/glog" + "k8s.io/klog" +) + +type glogWriter struct{} + +func (file *glogWriter) Write(data []byte) (n int, err error) { + glog.InfoDepth(0, string(data)) + return len(data), nil +} + +func main() { + flag.Set("alsologtostderr", "true") + + var flags flag.FlagSet + klog.InitFlags(&flags) + flags.Set("skip_headers", "true") + flag.Parse() + + klog.SetOutput(&glogWriter{}) + klog.Info("nice to meet you") + glog.Flush() + klog.Flush() +} diff --git a/vendor/k8s.io/klog/examples/log_file/usage_log_file.go b/vendor/k8s.io/klog/examples/log_file/usage_log_file.go new file mode 100644 index 00000000..42b7d899 --- /dev/null +++ b/vendor/k8s.io/klog/examples/log_file/usage_log_file.go @@ -0,0 +1,14 @@ +package main + +import ( + "flag" + "k8s.io/klog" +) + +func main() { + klog.InitFlags(nil) + flag.Set("log_file", "myfile.log") + flag.Parse() + klog.Info("nice to meet you") + klog.Flush() +} diff --git a/vendor/k8s.io/klog/examples/set_output/usage_set_output.go b/vendor/k8s.io/klog/examples/set_output/usage_set_output.go new file mode 100644 index 00000000..6d4d5c54 --- /dev/null +++ b/vendor/k8s.io/klog/examples/set_output/usage_set_output.go @@ -0,0 +1,22 @@ +package main + +import ( + "bytes" + "flag" + "fmt" + "k8s.io/klog" +) + +func main() { + klog.InitFlags(nil) + flag.Set("logtostderr", "false") + flag.Set("alsologtostderr", "false") + flag.Parse() + + buf := new(bytes.Buffer) + klog.SetOutput(buf) + klog.Info("nice to meet you") + klog.Flush() + + fmt.Printf("LOGGED: %s", buf.String()) +} diff --git a/vendor/k8s.io/klog/glog/README.md b/vendor/k8s.io/klog/glog/README.md new file mode 100644 index 00000000..f1b7ccdd --- /dev/null +++ b/vendor/k8s.io/klog/glog/README.md @@ -0,0 +1,9 @@ +# glog + +This repo contains a package that exposes an API subset of the [glog](https://github.com/golang/glog) package. +All logging state delivered to this package is shunted to the global [klog logger](https://github.com/kubernetes/klog). + +This package makes it so we can intercept the calls to glog and redirect them to klog and thus produce +a consistent log for our processes. + +This code was inspired by https://github.com/istio/glog/ diff --git a/vendor/k8s.io/klog/glog/glog.go b/vendor/k8s.io/klog/glog/glog.go new file mode 100644 index 00000000..f4c0c1ff --- /dev/null +++ b/vendor/k8s.io/klog/glog/glog.go @@ -0,0 +1,160 @@ +// Copyright 2017 Istio 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 glog exposes an API subset of the [glog](https://github.com/golang/glog) package. +// All logging state delivered to this package is shunted to the global [klog logger](ttps://github.com/kubernetes/klog). +// +// We depend on some downstream components that use glog for logging. This package makes it so we can intercept +// the calls to glog and redirect them to klog and thus produce a consistent log for our processes. +package glog + +import ( + "k8s.io/klog" +) + +// Level is a shim +type Level int32 + +// Verbose is a shim +type Verbose bool + +// Flush is a shim +func Flush() { +} + +// V is a shim +func V(level Level) Verbose { + return Verbose(bool(klog.V(klog.Level(int32(level))))) +} + +// Info is a shim +func (v Verbose) Info(args ...interface{}) { + if v { + klog.Info(args...) + } +} + +// Infoln is a shim +func (v Verbose) Infoln(args ...interface{}) { + if v { + klog.Infoln(args...) + } +} + +// Infof is a shim +func (v Verbose) Infof(format string, args ...interface{}) { + if v { + klog.Infof(format, args...) + } +} + +// Info is a shim +func Info(args ...interface{}) { + klog.Info(args...) +} + +// InfoDepth is a shim +func InfoDepth(depth int, args ...interface{}) { + klog.InfoDepth(depth, args...) +} + +// Infoln is a shim +func Infoln(args ...interface{}) { + klog.Infoln(args...) +} + +// Infof is a shim +func Infof(format string, args ...interface{}) { + klog.Infof(format, args...) +} + +// Warning is a shim +func Warning(args ...interface{}) { + klog.Warning(args...) +} + +// WarningDepth is a shim +func WarningDepth(depth int, args ...interface{}) { + klog.WarningDepth(depth, args...) +} + +// Warningln is a shim +func Warningln(args ...interface{}) { + klog.Warningln(args...) +} + +// Warningf is a shim +func Warningf(format string, args ...interface{}) { + klog.Warningf(format, args...) +} + +// Error is a shim +func Error(args ...interface{}) { + klog.Error(args...) +} + +// ErrorDepth is a shim +func ErrorDepth(depth int, args ...interface{}) { + klog.ErrorDepth(depth, args...) +} + +// Errorln is a shim +func Errorln(args ...interface{}) { + klog.Errorln(args...) +} + +// Errorf is a shim +func Errorf(format string, args ...interface{}) { + klog.Errorf(format, args...) +} + +// Fatal is a shim +func Fatal(args ...interface{}) { + klog.Fatal(args...) +} + +// FatalDepth is a shim +func FatalDepth(depth int, args ...interface{}) { + klog.FatalDepth(depth, args...) +} + +// Fatalln is a shim +func Fatalln(args ...interface{}) { + klog.Fatalln(args...) +} + +// Fatalf is a shim +func Fatalf(format string, args ...interface{}) { + klog.Fatalf(format, args...) +} + +// Exit is a shim +func Exit(args ...interface{}) { + klog.Exit(args...) +} + +// ExitDepth is a shim +func ExitDepth(depth int, args ...interface{}) { + klog.ExitDepth(depth, args...) +} + +// Exitln is a shim +func Exitln(args ...interface{}) { + klog.Exitln(args...) +} + +// Exitf is a shim +func Exitf(format string, args ...interface{}) { + klog.Exitf(format, args...) +} diff --git a/vendor/k8s.io/klog/glog/glog_test.go b/vendor/k8s.io/klog/glog/glog_test.go new file mode 100644 index 00000000..e994a95a --- /dev/null +++ b/vendor/k8s.io/klog/glog/glog_test.go @@ -0,0 +1,46 @@ +// Copyright 2018 Istio 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 glog + +import ( + "testing" +) + +func TestAll(t *testing.T) { + // just making sure this stuff doesn't crash... + + Errorf("%s %s", "One", "Two") + Error("One", "Two") + Errorln("One", "Two") + ErrorDepth(2, "One", "Two") + + Warningf("%s %s", "One", "Two") + Warning("One", "Two") + Warningln("One", "Two") + WarningDepth(2, "One", "Two") + + Infof("%s %s", "One", "Two") + Info("One", "Two") + Infoln("One", "Two") + InfoDepth(2, "One", "Two") + + for i := 0; i < 10; i++ { + V(Level(i)).Infof("%s %s", "One", "Two") + V(Level(i)).Info("One", "Two") + V(Level(i)).Infoln("One", "Two") + } + + Flush() +} diff --git a/vendor/k8s.io/klog/klog.go b/vendor/k8s.io/klog/klog.go new file mode 100644 index 00000000..13bcc81a --- /dev/null +++ b/vendor/k8s.io/klog/klog.go @@ -0,0 +1,1239 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package klog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. +// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as +// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags. +// +// Basic examples: +// +// glog.Info("Prepare to repel boarders") +// +// glog.Fatalf("Initialization failed: %s", err) +// +// See the documentation for the V function for an explanation of these examples: +// +// if glog.V(2) { +// glog.Info("Starting transaction...") +// } +// +// glog.V(2).Infoln("Processed", nItems, "elements") +// +// Log output is buffered and written periodically using Flush. Programs +// should call Flush before exiting to guarantee all log output is written. +// +// By default, all log statements write to files in a temporary directory. +// This package provides several flags that modify this behavior. +// As a result, flag.Parse must be called before any logging is done. +// +// -logtostderr=false +// Logs are written to standard error instead of to files. +// -alsologtostderr=false +// Logs are written to standard error as well as to files. +// -stderrthreshold=ERROR +// Log events at or above this severity are logged to standard +// error as well as to files. +// -log_dir="" +// Log files will be written to this directory instead of the +// default temporary directory. +// +// Other flags provide aids to debugging. +// +// -log_backtrace_at="" +// When set to a file and line number holding a logging statement, +// such as +// -log_backtrace_at=gopherflakes.go:234 +// a stack trace will be written to the Info log whenever execution +// hits that statement. (Unlike with -vmodule, the ".go" must be +// present.) +// -v=0 +// Enable V-leveled logging at the specified level. +// -vmodule="" +// The syntax of the argument is a comma-separated list of pattern=N, +// where pattern is a literal file name (minus the ".go" suffix) or +// "glob" pattern and N is a V level. For instance, +// -vmodule=gopher*=3 +// sets the V level to 3 in all Go files whose names begin "gopher". +// +package klog + +import ( + "bufio" + "bytes" + "errors" + "flag" + "fmt" + "io" + stdLog "log" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" +) + +// severity identifies the sort of log: info, warning etc. It also implements +// the flag.Value interface. The -stderrthreshold flag is of type severity and +// should be modified only through the flag.Value interface. The values match +// the corresponding constants in C++. +type severity int32 // sync/atomic int32 + +// These constants identify the log levels in order of increasing severity. +// A message written to a high-severity log file is also written to each +// lower-severity log file. +const ( + infoLog severity = iota + warningLog + errorLog + fatalLog + numSeverity = 4 +) + +const severityChar = "IWEF" + +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", +} + +// get returns the value of the severity. +func (s *severity) get() severity { + return severity(atomic.LoadInt32((*int32)(s))) +} + +// set sets the value of the severity. +func (s *severity) set(val severity) { + atomic.StoreInt32((*int32)(s), int32(val)) +} + +// String is part of the flag.Value interface. +func (s *severity) String() string { + return strconv.FormatInt(int64(*s), 10) +} + +// Get is part of the flag.Value interface. +func (s *severity) Get() interface{} { + return *s +} + +// Set is part of the flag.Value interface. +func (s *severity) Set(value string) error { + var threshold severity + // Is it a known name? + if v, ok := severityByName(value); ok { + threshold = v + } else { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + threshold = severity(v) + } + logging.stderrThreshold.set(threshold) + return nil +} + +func severityByName(s string) (severity, bool) { + s = strings.ToUpper(s) + for i, name := range severityName { + if name == s { + return severity(i), true + } + } + return 0, false +} + +// OutputStats tracks the number of output lines and bytes written. +type OutputStats struct { + lines int64 + bytes int64 +} + +// Lines returns the number of lines written. +func (s *OutputStats) Lines() int64 { + return atomic.LoadInt64(&s.lines) +} + +// Bytes returns the number of bytes written. +func (s *OutputStats) Bytes() int64 { + return atomic.LoadInt64(&s.bytes) +} + +// Stats tracks the number of lines of output and number of bytes +// per severity level. Values must be read with atomic.LoadInt64. +var Stats struct { + Info, Warning, Error OutputStats +} + +var severityStats = [numSeverity]*OutputStats{ + infoLog: &Stats.Info, + warningLog: &Stats.Warning, + errorLog: &Stats.Error, +} + +// Level is exported because it appears in the arguments to V and is +// the type of the v flag, which can be set programmatically. +// It's a distinct type because we want to discriminate it from logType. +// Variables of type level are only changed under logging.mu. +// The -v flag is read only with atomic ops, so the state of the logging +// module is consistent. + +// Level is treated as a sync/atomic int32. + +// Level specifies a level of verbosity for V logs. *Level implements +// flag.Value; the -v flag is of type Level and should be modified +// only through the flag.Value interface. +type Level int32 + +// get returns the value of the Level. +func (l *Level) get() Level { + return Level(atomic.LoadInt32((*int32)(l))) +} + +// set sets the value of the Level. +func (l *Level) set(val Level) { + atomic.StoreInt32((*int32)(l), int32(val)) +} + +// String is part of the flag.Value interface. +func (l *Level) String() string { + return strconv.FormatInt(int64(*l), 10) +} + +// Get is part of the flag.Value interface. +func (l *Level) Get() interface{} { + return *l +} + +// Set is part of the flag.Value interface. +func (l *Level) Set(value string) error { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(Level(v), logging.vmodule.filter, false) + return nil +} + +// moduleSpec represents the setting of the -vmodule flag. +type moduleSpec struct { + filter []modulePat +} + +// modulePat contains a filter for the -vmodule flag. +// It holds a verbosity level and a file pattern to match. +type modulePat struct { + pattern string + literal bool // The pattern is a literal string + level Level +} + +// match reports whether the file matches the pattern. It uses a string +// comparison if the pattern contains no metacharacters. +func (m *modulePat) match(file string) bool { + if m.literal { + return file == m.pattern + } + match, _ := filepath.Match(m.pattern, file) + return match +} + +func (m *moduleSpec) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + var b bytes.Buffer + for i, f := range m.filter { + if i > 0 { + b.WriteRune(',') + } + fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) + } + return b.String() +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported. +func (m *moduleSpec) Get() interface{} { + return nil +} + +var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") + +// Syntax: -vmodule=recordio=2,file=1,gfs*=3 +func (m *moduleSpec) Set(value string) error { + var filter []modulePat + for _, pat := range strings.Split(value, ",") { + if len(pat) == 0 { + // Empty strings such as from a trailing comma can be ignored. + continue + } + patLev := strings.Split(pat, "=") + if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { + return errVmoduleSyntax + } + pattern := patLev[0] + v, err := strconv.Atoi(patLev[1]) + if err != nil { + return errors.New("syntax error: expect comma-separated list of filename=N") + } + if v < 0 { + return errors.New("negative value for vmodule level") + } + if v == 0 { + continue // Ignore. It's harmless but no point in paying the overhead. + } + // TODO: check syntax of filter? + filter = append(filter, modulePat{pattern, isLiteral(pattern), Level(v)}) + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(logging.verbosity, filter, true) + return nil +} + +// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters +// that require filepath.Match to be called to match the pattern. +func isLiteral(pattern string) bool { + return !strings.ContainsAny(pattern, `\*?[]`) +} + +// traceLocation represents the setting of the -log_backtrace_at flag. +type traceLocation struct { + file string + line int +} + +// isSet reports whether the trace location has been specified. +// logging.mu is held. +func (t *traceLocation) isSet() bool { + return t.line > 0 +} + +// match reports whether the specified file and line matches the trace location. +// The argument file name is the full path, not the basename specified in the flag. +// logging.mu is held. +func (t *traceLocation) match(file string, line int) bool { + if t.line != line { + return false + } + if i := strings.LastIndex(file, "/"); i >= 0 { + file = file[i+1:] + } + return t.file == file +} + +func (t *traceLocation) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + return fmt.Sprintf("%s:%d", t.file, t.line) +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported +func (t *traceLocation) Get() interface{} { + return nil +} + +var errTraceSyntax = errors.New("syntax error: expect file.go:234") + +// Syntax: -log_backtrace_at=gopherflakes.go:234 +// Note that unlike vmodule the file extension is included here. +func (t *traceLocation) Set(value string) error { + if value == "" { + // Unset. + t.line = 0 + t.file = "" + } + fields := strings.Split(value, ":") + if len(fields) != 2 { + return errTraceSyntax + } + file, line := fields[0], fields[1] + if !strings.Contains(file, ".") { + return errTraceSyntax + } + v, err := strconv.Atoi(line) + if err != nil { + return errTraceSyntax + } + if v <= 0 { + return errors.New("negative or zero value for level") + } + logging.mu.Lock() + defer logging.mu.Unlock() + t.line = v + t.file = file + return nil +} + +// flushSyncWriter is the interface satisfied by logging destinations. +type flushSyncWriter interface { + Flush() error + Sync() error + io.Writer +} + +func init() { + // Default stderrThreshold is ERROR. + logging.stderrThreshold = errorLog + + logging.setVState(0, nil, false) + go logging.flushDaemon() +} + +// InitFlags is for explicitly initializing the flags +func InitFlags(flagset *flag.FlagSet) { + if flagset == nil { + flagset = flag.CommandLine + } + flagset.StringVar(&logging.logDir, "log_dir", "", "If non-empty, write log files in this directory") + flagset.StringVar(&logging.logFile, "log_file", "", "If non-empty, use this log file") + flagset.BoolVar(&logging.toStderr, "logtostderr", false, "log to standard error instead of files") + flagset.BoolVar(&logging.alsoToStderr, "alsologtostderr", false, "log to standard error as well as files") + flagset.Var(&logging.verbosity, "v", "log level for V logs") + flagset.BoolVar(&logging.skipHeaders, "skip_headers", false, "If true, avoid header prefixes in the log messages") + flagset.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") + flagset.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") + flagset.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace") +} + +// Flush flushes all pending log I/O. +func Flush() { + logging.lockAndFlushAll() +} + +// loggingT collects all the global state of the logging setup. +type loggingT struct { + // Boolean flags. Not handled atomically because the flag.Value interface + // does not let us avoid the =true, and that shorthand is necessary for + // compatibility. TODO: does this matter enough to fix? Seems unlikely. + toStderr bool // The -logtostderr flag. + alsoToStderr bool // The -alsologtostderr flag. + + // Level flag. Handled atomically. + stderrThreshold severity // The -stderrthreshold flag. + + // freeList is a list of byte buffers, maintained under freeListMu. + freeList *buffer + // freeListMu maintains the free list. It is separate from the main mutex + // so buffers can be grabbed and printed to without holding the main lock, + // for better parallelization. + freeListMu sync.Mutex + + // mu protects the remaining elements of this structure and is + // used to synchronize logging. + mu sync.Mutex + // file holds writer for each of the log types. + file [numSeverity]flushSyncWriter + // pcs is used in V to avoid an allocation when computing the caller's PC. + pcs [1]uintptr + // vmap is a cache of the V Level for each V() call site, identified by PC. + // It is wiped whenever the vmodule flag changes state. + vmap map[uintptr]Level + // filterLength stores the length of the vmodule filter chain. If greater + // than zero, it means vmodule is enabled. It may be read safely + // using sync.LoadInt32, but is only modified under mu. + filterLength int32 + // traceLocation is the state of the -log_backtrace_at flag. + traceLocation traceLocation + // These flags are modified only under lock, although verbosity may be fetched + // safely using atomic.LoadInt32. + vmodule moduleSpec // The state of the -vmodule flag. + verbosity Level // V logging level, the value of the -v flag/ + + // If non-empty, overrides the choice of directory in which to write logs. + // See createLogDirs for the full list of possible destinations. + logDir string + + // If non-empty, specifies the path of the file to write logs. mutually exclusive + // with the log-dir option. + logFile string + + // If true, do not add the prefix headers, useful when used with SetOutput + skipHeaders bool +} + +// buffer holds a byte Buffer for reuse. The zero value is ready for use. +type buffer struct { + bytes.Buffer + tmp [64]byte // temporary byte array for creating headers. + next *buffer +} + +var logging loggingT + +// setVState sets a consistent state for V logging. +// l.mu is held. +func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool) { + // Turn verbosity off so V will not fire while we are in transition. + logging.verbosity.set(0) + // Ditto for filter length. + atomic.StoreInt32(&logging.filterLength, 0) + + // Set the new filters and wipe the pc->Level map if the filter has changed. + if setFilter { + logging.vmodule.filter = filter + logging.vmap = make(map[uintptr]Level) + } + + // Things are consistent now, so enable filtering and verbosity. + // They are enabled in order opposite to that in V. + atomic.StoreInt32(&logging.filterLength, int32(len(filter))) + logging.verbosity.set(verbosity) +} + +// getBuffer returns a new, ready-to-use buffer. +func (l *loggingT) getBuffer() *buffer { + l.freeListMu.Lock() + b := l.freeList + if b != nil { + l.freeList = b.next + } + l.freeListMu.Unlock() + if b == nil { + b = new(buffer) + } else { + b.next = nil + b.Reset() + } + return b +} + +// putBuffer returns a buffer to the free list. +func (l *loggingT) putBuffer(b *buffer) { + if b.Len() >= 256 { + // Let big buffers die a natural death. + return + } + l.freeListMu.Lock() + b.next = l.freeList + l.freeList = b + l.freeListMu.Unlock() +} + +var timeNow = time.Now // Stubbed out for testing. + +/* +header formats a log header as defined by the C++ implementation. +It returns a buffer containing the formatted header and the user's file and line number. +The depth specifies how many stack frames above lives the source line to be identified in the log message. + +Log lines have this form: + Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... +where the fields are defined as follows: + L A single character, representing the log level (eg 'I' for INFO) + mm The month (zero padded; ie May is '05') + dd The day (zero padded) + hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds + threadid The space-padded thread ID as returned by GetTID() + file The file name + line The line number + msg The user-supplied message +*/ +func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { + _, file, line, ok := runtime.Caller(3 + depth) + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] + } + } + return l.formatHeader(s, file, line), file, line +} + +// formatHeader formats a log header using the provided file name and line number. +func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { + now := timeNow() + if line < 0 { + line = 0 // not a real line number, but acceptable to someDigits + } + if s > fatalLog { + s = infoLog // for safety. + } + buf := l.getBuffer() + if l.skipHeaders { + return buf + } + + // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. + // It's worth about 3X. Fprintf is hard. + _, month, day := now.Date() + hour, minute, second := now.Clock() + // Lmmdd hh:mm:ss.uuuuuu threadid file:line] + buf.tmp[0] = severityChar[s] + buf.twoDigits(1, int(month)) + buf.twoDigits(3, day) + buf.tmp[5] = ' ' + buf.twoDigits(6, hour) + buf.tmp[8] = ':' + buf.twoDigits(9, minute) + buf.tmp[11] = ':' + buf.twoDigits(12, second) + buf.tmp[14] = '.' + buf.nDigits(6, 15, now.Nanosecond()/1000, '0') + buf.tmp[21] = ' ' + buf.nDigits(7, 22, pid, ' ') // TODO: should be TID + buf.tmp[29] = ' ' + buf.Write(buf.tmp[:30]) + buf.WriteString(file) + buf.tmp[0] = ':' + n := buf.someDigits(1, line) + buf.tmp[n+1] = ']' + buf.tmp[n+2] = ' ' + buf.Write(buf.tmp[:n+3]) + return buf +} + +// Some custom tiny helper functions to print the log header efficiently. + +const digits = "0123456789" + +// twoDigits formats a zero-prefixed two-digit integer at buf.tmp[i]. +func (buf *buffer) twoDigits(i, d int) { + buf.tmp[i+1] = digits[d%10] + d /= 10 + buf.tmp[i] = digits[d%10] +} + +// nDigits formats an n-digit integer at buf.tmp[i], +// padding with pad on the left. +// It assumes d >= 0. +func (buf *buffer) nDigits(n, i, d int, pad byte) { + j := n - 1 + for ; j >= 0 && d > 0; j-- { + buf.tmp[i+j] = digits[d%10] + d /= 10 + } + for ; j >= 0; j-- { + buf.tmp[i+j] = pad + } +} + +// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. +func (buf *buffer) someDigits(i, d int) int { + // Print into the top, then copy down. We know there's space for at least + // a 10-digit number. + j := len(buf.tmp) + for { + j-- + buf.tmp[j] = digits[d%10] + d /= 10 + if d == 0 { + break + } + } + return copy(buf.tmp[i:], buf.tmp[j:]) +} + +func (l *loggingT) println(s severity, args ...interface{}) { + buf, file, line := l.header(s, 0) + fmt.Fprintln(buf, args...) + l.output(s, buf, file, line, false) +} + +func (l *loggingT) print(s severity, args ...interface{}) { + l.printDepth(s, 1, args...) +} + +func (l *loggingT) printDepth(s severity, depth int, args ...interface{}) { + buf, file, line := l.header(s, depth) + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, false) +} + +func (l *loggingT) printf(s severity, format string, args ...interface{}) { + buf, file, line := l.header(s, 0) + fmt.Fprintf(buf, format, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, false) +} + +// printWithFileLine behaves like print but uses the provided file and line number. If +// alsoLogToStderr is true, the log message always appears on standard error; it +// will also appear in the log file unless --logtostderr is set. +func (l *loggingT) printWithFileLine(s severity, file string, line int, alsoToStderr bool, args ...interface{}) { + buf := l.formatHeader(s, file, line) + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, alsoToStderr) +} + +// redirectBuffer is used to set an alternate destination for the logs +type redirectBuffer struct { + w io.Writer +} + +func (rb *redirectBuffer) Sync() error { + return nil +} + +func (rb *redirectBuffer) Flush() error { + return nil +} + +func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { + return rb.w.Write(bytes) +} + +// SetOutput sets the output destination for all severities +func SetOutput(w io.Writer) { + for s := fatalLog; s >= infoLog; s-- { + rb := &redirectBuffer{ + w: w, + } + logging.file[s] = rb + } +} + +// SetOutputBySeverity sets the output destination for specific severity +func SetOutputBySeverity(name string, w io.Writer) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) + } + rb := &redirectBuffer{ + w: w, + } + logging.file[sev] = rb +} + +// output writes the data to the log files and releases the buffer. +func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoToStderr bool) { + l.mu.Lock() + if l.traceLocation.isSet() { + if l.traceLocation.match(file, line) { + buf.Write(stacks(false)) + } + } + data := buf.Bytes() + if l.toStderr { + os.Stderr.Write(data) + } else { + if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { + os.Stderr.Write(data) + } + if l.file[s] == nil { + if err := l.createFiles(s); err != nil { + os.Stderr.Write(data) // Make sure the message appears somewhere. + l.exit(err) + } + } + switch s { + case fatalLog: + l.file[fatalLog].Write(data) + fallthrough + case errorLog: + l.file[errorLog].Write(data) + fallthrough + case warningLog: + l.file[warningLog].Write(data) + fallthrough + case infoLog: + l.file[infoLog].Write(data) + } + } + if s == fatalLog { + // If we got here via Exit rather than Fatal, print no stacks. + if atomic.LoadUint32(&fatalNoStacks) > 0 { + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(1) + } + // Dump all goroutine stacks before exiting. + // First, make sure we see the trace for the current goroutine on standard error. + // If -logtostderr has been specified, the loop below will do that anyway + // as the first stack in the full dump. + if !l.toStderr { + os.Stderr.Write(stacks(false)) + } + // Write the stack trace for all goroutines to the files. + trace := stacks(true) + logExitFunc = func(error) {} // If we get a write error, we'll still exit below. + for log := fatalLog; log >= infoLog; log-- { + if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set. + f.Write(trace) + } + } + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. + } + l.putBuffer(buf) + l.mu.Unlock() + if stats := severityStats[s]; stats != nil { + atomic.AddInt64(&stats.lines, 1) + atomic.AddInt64(&stats.bytes, int64(len(data))) + } +} + +// timeoutFlush calls Flush and returns when it completes or after timeout +// elapses, whichever happens first. This is needed because the hooks invoked +// by Flush may deadlock when glog.Fatal is called from a hook that holds +// a lock. +func timeoutFlush(timeout time.Duration) { + done := make(chan bool, 1) + go func() { + Flush() // calls logging.lockAndFlushAll() + done <- true + }() + select { + case <-done: + case <-time.After(timeout): + fmt.Fprintln(os.Stderr, "glog: Flush took longer than", timeout) + } +} + +// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines. +func stacks(all bool) []byte { + // We don't know how big the traces are, so grow a few times if they don't fit. Start large, though. + n := 10000 + if all { + n = 100000 + } + var trace []byte + for i := 0; i < 5; i++ { + trace = make([]byte, n) + nbytes := runtime.Stack(trace, all) + if nbytes < len(trace) { + return trace[:nbytes] + } + n *= 2 + } + return trace +} + +// logExitFunc provides a simple mechanism to override the default behavior +// of exiting on error. Used in testing and to guarantee we reach a required exit +// for fatal logs. Instead, exit could be a function rather than a method but that +// would make its use clumsier. +var logExitFunc func(error) + +// exit is called if there is trouble creating or writing log files. +// It flushes the logs and exits the program; there's no point in hanging around. +// l.mu is held. +func (l *loggingT) exit(err error) { + fmt.Fprintf(os.Stderr, "log: exiting because of error: %s\n", err) + // If logExitFunc is set, we do that instead of exiting. + if logExitFunc != nil { + logExitFunc(err) + return + } + l.flushAll() + os.Exit(2) +} + +// syncBuffer joins a bufio.Writer to its underlying file, providing access to the +// file's Sync method and providing a wrapper for the Write method that provides log +// file rotation. There are conflicting methods, so the file cannot be embedded. +// l.mu is held for all its methods. +type syncBuffer struct { + logger *loggingT + *bufio.Writer + file *os.File + sev severity + nbytes uint64 // The number of bytes written to this file +} + +func (sb *syncBuffer) Sync() error { + return sb.file.Sync() +} + +func (sb *syncBuffer) Write(p []byte) (n int, err error) { + if sb.nbytes+uint64(len(p)) >= MaxSize { + if err := sb.rotateFile(time.Now()); err != nil { + sb.logger.exit(err) + } + } + n, err = sb.Writer.Write(p) + sb.nbytes += uint64(n) + if err != nil { + sb.logger.exit(err) + } + return +} + +// rotateFile closes the syncBuffer's file and starts a new one. +func (sb *syncBuffer) rotateFile(now time.Time) error { + if sb.file != nil { + sb.Flush() + sb.file.Close() + } + var err error + sb.file, _, err = create(severityName[sb.sev], now) + sb.nbytes = 0 + if err != nil { + return err + } + + sb.Writer = bufio.NewWriterSize(sb.file, bufferSize) + + // Write header. + var buf bytes.Buffer + fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05")) + fmt.Fprintf(&buf, "Running on machine: %s\n", host) + fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH) + fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n") + n, err := sb.file.Write(buf.Bytes()) + sb.nbytes += uint64(n) + return err +} + +// bufferSize sizes the buffer associated with each log file. It's large +// so that log records can accumulate without the logging thread blocking +// on disk I/O. The flushDaemon will block instead. +const bufferSize = 256 * 1024 + +// createFiles creates all the log files for severity from sev down to infoLog. +// l.mu is held. +func (l *loggingT) createFiles(sev severity) error { + now := time.Now() + // Files are created in decreasing severity order, so as soon as we find one + // has already been created, we can stop. + for s := sev; s >= infoLog && l.file[s] == nil; s-- { + sb := &syncBuffer{ + logger: l, + sev: s, + } + if err := sb.rotateFile(now); err != nil { + return err + } + l.file[s] = sb + } + return nil +} + +const flushInterval = 30 * time.Second + +// flushDaemon periodically flushes the log file buffers. +func (l *loggingT) flushDaemon() { + for range time.NewTicker(flushInterval).C { + l.lockAndFlushAll() + } +} + +// lockAndFlushAll is like flushAll but locks l.mu first. +func (l *loggingT) lockAndFlushAll() { + l.mu.Lock() + l.flushAll() + l.mu.Unlock() +} + +// flushAll flushes all the logs and attempts to "sync" their data to disk. +// l.mu is held. +func (l *loggingT) flushAll() { + // Flush from fatal down, in case there's trouble flushing. + for s := fatalLog; s >= infoLog; s-- { + file := l.file[s] + if file != nil { + file.Flush() // ignore error + file.Sync() // ignore error + } + } +} + +// CopyStandardLogTo arranges for messages written to the Go "log" package's +// default logs to also appear in the Google logs for the named and lower +// severities. Subsequent changes to the standard log's default output location +// or format may break this behavior. +// +// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not +// recognized, CopyStandardLogTo panics. +func CopyStandardLogTo(name string) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) + } + // Set a log format that captures the user's file and line: + // d.go:23: message + stdLog.SetFlags(stdLog.Lshortfile) + stdLog.SetOutput(logBridge(sev)) +} + +// logBridge provides the Write method that enables CopyStandardLogTo to connect +// Go's standard logs to the logs provided by this package. +type logBridge severity + +// Write parses the standard logging line and passes its components to the +// logger for severity(lb). +func (lb logBridge) Write(b []byte) (n int, err error) { + var ( + file = "???" + line = 1 + text string + ) + // Split "d.go:23: message" into "d.go", "23", and "message". + if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { + text = fmt.Sprintf("bad log format: %s", b) + } else { + file = string(parts[0]) + text = string(parts[2][1:]) // skip leading space + line, err = strconv.Atoi(string(parts[1])) + if err != nil { + text = fmt.Sprintf("bad line number: %s", b) + line = 1 + } + } + // printWithFileLine with alsoToStderr=true, so standard log messages + // always appear on standard error. + logging.printWithFileLine(severity(lb), file, line, true, text) + return len(b), nil +} + +// setV computes and remembers the V level for a given PC +// when vmodule is enabled. +// File pattern matching takes the basename of the file, stripped +// of its .go suffix, and uses filepath.Match, which is a little more +// general than the *? matching used in C++. +// l.mu is held. +func (l *loggingT) setV(pc uintptr) Level { + fn := runtime.FuncForPC(pc) + file, _ := fn.FileLine(pc) + // The file is something like /a/b/c/d.go. We want just the d. + if strings.HasSuffix(file, ".go") { + file = file[:len(file)-3] + } + if slash := strings.LastIndex(file, "/"); slash >= 0 { + file = file[slash+1:] + } + for _, filter := range l.vmodule.filter { + if filter.match(file) { + l.vmap[pc] = filter.level + return filter.level + } + } + l.vmap[pc] = 0 + return 0 +} + +// Verbose is a boolean type that implements Infof (like Printf) etc. +// See the documentation of V for more information. +type Verbose bool + +// V reports whether verbosity at the call site is at least the requested level. +// The returned value is a boolean of type Verbose, which implements Info, Infoln +// and Infof. These methods will write to the Info log if called. +// Thus, one may write either +// if glog.V(2) { glog.Info("log this") } +// or +// glog.V(2).Info("log this") +// The second form is shorter but the first is cheaper if logging is off because it does +// not evaluate its arguments. +// +// Whether an individual call to V generates a log record depends on the setting of +// the -v and --vmodule flags; both are off by default. If the level in the call to +// V is at least the value of -v, or of -vmodule for the source file containing the +// call, the V call will log. +func V(level Level) Verbose { + // This function tries hard to be cheap unless there's work to do. + // The fast path is two atomic loads and compares. + + // Here is a cheap but safe test to see if V logging is enabled globally. + if logging.verbosity.get() >= level { + return Verbose(true) + } + + // It's off globally but it vmodule may still be set. + // Here is another cheap but safe test to see if vmodule is enabled. + if atomic.LoadInt32(&logging.filterLength) > 0 { + // Now we need a proper lock to use the logging structure. The pcs field + // is shared so we must lock before accessing it. This is fairly expensive, + // but if V logging is enabled we're slow anyway. + logging.mu.Lock() + defer logging.mu.Unlock() + if runtime.Callers(2, logging.pcs[:]) == 0 { + return Verbose(false) + } + v, ok := logging.vmap[logging.pcs[0]] + if !ok { + v = logging.setV(logging.pcs[0]) + } + return Verbose(v >= level) + } + return Verbose(false) +} + +// Info is equivalent to the global Info function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Info(args ...interface{}) { + if v { + logging.print(infoLog, args...) + } +} + +// Infoln is equivalent to the global Infoln function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infoln(args ...interface{}) { + if v { + logging.println(infoLog, args...) + } +} + +// Infof is equivalent to the global Infof function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infof(format string, args ...interface{}) { + if v { + logging.printf(infoLog, format, args...) + } +} + +// Info logs to the INFO log. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Info(args ...interface{}) { + logging.print(infoLog, args...) +} + +// InfoDepth acts as Info but uses depth to determine which call frame to log. +// InfoDepth(0, "msg") is the same as Info("msg"). +func InfoDepth(depth int, args ...interface{}) { + logging.printDepth(infoLog, depth, args...) +} + +// Infoln logs to the INFO log. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Infoln(args ...interface{}) { + logging.println(infoLog, args...) +} + +// Infof logs to the INFO log. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Infof(format string, args ...interface{}) { + logging.printf(infoLog, format, args...) +} + +// Warning logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Warning(args ...interface{}) { + logging.print(warningLog, args...) +} + +// WarningDepth acts as Warning but uses depth to determine which call frame to log. +// WarningDepth(0, "msg") is the same as Warning("msg"). +func WarningDepth(depth int, args ...interface{}) { + logging.printDepth(warningLog, depth, args...) +} + +// Warningln logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Warningln(args ...interface{}) { + logging.println(warningLog, args...) +} + +// Warningf logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Warningf(format string, args ...interface{}) { + logging.printf(warningLog, format, args...) +} + +// Error logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Error(args ...interface{}) { + logging.print(errorLog, args...) +} + +// ErrorDepth acts as Error but uses depth to determine which call frame to log. +// ErrorDepth(0, "msg") is the same as Error("msg"). +func ErrorDepth(depth int, args ...interface{}) { + logging.printDepth(errorLog, depth, args...) +} + +// Errorln logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Errorln(args ...interface{}) { + logging.println(errorLog, args...) +} + +// Errorf logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Errorf(format string, args ...interface{}) { + logging.printf(errorLog, format, args...) +} + +// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Fatal(args ...interface{}) { + logging.print(fatalLog, args...) +} + +// FatalDepth acts as Fatal but uses depth to determine which call frame to log. +// FatalDepth(0, "msg") is the same as Fatal("msg"). +func FatalDepth(depth int, args ...interface{}) { + logging.printDepth(fatalLog, depth, args...) +} + +// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Fatalln(args ...interface{}) { + logging.println(fatalLog, args...) +} + +// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Fatalf(format string, args ...interface{}) { + logging.printf(fatalLog, format, args...) +} + +// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. +// It allows Exit and relatives to use the Fatal logs. +var fatalNoStacks uint32 + +// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Exit(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.print(fatalLog, args...) +} + +// ExitDepth acts as Exit but uses depth to determine which call frame to log. +// ExitDepth(0, "msg") is the same as Exit("msg"). +func ExitDepth(depth int, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printDepth(fatalLog, depth, args...) +} + +// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +func Exitln(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.println(fatalLog, args...) +} + +// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Exitf(format string, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printf(fatalLog, format, args...) +} diff --git a/vendor/k8s.io/klog/klog_file.go b/vendor/k8s.io/klog/klog_file.go new file mode 100644 index 00000000..b76a4e10 --- /dev/null +++ b/vendor/k8s.io/klog/klog_file.go @@ -0,0 +1,126 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// File I/O for logs. + +package klog + +import ( + "errors" + "fmt" + "os" + "os/user" + "path/filepath" + "strings" + "sync" + "time" +) + +// MaxSize is the maximum size of a log file in bytes. +var MaxSize uint64 = 1024 * 1024 * 1800 + +// logDirs lists the candidate directories for new log files. +var logDirs []string + +func createLogDirs() { + if logging.logDir != "" { + logDirs = append(logDirs, logging.logDir) + } + logDirs = append(logDirs, os.TempDir()) +} + +var ( + pid = os.Getpid() + program = filepath.Base(os.Args[0]) + host = "unknownhost" + userName = "unknownuser" +) + +func init() { + h, err := os.Hostname() + if err == nil { + host = shortHostname(h) + } + + current, err := user.Current() + if err == nil { + userName = current.Username + } + + // Sanitize userName since it may contain filepath separators on Windows. + userName = strings.Replace(userName, `\`, "_", -1) +} + +// shortHostname returns its argument, truncating at the first period. +// For instance, given "www.google.com" it returns "www". +func shortHostname(hostname string) string { + if i := strings.Index(hostname, "."); i >= 0 { + return hostname[:i] + } + return hostname +} + +// logName returns a new log file name containing tag, with start time t, and +// the name for the symlink for tag. +func logName(tag string, t time.Time) (name, link string) { + name = fmt.Sprintf("%s.%s.%s.log.%s.%04d%02d%02d-%02d%02d%02d.%d", + program, + host, + userName, + tag, + t.Year(), + t.Month(), + t.Day(), + t.Hour(), + t.Minute(), + t.Second(), + pid) + return name, program + "." + tag +} + +var onceLogDirs sync.Once + +// create creates a new log file and returns the file and its filename, which +// contains tag ("INFO", "FATAL", etc.) and t. If the file is created +// successfully, create also attempts to update the symlink for that tag, ignoring +// errors. +func create(tag string, t time.Time) (f *os.File, filename string, err error) { + if logging.logFile != "" { + f, err := os.Create(logging.logFile) + if err == nil { + return f, logging.logFile, nil + } + return nil, "", fmt.Errorf("log: unable to create log: %v", err) + } + onceLogDirs.Do(createLogDirs) + if len(logDirs) == 0 { + return nil, "", errors.New("log: no log dirs") + } + name, link := logName(tag, t) + var lastErr error + for _, dir := range logDirs { + fname := filepath.Join(dir, name) + f, err := os.Create(fname) + if err == nil { + symlink := filepath.Join(dir, link) + os.Remove(symlink) // ignore err + os.Symlink(name, symlink) // ignore err + return f, fname, nil + } + lastErr = err + } + return nil, "", fmt.Errorf("log: cannot create log: %v", lastErr) +} diff --git a/vendor/k8s.io/klog/klog_test.go b/vendor/k8s.io/klog/klog_test.go new file mode 100644 index 00000000..ce6ff4d5 --- /dev/null +++ b/vendor/k8s.io/klog/klog_test.go @@ -0,0 +1,415 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package klog + +import ( + "bytes" + "fmt" + stdLog "log" + "path/filepath" + "runtime" + "strconv" + "strings" + "testing" + "time" +) + +// Test that shortHostname works as advertised. +func TestShortHostname(t *testing.T) { + for hostname, expect := range map[string]string{ + "": "", + "host": "host", + "host.google.com": "host", + } { + if got := shortHostname(hostname); expect != got { + t.Errorf("shortHostname(%q): expected %q, got %q", hostname, expect, got) + } + } +} + +// flushBuffer wraps a bytes.Buffer to satisfy flushSyncWriter. +type flushBuffer struct { + bytes.Buffer +} + +func (f *flushBuffer) Flush() error { + return nil +} + +func (f *flushBuffer) Sync() error { + return nil +} + +// swap sets the log writers and returns the old array. +func (l *loggingT) swap(writers [numSeverity]flushSyncWriter) (old [numSeverity]flushSyncWriter) { + l.mu.Lock() + defer l.mu.Unlock() + old = l.file + for i, w := range writers { + logging.file[i] = w + } + return +} + +// newBuffers sets the log writers to all new byte buffers and returns the old array. +func (l *loggingT) newBuffers() [numSeverity]flushSyncWriter { + return l.swap([numSeverity]flushSyncWriter{new(flushBuffer), new(flushBuffer), new(flushBuffer), new(flushBuffer)}) +} + +// contents returns the specified log value as a string. +func contents(s severity) string { + return logging.file[s].(*flushBuffer).String() +} + +// contains reports whether the string is contained in the log. +func contains(s severity, str string, t *testing.T) bool { + return strings.Contains(contents(s), str) +} + +// setFlags configures the logging flags how the test expects them. +func setFlags() { + logging.toStderr = false +} + +// Test that Info works as advertised. +func TestInfo(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + Info("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +func TestInfoDepth(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + + f := func() { InfoDepth(1, "depth-test1") } + + // The next three lines must stay together + _, _, wantLine, _ := runtime.Caller(0) + InfoDepth(0, "depth-test0") + f() + + msgs := strings.Split(strings.TrimSuffix(contents(infoLog), "\n"), "\n") + if len(msgs) != 2 { + t.Fatalf("Got %d lines, expected 2", len(msgs)) + } + + for i, m := range msgs { + if !strings.HasPrefix(m, "I") { + t.Errorf("InfoDepth[%d] has wrong character: %q", i, m) + } + w := fmt.Sprintf("depth-test%d", i) + if !strings.Contains(m, w) { + t.Errorf("InfoDepth[%d] missing %q: %q", i, w, m) + } + + // pull out the line number (between : and ]) + msg := m[strings.LastIndex(m, ":")+1:] + x := strings.Index(msg, "]") + if x < 0 { + t.Errorf("InfoDepth[%d]: missing ']': %q", i, m) + continue + } + line, err := strconv.Atoi(msg[:x]) + if err != nil { + t.Errorf("InfoDepth[%d]: bad line number: %q", i, m) + continue + } + wantLine++ + if wantLine != line { + t.Errorf("InfoDepth[%d]: got line %d, want %d", i, line, wantLine) + } + } +} + +func init() { + CopyStandardLogTo("INFO") +} + +// Test that CopyStandardLogTo panics on bad input. +func TestCopyStandardLogToPanic(t *testing.T) { + defer func() { + if s, ok := recover().(string); !ok || !strings.Contains(s, "LOG") { + t.Errorf(`CopyStandardLogTo("LOG") should have panicked: %v`, s) + } + }() + CopyStandardLogTo("LOG") +} + +// Test that using the standard log package logs to INFO. +func TestStandardLog(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + stdLog.Print("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +// Test that the header has the correct format. +func TestHeader(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + defer func(previous func() time.Time) { timeNow = previous }(timeNow) + timeNow = func() time.Time { + return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local) + } + pid = 1234 + Info("test") + var line int + format := "I0102 15:04:05.067890 1234 klog_test.go:%d] test\n" + n, err := fmt.Sscanf(contents(infoLog), format, &line) + if n != 1 || err != nil { + t.Errorf("log format error: %d elements, error %s:\n%s", n, err, contents(infoLog)) + } + // Scanf treats multiple spaces as equivalent to a single space, + // so check for correct space-padding also. + want := fmt.Sprintf(format, line) + if contents(infoLog) != want { + t.Errorf("log format error: got:\n\t%q\nwant:\t%q", contents(infoLog), want) + } +} + +// Test that an Error log goes to Warning and Info. +// Even in the Info log, the source character will be E, so the data should +// all be identical. +func TestError(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + Error("test") + if !contains(errorLog, "E", t) { + t.Errorf("Error has wrong character: %q", contents(errorLog)) + } + if !contains(errorLog, "test", t) { + t.Error("Error failed") + } + str := contents(errorLog) + if !contains(warningLog, str, t) { + t.Error("Warning failed") + } + if !contains(infoLog, str, t) { + t.Error("Info failed") + } +} + +// Test that a Warning log goes to Info. +// Even in the Info log, the source character will be W, so the data should +// all be identical. +func TestWarning(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + Warning("test") + if !contains(warningLog, "W", t) { + t.Errorf("Warning has wrong character: %q", contents(warningLog)) + } + if !contains(warningLog, "test", t) { + t.Error("Warning failed") + } + str := contents(warningLog) + if !contains(infoLog, str, t) { + t.Error("Info failed") + } +} + +// Test that a V log goes to Info. +func TestV(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + logging.verbosity.Set("2") + defer logging.verbosity.Set("0") + V(2).Info("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +// Test that a vmodule enables a log in this file. +func TestVmoduleOn(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + logging.vmodule.Set("klog_test=2") + defer logging.vmodule.Set("") + if !V(1) { + t.Error("V not enabled for 1") + } + if !V(2) { + t.Error("V not enabled for 2") + } + if V(3) { + t.Error("V enabled for 3") + } + V(2).Info("test") + if !contains(infoLog, "I", t) { + t.Errorf("Info has wrong character: %q", contents(infoLog)) + } + if !contains(infoLog, "test", t) { + t.Error("Info failed") + } +} + +// Test that a vmodule of another file does not enable a log in this file. +func TestVmoduleOff(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + logging.vmodule.Set("notthisfile=2") + defer logging.vmodule.Set("") + for i := 1; i <= 3; i++ { + if V(Level(i)) { + t.Errorf("V enabled for %d", i) + } + } + V(2).Info("test") + if contents(infoLog) != "" { + t.Error("V logged incorrectly") + } +} + +// vGlobs are patterns that match/don't match this file at V=2. +var vGlobs = map[string]bool{ + // Easy to test the numeric match here. + "klog_test=1": false, // If -vmodule sets V to 1, V(2) will fail. + "klog_test=2": true, + "klog_test=3": true, // If -vmodule sets V to 1, V(3) will succeed. + // These all use 2 and check the patterns. All are true. + "*=2": true, + "?l*=2": true, + "????_*=2": true, + "??[mno]?_*t=2": true, + // These all use 2 and check the patterns. All are false. + "*x=2": false, + "m*=2": false, + "??_*=2": false, + "?[abc]?_*t=2": false, +} + +// Test that vmodule globbing works as advertised. +func testVmoduleGlob(pat string, match bool, t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + defer logging.vmodule.Set("") + logging.vmodule.Set(pat) + if V(2) != Verbose(match) { + t.Errorf("incorrect match for %q: got %t expected %t", pat, V(2), match) + } +} + +// Test that a vmodule globbing works as advertised. +func TestVmoduleGlob(t *testing.T) { + for glob, match := range vGlobs { + testVmoduleGlob(glob, match, t) + } +} + +func TestRollover(t *testing.T) { + setFlags() + var err error + defer func(previous func(error)) { logExitFunc = previous }(logExitFunc) + logExitFunc = func(e error) { + err = e + } + defer func(previous uint64) { MaxSize = previous }(MaxSize) + MaxSize = 512 + + Info("x") // Be sure we have a file. + info, ok := logging.file[infoLog].(*syncBuffer) + if !ok { + t.Fatal("info wasn't created") + } + if err != nil { + t.Fatalf("info has initial error: %v", err) + } + fname0 := info.file.Name() + Info(strings.Repeat("x", int(MaxSize))) // force a rollover + if err != nil { + t.Fatalf("info has error after big write: %v", err) + } + + // Make sure the next log file gets a file name with a different + // time stamp. + // + // TODO: determine whether we need to support subsecond log + // rotation. C++ does not appear to handle this case (nor does it + // handle Daylight Savings Time properly). + time.Sleep(1 * time.Second) + + Info("x") // create a new file + if err != nil { + t.Fatalf("error after rotation: %v", err) + } + fname1 := info.file.Name() + if fname0 == fname1 { + t.Errorf("info.f.Name did not change: %v", fname0) + } + if info.nbytes >= MaxSize { + t.Errorf("file size was not reset: %d", info.nbytes) + } +} + +func TestLogBacktraceAt(t *testing.T) { + setFlags() + defer logging.swap(logging.newBuffers()) + // The peculiar style of this code simplifies line counting and maintenance of the + // tracing block below. + var infoLine string + setTraceLocation := func(file string, line int, ok bool, delta int) { + if !ok { + t.Fatal("could not get file:line") + } + _, file = filepath.Split(file) + infoLine = fmt.Sprintf("%s:%d", file, line+delta) + err := logging.traceLocation.Set(infoLine) + if err != nil { + t.Fatal("error setting log_backtrace_at: ", err) + } + } + { + // Start of tracing block. These lines know about each other's relative position. + _, file, line, ok := runtime.Caller(0) + setTraceLocation(file, line, ok, +2) // Two lines between Caller and Info calls. + Info("we want a stack trace here") + } + numAppearances := strings.Count(contents(infoLog), infoLine) + if numAppearances < 2 { + // Need 2 appearances, one in the log header and one in the trace: + // log_test.go:281: I0511 16:36:06.952398 02238 log_test.go:280] we want a stack trace here + // ... + // github.com/glog/glog_test.go:280 (0x41ba91) + // ... + // We could be more precise but that would require knowing the details + // of the traceback format, which may not be dependable. + t.Fatal("got no trace back; log is ", contents(infoLog)) + } +} + +func BenchmarkHeader(b *testing.B) { + for i := 0; i < b.N; i++ { + buf, _, _ := logging.header(infoLog, 0) + logging.putBuffer(buf) + } +} diff --git a/vendor/github.com/ghodss/yaml/.gitignore b/vendor/sigs.k8s.io/yaml/.gitignore similarity index 100% rename from vendor/github.com/ghodss/yaml/.gitignore rename to vendor/sigs.k8s.io/yaml/.gitignore diff --git a/vendor/sigs.k8s.io/yaml/.travis.yml b/vendor/sigs.k8s.io/yaml/.travis.yml new file mode 100644 index 00000000..03ddc731 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/.travis.yml @@ -0,0 +1,14 @@ +language: go +dist: xenial +go: + - 1.9.x + - 1.10.x + - 1.11.x +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) + - diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON) + - go tool vet . + - go test -v -race ./... +install: + - go get golang.org/x/lint/golint diff --git a/vendor/sigs.k8s.io/yaml/CONTRIBUTING.md b/vendor/sigs.k8s.io/yaml/CONTRIBUTING.md new file mode 100644 index 00000000..de471151 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_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._ + +## Getting Started + +We have full documentation on how to get started contributing here: + + + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + + diff --git a/vendor/github.com/ghodss/yaml/LICENSE b/vendor/sigs.k8s.io/yaml/LICENSE similarity index 100% rename from vendor/github.com/ghodss/yaml/LICENSE rename to vendor/sigs.k8s.io/yaml/LICENSE diff --git a/vendor/sigs.k8s.io/yaml/OWNERS b/vendor/sigs.k8s.io/yaml/OWNERS new file mode 100644 index 00000000..11ad7ce1 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/OWNERS @@ -0,0 +1,25 @@ +approvers: +- dims +- lavalamp +- smarterclayton +- deads2k +- sttts +- liggitt +- caesarxuchao +reviewers: +- dims +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- gmarek +- sttts +- ncdc +- tallclair +labels: +- sig/api-machinery diff --git a/vendor/github.com/ghodss/yaml/README.md b/vendor/sigs.k8s.io/yaml/README.md similarity index 100% rename from vendor/github.com/ghodss/yaml/README.md rename to vendor/sigs.k8s.io/yaml/README.md diff --git a/vendor/sigs.k8s.io/yaml/RELEASE.md b/vendor/sigs.k8s.io/yaml/RELEASE.md new file mode 100644 index 00000000..6b642464 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The `yaml` Project is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/vendor/sigs.k8s.io/yaml/SECURITY_CONTACTS b/vendor/sigs.k8s.io/yaml/SECURITY_CONTACTS new file mode 100644 index 00000000..0648a8eb --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/SECURITY_CONTACTS @@ -0,0 +1,17 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +cjcullen +jessfraz +liggitt +philips +tallclair diff --git a/vendor/sigs.k8s.io/yaml/code-of-conduct.md b/vendor/sigs.k8s.io/yaml/code-of-conduct.md new file mode 100644 index 00000000..0d15c00c --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/code-of-conduct.md @@ -0,0 +1,3 @@ +# Kubernetes Community Code of Conduct + +Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/github.com/ghodss/yaml/fields.go b/vendor/sigs.k8s.io/yaml/fields.go similarity index 99% rename from vendor/github.com/ghodss/yaml/fields.go rename to vendor/sigs.k8s.io/yaml/fields.go index 58600740..235b7f2c 100644 --- a/vendor/github.com/ghodss/yaml/fields.go +++ b/vendor/sigs.k8s.io/yaml/fields.go @@ -1,6 +1,7 @@ // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. + package yaml import ( diff --git a/vendor/github.com/ghodss/yaml/yaml.go b/vendor/sigs.k8s.io/yaml/yaml.go similarity index 77% rename from vendor/github.com/ghodss/yaml/yaml.go rename to vendor/sigs.k8s.io/yaml/yaml.go index 4fb4054a..02459611 100644 --- a/vendor/github.com/ghodss/yaml/yaml.go +++ b/vendor/sigs.k8s.io/yaml/yaml.go @@ -4,13 +4,14 @@ import ( "bytes" "encoding/json" "fmt" + "io" "reflect" "strconv" "gopkg.in/yaml.v2" ) -// Marshals the object into JSON then converts JSON to YAML and returns the +// Marshal marshals the object into JSON then converts JSON to YAML and returns the // YAML. func Marshal(o interface{}) ([]byte, error) { j, err := json.Marshal(o) @@ -26,15 +27,35 @@ func Marshal(o interface{}) ([]byte, error) { return y, nil } -// Converts YAML to JSON then uses JSON to unmarshal into an object. -func Unmarshal(y []byte, o interface{}) error { +// JSONOpt is a decoding option for decoding from JSON format. +type JSONOpt func(*json.Decoder) *json.Decoder + +// Unmarshal converts YAML to JSON then uses JSON to unmarshal into an object, +// optionally configuring the behavior of the JSON unmarshal. +func Unmarshal(y []byte, o interface{}, opts ...JSONOpt) error { + return yamlUnmarshal(y, o, false, opts...) +} + +// UnmarshalStrict strictly converts YAML to JSON then uses JSON to unmarshal +// into an object, optionally configuring the behavior of the JSON unmarshal. +func UnmarshalStrict(y []byte, o interface{}, opts ...JSONOpt) error { + return yamlUnmarshal(y, o, true, append(opts, DisallowUnknownFields)...) +} + +// yamlUnmarshal unmarshals the given YAML byte stream into the given interface, +// optionally performing the unmarshalling strictly +func yamlUnmarshal(y []byte, o interface{}, strict bool, opts ...JSONOpt) error { vo := reflect.ValueOf(o) - j, err := yamlToJSON(y, &vo) + unmarshalFn := yaml.Unmarshal + if strict { + unmarshalFn = yaml.UnmarshalStrict + } + j, err := yamlToJSON(y, &vo, unmarshalFn) if err != nil { return fmt.Errorf("error converting YAML to JSON: %v", err) } - err = json.Unmarshal(j, o) + err = jsonUnmarshal(bytes.NewReader(j), o, opts...) if err != nil { return fmt.Errorf("error unmarshaling JSON: %v", err) } @@ -42,7 +63,22 @@ func Unmarshal(y []byte, o interface{}) error { return nil } -// Convert JSON to YAML. +// jsonUnmarshal unmarshals the JSON byte stream from the given reader into the +// object, optionally applying decoder options prior to decoding. We are not +// using json.Unmarshal directly as we want the chance to pass in non-default +// options. +func jsonUnmarshal(r io.Reader, o interface{}, opts ...JSONOpt) error { + d := json.NewDecoder(r) + for _, opt := range opts { + d = opt(d) + } + if err := d.Decode(&o); err != nil { + return fmt.Errorf("while decoding JSON: %v", err) + } + return nil +} + +// JSONToYAML Converts JSON to YAML. func JSONToYAML(j []byte) ([]byte, error) { // Convert the JSON to an object. var jsonObj interface{} @@ -60,8 +96,8 @@ func JSONToYAML(j []byte) ([]byte, error) { return yaml.Marshal(jsonObj) } -// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through -// this method should be a no-op. +// YAMLToJSON converts YAML to JSON. Since JSON is a subset of YAML, +// passing JSON through this method should be a no-op. // // Things YAML can do that are not supported by JSON: // * In YAML you can have binary and null keys in your maps. These are invalid @@ -70,14 +106,22 @@ func JSONToYAML(j []byte) ([]byte, error) { // use binary data with this library, encode the data as base64 as usual but do // not use the !!binary tag in your YAML. This will ensure the original base64 // encoded data makes it all the way through to the JSON. +// +// For strict decoding of YAML, use YAMLToJSONStrict. func YAMLToJSON(y []byte) ([]byte, error) { - return yamlToJSON(y, nil) + return yamlToJSON(y, nil, yaml.Unmarshal) } -func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { +// YAMLToJSONStrict is like YAMLToJSON but enables strict YAML decoding, +// returning an error on any duplicate field names. +func YAMLToJSONStrict(y []byte) ([]byte, error) { + return yamlToJSON(y, nil, yaml.UnmarshalStrict) +} + +func yamlToJSON(y []byte, jsonTarget *reflect.Value, yamlUnmarshal func([]byte, interface{}) error) ([]byte, error) { // Convert the YAML to an object. var yamlObj interface{} - err := yaml.Unmarshal(y, &yamlObj) + err := yamlUnmarshal(y, &yamlObj) if err != nil { return nil, err } @@ -272,6 +316,4 @@ func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (in } return yamlObj, nil } - - return nil, nil } diff --git a/vendor/sigs.k8s.io/yaml/yaml_go110.go b/vendor/sigs.k8s.io/yaml/yaml_go110.go new file mode 100644 index 00000000..ab3e06a2 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/yaml_go110.go @@ -0,0 +1,14 @@ +// This file contains changes that are only compatible with go 1.10 and onwards. + +// +build go1.10 + +package yaml + +import "encoding/json" + +// DisallowUnknownFields configures the JSON decoder to error out if unknown +// fields come along, instead of dropping them by default. +func DisallowUnknownFields(d *json.Decoder) *json.Decoder { + d.DisallowUnknownFields() + return d +} diff --git a/vendor/sigs.k8s.io/yaml/yaml_go110_test.go b/vendor/sigs.k8s.io/yaml/yaml_go110_test.go new file mode 100644 index 00000000..e4707e8a --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/yaml_go110_test.go @@ -0,0 +1,46 @@ +// +build go1.10 + +package yaml + +import ( + "fmt" + "testing" +) + +func TestUnmarshalWithTags(t *testing.T) { + type WithTaggedField struct { + Field string `json:"field"` + } + + t.Run("Known tagged field", func(t *testing.T) { + y := []byte(`field: "hello"`) + v := WithTaggedField{} + if err := Unmarshal(y, &v, DisallowUnknownFields); err != nil { + t.Errorf("unexpected error: %v", err) + } + if v.Field != "hello" { + t.Errorf("v.Field=%v, want 'hello'", v.Field) + } + + }) + t.Run("With unknown tagged field", func(t *testing.T) { + y := []byte(`unknown: "hello"`) + v := WithTaggedField{} + err := Unmarshal(y, &v, DisallowUnknownFields) + if err == nil { + t.Errorf("want error because of unknown field, got : v=%#v", v) + } + }) + +} + +func exampleUnknown() { + type WithTaggedField struct { + Field string `json:"field"` + } + y := []byte(`unknown: "hello"`) + v := WithTaggedField{} + fmt.Printf("%v\n", Unmarshal(y, &v, DisallowUnknownFields)) + // Ouptut: + // unmarshaling JSON: while decoding JSON: json: unknown field "unknown" +} diff --git a/vendor/github.com/ghodss/yaml/yaml_test.go b/vendor/sigs.k8s.io/yaml/yaml_test.go similarity index 62% rename from vendor/github.com/ghodss/yaml/yaml_test.go rename to vendor/sigs.k8s.io/yaml/yaml_test.go index 505af453..42a23156 100644 --- a/vendor/github.com/ghodss/yaml/yaml_test.go +++ b/vendor/sigs.k8s.io/yaml/yaml_test.go @@ -106,8 +106,8 @@ b: unmarshal(t, y, &s5, &e5) } -func unmarshal(t *testing.T, y []byte, s, e interface{}) { - err := Unmarshal(y, s) +func unmarshal(t *testing.T, y []byte, s, e interface{}, opts ...JSONOpt) { + err := Unmarshal(y, s, opts...) if err != nil { t.Errorf("error unmarshaling YAML: %v", err) } @@ -118,6 +118,129 @@ func unmarshal(t *testing.T, y []byte, s, e interface{}) { } } +func TestUnmarshalStrict(t *testing.T) { + y := []byte("a: 1") + s1 := UnmarshalString{} + e1 := UnmarshalString{A: "1"} + unmarshalStrict(t, y, &s1, &e1) + + y = []byte("a: true") + s1 = UnmarshalString{} + e1 = UnmarshalString{A: "true"} + unmarshalStrict(t, y, &s1, &e1) + + y = []byte("true: 1") + s1 = UnmarshalString{} + e1 = UnmarshalString{True: "1"} + unmarshalStrict(t, y, &s1, &e1) + + y = []byte("a:\n a: 1") + s2 := UnmarshalNestedString{} + e2 := UnmarshalNestedString{NestedString{"1"}} + unmarshalStrict(t, y, &s2, &e2) + + y = []byte("a:\n - b: abc\n c: def\n - b: 123\n c: 456\n") + s3 := UnmarshalSlice{} + e3 := UnmarshalSlice{[]NestedSlice{NestedSlice{"abc", strPtr("def")}, NestedSlice{"123", strPtr("456")}}} + unmarshalStrict(t, y, &s3, &e3) + + y = []byte("a:\n b: 1") + s4 := UnmarshalStringMap{} + e4 := UnmarshalStringMap{map[string]string{"b": "1"}} + unmarshalStrict(t, y, &s4, &e4) + + y = []byte(` +a: + name: TestA +b: + name: TestB +`) + type NamedThing struct { + Name string `json:"name"` + } + s5 := map[string]*NamedThing{} + e5 := map[string]*NamedThing{ + "a": &NamedThing{Name: "TestA"}, + "b": &NamedThing{Name: "TestB"}, + } + unmarshal(t, y, &s5, &e5) + + // When using not-so-strict unmarshal, we should + // be picking up the ID-1 as the value in the "id" field + y = []byte(` +a: + name: TestA + id: ID-A + id: ID-1 +`) + type NamedThing2 struct { + Name string `json:"name"` + ID string `json:"id"` + } + s6 := map[string]*NamedThing2{} + e6 := map[string]*NamedThing2{ + "a": {Name: "TestA", ID: "ID-1"}, + } + unmarshal(t, y, &s6, &e6) +} + +func TestUnmarshalStrictFails(t *testing.T) { + y := []byte("a: true\na: false") + s1 := UnmarshalString{} + unmarshalStrictFail(t, y, &s1) + + y = []byte("a:\n - b: abc\n c: 32\n b: 123") + s2 := UnmarshalSlice{} + unmarshalStrictFail(t, y, &s2) + + y = []byte("a:\n b: 1\n c: 3") + s3 := UnmarshalStringMap{} + unmarshalStrictFail(t, y, &s3) + + type NamedThing struct { + Name string `json:"name"` + ID string `json:"id"` + } + // When using strict unmarshal, we should see + // the unmarshal fail if there are multiple keys + y = []byte(` +a: + name: TestA + id: ID-A + id: ID-1 +`) + s4 := NamedThing{} + unmarshalStrictFail(t, y, &s4) + + // Strict unmarshal should fail for unknown fields + y = []byte(` +name: TestB +id: ID-B +unknown: Some-Value +`) + s5 := NamedThing{} + unmarshalStrictFail(t, y, &s5) +} + +func unmarshalStrict(t *testing.T, y []byte, s, e interface{}, opts ...JSONOpt) { + err := UnmarshalStrict(y, s, opts...) + if err != nil { + t.Errorf("error unmarshaling YAML: %v", err) + } + + if !reflect.DeepEqual(s, e) { + t.Errorf("unmarshal YAML was unsuccessful, expected: %+#v, got: %+#v", + e, s) + } +} + +func unmarshalStrictFail(t *testing.T, y []byte, s interface{}, opts ...JSONOpt) { + err := UnmarshalStrict(y, s, opts...) + if err == nil { + t.Errorf("error unmarshaling YAML: %v", err) + } +} + type Case struct { input string output string @@ -285,3 +408,16 @@ func runCases(t *testing.T, runType RunType, cases []Case) { func strPtr(s string) *string { return &s } + +func TestYAMLToJSONStrict(t *testing.T) { + const data = ` +foo: bar +foo: baz +` + if _, err := YAMLToJSON([]byte(data)); err != nil { + t.Error("expected YAMLtoJSON to pass on duplicate field names") + } + if _, err := YAMLToJSONStrict([]byte(data)); err == nil { + t.Error("expected YAMLtoJSONStrict to fail on duplicate field names") + } +}