commit
f93bcfbc24
162 changed files with 6806 additions and 7275 deletions
47
go.mod
47
go.mod
|
@ -3,14 +3,17 @@ module k8s.io/ingress-nginx
|
|||
go 1.12
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.38.0 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/Sirupsen/logrus v0.0.0-00010101000000-000000000000 // indirect
|
||||
github.com/armon/go-proxyproto v0.0.0-20190211145416-68259f75880e
|
||||
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||
github.com/eapache/channels v1.1.0
|
||||
github.com/eapache/queue v1.1.0 // indirect
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
|
||||
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect
|
||||
github.com/go-logr/logr v0.1.0 // indirect
|
||||
github.com/go-logr/zapr v0.1.1 // indirect
|
||||
github.com/go-openapi/swag v0.19.0 // indirect
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/imdario/mergo v0.3.7
|
||||
github.com/json-iterator/go v1.1.6
|
||||
|
@ -25,7 +28,6 @@ require (
|
|||
github.com/ncabatoff/procfs v0.0.0-20180903163354-e1a38cb53622 // indirect
|
||||
github.com/onsi/ginkgo v1.8.0
|
||||
github.com/onsi/gomega v1.5.0
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
|
||||
github.com/opencontainers/runc v0.1.1
|
||||
github.com/parnurzeal/gorequest v0.2.15
|
||||
github.com/paultag/sniff v0.0.0-20170624152000-87325c3dddf4
|
||||
|
@ -34,7 +36,6 @@ require (
|
|||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f
|
||||
github.com/prometheus/common v0.2.0
|
||||
github.com/prometheus/procfs v0.0.0-20190328153300-af7bedc223fb // indirect
|
||||
github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 // indirect
|
||||
github.com/spf13/cobra v0.0.4
|
||||
github.com/spf13/pflag v1.0.3
|
||||
github.com/tallclair/mdtoc v0.0.0-20190627191617-4dc3d6f90813
|
||||
|
@ -47,24 +48,42 @@ require (
|
|||
gopkg.in/go-playground/pool.v3 v3.1.1
|
||||
|
||||
k8s.io/api v0.0.0
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190626210203-fdc73e13f9a6
|
||||
k8s.io/apiextensions-apiserver v0.0.0
|
||||
k8s.io/apimachinery v0.0.0
|
||||
k8s.io/apiserver v0.0.0-20190625052034-8c075cba2f8c
|
||||
k8s.io/cli-runtime v0.0.0-20190711111425-61e036b70227
|
||||
k8s.io/apiserver v0.0.0
|
||||
k8s.io/cli-runtime v0.0.0
|
||||
k8s.io/client-go v12.0.0+incompatible
|
||||
k8s.io/cloud-provider v0.0.0-20190711113108-0d51509e0ef5 // indirect
|
||||
k8s.io/code-generator v0.0.0-20190620073620-d55040311883
|
||||
k8s.io/component-base v0.0.0-20190626045757-ca439aa083f5
|
||||
k8s.io/code-generator v0.0.0
|
||||
k8s.io/component-base v0.0.0
|
||||
k8s.io/klog v0.3.3
|
||||
k8s.io/kubernetes v0.0.0
|
||||
k8s.io/kubernetes v1.15.1
|
||||
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a // indirect
|
||||
sigs.k8s.io/controller-runtime v0.1.10
|
||||
sigs.k8s.io/testing_frameworks v0.1.1 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.4.1
|
||||
|
||||
k8s.io/api => k8s.io/api v0.0.0-20190703205437-39734b2a72fe
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190703205208-4cfb76a8bf76
|
||||
k8s.io/kubernetes => k8s.io/kubernetes v1.14.3
|
||||
k8s.io/api => k8s.io/api v0.0.0-20190718183219-b59d8169aab5
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190620085550-3a2f62f126c9
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190711103026-7bf792636534
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20190718184206-a1aa83af71a7
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20190620085659-429467d76d0e
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20190718183610-8e956561bbf5
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190620090041-1a7e1f6630cd
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20190620090010-a60497bb9ffa
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20190620085131-4cd66be69262
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190531030430-6117653b35f1
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20190620090114-816aa063c73d
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20190620085316-c835efc41000
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20190620085943-52018c8ce3c1
|
||||
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20190620085811-cc0b23ba60a9
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20190620085909-5dfb14b3a101
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190620085837-98477dc0c87c
|
||||
k8s.io/kubernetes => k8s.io/kubernetes v1.15.1
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190620090159-a9e4f3cb5bf3
|
||||
k8s.io/metrics => k8s.io/metrics v0.0.0-20190620085627-5b02f62e9559
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190620085357-8191e314a1f7
|
||||
)
|
||||
|
|
272
go.sum
272
go.sum
|
@ -1,12 +1,22 @@
|
|||
bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
github.com/Azure/azure-sdk-for-go v21.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
|
||||
github.com/Azure/go-autorest v11.1.2+incompatible h1:viZ3tV5l4gE2Sw0xrasFHytCGtzYCrT+um/rrSQ1BfA=
|
||||
github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14=
|
||||
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA=
|
||||
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4=
|
||||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
|
@ -14,36 +24,64 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN
|
|||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/armon/go-proxyproto v0.0.0-20190211145416-68259f75880e h1:h0gP0hBU6DsA5IQduhLWGOEfIUKzJS5hhXQBSgHuF/g=
|
||||
github.com/armon/go-proxyproto v0.0.0-20190211145416-68259f75880e/go.mod h1:QmP9hvJ91BbJmGVGSbutW19IC0Q9phDCLGaomwTJbgU=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM=
|
||||
github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us=
|
||||
github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY=
|
||||
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
|
||||
github.com/client9/misspell v0.0.0-20170928000206-9ce5d979ffda/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/cfssl v0.0.0-20180726162950-56268a613adf/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
|
||||
github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0=
|
||||
github.com/codedellemc/goscaleio v0.0.0-20170830184815-20e2ce2cf885/go.mod h1:JIHmDHNZO4tmA3y3RHp6+Gap6kFsNf55W9Pn/3YS9IY=
|
||||
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
|
||||
github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
|
||||
github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
||||
github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
|
||||
github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
|
||||
github.com/containernetworking/cni v0.6.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
|
||||
github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-oidc v0.0.0-20180117170138-065b426bd416/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
github.com/coreos/go-semver v0.0.0-20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U=
|
||||
github.com/cpuguy83/go-md2man v1.0.4/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/cyphar/filepath-securejoin v0.0.0-20170720062807-ae69057f2299/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
|
||||
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
|
||||
github.com/d2g/dhcp4client v0.0.0-20170829104524-6e570ed0a266/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
|
||||
github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda h1:NyywMz59neOoVRFDz+ccfKWxn784fiHMDnZSy6T+JXY=
|
||||
github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
|
||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
|
||||
github.com/docker/distribution v0.0.0-20170726174610-edc3ab29cdff h1:FKH02LHYqSmeWd3GBh0KIkM8JBpw3RrShgtcWShdWJg=
|
||||
github.com/docker/distribution v0.0.0-20170726174610-edc3ab29cdff/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk=
|
||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k=
|
||||
|
@ -53,11 +91,16 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP
|
|||
github.com/ekalinin/github-markdown-toc v0.0.0-20190514155158-83fadb60a7f1/go.mod h1:XfZS1iyC28CnllR54Ou2Ero6qs4Rmn7GpVumNSj1DZo=
|
||||
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e h1:p1yVGRW3nmb85p1Sh1ZJSDm4A4iKLS5QNbvUHMgGu/M=
|
||||
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw=
|
||||
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible h1:fUDGZCv/7iAN7u0puUVhvKCcsR6vRfwrJatElLBEf0I=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
|
||||
github.com/fatih/camelcase v0.0.0-20160318181535-f6a740d52f96/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU=
|
||||
|
@ -77,36 +120,30 @@ github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpR
|
|||
github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||
github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||
github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8=
|
||||
github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0=
|
||||
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||
github.com/go-openapi/jsonreference v0.17.0 h1:yJW3HCkTHg7NOA+gZ83IPHzUSnUzGXhGmsdiCcMexbA=
|
||||
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk=
|
||||
github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w=
|
||||
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
||||
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
|
||||
github.com/go-openapi/runtime v0.17.2/go.mod h1:QO936ZXeisByFmZEO1IS1Dqhtf4QV1sYYFtIq6Ld86Q=
|
||||
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||
github.com/go-openapi/spec v0.17.2 h1:eb2NbuCnoe8cWAxhtK6CfMWUYmiFEZJ9Hx3Z2WRwJ5M=
|
||||
github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||
github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE=
|
||||
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
|
||||
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||
github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.17.2 h1:K/ycE/XTUDFltNHSO32cGRUhrVGJD64o8WgAIZNyc3k=
|
||||
github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8=
|
||||
github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/validate v0.17.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||
github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
||||
github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
|
||||
|
@ -115,31 +152,45 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekf
|
|||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho=
|
||||
github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8=
|
||||
github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk=
|
||||
github.com/gomarkdown/markdown v0.0.0-20190222000725-ee6a7931a1e4 h1:vELsocEzlhM4lk2nhxolEaQrMp25u7/i9IX8s9uLads=
|
||||
github.com/gomarkdown/markdown v0.0.0-20190222000725-ee6a7931a1e4/go.mod h1:gmFANS06wAVmF0B9yi65QKsRmPQ97tze7FRLswua+OY=
|
||||
github.com/google/btree v0.0.0-20160524151835-7d79101e329e h1:JHB7F/4TJCrYBW8+GZO8VkWDj1jxcWuCl6uxKODiyi4=
|
||||
github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/cadvisor v0.33.2-0.20190411163913-9db8c7dee20a/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48=
|
||||
github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
|
||||
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8 h1:L9JPKrtsHMQ4VCRQfHvbbHBfB2Urn8xf6QZeXZ+OrN4=
|
||||
github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
|
||||
github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o=
|
||||
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7 h1:6TSoaYExHper8PYsJu23GWVNOyYRCSnIFyxKgLSZ54w=
|
||||
github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
|
@ -147,7 +198,12 @@ github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20170330212424-2500245aa611/
|
|||
github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
|
||||
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl v0.0.0-20160711231752-d8c773c4cba1/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/heketi/heketi v0.0.0-20181109135656-558b29266ce0/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o=
|
||||
github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI=
|
||||
github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4=
|
||||
github.com/heketi/utils v0.0.0-20170317161834-435bc5bdfa64/go.mod h1:RYlF4ghFZPPmk2TC5REt5OFwvfb6lzxFWrTWB+qs28s=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
|
@ -155,33 +211,52 @@ github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=
|
|||
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jonboulle/clockwork v0.0.0-20141017032234-72f9bd7c4e0c/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jteeuwen/go-bindata v0.0.0-20151023091102-a0ff2567cfb7/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kardianos/osext v0.0.0-20150410034420-8fef92e41e22/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
|
||||
github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169/go.mod h1:glhvuHOU9Hy7/8PwwdtnarXqLagOX0b/TbZx2zLMqEg=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.0.0-20140812000539-f31442d60e51/go.mod h1:Bvhd+E3laJ0AVkG0c9rmtZcnhV0HQ3+c3YxxqTvc/gA=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
github.com/kr/text v0.0.0-20130911015532-6807e777504f/go.mod h1:sjUstKUATFIcff4qlB53Kml0wQPtJVc/3fWrmuUmcfA=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
|
||||
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
|
||||
github.com/libopenstorage/openstorage v0.0.0-20170906232338-093a0c388875/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc=
|
||||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
|
||||
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
|
||||
github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA=
|
||||
github.com/magiconair/properties v0.0.0-20160816085511-61b492c03cf4/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
|
||||
github.com/mattn/go-shellwords v0.0.0-20180605041737-f8471b0a71de/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4=
|
||||
github.com/mholt/caddy v0.0.0-20180213163048-2de495001514/go.mod h1:Wb1PlT4DAYSqOEd03MsqkdkXnTxA8v9pKjdpxbqM1kY=
|
||||
github.com/miekg/dns v0.0.0-20160614162101-5d001d020961/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY=
|
||||
github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 h1:kw1v0NlnN+GZcU8Ma8CLF2Zzgjfx95gs3/GN3vYAPpo=
|
||||
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk=
|
||||
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
||||
github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y=
|
||||
github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
|
@ -192,13 +267,18 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
|
|||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
|
||||
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
|
||||
github.com/moul/pb v0.0.0-20180404114147-54bdd96e6a52 h1:8zDEa5yAIWYBHSDpPbSgGIBL/SvPSE9/FlB3aQ54d/A=
|
||||
github.com/moul/pb v0.0.0-20180404114147-54bdd96e6a52/go.mod h1:jE2HT8eoucYyUPBFJMreiVlC3KPHkDMtN8wn+ef7Y64=
|
||||
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mvdan/xurls v0.0.0-20160110113200-1b768d7c393a/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk=
|
||||
github.com/ncabatoff/go-seq v0.0.0-20180805175032-b08ef85ed833 h1:t4WWQ9I797y7QUgeEjeXnVb+oYuEDQc6gLvrZJTYo94=
|
||||
github.com/ncabatoff/go-seq v0.0.0-20180805175032-b08ef85ed833/go.mod h1:0CznHmXSjMEqs5Tezj/w2emQoM41wzYM9KpDKUHPYag=
|
||||
github.com/ncabatoff/process-exporter v0.0.0-20180915144445-bdf24ef23850 h1:+N9D9mM5Nr4iDYOrZBVDT7w7wGhFNTvEXWX80LNXJMo=
|
||||
|
@ -208,26 +288,34 @@ github.com/ncabatoff/procfs v0.0.0-20180903163354-e1a38cb53622/go.mod h1:1Sa4zSa
|
|||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w=
|
||||
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo=
|
||||
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420 h1:Yu3681ykYHDfLoI6XVjL4JWmkE+3TX9yfIWwRCh1kFM=
|
||||
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||
github.com/opencontainers/image-spec v0.0.0-20170604055404-372ad780f634/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/opencontainers/runc v0.0.0-20181113202123-f000fe11ece1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y=
|
||||
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/selinux v0.0.0-20170621221121-4a2974bf1ee9/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
|
||||
github.com/parnurzeal/gorequest v0.2.15 h1:oPjDCsF5IkD4gUk6vIgsxYNaSgvAnIh1EJeROn3HdJU=
|
||||
github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE=
|
||||
github.com/paultag/sniff v0.0.0-20170624152000-87325c3dddf4 h1:bOK8V55gl1AEWE9KiXSZ0fzARvVBehdmYZOTFcQ5kUo=
|
||||
github.com/paultag/sniff v0.0.0-20170624152000-87325c3dddf4/go.mod h1:J3XXNGJINXLa4yIivdUT0Ad/srv2q0pSOWbbm6El2EY=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v0.0.0-20160930220758-4d0e916071f6/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
|
||||
github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
|
||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA=
|
||||
|
@ -243,48 +331,68 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R
|
|||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190328153300-af7bedc223fb h1:LvNCMEj0FFZQYsxZb7o3xQPrtqOOB6lrTUOWshC+ZTs=
|
||||
github.com/prometheus/procfs v0.0.0-20190328153300-af7bedc223fb/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
|
||||
github.com/robfig/cron v0.0.0-20170309132418-df38d32658d8/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
|
||||
github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/seccomp/libseccomp-golang v0.0.0-20150813023252-1b506fc7c24e/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20151028001915-10ef21a441db/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sigma/go-inotify v0.0.0-20181102212354-c87b6cf5033d/go.mod h1:stlh9OsqBQSdwxTxX73mu41BBtRbIpZLQ7flcAoxAfo=
|
||||
github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 h1:N8Bg45zpk/UcpNGnfJt2y/3lRWASHNTUET8owPYCgYI=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
|
||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/spf13/afero v0.0.0-20160816080757-b28a7effac97/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.4 h1:S0tLZ3VOKl2Te0hpq8+ke0eSJPfCnNTPiDlsfwi1/NE=
|
||||
github.com/spf13/cobra v0.0.4/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/viper v0.0.0-20160820190039-7fb2782df3d8/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
|
||||
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/tallclair/mdtoc v0.0.0-20190627191617-4dc3d6f90813 h1:1Q3NGZNH8/oSGhSe0J8WjkFCeIOb0JSy7M4RpqY64XI=
|
||||
github.com/tallclair/mdtoc v0.0.0-20190627191617-4dc3d6f90813/go.mod h1:BjDk9nfX4091pXLHhvf6Ejr4/r//9NslWmweWb2Hkbs=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
|
||||
github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
|
||||
github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
|
||||
github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
|
||||
github.com/vmware/photon-controller-go-sdk v0.0.0-20170310013346-4a435daef6cc/go.mod h1:e6humHha1ekIwTCm+A5Qed5mG8V4JL+ChHcUOJ+L/8U=
|
||||
github.com/xanzy/go-cloudstack v0.0.0-20160728180336-1e2cbf647e57/go.mod h1:s3eL3z5pNXF5FVybcT+LIVdId8pYn709yv6v5mrkrQE=
|
||||
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
github.com/zakjan/cert-chain-resolver v0.0.0-20180703112424-6076e1ded272 h1:scDk3LAM8x+NPuywVGC0q0/G+5Ed8M0+YXecz4XnWRM=
|
||||
github.com/zakjan/cert-chain-resolver v0.0.0-20180703112424-6076e1ded272/go.mod h1:KNkcm66cr4ilOiEcjydK+tc2ShPUhqmuoXCljXUBPu8=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569 h1:nSQar3Y0E3VQF/VdZ8PTAilaXpER+d7ypdABCrpwMdg=
|
||||
go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df h1:shvkWr0NAZkg4nPuE3XrKP0VuBPijjk3TfX6Y6acFNg=
|
||||
|
@ -294,17 +402,17 @@ go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslx
|
|||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495 h1:I6A9Ag9FpEKOjcKrRNjQkPHawoXIhKyTGfvvjFAiiAk=
|
||||
golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
@ -315,51 +423,55 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73r
|
|||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190328230028-74de082e2cca h1:hyA6yiAgbUwuWqtscNvWAI7U1CtlaD1KilQ6iudt1aI=
|
||||
golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA=
|
||||
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313 h1:pczuHS43Cp2ktBEEmLwScxgjWsBSzdaQiKzUyf3DTTc=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f h1:25KHgbfyiSm6vwQLbM3zZIe1v9p/3ea4Rz+nnM5K/i4=
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d h1:TnM+PKb3ylGmZvyPXmo9m/wktg7Jn/a/fNmr33HSj8g=
|
||||
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20170824195420-5d2fd3ccab98/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384 h1:TFlARGu6Czu1z7q93HTxcP1P+/ZFC/IKythI5RzrnRg=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 h1:QjA/9ArTfVTLfEhClDCG7SGrZkZixxWpwNCDiwJfh88=
|
||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 h1:OB/uP/Puiu5vS5QMRPrXCDWUPb+kt8f1KW8oQzFejQw=
|
||||
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e h1:jRyg0XfpwWlhEV8mDfdNGBeSJM2fuyh9Yjrnd8kF2Ts=
|
||||
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
|
||||
google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c=
|
||||
|
@ -367,7 +479,11 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
|
|||
google.golang.org/genproto v0.0.0-20170731182057-09f6ed296fc6/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7 h1:ZUjXAXmrAyrmmCPHgCA/vChHcpsX27MZ3yBonD/z1KE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM=
|
||||
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
|
@ -378,54 +494,67 @@ gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
|||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo=
|
||||
gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE=
|
||||
gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||
gopkg.in/go-playground/pool.v3 v3.1.1 h1:4Qcj91IsYTpIeRhe/eo6Fz+w6uKWPEghx8vHFTYMfhw=
|
||||
gopkg.in/go-playground/pool.v3 v3.1.1/go.mod h1:pUAGBximS/hccTTSzEop6wvvQhVa3QPDFFW+8REdutg=
|
||||
gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o=
|
||||
gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0-20150622162204-20b71e5b60d7/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/square/go-jose.v2 v2.0.0-20180411045311-89060dee6a84/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.0.0-20190703205437-39734b2a72fe h1:MFaHtAyhZcfBZocN91muHSqnwiF5yfXx7yGoehneNYg=
|
||||
k8s.io/api v0.0.0-20190703205437-39734b2a72fe/go.mod h1:J5EZ0KSEjvyKOBy5BDHSF3zn82madLLWg7nUKaOHZKU=
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190626210203-fdc73e13f9a6 h1:qmQstpcwzWz3sF4IdIdHNd+QqEW27NtIl3g1Hc64pKo=
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190626210203-fdc73e13f9a6/go.mod h1:BtPMQLDJSVfn7fHhoZrhbSHNrEFnXjKNVefNBc7M4/c=
|
||||
k8s.io/apimachinery v0.0.0-20190703205208-4cfb76a8bf76 h1:vxMYBaJgczGAIpJAOBco2eHuFYIyDdNIebt60jxLauA=
|
||||
k8s.io/apimachinery v0.0.0-20190703205208-4cfb76a8bf76/go.mod h1:M2fZgZL9DbLfeJaPBCDqSqNsdsmLN+V29knYJnIXlMA=
|
||||
k8s.io/apiserver v0.0.0-20190625052034-8c075cba2f8c h1:hQTBSsQW7vz11pD5H+u8CJDPH5tPMZU7fZNrngblrkI=
|
||||
k8s.io/apiserver v0.0.0-20190625052034-8c075cba2f8c/go.mod h1:iv88XxGh9TIPUnSeQVGhypLx6/n0xn1/8OxMRrkKUP4=
|
||||
k8s.io/cli-runtime v0.0.0-20190711111425-61e036b70227 h1:q8pjgm8GrV8Zsnb2bdy4SHM41rASdMH59D8LHQDoKQM=
|
||||
k8s.io/cli-runtime v0.0.0-20190711111425-61e036b70227/go.mod h1:ZJEA9p+Wpusb5qdOk+B2TSXNY6xFrcduZrWaVaZI0V4=
|
||||
k8s.io/client-go v0.0.0-20190624085356-2c6e35a5b9cf/go.mod h1:rQMvHbaXi4pHSLf91Z1YI3h2Av+T3jsFKEIAWucw7hc=
|
||||
k8s.io/client-go v0.0.0-20190626045420-1ec4b74c7bda/go.mod h1:+MutroXOEjjw9n8kfVq8ZJEE/Fk3YVww/+4uIg+m/S0=
|
||||
k8s.io/client-go v0.0.0-20190711103903-4a0861cac5e0/go.mod h1:MdhWxiGHTqqubuL4pqFLTAhEjVr0Oa6nj8mAy3kFIEI=
|
||||
k8s.io/client-go v12.0.0+incompatible h1:YlJxncpeVUC98/WMZKC3JZGk/OXQWCZjAB4Xr3B17RY=
|
||||
k8s.io/client-go v12.0.0+incompatible/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k=
|
||||
k8s.io/cloud-provider v0.0.0-20190711113108-0d51509e0ef5 h1:sRUsF1Fop2aeMJOfCT4xlQJUvMhk+EznyzY7RMW6ZzQ=
|
||||
k8s.io/cloud-provider v0.0.0-20190711113108-0d51509e0ef5/go.mod h1:5LDt9VVqCTfW59z7dQ8QXZ3L+CwHP/6P1rRSBCgdb3o=
|
||||
k8s.io/code-generator v0.0.0-20190620073620-d55040311883 h1:NWWNvN6IdpmQvZ43rVccCI8GPUrheK8XNdqeKycw0DI=
|
||||
k8s.io/code-generator v0.0.0-20190620073620-d55040311883/go.mod h1:+a+9g9W0llgbgvx6qOb+VbeZPH5km1FrVyMQe9/jkQY=
|
||||
k8s.io/component-base v0.0.0-20190624085813-dd74dcc4bb91/go.mod h1:rzptoTTLijQSUO6SiDWhyXGRbVquvfM7QY0fvdPyXSU=
|
||||
k8s.io/component-base v0.0.0-20190626045757-ca439aa083f5 h1:q/LCzptcxSw9EyZFILhgkvgSh3TBPM8UhLWCq19sV7I=
|
||||
k8s.io/component-base v0.0.0-20190626045757-ca439aa083f5/go.mod h1:rzptoTTLijQSUO6SiDWhyXGRbVquvfM7QY0fvdPyXSU=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.0.0-20190718183219-b59d8169aab5 h1:X3LHYU4fwu75lvvWypbppCKuhqg1KrvcZ1lLaAgmE/g=
|
||||
k8s.io/api v0.0.0-20190718183219-b59d8169aab5/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A=
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190620085550-3a2f62f126c9 h1:k9vwVsnIfkX2eTHTTfJoYo6pGwwVBUAr7VZzinSrjLM=
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190620085550-3a2f62f126c9/go.mod h1:di7nkarEFC6V6WvJIq4rLpWymXYPM3wwqZFtYIA0Xg0=
|
||||
k8s.io/apimachinery v0.0.0-20190711103026-7bf792636534 h1:Iz41otzY4YmgjBECtotKCfHHKm9FSZ5x/1ykagnI30s=
|
||||
k8s.io/apimachinery v0.0.0-20190711103026-7bf792636534/go.mod h1:M2fZgZL9DbLfeJaPBCDqSqNsdsmLN+V29knYJnIXlMA=
|
||||
k8s.io/apiserver v0.0.0-20190718184206-a1aa83af71a7 h1:8mEhvrlegNEsADNHBah9RiCpEGaG1WVLall4pitumBs=
|
||||
k8s.io/apiserver v0.0.0-20190718184206-a1aa83af71a7/go.mod h1:U+p3oErZ9CNJpjYE9Kx0IZ0VHFiDC92/xM4znOfwqaU=
|
||||
k8s.io/cli-runtime v0.0.0-20190620085659-429467d76d0e h1:54KOxJkSycxbYrueshmFp1cUAfVbEP9sjYKVbIXYw9M=
|
||||
k8s.io/cli-runtime v0.0.0-20190620085659-429467d76d0e/go.mod h1:nxflCnMaMcLCeQNRLyGeoY2crlsPMVmCPc0iGTUvajE=
|
||||
k8s.io/client-go v0.0.0-20190718183610-8e956561bbf5 h1:ZIHnBytv9H1jiI7K/Szva829lP6zKsluhjVRdxf5kHA=
|
||||
k8s.io/client-go v0.0.0-20190718183610-8e956561bbf5/go.mod h1:ozblAqkW495yoAX60QZyxQBq5W0YixE9Ffn4F91RO0g=
|
||||
k8s.io/cloud-provider v0.0.0-20190620090041-1a7e1f6630cd h1:3rNeJmlNQjzcuUi6h1loRsqKjMQSxWDAWYDMittuTGE=
|
||||
k8s.io/cloud-provider v0.0.0-20190620090041-1a7e1f6630cd/go.mod h1:Un5YLpjmC+XZ9zO19edNEnyy9bQ9gt2H210665c4FWc=
|
||||
k8s.io/cluster-bootstrap v0.0.0-20190620090010-a60497bb9ffa/go.mod h1:nKdJhweDROdvToPucD2iin6nuJ0zg8qRxBu2i/LqxL0=
|
||||
k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b h1:p+PRuwXWwk5e+UYvicGiavEupapqM5NOxUl3y1GkD6c=
|
||||
k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b/go.mod h1:G8bQwmHm2eafm5bgtX67XDZQ8CWKSGu9DekI+yN4Y5I=
|
||||
k8s.io/component-base v0.0.0-20190620085131-4cd66be69262 h1:2j4mE+jKntnIcQjOOWyzb/2GsJIuPqjORLMDeHnagpM=
|
||||
k8s.io/component-base v0.0.0-20190620085131-4cd66be69262/go.mod h1:VLedAFwENz2swOjm0zmUXpAP2mV55c49xgaOzPBI/QQ=
|
||||
k8s.io/cri-api v0.0.0-20190531030430-6117653b35f1 h1:NVZIgq492plCUB4GlZUTdgGQRPOKmBWpw2HlOJDm9OQ=
|
||||
k8s.io/cri-api v0.0.0-20190531030430-6117653b35f1/go.mod h1:K6Ux7uDbzKhacgqW0OJg3rjXk/SR9kprCPfSUDXGB5A=
|
||||
k8s.io/csi-translation-lib v0.0.0-20190620090114-816aa063c73d/go.mod h1:q5k0Vv3qsOTu2PUrTh+4mRAj+Pt+1BRyWiiwr5LBFOM=
|
||||
k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af h1:SwjZbO0u5ZuaV6TRMWOGB40iaycX8sbdMQHtjNZ19dk=
|
||||
k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68=
|
||||
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c=
|
||||
k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/kube-aggregator v0.0.0-20190620085316-c835efc41000/go.mod h1:VQ+wumV2o4KXe3arqjS/+4l3Hd+3cZOOCf1wcGPzPJg=
|
||||
k8s.io/kube-controller-manager v0.0.0-20190620085943-52018c8ce3c1/go.mod h1:E2bR8dj02P7Ydp/oaGjos0ydxIps1dcqvA21BsAGr9I=
|
||||
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30 h1:TRb4wNWoBVrH9plmkp2q86FIDppkbrEXdXlxU3a3BMI=
|
||||
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
|
||||
k8s.io/kubernetes v1.14.3 h1:/FQkOJpjc1jGA37s7Rt3U10VwIKW685ejrgOp4UDRFE=
|
||||
k8s.io/kubernetes v1.14.3/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
|
||||
k8s.io/kube-proxy v0.0.0-20190620085811-cc0b23ba60a9/go.mod h1:s7TcaJtcwsGGyi9q1gmmDuTBwJcJn/rfyAOIUUh3JjI=
|
||||
k8s.io/kube-scheduler v0.0.0-20190620085909-5dfb14b3a101/go.mod h1:aiWD0dWmuCnURY1+o3E0WgKQOlWFFqHESjz4nhzXXh8=
|
||||
k8s.io/kubelet v0.0.0-20190620085837-98477dc0c87c/go.mod h1:L9fEppwvpkTrPZju8XolATHatuUt4Vscd/SVHZZGHKc=
|
||||
k8s.io/kubernetes v1.15.1 h1:bCoCfn9sRFf47U5wn/y6I397hduMEpJ2gh4uN8BUYGI=
|
||||
k8s.io/kubernetes v1.15.1/go.mod h1:3RE5ikMc73WK+dSxk4pQuQ6ZaJcPXiZX2dj98RcdCuM=
|
||||
k8s.io/legacy-cloud-providers v0.0.0-20190620090159-a9e4f3cb5bf3/go.mod h1:vN4qQ5sBl+8105txtOVlFFNAXTc8lYvM41krV0K7xXc=
|
||||
k8s.io/metrics v0.0.0-20190620085627-5b02f62e9559/go.mod h1:f5M7Wu7aoJPaYxys9OpQdzhfOVWhuS/WE20voRy8KEY=
|
||||
k8s.io/repo-infra v0.0.0-20181204233714-00fe14e3d1a3/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ=
|
||||
k8s.io/sample-apiserver v0.0.0-20190620085357-8191e314a1f7/go.mod h1:RVMdQ03C5ZqPz82uV82L72wju27+zFFnyzKje9DVBZI=
|
||||
k8s.io/utils v0.0.0-20190221042446-c2654d5206da h1:ElyM7RPonbKnQqOcw7dG2IK5uvQQn3b/WPHqD5mBvP4=
|
||||
k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
|
||||
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a h1:2jUDc9gJja832Ftp+QbDV0tVhQHMISFn01els+2ZAcw=
|
||||
|
@ -444,3 +573,4 @@ sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkW
|
|||
sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=
|
||||
|
|
15
vendor/cloud.google.com/go/AUTHORS
generated
vendored
15
vendor/cloud.google.com/go/AUTHORS
generated
vendored
|
@ -1,15 +0,0 @@
|
|||
# This is the official list of cloud authors for copyright purposes.
|
||||
# This file is distinct from the CONTRIBUTORS files.
|
||||
# See the latter for an explanation.
|
||||
|
||||
# Names should be added to this file as:
|
||||
# Name or Organization <email address>
|
||||
# The email address is not required for organizations.
|
||||
|
||||
Filippo Valsorda <hi@filippo.io>
|
||||
Google Inc.
|
||||
Ingo Oeser <nightlyone@googlemail.com>
|
||||
Palm Stone Games, Inc.
|
||||
Paweł Knap <pawelknap88@gmail.com>
|
||||
Péter Szilágyi <peterke@gmail.com>
|
||||
Tyler Treat <ttreat31@gmail.com>
|
40
vendor/cloud.google.com/go/CONTRIBUTORS
generated
vendored
40
vendor/cloud.google.com/go/CONTRIBUTORS
generated
vendored
|
@ -1,40 +0,0 @@
|
|||
# People who have agreed to one of the CLAs and can contribute patches.
|
||||
# The AUTHORS file lists the copyright holders; this file
|
||||
# lists people. For example, Google employees are listed here
|
||||
# but not in AUTHORS, because Google holds the copyright.
|
||||
#
|
||||
# https://developers.google.com/open-source/cla/individual
|
||||
# https://developers.google.com/open-source/cla/corporate
|
||||
#
|
||||
# Names should be added to this file as:
|
||||
# Name <email address>
|
||||
|
||||
# Keep the list alphabetically sorted.
|
||||
|
||||
Alexis Hunt <lexer@google.com>
|
||||
Andreas Litt <andreas.litt@gmail.com>
|
||||
Andrew Gerrand <adg@golang.org>
|
||||
Brad Fitzpatrick <bradfitz@golang.org>
|
||||
Burcu Dogan <jbd@google.com>
|
||||
Dave Day <djd@golang.org>
|
||||
David Sansome <me@davidsansome.com>
|
||||
David Symonds <dsymonds@golang.org>
|
||||
Filippo Valsorda <hi@filippo.io>
|
||||
Glenn Lewis <gmlewis@google.com>
|
||||
Ingo Oeser <nightlyone@googlemail.com>
|
||||
James Hall <james.hall@shopify.com>
|
||||
Johan Euphrosine <proppy@google.com>
|
||||
Jonathan Amsterdam <jba@google.com>
|
||||
Kunpei Sakai <namusyaka@gmail.com>
|
||||
Luna Duclos <luna.duclos@palmstonegames.com>
|
||||
Magnus Hiie <magnus.hiie@gmail.com>
|
||||
Mario Castro <mariocaster@gmail.com>
|
||||
Michael McGreevy <mcgreevy@golang.org>
|
||||
Omar Jarjur <ojarjur@google.com>
|
||||
Paweł Knap <pawelknap88@gmail.com>
|
||||
Péter Szilágyi <peterke@gmail.com>
|
||||
Sarah Adams <shadams@google.com>
|
||||
Thanatat Tamtan <acoshift@gmail.com>
|
||||
Toby Burress <kurin@google.com>
|
||||
Tuo Shan <shantuo@google.com>
|
||||
Tyler Treat <ttreat31@gmail.com>
|
24
vendor/cloud.google.com/go/compute/metadata/metadata.go
generated
vendored
24
vendor/cloud.google.com/go/compute/metadata/metadata.go
generated
vendored
|
@ -137,7 +137,7 @@ func testOnGCE() bool {
|
|||
resc := make(chan bool, 2)
|
||||
|
||||
// Try two strategies in parallel.
|
||||
// See https://github.com/GoogleCloudPlatform/google-cloud-go/issues/194
|
||||
// See https://github.com/googleapis/google-cloud-go/issues/194
|
||||
go func() {
|
||||
req, _ := http.NewRequest("GET", "http://"+metadataIP, nil)
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
|
@ -300,8 +300,8 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
|
|||
// being stable anyway.
|
||||
host = metadataIP
|
||||
}
|
||||
url := "http://" + host + "/computeMetadata/v1/" + suffix
|
||||
req, _ := http.NewRequest("GET", url, nil)
|
||||
u := "http://" + host + "/computeMetadata/v1/" + suffix
|
||||
req, _ := http.NewRequest("GET", u, nil)
|
||||
req.Header.Set("Metadata-Flavor", "Google")
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
res, err := c.hc.Do(req)
|
||||
|
@ -312,13 +312,13 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
|
|||
if res.StatusCode == http.StatusNotFound {
|
||||
return "", "", NotDefinedError(suffix)
|
||||
}
|
||||
if res.StatusCode != 200 {
|
||||
return "", "", fmt.Errorf("status code %d trying to fetch %s", res.StatusCode, url)
|
||||
}
|
||||
all, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
if res.StatusCode != 200 {
|
||||
return "", "", &Error{Code: res.StatusCode, Message: string(all)}
|
||||
}
|
||||
return string(all), res.Header.Get("Etag"), nil
|
||||
}
|
||||
|
||||
|
@ -499,3 +499,15 @@ func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) erro
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Error contains an error response from the server.
|
||||
type Error struct {
|
||||
// Code is the HTTP response status code.
|
||||
Code int
|
||||
// Message is the server response message.
|
||||
Message string
|
||||
}
|
||||
|
||||
func (e *Error) Error() string {
|
||||
return fmt.Sprintf("compute: Received %d `%s`", e.Code, e.Message)
|
||||
}
|
||||
|
|
10
vendor/github.com/go-openapi/jsonpointer/.travis.yml
generated
vendored
10
vendor/github.com/go-openapi/jsonpointer/.travis.yml
generated
vendored
|
@ -1,15 +1,15 @@
|
|||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- '1.9'
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- go get -u github.com/stretchr/testify/assert
|
||||
- go get -u github.com/go-openapi/swag
|
||||
language: go
|
||||
notifications:
|
||||
slack:
|
||||
secure: a5VgoiwB1G/AZqzmephPZIhEB9avMlsWSlVnM1dSAtYAwdrQHGTQxAmpOxYIoSPDhWNN5bfZmjd29++UlTwLcHSR+e0kJhH6IfDlsHj/HplNCJ9tyI0zYc7XchtdKgeMxMzBKCzgwFXGSbQGydXTliDNBo0HOzmY3cou/daMFTP60K+offcjS+3LRAYb1EroSRXZqrk1nuF/xDL3792DZUdPMiFR/L/Df6y74D6/QP4sTkTDFQitz4Wy/7jbsfj8dG6qK2zivgV6/l+w4OVjFkxVpPXogDWY10vVXNVynqxfJ7to2d1I9lNCHE2ilBCkWMIPdyJF7hjF8pKW+82yP4EzRh0vu8Xn0HT5MZpQxdRY/YMxNrWaG7SxsoEaO4q5uhgdzAqLYY3TRa7MjIK+7Ur+aqOeTXn6OKwVi0CjvZ6mIU3WUKSwiwkFZMbjRAkSb5CYwMEfGFO/z964xz83qGt6WAtBXNotqCQpTIiKtDHQeLOMfksHImCg6JLhQcWBVxamVgu0G3Pdh8Y6DyPnxraXY95+QDavbjqv7TeYT9T/FNnrkXaTTK0s4iWE5H4ACU0Qvz0wUYgfQrZv0/Hp7V17+rabUwnzYySHCy9SWX/7OV9Cfh31iMp9ZIffr76xmmThtOEqs8TrTtU6BWI3rWwvA9cXQipZTVtL0oswrGw=
|
||||
script:
|
||||
- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
|
8
vendor/github.com/go-openapi/jsonpointer/go.mod
generated
vendored
8
vendor/github.com/go-openapi/jsonpointer/go.mod
generated
vendored
|
@ -1,6 +1,10 @@
|
|||
module github.com/go-openapi/jsonpointer
|
||||
|
||||
require (
|
||||
github.com/go-openapi/swag v0.19.2
|
||||
github.com/stretchr/testify v1.3.0
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-openapi/swag v0.17.0
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
gopkg.in/yaml.v2 v2.2.1 // indirect
|
||||
)
|
||||
|
|
25
vendor/github.com/go-openapi/jsonpointer/go.sum
generated
vendored
25
vendor/github.com/go-openapi/jsonpointer/go.sum
generated
vendored
|
@ -1,22 +1,11 @@
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/go-openapi/swag v0.17.0 h1:7wu+dZ5k83kvUWeAb+WUkFiUhDzwGqzTR/NhWzeo1JU=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
|
11
vendor/github.com/go-openapi/jsonreference/.travis.yml
generated
vendored
11
vendor/github.com/go-openapi/jsonreference/.travis.yml
generated
vendored
|
@ -1,15 +1,16 @@
|
|||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- '1.9'
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- go get -u github.com/stretchr/testify/assert
|
||||
- go get -u github.com/PuerkitoBio/purell
|
||||
- go get -u github.com/go-openapi/jsonpointer
|
||||
language: go
|
||||
notifications:
|
||||
slack:
|
||||
secure: OpQG/36F7DSF00HLm9WZMhyqFCYYyYTsVDObW226cWiR8PWYiNfLZiSEvIzT1Gx4dDjhigKTIqcLhG34CkL5iNXDjm9Yyo2RYhQPlK8NErNqUEXuBqn4RqYHW48VGhEhOyDd4Ei0E2FN5ZbgpvHgtpkdZ6XDi64r3Ac89isP9aPHXQTuv2Jog6b4/OKKiUTftLcTIst0p4Cp3gqOJWf1wnoj+IadWiECNVQT6zb47IYjtyw6+uV8iUjTzdKcRB6Zc6b4Dq7JAg1Zd7Jfxkql3hlKp4PNlRf9Cy7y5iA3G7MLyg3FcPX5z2kmcyPt2jOTRMBWUJ5zIQpOxizAcN8WsT3WWBL5KbuYK6k0PzujrIDLqdxGpNmjkkMfDBT9cKmZpm2FdW+oZgPFJP+oKmAo4u4KJz/vjiPTXgQlN5bmrLuRMCp+AwC5wkIohTqWZVPE2TK6ZSnMYcg/W39s+RP/9mJoyryAvPSpBOLTI+biCgaUCTOAZxNTWpMFc3tPYntc41WWkdKcooZ9JA5DwfcaVFyTGQ3YXz+HvX6G1z/gW0Q/A4dBi9mj2iE1xm7tRTT+4VQ2AXFvSEI1HJpfPgYnwAtwOD1v3Qm2EUHk9sCdtEDR4wVGEPIVn44GnwFMnGKx9JWppMPYwFu3SVDdHt+E+LOlhZUply11Aa+IVrT2KUQ=
|
||||
script:
|
||||
- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
|
15
vendor/github.com/go-openapi/jsonreference/go.mod
generated
vendored
15
vendor/github.com/go-openapi/jsonreference/go.mod
generated
vendored
|
@ -1,10 +1,15 @@
|
|||
module github.com/go-openapi/jsonreference
|
||||
|
||||
require (
|
||||
github.com/PuerkitoBio/purell v1.1.1
|
||||
github.com/PuerkitoBio/purell v1.1.0
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.2
|
||||
github.com/stretchr/testify v1.3.0
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 // indirect
|
||||
golang.org/x/text v0.3.2 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.17.0
|
||||
github.com/go-openapi/swag v0.17.0 // indirect
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect
|
||||
golang.org/x/text v0.3.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.1 // indirect
|
||||
)
|
||||
|
|
42
vendor/github.com/go-openapi/jsonreference/go.sum
generated
vendored
42
vendor/github.com/go-openapi/jsonreference/go.sum
generated
vendored
|
@ -1,36 +1,20 @@
|
|||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4=
|
||||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0=
|
||||
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||
github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/go-openapi/jsonpointer v0.17.0 h1:Bpl2DtZ6k7wKqfFs7e+4P08+M9I3FQgn09a1UsRUQbk=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
|
||||
github.com/go-openapi/swag v0.17.0 h1:7wu+dZ5k83kvUWeAb+WUkFiUhDzwGqzTR/NhWzeo1JU=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
|
6
vendor/github.com/go-openapi/spec/.golangci.yml
generated
vendored
6
vendor/github.com/go-openapi/spec/.golangci.yml
generated
vendored
|
@ -4,11 +4,11 @@ linters-settings:
|
|||
golint:
|
||||
min-confidence: 0
|
||||
gocyclo:
|
||||
min-complexity: 45
|
||||
min-complexity: 25
|
||||
maligned:
|
||||
suggest-new: true
|
||||
dupl:
|
||||
threshold: 200
|
||||
threshold: 100
|
||||
goconst:
|
||||
min-len: 2
|
||||
min-occurrences: 2
|
||||
|
@ -19,5 +19,3 @@ linters:
|
|||
- maligned
|
||||
- unparam
|
||||
- lll
|
||||
- gochecknoinits
|
||||
- gochecknoglobals
|
||||
|
|
13
vendor/github.com/go-openapi/spec/.travis.yml
generated
vendored
13
vendor/github.com/go-openapi/spec/.travis.yml
generated
vendored
|
@ -1,15 +1,18 @@
|
|||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- '1.9'
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- go get -u github.com/stretchr/testify
|
||||
- go get -u github.com/go-openapi/swag
|
||||
- go get -u gopkg.in/yaml.v2
|
||||
- go get -u github.com/go-openapi/jsonpointer
|
||||
- go get -u github.com/go-openapi/jsonreference
|
||||
language: go
|
||||
notifications:
|
||||
slack:
|
||||
secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E=
|
||||
script:
|
||||
- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
|
95
vendor/github.com/go-openapi/spec/bindata.go
generated
vendored
95
vendor/github.com/go-openapi/spec/bindata.go
generated
vendored
|
@ -1,14 +1,14 @@
|
|||
// Code generated by go-bindata. DO NOT EDIT.
|
||||
// Code generated by go-bindata.
|
||||
// sources:
|
||||
// schemas/jsonschema-draft-04.json (4.357kB)
|
||||
// schemas/v2/schema.json (40.249kB)
|
||||
// schemas/jsonschema-draft-04.json
|
||||
// schemas/v2/schema.json
|
||||
// DO NOT EDIT!
|
||||
|
||||
package spec
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
@ -39,9 +39,8 @@ func bindataRead(data []byte, name string) ([]byte, error) {
|
|||
}
|
||||
|
||||
type asset struct {
|
||||
bytes []byte
|
||||
info os.FileInfo
|
||||
digest [sha256.Size]byte
|
||||
bytes []byte
|
||||
info os.FileInfo
|
||||
}
|
||||
|
||||
type bindataFileInfo struct {
|
||||
|
@ -85,8 +84,8 @@ func jsonschemaDraft04JSON() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(436), modTime: time.Unix(1540282154, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe1, 0x48, 0x9d, 0xb, 0x47, 0x55, 0xf0, 0x27, 0x93, 0x30, 0x25, 0x91, 0xd3, 0xfc, 0xb8, 0xf0, 0x7b, 0x68, 0x93, 0xa8, 0x2a, 0x94, 0xf2, 0x48, 0x95, 0xf8, 0xe4, 0xed, 0xf1, 0x1b, 0x82, 0xe2}}
|
||||
info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(420), modTime: time.Unix(1523760398, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
|
@ -105,8 +104,8 @@ func v2SchemaJSON() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "v2/schema.json", size: 40249, mode: os.FileMode(436), modTime: time.Unix(1540282154, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcb, 0x25, 0x27, 0xe8, 0x46, 0xae, 0x22, 0xc4, 0xf4, 0x8b, 0x1, 0x32, 0x4d, 0x1f, 0xf8, 0xdf, 0x75, 0x15, 0xc8, 0x2d, 0xc7, 0xed, 0xe, 0x7e, 0x0, 0x75, 0xc0, 0xf9, 0xd2, 0x1f, 0x75, 0x57}}
|
||||
info := bindataFileInfo{name: "v2/schema.json", size: 40249, mode: os.FileMode(420), modTime: time.Unix(1523760397, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
|
@ -114,8 +113,8 @@ func v2SchemaJSON() (*asset, error) {
|
|||
// It returns an error if the asset could not be found or
|
||||
// could not be loaded.
|
||||
func Asset(name string) ([]byte, error) {
|
||||
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[canonicalName]; ok {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[cannonicalName]; ok {
|
||||
a, err := f()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
|
||||
|
@ -125,12 +124,6 @@ func Asset(name string) ([]byte, error) {
|
|||
return nil, fmt.Errorf("Asset %s not found", name)
|
||||
}
|
||||
|
||||
// AssetString returns the asset contents as a string (instead of a []byte).
|
||||
func AssetString(name string) (string, error) {
|
||||
data, err := Asset(name)
|
||||
return string(data), err
|
||||
}
|
||||
|
||||
// MustAsset is like Asset but panics when Asset would return an error.
|
||||
// It simplifies safe initialization of global variables.
|
||||
func MustAsset(name string) []byte {
|
||||
|
@ -142,18 +135,12 @@ func MustAsset(name string) []byte {
|
|||
return a
|
||||
}
|
||||
|
||||
// MustAssetString is like AssetString but panics when Asset would return an
|
||||
// error. It simplifies safe initialization of global variables.
|
||||
func MustAssetString(name string) string {
|
||||
return string(MustAsset(name))
|
||||
}
|
||||
|
||||
// AssetInfo loads and returns the asset info for the given name.
|
||||
// It returns an error if the asset could not be found or
|
||||
// could not be loaded.
|
||||
func AssetInfo(name string) (os.FileInfo, error) {
|
||||
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[canonicalName]; ok {
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[cannonicalName]; ok {
|
||||
a, err := f()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
|
||||
|
@ -163,33 +150,6 @@ func AssetInfo(name string) (os.FileInfo, error) {
|
|||
return nil, fmt.Errorf("AssetInfo %s not found", name)
|
||||
}
|
||||
|
||||
// AssetDigest returns the digest of the file with the given name. It returns an
|
||||
// error if the asset could not be found or the digest could not be loaded.
|
||||
func AssetDigest(name string) ([sha256.Size]byte, error) {
|
||||
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
if f, ok := _bindata[canonicalName]; ok {
|
||||
a, err := f()
|
||||
if err != nil {
|
||||
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err)
|
||||
}
|
||||
return a.digest, nil
|
||||
}
|
||||
return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name)
|
||||
}
|
||||
|
||||
// Digests returns a map of all known files and their checksums.
|
||||
func Digests() (map[string][sha256.Size]byte, error) {
|
||||
mp := make(map[string][sha256.Size]byte, len(_bindata))
|
||||
for name := range _bindata {
|
||||
a, err := _bindata[name]()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mp[name] = a.digest
|
||||
}
|
||||
return mp, nil
|
||||
}
|
||||
|
||||
// AssetNames returns the names of the assets.
|
||||
func AssetNames() []string {
|
||||
names := make([]string, 0, len(_bindata))
|
||||
|
@ -202,8 +162,7 @@ func AssetNames() []string {
|
|||
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||
var _bindata = map[string]func() (*asset, error){
|
||||
"jsonschema-draft-04.json": jsonschemaDraft04JSON,
|
||||
|
||||
"v2/schema.json": v2SchemaJSON,
|
||||
"v2/schema.json": v2SchemaJSON,
|
||||
}
|
||||
|
||||
// AssetDir returns the file names below a certain
|
||||
|
@ -215,15 +174,15 @@ var _bindata = map[string]func() (*asset, error){
|
|||
// img/
|
||||
// a.png
|
||||
// b.png
|
||||
// then AssetDir("data") would return []string{"foo.txt", "img"},
|
||||
// AssetDir("data/img") would return []string{"a.png", "b.png"},
|
||||
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
|
||||
// then AssetDir("data") would return []string{"foo.txt", "img"}
|
||||
// AssetDir("data/img") would return []string{"a.png", "b.png"}
|
||||
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
|
||||
// AssetDir("") will return []string{"data"}.
|
||||
func AssetDir(name string) ([]string, error) {
|
||||
node := _bintree
|
||||
if len(name) != 0 {
|
||||
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
pathList := strings.Split(canonicalName, "/")
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
pathList := strings.Split(cannonicalName, "/")
|
||||
for _, p := range pathList {
|
||||
node = node.Children[p]
|
||||
if node == nil {
|
||||
|
@ -253,7 +212,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
|
|||
}},
|
||||
}}
|
||||
|
||||
// RestoreAsset restores an asset under the given directory.
|
||||
// RestoreAsset restores an asset under the given directory
|
||||
func RestoreAsset(dir, name string) error {
|
||||
data, err := Asset(name)
|
||||
if err != nil {
|
||||
|
@ -271,10 +230,14 @@ func RestoreAsset(dir, name string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
||||
err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// RestoreAssets restores an asset under the given directory recursively.
|
||||
// RestoreAssets restores an asset under the given directory recursively
|
||||
func RestoreAssets(dir, name string) error {
|
||||
children, err := AssetDir(name)
|
||||
// File
|
||||
|
@ -292,6 +255,6 @@ func RestoreAssets(dir, name string) error {
|
|||
}
|
||||
|
||||
func _filePath(dir, name string) string {
|
||||
canonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...)
|
||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
|
60
vendor/github.com/go-openapi/spec/cache.go
generated
vendored
60
vendor/github.com/go-openapi/spec/cache.go
generated
vendored
|
@ -1,60 +0,0 @@
|
|||
// Copyright 2015 go-swagger maintainers
|
||||
//
|
||||
// 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 spec
|
||||
|
||||
import "sync"
|
||||
|
||||
// ResolutionCache a cache for resolving urls
|
||||
type ResolutionCache interface {
|
||||
Get(string) (interface{}, bool)
|
||||
Set(string, interface{})
|
||||
}
|
||||
|
||||
type simpleCache struct {
|
||||
lock sync.RWMutex
|
||||
store map[string]interface{}
|
||||
}
|
||||
|
||||
// Get retrieves a cached URI
|
||||
func (s *simpleCache) Get(uri string) (interface{}, bool) {
|
||||
debugLog("getting %q from resolution cache", uri)
|
||||
s.lock.RLock()
|
||||
v, ok := s.store[uri]
|
||||
debugLog("got %q from resolution cache: %t", uri, ok)
|
||||
|
||||
s.lock.RUnlock()
|
||||
return v, ok
|
||||
}
|
||||
|
||||
// Set caches a URI
|
||||
func (s *simpleCache) Set(uri string, data interface{}) {
|
||||
s.lock.Lock()
|
||||
s.store[uri] = data
|
||||
s.lock.Unlock()
|
||||
}
|
||||
|
||||
var resCache ResolutionCache
|
||||
|
||||
func init() {
|
||||
resCache = initResolutionCache()
|
||||
}
|
||||
|
||||
// initResolutionCache initializes the URI resolution cache
|
||||
func initResolutionCache() ResolutionCache {
|
||||
return &simpleCache{store: map[string]interface{}{
|
||||
"http://swagger.io/v2/schema.json": MustLoadSwagger20Schema(),
|
||||
"http://json-schema.org/draft-04/schema": MustLoadJSONSchemaDraft04(),
|
||||
}}
|
||||
}
|
4
vendor/github.com/go-openapi/spec/debug.go
generated
vendored
4
vendor/github.com/go-openapi/spec/debug.go
generated
vendored
|
@ -24,9 +24,9 @@ import (
|
|||
|
||||
var (
|
||||
// Debug is true when the SWAGGER_DEBUG env var is not empty.
|
||||
// It enables a more verbose logging of this package.
|
||||
// It enables a more verbose logging of validators.
|
||||
Debug = os.Getenv("SWAGGER_DEBUG") != ""
|
||||
// specLogger is a debug logger for this package
|
||||
// validateLogger is a debug logger for this package
|
||||
specLogger *log.Logger
|
||||
)
|
||||
|
||||
|
|
801
vendor/github.com/go-openapi/spec/expander.go
generated
vendored
801
vendor/github.com/go-openapi/spec/expander.go
generated
vendored
File diff suppressed because it is too large
Load diff
22
vendor/github.com/go-openapi/spec/go.mod
generated
vendored
22
vendor/github.com/go-openapi/spec/go.mod
generated
vendored
|
@ -1,14 +1,16 @@
|
|||
module github.com/go-openapi/spec
|
||||
|
||||
require (
|
||||
github.com/go-openapi/jsonpointer v0.19.2
|
||||
github.com/go-openapi/jsonreference v0.19.2
|
||||
github.com/go-openapi/swag v0.19.2
|
||||
github.com/kr/pty v1.1.5 // indirect
|
||||
github.com/stretchr/objx v0.2.0 // indirect
|
||||
github.com/stretchr/testify v1.3.0
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect
|
||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.2
|
||||
github.com/PuerkitoBio/purell v1.1.0 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.17.0
|
||||
github.com/go-openapi/jsonreference v0.17.0
|
||||
github.com/go-openapi/swag v0.17.0
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 // indirect
|
||||
golang.org/x/text v0.3.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.1
|
||||
)
|
||||
|
|
56
vendor/github.com/go-openapi/spec/go.sum
generated
vendored
56
vendor/github.com/go-openapi/spec/go.sum
generated
vendored
|
@ -1,66 +1,22 @@
|
|||
github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4=
|
||||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8=
|
||||
github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0=
|
||||
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||
github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk=
|
||||
github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w=
|
||||
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
||||
github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/go-openapi/jsonpointer v0.17.0 h1:Bpl2DtZ6k7wKqfFs7e+4P08+M9I3FQgn09a1UsRUQbk=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
|
||||
github.com/go-openapi/jsonreference v0.17.0 h1:d/o7/fsLWWQZACbihvZxcyLQ59jfUVs7WOJv/ak7T7A=
|
||||
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
|
||||
github.com/go-openapi/swag v0.17.0 h1:7wu+dZ5k83kvUWeAb+WUkFiUhDzwGqzTR/NhWzeo1JU=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
|
6
vendor/github.com/go-openapi/spec/header.go
generated
vendored
6
vendor/github.com/go-openapi/spec/header.go
generated
vendored
|
@ -22,10 +22,6 @@ import (
|
|||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
const (
|
||||
jsonArray = "array"
|
||||
)
|
||||
|
||||
// HeaderProps describes a response header
|
||||
type HeaderProps struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
|
@ -61,7 +57,7 @@ func (h *Header) Typed(tpe, format string) *Header {
|
|||
|
||||
// CollectionOf a fluent builder method for an array item
|
||||
func (h *Header) CollectionOf(items *Items, format string) *Header {
|
||||
h.Type = jsonArray
|
||||
h.Type = "array"
|
||||
h.Items = items
|
||||
h.CollectionFormat = format
|
||||
return h
|
||||
|
|
5
vendor/github.com/go-openapi/spec/info.go
generated
vendored
5
vendor/github.com/go-openapi/spec/info.go
generated
vendored
|
@ -161,5 +161,8 @@ func (i *Info) UnmarshalJSON(data []byte) error {
|
|||
if err := json.Unmarshal(data, &i.InfoProps); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, &i.VendorExtensible)
|
||||
if err := json.Unmarshal(data, &i.VendorExtensible); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
15
vendor/github.com/go-openapi/spec/items.go
generated
vendored
15
vendor/github.com/go-openapi/spec/items.go
generated
vendored
|
@ -22,14 +22,9 @@ import (
|
|||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
const (
|
||||
jsonRef = "$ref"
|
||||
)
|
||||
|
||||
// SimpleSchema describe swagger simple schemas for parameters and headers
|
||||
type SimpleSchema struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
Nullable bool `json:"nullable,omitempty"`
|
||||
Format string `json:"format,omitempty"`
|
||||
Items *Items `json:"items,omitempty"`
|
||||
CollectionFormat string `json:"collectionFormat,omitempty"`
|
||||
|
@ -92,15 +87,9 @@ func (i *Items) Typed(tpe, format string) *Items {
|
|||
return i
|
||||
}
|
||||
|
||||
// AsNullable flags this schema as nullable.
|
||||
func (i *Items) AsNullable() *Items {
|
||||
i.Nullable = true
|
||||
return i
|
||||
}
|
||||
|
||||
// CollectionOf a fluent builder method for an array item
|
||||
func (i *Items) CollectionOf(items *Items, format string) *Items {
|
||||
i.Type = jsonArray
|
||||
i.Type = "array"
|
||||
i.Items = items
|
||||
i.CollectionFormat = format
|
||||
return i
|
||||
|
@ -228,7 +217,7 @@ func (i Items) MarshalJSON() ([]byte, error) {
|
|||
|
||||
// JSONLookup look up a value by the json property name
|
||||
func (i Items) JSONLookup(token string) (interface{}, error) {
|
||||
if token == jsonRef {
|
||||
if token == "$ref" {
|
||||
return &i.Ref, nil
|
||||
}
|
||||
|
||||
|
|
152
vendor/github.com/go-openapi/spec/normalizer.go
generated
vendored
152
vendor/github.com/go-openapi/spec/normalizer.go
generated
vendored
|
@ -1,152 +0,0 @@
|
|||
// Copyright 2015 go-swagger maintainers
|
||||
//
|
||||
// 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 spec
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// normalize absolute path for cache.
|
||||
// on Windows, drive letters should be converted to lower as scheme in net/url.URL
|
||||
func normalizeAbsPath(path string) string {
|
||||
u, err := url.Parse(path)
|
||||
if err != nil {
|
||||
debugLog("normalize absolute path failed: %s", err)
|
||||
return path
|
||||
}
|
||||
return u.String()
|
||||
}
|
||||
|
||||
// base or refPath could be a file path or a URL
|
||||
// given a base absolute path and a ref path, return the absolute path of refPath
|
||||
// 1) if refPath is absolute, return it
|
||||
// 2) if refPath is relative, join it with basePath keeping the scheme, hosts, and ports if exists
|
||||
// base could be a directory or a full file path
|
||||
func normalizePaths(refPath, base string) string {
|
||||
refURL, _ := url.Parse(refPath)
|
||||
if path.IsAbs(refURL.Path) || filepath.IsAbs(refPath) {
|
||||
// refPath is actually absolute
|
||||
if refURL.Host != "" {
|
||||
return refPath
|
||||
}
|
||||
parts := strings.Split(refPath, "#")
|
||||
result := filepath.FromSlash(parts[0])
|
||||
if len(parts) == 2 {
|
||||
result += "#" + parts[1]
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// relative refPath
|
||||
baseURL, _ := url.Parse(base)
|
||||
if !strings.HasPrefix(refPath, "#") {
|
||||
// combining paths
|
||||
if baseURL.Host != "" {
|
||||
baseURL.Path = path.Join(path.Dir(baseURL.Path), refURL.Path)
|
||||
} else { // base is a file
|
||||
newBase := fmt.Sprintf("%s#%s", filepath.Join(filepath.Dir(base), filepath.FromSlash(refURL.Path)), refURL.Fragment)
|
||||
return newBase
|
||||
}
|
||||
|
||||
}
|
||||
// copying fragment from ref to base
|
||||
baseURL.Fragment = refURL.Fragment
|
||||
return baseURL.String()
|
||||
}
|
||||
|
||||
// denormalizePaths returns to simplest notation on file $ref,
|
||||
// i.e. strips the absolute path and sets a path relative to the base path.
|
||||
//
|
||||
// This is currently used when we rewrite ref after a circular ref has been detected
|
||||
func denormalizeFileRef(ref *Ref, relativeBase, originalRelativeBase string) *Ref {
|
||||
debugLog("denormalizeFileRef for: %s", ref.String())
|
||||
|
||||
if ref.String() == "" || ref.IsRoot() || ref.HasFragmentOnly {
|
||||
return ref
|
||||
}
|
||||
// strip relativeBase from URI
|
||||
relativeBaseURL, _ := url.Parse(relativeBase)
|
||||
relativeBaseURL.Fragment = ""
|
||||
|
||||
if relativeBaseURL.IsAbs() && strings.HasPrefix(ref.String(), relativeBase) {
|
||||
// this should work for absolute URI (e.g. http://...): we have an exact match, just trim prefix
|
||||
r, _ := NewRef(strings.TrimPrefix(ref.String(), relativeBase))
|
||||
return &r
|
||||
}
|
||||
|
||||
if relativeBaseURL.IsAbs() {
|
||||
// other absolute URL get unchanged (i.e. with a non-empty scheme)
|
||||
return ref
|
||||
}
|
||||
|
||||
// for relative file URIs:
|
||||
originalRelativeBaseURL, _ := url.Parse(originalRelativeBase)
|
||||
originalRelativeBaseURL.Fragment = ""
|
||||
if strings.HasPrefix(ref.String(), originalRelativeBaseURL.String()) {
|
||||
// the resulting ref is in the expanded spec: return a local ref
|
||||
r, _ := NewRef(strings.TrimPrefix(ref.String(), originalRelativeBaseURL.String()))
|
||||
return &r
|
||||
}
|
||||
|
||||
// check if we may set a relative path, considering the original base path for this spec.
|
||||
// Example:
|
||||
// spec is located at /mypath/spec.json
|
||||
// my normalized ref points to: /mypath/item.json#/target
|
||||
// expected result: item.json#/target
|
||||
parts := strings.Split(ref.String(), "#")
|
||||
relativePath, err := filepath.Rel(path.Dir(originalRelativeBaseURL.String()), parts[0])
|
||||
if err != nil {
|
||||
// there is no common ancestor (e.g. different drives on windows)
|
||||
// leaves the ref unchanged
|
||||
return ref
|
||||
}
|
||||
if len(parts) == 2 {
|
||||
relativePath += "#" + parts[1]
|
||||
}
|
||||
r, _ := NewRef(relativePath)
|
||||
return &r
|
||||
}
|
||||
|
||||
// relativeBase could be an ABSOLUTE file path or an ABSOLUTE URL
|
||||
func normalizeFileRef(ref *Ref, relativeBase string) *Ref {
|
||||
// This is important for when the reference is pointing to the root schema
|
||||
if ref.String() == "" {
|
||||
r, _ := NewRef(relativeBase)
|
||||
return &r
|
||||
}
|
||||
|
||||
debugLog("normalizing %s against %s", ref.String(), relativeBase)
|
||||
|
||||
s := normalizePaths(ref.String(), relativeBase)
|
||||
r, _ := NewRef(s)
|
||||
return &r
|
||||
}
|
||||
|
||||
// absPath returns the absolute path of a file
|
||||
func absPath(fname string) (string, error) {
|
||||
if strings.HasPrefix(fname, "http") {
|
||||
return fname, nil
|
||||
}
|
||||
if filepath.IsAbs(fname) {
|
||||
return fname, nil
|
||||
}
|
||||
wd, err := os.Getwd()
|
||||
return filepath.Join(wd, fname), err
|
||||
}
|
159
vendor/github.com/go-openapi/spec/operation.go
generated
vendored
159
vendor/github.com/go-openapi/spec/operation.go
generated
vendored
|
@ -15,37 +15,24 @@
|
|||
package spec
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
"encoding/json"
|
||||
"sort"
|
||||
|
||||
"github.com/go-openapi/jsonpointer"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
func init() {
|
||||
//gob.Register(map[string][]interface{}{})
|
||||
gob.Register(map[string]interface{}{})
|
||||
gob.Register([]interface{}{})
|
||||
}
|
||||
|
||||
// OperationProps describes an operation
|
||||
//
|
||||
// NOTES:
|
||||
// - schemes, when present must be from [http, https, ws, wss]: see validate
|
||||
// - Security is handled as a special case: see MarshalJSON function
|
||||
type OperationProps struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Consumes []string `json:"consumes,omitempty"`
|
||||
Produces []string `json:"produces,omitempty"`
|
||||
Schemes []string `json:"schemes,omitempty"`
|
||||
Schemes []string `json:"schemes,omitempty"` // the scheme, when present must be from [http, https, ws, wss]
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Summary string `json:"summary,omitempty"`
|
||||
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
|
||||
ID string `json:"operationId,omitempty"`
|
||||
Deprecated bool `json:"deprecated,omitempty"`
|
||||
Security []map[string][]string `json:"security,omitempty"`
|
||||
Security []map[string][]string `json:"security,omitempty"` //Special case, see MarshalJSON function
|
||||
Parameters []Parameter `json:"parameters,omitempty"`
|
||||
Responses *Responses `json:"responses,omitempty"`
|
||||
}
|
||||
|
@ -89,17 +76,11 @@ func (o *Operation) SuccessResponse() (*Response, int, bool) {
|
|||
return nil, 0, false
|
||||
}
|
||||
|
||||
responseCodes := make([]int, 0, len(o.Responses.StatusCodeResponses))
|
||||
for k := range o.Responses.StatusCodeResponses {
|
||||
if k >= 200 && k < 300 {
|
||||
responseCodes = append(responseCodes, k)
|
||||
for k, v := range o.Responses.StatusCodeResponses {
|
||||
if k/100 == 2 {
|
||||
return &v, k, true
|
||||
}
|
||||
}
|
||||
if len(responseCodes) > 0 {
|
||||
sort.Ints(responseCodes)
|
||||
v := o.Responses.StatusCodeResponses[responseCodes[0]]
|
||||
return &v, responseCodes[0], true
|
||||
}
|
||||
|
||||
return o.Responses.Default, 0, false
|
||||
}
|
||||
|
@ -118,7 +99,10 @@ func (o *Operation) UnmarshalJSON(data []byte) error {
|
|||
if err := json.Unmarshal(data, &o.OperationProps); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, &o.VendorExtensible)
|
||||
if err := json.Unmarshal(data, &o.VendorExtensible); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON converts this items object to JSON
|
||||
|
@ -232,7 +216,7 @@ func (o *Operation) AddParam(param *Parameter) *Operation {
|
|||
// RemoveParam removes a parameter from the operation
|
||||
func (o *Operation) RemoveParam(name, in string) *Operation {
|
||||
for i, p := range o.Parameters {
|
||||
if p.Name == name && p.In == in {
|
||||
if p.Name == name && p.In == name {
|
||||
o.Parameters = append(o.Parameters[:i], o.Parameters[i+1:]...)
|
||||
return o
|
||||
}
|
||||
|
@ -273,126 +257,3 @@ func (o *Operation) RespondsWith(code int, response *Response) *Operation {
|
|||
o.Responses.StatusCodeResponses[code] = *response
|
||||
return o
|
||||
}
|
||||
|
||||
type opsAlias OperationProps
|
||||
|
||||
type gobAlias struct {
|
||||
Security []map[string]struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}
|
||||
Alias *opsAlias
|
||||
SecurityIsEmpty bool
|
||||
}
|
||||
|
||||
// GobEncode provides a safe gob encoder for Operation, including empty security requirements
|
||||
func (o Operation) GobEncode() ([]byte, error) {
|
||||
raw := struct {
|
||||
Ext VendorExtensible
|
||||
Props OperationProps
|
||||
}{
|
||||
Ext: o.VendorExtensible,
|
||||
Props: o.OperationProps,
|
||||
}
|
||||
var b bytes.Buffer
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
// GobDecode provides a safe gob decoder for Operation, including empty security requirements
|
||||
func (o *Operation) GobDecode(b []byte) error {
|
||||
var raw struct {
|
||||
Ext VendorExtensible
|
||||
Props OperationProps
|
||||
}
|
||||
|
||||
buf := bytes.NewBuffer(b)
|
||||
err := gob.NewDecoder(buf).Decode(&raw)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
o.VendorExtensible = raw.Ext
|
||||
o.OperationProps = raw.Props
|
||||
return nil
|
||||
}
|
||||
|
||||
// GobEncode provides a safe gob encoder for Operation, including empty security requirements
|
||||
func (op OperationProps) GobEncode() ([]byte, error) {
|
||||
raw := gobAlias{
|
||||
Alias: (*opsAlias)(&op),
|
||||
}
|
||||
|
||||
var b bytes.Buffer
|
||||
if op.Security == nil {
|
||||
// nil security requirement
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
if len(op.Security) == 0 {
|
||||
// empty, but non-nil security requirement
|
||||
raw.SecurityIsEmpty = true
|
||||
raw.Alias.Security = nil
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
raw.Security = make([]map[string]struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}, 0, len(op.Security))
|
||||
for _, req := range op.Security {
|
||||
v := make(map[string]struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}, len(req))
|
||||
for k, val := range req {
|
||||
v[k] = struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}{
|
||||
List: val,
|
||||
}
|
||||
}
|
||||
raw.Security = append(raw.Security, v)
|
||||
}
|
||||
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
// GobDecode provides a safe gob decoder for Operation, including empty security requirements
|
||||
func (op *OperationProps) GobDecode(b []byte) error {
|
||||
var raw gobAlias
|
||||
|
||||
buf := bytes.NewBuffer(b)
|
||||
err := gob.NewDecoder(buf).Decode(&raw)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if raw.Alias == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch {
|
||||
case raw.SecurityIsEmpty:
|
||||
// empty, but non-nil security requirement
|
||||
raw.Alias.Security = []map[string][]string{}
|
||||
case len(raw.Alias.Security) == 0:
|
||||
// nil security requirement
|
||||
raw.Alias.Security = nil
|
||||
default:
|
||||
raw.Alias.Security = make([]map[string][]string, 0, len(raw.Security))
|
||||
for _, req := range raw.Security {
|
||||
v := make(map[string][]string, len(req))
|
||||
for k, val := range req {
|
||||
v[k] = make([]string, 0, len(val.List))
|
||||
v[k] = append(v[k], val.List...)
|
||||
}
|
||||
raw.Alias.Security = append(raw.Alias.Security, v)
|
||||
}
|
||||
}
|
||||
|
||||
*op = *(*OperationProps)(raw.Alias)
|
||||
return nil
|
||||
}
|
||||
|
|
51
vendor/github.com/go-openapi/spec/parameter.go
generated
vendored
51
vendor/github.com/go-openapi/spec/parameter.go
generated
vendored
|
@ -39,8 +39,7 @@ func PathParam(name string) *Parameter {
|
|||
|
||||
// BodyParam creates a body parameter
|
||||
func BodyParam(name string, schema *Schema) *Parameter {
|
||||
return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema},
|
||||
SimpleSchema: SimpleSchema{Type: "object"}}
|
||||
return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema}, SimpleSchema: SimpleSchema{Type: "object"}}
|
||||
}
|
||||
|
||||
// FormDataParam creates a body parameter
|
||||
|
@ -50,15 +49,12 @@ func FormDataParam(name string) *Parameter {
|
|||
|
||||
// FileParam creates a body parameter
|
||||
func FileParam(name string) *Parameter {
|
||||
return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"},
|
||||
SimpleSchema: SimpleSchema{Type: "file"}}
|
||||
return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"}, SimpleSchema: SimpleSchema{Type: "file"}}
|
||||
}
|
||||
|
||||
// SimpleArrayParam creates a param for a simple array (string, int, date etc)
|
||||
func SimpleArrayParam(name, tpe, fmt string) *Parameter {
|
||||
return &Parameter{ParamProps: ParamProps{Name: name},
|
||||
SimpleSchema: SimpleSchema{Type: jsonArray, CollectionFormat: "csv",
|
||||
Items: &Items{SimpleSchema: SimpleSchema{Type: "string", Format: fmt}}}}
|
||||
return &Parameter{ParamProps: ParamProps{Name: name}, SimpleSchema: SimpleSchema{Type: "array", CollectionFormat: "csv", Items: &Items{SimpleSchema: SimpleSchema{Type: "string", Format: fmt}}}}
|
||||
}
|
||||
|
||||
// ParamRef creates a parameter that's a json reference
|
||||
|
@ -69,43 +65,25 @@ func ParamRef(uri string) *Parameter {
|
|||
}
|
||||
|
||||
// ParamProps describes the specific attributes of an operation parameter
|
||||
//
|
||||
// NOTE:
|
||||
// - Schema is defined when "in" == "body": see validate
|
||||
// - AllowEmptyValue is allowed where "in" == "query" || "formData"
|
||||
type ParamProps struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
In string `json:"in,omitempty"`
|
||||
Required bool `json:"required,omitempty"`
|
||||
Schema *Schema `json:"schema,omitempty"`
|
||||
AllowEmptyValue bool `json:"allowEmptyValue,omitempty"`
|
||||
Schema *Schema `json:"schema,omitempty"` // when in == "body"
|
||||
AllowEmptyValue bool `json:"allowEmptyValue,omitempty"` // when in == "query" || "formData"
|
||||
}
|
||||
|
||||
// Parameter a unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn).
|
||||
//
|
||||
// There are five possible parameter types.
|
||||
// * Path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part
|
||||
// of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`,
|
||||
// the path parameter is `itemId`.
|
||||
// * Path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`.
|
||||
// * Query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`.
|
||||
// * Header - Custom headers that are expected as part of the request.
|
||||
// * Body - The payload that's appended to the HTTP request. Since there can only be one payload, there can only be
|
||||
// _one_ body parameter. The name of the body parameter has no effect on the parameter itself and is used for
|
||||
// documentation purposes only. Since Form parameters are also in the payload, body and form parameters cannot exist
|
||||
// together for the same operation.
|
||||
// * Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded` or
|
||||
// `multipart/form-data` are used as the content type of the request (in Swagger's definition,
|
||||
// the [`consumes`](#operationConsumes) property of an operation). This is the only parameter type that can be used
|
||||
// to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be
|
||||
// declared together with a body parameter for the same operation. Form parameters have a different format based on
|
||||
// the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4).
|
||||
// * `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload.
|
||||
// For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple
|
||||
// parameters that are being transferred.
|
||||
// * `multipart/form-data` - each parameter takes a section in the payload with an internal header.
|
||||
// For example, for the header `Content-Disposition: form-data; name="submit-name"` the name of the parameter is
|
||||
// `submit-name`. This type of form parameters is more commonly used for file transfers.
|
||||
// * Body - The payload that's appended to the HTTP request. Since there can only be one payload, there can only be *one* body parameter. The name of the body parameter has no effect on the parameter itself and is used for documentation purposes only. Since Form parameters are also in the payload, body and form parameters cannot exist together for the same operation.
|
||||
// * Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded` or `multipart/form-data` are used as the content type of the request (in Swagger's definition, the [`consumes`](#operationConsumes) property of an operation). This is the only parameter type that can be used to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be declared together with a body parameter for the same operation. Form parameters have a different format based on the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4):
|
||||
// * `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload. For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple parameters that are being transferred.
|
||||
// * `multipart/form-data` - each parameter takes a section in the payload with an internal header. For example, for the header `Content-Disposition: form-data; name="submit-name"` the name of the parameter is `submit-name`. This type of form parameters is more commonly used for file transfers.
|
||||
//
|
||||
// For more information: http://goo.gl/8us55a#parameterObject
|
||||
type Parameter struct {
|
||||
|
@ -121,7 +99,7 @@ func (p Parameter) JSONLookup(token string) (interface{}, error) {
|
|||
if ex, ok := p.Extensions[token]; ok {
|
||||
return &ex, nil
|
||||
}
|
||||
if token == jsonRef {
|
||||
if token == "$ref" {
|
||||
return &p.Ref, nil
|
||||
}
|
||||
|
||||
|
@ -170,7 +148,7 @@ func (p *Parameter) Typed(tpe, format string) *Parameter {
|
|||
|
||||
// CollectionOf a fluent builder method for an array parameter
|
||||
func (p *Parameter) CollectionOf(items *Items, format string) *Parameter {
|
||||
p.Type = jsonArray
|
||||
p.Type = "array"
|
||||
p.Items = items
|
||||
p.CollectionFormat = format
|
||||
return p
|
||||
|
@ -292,7 +270,10 @@ func (p *Parameter) UnmarshalJSON(data []byte) error {
|
|||
if err := json.Unmarshal(data, &p.VendorExtensible); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, &p.ParamProps)
|
||||
if err := json.Unmarshal(data, &p.ParamProps); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON converts this items object to JSON
|
||||
|
|
7
vendor/github.com/go-openapi/spec/path_item.go
generated
vendored
7
vendor/github.com/go-openapi/spec/path_item.go
generated
vendored
|
@ -50,7 +50,7 @@ func (p PathItem) JSONLookup(token string) (interface{}, error) {
|
|||
if ex, ok := p.Extensions[token]; ok {
|
||||
return &ex, nil
|
||||
}
|
||||
if token == jsonRef {
|
||||
if token == "$ref" {
|
||||
return &p.Ref, nil
|
||||
}
|
||||
r, _, err := jsonpointer.GetForToken(p.PathItemProps, token)
|
||||
|
@ -65,7 +65,10 @@ func (p *PathItem) UnmarshalJSON(data []byte) error {
|
|||
if err := json.Unmarshal(data, &p.VendorExtensible); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, &p.PathItemProps)
|
||||
if err := json.Unmarshal(data, &p.PathItemProps); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON converts this items object to JSON
|
||||
|
|
24
vendor/github.com/go-openapi/spec/ref.go
generated
vendored
24
vendor/github.com/go-openapi/spec/ref.go
generated
vendored
|
@ -15,8 +15,6 @@
|
|||
package spec
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"os"
|
||||
|
@ -150,28 +148,6 @@ func (r *Ref) UnmarshalJSON(d []byte) error {
|
|||
return r.fromMap(v)
|
||||
}
|
||||
|
||||
// GobEncode provides a safe gob encoder for Ref
|
||||
func (r Ref) GobEncode() ([]byte, error) {
|
||||
var b bytes.Buffer
|
||||
raw, err := r.MarshalJSON()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
// GobDecode provides a safe gob decoder for Ref
|
||||
func (r *Ref) GobDecode(b []byte) error {
|
||||
var raw []byte
|
||||
buf := bytes.NewBuffer(b)
|
||||
err := gob.NewDecoder(buf).Decode(&raw)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(raw, r)
|
||||
}
|
||||
|
||||
func (r *Ref) fromMap(v map[string]interface{}) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
|
|
5
vendor/github.com/go-openapi/spec/response.go
generated
vendored
5
vendor/github.com/go-openapi/spec/response.go
generated
vendored
|
@ -58,7 +58,10 @@ func (r *Response) UnmarshalJSON(data []byte) error {
|
|||
if err := json.Unmarshal(data, &r.Refable); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, &r.VendorExtensible)
|
||||
if err := json.Unmarshal(data, &r.VendorExtensible); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalJSON converts this items object to JSON
|
||||
|
|
60
vendor/github.com/go-openapi/spec/schema.go
generated
vendored
60
vendor/github.com/go-openapi/spec/schema.go
generated
vendored
|
@ -89,8 +89,7 @@ func DateTimeProperty() *Schema {
|
|||
|
||||
// MapProperty creates a map property
|
||||
func MapProperty(property *Schema) *Schema {
|
||||
return &Schema{SchemaProps: SchemaProps{Type: []string{"object"},
|
||||
AdditionalProperties: &SchemaOrBool{Allows: true, Schema: property}}}
|
||||
return &Schema{SchemaProps: SchemaProps{Type: []string{"object"}, AdditionalProperties: &SchemaOrBool{Allows: true, Schema: property}}}
|
||||
}
|
||||
|
||||
// RefProperty creates a ref property
|
||||
|
@ -156,6 +155,54 @@ func (r *SchemaURL) fromMap(v map[string]interface{}) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// type ExtraSchemaProps map[string]interface{}
|
||||
|
||||
// // JSONSchema represents a structure that is a json schema draft 04
|
||||
// type JSONSchema struct {
|
||||
// SchemaProps
|
||||
// ExtraSchemaProps
|
||||
// }
|
||||
|
||||
// // MarshalJSON marshal this to JSON
|
||||
// func (s JSONSchema) MarshalJSON() ([]byte, error) {
|
||||
// b1, err := json.Marshal(s.SchemaProps)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// b2, err := s.Ref.MarshalJSON()
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// b3, err := s.Schema.MarshalJSON()
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// b4, err := json.Marshal(s.ExtraSchemaProps)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return swag.ConcatJSON(b1, b2, b3, b4), nil
|
||||
// }
|
||||
|
||||
// // UnmarshalJSON marshal this from JSON
|
||||
// func (s *JSONSchema) UnmarshalJSON(data []byte) error {
|
||||
// var sch JSONSchema
|
||||
// if err := json.Unmarshal(data, &sch.SchemaProps); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := json.Unmarshal(data, &sch.Ref); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := json.Unmarshal(data, &sch.Schema); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := json.Unmarshal(data, &sch.ExtraSchemaProps); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// *s = sch
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// SchemaProps describes a JSON schema (draft 4)
|
||||
type SchemaProps struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
|
@ -163,7 +210,6 @@ type SchemaProps struct {
|
|||
Schema SchemaURL `json:"-"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Type StringOrArray `json:"type,omitempty"`
|
||||
Nullable bool `json:"nullable,omitempty"`
|
||||
Format string `json:"format,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Default interface{} `json:"default,omitempty"`
|
||||
|
@ -303,15 +349,9 @@ func (s *Schema) AddType(tpe, format string) *Schema {
|
|||
return s
|
||||
}
|
||||
|
||||
// AsNullable flags this schema as nullable.
|
||||
func (s *Schema) AsNullable() *Schema {
|
||||
s.Nullable = true
|
||||
return s
|
||||
}
|
||||
|
||||
// CollectionOf a fluent builder method for an array parameter
|
||||
func (s *Schema) CollectionOf(items Schema) *Schema {
|
||||
s.Type = []string{jsonArray}
|
||||
s.Type = []string{"array"}
|
||||
s.Items = &SchemaOrArray{Schema: &items}
|
||||
return s
|
||||
}
|
||||
|
|
275
vendor/github.com/go-openapi/spec/schema_loader.go
generated
vendored
275
vendor/github.com/go-openapi/spec/schema_loader.go
generated
vendored
|
@ -1,275 +0,0 @@
|
|||
// Copyright 2015 go-swagger maintainers
|
||||
//
|
||||
// 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 spec
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// PathLoader function to use when loading remote refs
|
||||
var PathLoader func(string) (json.RawMessage, error)
|
||||
|
||||
func init() {
|
||||
PathLoader = func(path string) (json.RawMessage, error) {
|
||||
data, err := swag.LoadFromFileOrHTTP(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.RawMessage(data), nil
|
||||
}
|
||||
}
|
||||
|
||||
// resolverContext allows to share a context during spec processing.
|
||||
// At the moment, it just holds the index of circular references found.
|
||||
type resolverContext struct {
|
||||
// circulars holds all visited circular references, which allows shortcuts.
|
||||
// NOTE: this is not just a performance improvement: it is required to figure out
|
||||
// circular references which participate several cycles.
|
||||
// This structure is privately instantiated and needs not be locked against
|
||||
// concurrent access, unless we chose to implement a parallel spec walking.
|
||||
circulars map[string]bool
|
||||
basePath string
|
||||
}
|
||||
|
||||
func newResolverContext(originalBasePath string) *resolverContext {
|
||||
return &resolverContext{
|
||||
circulars: make(map[string]bool),
|
||||
basePath: originalBasePath, // keep the root base path in context
|
||||
}
|
||||
}
|
||||
|
||||
type schemaLoader struct {
|
||||
root interface{}
|
||||
options *ExpandOptions
|
||||
cache ResolutionCache
|
||||
context *resolverContext
|
||||
loadDoc func(string) (json.RawMessage, error)
|
||||
}
|
||||
|
||||
func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) (*schemaLoader, error) {
|
||||
if ref.IsRoot() || ref.HasFragmentOnly {
|
||||
return r, nil
|
||||
}
|
||||
|
||||
baseRef, _ := NewRef(basePath)
|
||||
currentRef := normalizeFileRef(&ref, basePath)
|
||||
if strings.HasPrefix(currentRef.String(), baseRef.String()) {
|
||||
return r, nil
|
||||
}
|
||||
|
||||
// Set a new root to resolve against
|
||||
rootURL := currentRef.GetURL()
|
||||
rootURL.Fragment = ""
|
||||
root, _ := r.cache.Get(rootURL.String())
|
||||
|
||||
// shallow copy of resolver options to set a new RelativeBase when
|
||||
// traversing multiple documents
|
||||
newOptions := r.options
|
||||
newOptions.RelativeBase = rootURL.String()
|
||||
debugLog("setting new root: %s", newOptions.RelativeBase)
|
||||
resolver, err := defaultSchemaLoader(root, newOptions, r.cache, r.context)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resolver, nil
|
||||
}
|
||||
|
||||
func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) string {
|
||||
if transitive != r {
|
||||
debugLog("got a new resolver")
|
||||
if transitive.options != nil && transitive.options.RelativeBase != "" {
|
||||
basePath, _ = absPath(transitive.options.RelativeBase)
|
||||
debugLog("new basePath = %s", basePath)
|
||||
}
|
||||
}
|
||||
return basePath
|
||||
}
|
||||
|
||||
func (r *schemaLoader) resolveRef(ref *Ref, target interface{}, basePath string) error {
|
||||
tgt := reflect.ValueOf(target)
|
||||
if tgt.Kind() != reflect.Ptr {
|
||||
return fmt.Errorf("resolve ref: target needs to be a pointer")
|
||||
}
|
||||
|
||||
refURL := ref.GetURL()
|
||||
if refURL == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var res interface{}
|
||||
var data interface{}
|
||||
var err error
|
||||
// Resolve against the root if it isn't nil, and if ref is pointing at the root, or has a fragment only which means
|
||||
// it is pointing somewhere in the root.
|
||||
root := r.root
|
||||
if (ref.IsRoot() || ref.HasFragmentOnly) && root == nil && basePath != "" {
|
||||
if baseRef, erb := NewRef(basePath); erb == nil {
|
||||
root, _, _, _ = r.load(baseRef.GetURL())
|
||||
}
|
||||
}
|
||||
if (ref.IsRoot() || ref.HasFragmentOnly) && root != nil {
|
||||
data = root
|
||||
} else {
|
||||
baseRef := normalizeFileRef(ref, basePath)
|
||||
debugLog("current ref is: %s", ref.String())
|
||||
debugLog("current ref normalized file: %s", baseRef.String())
|
||||
data, _, _, err = r.load(baseRef.GetURL())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
res = data
|
||||
if ref.String() != "" {
|
||||
res, _, err = ref.GetPointer().Get(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return swag.DynamicJSONToStruct(res, target)
|
||||
}
|
||||
|
||||
func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) {
|
||||
debugLog("loading schema from url: %s", refURL)
|
||||
toFetch := *refURL
|
||||
toFetch.Fragment = ""
|
||||
|
||||
normalized := normalizeAbsPath(toFetch.String())
|
||||
|
||||
data, fromCache := r.cache.Get(normalized)
|
||||
if !fromCache {
|
||||
b, err := r.loadDoc(normalized)
|
||||
if err != nil {
|
||||
return nil, url.URL{}, false, err
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(b, &data); err != nil {
|
||||
return nil, url.URL{}, false, err
|
||||
}
|
||||
r.cache.Set(normalized, data)
|
||||
}
|
||||
|
||||
return data, toFetch, fromCache, nil
|
||||
}
|
||||
|
||||
// isCircular detects cycles in sequences of $ref.
|
||||
// It relies on a private context (which needs not be locked).
|
||||
func (r *schemaLoader) isCircular(ref *Ref, basePath string, parentRefs ...string) (foundCycle bool) {
|
||||
normalizedRef := normalizePaths(ref.String(), basePath)
|
||||
if _, ok := r.context.circulars[normalizedRef]; ok {
|
||||
// circular $ref has been already detected in another explored cycle
|
||||
foundCycle = true
|
||||
return
|
||||
}
|
||||
foundCycle = swag.ContainsStringsCI(parentRefs, normalizedRef)
|
||||
if foundCycle {
|
||||
r.context.circulars[normalizedRef] = true
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Resolve resolves a reference against basePath and stores the result in target
|
||||
// Resolve is not in charge of following references, it only resolves ref by following its URL
|
||||
// if the schema that ref is referring to has more refs in it. Resolve doesn't resolve them
|
||||
// if basePath is an empty string, ref is resolved against the root schema stored in the schemaLoader struct
|
||||
func (r *schemaLoader) Resolve(ref *Ref, target interface{}, basePath string) error {
|
||||
return r.resolveRef(ref, target, basePath)
|
||||
}
|
||||
|
||||
func (r *schemaLoader) deref(input interface{}, parentRefs []string, basePath string) error {
|
||||
var ref *Ref
|
||||
switch refable := input.(type) {
|
||||
case *Schema:
|
||||
ref = &refable.Ref
|
||||
case *Parameter:
|
||||
ref = &refable.Ref
|
||||
case *Response:
|
||||
ref = &refable.Ref
|
||||
case *PathItem:
|
||||
ref = &refable.Ref
|
||||
default:
|
||||
return fmt.Errorf("deref: unsupported type %T", input)
|
||||
}
|
||||
|
||||
curRef := ref.String()
|
||||
if curRef != "" {
|
||||
normalizedRef := normalizeFileRef(ref, basePath)
|
||||
normalizedBasePath := normalizedRef.RemoteURI()
|
||||
|
||||
if r.isCircular(normalizedRef, basePath, parentRefs...) {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := r.resolveRef(ref, input, basePath); r.shouldStopOnError(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
// NOTE(fredbi): removed basePath check => needs more testing
|
||||
if ref.String() != "" && ref.String() != curRef {
|
||||
parentRefs = append(parentRefs, normalizedRef.String())
|
||||
return r.deref(input, parentRefs, normalizedBasePath)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *schemaLoader) shouldStopOnError(err error) bool {
|
||||
if err != nil && !r.options.ContinueOnError {
|
||||
return true
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func defaultSchemaLoader(
|
||||
root interface{},
|
||||
expandOptions *ExpandOptions,
|
||||
cache ResolutionCache,
|
||||
context *resolverContext) (*schemaLoader, error) {
|
||||
|
||||
if cache == nil {
|
||||
cache = resCache
|
||||
}
|
||||
if expandOptions == nil {
|
||||
expandOptions = &ExpandOptions{}
|
||||
}
|
||||
absBase, _ := absPath(expandOptions.RelativeBase)
|
||||
if context == nil {
|
||||
context = newResolverContext(absBase)
|
||||
}
|
||||
return &schemaLoader{
|
||||
root: root,
|
||||
options: expandOptions,
|
||||
cache: cache,
|
||||
context: context,
|
||||
loadDoc: func(path string) (json.RawMessage, error) {
|
||||
debugLog("fetching document at %q", path)
|
||||
return PathLoader(path)
|
||||
},
|
||||
}, nil
|
||||
}
|
5
vendor/github.com/go-openapi/spec/security_scheme.go
generated
vendored
5
vendor/github.com/go-openapi/spec/security_scheme.go
generated
vendored
|
@ -136,5 +136,8 @@ func (s *SecurityScheme) UnmarshalJSON(data []byte) error {
|
|||
if err := json.Unmarshal(data, &s.SecuritySchemeProps); err != nil {
|
||||
return err
|
||||
}
|
||||
return json.Unmarshal(data, &s.VendorExtensible)
|
||||
if err := json.Unmarshal(data, &s.VendorExtensible); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
142
vendor/github.com/go-openapi/spec/swagger.go
generated
vendored
142
vendor/github.com/go-openapi/spec/swagger.go
generated
vendored
|
@ -15,8 +15,6 @@
|
|||
package spec
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
@ -26,8 +24,7 @@ import (
|
|||
)
|
||||
|
||||
// Swagger this is the root document object for the API specification.
|
||||
// It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier)
|
||||
// together into one document.
|
||||
// It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier) together into one document.
|
||||
//
|
||||
// For more information: http://goo.gl/8us55a#swagger-object-
|
||||
type Swagger struct {
|
||||
|
@ -70,52 +67,17 @@ func (s *Swagger) UnmarshalJSON(data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// GobEncode provides a safe gob encoder for Swagger, including extensions
|
||||
func (s Swagger) GobEncode() ([]byte, error) {
|
||||
var b bytes.Buffer
|
||||
raw := struct {
|
||||
Props SwaggerProps
|
||||
Ext VendorExtensible
|
||||
}{
|
||||
Props: s.SwaggerProps,
|
||||
Ext: s.VendorExtensible,
|
||||
}
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
// GobDecode provides a safe gob decoder for Swagger, including extensions
|
||||
func (s *Swagger) GobDecode(b []byte) error {
|
||||
var raw struct {
|
||||
Props SwaggerProps
|
||||
Ext VendorExtensible
|
||||
}
|
||||
buf := bytes.NewBuffer(b)
|
||||
err := gob.NewDecoder(buf).Decode(&raw)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
s.SwaggerProps = raw.Props
|
||||
s.VendorExtensible = raw.Ext
|
||||
return nil
|
||||
}
|
||||
|
||||
// SwaggerProps captures the top-level properties of an Api specification
|
||||
//
|
||||
// NOTE: validation rules
|
||||
// - the scheme, when present must be from [http, https, ws, wss]
|
||||
// - BasePath must start with a leading "/"
|
||||
// - Paths is required
|
||||
type SwaggerProps struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Consumes []string `json:"consumes,omitempty"`
|
||||
Produces []string `json:"produces,omitempty"`
|
||||
Schemes []string `json:"schemes,omitempty"`
|
||||
Schemes []string `json:"schemes,omitempty"` // the scheme, when present must be from [http, https, ws, wss]
|
||||
Swagger string `json:"swagger,omitempty"`
|
||||
Info *Info `json:"info,omitempty"`
|
||||
Host string `json:"host,omitempty"`
|
||||
BasePath string `json:"basePath,omitempty"`
|
||||
Paths *Paths `json:"paths"`
|
||||
BasePath string `json:"basePath,omitempty"` // must start with a leading "/"
|
||||
Paths *Paths `json:"paths"` // required
|
||||
Definitions Definitions `json:"definitions,omitempty"`
|
||||
Parameters map[string]Parameter `json:"parameters,omitempty"`
|
||||
Responses map[string]Response `json:"responses,omitempty"`
|
||||
|
@ -125,98 +87,6 @@ type SwaggerProps struct {
|
|||
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
|
||||
}
|
||||
|
||||
type swaggerPropsAlias SwaggerProps
|
||||
|
||||
type gobSwaggerPropsAlias struct {
|
||||
Security []map[string]struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}
|
||||
Alias *swaggerPropsAlias
|
||||
SecurityIsEmpty bool
|
||||
}
|
||||
|
||||
// GobEncode provides a safe gob encoder for SwaggerProps, including empty security requirements
|
||||
func (o SwaggerProps) GobEncode() ([]byte, error) {
|
||||
raw := gobSwaggerPropsAlias{
|
||||
Alias: (*swaggerPropsAlias)(&o),
|
||||
}
|
||||
|
||||
var b bytes.Buffer
|
||||
if o.Security == nil {
|
||||
// nil security requirement
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
if len(o.Security) == 0 {
|
||||
// empty, but non-nil security requirement
|
||||
raw.SecurityIsEmpty = true
|
||||
raw.Alias.Security = nil
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
raw.Security = make([]map[string]struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}, 0, len(o.Security))
|
||||
for _, req := range o.Security {
|
||||
v := make(map[string]struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}, len(req))
|
||||
for k, val := range req {
|
||||
v[k] = struct {
|
||||
List []string
|
||||
Pad bool
|
||||
}{
|
||||
List: val,
|
||||
}
|
||||
}
|
||||
raw.Security = append(raw.Security, v)
|
||||
}
|
||||
|
||||
err := gob.NewEncoder(&b).Encode(raw)
|
||||
return b.Bytes(), err
|
||||
}
|
||||
|
||||
// GobDecode provides a safe gob decoder for SwaggerProps, including empty security requirements
|
||||
func (o *SwaggerProps) GobDecode(b []byte) error {
|
||||
var raw gobSwaggerPropsAlias
|
||||
|
||||
buf := bytes.NewBuffer(b)
|
||||
err := gob.NewDecoder(buf).Decode(&raw)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if raw.Alias == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch {
|
||||
case raw.SecurityIsEmpty:
|
||||
// empty, but non-nil security requirement
|
||||
raw.Alias.Security = []map[string][]string{}
|
||||
case len(raw.Alias.Security) == 0:
|
||||
// nil security requirement
|
||||
raw.Alias.Security = nil
|
||||
default:
|
||||
raw.Alias.Security = make([]map[string][]string, 0, len(raw.Security))
|
||||
for _, req := range raw.Security {
|
||||
v := make(map[string][]string, len(req))
|
||||
for k, val := range req {
|
||||
v[k] = make([]string, 0, len(val.List))
|
||||
v[k] = append(v[k], val.List...)
|
||||
}
|
||||
raw.Alias.Security = append(raw.Alias.Security, v)
|
||||
}
|
||||
}
|
||||
|
||||
*o = *(*SwaggerProps)(raw.Alias)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Dependencies represent a dependencies property
|
||||
type Dependencies map[string]SchemaOrStringArray
|
||||
|
||||
|
@ -374,9 +244,9 @@ func (s *StringOrArray) UnmarshalJSON(data []byte) error {
|
|||
if single == nil {
|
||||
return nil
|
||||
}
|
||||
switch v := single.(type) {
|
||||
switch single.(type) {
|
||||
case string:
|
||||
*s = StringOrArray([]string{v})
|
||||
*s = StringOrArray([]string{single.(string)})
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("only string or array is allowed, not %T", single)
|
||||
|
|
5
vendor/github.com/go-openapi/spec/tag.go
generated
vendored
5
vendor/github.com/go-openapi/spec/tag.go
generated
vendored
|
@ -30,11 +30,10 @@ type TagProps struct {
|
|||
|
||||
// NewTag creates a new tag
|
||||
func NewTag(name, description string, externalDocs *ExternalDocumentation) Tag {
|
||||
return Tag{TagProps: TagProps{Description: description, Name: name, ExternalDocs: externalDocs}}
|
||||
return Tag{TagProps: TagProps{description, name, externalDocs}}
|
||||
}
|
||||
|
||||
// Tag allows adding meta data to a single tag that is used by the
|
||||
// [Operation Object](http://goo.gl/8us55a#operationObject).
|
||||
// Tag allows adding meta data to a single tag that is used by the [Operation Object](http://goo.gl/8us55a#operationObject).
|
||||
// It is not mandatory to have a Tag Object per tag used there.
|
||||
//
|
||||
// For more information: http://goo.gl/8us55a#tagObject
|
||||
|
|
174
vendor/github.com/go-openapi/spec/unused.go
generated
vendored
174
vendor/github.com/go-openapi/spec/unused.go
generated
vendored
|
@ -1,174 +0,0 @@
|
|||
// Copyright 2015 go-swagger maintainers
|
||||
//
|
||||
// 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 spec
|
||||
|
||||
/*
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-openapi/jsonpointer"
|
||||
)
|
||||
|
||||
// Some currently unused functions and definitions that
|
||||
// used to be part of the expander.
|
||||
|
||||
// Moved here for the record and possible future reuse
|
||||
|
||||
var (
|
||||
idPtr, _ = jsonpointer.New("/id")
|
||||
refPtr, _ = jsonpointer.New("/$ref")
|
||||
)
|
||||
|
||||
func idFromNode(node interface{}) (*Ref, error) {
|
||||
if idValue, _, err := idPtr.Get(node); err == nil {
|
||||
if refStr, ok := idValue.(string); ok && refStr != "" {
|
||||
idRef, err := NewRef(refStr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &idRef, nil
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func nextRef(startingNode interface{}, startingRef *Ref, ptr *jsonpointer.Pointer) *Ref {
|
||||
if startingRef == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if ptr == nil {
|
||||
return startingRef
|
||||
}
|
||||
|
||||
ret := startingRef
|
||||
var idRef *Ref
|
||||
node := startingNode
|
||||
|
||||
for _, tok := range ptr.DecodedTokens() {
|
||||
node, _, _ = jsonpointer.GetForToken(node, tok)
|
||||
if node == nil {
|
||||
break
|
||||
}
|
||||
|
||||
idRef, _ = idFromNode(node)
|
||||
if idRef != nil {
|
||||
nw, err := ret.Inherits(*idRef)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
ret = nw
|
||||
}
|
||||
|
||||
refRef, _, _ := refPtr.Get(node)
|
||||
if refRef != nil {
|
||||
var rf Ref
|
||||
switch value := refRef.(type) {
|
||||
case string:
|
||||
rf, _ = NewRef(value)
|
||||
}
|
||||
nw, err := ret.Inherits(rf)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
nwURL := nw.GetURL()
|
||||
if nwURL.Scheme == "file" || (nwURL.Scheme == "" && nwURL.Host == "") {
|
||||
nwpt := filepath.ToSlash(nwURL.Path)
|
||||
if filepath.IsAbs(nwpt) {
|
||||
_, err := os.Stat(nwpt)
|
||||
if err != nil {
|
||||
nwURL.Path = filepath.Join(".", nwpt)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = nw
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
// basePathFromSchemaID returns a new basePath based on an existing basePath and a schema ID
|
||||
func basePathFromSchemaID(oldBasePath, id string) string {
|
||||
u, err := url.Parse(oldBasePath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
uid, err := url.Parse(id)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if path.IsAbs(uid.Path) {
|
||||
return id
|
||||
}
|
||||
u.Path = path.Join(path.Dir(u.Path), uid.Path)
|
||||
return u.String()
|
||||
}
|
||||
*/
|
||||
|
||||
// type ExtraSchemaProps map[string]interface{}
|
||||
|
||||
// // JSONSchema represents a structure that is a json schema draft 04
|
||||
// type JSONSchema struct {
|
||||
// SchemaProps
|
||||
// ExtraSchemaProps
|
||||
// }
|
||||
|
||||
// // MarshalJSON marshal this to JSON
|
||||
// func (s JSONSchema) MarshalJSON() ([]byte, error) {
|
||||
// b1, err := json.Marshal(s.SchemaProps)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// b2, err := s.Ref.MarshalJSON()
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// b3, err := s.Schema.MarshalJSON()
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// b4, err := json.Marshal(s.ExtraSchemaProps)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return swag.ConcatJSON(b1, b2, b3, b4), nil
|
||||
// }
|
||||
|
||||
// // UnmarshalJSON marshal this from JSON
|
||||
// func (s *JSONSchema) UnmarshalJSON(data []byte) error {
|
||||
// var sch JSONSchema
|
||||
// if err := json.Unmarshal(data, &sch.SchemaProps); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := json.Unmarshal(data, &sch.Ref); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := json.Unmarshal(data, &sch.Schema); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := json.Unmarshal(data, &sch.ExtraSchemaProps); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// *s = sch
|
||||
// return nil
|
||||
// }
|
11
vendor/github.com/go-openapi/swag/.travis.yml
generated
vendored
11
vendor/github.com/go-openapi/swag/.travis.yml
generated
vendored
|
@ -1,15 +1,16 @@
|
|||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
go:
|
||||
- '1.9'
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
install:
|
||||
- GO111MODULE=off go get -u gotest.tools/gotestsum
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- go get -u github.com/stretchr/testify
|
||||
- go get -u github.com/mailru/easyjson
|
||||
- go get -u gopkg.in/yaml.v2
|
||||
language: go
|
||||
notifications:
|
||||
slack:
|
||||
secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E=
|
||||
script:
|
||||
- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
|
1
vendor/github.com/go-openapi/swag/README.md
generated
vendored
1
vendor/github.com/go-openapi/swag/README.md
generated
vendored
|
@ -19,4 +19,5 @@ You may also use it standalone for your projects.
|
|||
|
||||
This repo has only few dependencies outside of the standard library:
|
||||
|
||||
* JSON utilities depend on github.com/mailru/easyjson
|
||||
* YAML utilities depend on gopkg.in/yaml.v2
|
||||
|
|
1
vendor/github.com/go-openapi/swag/doc.go
generated
vendored
1
vendor/github.com/go-openapi/swag/doc.go
generated
vendored
|
@ -27,6 +27,7 @@ You may also use it standalone for your projects.
|
|||
|
||||
This repo has only few dependencies outside of the standard library:
|
||||
|
||||
* JSON utilities depend on github.com/mailru/easyjson
|
||||
* YAML utilities depend on gopkg.in/yaml.v2
|
||||
*/
|
||||
package swag
|
||||
|
|
13
vendor/github.com/go-openapi/swag/go.mod
generated
vendored
13
vendor/github.com/go-openapi/swag/go.mod
generated
vendored
|
@ -2,13 +2,8 @@ module github.com/go-openapi/swag
|
|||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63
|
||||
github.com/stretchr/testify v1.3.0
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.2
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
gopkg.in/yaml.v2 v2.2.1
|
||||
)
|
||||
|
||||
replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
|
||||
|
||||
replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1
|
||||
|
|
21
vendor/github.com/go-openapi/swag/go.sum
generated
vendored
21
vendor/github.com/go-openapi/swag/go.sum
generated
vendored
|
@ -1,20 +1,9 @@
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic=
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
|
87
vendor/github.com/go-openapi/swag/name_lexem.go
generated
vendored
87
vendor/github.com/go-openapi/swag/name_lexem.go
generated
vendored
|
@ -1,87 +0,0 @@
|
|||
// Copyright 2015 go-swagger maintainers
|
||||
//
|
||||
// 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 swag
|
||||
|
||||
import "unicode"
|
||||
|
||||
type (
|
||||
nameLexem interface {
|
||||
GetUnsafeGoName() string
|
||||
GetOriginal() string
|
||||
IsInitialism() bool
|
||||
}
|
||||
|
||||
initialismNameLexem struct {
|
||||
original string
|
||||
matchedInitialism string
|
||||
}
|
||||
|
||||
casualNameLexem struct {
|
||||
original string
|
||||
}
|
||||
)
|
||||
|
||||
func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem {
|
||||
return &initialismNameLexem{
|
||||
original: original,
|
||||
matchedInitialism: matchedInitialism,
|
||||
}
|
||||
}
|
||||
|
||||
func newCasualNameLexem(original string) *casualNameLexem {
|
||||
return &casualNameLexem{
|
||||
original: original,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *initialismNameLexem) GetUnsafeGoName() string {
|
||||
return l.matchedInitialism
|
||||
}
|
||||
|
||||
func (l *casualNameLexem) GetUnsafeGoName() string {
|
||||
var first rune
|
||||
var rest string
|
||||
for i, orig := range l.original {
|
||||
if i == 0 {
|
||||
first = orig
|
||||
continue
|
||||
}
|
||||
if i > 0 {
|
||||
rest = l.original[i:]
|
||||
break
|
||||
}
|
||||
}
|
||||
if len(l.original) > 1 {
|
||||
return string(unicode.ToUpper(first)) + lower(rest)
|
||||
}
|
||||
|
||||
return l.original
|
||||
}
|
||||
|
||||
func (l *initialismNameLexem) GetOriginal() string {
|
||||
return l.original
|
||||
}
|
||||
|
||||
func (l *casualNameLexem) GetOriginal() string {
|
||||
return l.original
|
||||
}
|
||||
|
||||
func (l *initialismNameLexem) IsInitialism() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (l *casualNameLexem) IsInitialism() bool {
|
||||
return false
|
||||
}
|
262
vendor/github.com/go-openapi/swag/split.go
generated
vendored
262
vendor/github.com/go-openapi/swag/split.go
generated
vendored
|
@ -1,262 +0,0 @@
|
|||
// Copyright 2015 go-swagger maintainers
|
||||
//
|
||||
// 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 swag
|
||||
|
||||
import (
|
||||
"unicode"
|
||||
)
|
||||
|
||||
var nameReplaceTable = map[rune]string{
|
||||
'@': "At ",
|
||||
'&': "And ",
|
||||
'|': "Pipe ",
|
||||
'$': "Dollar ",
|
||||
'!': "Bang ",
|
||||
'-': "",
|
||||
'_': "",
|
||||
}
|
||||
|
||||
type (
|
||||
splitter struct {
|
||||
postSplitInitialismCheck bool
|
||||
initialisms []string
|
||||
}
|
||||
|
||||
splitterOption func(*splitter) *splitter
|
||||
)
|
||||
|
||||
// split calls the splitter; splitter provides more control and post options
|
||||
func split(str string) []string {
|
||||
lexems := newSplitter().split(str)
|
||||
result := make([]string, 0, len(lexems))
|
||||
|
||||
for _, lexem := range lexems {
|
||||
result = append(result, lexem.GetOriginal())
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
}
|
||||
|
||||
func (s *splitter) split(str string) []nameLexem {
|
||||
return s.toNameLexems(str)
|
||||
}
|
||||
|
||||
func newSplitter(options ...splitterOption) *splitter {
|
||||
splitter := &splitter{
|
||||
postSplitInitialismCheck: false,
|
||||
initialisms: initialisms,
|
||||
}
|
||||
|
||||
for _, option := range options {
|
||||
splitter = option(splitter)
|
||||
}
|
||||
|
||||
return splitter
|
||||
}
|
||||
|
||||
// withPostSplitInitialismCheck allows to catch initialisms after main split process
|
||||
func withPostSplitInitialismCheck(s *splitter) *splitter {
|
||||
s.postSplitInitialismCheck = true
|
||||
return s
|
||||
}
|
||||
|
||||
type (
|
||||
initialismMatch struct {
|
||||
start, end int
|
||||
body []rune
|
||||
complete bool
|
||||
}
|
||||
initialismMatches []*initialismMatch
|
||||
)
|
||||
|
||||
func (s *splitter) toNameLexems(name string) []nameLexem {
|
||||
nameRunes := []rune(name)
|
||||
matches := s.gatherInitialismMatches(nameRunes)
|
||||
return s.mapMatchesToNameLexems(nameRunes, matches)
|
||||
}
|
||||
|
||||
func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches {
|
||||
matches := make(initialismMatches, 0)
|
||||
|
||||
for currentRunePosition, currentRune := range nameRunes {
|
||||
newMatches := make(initialismMatches, 0, len(matches))
|
||||
|
||||
// check current initialism matches
|
||||
for _, match := range matches {
|
||||
if keepCompleteMatch := match.complete; keepCompleteMatch {
|
||||
newMatches = append(newMatches, match)
|
||||
continue
|
||||
}
|
||||
|
||||
// drop failed match
|
||||
currentMatchRune := match.body[currentRunePosition-match.start]
|
||||
if !s.initialismRuneEqual(currentMatchRune, currentRune) {
|
||||
continue
|
||||
}
|
||||
|
||||
// try to complete ongoing match
|
||||
if currentRunePosition-match.start == len(match.body)-1 {
|
||||
// we are close; the next step is to check the symbol ahead
|
||||
// if it is a small letter, then it is not the end of match
|
||||
// but beginning of the next word
|
||||
|
||||
if currentRunePosition < len(nameRunes)-1 {
|
||||
nextRune := nameRunes[currentRunePosition+1]
|
||||
if newWord := unicode.IsLower(nextRune); newWord {
|
||||
// oh ok, it was the start of a new word
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
match.complete = true
|
||||
match.end = currentRunePosition
|
||||
}
|
||||
|
||||
newMatches = append(newMatches, match)
|
||||
}
|
||||
|
||||
// check for new initialism matches
|
||||
for _, initialism := range s.initialisms {
|
||||
initialismRunes := []rune(initialism)
|
||||
if s.initialismRuneEqual(initialismRunes[0], currentRune) {
|
||||
newMatches = append(newMatches, &initialismMatch{
|
||||
start: currentRunePosition,
|
||||
body: initialismRunes,
|
||||
complete: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
matches = newMatches
|
||||
}
|
||||
|
||||
return matches
|
||||
}
|
||||
|
||||
func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem {
|
||||
nameLexems := make([]nameLexem, 0)
|
||||
|
||||
var lastAcceptedMatch *initialismMatch
|
||||
for _, match := range matches {
|
||||
if !match.complete {
|
||||
continue
|
||||
}
|
||||
|
||||
if firstMatch := lastAcceptedMatch == nil; firstMatch {
|
||||
nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...)
|
||||
nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
|
||||
|
||||
lastAcceptedMatch = match
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if overlappedMatch := match.start <= lastAcceptedMatch.end; overlappedMatch {
|
||||
continue
|
||||
}
|
||||
|
||||
middle := nameRunes[lastAcceptedMatch.end+1 : match.start]
|
||||
nameLexems = append(nameLexems, s.breakCasualString(middle)...)
|
||||
nameLexems = append(nameLexems, s.breakInitialism(string(match.body)))
|
||||
|
||||
lastAcceptedMatch = match
|
||||
}
|
||||
|
||||
// we have not found any accepted matches
|
||||
if lastAcceptedMatch == nil {
|
||||
return s.breakCasualString(nameRunes)
|
||||
}
|
||||
|
||||
if lastAcceptedMatch.end+1 != len(nameRunes) {
|
||||
rest := nameRunes[lastAcceptedMatch.end+1:]
|
||||
nameLexems = append(nameLexems, s.breakCasualString(rest)...)
|
||||
}
|
||||
|
||||
return nameLexems
|
||||
}
|
||||
|
||||
func (s *splitter) initialismRuneEqual(a, b rune) bool {
|
||||
return a == b
|
||||
}
|
||||
|
||||
func (s *splitter) breakInitialism(original string) nameLexem {
|
||||
return newInitialismNameLexem(original, original)
|
||||
}
|
||||
|
||||
func (s *splitter) breakCasualString(str []rune) []nameLexem {
|
||||
segments := make([]nameLexem, 0)
|
||||
currentSegment := ""
|
||||
|
||||
addCasualNameLexem := func(original string) {
|
||||
segments = append(segments, newCasualNameLexem(original))
|
||||
}
|
||||
|
||||
addInitialismNameLexem := func(original, match string) {
|
||||
segments = append(segments, newInitialismNameLexem(original, match))
|
||||
}
|
||||
|
||||
addNameLexem := func(original string) {
|
||||
if s.postSplitInitialismCheck {
|
||||
for _, initialism := range s.initialisms {
|
||||
if upper(initialism) == upper(original) {
|
||||
addInitialismNameLexem(original, initialism)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addCasualNameLexem(original)
|
||||
}
|
||||
|
||||
for _, rn := range string(str) {
|
||||
if replace, found := nameReplaceTable[rn]; found {
|
||||
if currentSegment != "" {
|
||||
addNameLexem(currentSegment)
|
||||
currentSegment = ""
|
||||
}
|
||||
|
||||
if replace != "" {
|
||||
addNameLexem(replace)
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) {
|
||||
if currentSegment != "" {
|
||||
addNameLexem(currentSegment)
|
||||
currentSegment = ""
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if unicode.IsUpper(rn) {
|
||||
if currentSegment != "" {
|
||||
addNameLexem(currentSegment)
|
||||
}
|
||||
currentSegment = ""
|
||||
}
|
||||
|
||||
currentSegment += string(rn)
|
||||
}
|
||||
|
||||
if currentSegment != "" {
|
||||
addNameLexem(currentSegment)
|
||||
}
|
||||
|
||||
return segments
|
||||
}
|
92
vendor/github.com/go-openapi/swag/util.go
generated
vendored
92
vendor/github.com/go-openapi/swag/util.go
generated
vendored
|
@ -15,8 +15,11 @@
|
|||
package swag
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
|
@ -26,8 +29,16 @@ var commonInitialisms *indexOfInitialisms
|
|||
// initialisms is a slice of sorted initialisms
|
||||
var initialisms []string
|
||||
|
||||
var once sync.Once
|
||||
|
||||
var isInitialism func(string) bool
|
||||
|
||||
var (
|
||||
splitRex1 *regexp.Regexp
|
||||
splitRex2 *regexp.Regexp
|
||||
splitReplacer *strings.Replacer
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769
|
||||
var configuredInitialisms = map[string]bool{
|
||||
|
@ -44,8 +55,6 @@ func init() {
|
|||
"HTTP": true,
|
||||
"ID": true,
|
||||
"IP": true,
|
||||
"IPv4": true,
|
||||
"IPv6": true,
|
||||
"JSON": true,
|
||||
"LHS": true,
|
||||
"OAI": true,
|
||||
|
@ -76,12 +85,15 @@ func init() {
|
|||
|
||||
// a thread-safe index of initialisms
|
||||
commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms)
|
||||
initialisms = commonInitialisms.sorted()
|
||||
|
||||
// a test function
|
||||
isInitialism = commonInitialisms.isInitialism
|
||||
}
|
||||
|
||||
func ensureSorted() {
|
||||
initialisms = commonInitialisms.sorted()
|
||||
}
|
||||
|
||||
const (
|
||||
//collectionFormatComma = "csv"
|
||||
collectionFormatSpace = "ssv"
|
||||
|
@ -163,6 +175,40 @@ func (s byInitialism) Less(i, j int) bool {
|
|||
return strings.Compare(s[i], s[j]) > 0
|
||||
}
|
||||
|
||||
// Prepares strings by splitting by caps, spaces, dashes, and underscore
|
||||
func split(str string) []string {
|
||||
// check if consecutive single char things make up an initialism
|
||||
once.Do(func() {
|
||||
splitRex1 = regexp.MustCompile(`(\p{Lu})`)
|
||||
splitRex2 = regexp.MustCompile(`(\pL|\pM|\pN|\p{Pc})+`)
|
||||
splitReplacer = strings.NewReplacer(
|
||||
"@", "At ",
|
||||
"&", "And ",
|
||||
"|", "Pipe ",
|
||||
"$", "Dollar ",
|
||||
"!", "Bang ",
|
||||
"-", " ",
|
||||
"_", " ",
|
||||
)
|
||||
ensureSorted()
|
||||
})
|
||||
|
||||
str = trim(str)
|
||||
|
||||
// Convert dash and underscore to spaces
|
||||
str = splitReplacer.Replace(str)
|
||||
|
||||
// Split when uppercase is found (needed for Snake)
|
||||
str = splitRex1.ReplaceAllString(str, " $1")
|
||||
|
||||
for _, k := range initialisms {
|
||||
str = strings.Replace(str, splitRex1.ReplaceAllString(k, " $1"), " "+k, -1)
|
||||
}
|
||||
// Get the final list of words
|
||||
//words = rex2.FindAllString(str, -1)
|
||||
return splitRex2.FindAllString(str, -1)
|
||||
}
|
||||
|
||||
// Removes leading whitespaces
|
||||
func trim(str string) string {
|
||||
return strings.Trim(str, " ")
|
||||
|
@ -215,31 +261,30 @@ func ToCommandName(name string) string {
|
|||
|
||||
// ToHumanNameLower represents a code name as a human series of words
|
||||
func ToHumanNameLower(name string) string {
|
||||
in := newSplitter(withPostSplitInitialismCheck).split(name)
|
||||
in := split(name)
|
||||
out := make([]string, 0, len(in))
|
||||
|
||||
for _, w := range in {
|
||||
if !w.IsInitialism() {
|
||||
out = append(out, lower(w.GetOriginal()))
|
||||
if !isInitialism(upper(w)) {
|
||||
out = append(out, lower(w))
|
||||
} else {
|
||||
out = append(out, w.GetOriginal())
|
||||
out = append(out, w)
|
||||
}
|
||||
}
|
||||
|
||||
return strings.Join(out, " ")
|
||||
}
|
||||
|
||||
// ToHumanNameTitle represents a code name as a human series of words with the first letters titleized
|
||||
func ToHumanNameTitle(name string) string {
|
||||
in := newSplitter(withPostSplitInitialismCheck).split(name)
|
||||
|
||||
in := split(name)
|
||||
out := make([]string, 0, len(in))
|
||||
|
||||
for _, w := range in {
|
||||
original := w.GetOriginal()
|
||||
if !w.IsInitialism() {
|
||||
out = append(out, Camelize(original))
|
||||
uw := upper(w)
|
||||
if !isInitialism(uw) {
|
||||
out = append(out, Camelize(w))
|
||||
} else {
|
||||
out = append(out, original)
|
||||
out = append(out, w)
|
||||
}
|
||||
}
|
||||
return strings.Join(out, " ")
|
||||
|
@ -274,25 +319,24 @@ func ToVarName(name string) string {
|
|||
|
||||
// ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes
|
||||
func ToGoName(name string) string {
|
||||
lexems := newSplitter(withPostSplitInitialismCheck).split(name)
|
||||
in := split(name)
|
||||
out := make([]string, 0, len(in))
|
||||
|
||||
result := ""
|
||||
for _, lexem := range lexems {
|
||||
goName := lexem.GetUnsafeGoName()
|
||||
|
||||
// to support old behavior
|
||||
if lexem.IsInitialism() {
|
||||
goName = upper(goName)
|
||||
for _, w := range in {
|
||||
uw := upper(w)
|
||||
mod := int(math.Min(float64(len(uw)), 2))
|
||||
if !isInitialism(uw) && !isInitialism(uw[:len(uw)-mod]) {
|
||||
uw = Camelize(w)
|
||||
}
|
||||
result += goName
|
||||
out = append(out, uw)
|
||||
}
|
||||
|
||||
result := strings.Join(out, "")
|
||||
if len(result) > 0 {
|
||||
if !unicode.IsUpper([]rune(result)[0]) {
|
||||
result = "X" + result
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
407
vendor/github.com/google/btree/btree.go
generated
vendored
407
vendor/github.com/google/btree/btree.go
generated
vendored
|
@ -22,7 +22,7 @@
|
|||
// See some discussion on the matter here:
|
||||
// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html
|
||||
// Note, though, that this project is in no way related to the C++ B-Tree
|
||||
// implmentation written about there.
|
||||
// implementation written about there.
|
||||
//
|
||||
// Within this tree, each node contains a slice of items and a (possibly nil)
|
||||
// slice of children. For basic numeric values or raw structs, this can cause
|
||||
|
@ -44,7 +44,7 @@
|
|||
// widely used ordered tree implementation in the Go ecosystem currently.
|
||||
// Its functions, therefore, exactly mirror those of
|
||||
// llrb.LLRB where possible. Unlike gollrb, though, we currently don't
|
||||
// support storing multiple equivalent values or backwards iteration.
|
||||
// support storing multiple equivalent values.
|
||||
package btree
|
||||
|
||||
import (
|
||||
|
@ -52,6 +52,7 @@ import (
|
|||
"io"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Item represents a single object in the tree.
|
||||
|
@ -68,11 +69,17 @@ const (
|
|||
DefaultFreeListSize = 32
|
||||
)
|
||||
|
||||
var (
|
||||
nilItems = make(items, 16)
|
||||
nilChildren = make(children, 16)
|
||||
)
|
||||
|
||||
// FreeList represents a free list of btree nodes. By default each
|
||||
// BTree has its own FreeList, but multiple BTrees can share the same
|
||||
// FreeList.
|
||||
// Two Btrees using the same freelist are not safe for concurrent write access.
|
||||
// Two Btrees using the same freelist are safe for concurrent write access.
|
||||
type FreeList struct {
|
||||
mu sync.Mutex
|
||||
freelist []*node
|
||||
}
|
||||
|
||||
|
@ -83,18 +90,29 @@ func NewFreeList(size int) *FreeList {
|
|||
}
|
||||
|
||||
func (f *FreeList) newNode() (n *node) {
|
||||
f.mu.Lock()
|
||||
index := len(f.freelist) - 1
|
||||
if index < 0 {
|
||||
f.mu.Unlock()
|
||||
return new(node)
|
||||
}
|
||||
f.freelist, n = f.freelist[:index], f.freelist[index]
|
||||
n = f.freelist[index]
|
||||
f.freelist[index] = nil
|
||||
f.freelist = f.freelist[:index]
|
||||
f.mu.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (f *FreeList) freeNode(n *node) {
|
||||
// freeNode adds the given node to the list, returning true if it was added
|
||||
// and false if it was discarded.
|
||||
func (f *FreeList) freeNode(n *node) (out bool) {
|
||||
f.mu.Lock()
|
||||
if len(f.freelist) < cap(f.freelist) {
|
||||
f.freelist = append(f.freelist, n)
|
||||
out = true
|
||||
}
|
||||
f.mu.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
// ItemIterator allows callers of Ascend* to iterate in-order over portions of
|
||||
|
@ -116,8 +134,8 @@ func NewWithFreeList(degree int, f *FreeList) *BTree {
|
|||
panic("bad degree")
|
||||
}
|
||||
return &BTree{
|
||||
degree: degree,
|
||||
freelist: f,
|
||||
degree: degree,
|
||||
cow: ©OnWriteContext{freelist: f},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,8 +156,8 @@ func (s *items) insertAt(index int, item Item) {
|
|||
// back.
|
||||
func (s *items) removeAt(index int) Item {
|
||||
item := (*s)[index]
|
||||
(*s)[index] = nil
|
||||
copy((*s)[index:], (*s)[index+1:])
|
||||
(*s)[len(*s)-1] = nil
|
||||
*s = (*s)[:len(*s)-1]
|
||||
return item
|
||||
}
|
||||
|
@ -153,6 +171,16 @@ func (s *items) pop() (out Item) {
|
|||
return
|
||||
}
|
||||
|
||||
// truncate truncates this instance at index so that it contains only the
|
||||
// first index items. index must be less than or equal to length.
|
||||
func (s *items) truncate(index int) {
|
||||
var toClear items
|
||||
*s, toClear = (*s)[:index], (*s)[index:]
|
||||
for len(toClear) > 0 {
|
||||
toClear = toClear[copy(toClear, nilItems):]
|
||||
}
|
||||
}
|
||||
|
||||
// find returns the index where the given item should be inserted into this
|
||||
// list. 'found' is true if the item already exists in the list at the given
|
||||
// index.
|
||||
|
@ -183,8 +211,8 @@ func (s *children) insertAt(index int, n *node) {
|
|||
// back.
|
||||
func (s *children) removeAt(index int) *node {
|
||||
n := (*s)[index]
|
||||
(*s)[index] = nil
|
||||
copy((*s)[index:], (*s)[index+1:])
|
||||
(*s)[len(*s)-1] = nil
|
||||
*s = (*s)[:len(*s)-1]
|
||||
return n
|
||||
}
|
||||
|
@ -198,6 +226,16 @@ func (s *children) pop() (out *node) {
|
|||
return
|
||||
}
|
||||
|
||||
// truncate truncates this instance at index so that it contains only the
|
||||
// first index children. index must be less than or equal to length.
|
||||
func (s *children) truncate(index int) {
|
||||
var toClear children
|
||||
*s, toClear = (*s)[:index], (*s)[index:]
|
||||
for len(toClear) > 0 {
|
||||
toClear = toClear[copy(toClear, nilChildren):]
|
||||
}
|
||||
}
|
||||
|
||||
// node is an internal node in a tree.
|
||||
//
|
||||
// It must at all times maintain the invariant that either
|
||||
|
@ -206,7 +244,34 @@ func (s *children) pop() (out *node) {
|
|||
type node struct {
|
||||
items items
|
||||
children children
|
||||
t *BTree
|
||||
cow *copyOnWriteContext
|
||||
}
|
||||
|
||||
func (n *node) mutableFor(cow *copyOnWriteContext) *node {
|
||||
if n.cow == cow {
|
||||
return n
|
||||
}
|
||||
out := cow.newNode()
|
||||
if cap(out.items) >= len(n.items) {
|
||||
out.items = out.items[:len(n.items)]
|
||||
} else {
|
||||
out.items = make(items, len(n.items), cap(n.items))
|
||||
}
|
||||
copy(out.items, n.items)
|
||||
// Copy children
|
||||
if cap(out.children) >= len(n.children) {
|
||||
out.children = out.children[:len(n.children)]
|
||||
} else {
|
||||
out.children = make(children, len(n.children), cap(n.children))
|
||||
}
|
||||
copy(out.children, n.children)
|
||||
return out
|
||||
}
|
||||
|
||||
func (n *node) mutableChild(i int) *node {
|
||||
c := n.children[i].mutableFor(n.cow)
|
||||
n.children[i] = c
|
||||
return c
|
||||
}
|
||||
|
||||
// split splits the given node at the given index. The current node shrinks,
|
||||
|
@ -214,12 +279,12 @@ type node struct {
|
|||
// containing all items/children after it.
|
||||
func (n *node) split(i int) (Item, *node) {
|
||||
item := n.items[i]
|
||||
next := n.t.newNode()
|
||||
next := n.cow.newNode()
|
||||
next.items = append(next.items, n.items[i+1:]...)
|
||||
n.items = n.items[:i]
|
||||
n.items.truncate(i)
|
||||
if len(n.children) > 0 {
|
||||
next.children = append(next.children, n.children[i+1:]...)
|
||||
n.children = n.children[:i+1]
|
||||
n.children.truncate(i + 1)
|
||||
}
|
||||
return item, next
|
||||
}
|
||||
|
@ -230,7 +295,7 @@ func (n *node) maybeSplitChild(i, maxItems int) bool {
|
|||
if len(n.children[i].items) < maxItems {
|
||||
return false
|
||||
}
|
||||
first := n.children[i]
|
||||
first := n.mutableChild(i)
|
||||
item, second := first.split(maxItems / 2)
|
||||
n.items.insertAt(i, item)
|
||||
n.children.insertAt(i+1, second)
|
||||
|
@ -264,7 +329,7 @@ func (n *node) insert(item Item, maxItems int) Item {
|
|||
return out
|
||||
}
|
||||
}
|
||||
return n.children[i].insert(item, maxItems)
|
||||
return n.mutableChild(i).insert(item, maxItems)
|
||||
}
|
||||
|
||||
// get finds the given key in the subtree and returns it.
|
||||
|
@ -342,10 +407,10 @@ func (n *node) remove(item Item, minItems int, typ toRemove) Item {
|
|||
panic("invalid type")
|
||||
}
|
||||
// If we get to here, we have children.
|
||||
child := n.children[i]
|
||||
if len(child.items) <= minItems {
|
||||
if len(n.children[i].items) <= minItems {
|
||||
return n.growChildAndRemove(i, item, minItems, typ)
|
||||
}
|
||||
child := n.mutableChild(i)
|
||||
// Either we had enough items to begin with, or we've done some
|
||||
// merging/stealing, because we've got enough now and we're ready to return
|
||||
// stuff.
|
||||
|
@ -384,10 +449,10 @@ func (n *node) remove(item Item, minItems int, typ toRemove) Item {
|
|||
// whether we're in case 1 or 2), we'll have enough items and can guarantee
|
||||
// that we hit case A.
|
||||
func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove) Item {
|
||||
child := n.children[i]
|
||||
if i > 0 && len(n.children[i-1].items) > minItems {
|
||||
// Steal from left child
|
||||
stealFrom := n.children[i-1]
|
||||
child := n.mutableChild(i)
|
||||
stealFrom := n.mutableChild(i - 1)
|
||||
stolenItem := stealFrom.items.pop()
|
||||
child.items.insertAt(0, n.items[i-1])
|
||||
n.items[i-1] = stolenItem
|
||||
|
@ -396,7 +461,8 @@ func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove)
|
|||
}
|
||||
} else if i < len(n.items) && len(n.children[i+1].items) > minItems {
|
||||
// steal from right child
|
||||
stealFrom := n.children[i+1]
|
||||
child := n.mutableChild(i)
|
||||
stealFrom := n.mutableChild(i + 1)
|
||||
stolenItem := stealFrom.items.removeAt(0)
|
||||
child.items = append(child.items, n.items[i])
|
||||
n.items[i] = stolenItem
|
||||
|
@ -406,47 +472,99 @@ func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove)
|
|||
} else {
|
||||
if i >= len(n.items) {
|
||||
i--
|
||||
child = n.children[i]
|
||||
}
|
||||
child := n.mutableChild(i)
|
||||
// merge with right child
|
||||
mergeItem := n.items.removeAt(i)
|
||||
mergeChild := n.children.removeAt(i + 1)
|
||||
child.items = append(child.items, mergeItem)
|
||||
child.items = append(child.items, mergeChild.items...)
|
||||
child.children = append(child.children, mergeChild.children...)
|
||||
n.t.freeNode(mergeChild)
|
||||
n.cow.freeNode(mergeChild)
|
||||
}
|
||||
return n.remove(item, minItems, typ)
|
||||
}
|
||||
|
||||
type direction int
|
||||
|
||||
const (
|
||||
descend = direction(-1)
|
||||
ascend = direction(+1)
|
||||
)
|
||||
|
||||
// iterate provides a simple method for iterating over elements in the tree.
|
||||
// It could probably use some work to be extra-efficient (it calls from() a
|
||||
// little more than it should), but it works pretty well for now.
|
||||
//
|
||||
// It requires that 'from' and 'to' both return true for values we should hit
|
||||
// with the iterator. It should also be the case that 'from' returns true for
|
||||
// values less than or equal to values 'to' returns true for, and 'to'
|
||||
// returns true for values greater than or equal to those that 'from'
|
||||
// does.
|
||||
func (n *node) iterate(from, to func(Item) bool, iter ItemIterator) bool {
|
||||
for i, item := range n.items {
|
||||
if !from(item) {
|
||||
continue
|
||||
// When ascending, the 'start' should be less than 'stop' and when descending,
|
||||
// the 'start' should be greater than 'stop'. Setting 'includeStart' to true
|
||||
// will force the iterator to include the first item when it equals 'start',
|
||||
// thus creating a "greaterOrEqual" or "lessThanEqual" rather than just a
|
||||
// "greaterThan" or "lessThan" queries.
|
||||
func (n *node) iterate(dir direction, start, stop Item, includeStart bool, hit bool, iter ItemIterator) (bool, bool) {
|
||||
var ok, found bool
|
||||
var index int
|
||||
switch dir {
|
||||
case ascend:
|
||||
if start != nil {
|
||||
index, _ = n.items.find(start)
|
||||
}
|
||||
if len(n.children) > 0 && !n.children[i].iterate(from, to, iter) {
|
||||
return false
|
||||
for i := index; i < len(n.items); i++ {
|
||||
if len(n.children) > 0 {
|
||||
if hit, ok = n.children[i].iterate(dir, start, stop, includeStart, hit, iter); !ok {
|
||||
return hit, false
|
||||
}
|
||||
}
|
||||
if !includeStart && !hit && start != nil && !start.Less(n.items[i]) {
|
||||
hit = true
|
||||
continue
|
||||
}
|
||||
hit = true
|
||||
if stop != nil && !n.items[i].Less(stop) {
|
||||
return hit, false
|
||||
}
|
||||
if !iter(n.items[i]) {
|
||||
return hit, false
|
||||
}
|
||||
}
|
||||
if !to(item) {
|
||||
return false
|
||||
if len(n.children) > 0 {
|
||||
if hit, ok = n.children[len(n.children)-1].iterate(dir, start, stop, includeStart, hit, iter); !ok {
|
||||
return hit, false
|
||||
}
|
||||
}
|
||||
if !iter(item) {
|
||||
return false
|
||||
case descend:
|
||||
if start != nil {
|
||||
index, found = n.items.find(start)
|
||||
if !found {
|
||||
index = index - 1
|
||||
}
|
||||
} else {
|
||||
index = len(n.items) - 1
|
||||
}
|
||||
for i := index; i >= 0; i-- {
|
||||
if start != nil && !n.items[i].Less(start) {
|
||||
if !includeStart || hit || start.Less(n.items[i]) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if len(n.children) > 0 {
|
||||
if hit, ok = n.children[i+1].iterate(dir, start, stop, includeStart, hit, iter); !ok {
|
||||
return hit, false
|
||||
}
|
||||
}
|
||||
if stop != nil && !stop.Less(n.items[i]) {
|
||||
return hit, false // continue
|
||||
}
|
||||
hit = true
|
||||
if !iter(n.items[i]) {
|
||||
return hit, false
|
||||
}
|
||||
}
|
||||
if len(n.children) > 0 {
|
||||
if hit, ok = n.children[0].iterate(dir, start, stop, includeStart, hit, iter); !ok {
|
||||
return hit, false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(n.children) > 0 {
|
||||
return n.children[len(n.children)-1].iterate(from, to, iter)
|
||||
}
|
||||
return true
|
||||
return hit, true
|
||||
}
|
||||
|
||||
// Used for testing/debugging purposes.
|
||||
|
@ -465,12 +583,54 @@ func (n *node) print(w io.Writer, level int) {
|
|||
// Write operations are not safe for concurrent mutation by multiple
|
||||
// goroutines, but Read operations are.
|
||||
type BTree struct {
|
||||
degree int
|
||||
length int
|
||||
root *node
|
||||
degree int
|
||||
length int
|
||||
root *node
|
||||
cow *copyOnWriteContext
|
||||
}
|
||||
|
||||
// copyOnWriteContext pointers determine node ownership... a tree with a write
|
||||
// context equivalent to a node's write context is allowed to modify that node.
|
||||
// A tree whose write context does not match a node's is not allowed to modify
|
||||
// it, and must create a new, writable copy (IE: it's a Clone).
|
||||
//
|
||||
// When doing any write operation, we maintain the invariant that the current
|
||||
// node's context is equal to the context of the tree that requested the write.
|
||||
// We do this by, before we descend into any node, creating a copy with the
|
||||
// correct context if the contexts don't match.
|
||||
//
|
||||
// Since the node we're currently visiting on any write has the requesting
|
||||
// tree's context, that node is modifiable in place. Children of that node may
|
||||
// not share context, but before we descend into them, we'll make a mutable
|
||||
// copy.
|
||||
type copyOnWriteContext struct {
|
||||
freelist *FreeList
|
||||
}
|
||||
|
||||
// Clone clones the btree, lazily. Clone should not be called concurrently,
|
||||
// but the original tree (t) and the new tree (t2) can be used concurrently
|
||||
// once the Clone call completes.
|
||||
//
|
||||
// The internal tree structure of b is marked read-only and shared between t and
|
||||
// t2. Writes to both t and t2 use copy-on-write logic, creating new nodes
|
||||
// whenever one of b's original nodes would have been modified. Read operations
|
||||
// should have no performance degredation. Write operations for both t and t2
|
||||
// will initially experience minor slow-downs caused by additional allocs and
|
||||
// copies due to the aforementioned copy-on-write logic, but should converge to
|
||||
// the original performance characteristics of the original tree.
|
||||
func (t *BTree) Clone() (t2 *BTree) {
|
||||
// Create two entirely new copy-on-write contexts.
|
||||
// This operation effectively creates three trees:
|
||||
// the original, shared nodes (old b.cow)
|
||||
// the new b.cow nodes
|
||||
// the new out.cow nodes
|
||||
cow1, cow2 := *t.cow, *t.cow
|
||||
out := *t
|
||||
t.cow = &cow1
|
||||
out.cow = &cow2
|
||||
return &out
|
||||
}
|
||||
|
||||
// maxItems returns the max number of items to allow per node.
|
||||
func (t *BTree) maxItems() int {
|
||||
return t.degree*2 - 1
|
||||
|
@ -482,23 +642,37 @@ func (t *BTree) minItems() int {
|
|||
return t.degree - 1
|
||||
}
|
||||
|
||||
func (t *BTree) newNode() (n *node) {
|
||||
n = t.freelist.newNode()
|
||||
n.t = t
|
||||
func (c *copyOnWriteContext) newNode() (n *node) {
|
||||
n = c.freelist.newNode()
|
||||
n.cow = c
|
||||
return
|
||||
}
|
||||
|
||||
func (t *BTree) freeNode(n *node) {
|
||||
for i := range n.items {
|
||||
n.items[i] = nil // clear to allow GC
|
||||
type freeType int
|
||||
|
||||
const (
|
||||
ftFreelistFull freeType = iota // node was freed (available for GC, not stored in freelist)
|
||||
ftStored // node was stored in the freelist for later use
|
||||
ftNotOwned // node was ignored by COW, since it's owned by another one
|
||||
)
|
||||
|
||||
// freeNode frees a node within a given COW context, if it's owned by that
|
||||
// context. It returns what happened to the node (see freeType const
|
||||
// documentation).
|
||||
func (c *copyOnWriteContext) freeNode(n *node) freeType {
|
||||
if n.cow == c {
|
||||
// clear to allow GC
|
||||
n.items.truncate(0)
|
||||
n.children.truncate(0)
|
||||
n.cow = nil
|
||||
if c.freelist.freeNode(n) {
|
||||
return ftStored
|
||||
} else {
|
||||
return ftFreelistFull
|
||||
}
|
||||
} else {
|
||||
return ftNotOwned
|
||||
}
|
||||
n.items = n.items[:0]
|
||||
for i := range n.children {
|
||||
n.children[i] = nil // clear to allow GC
|
||||
}
|
||||
n.children = n.children[:0]
|
||||
n.t = nil // clear to allow GC
|
||||
t.freelist.freeNode(n)
|
||||
}
|
||||
|
||||
// ReplaceOrInsert adds the given item to the tree. If an item in the tree
|
||||
|
@ -511,16 +685,19 @@ func (t *BTree) ReplaceOrInsert(item Item) Item {
|
|||
panic("nil item being added to BTree")
|
||||
}
|
||||
if t.root == nil {
|
||||
t.root = t.newNode()
|
||||
t.root = t.cow.newNode()
|
||||
t.root.items = append(t.root.items, item)
|
||||
t.length++
|
||||
return nil
|
||||
} else if len(t.root.items) >= t.maxItems() {
|
||||
item2, second := t.root.split(t.maxItems() / 2)
|
||||
oldroot := t.root
|
||||
t.root = t.newNode()
|
||||
t.root.items = append(t.root.items, item2)
|
||||
t.root.children = append(t.root.children, oldroot, second)
|
||||
} else {
|
||||
t.root = t.root.mutableFor(t.cow)
|
||||
if len(t.root.items) >= t.maxItems() {
|
||||
item2, second := t.root.split(t.maxItems() / 2)
|
||||
oldroot := t.root
|
||||
t.root = t.cow.newNode()
|
||||
t.root.items = append(t.root.items, item2)
|
||||
t.root.children = append(t.root.children, oldroot, second)
|
||||
}
|
||||
}
|
||||
out := t.root.insert(item, t.maxItems())
|
||||
if out == nil {
|
||||
|
@ -551,11 +728,12 @@ func (t *BTree) deleteItem(item Item, typ toRemove) Item {
|
|||
if t.root == nil || len(t.root.items) == 0 {
|
||||
return nil
|
||||
}
|
||||
t.root = t.root.mutableFor(t.cow)
|
||||
out := t.root.remove(item, t.minItems(), typ)
|
||||
if len(t.root.items) == 0 && len(t.root.children) > 0 {
|
||||
oldroot := t.root
|
||||
t.root = t.root.children[0]
|
||||
t.freeNode(oldroot)
|
||||
t.cow.freeNode(oldroot)
|
||||
}
|
||||
if out != nil {
|
||||
t.length--
|
||||
|
@ -569,10 +747,7 @@ func (t *BTree) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator
|
|||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(
|
||||
func(a Item) bool { return !a.Less(greaterOrEqual) },
|
||||
func(a Item) bool { return a.Less(lessThan) },
|
||||
iterator)
|
||||
t.root.iterate(ascend, greaterOrEqual, lessThan, true, false, iterator)
|
||||
}
|
||||
|
||||
// AscendLessThan calls the iterator for every value in the tree within the range
|
||||
|
@ -581,10 +756,7 @@ func (t *BTree) AscendLessThan(pivot Item, iterator ItemIterator) {
|
|||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(
|
||||
func(a Item) bool { return true },
|
||||
func(a Item) bool { return a.Less(pivot) },
|
||||
iterator)
|
||||
t.root.iterate(ascend, nil, pivot, false, false, iterator)
|
||||
}
|
||||
|
||||
// AscendGreaterOrEqual calls the iterator for every value in the tree within
|
||||
|
@ -593,10 +765,7 @@ func (t *BTree) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) {
|
|||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(
|
||||
func(a Item) bool { return !a.Less(pivot) },
|
||||
func(a Item) bool { return true },
|
||||
iterator)
|
||||
t.root.iterate(ascend, pivot, nil, true, false, iterator)
|
||||
}
|
||||
|
||||
// Ascend calls the iterator for every value in the tree within the range
|
||||
|
@ -605,10 +774,43 @@ func (t *BTree) Ascend(iterator ItemIterator) {
|
|||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(
|
||||
func(a Item) bool { return true },
|
||||
func(a Item) bool { return true },
|
||||
iterator)
|
||||
t.root.iterate(ascend, nil, nil, false, false, iterator)
|
||||
}
|
||||
|
||||
// DescendRange calls the iterator for every value in the tree within the range
|
||||
// [lessOrEqual, greaterThan), until iterator returns false.
|
||||
func (t *BTree) DescendRange(lessOrEqual, greaterThan Item, iterator ItemIterator) {
|
||||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(descend, lessOrEqual, greaterThan, true, false, iterator)
|
||||
}
|
||||
|
||||
// DescendLessOrEqual calls the iterator for every value in the tree within the range
|
||||
// [pivot, first], until iterator returns false.
|
||||
func (t *BTree) DescendLessOrEqual(pivot Item, iterator ItemIterator) {
|
||||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(descend, pivot, nil, true, false, iterator)
|
||||
}
|
||||
|
||||
// DescendGreaterThan calls the iterator for every value in the tree within
|
||||
// the range (pivot, last], until iterator returns false.
|
||||
func (t *BTree) DescendGreaterThan(pivot Item, iterator ItemIterator) {
|
||||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(descend, nil, pivot, false, false, iterator)
|
||||
}
|
||||
|
||||
// Descend calls the iterator for every value in the tree within the range
|
||||
// [last, first], until iterator returns false.
|
||||
func (t *BTree) Descend(iterator ItemIterator) {
|
||||
if t.root == nil {
|
||||
return
|
||||
}
|
||||
t.root.iterate(descend, nil, nil, false, false, iterator)
|
||||
}
|
||||
|
||||
// Get looks for the key item in the tree, returning it. It returns nil if
|
||||
|
@ -640,6 +842,45 @@ func (t *BTree) Len() int {
|
|||
return t.length
|
||||
}
|
||||
|
||||
// Clear removes all items from the btree. If addNodesToFreelist is true,
|
||||
// t's nodes are added to its freelist as part of this call, until the freelist
|
||||
// is full. Otherwise, the root node is simply dereferenced and the subtree
|
||||
// left to Go's normal GC processes.
|
||||
//
|
||||
// This can be much faster
|
||||
// than calling Delete on all elements, because that requires finding/removing
|
||||
// each element in the tree and updating the tree accordingly. It also is
|
||||
// somewhat faster than creating a new tree to replace the old one, because
|
||||
// nodes from the old tree are reclaimed into the freelist for use by the new
|
||||
// one, instead of being lost to the garbage collector.
|
||||
//
|
||||
// This call takes:
|
||||
// O(1): when addNodesToFreelist is false, this is a single operation.
|
||||
// O(1): when the freelist is already full, it breaks out immediately
|
||||
// O(freelist size): when the freelist is empty and the nodes are all owned
|
||||
// by this tree, nodes are added to the freelist until full.
|
||||
// O(tree size): when all nodes are owned by another tree, all nodes are
|
||||
// iterated over looking for nodes to add to the freelist, and due to
|
||||
// ownership, none are.
|
||||
func (t *BTree) Clear(addNodesToFreelist bool) {
|
||||
if t.root != nil && addNodesToFreelist {
|
||||
t.root.reset(t.cow)
|
||||
}
|
||||
t.root, t.length = nil, 0
|
||||
}
|
||||
|
||||
// reset returns a subtree to the freelist. It breaks out immediately if the
|
||||
// freelist is full, since the only benefit of iterating is to fill that
|
||||
// freelist up. Returns true if parent reset call should continue.
|
||||
func (n *node) reset(c *copyOnWriteContext) bool {
|
||||
for _, child := range n.children {
|
||||
if !child.reset(c) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return c.freeNode(n) != ftFreelistFull
|
||||
}
|
||||
|
||||
// Int implements the Item interface for integers.
|
||||
type Int int
|
||||
|
||||
|
|
14
vendor/github.com/gophercloud/gophercloud/.travis.yml
generated
vendored
14
vendor/github.com/gophercloud/gophercloud/.travis.yml
generated
vendored
|
@ -1,25 +1,21 @@
|
|||
language: go
|
||||
sudo: false
|
||||
install:
|
||||
- GO111MODULE=off go get golang.org/x/crypto/ssh
|
||||
- GO111MODULE=off go get -v -tags 'fixtures acceptance' ./...
|
||||
- GO111MODULE=off go get github.com/wadey/gocovmerge
|
||||
- GO111MODULE=off go get github.com/mattn/goveralls
|
||||
- GO111MODULE=off go get golang.org/x/tools/cmd/goimports
|
||||
- go get golang.org/x/crypto/ssh
|
||||
- go get -v -tags 'fixtures acceptance' ./...
|
||||
- go get github.com/wadey/gocovmerge
|
||||
- go get github.com/mattn/goveralls
|
||||
- go get golang.org/x/tools/cmd/goimports
|
||||
go:
|
||||
- "1.10"
|
||||
- "1.11"
|
||||
- "1.12"
|
||||
- "tip"
|
||||
env:
|
||||
global:
|
||||
- secure: "xSQsAG5wlL9emjbCdxzz/hYQsSpJ/bABO1kkbwMSISVcJ3Nk0u4ywF+LS4bgeOnwPfmFvNTOqVDu3RwEvMeWXSI76t1piCPcObutb2faKLVD/hLoAS76gYX+Z8yGWGHrSB7Do5vTPj1ERe2UljdrnsSeOXzoDwFxYRaZLX4bBOB4AyoGvRniil5QXPATiA1tsWX1VMicj8a4F8X+xeESzjt1Q5Iy31e7vkptu71bhvXCaoo5QhYwT+pLR9dN0S1b7Ro0KVvkRefmr1lUOSYd2e74h6Lc34tC1h3uYZCS4h47t7v5cOXvMNxinEj2C51RvbjvZI1RLVdkuAEJD1Iz4+Ote46nXbZ//6XRZMZz/YxQ13l7ux1PFjgEB6HAapmF5Xd8PRsgeTU9LRJxpiTJ3P5QJ3leS1va8qnziM5kYipj/Rn+V8g2ad/rgkRox9LSiR9VYZD2Pe45YCb1mTKSl2aIJnV7nkOqsShY5LNB4JZSg7xIffA+9YVDktw8dJlATjZqt7WvJJ49g6A61mIUV4C15q2JPGKTkZzDiG81NtmS7hFa7k0yaE2ELgYocbcuyUcAahhxntYTC0i23nJmEHVNiZmBO3u7EgpWe4KGVfumU+lt12tIn5b3dZRBBUk3QakKKozSK1QPHGpk/AZGrhu7H6l8to6IICKWtDcyMPQ="
|
||||
- GO111MODULE=on
|
||||
before_script:
|
||||
- go vet ./...
|
||||
script:
|
||||
- ./script/coverage
|
||||
- ./script/unittest
|
||||
- ./script/format
|
||||
after_success:
|
||||
- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=cover.out
|
||||
|
|
28
vendor/github.com/gophercloud/gophercloud/.zuul.yaml
generated
vendored
28
vendor/github.com/gophercloud/gophercloud/.zuul.yaml
generated
vendored
|
@ -14,20 +14,13 @@
|
|||
run: .zuul/playbooks/gophercloud-acceptance-test/run.yaml
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-ironic
|
||||
parent: golang-test
|
||||
description: |
|
||||
Run gophercloud ironic acceptance test on master branch
|
||||
run: .zuul/playbooks/gophercloud-acceptance-test-ironic/run.yaml
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-stein
|
||||
name: gophercloud-acceptance-test-queens
|
||||
parent: gophercloud-acceptance-test
|
||||
description: |
|
||||
Run gophercloud acceptance test on stein branch
|
||||
Run gophercloud acceptance test on queens branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/stein
|
||||
OS_BRANCH: stable/queens
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-rocky
|
||||
|
@ -38,15 +31,6 @@
|
|||
global_env:
|
||||
OS_BRANCH: stable/rocky
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-queens
|
||||
parent: gophercloud-acceptance-test
|
||||
description: |
|
||||
Run gophercloud acceptance test on queens branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/queens
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-pike
|
||||
parent: gophercloud-acceptance-test
|
||||
|
@ -90,7 +74,6 @@
|
|||
jobs:
|
||||
- gophercloud-unittest
|
||||
- gophercloud-acceptance-test
|
||||
- gophercloud-acceptance-test-ironic
|
||||
recheck-mitaka:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-mitaka
|
||||
|
@ -109,6 +92,7 @@
|
|||
recheck-rocky:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-rocky
|
||||
recheck-stein:
|
||||
periodic:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-stein
|
||||
- gophercloud-unittest
|
||||
- gophercloud-acceptance-test
|
||||
|
|
52
vendor/github.com/gophercloud/gophercloud/auth_result.go
generated
vendored
52
vendor/github.com/gophercloud/gophercloud/auth_result.go
generated
vendored
|
@ -1,52 +0,0 @@
|
|||
package gophercloud
|
||||
|
||||
/*
|
||||
AuthResult is the result from the request that was used to obtain a provider
|
||||
client's Keystone token. It is returned from ProviderClient.GetAuthResult().
|
||||
|
||||
The following types satisfy this interface:
|
||||
|
||||
github.com/gophercloud/gophercloud/openstack/identity/v2/tokens.CreateResult
|
||||
github.com/gophercloud/gophercloud/openstack/identity/v3/tokens.CreateResult
|
||||
|
||||
Usage example:
|
||||
|
||||
import (
|
||||
"github.com/gophercloud/gophercloud"
|
||||
tokens2 "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens"
|
||||
tokens3 "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens"
|
||||
)
|
||||
|
||||
func GetAuthenticatedUserID(providerClient *gophercloud.ProviderClient) (string, error) {
|
||||
r := providerClient.GetAuthResult()
|
||||
if r == nil {
|
||||
//ProviderClient did not use openstack.Authenticate(), e.g. because token
|
||||
//was set manually with ProviderClient.SetToken()
|
||||
return "", errors.New("no AuthResult available")
|
||||
}
|
||||
switch r := r.(type) {
|
||||
case tokens2.CreateResult:
|
||||
u, err := r.ExtractUser()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return u.ID, nil
|
||||
case tokens3.CreateResult:
|
||||
u, err := r.ExtractUser()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return u.ID, nil
|
||||
default:
|
||||
panic(fmt.Sprintf("got unexpected AuthResult type %t", r))
|
||||
}
|
||||
}
|
||||
|
||||
Both implementing types share a lot of methods by name, like ExtractUser() in
|
||||
this example. But those methods cannot be part of the AuthResult interface
|
||||
because the return types are different (in this case, type tokens2.User vs.
|
||||
type tokens3.User).
|
||||
*/
|
||||
type AuthResult interface {
|
||||
ExtractTokenID() (string, error)
|
||||
}
|
63
vendor/github.com/gophercloud/gophercloud/doc.go
generated
vendored
63
vendor/github.com/gophercloud/gophercloud/doc.go
generated
vendored
|
@ -9,37 +9,20 @@ Provider structs represent the cloud providers that offer and manage a
|
|||
collection of services. You will generally want to create one Provider
|
||||
client per OpenStack cloud.
|
||||
|
||||
It is now recommended to use the `clientconfig` package found at
|
||||
https://github.com/gophercloud/utils/tree/master/openstack/clientconfig
|
||||
for all authentication purposes.
|
||||
|
||||
The below documentation is still relevant. clientconfig simply implements
|
||||
the below and presents it in an easier and more flexible way.
|
||||
|
||||
Use your OpenStack credentials to create a Provider client. The
|
||||
IdentityEndpoint is typically refered to as "auth_url" or "OS_AUTH_URL" in
|
||||
information provided by the cloud operator. Additionally, the cloud may refer to
|
||||
TenantID or TenantName as project_id and project_name. Credentials are
|
||||
specified like so:
|
||||
|
||||
opts := gophercloud.AuthOptions{
|
||||
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||
Username: "{username}",
|
||||
Password: "{password}",
|
||||
TenantID: "{tenant_id}",
|
||||
}
|
||||
opts := gophercloud.AuthOptions{
|
||||
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||
Username: "{username}",
|
||||
Password: "{password}",
|
||||
TenantID: "{tenant_id}",
|
||||
}
|
||||
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
|
||||
You can authenticate with a token by doing:
|
||||
|
||||
opts := gophercloud.AuthOptions{
|
||||
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||
TokenID: "{token_id}",
|
||||
TenantID: "{tenant_id}",
|
||||
}
|
||||
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
|
||||
You may also use the openstack.AuthOptionsFromEnv() helper function. This
|
||||
function reads in standard environment variables frequently found in an
|
||||
|
@ -56,16 +39,16 @@ operations for a particular OpenStack service. Examples of services include:
|
|||
Compute, Object Storage, Block Storage. In order to define one, you need to
|
||||
pass in the parent provider, like so:
|
||||
|
||||
opts := gophercloud.EndpointOpts{Region: "RegionOne"}
|
||||
opts := gophercloud.EndpointOpts{Region: "RegionOne"}
|
||||
|
||||
client, err := openstack.NewComputeV2(provider, opts)
|
||||
client, err := openstack.NewComputeV2(provider, opts)
|
||||
|
||||
Resources
|
||||
|
||||
Resource structs are the domain models that services make use of in order
|
||||
to work with and represent the state of API resources:
|
||||
|
||||
server, err := servers.Get(client, "{serverId}").Extract()
|
||||
server, err := servers.Get(client, "{serverId}").Extract()
|
||||
|
||||
Intermediate Result structs are returned for API operations, which allow
|
||||
generic access to the HTTP headers, response body, and any errors associated
|
||||
|
@ -73,11 +56,11 @@ with the network transaction. To turn a result into a usable resource struct,
|
|||
you must call the Extract method which is chained to the response, or an
|
||||
Extract function from an applicable extension:
|
||||
|
||||
result := servers.Get(client, "{serverId}")
|
||||
result := servers.Get(client, "{serverId}")
|
||||
|
||||
// Attempt to extract the disk configuration from the OS-DCF disk config
|
||||
// extension:
|
||||
config, err := diskconfig.ExtractGet(result)
|
||||
// Attempt to extract the disk configuration from the OS-DCF disk config
|
||||
// extension:
|
||||
config, err := diskconfig.ExtractGet(result)
|
||||
|
||||
All requests that enumerate a collection return a Pager struct that is used to
|
||||
iterate through the results one page at a time. Use the EachPage method on that
|
||||
|
@ -85,17 +68,17 @@ Pager to handle each successive Page in a closure, then use the appropriate
|
|||
extraction method from that request's package to interpret that Page as a slice
|
||||
of results:
|
||||
|
||||
err := servers.List(client, nil).EachPage(func (page pagination.Page) (bool, error) {
|
||||
s, err := servers.ExtractServers(page)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
err := servers.List(client, nil).EachPage(func (page pagination.Page) (bool, error) {
|
||||
s, err := servers.ExtractServers(page)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
// Handle the []servers.Server slice.
|
||||
// Handle the []servers.Server slice.
|
||||
|
||||
// Return "false" or an error to prematurely stop fetching new pages.
|
||||
return true, nil
|
||||
})
|
||||
// Return "false" or an error to prematurely stop fetching new pages.
|
||||
return true, nil
|
||||
})
|
||||
|
||||
If you want to obtain the entire collection of pages without doing any
|
||||
intermediary processing on each page, you can use the AllPages method:
|
||||
|
|
11
vendor/github.com/gophercloud/gophercloud/errors.go
generated
vendored
11
vendor/github.com/gophercloud/gophercloud/errors.go
generated
vendored
|
@ -122,11 +122,6 @@ type ErrDefault408 struct {
|
|||
ErrUnexpectedResponseCode
|
||||
}
|
||||
|
||||
// ErrDefault409 is the default error type returned on a 409 HTTP response code.
|
||||
type ErrDefault409 struct {
|
||||
ErrUnexpectedResponseCode
|
||||
}
|
||||
|
||||
// ErrDefault429 is the default error type returned on a 429 HTTP response code.
|
||||
type ErrDefault429 struct {
|
||||
ErrUnexpectedResponseCode
|
||||
|
@ -216,12 +211,6 @@ type Err408er interface {
|
|||
Error408(ErrUnexpectedResponseCode) error
|
||||
}
|
||||
|
||||
// Err409er is the interface resource error types implement to override the error message
|
||||
// from a 409 error.
|
||||
type Err409er interface {
|
||||
Error409(ErrUnexpectedResponseCode) error
|
||||
}
|
||||
|
||||
// Err429er is the interface resource error types implement to override the error message
|
||||
// from a 429 error.
|
||||
type Err429er interface {
|
||||
|
|
7
vendor/github.com/gophercloud/gophercloud/go.mod
generated
vendored
7
vendor/github.com/gophercloud/gophercloud/go.mod
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
module github.com/gophercloud/gophercloud
|
||||
|
||||
require (
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.2
|
||||
)
|
8
vendor/github.com/gophercloud/gophercloud/go.sum
generated
vendored
8
vendor/github.com/gophercloud/gophercloud/go.sum
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 h1:ng3VDlRp5/DHpSWl02R4rM9I+8M2rhmsuLwAMmkLQWE=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503 h1:5SvYFrOM3W8Mexn9/oA44Ji7vhXAZQ9hiP+1Q/DMrWg=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
23
vendor/github.com/gophercloud/gophercloud/openstack/auth_env.go
generated
vendored
23
vendor/github.com/gophercloud/gophercloud/openstack/auth_env.go
generated
vendored
|
@ -13,19 +13,15 @@ AuthOptionsFromEnv fills out an identity.AuthOptions structure with the
|
|||
settings found on the various OpenStack OS_* environment variables.
|
||||
|
||||
The following variables provide sources of truth: OS_AUTH_URL, OS_USERNAME,
|
||||
OS_PASSWORD and OS_PROJECT_ID.
|
||||
OS_PASSWORD, OS_TENANT_ID, and OS_TENANT_NAME.
|
||||
|
||||
Of these, OS_USERNAME, OS_PASSWORD, and OS_AUTH_URL must have settings,
|
||||
or an error will result. OS_PROJECT_ID, is optional.
|
||||
or an error will result. OS_TENANT_ID, OS_TENANT_NAME, OS_PROJECT_ID, and
|
||||
OS_PROJECT_NAME are optional.
|
||||
|
||||
OS_TENANT_ID and OS_TENANT_NAME are deprecated forms of OS_PROJECT_ID and
|
||||
OS_PROJECT_NAME and the latter are expected against a v3 auth api.
|
||||
|
||||
If OS_PROJECT_ID and OS_PROJECT_NAME are set, they will still be referred
|
||||
as "tenant" in Gophercloud.
|
||||
|
||||
If OS_PROJECT_NAME is set, it requires OS_PROJECT_ID to be set as well to
|
||||
handle projects not on the default domain.
|
||||
OS_TENANT_ID and OS_TENANT_NAME are mutually exclusive to OS_PROJECT_ID and
|
||||
OS_PROJECT_NAME. If OS_PROJECT_ID and OS_PROJECT_NAME are set, they will
|
||||
still be referred as "tenant" in Gophercloud.
|
||||
|
||||
To use this function, first set the OS_* environment variables (for example,
|
||||
by sourcing an `openrc` file), then:
|
||||
|
@ -87,13 +83,6 @@ func AuthOptionsFromEnv() (gophercloud.AuthOptions, error) {
|
|||
return nilOptions, err
|
||||
}
|
||||
|
||||
if domainID == "" && domainName == "" && tenantID == "" && tenantName != "" {
|
||||
err := gophercloud.ErrMissingEnvironmentVariable{
|
||||
EnvironmentVariable: "OS_PROJECT_ID",
|
||||
}
|
||||
return nilOptions, err
|
||||
}
|
||||
|
||||
if applicationCredentialID == "" && applicationCredentialName != "" && applicationCredentialSecret != "" {
|
||||
if userID == "" && username == "" {
|
||||
return nilOptions, gophercloud.ErrMissingAnyoneOfEnvironmentVariables{
|
||||
|
|
31
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
31
vendor/github.com/gophercloud/gophercloud/openstack/client.go
generated
vendored
|
@ -135,7 +135,7 @@ func v2auth(client *gophercloud.ProviderClient, endpoint string, options gopherc
|
|||
|
||||
result := tokens2.Create(v2Client, v2Opts)
|
||||
|
||||
err = client.SetTokenAndAuthResult(result)
|
||||
token, err := result.ExtractToken()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -150,9 +150,9 @@ func v2auth(client *gophercloud.ProviderClient, endpoint string, options gopherc
|
|||
// with the token and reauth func zeroed out. combined with setting `AllowReauth` to `false`,
|
||||
// this should retry authentication only once
|
||||
tac := *client
|
||||
tac.SetThrowaway(true)
|
||||
tac.IsThrowaway = true
|
||||
tac.ReauthFunc = nil
|
||||
tac.SetTokenAndAuthResult(nil)
|
||||
tac.TokenID = ""
|
||||
tao := options
|
||||
tao.AllowReauth = false
|
||||
client.ReauthFunc = func() error {
|
||||
|
@ -160,10 +160,11 @@ func v2auth(client *gophercloud.ProviderClient, endpoint string, options gopherc
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
client.CopyTokenFrom(&tac)
|
||||
client.TokenID = tac.TokenID
|
||||
return nil
|
||||
}
|
||||
}
|
||||
client.TokenID = token.ID
|
||||
client.EndpointLocator = func(opts gophercloud.EndpointOpts) (string, error) {
|
||||
return V2EndpointURL(catalog, opts)
|
||||
}
|
||||
|
@ -189,7 +190,7 @@ func v3auth(client *gophercloud.ProviderClient, endpoint string, opts tokens3.Au
|
|||
|
||||
result := tokens3.Create(v3Client, opts)
|
||||
|
||||
err = client.SetTokenAndAuthResult(result)
|
||||
token, err := result.ExtractToken()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -199,14 +200,16 @@ func v3auth(client *gophercloud.ProviderClient, endpoint string, opts tokens3.Au
|
|||
return err
|
||||
}
|
||||
|
||||
client.TokenID = token.ID
|
||||
|
||||
if opts.CanReauth() {
|
||||
// here we're creating a throw-away client (tac). it's a copy of the user's provider client, but
|
||||
// with the token and reauth func zeroed out. combined with setting `AllowReauth` to `false`,
|
||||
// this should retry authentication only once
|
||||
tac := *client
|
||||
tac.SetThrowaway(true)
|
||||
tac.IsThrowaway = true
|
||||
tac.ReauthFunc = nil
|
||||
tac.SetTokenAndAuthResult(nil)
|
||||
tac.TokenID = ""
|
||||
var tao tokens3.AuthOptionsBuilder
|
||||
switch ot := opts.(type) {
|
||||
case *gophercloud.AuthOptions:
|
||||
|
@ -225,7 +228,7 @@ func v3auth(client *gophercloud.ProviderClient, endpoint string, opts tokens3.Au
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
client.CopyTokenFrom(&tac)
|
||||
client.TokenID = tac.TokenID
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
@ -304,18 +307,6 @@ func initClientOpts(client *gophercloud.ProviderClient, eo gophercloud.EndpointO
|
|||
return sc, nil
|
||||
}
|
||||
|
||||
// NewBareMetalV1 creates a ServiceClient that may be used with the v1
|
||||
// bare metal package.
|
||||
func NewBareMetalV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
||||
return initClientOpts(client, eo, "baremetal")
|
||||
}
|
||||
|
||||
// NewBareMetalIntrospectionV1 creates a ServiceClient that may be used with the v1
|
||||
// bare metal introspection package.
|
||||
func NewBareMetalIntrospectionV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
||||
return initClientOpts(client, eo, "baremetal-inspector")
|
||||
}
|
||||
|
||||
// NewObjectStorageV1 creates a ServiceClient that may be used with the v1
|
||||
// object storage package.
|
||||
func NewObjectStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
|
||||
|
|
15
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens/results.go
generated
vendored
15
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens/results.go
generated
vendored
|
@ -135,21 +135,6 @@ func (r CreateResult) ExtractToken() (*Token, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
// ExtractTokenID implements the gophercloud.AuthResult interface. The returned
|
||||
// string is the same as the ID field of the Token struct returned from
|
||||
// ExtractToken().
|
||||
func (r CreateResult) ExtractTokenID() (string, error) {
|
||||
var s struct {
|
||||
Access struct {
|
||||
Token struct {
|
||||
ID string `json:"id"`
|
||||
} `json:"token"`
|
||||
} `json:"access"`
|
||||
}
|
||||
err := r.ExtractInto(&s)
|
||||
return s.Access.Token.ID, err
|
||||
}
|
||||
|
||||
// ExtractServiceCatalog returns the ServiceCatalog that was generated along
|
||||
// with the user's Token.
|
||||
func (r CreateResult) ExtractServiceCatalog() (*ServiceCatalog, error) {
|
||||
|
|
2
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go
generated
vendored
|
@ -134,9 +134,9 @@ func Get(c *gophercloud.ServiceClient, token string) (r GetResult) {
|
|||
OkCodes: []int{200, 203},
|
||||
})
|
||||
if resp != nil {
|
||||
r.Err = err
|
||||
r.Header = resp.Header
|
||||
}
|
||||
r.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
|
|
7
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go
generated
vendored
7
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go
generated
vendored
|
@ -102,13 +102,6 @@ func (r commonResult) ExtractToken() (*Token, error) {
|
|||
return &s, err
|
||||
}
|
||||
|
||||
// ExtractTokenID implements the gophercloud.AuthResult interface. The returned
|
||||
// string is the same as the ID field of the Token struct returned from
|
||||
// ExtractToken().
|
||||
func (r CreateResult) ExtractTokenID() (string, error) {
|
||||
return r.Header.Get("X-Subject-Token"), r.Err
|
||||
}
|
||||
|
||||
// ExtractServiceCatalog returns the ServiceCatalog that was generated along
|
||||
// with the user's Token.
|
||||
func (r commonResult) ExtractServiceCatalog() (*ServiceCatalog, error) {
|
||||
|
|
111
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
111
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
|
@ -2,7 +2,6 @@ package gophercloud
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io"
|
||||
|
@ -73,25 +72,15 @@ type ProviderClient struct {
|
|||
// authentication functions for different Identity service versions.
|
||||
ReauthFunc func() error
|
||||
|
||||
// Throwaway determines whether if this client is a throw-away client. It's a copy of user's provider client
|
||||
// IsThrowaway determines whether if this client is a throw-away client. It's a copy of user's provider client
|
||||
// with the token and reauth func zeroed. Such client can be used to perform reauthorization.
|
||||
Throwaway bool
|
||||
IsThrowaway bool
|
||||
|
||||
// Context is the context passed to the HTTP request.
|
||||
Context context.Context
|
||||
|
||||
// mut is a mutex for the client. It protects read and write access to client attributes such as getting
|
||||
// and setting the TokenID.
|
||||
mut *sync.RWMutex
|
||||
|
||||
// reauthmut is a mutex for reauthentication it attempts to ensure that only one reauthentication
|
||||
// attempt happens at one time.
|
||||
reauthmut *reauthlock
|
||||
|
||||
authResult AuthResult
|
||||
}
|
||||
|
||||
// reauthlock represents a set of attributes used to help in the reauthentication process.
|
||||
type reauthlock struct {
|
||||
sync.RWMutex
|
||||
reauthing bool
|
||||
|
@ -102,7 +91,7 @@ type reauthlock struct {
|
|||
// AuthenticatedHeaders returns a map of HTTP headers that are common for all
|
||||
// authenticated service requests. Blocks if Reauthenticate is in progress.
|
||||
func (client *ProviderClient) AuthenticatedHeaders() (m map[string]string) {
|
||||
if client.IsThrowaway() {
|
||||
if client.IsThrowaway {
|
||||
return
|
||||
}
|
||||
if client.reauthmut != nil {
|
||||
|
@ -126,20 +115,6 @@ func (client *ProviderClient) UseTokenLock() {
|
|||
client.reauthmut = new(reauthlock)
|
||||
}
|
||||
|
||||
// GetAuthResult returns the result from the request that was used to obtain a
|
||||
// provider client's Keystone token.
|
||||
//
|
||||
// The result is nil when authentication has not yet taken place, when the token
|
||||
// was set manually with SetToken(), or when a ReauthFunc was used that does not
|
||||
// record the AuthResult.
|
||||
func (client *ProviderClient) GetAuthResult() AuthResult {
|
||||
if client.mut != nil {
|
||||
client.mut.RLock()
|
||||
defer client.mut.RUnlock()
|
||||
}
|
||||
return client.authResult
|
||||
}
|
||||
|
||||
// Token safely reads the value of the auth token from the ProviderClient. Applications should
|
||||
// call this method to access the token instead of the TokenID field
|
||||
func (client *ProviderClient) Token() string {
|
||||
|
@ -151,71 +126,13 @@ func (client *ProviderClient) Token() string {
|
|||
}
|
||||
|
||||
// SetToken safely sets the value of the auth token in the ProviderClient. Applications may
|
||||
// use this method in a custom ReauthFunc.
|
||||
//
|
||||
// WARNING: This function is deprecated. Use SetTokenAndAuthResult() instead.
|
||||
// use this method in a custom ReauthFunc
|
||||
func (client *ProviderClient) SetToken(t string) {
|
||||
if client.mut != nil {
|
||||
client.mut.Lock()
|
||||
defer client.mut.Unlock()
|
||||
}
|
||||
client.TokenID = t
|
||||
client.authResult = nil
|
||||
}
|
||||
|
||||
// SetTokenAndAuthResult safely sets the value of the auth token in the
|
||||
// ProviderClient and also records the AuthResult that was returned from the
|
||||
// token creation request. Applications may call this in a custom ReauthFunc.
|
||||
func (client *ProviderClient) SetTokenAndAuthResult(r AuthResult) error {
|
||||
tokenID := ""
|
||||
var err error
|
||||
if r != nil {
|
||||
tokenID, err = r.ExtractTokenID()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if client.mut != nil {
|
||||
client.mut.Lock()
|
||||
defer client.mut.Unlock()
|
||||
}
|
||||
client.TokenID = tokenID
|
||||
client.authResult = r
|
||||
return nil
|
||||
}
|
||||
|
||||
// CopyTokenFrom safely copies the token from another ProviderClient into the
|
||||
// this one.
|
||||
func (client *ProviderClient) CopyTokenFrom(other *ProviderClient) {
|
||||
if client.mut != nil {
|
||||
client.mut.Lock()
|
||||
defer client.mut.Unlock()
|
||||
}
|
||||
if other.mut != nil && other.mut != client.mut {
|
||||
other.mut.RLock()
|
||||
defer other.mut.RUnlock()
|
||||
}
|
||||
client.TokenID = other.TokenID
|
||||
client.authResult = other.authResult
|
||||
}
|
||||
|
||||
// IsThrowaway safely reads the value of the client Throwaway field.
|
||||
func (client *ProviderClient) IsThrowaway() bool {
|
||||
if client.reauthmut != nil {
|
||||
client.reauthmut.RLock()
|
||||
defer client.reauthmut.RUnlock()
|
||||
}
|
||||
return client.Throwaway
|
||||
}
|
||||
|
||||
// SetThrowaway safely sets the value of the client Throwaway field.
|
||||
func (client *ProviderClient) SetThrowaway(v bool) {
|
||||
if client.reauthmut != nil {
|
||||
client.reauthmut.Lock()
|
||||
defer client.reauthmut.Unlock()
|
||||
}
|
||||
client.Throwaway = v
|
||||
}
|
||||
|
||||
// Reauthenticate calls client.ReauthFunc in a thread-safe way. If this is
|
||||
|
@ -228,7 +145,7 @@ func (client *ProviderClient) Reauthenticate(previousToken string) (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
if client.reauthmut == nil {
|
||||
if client.mut == nil {
|
||||
return client.ReauthFunc()
|
||||
}
|
||||
|
||||
|
@ -243,6 +160,9 @@ func (client *ProviderClient) Reauthenticate(previousToken string) (err error) {
|
|||
}
|
||||
client.reauthmut.Unlock()
|
||||
|
||||
client.mut.Lock()
|
||||
defer client.mut.Unlock()
|
||||
|
||||
client.reauthmut.Lock()
|
||||
client.reauthmut.reauthing = true
|
||||
client.reauthmut.done = sync.NewCond(client.reauthmut)
|
||||
|
@ -318,9 +238,6 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if client.Context != nil {
|
||||
req = req.WithContext(client.Context)
|
||||
}
|
||||
|
||||
// Populate the request headers. Apply options.MoreHeaders last, to give the caller the chance to
|
||||
// modify or omit any header.
|
||||
|
@ -359,14 +276,13 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
|
|||
}
|
||||
|
||||
// Allow default OkCodes if none explicitly set
|
||||
okc := options.OkCodes
|
||||
if okc == nil {
|
||||
okc = defaultOkCodes(method)
|
||||
if options.OkCodes == nil {
|
||||
options.OkCodes = defaultOkCodes(method)
|
||||
}
|
||||
|
||||
// Validate the HTTP response status.
|
||||
var ok bool
|
||||
for _, code := range okc {
|
||||
for _, code := range options.OkCodes {
|
||||
if resp.StatusCode == code {
|
||||
ok = true
|
||||
break
|
||||
|
@ -443,11 +359,6 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
|
|||
if error408er, ok := errType.(Err408er); ok {
|
||||
err = error408er.Error408(respErr)
|
||||
}
|
||||
case http.StatusConflict:
|
||||
err = ErrDefault409{respErr}
|
||||
if error409er, ok := errType.(Err409er); ok {
|
||||
err = error409er.Error409(respErr)
|
||||
}
|
||||
case 429:
|
||||
err = ErrDefault429{respErr}
|
||||
if error429er, ok := errType.(Err429er); ok {
|
||||
|
|
4
vendor/github.com/gophercloud/gophercloud/service_client.go
generated
vendored
4
vendor/github.com/gophercloud/gophercloud/service_client.go
generated
vendored
|
@ -129,10 +129,6 @@ func (client *ServiceClient) setMicroversionHeader(opts *RequestOpts) {
|
|||
opts.MoreHeaders["X-OpenStack-Manila-API-Version"] = client.Microversion
|
||||
case "volume":
|
||||
opts.MoreHeaders["X-OpenStack-Volume-API-Version"] = client.Microversion
|
||||
case "baremetal":
|
||||
opts.MoreHeaders["X-OpenStack-Ironic-API-Version"] = client.Microversion
|
||||
case "baremetal-introspection":
|
||||
opts.MoreHeaders["X-OpenStack-Ironic-Inspector-API-Version"] = client.Microversion
|
||||
}
|
||||
|
||||
if client.Type != "" {
|
||||
|
|
9
vendor/github.com/mailru/easyjson/jlexer/lexer.go
generated
vendored
9
vendor/github.com/mailru/easyjson/jlexer/lexer.go
generated
vendored
|
@ -521,12 +521,11 @@ func (r *Lexer) SkipRecursive() {
|
|||
r.scanToken()
|
||||
var start, end byte
|
||||
|
||||
switch r.token.delimValue {
|
||||
case '{':
|
||||
if r.token.delimValue == '{' {
|
||||
start, end = '{', '}'
|
||||
case '[':
|
||||
} else if r.token.delimValue == '[' {
|
||||
start, end = '[', ']'
|
||||
default:
|
||||
} else {
|
||||
r.consume()
|
||||
return
|
||||
}
|
||||
|
@ -1152,7 +1151,7 @@ func (r *Lexer) Interface() interface{} {
|
|||
} else if r.token.delimValue == '[' {
|
||||
r.consume()
|
||||
|
||||
ret := []interface{}{}
|
||||
var ret []interface{}
|
||||
for !r.IsDelim(']') {
|
||||
ret = append(ret, r.Interface())
|
||||
r.WantComma()
|
||||
|
|
63
vendor/golang.org/x/crypto/ssh/terminal/terminal.go
generated
vendored
63
vendor/golang.org/x/crypto/ssh/terminal/terminal.go
generated
vendored
|
@ -7,7 +7,6 @@ package terminal
|
|||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"strconv"
|
||||
"sync"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
@ -272,44 +271,34 @@ func (t *Terminal) moveCursorToPos(pos int) {
|
|||
}
|
||||
|
||||
func (t *Terminal) move(up, down, left, right int) {
|
||||
m := []rune{}
|
||||
|
||||
// 1 unit up can be expressed as ^[[A or ^[A
|
||||
// 5 units up can be expressed as ^[[5A
|
||||
|
||||
if up == 1 {
|
||||
m = append(m, keyEscape, '[', 'A')
|
||||
} else if up > 1 {
|
||||
m = append(m, keyEscape, '[')
|
||||
m = append(m, []rune(strconv.Itoa(up))...)
|
||||
m = append(m, 'A')
|
||||
movement := make([]rune, 3*(up+down+left+right))
|
||||
m := movement
|
||||
for i := 0; i < up; i++ {
|
||||
m[0] = keyEscape
|
||||
m[1] = '['
|
||||
m[2] = 'A'
|
||||
m = m[3:]
|
||||
}
|
||||
for i := 0; i < down; i++ {
|
||||
m[0] = keyEscape
|
||||
m[1] = '['
|
||||
m[2] = 'B'
|
||||
m = m[3:]
|
||||
}
|
||||
for i := 0; i < left; i++ {
|
||||
m[0] = keyEscape
|
||||
m[1] = '['
|
||||
m[2] = 'D'
|
||||
m = m[3:]
|
||||
}
|
||||
for i := 0; i < right; i++ {
|
||||
m[0] = keyEscape
|
||||
m[1] = '['
|
||||
m[2] = 'C'
|
||||
m = m[3:]
|
||||
}
|
||||
|
||||
if down == 1 {
|
||||
m = append(m, keyEscape, '[', 'B')
|
||||
} else if down > 1 {
|
||||
m = append(m, keyEscape, '[')
|
||||
m = append(m, []rune(strconv.Itoa(down))...)
|
||||
m = append(m, 'B')
|
||||
}
|
||||
|
||||
if right == 1 {
|
||||
m = append(m, keyEscape, '[', 'C')
|
||||
} else if right > 1 {
|
||||
m = append(m, keyEscape, '[')
|
||||
m = append(m, []rune(strconv.Itoa(right))...)
|
||||
m = append(m, 'C')
|
||||
}
|
||||
|
||||
if left == 1 {
|
||||
m = append(m, keyEscape, '[', 'D')
|
||||
} else if left > 1 {
|
||||
m = append(m, keyEscape, '[')
|
||||
m = append(m, []rune(strconv.Itoa(left))...)
|
||||
m = append(m, 'D')
|
||||
}
|
||||
|
||||
t.queue(m)
|
||||
t.queue(movement)
|
||||
}
|
||||
|
||||
func (t *Terminal) clearLineToRight() {
|
||||
|
|
11
vendor/golang.org/x/time/rate/rate.go
generated
vendored
11
vendor/golang.org/x/time/rate/rate.go
generated
vendored
|
@ -6,12 +6,11 @@
|
|||
package rate
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// Limit defines the maximum frequency of some events.
|
||||
|
@ -244,8 +243,12 @@ func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) {
|
|||
if !r.ok {
|
||||
return fmt.Errorf("rate: Wait(n=%d) would exceed context deadline", n)
|
||||
}
|
||||
// Wait
|
||||
t := time.NewTimer(r.DelayFrom(now))
|
||||
// Wait if necessary
|
||||
delay := r.DelayFrom(now)
|
||||
if delay == 0 {
|
||||
return nil
|
||||
}
|
||||
t := time.NewTimer(delay)
|
||||
defer t.Stop()
|
||||
select {
|
||||
case <-t.C:
|
||||
|
|
2
vendor/golang.org/x/tools/go/packages/external.go
generated
vendored
2
vendor/golang.org/x/tools/go/packages/external.go
generated
vendored
|
@ -18,7 +18,7 @@ import (
|
|||
|
||||
// Driver
|
||||
type driverRequest struct {
|
||||
Command string `json:"command"`
|
||||
Command string `json "command"`
|
||||
Mode LoadMode `json:"mode"`
|
||||
Env []string `json:"env"`
|
||||
BuildFlags []string `json:"build_flags"`
|
||||
|
|
73
vendor/golang.org/x/tools/go/packages/golist.go
generated
vendored
73
vendor/golang.org/x/tools/go/packages/golist.go
generated
vendored
|
@ -78,7 +78,7 @@ func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
|
|||
var sizes types.Sizes
|
||||
var sizeserr error
|
||||
var sizeswg sync.WaitGroup
|
||||
if cfg.Mode&NeedTypesSizes != 0 || cfg.Mode&NeedTypes != 0 {
|
||||
if cfg.Mode&NeedTypesSizes != 0 {
|
||||
sizeswg.Add(1)
|
||||
go func() {
|
||||
sizes, sizeserr = getSizes(cfg)
|
||||
|
@ -128,7 +128,7 @@ extractQueries:
|
|||
// patterns also requires a go list call, since it's the equivalent of
|
||||
// ".".
|
||||
if len(restPatterns) > 0 || len(patterns) == 0 {
|
||||
dr, err := golistDriver(cfg, restPatterns...)
|
||||
dr, err := golistDriverCurrent(cfg, restPatterns...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -147,13 +147,13 @@ extractQueries:
|
|||
var containsCandidates []string
|
||||
|
||||
if len(containFiles) != 0 {
|
||||
if err := runContainsQueries(cfg, golistDriver, response, containFiles); err != nil {
|
||||
if err := runContainsQueries(cfg, golistDriverCurrent, response, containFiles); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if len(packagesNamed) != 0 {
|
||||
if err := runNamedQueries(cfg, golistDriver, response, packagesNamed); err != nil {
|
||||
if err := runNamedQueries(cfg, golistDriverCurrent, response, packagesNamed); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
@ -166,25 +166,17 @@ extractQueries:
|
|||
containsCandidates = append(containsCandidates, modifiedPkgs...)
|
||||
containsCandidates = append(containsCandidates, needPkgs...)
|
||||
}
|
||||
if err := addNeededOverlayPackages(cfg, golistDriver, response, needPkgs); err != nil {
|
||||
return nil, err
|
||||
|
||||
if len(needPkgs) > 0 {
|
||||
addNeededOverlayPackages(cfg, golistDriverCurrent, response, needPkgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
// Check candidate packages for containFiles.
|
||||
if len(containFiles) > 0 {
|
||||
for _, id := range containsCandidates {
|
||||
pkg, ok := response.seenPackages[id]
|
||||
if !ok {
|
||||
response.addPackage(&Package{
|
||||
ID: id,
|
||||
Errors: []Error{
|
||||
{
|
||||
Kind: ListError,
|
||||
Msg: fmt.Sprintf("package %s expected but not seen", id),
|
||||
},
|
||||
},
|
||||
})
|
||||
continue
|
||||
}
|
||||
pkg := response.seenPackages[id]
|
||||
for _, f := range containFiles {
|
||||
for _, g := range pkg.GoFiles {
|
||||
if sameFile(f, g) {
|
||||
|
@ -199,9 +191,6 @@ extractQueries:
|
|||
}
|
||||
|
||||
func addNeededOverlayPackages(cfg *Config, driver driver, response *responseDeduper, pkgs []string) error {
|
||||
if len(pkgs) == 0 {
|
||||
return nil
|
||||
}
|
||||
dr, err := driver(cfg, pkgs...)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -209,11 +198,6 @@ func addNeededOverlayPackages(cfg *Config, driver driver, response *responseDedu
|
|||
for _, pkg := range dr.Packages {
|
||||
response.addPackage(pkg)
|
||||
}
|
||||
_, needPkgs, err := processGolistOverlay(cfg, response.dr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
addNeededOverlayPackages(cfg, driver, response, needPkgs)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -556,10 +540,10 @@ func otherFiles(p *jsonPackage) [][]string {
|
|||
return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles}
|
||||
}
|
||||
|
||||
// golistDriver uses the "go list" command to expand the pattern
|
||||
// words and return metadata for the specified packages. dir may be
|
||||
// "" and env may be nil, as per os/exec.Command.
|
||||
func golistDriver(cfg *Config, words ...string) (*driverResponse, error) {
|
||||
// golistDriverCurrent uses the "go list" command to expand the
|
||||
// pattern words and return metadata for the specified packages.
|
||||
// dir may be "" and env may be nil, as per os/exec.Command.
|
||||
func golistDriverCurrent(cfg *Config, words ...string) (*driverResponse, error) {
|
||||
// go list uses the following identifiers in ImportPath and Imports:
|
||||
//
|
||||
// "p" -- importable package or main (command)
|
||||
|
@ -777,31 +761,8 @@ func invokeGo(cfg *Config, args ...string) (*bytes.Buffer, error) {
|
|||
// the error in the Err section of stdout in case -e option is provided.
|
||||
// This fix is provided for backwards compatibility.
|
||||
if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must be .go files") {
|
||||
output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
|
||||
strings.Trim(stderr.String(), "\n"))
|
||||
return bytes.NewBufferString(output), nil
|
||||
}
|
||||
|
||||
// Workaround for #29280: go list -e has incorrect behavior when an ad-hoc package doesn't exist.
|
||||
if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "no such file or directory") {
|
||||
output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
|
||||
strings.Trim(stderr.String(), "\n"))
|
||||
return bytes.NewBufferString(output), nil
|
||||
}
|
||||
|
||||
// Workaround for an instance of golang.org/issue/26755: go list -e will return a non-zero exit
|
||||
// status if there's a dependency on a package that doesn't exist. But it should return
|
||||
// a zero exit status and set an error on that package.
|
||||
if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "no Go files in") {
|
||||
// try to extract package name from string
|
||||
stderrStr := stderr.String()
|
||||
var importPath string
|
||||
colon := strings.Index(stderrStr, ":")
|
||||
if colon > 0 && strings.HasPrefix(stderrStr, "go build ") {
|
||||
importPath = stderrStr[len("go build "):colon]
|
||||
}
|
||||
output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
|
||||
importPath, strings.Trim(stderrStr, "\n"))
|
||||
output := fmt.Sprintf(`{"ImportPath": "","Incomplete": true,"Error": {"Pos": "","Err": %s}}`,
|
||||
strconv.Quote(strings.Trim(stderr.String(), "\n")))
|
||||
return bytes.NewBufferString(output), nil
|
||||
}
|
||||
|
||||
|
|
222
vendor/golang.org/x/tools/go/packages/golist_overlay.go
generated
vendored
222
vendor/golang.org/x/tools/go/packages/golist_overlay.go
generated
vendored
|
@ -1,15 +1,11 @@
|
|||
package packages
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// processGolistOverlay provides rudimentary support for adding
|
||||
|
@ -31,123 +27,50 @@ func processGolistOverlay(cfg *Config, response *driverResponse) (modifiedPkgs,
|
|||
havePkgs[pkg.PkgPath] = pkg.ID
|
||||
}
|
||||
|
||||
var rootDirs map[string]string
|
||||
var onceGetRootDirs sync.Once
|
||||
|
||||
for opath, contents := range cfg.Overlay {
|
||||
base := filepath.Base(opath)
|
||||
if strings.HasSuffix(opath, "_test.go") {
|
||||
outer:
|
||||
for path, contents := range cfg.Overlay {
|
||||
base := filepath.Base(path)
|
||||
if strings.HasSuffix(path, "_test.go") {
|
||||
// Overlays don't support adding new test files yet.
|
||||
// TODO(matloob): support adding new test files.
|
||||
continue
|
||||
}
|
||||
dir := filepath.Dir(opath)
|
||||
var pkg *Package
|
||||
var fileExists bool
|
||||
for _, p := range response.Packages {
|
||||
for _, f := range p.GoFiles {
|
||||
if !sameFile(filepath.Dir(f), dir) {
|
||||
continue
|
||||
dir := filepath.Dir(path)
|
||||
for _, pkg := range response.Packages {
|
||||
var dirContains, fileExists bool
|
||||
for _, f := range pkg.GoFiles {
|
||||
if sameFile(filepath.Dir(f), dir) {
|
||||
dirContains = true
|
||||
}
|
||||
pkg = p
|
||||
if filepath.Base(f) == base {
|
||||
fileExists = true
|
||||
}
|
||||
}
|
||||
}
|
||||
// The overlay could have included an entirely new package.
|
||||
if pkg == nil {
|
||||
onceGetRootDirs.Do(func() {
|
||||
rootDirs = determineRootDirs(cfg)
|
||||
})
|
||||
// Try to find the module or gopath dir the file is contained in.
|
||||
// Then for modules, add the module opath to the beginning.
|
||||
var pkgPath string
|
||||
for rdir, rpath := range rootDirs {
|
||||
// TODO(matloob): This doesn't properly handle symlinks.
|
||||
r, err := filepath.Rel(rdir, dir)
|
||||
if dirContains {
|
||||
if !fileExists {
|
||||
pkg.GoFiles = append(pkg.GoFiles, path) // TODO(matloob): should the file just be added to GoFiles?
|
||||
pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, path)
|
||||
modifiedPkgsSet[pkg.ID] = true
|
||||
}
|
||||
imports, err := extractImports(path, contents)
|
||||
if err != nil {
|
||||
continue
|
||||
// Let the parser or type checker report errors later.
|
||||
continue outer
|
||||
}
|
||||
pkgPath = filepath.ToSlash(r)
|
||||
if rpath != "" {
|
||||
pkgPath = path.Join(rpath, pkgPath)
|
||||
for _, imp := range imports {
|
||||
_, found := pkg.Imports[imp]
|
||||
if !found {
|
||||
needPkgsSet[imp] = true
|
||||
// TODO(matloob): Handle cases when the following block isn't correct.
|
||||
// These include imports of test variants, imports of vendored packages, etc.
|
||||
id, ok := havePkgs[imp]
|
||||
if !ok {
|
||||
id = imp
|
||||
}
|
||||
pkg.Imports[imp] = &Package{ID: id}
|
||||
}
|
||||
}
|
||||
// We only create one new package even it can belong in multiple modules or GOPATH entries.
|
||||
// This is okay because tools (such as the LSP) that use overlays will recompute the overlay
|
||||
// once the file is saved, and golist will do the right thing.
|
||||
// TODO(matloob): Implement module tiebreaking?
|
||||
break
|
||||
}
|
||||
if pkgPath == "" {
|
||||
continue
|
||||
}
|
||||
pkgName, ok := extractPackageName(opath, contents)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
id := pkgPath
|
||||
// Try to reclaim a package with the same id if it exists in the response.
|
||||
for _, p := range response.Packages {
|
||||
if reclaimPackage(p, id, opath, contents) {
|
||||
pkg = p
|
||||
break
|
||||
}
|
||||
}
|
||||
// Otherwise, create a new package
|
||||
if pkg == nil {
|
||||
pkg = &Package{PkgPath: pkgPath, ID: id, Name: pkgName, Imports: make(map[string]*Package)}
|
||||
// TODO(matloob): Is it okay to amend response.Packages this way?
|
||||
response.Packages = append(response.Packages, pkg)
|
||||
havePkgs[pkg.PkgPath] = id
|
||||
}
|
||||
}
|
||||
if !fileExists {
|
||||
pkg.GoFiles = append(pkg.GoFiles, opath)
|
||||
// TODO(matloob): Adding the file to CompiledGoFiles can exhibit the wrong behavior
|
||||
// if the file will be ignored due to its build tags.
|
||||
pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, opath)
|
||||
modifiedPkgsSet[pkg.ID] = true
|
||||
}
|
||||
imports, err := extractImports(opath, contents)
|
||||
if err != nil {
|
||||
// Let the parser or type checker report errors later.
|
||||
continue
|
||||
}
|
||||
for _, imp := range imports {
|
||||
_, found := pkg.Imports[imp]
|
||||
if !found {
|
||||
// TODO(matloob): Handle cases when the following block isn't correct.
|
||||
// These include imports of test variants, imports of vendored packages, etc.
|
||||
id, ok := havePkgs[imp]
|
||||
if !ok {
|
||||
id = imp
|
||||
}
|
||||
pkg.Imports[imp] = &Package{ID: id}
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// toPkgPath tries to guess the package path given the id.
|
||||
// This isn't always correct -- it's certainly wrong for
|
||||
// vendored packages' paths.
|
||||
toPkgPath := func(id string) string {
|
||||
// TODO(matloob): Handle vendor paths.
|
||||
i := strings.IndexByte(id, ' ')
|
||||
if i >= 0 {
|
||||
return id[:i]
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// Do another pass now that new packages have been created to determine the
|
||||
// set of missing packages.
|
||||
for _, pkg := range response.Packages {
|
||||
for _, imp := range pkg.Imports {
|
||||
pkgPath := toPkgPath(imp.ID)
|
||||
if _, ok := havePkgs[pkgPath]; !ok {
|
||||
needPkgsSet[pkgPath] = true
|
||||
continue outer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -163,46 +86,6 @@ func processGolistOverlay(cfg *Config, response *driverResponse) (modifiedPkgs,
|
|||
return modifiedPkgs, needPkgs, err
|
||||
}
|
||||
|
||||
// determineRootDirs returns a mapping from directories code can be contained in to the
|
||||
// corresponding import path prefixes of those directories.
|
||||
// Its result is used to try to determine the import path for a package containing
|
||||
// an overlay file.
|
||||
func determineRootDirs(cfg *Config) map[string]string {
|
||||
// Assume modules first:
|
||||
out, err := invokeGo(cfg, "list", "-m", "-json", "all")
|
||||
if err != nil {
|
||||
return determineRootDirsGOPATH(cfg)
|
||||
}
|
||||
m := map[string]string{}
|
||||
type jsonMod struct{ Path, Dir string }
|
||||
for dec := json.NewDecoder(out); dec.More(); {
|
||||
mod := new(jsonMod)
|
||||
if err := dec.Decode(mod); err != nil {
|
||||
return m // Give up and return an empty map. Package won't be found for overlay.
|
||||
}
|
||||
if mod.Dir != "" && mod.Path != "" {
|
||||
// This is a valid module; add it to the map.
|
||||
m[mod.Dir] = mod.Path
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func determineRootDirsGOPATH(cfg *Config) map[string]string {
|
||||
m := map[string]string{}
|
||||
out, err := invokeGo(cfg, "env", "GOPATH")
|
||||
if err != nil {
|
||||
// Could not determine root dir mapping. Everything is best-effort, so just return an empty map.
|
||||
// When we try to find the import path for a directory, there will be no root-dir match and
|
||||
// we'll give up.
|
||||
return m
|
||||
}
|
||||
for _, p := range filepath.SplitList(string(bytes.TrimSpace(out.Bytes()))) {
|
||||
m[filepath.Join(p, "src")] = ""
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func extractImports(filename string, contents []byte) ([]string, error) {
|
||||
f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.ImportsOnly) // TODO(matloob): reuse fileset?
|
||||
if err != nil {
|
||||
|
@ -219,44 +102,3 @@ func extractImports(filename string, contents []byte) ([]string, error) {
|
|||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// reclaimPackage attempts to reuse a package that failed to load in an overlay.
|
||||
//
|
||||
// If the package has errors and has no Name, GoFiles, or Imports,
|
||||
// then it's possible that it doesn't yet exist on disk.
|
||||
func reclaimPackage(pkg *Package, id string, filename string, contents []byte) bool {
|
||||
// TODO(rstambler): Check the message of the actual error?
|
||||
// It differs between $GOPATH and module mode.
|
||||
if pkg.ID != id {
|
||||
return false
|
||||
}
|
||||
if len(pkg.Errors) != 1 {
|
||||
return false
|
||||
}
|
||||
if pkg.Name != "" || pkg.ExportFile != "" {
|
||||
return false
|
||||
}
|
||||
if len(pkg.GoFiles) > 0 || len(pkg.CompiledGoFiles) > 0 || len(pkg.OtherFiles) > 0 {
|
||||
return false
|
||||
}
|
||||
if len(pkg.Imports) > 0 {
|
||||
return false
|
||||
}
|
||||
pkgName, ok := extractPackageName(filename, contents)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
pkg.Name = pkgName
|
||||
pkg.Errors = nil
|
||||
return true
|
||||
}
|
||||
|
||||
func extractPackageName(filename string, contents []byte) (string, bool) {
|
||||
// TODO(rstambler): Check the message of the actual error?
|
||||
// It differs between $GOPATH and module mode.
|
||||
f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.PackageClauseOnly) // TODO(matloob): reuse fileset?
|
||||
if err != nil {
|
||||
return "", false
|
||||
}
|
||||
return f.Name.Name, true
|
||||
}
|
||||
|
|
191
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
191
vendor/golang.org/x/tools/go/packages/packages.go
generated
vendored
|
@ -25,16 +25,24 @@ import (
|
|||
"golang.org/x/tools/go/gcexportdata"
|
||||
)
|
||||
|
||||
// A LoadMode controls the amount of detail to return when loading.
|
||||
// The bits below can be combined to specify which fields should be
|
||||
// filled in the result packages.
|
||||
// The zero value is a special case, equivalent to combining
|
||||
// the NeedName, NeedFiles, and NeedCompiledGoFiles bits.
|
||||
// ID and Errors (if present) will always be filled.
|
||||
// Load may return more information than requested.
|
||||
// A LoadMode specifies the amount of detail to return when loading.
|
||||
// Higher-numbered modes cause Load to return more information,
|
||||
// but may be slower. Load may return more information than requested.
|
||||
type LoadMode int
|
||||
|
||||
const (
|
||||
// The following constants are used to specify which fields of the Package
|
||||
// should be filled when loading is done. As a special case to provide
|
||||
// backwards compatibility, a LoadMode of 0 is equivalent to LoadFiles.
|
||||
// For all other LoadModes, the bits below specify which fields will be filled
|
||||
// in the result packages.
|
||||
// WARNING: This part of the go/packages API is EXPERIMENTAL. It might
|
||||
// be changed or removed up until April 15 2019. After that date it will
|
||||
// be frozen.
|
||||
// TODO(matloob): Remove this comment on April 15.
|
||||
|
||||
// ID and Errors (if present) will always be filled.
|
||||
|
||||
// NeedName adds Name and PkgPath.
|
||||
NeedName LoadMode = 1 << iota
|
||||
|
||||
|
@ -69,24 +77,30 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
// Deprecated: LoadFiles exists for historical compatibility
|
||||
// and should not be used. Please directly specify the needed fields using the Need values.
|
||||
// LoadFiles finds the packages and computes their source file lists.
|
||||
// Package fields: ID, Name, Errors, GoFiles, CompiledGoFiles, and OtherFiles.
|
||||
LoadFiles = NeedName | NeedFiles | NeedCompiledGoFiles
|
||||
|
||||
// Deprecated: LoadImports exists for historical compatibility
|
||||
// and should not be used. Please directly specify the needed fields using the Need values.
|
||||
// LoadImports adds import information for each package
|
||||
// and its dependencies.
|
||||
// Package fields added: Imports.
|
||||
LoadImports = LoadFiles | NeedImports | NeedDeps
|
||||
|
||||
// Deprecated: LoadTypes exists for historical compatibility
|
||||
// and should not be used. Please directly specify the needed fields using the Need values.
|
||||
LoadTypes = LoadImports | NeedTypes | NeedTypesSizes
|
||||
// LoadTypes adds type information for package-level
|
||||
// declarations in the packages matching the patterns.
|
||||
// Package fields added: Types, Fset, and IllTyped.
|
||||
// This mode uses type information provided by the build system when
|
||||
// possible, and may fill in the ExportFile field.
|
||||
LoadTypes = LoadImports | NeedTypes
|
||||
|
||||
// Deprecated: LoadSyntax exists for historical compatibility
|
||||
// and should not be used. Please directly specify the needed fields using the Need values.
|
||||
LoadSyntax = LoadTypes | NeedSyntax | NeedTypesInfo
|
||||
// LoadSyntax adds typed syntax trees for the packages matching the patterns.
|
||||
// Package fields added: Syntax, and TypesInfo, for direct pattern matches only.
|
||||
LoadSyntax = LoadTypes | NeedSyntax | NeedTypesInfo | NeedTypesSizes
|
||||
|
||||
// Deprecated: LoadAllSyntax exists for historical compatibility
|
||||
// and should not be used. Please directly specify the needed fields using the Need values.
|
||||
// LoadAllSyntax adds typed syntax trees for the packages matching the patterns
|
||||
// and all dependencies.
|
||||
// Package fields added: Types, Fset, IllTyped, Syntax, and TypesInfo,
|
||||
// for all packages in the import graph.
|
||||
LoadAllSyntax = LoadSyntax
|
||||
)
|
||||
|
||||
|
@ -123,7 +137,7 @@ type Config struct {
|
|||
BuildFlags []string
|
||||
|
||||
// Fset provides source position information for syntax trees and types.
|
||||
// If Fset is nil, Load will use a new fileset, but preserve Fset's value.
|
||||
// If Fset is nil, the loader will create a new FileSet.
|
||||
Fset *token.FileSet
|
||||
|
||||
// ParseFile is called to read and parse each file
|
||||
|
@ -261,9 +275,9 @@ type Package struct {
|
|||
Imports map[string]*Package
|
||||
|
||||
// Types provides type information for the package.
|
||||
// The NeedTypes LoadMode bit sets this field for packages matching the
|
||||
// patterns; type information for dependencies may be missing or incomplete,
|
||||
// unless NeedDeps and NeedImports are also set.
|
||||
// Modes LoadTypes and above set this field for packages matching the
|
||||
// patterns; type information for dependencies may be missing or incomplete.
|
||||
// Mode LoadAllSyntax sets this field for all packages, including dependencies.
|
||||
Types *types.Package
|
||||
|
||||
// Fset provides position information for Types, TypesInfo, and Syntax.
|
||||
|
@ -276,9 +290,8 @@ type Package struct {
|
|||
|
||||
// Syntax is the package's syntax trees, for the files listed in CompiledGoFiles.
|
||||
//
|
||||
// The NeedSyntax LoadMode bit populates this field for packages matching the patterns.
|
||||
// If NeedDeps and NeedImports are also set, this field will also be populated
|
||||
// for dependencies.
|
||||
// Mode LoadSyntax sets this field for packages matching the patterns.
|
||||
// Mode LoadAllSyntax sets this field for all packages, including dependencies.
|
||||
Syntax []*ast.File
|
||||
|
||||
// TypesInfo provides type information about the package's syntax trees.
|
||||
|
@ -405,33 +418,17 @@ type loaderPackage struct {
|
|||
type loader struct {
|
||||
pkgs map[string]*loaderPackage
|
||||
Config
|
||||
sizes types.Sizes
|
||||
parseCache map[string]*parseValue
|
||||
parseCacheMu sync.Mutex
|
||||
exportMu sync.Mutex // enforces mutual exclusion of exportdata operations
|
||||
|
||||
// TODO(matloob): Add an implied mode here and use that instead of mode.
|
||||
// Implied mode would contain all the fields we need the data for so we can
|
||||
// get the actually requested fields. We'll zero them out before returning
|
||||
// packages to the user. This will make it easier for us to get the conditions
|
||||
// where we need certain modes right.
|
||||
}
|
||||
|
||||
type parseValue struct {
|
||||
f *ast.File
|
||||
err error
|
||||
ready chan struct{}
|
||||
sizes types.Sizes
|
||||
exportMu sync.Mutex // enforces mutual exclusion of exportdata operations
|
||||
}
|
||||
|
||||
func newLoader(cfg *Config) *loader {
|
||||
ld := &loader{
|
||||
parseCache: map[string]*parseValue{},
|
||||
}
|
||||
ld := &loader{}
|
||||
if cfg != nil {
|
||||
ld.Config = *cfg
|
||||
}
|
||||
if ld.Config.Mode == 0 {
|
||||
ld.Config.Mode = NeedName | NeedFiles | NeedCompiledGoFiles // Preserve zero behavior of Mode for backwards compatibility.
|
||||
ld.Config.Mode = LoadFiles // Preserve zero behavior of Mode for backwards compatibility.
|
||||
}
|
||||
if ld.Config.Env == nil {
|
||||
ld.Config.Env = os.Environ()
|
||||
|
@ -454,8 +451,12 @@ func newLoader(cfg *Config) *loader {
|
|||
// because we load source if export data is missing.
|
||||
if ld.ParseFile == nil {
|
||||
ld.ParseFile = func(fset *token.FileSet, filename string, src []byte) (*ast.File, error) {
|
||||
var isrc interface{}
|
||||
if src != nil {
|
||||
isrc = src
|
||||
}
|
||||
const mode = parser.AllErrors | parser.ParseComments
|
||||
return parser.ParseFile(fset, filename, src, mode)
|
||||
return parser.ParseFile(fset, filename, isrc, mode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -553,16 +554,13 @@ func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) {
|
|||
if lpkg.needsrc {
|
||||
srcPkgs = append(srcPkgs, lpkg)
|
||||
}
|
||||
if ld.Mode&NeedTypesSizes != 0 {
|
||||
lpkg.TypesSizes = ld.sizes
|
||||
}
|
||||
stack = stack[:len(stack)-1] // pop
|
||||
lpkg.color = black
|
||||
|
||||
return lpkg.needsrc
|
||||
}
|
||||
|
||||
if ld.Mode&(NeedImports|NeedDeps) == 0 {
|
||||
if ld.Mode&NeedImports == 0 {
|
||||
// We do this to drop the stub import packages that we are not even going to try to resolve.
|
||||
for _, lpkg := range initial {
|
||||
lpkg.Imports = nil
|
||||
|
@ -573,7 +571,7 @@ func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) {
|
|||
visit(lpkg)
|
||||
}
|
||||
}
|
||||
if ld.Mode&NeedDeps != 0 { // TODO(matloob): This is only the case if NeedTypes is also set, right?
|
||||
if ld.Mode&NeedDeps != 0 {
|
||||
for _, lpkg := range srcPkgs {
|
||||
// Complete type information is required for the
|
||||
// immediate dependencies of each source package.
|
||||
|
@ -601,48 +599,46 @@ func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) {
|
|||
importPlaceholders := make(map[string]*Package)
|
||||
for i, lpkg := range initial {
|
||||
result[i] = lpkg.Package
|
||||
}
|
||||
for i := range ld.pkgs {
|
||||
// Clear all unrequested fields, for extra de-Hyrum-ization.
|
||||
if ld.Mode&NeedName == 0 {
|
||||
ld.pkgs[i].Name = ""
|
||||
ld.pkgs[i].PkgPath = ""
|
||||
result[i].Name = ""
|
||||
result[i].PkgPath = ""
|
||||
}
|
||||
if ld.Mode&NeedFiles == 0 {
|
||||
ld.pkgs[i].GoFiles = nil
|
||||
ld.pkgs[i].OtherFiles = nil
|
||||
result[i].GoFiles = nil
|
||||
result[i].OtherFiles = nil
|
||||
}
|
||||
if ld.Mode&NeedCompiledGoFiles == 0 {
|
||||
ld.pkgs[i].CompiledGoFiles = nil
|
||||
result[i].CompiledGoFiles = nil
|
||||
}
|
||||
if ld.Mode&NeedImports == 0 {
|
||||
ld.pkgs[i].Imports = nil
|
||||
result[i].Imports = nil
|
||||
}
|
||||
if ld.Mode&NeedExportsFile == 0 {
|
||||
ld.pkgs[i].ExportFile = ""
|
||||
result[i].ExportFile = ""
|
||||
}
|
||||
if ld.Mode&NeedTypes == 0 {
|
||||
ld.pkgs[i].Types = nil
|
||||
ld.pkgs[i].Fset = nil
|
||||
ld.pkgs[i].IllTyped = false
|
||||
result[i].Types = nil
|
||||
result[i].Fset = nil
|
||||
result[i].IllTyped = false
|
||||
}
|
||||
if ld.Mode&NeedSyntax == 0 {
|
||||
ld.pkgs[i].Syntax = nil
|
||||
result[i].Syntax = nil
|
||||
}
|
||||
if ld.Mode&NeedTypesInfo == 0 {
|
||||
ld.pkgs[i].TypesInfo = nil
|
||||
result[i].TypesInfo = nil
|
||||
}
|
||||
if ld.Mode&NeedTypesSizes == 0 {
|
||||
ld.pkgs[i].TypesSizes = nil
|
||||
result[i].TypesSizes = nil
|
||||
}
|
||||
if ld.Mode&NeedDeps == 0 {
|
||||
for j, pkg := range ld.pkgs[i].Imports {
|
||||
for j, pkg := range result[i].Imports {
|
||||
ph, ok := importPlaceholders[pkg.ID]
|
||||
if !ok {
|
||||
ph = &Package{ID: pkg.ID}
|
||||
importPlaceholders[pkg.ID] = ph
|
||||
}
|
||||
ld.pkgs[i].Imports[j] = ph
|
||||
result[i].Imports[j] = ph
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -674,7 +670,7 @@ func (ld *loader) loadRecursive(lpkg *loaderPackage) {
|
|||
// loadPackage loads the specified package.
|
||||
// It must be called only once per Package,
|
||||
// after immediate dependencies are loaded.
|
||||
// Precondition: ld.Mode & NeedTypes.
|
||||
// Precondition: ld.Mode >= LoadTypes.
|
||||
func (ld *loader) loadPackage(lpkg *loaderPackage) {
|
||||
if lpkg.PkgPath == "unsafe" {
|
||||
// Fill in the blanks to avoid surprises.
|
||||
|
@ -857,42 +853,6 @@ func (f importerFunc) Import(path string) (*types.Package, error) { return f(pat
|
|||
// the number of parallel I/O calls per process.
|
||||
var ioLimit = make(chan bool, 20)
|
||||
|
||||
func (ld *loader) parseFile(filename string) (*ast.File, error) {
|
||||
ld.parseCacheMu.Lock()
|
||||
v, ok := ld.parseCache[filename]
|
||||
if ok {
|
||||
// cache hit
|
||||
ld.parseCacheMu.Unlock()
|
||||
<-v.ready
|
||||
} else {
|
||||
// cache miss
|
||||
v = &parseValue{ready: make(chan struct{})}
|
||||
ld.parseCache[filename] = v
|
||||
ld.parseCacheMu.Unlock()
|
||||
|
||||
var src []byte
|
||||
for f, contents := range ld.Config.Overlay {
|
||||
if sameFile(f, filename) {
|
||||
src = contents
|
||||
}
|
||||
}
|
||||
var err error
|
||||
if src == nil {
|
||||
ioLimit <- true // wait
|
||||
src, err = ioutil.ReadFile(filename)
|
||||
<-ioLimit // signal
|
||||
}
|
||||
if err != nil {
|
||||
v.err = err
|
||||
} else {
|
||||
v.f, v.err = ld.ParseFile(ld.Fset, filename, src)
|
||||
}
|
||||
|
||||
close(v.ready)
|
||||
}
|
||||
return v.f, v.err
|
||||
}
|
||||
|
||||
// parseFiles reads and parses the Go source files and returns the ASTs
|
||||
// of the ones that could be at least partially parsed, along with a
|
||||
// list of I/O and parse errors encountered.
|
||||
|
@ -913,7 +873,24 @@ func (ld *loader) parseFiles(filenames []string) ([]*ast.File, []error) {
|
|||
}
|
||||
wg.Add(1)
|
||||
go func(i int, filename string) {
|
||||
parsed[i], errors[i] = ld.parseFile(filename)
|
||||
ioLimit <- true // wait
|
||||
// ParseFile may return both an AST and an error.
|
||||
var src []byte
|
||||
for f, contents := range ld.Config.Overlay {
|
||||
if sameFile(f, filename) {
|
||||
src = contents
|
||||
}
|
||||
}
|
||||
var err error
|
||||
if src == nil {
|
||||
src, err = ioutil.ReadFile(filename)
|
||||
}
|
||||
if err != nil {
|
||||
parsed[i], errors[i] = nil, err
|
||||
} else {
|
||||
parsed[i], errors[i] = ld.ParseFile(ld.Fset, filename, src)
|
||||
}
|
||||
<-ioLimit // signal
|
||||
wg.Done()
|
||||
}(i, file)
|
||||
}
|
||||
|
|
108
vendor/golang.org/x/tools/internal/imports/fix.go → vendor/golang.org/x/tools/imports/fix.go
generated
vendored
108
vendor/golang.org/x/tools/internal/imports/fix.go → vendor/golang.org/x/tools/imports/fix.go
generated
vendored
|
@ -31,27 +31,39 @@ import (
|
|||
"golang.org/x/tools/internal/gopathwalk"
|
||||
)
|
||||
|
||||
// Debug controls verbose logging.
|
||||
var Debug = false
|
||||
|
||||
// LocalPrefix is a comma-separated string of import path prefixes, which, if
|
||||
// set, instructs Process to sort the import paths with the given prefixes
|
||||
// into another group after 3rd-party packages.
|
||||
var LocalPrefix string
|
||||
|
||||
func localPrefixes() []string {
|
||||
if LocalPrefix != "" {
|
||||
return strings.Split(LocalPrefix, ",")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// importToGroup is a list of functions which map from an import path to
|
||||
// a group number.
|
||||
var importToGroup = []func(env *ProcessEnv, importPath string) (num int, ok bool){
|
||||
func(env *ProcessEnv, importPath string) (num int, ok bool) {
|
||||
if env.LocalPrefix == "" {
|
||||
return
|
||||
}
|
||||
for _, p := range strings.Split(env.LocalPrefix, ",") {
|
||||
var importToGroup = []func(importPath string) (num int, ok bool){
|
||||
func(importPath string) (num int, ok bool) {
|
||||
for _, p := range localPrefixes() {
|
||||
if strings.HasPrefix(importPath, p) || strings.TrimSuffix(p, "/") == importPath {
|
||||
return 3, true
|
||||
}
|
||||
}
|
||||
return
|
||||
},
|
||||
func(_ *ProcessEnv, importPath string) (num int, ok bool) {
|
||||
func(importPath string) (num int, ok bool) {
|
||||
if strings.HasPrefix(importPath, "appengine") {
|
||||
return 2, true
|
||||
}
|
||||
return
|
||||
},
|
||||
func(_ *ProcessEnv, importPath string) (num int, ok bool) {
|
||||
func(importPath string) (num int, ok bool) {
|
||||
if strings.Contains(importPath, ".") {
|
||||
return 1, true
|
||||
}
|
||||
|
@ -59,9 +71,9 @@ var importToGroup = []func(env *ProcessEnv, importPath string) (num int, ok bool
|
|||
},
|
||||
}
|
||||
|
||||
func importGroup(env *ProcessEnv, importPath string) int {
|
||||
func importGroup(importPath string) int {
|
||||
for _, fn := range importToGroup {
|
||||
if n, ok := fn(env, importPath); ok {
|
||||
if n, ok := fn(importPath); ok {
|
||||
return n
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +241,7 @@ type pass struct {
|
|||
fset *token.FileSet // fset used to parse f and its siblings.
|
||||
f *ast.File // the file being fixed.
|
||||
srcDir string // the directory containing f.
|
||||
env *ProcessEnv // the environment to use for go commands, etc.
|
||||
fixEnv *fixEnv // the environment to use for go commands, etc.
|
||||
loadRealPackageNames bool // if true, load package names from disk rather than guessing them.
|
||||
otherFiles []*ast.File // sibling files.
|
||||
|
||||
|
@ -254,7 +266,7 @@ func (p *pass) loadPackageNames(imports []*importInfo) error {
|
|||
unknown = append(unknown, imp.importPath)
|
||||
}
|
||||
|
||||
names, err := p.env.getResolver().loadPackageNames(unknown, p.srcDir)
|
||||
names, err := p.fixEnv.getResolver().loadPackageNames(unknown, p.srcDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -312,7 +324,7 @@ func (p *pass) load() bool {
|
|||
if p.loadRealPackageNames {
|
||||
err := p.loadPackageNames(append(imports, p.candidates...))
|
||||
if err != nil {
|
||||
if p.env.Debug {
|
||||
if Debug {
|
||||
log.Printf("loading package names: %v", err)
|
||||
}
|
||||
return false
|
||||
|
@ -436,13 +448,13 @@ func (p *pass) addCandidate(imp *importInfo, pkg *packageInfo) {
|
|||
// easily be extended by adding a file with an init function.
|
||||
var fixImports = fixImportsDefault
|
||||
|
||||
func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv) error {
|
||||
func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *fixEnv) error {
|
||||
abs, err := filepath.Abs(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
srcDir := filepath.Dir(abs)
|
||||
if env.Debug {
|
||||
if Debug {
|
||||
log.Printf("fixImports(filename=%q), abs=%q, srcDir=%q ...", filename, abs, srcDir)
|
||||
}
|
||||
|
||||
|
@ -474,7 +486,7 @@ func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *P
|
|||
// Third pass: get real package names where we had previously used
|
||||
// the naive algorithm. This is the first step that will use the
|
||||
// environment, so we provide it here for the first time.
|
||||
p = &pass{fset: fset, f: f, srcDir: srcDir, env: env}
|
||||
p = &pass{fset: fset, f: f, srcDir: srcDir, fixEnv: env}
|
||||
p.loadRealPackageNames = true
|
||||
p.otherFiles = otherFiles
|
||||
if p.load() {
|
||||
|
@ -498,16 +510,13 @@ func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *P
|
|||
return nil
|
||||
}
|
||||
|
||||
// ProcessEnv contains environment variables and settings that affect the use of
|
||||
// fixEnv contains environment variables and settings that affect the use of
|
||||
// the go command, the go/build package, etc.
|
||||
type ProcessEnv struct {
|
||||
LocalPrefix string
|
||||
Debug bool
|
||||
|
||||
type fixEnv struct {
|
||||
// If non-empty, these will be used instead of the
|
||||
// process-wide values.
|
||||
GOPATH, GOROOT, GO111MODULE, GOPROXY, GOFLAGS, GOSUMDB string
|
||||
WorkingDir string
|
||||
GOPATH, GOROOT, GO111MODULE, GOPROXY, GOFLAGS string
|
||||
WorkingDir string
|
||||
|
||||
// If true, use go/packages regardless of the environment.
|
||||
ForceGoPackages bool
|
||||
|
@ -515,7 +524,7 @@ type ProcessEnv struct {
|
|||
resolver resolver
|
||||
}
|
||||
|
||||
func (e *ProcessEnv) env() []string {
|
||||
func (e *fixEnv) env() []string {
|
||||
env := os.Environ()
|
||||
add := func(k, v string) {
|
||||
if v != "" {
|
||||
|
@ -527,32 +536,28 @@ func (e *ProcessEnv) env() []string {
|
|||
add("GO111MODULE", e.GO111MODULE)
|
||||
add("GOPROXY", e.GOPROXY)
|
||||
add("GOFLAGS", e.GOFLAGS)
|
||||
add("GOSUMDB", e.GOSUMDB)
|
||||
if e.WorkingDir != "" {
|
||||
add("PWD", e.WorkingDir)
|
||||
}
|
||||
return env
|
||||
}
|
||||
|
||||
func (e *ProcessEnv) getResolver() resolver {
|
||||
func (e *fixEnv) getResolver() resolver {
|
||||
if e.resolver != nil {
|
||||
return e.resolver
|
||||
}
|
||||
if e.ForceGoPackages {
|
||||
e.resolver = &goPackagesResolver{env: e}
|
||||
return e.resolver
|
||||
return &goPackagesResolver{env: e}
|
||||
}
|
||||
|
||||
out, err := e.invokeGo("env", "GOMOD")
|
||||
if err != nil || len(bytes.TrimSpace(out.Bytes())) == 0 {
|
||||
e.resolver = &gopathResolver{env: e}
|
||||
return e.resolver
|
||||
return &gopathResolver{env: e}
|
||||
}
|
||||
e.resolver = &moduleResolver{env: e}
|
||||
return e.resolver
|
||||
return &moduleResolver{env: e}
|
||||
}
|
||||
|
||||
func (e *ProcessEnv) newPackagesConfig(mode packages.LoadMode) *packages.Config {
|
||||
func (e *fixEnv) newPackagesConfig(mode packages.LoadMode) *packages.Config {
|
||||
return &packages.Config{
|
||||
Mode: mode,
|
||||
Dir: e.WorkingDir,
|
||||
|
@ -560,14 +565,14 @@ func (e *ProcessEnv) newPackagesConfig(mode packages.LoadMode) *packages.Config
|
|||
}
|
||||
}
|
||||
|
||||
func (e *ProcessEnv) buildContext() *build.Context {
|
||||
func (e *fixEnv) buildContext() *build.Context {
|
||||
ctx := build.Default
|
||||
ctx.GOROOT = e.GOROOT
|
||||
ctx.GOPATH = e.GOPATH
|
||||
return &ctx
|
||||
}
|
||||
|
||||
func (e *ProcessEnv) invokeGo(args ...string) (*bytes.Buffer, error) {
|
||||
func (e *fixEnv) invokeGo(args ...string) (*bytes.Buffer, error) {
|
||||
cmd := exec.Command("go", args...)
|
||||
stdout := &bytes.Buffer{}
|
||||
stderr := &bytes.Buffer{}
|
||||
|
@ -576,7 +581,7 @@ func (e *ProcessEnv) invokeGo(args ...string) (*bytes.Buffer, error) {
|
|||
cmd.Env = e.env()
|
||||
cmd.Dir = e.WorkingDir
|
||||
|
||||
if e.Debug {
|
||||
if Debug {
|
||||
defer func(start time.Time) { log.Printf("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now())
|
||||
}
|
||||
if err := cmd.Run(); err != nil {
|
||||
|
@ -627,7 +632,7 @@ type resolver interface {
|
|||
|
||||
// gopathResolver implements resolver for GOPATH and module workspaces using go/packages.
|
||||
type goPackagesResolver struct {
|
||||
env *ProcessEnv
|
||||
env *fixEnv
|
||||
}
|
||||
|
||||
func (r *goPackagesResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) {
|
||||
|
@ -675,7 +680,7 @@ func (r *goPackagesResolver) scan(refs references) ([]*pkg, error) {
|
|||
}
|
||||
|
||||
func addExternalCandidates(pass *pass, refs references, filename string) error {
|
||||
dirScan, err := pass.env.getResolver().scan(refs)
|
||||
dirScan, err := pass.fixEnv.getResolver().scan(refs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -702,7 +707,7 @@ func addExternalCandidates(pass *pass, refs references, filename string) error {
|
|||
go func(pkgName string, symbols map[string]bool) {
|
||||
defer wg.Done()
|
||||
|
||||
found, err := findImport(ctx, pass, dirScan, pkgName, symbols, filename)
|
||||
found, err := findImport(ctx, pass.fixEnv, dirScan, pkgName, symbols, filename)
|
||||
|
||||
if err != nil {
|
||||
firstErrOnce.Do(func() {
|
||||
|
@ -773,7 +778,7 @@ func importPathToAssumedName(importPath string) string {
|
|||
|
||||
// gopathResolver implements resolver for GOPATH workspaces.
|
||||
type gopathResolver struct {
|
||||
env *ProcessEnv
|
||||
env *fixEnv
|
||||
}
|
||||
|
||||
func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) {
|
||||
|
@ -786,7 +791,7 @@ func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (
|
|||
|
||||
// importPathToNameGoPath finds out the actual package name, as declared in its .go files.
|
||||
// If there's a problem, it returns "".
|
||||
func importPathToName(env *ProcessEnv, importPath, srcDir string) (packageName string) {
|
||||
func importPathToName(env *fixEnv, importPath, srcDir string) (packageName string) {
|
||||
// Fast path for standard library without going to disk.
|
||||
if _, ok := stdlib[importPath]; ok {
|
||||
return path.Base(importPath) // stdlib packages always match their paths.
|
||||
|
@ -922,7 +927,7 @@ func (r *gopathResolver) scan(_ references) ([]*pkg, error) {
|
|||
dir: dir,
|
||||
})
|
||||
}
|
||||
gopathwalk.Walk(gopathwalk.SrcDirsRoots(r.env.buildContext()), add, gopathwalk.Options{Debug: r.env.Debug, ModulesEnabled: false})
|
||||
gopathwalk.Walk(gopathwalk.SrcDirsRoots(r.env.buildContext()), add, gopathwalk.Options{Debug: Debug, ModulesEnabled: false})
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
@ -941,8 +946,8 @@ func VendorlessPath(ipath string) string {
|
|||
|
||||
// loadExports returns the set of exported symbols in the package at dir.
|
||||
// It returns nil on error or if the package name in dir does not match expectPackage.
|
||||
func loadExports(ctx context.Context, env *ProcessEnv, expectPackage string, pkg *pkg) (map[string]bool, error) {
|
||||
if env.Debug {
|
||||
func loadExports(ctx context.Context, env *fixEnv, expectPackage string, pkg *pkg) (map[string]bool, error) {
|
||||
if Debug {
|
||||
log.Printf("loading exports in dir %s (seeking package %s)", pkg.dir, expectPackage)
|
||||
}
|
||||
if pkg.goPackage != nil {
|
||||
|
@ -1015,7 +1020,7 @@ func loadExports(ctx context.Context, env *ProcessEnv, expectPackage string, pkg
|
|||
}
|
||||
}
|
||||
|
||||
if env.Debug {
|
||||
if Debug {
|
||||
exportList := make([]string, 0, len(exports))
|
||||
for k := range exports {
|
||||
exportList = append(exportList, k)
|
||||
|
@ -1028,7 +1033,7 @@ func loadExports(ctx context.Context, env *ProcessEnv, expectPackage string, pkg
|
|||
|
||||
// findImport searches for a package with the given symbols.
|
||||
// If no package is found, findImport returns ("", false, nil)
|
||||
func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string, symbols map[string]bool, filename string) (*pkg, error) {
|
||||
func findImport(ctx context.Context, env *fixEnv, dirScan []*pkg, pkgName string, symbols map[string]bool, filename string) (*pkg, error) {
|
||||
pkgDir, err := filepath.Abs(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -1038,11 +1043,6 @@ func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string,
|
|||
// Find candidate packages, looking only at their directory names first.
|
||||
var candidates []pkgDistance
|
||||
for _, pkg := range dirScan {
|
||||
if pkg.dir == pkgDir && pass.f.Name.Name == pkgName {
|
||||
// The candidate is in the same directory and has the
|
||||
// same package name. Don't try to import ourselves.
|
||||
continue
|
||||
}
|
||||
if pkgIsCandidate(filename, pkgName, pkg) {
|
||||
candidates = append(candidates, pkgDistance{
|
||||
pkg: pkg,
|
||||
|
@ -1056,7 +1056,7 @@ func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string,
|
|||
// ones. Note that this sorts by the de-vendored name, so
|
||||
// there's no "penalty" for vendoring.
|
||||
sort.Sort(byDistanceOrImportPathShortLength(candidates))
|
||||
if pass.env.Debug {
|
||||
if Debug {
|
||||
for i, c := range candidates {
|
||||
log.Printf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir)
|
||||
}
|
||||
|
@ -1095,9 +1095,9 @@ func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string,
|
|||
wg.Done()
|
||||
}()
|
||||
|
||||
exports, err := loadExports(ctx, pass.env, pkgName, c.pkg)
|
||||
exports, err := loadExports(ctx, env, pkgName, c.pkg)
|
||||
if err != nil {
|
||||
if pass.env.Debug {
|
||||
if Debug {
|
||||
log.Printf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err)
|
||||
}
|
||||
resc <- nil
|
62
vendor/golang.org/x/tools/imports/forward.go
generated
vendored
62
vendor/golang.org/x/tools/imports/forward.go
generated
vendored
|
@ -1,62 +0,0 @@
|
|||
// Package imports implements a Go pretty-printer (like package "go/format")
|
||||
// that also adds or removes import statements as necessary.
|
||||
package imports // import "golang.org/x/tools/imports"
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
|
||||
intimp "golang.org/x/tools/internal/imports"
|
||||
)
|
||||
|
||||
// Options specifies options for processing files.
|
||||
type Options struct {
|
||||
Fragment bool // Accept fragment of a source file (no package statement)
|
||||
AllErrors bool // Report all errors (not just the first 10 on different lines)
|
||||
|
||||
Comments bool // Print comments (true if nil *Options provided)
|
||||
TabIndent bool // Use tabs for indent (true if nil *Options provided)
|
||||
TabWidth int // Tab width (8 if nil *Options provided)
|
||||
|
||||
FormatOnly bool // Disable the insertion and deletion of imports
|
||||
}
|
||||
|
||||
// Debug controls verbose logging.
|
||||
var Debug = false
|
||||
|
||||
// LocalPrefix is a comma-separated string of import path prefixes, which, if
|
||||
// set, instructs Process to sort the import paths with the given prefixes
|
||||
// into another group after 3rd-party packages.
|
||||
var LocalPrefix string
|
||||
|
||||
// Process formats and adjusts imports for the provided file.
|
||||
// If opt is nil the defaults are used.
|
||||
//
|
||||
// Note that filename's directory influences which imports can be chosen,
|
||||
// so it is important that filename be accurate.
|
||||
// To process data ``as if'' it were in filename, pass the data as a non-nil src.
|
||||
func Process(filename string, src []byte, opt *Options) ([]byte, error) {
|
||||
if opt == nil {
|
||||
opt = &Options{Comments: true, TabIndent: true, TabWidth: 8}
|
||||
}
|
||||
intopt := &intimp.Options{
|
||||
Env: &intimp.ProcessEnv{
|
||||
GOPATH: build.Default.GOPATH,
|
||||
GOROOT: build.Default.GOROOT,
|
||||
Debug: Debug,
|
||||
LocalPrefix: LocalPrefix,
|
||||
},
|
||||
AllErrors: opt.AllErrors,
|
||||
Comments: opt.Comments,
|
||||
FormatOnly: opt.FormatOnly,
|
||||
Fragment: opt.Fragment,
|
||||
TabIndent: opt.TabIndent,
|
||||
TabWidth: opt.TabWidth,
|
||||
}
|
||||
return intimp.Process(filename, src, intopt)
|
||||
}
|
||||
|
||||
// VendorlessPath returns the devendorized version of the import path ipath.
|
||||
// For example, VendorlessPath("foo/bar/vendor/a/b") returns "a/b".
|
||||
func VendorlessPath(ipath string) string {
|
||||
return intimp.VendorlessPath(ipath)
|
||||
}
|
|
@ -6,13 +6,14 @@
|
|||
|
||||
// Package imports implements a Go pretty-printer (like package "go/format")
|
||||
// that also adds or removes import statements as necessary.
|
||||
package imports
|
||||
package imports // import "golang.org/x/tools/imports"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/build"
|
||||
"go/format"
|
||||
"go/parser"
|
||||
"go/printer"
|
||||
|
@ -26,10 +27,8 @@ import (
|
|||
"golang.org/x/tools/go/ast/astutil"
|
||||
)
|
||||
|
||||
// Options is golang.org/x/tools/imports.Options with extra internal-only options.
|
||||
// Options specifies options for processing files.
|
||||
type Options struct {
|
||||
Env *ProcessEnv // The environment to use. Note: this contains the cached module and filesystem state.
|
||||
|
||||
Fragment bool // Accept fragment of a source file (no package statement)
|
||||
AllErrors bool // Report all errors (not just the first 10 on different lines)
|
||||
|
||||
|
@ -40,8 +39,21 @@ type Options struct {
|
|||
FormatOnly bool // Disable the insertion and deletion of imports
|
||||
}
|
||||
|
||||
// Process implements golang.org/x/tools/imports.Process with explicit context in env.
|
||||
// Process formats and adjusts imports for the provided file.
|
||||
// If opt is nil the defaults are used.
|
||||
//
|
||||
// Note that filename's directory influences which imports can be chosen,
|
||||
// so it is important that filename be accurate.
|
||||
// To process data ``as if'' it were in filename, pass the data as a non-nil src.
|
||||
func Process(filename string, src []byte, opt *Options) ([]byte, error) {
|
||||
env := &fixEnv{GOPATH: build.Default.GOPATH, GOROOT: build.Default.GOROOT}
|
||||
return process(filename, src, opt, env)
|
||||
}
|
||||
|
||||
func process(filename string, src []byte, opt *Options, env *fixEnv) ([]byte, error) {
|
||||
if opt == nil {
|
||||
opt = &Options{Comments: true, TabIndent: true, TabWidth: 8}
|
||||
}
|
||||
if src == nil {
|
||||
b, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
|
@ -57,12 +69,12 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) {
|
|||
}
|
||||
|
||||
if !opt.FormatOnly {
|
||||
if err := fixImports(fileSet, file, filename, opt.Env); err != nil {
|
||||
if err := fixImports(fileSet, file, filename, env); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
sortImports(opt.Env, fileSet, file)
|
||||
sortImports(fileSet, file)
|
||||
imps := astutil.Imports(fileSet, file)
|
||||
var spacesBefore []string // import paths we need spaces before
|
||||
for _, impSection := range imps {
|
||||
|
@ -73,7 +85,7 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) {
|
|||
lastGroup := -1
|
||||
for _, importSpec := range impSection {
|
||||
importPath, _ := strconv.Unquote(importSpec.Path.Value)
|
||||
groupNum := importGroup(opt.Env, importPath)
|
||||
groupNum := importGroup(importPath)
|
||||
if groupNum != lastGroup && lastGroup != -1 {
|
||||
spacesBefore = append(spacesBefore, importPath)
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
// standard library. The file is intended to be built as part of the imports
|
||||
// package, so that the package may be used in environments where a GOROOT is
|
||||
// not available (such as App Engine).
|
||||
package imports
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
|
@ -3,7 +3,7 @@
|
|||
// mkstdlib generates the zstdlib.go file, containing the Go standard
|
||||
// library API symbols. It's baked into the binary to avoid scanning
|
||||
// GOPATH in the common case.
|
||||
package imports
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -14,7 +14,6 @@ import (
|
|||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
|
@ -60,10 +59,6 @@ func main() {
|
|||
mustOpen(api("go1.10.txt")),
|
||||
mustOpen(api("go1.11.txt")),
|
||||
mustOpen(api("go1.12.txt")),
|
||||
|
||||
// The API of the syscall/js package needs to be computed explicitly,
|
||||
// because it's not included in the GOROOT/api/go1.*.txt files at this time.
|
||||
syscallJSAPI(),
|
||||
)
|
||||
sc := bufio.NewScanner(f)
|
||||
|
||||
|
@ -115,18 +110,3 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// syscallJSAPI returns the API of the syscall/js package.
|
||||
// It's computed from the contents of $(go env GOROOT)/src/syscall/js.
|
||||
func syscallJSAPI() io.Reader {
|
||||
var exeSuffix string
|
||||
if runtime.GOOS == "windows" {
|
||||
exeSuffix = ".exe"
|
||||
}
|
||||
cmd := exec.Command("go"+exeSuffix, "run", "cmd/api", "-contexts", "js-wasm", "syscall/js")
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
return bytes.NewReader(out)
|
||||
}
|
|
@ -22,7 +22,7 @@ import (
|
|||
// moduleResolver implements resolver for modules using the go command as little
|
||||
// as feasible.
|
||||
type moduleResolver struct {
|
||||
env *ProcessEnv
|
||||
env *fixEnv
|
||||
|
||||
initialized bool
|
||||
main *moduleJSON
|
||||
|
@ -62,7 +62,7 @@ func (r *moduleResolver) init() error {
|
|||
return err
|
||||
}
|
||||
if mod.Dir == "" {
|
||||
if r.env.Debug {
|
||||
if Debug {
|
||||
log.Printf("module %v has not been downloaded and will be ignored", mod.Path)
|
||||
}
|
||||
// Can't do anything with a module that's not downloaded.
|
||||
|
@ -253,7 +253,7 @@ func (r *moduleResolver) scan(_ references) ([]*pkg, error) {
|
|||
matches := modCacheRegexp.FindStringSubmatch(subdir)
|
||||
modPath, err := module.DecodePath(filepath.ToSlash(matches[1]))
|
||||
if err != nil {
|
||||
if r.env.Debug {
|
||||
if Debug {
|
||||
log.Printf("decoding module cache path %q: %v", subdir, err)
|
||||
}
|
||||
return
|
||||
|
@ -303,7 +303,7 @@ func (r *moduleResolver) scan(_ references) ([]*pkg, error) {
|
|||
importPathShort: VendorlessPath(importPath),
|
||||
dir: dir,
|
||||
})
|
||||
}, gopathwalk.Options{Debug: r.env.Debug, ModulesEnabled: true})
|
||||
}, gopathwalk.Options{Debug: Debug, ModulesEnabled: true})
|
||||
return result, nil
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
// sortImports sorts runs of consecutive import lines in import blocks in f.
|
||||
// It also removes duplicate imports when it is possible to do so without data loss.
|
||||
func sortImports(env *ProcessEnv, fset *token.FileSet, f *ast.File) {
|
||||
func sortImports(fset *token.FileSet, f *ast.File) {
|
||||
for i, d := range f.Decls {
|
||||
d, ok := d.(*ast.GenDecl)
|
||||
if !ok || d.Tok != token.IMPORT {
|
||||
|
@ -40,11 +40,11 @@ func sortImports(env *ProcessEnv, fset *token.FileSet, f *ast.File) {
|
|||
for j, s := range d.Specs {
|
||||
if j > i && fset.Position(s.Pos()).Line > 1+fset.Position(d.Specs[j-1].End()).Line {
|
||||
// j begins a new run. End this one.
|
||||
specs = append(specs, sortSpecs(env, fset, f, d.Specs[i:j])...)
|
||||
specs = append(specs, sortSpecs(fset, f, d.Specs[i:j])...)
|
||||
i = j
|
||||
}
|
||||
}
|
||||
specs = append(specs, sortSpecs(env, fset, f, d.Specs[i:])...)
|
||||
specs = append(specs, sortSpecs(fset, f, d.Specs[i:])...)
|
||||
d.Specs = specs
|
||||
|
||||
// Deduping can leave a blank line before the rparen; clean that up.
|
||||
|
@ -95,7 +95,7 @@ type posSpan struct {
|
|||
End token.Pos
|
||||
}
|
||||
|
||||
func sortSpecs(env *ProcessEnv, fset *token.FileSet, f *ast.File, specs []ast.Spec) []ast.Spec {
|
||||
func sortSpecs(fset *token.FileSet, f *ast.File, specs []ast.Spec) []ast.Spec {
|
||||
// Can't short-circuit here even if specs are already sorted,
|
||||
// since they might yet need deduplication.
|
||||
// A lone import, however, may be safely ignored.
|
||||
|
@ -144,7 +144,7 @@ func sortSpecs(env *ProcessEnv, fset *token.FileSet, f *ast.File, specs []ast.Sp
|
|||
// Reassign the import paths to have the same position sequence.
|
||||
// Reassign each comment to abut the end of its spec.
|
||||
// Sort the comments by new position.
|
||||
sort.Sort(byImportSpec{env, specs})
|
||||
sort.Sort(byImportSpec(specs))
|
||||
|
||||
// Dedup. Thanks to our sorting, we can just consider
|
||||
// adjacent pairs of imports.
|
||||
|
@ -197,19 +197,16 @@ func sortSpecs(env *ProcessEnv, fset *token.FileSet, f *ast.File, specs []ast.Sp
|
|||
return specs
|
||||
}
|
||||
|
||||
type byImportSpec struct {
|
||||
env *ProcessEnv
|
||||
specs []ast.Spec // slice of *ast.ImportSpec
|
||||
}
|
||||
type byImportSpec []ast.Spec // slice of *ast.ImportSpec
|
||||
|
||||
func (x byImportSpec) Len() int { return len(x.specs) }
|
||||
func (x byImportSpec) Swap(i, j int) { x.specs[i], x.specs[j] = x.specs[j], x.specs[i] }
|
||||
func (x byImportSpec) Len() int { return len(x) }
|
||||
func (x byImportSpec) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
|
||||
func (x byImportSpec) Less(i, j int) bool {
|
||||
ipath := importPath(x.specs[i])
|
||||
jpath := importPath(x.specs[j])
|
||||
ipath := importPath(x[i])
|
||||
jpath := importPath(x[j])
|
||||
|
||||
igroup := importGroup(x.env, ipath)
|
||||
jgroup := importGroup(x.env, jpath)
|
||||
igroup := importGroup(ipath)
|
||||
jgroup := importGroup(jpath)
|
||||
if igroup != jgroup {
|
||||
return igroup < jgroup
|
||||
}
|
||||
|
@ -217,13 +214,13 @@ func (x byImportSpec) Less(i, j int) bool {
|
|||
if ipath != jpath {
|
||||
return ipath < jpath
|
||||
}
|
||||
iname := importName(x.specs[i])
|
||||
jname := importName(x.specs[j])
|
||||
iname := importName(x[i])
|
||||
jname := importName(x[j])
|
||||
|
||||
if iname != jname {
|
||||
return iname < jname
|
||||
}
|
||||
return importComment(x.specs[i]) < importComment(x.specs[j])
|
||||
return importComment(x[i]) < importComment(x[j])
|
||||
}
|
||||
|
||||
type byCommentPos []*ast.CommentGroup
|
|
@ -9783,29 +9783,6 @@ var stdlib = map[string]map[string]bool{
|
|||
"XP1_UNI_RECV": true,
|
||||
"XP1_UNI_SEND": true,
|
||||
},
|
||||
"syscall/js": map[string]bool{
|
||||
"Error": true,
|
||||
"Func": true,
|
||||
"FuncOf": true,
|
||||
"Global": true,
|
||||
"Null": true,
|
||||
"Type": true,
|
||||
"TypeBoolean": true,
|
||||
"TypeFunction": true,
|
||||
"TypeNull": true,
|
||||
"TypeNumber": true,
|
||||
"TypeObject": true,
|
||||
"TypeString": true,
|
||||
"TypeSymbol": true,
|
||||
"TypeUndefined": true,
|
||||
"TypedArray": true,
|
||||
"TypedArrayOf": true,
|
||||
"Undefined": true,
|
||||
"Value": true,
|
||||
"ValueError": true,
|
||||
"ValueOf": true,
|
||||
"Wrapper": true,
|
||||
},
|
||||
"testing": map[string]bool{
|
||||
"AllocsPerRun": true,
|
||||
"B": true,
|
37
vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go
generated
vendored
37
vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go
generated
vendored
|
@ -19,24 +19,25 @@ var _ = math.Inf
|
|||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
// The `Status` type defines a logical error model that is suitable for different
|
||||
// programming environments, including REST APIs and RPC APIs. It is used by
|
||||
// [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
// The `Status` type defines a logical error model that is suitable for
|
||||
// different programming environments, including REST APIs and RPC APIs. It is
|
||||
// used by [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
//
|
||||
// - Simple to use and understand for most users
|
||||
// - Flexible enough to meet unexpected needs
|
||||
//
|
||||
// # Overview
|
||||
//
|
||||
// The `Status` message contains three pieces of data: error code, error message,
|
||||
// and error details. The error code should be an enum value of
|
||||
// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
|
||||
// error message should be a developer-facing English message that helps
|
||||
// developers *understand* and *resolve* the error. If a localized user-facing
|
||||
// error message is needed, put the localized message in the error details or
|
||||
// localize it in the client. The optional error details may contain arbitrary
|
||||
// information about the error. There is a predefined set of error detail types
|
||||
// in the package `google.rpc` that can be used for common error conditions.
|
||||
// The `Status` message contains three pieces of data: error code, error
|
||||
// message, and error details. The error code should be an enum value of
|
||||
// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes
|
||||
// if needed. The error message should be a developer-facing English message
|
||||
// that helps developers *understand* and *resolve* the error. If a localized
|
||||
// user-facing error message is needed, put the localized message in the error
|
||||
// details or localize it in the client. The optional error details may contain
|
||||
// arbitrary information about the error. There is a predefined set of error
|
||||
// detail types in the package `google.rpc` that can be used for common error
|
||||
// conditions.
|
||||
//
|
||||
// # Language mapping
|
||||
//
|
||||
|
@ -72,11 +73,13 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|||
// - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
// be used directly after any stripping needed for security/privacy reasons.
|
||||
type Status struct {
|
||||
// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
||||
// The status code, which should be an enum value of
|
||||
// [google.rpc.Code][google.rpc.Code].
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
// A developer-facing error message, which should be in English. Any
|
||||
// user-facing error message should be localized and sent in the
|
||||
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
|
||||
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
|
||||
// by the client.
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
// A list of messages that carry the error details. There is a common set of
|
||||
// message types for APIs to use.
|
||||
|
@ -90,7 +93,7 @@ func (m *Status) Reset() { *m = Status{} }
|
|||
func (m *Status) String() string { return proto.CompactTextString(m) }
|
||||
func (*Status) ProtoMessage() {}
|
||||
func (*Status) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_status_c6e4de62dcdf2edf, []int{0}
|
||||
return fileDescriptor_status_ced6ddf76350620b, []int{0}
|
||||
}
|
||||
func (m *Status) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Status.Unmarshal(m, b)
|
||||
|
@ -135,9 +138,9 @@ func init() {
|
|||
proto.RegisterType((*Status)(nil), "google.rpc.Status")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_status_c6e4de62dcdf2edf) }
|
||||
func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_status_ced6ddf76350620b) }
|
||||
|
||||
var fileDescriptor_status_c6e4de62dcdf2edf = []byte{
|
||||
var fileDescriptor_status_ced6ddf76350620b = []byte{
|
||||
// 209 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f,
|
||||
0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28,
|
||||
|
|
6
vendor/k8s.io/api/admission/v1beta1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/admission/v1beta1/generated.pb.go
generated
vendored
|
@ -38,7 +38,7 @@ import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v
|
|||
|
||||
import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -247,7 +247,7 @@ func (m *AdmissionResponse) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.AuditAnnotations {
|
||||
keysForAuditAnnotations = append(keysForAuditAnnotations, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForAuditAnnotations)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations)
|
||||
for _, k := range keysForAuditAnnotations {
|
||||
dAtA[i] = 0x32
|
||||
i++
|
||||
|
@ -443,7 +443,7 @@ func (this *AdmissionResponse) String() string {
|
|||
for k := range this.AuditAnnotations {
|
||||
keysForAuditAnnotations = append(keysForAuditAnnotations, k)
|
||||
}
|
||||
sortkeys.Strings(keysForAuditAnnotations)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations)
|
||||
mapStringForAuditAnnotations := "map[string]string{"
|
||||
for _, k := range keysForAuditAnnotations {
|
||||
mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k])
|
||||
|
|
10
vendor/k8s.io/api/apps/v1beta1/generated.pb.go
generated
vendored
10
vendor/k8s.io/api/apps/v1beta1/generated.pb.go
generated
vendored
|
@ -57,7 +57,7 @@ import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v
|
|||
|
||||
import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -417,7 +417,7 @@ func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.UpdatedAnnotations {
|
||||
keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
for _, k := range keysForUpdatedAnnotations {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -778,7 +778,7 @@ func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Selector {
|
||||
keysForSelector = append(keysForSelector, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForSelector)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
|
||||
for _, k := range keysForSelector {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -1506,7 +1506,7 @@ func (this *DeploymentRollback) String() string {
|
|||
for k := range this.UpdatedAnnotations {
|
||||
keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
|
||||
}
|
||||
sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
mapStringForUpdatedAnnotations := "map[string]string{"
|
||||
for _, k := range keysForUpdatedAnnotations {
|
||||
mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
|
||||
|
@ -1627,7 +1627,7 @@ func (this *ScaleStatus) String() string {
|
|||
for k := range this.Selector {
|
||||
keysForSelector = append(keysForSelector, k)
|
||||
}
|
||||
sortkeys.Strings(keysForSelector)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
|
||||
mapStringForSelector := "map[string]string{"
|
||||
for _, k := range keysForSelector {
|
||||
mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
|
||||
|
|
6
vendor/k8s.io/api/apps/v1beta2/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/apps/v1beta2/generated.pb.go
generated
vendored
|
@ -67,7 +67,7 @@ import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v
|
|||
|
||||
import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -1259,7 +1259,7 @@ func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Selector {
|
||||
keysForSelector = append(keysForSelector, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForSelector)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
|
||||
for _, k := range keysForSelector {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -2378,7 +2378,7 @@ func (this *ScaleStatus) String() string {
|
|||
for k := range this.Selector {
|
||||
keysForSelector = append(keysForSelector, k)
|
||||
}
|
||||
sortkeys.Strings(keysForSelector)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
|
||||
mapStringForSelector := "map[string]string{"
|
||||
for _, k := range keysForSelector {
|
||||
mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
|
||||
|
|
6
vendor/k8s.io/api/authentication/v1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/authentication/v1/generated.pb.go
generated
vendored
|
@ -42,7 +42,7 @@ import math "math"
|
|||
|
||||
import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -469,7 +469,7 @@ func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Extra {
|
||||
keysForExtra = append(keysForExtra, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
for _, k := range keysForExtra {
|
||||
dAtA[i] = 0x22
|
||||
i++
|
||||
|
@ -747,7 +747,7 @@ func (this *UserInfo) String() string {
|
|||
for k := range this.Extra {
|
||||
keysForExtra = append(keysForExtra, k)
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
mapStringForExtra := "map[string]ExtraValue{"
|
||||
for _, k := range keysForExtra {
|
||||
mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
|
||||
|
|
6
vendor/k8s.io/api/authentication/v1beta1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/authentication/v1beta1/generated.pb.go
generated
vendored
|
@ -36,7 +36,7 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -289,7 +289,7 @@ func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Extra {
|
||||
keysForExtra = append(keysForExtra, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
for _, k := range keysForExtra {
|
||||
dAtA[i] = 0x22
|
||||
i++
|
||||
|
@ -464,7 +464,7 @@ func (this *UserInfo) String() string {
|
|||
for k := range this.Extra {
|
||||
keysForExtra = append(keysForExtra, k)
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
mapStringForExtra := "map[string]ExtraValue{"
|
||||
for _, k := range keysForExtra {
|
||||
mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
|
||||
|
|
6
vendor/k8s.io/api/authorization/v1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/authorization/v1/generated.pb.go
generated
vendored
|
@ -45,7 +45,7 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -665,7 +665,7 @@ func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Extra {
|
||||
keysForExtra = append(keysForExtra, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
for _, k := range keysForExtra {
|
||||
dAtA[i] = 0x2a
|
||||
i++
|
||||
|
@ -1170,7 +1170,7 @@ func (this *SubjectAccessReviewSpec) String() string {
|
|||
for k := range this.Extra {
|
||||
keysForExtra = append(keysForExtra, k)
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
mapStringForExtra := "map[string]ExtraValue{"
|
||||
for _, k := range keysForExtra {
|
||||
mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
|
||||
|
|
6
vendor/k8s.io/api/authorization/v1beta1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/authorization/v1beta1/generated.pb.go
generated
vendored
|
@ -45,7 +45,7 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -665,7 +665,7 @@ func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Extra {
|
||||
keysForExtra = append(keysForExtra, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
for _, k := range keysForExtra {
|
||||
dAtA[i] = 0x2a
|
||||
i++
|
||||
|
@ -1170,7 +1170,7 @@ func (this *SubjectAccessReviewSpec) String() string {
|
|||
for k := range this.Extra {
|
||||
keysForExtra = append(keysForExtra, k)
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
mapStringForExtra := "map[string]ExtraValue{"
|
||||
for _, k := range keysForExtra {
|
||||
mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
|
||||
|
|
6
vendor/k8s.io/api/certificates/v1beta1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/certificates/v1beta1/generated.pb.go
generated
vendored
|
@ -37,7 +37,7 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -279,7 +279,7 @@ func (m *CertificateSigningRequestSpec) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Extra {
|
||||
keysForExtra = append(keysForExtra, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
for _, k := range keysForExtra {
|
||||
dAtA[i] = 0x32
|
||||
i++
|
||||
|
@ -546,7 +546,7 @@ func (this *CertificateSigningRequestSpec) String() string {
|
|||
for k := range this.Extra {
|
||||
keysForExtra = append(keysForExtra, k)
|
||||
}
|
||||
sortkeys.Strings(keysForExtra)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
|
||||
mapStringForExtra := "map[string]ExtraValue{"
|
||||
for _, k := range keysForExtra {
|
||||
mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
|
||||
|
|
2852
vendor/k8s.io/api/core/v1/generated.pb.go
generated
vendored
2852
vendor/k8s.io/api/core/v1/generated.pb.go
generated
vendored
File diff suppressed because it is too large
Load diff
37
vendor/k8s.io/api/core/v1/generated.proto
generated
vendored
37
vendor/k8s.io/api/core/v1/generated.proto
generated
vendored
|
@ -2084,13 +2084,6 @@ message NodeSpec {
|
|||
// +optional
|
||||
optional string podCIDR = 1;
|
||||
|
||||
// podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this
|
||||
// field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for
|
||||
// each of IPv4 and IPv6.
|
||||
// +optional
|
||||
// +patchStrategy=merge
|
||||
repeated string podCIDRs = 7;
|
||||
|
||||
// ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
|
||||
// +optional
|
||||
optional string providerID = 3;
|
||||
|
@ -2143,9 +2136,6 @@ message NodeStatus {
|
|||
// List of addresses reachable to the node.
|
||||
// Queried from cloud provider, if available.
|
||||
// More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
|
||||
// Note: This field is declared as mergeable, but the merge key is not sufficiently
|
||||
// unique, which can cause data corruption when it is merged. Callers should instead
|
||||
// use a full-replacement patch. See http://pr.k8s.io/79391 for an example.
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
|
@ -2852,14 +2842,6 @@ message PodExecOptions {
|
|||
repeated string command = 6;
|
||||
}
|
||||
|
||||
// IP address information for entries in the (plural) PodIPs field.
|
||||
// Each entry includes:
|
||||
// IP: An IP address allocated to the pod. Routable at least within the cluster.
|
||||
message PodIP {
|
||||
// ip is an IP address (IPv4 or IPv6) assigned to the pod
|
||||
optional string ip = 1;
|
||||
}
|
||||
|
||||
// PodList is a list of Pods.
|
||||
message PodList {
|
||||
// Standard list metadata.
|
||||
|
@ -3233,17 +3215,6 @@ message PodSpec {
|
|||
// This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.
|
||||
// +optional
|
||||
optional string preemptionPolicy = 31;
|
||||
|
||||
// Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
|
||||
// This field will be autopopulated at admission time by the RuntimeClass admission controller. If
|
||||
// the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests.
|
||||
// The RuntimeClass admission controller will reject Pod create requests which have the overhead already
|
||||
// set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value
|
||||
// defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero.
|
||||
// More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
|
||||
// This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.
|
||||
// +optional
|
||||
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> overhead = 32;
|
||||
}
|
||||
|
||||
// PodStatus represents information about the status of a pod. Status may trail the actual
|
||||
|
@ -3306,14 +3277,6 @@ message PodStatus {
|
|||
// +optional
|
||||
optional string podIP = 6;
|
||||
|
||||
// podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must
|
||||
// match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list
|
||||
// is empty if no IPs have been allocated yet.
|
||||
// +optional
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=ip
|
||||
repeated PodIP podIPs = 12;
|
||||
|
||||
// RFC 3339 date and time at which the object was acknowledged by the Kubelet.
|
||||
// This is before the Kubelet pulled the container image(s) for the pod.
|
||||
// +optional
|
||||
|
|
40
vendor/k8s.io/api/core/v1/types.go
generated
vendored
40
vendor/k8s.io/api/core/v1/types.go
generated
vendored
|
@ -3001,16 +3001,6 @@ type PodSpec struct {
|
|||
// This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.
|
||||
// +optional
|
||||
PreemptionPolicy *PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,31,opt,name=preemptionPolicy"`
|
||||
// Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
|
||||
// This field will be autopopulated at admission time by the RuntimeClass admission controller. If
|
||||
// the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests.
|
||||
// The RuntimeClass admission controller will reject Pod create requests which have the overhead already
|
||||
// set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value
|
||||
// defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero.
|
||||
// More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
|
||||
// This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.
|
||||
// +optional
|
||||
Overhead ResourceList `json:"overhead,omitempty" protobuf:"bytes,32,opt,name=overhead"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -3126,14 +3116,6 @@ type PodDNSConfigOption struct {
|
|||
Value *string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||
}
|
||||
|
||||
// IP address information for entries in the (plural) PodIPs field.
|
||||
// Each entry includes:
|
||||
// IP: An IP address allocated to the pod. Routable at least within the cluster.
|
||||
type PodIP struct {
|
||||
// ip is an IP address (IPv4 or IPv6) assigned to the pod
|
||||
IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
|
||||
}
|
||||
|
||||
// PodStatus represents information about the status of a pod. Status may trail the actual
|
||||
// state of a system, especially if the node that hosts the pod cannot contact the control
|
||||
// plane.
|
||||
|
@ -3189,14 +3171,6 @@ type PodStatus struct {
|
|||
// +optional
|
||||
PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"`
|
||||
|
||||
// podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must
|
||||
// match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list
|
||||
// is empty if no IPs have been allocated yet.
|
||||
// +optional
|
||||
// +patchStrategy=merge
|
||||
// +patchMergeKey=ip
|
||||
PodIPs []PodIP `json:"podIPs,omitempty" protobuf:"bytes,12,rep,name=podIPs" patchStrategy:"merge" patchMergeKey:"ip"`
|
||||
|
||||
// RFC 3339 date and time at which the object was acknowledged by the Kubelet.
|
||||
// This is before the Kubelet pulled the container image(s) for the pod.
|
||||
// +optional
|
||||
|
@ -3917,14 +3891,6 @@ type NodeSpec struct {
|
|||
// PodCIDR represents the pod IP range assigned to the node.
|
||||
// +optional
|
||||
PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"`
|
||||
|
||||
// podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this
|
||||
// field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for
|
||||
// each of IPv4 and IPv6.
|
||||
// +optional
|
||||
// +patchStrategy=merge
|
||||
PodCIDRs []string `json:"podCIDRs,omitempty" protobuf:"bytes,7,opt,name=podCIDRs" patchStrategy:"merge"`
|
||||
|
||||
// ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
|
||||
// +optional
|
||||
ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"`
|
||||
|
@ -4106,9 +4072,6 @@ type NodeStatus struct {
|
|||
// List of addresses reachable to the node.
|
||||
// Queried from cloud provider, if available.
|
||||
// More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
|
||||
// Note: This field is declared as mergeable, but the merge key is not sufficiently
|
||||
// unique, which can cause data corruption when it is merged. Callers should instead
|
||||
// use a full-replacement patch. See http://pr.k8s.io/79391 for an example.
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
|
@ -4208,6 +4171,9 @@ type NodeConditionType string
|
|||
const (
|
||||
// NodeReady means kubelet is healthy and ready to accept pods.
|
||||
NodeReady NodeConditionType = "Ready"
|
||||
// NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk
|
||||
// space on the node.
|
||||
NodeOutOfDisk NodeConditionType = "OutOfDisk"
|
||||
// NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
|
||||
NodeMemoryPressure NodeConditionType = "MemoryPressure"
|
||||
// NodeDiskPressure means the kubelet is under pressure due to insufficient available disk.
|
||||
|
|
14
vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
generated
vendored
14
vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
generated
vendored
|
@ -1112,7 +1112,6 @@ func (NodeSelectorTerm) SwaggerDoc() map[string]string {
|
|||
var map_NodeSpec = map[string]string{
|
||||
"": "NodeSpec describes the attributes that a node is created with.",
|
||||
"podCIDR": "PodCIDR represents the pod IP range assigned to the node.",
|
||||
"podCIDRs": "podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.",
|
||||
"providerID": "ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>",
|
||||
"unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration",
|
||||
"taints": "If specified, the node's taints.",
|
||||
|
@ -1130,7 +1129,7 @@ var map_NodeStatus = map[string]string{
|
|||
"allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.",
|
||||
"phase": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.",
|
||||
"conditions": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition",
|
||||
"addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.",
|
||||
"addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses",
|
||||
"daemonEndpoints": "Endpoints of daemons running on the Node.",
|
||||
"nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info",
|
||||
"images": "List of container images on this node",
|
||||
|
@ -1447,15 +1446,6 @@ func (PodExecOptions) SwaggerDoc() map[string]string {
|
|||
return map_PodExecOptions
|
||||
}
|
||||
|
||||
var map_PodIP = map[string]string{
|
||||
"": "IP address information for entries in the (plural) PodIPs field. Each entry includes:\n IP: An IP address allocated to the pod. Routable at least within the cluster.",
|
||||
"ip": "ip is an IP address (IPv4 or IPv6) assigned to the pod",
|
||||
}
|
||||
|
||||
func (PodIP) SwaggerDoc() map[string]string {
|
||||
return map_PodIP
|
||||
}
|
||||
|
||||
var map_PodList = map[string]string{
|
||||
"": "PodList is a list of Pods.",
|
||||
"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
|
||||
|
@ -1567,7 +1557,6 @@ var map_PodSpec = map[string]string{
|
|||
"runtimeClassName": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14.",
|
||||
"enableServiceLinks": "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.",
|
||||
"preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.",
|
||||
"overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.",
|
||||
}
|
||||
|
||||
func (PodSpec) SwaggerDoc() map[string]string {
|
||||
|
@ -1583,7 +1572,6 @@ var map_PodStatus = map[string]string{
|
|||
"nominatedNodeName": "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.",
|
||||
"hostIP": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.",
|
||||
"podIP": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
|
||||
"podIPs": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.",
|
||||
"startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.",
|
||||
"initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
|
||||
"containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
|
||||
|
|
33
vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
generated
vendored
33
vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go
generated
vendored
|
@ -2470,11 +2470,6 @@ func (in *NodeSelectorTerm) DeepCopy() *NodeSelectorTerm {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeSpec) DeepCopyInto(out *NodeSpec) {
|
||||
*out = *in
|
||||
if in.PodCIDRs != nil {
|
||||
in, out := &in.PodCIDRs, &out.PodCIDRs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]Taint, len(*in))
|
||||
|
@ -3303,22 +3298,6 @@ func (in *PodExecOptions) DeepCopyObject() runtime.Object {
|
|||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodIP) DeepCopyInto(out *PodIP) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIP.
|
||||
func (in *PodIP) DeepCopy() *PodIP {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodIP)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodList) DeepCopyInto(out *PodList) {
|
||||
*out = *in
|
||||
|
@ -3654,13 +3633,6 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
|
|||
*out = new(PreemptionPolicy)
|
||||
**out = **in
|
||||
}
|
||||
if in.Overhead != nil {
|
||||
in, out := &in.Overhead, &out.Overhead
|
||||
*out = make(ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -3684,11 +3656,6 @@ func (in *PodStatus) DeepCopyInto(out *PodStatus) {
|
|||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.PodIPs != nil {
|
||||
in, out := &in.PodIPs, &out.PodIPs
|
||||
*out = make([]PodIP, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.StartTime != nil {
|
||||
in, out := &in.StartTime, &out.StartTime
|
||||
*out = (*in).DeepCopy()
|
||||
|
|
10
vendor/k8s.io/api/extensions/v1beta1/generated.pb.go
generated
vendored
10
vendor/k8s.io/api/extensions/v1beta1/generated.pb.go
generated
vendored
|
@ -93,7 +93,7 @@ import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v
|
|||
|
||||
import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -910,7 +910,7 @@ func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.UpdatedAnnotations {
|
||||
keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
for _, k := range keysForUpdatedAnnotations {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -2782,7 +2782,7 @@ func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Selector {
|
||||
keysForSelector = append(keysForSelector, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForSelector)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
|
||||
for _, k := range keysForSelector {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -3891,7 +3891,7 @@ func (this *DeploymentRollback) String() string {
|
|||
for k := range this.UpdatedAnnotations {
|
||||
keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
|
||||
}
|
||||
sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
|
||||
mapStringForUpdatedAnnotations := "map[string]string{"
|
||||
for _, k := range keysForUpdatedAnnotations {
|
||||
mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
|
||||
|
@ -4418,7 +4418,7 @@ func (this *ScaleStatus) String() string {
|
|||
for k := range this.Selector {
|
||||
keysForSelector = append(keysForSelector, k)
|
||||
}
|
||||
sortkeys.Strings(keysForSelector)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
|
||||
mapStringForSelector := "map[string]string{"
|
||||
for _, k := range keysForSelector {
|
||||
mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
|
||||
|
|
411
vendor/k8s.io/api/node/v1alpha1/generated.pb.go
generated
vendored
411
vendor/k8s.io/api/node/v1alpha1/generated.pb.go
generated
vendored
|
@ -24,7 +24,6 @@ limitations under the License.
|
|||
k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Overhead
|
||||
RuntimeClass
|
||||
RuntimeClassList
|
||||
RuntimeClassSpec
|
||||
|
@ -35,12 +34,6 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
|
||||
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
|
@ -57,77 +50,23 @@ var _ = math.Inf
|
|||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
func (m *Overhead) Reset() { *m = Overhead{} }
|
||||
func (*Overhead) ProtoMessage() {}
|
||||
func (*Overhead) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *RuntimeClass) Reset() { *m = RuntimeClass{} }
|
||||
func (*RuntimeClass) ProtoMessage() {}
|
||||
func (*RuntimeClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
func (*RuntimeClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} }
|
||||
func (*RuntimeClassList) ProtoMessage() {}
|
||||
func (*RuntimeClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
|
||||
func (*RuntimeClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
|
||||
func (m *RuntimeClassSpec) Reset() { *m = RuntimeClassSpec{} }
|
||||
func (*RuntimeClassSpec) ProtoMessage() {}
|
||||
func (*RuntimeClassSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
|
||||
func (*RuntimeClassSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Overhead)(nil), "k8s.io.api.node.v1alpha1.Overhead")
|
||||
proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1alpha1.RuntimeClass")
|
||||
proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1alpha1.RuntimeClassList")
|
||||
proto.RegisterType((*RuntimeClassSpec)(nil), "k8s.io.api.node.v1alpha1.RuntimeClassSpec")
|
||||
}
|
||||
func (m *Overhead) 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 *Overhead) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.PodFixed) > 0 {
|
||||
keysForPodFixed := make([]string, 0, len(m.PodFixed))
|
||||
for k := range m.PodFixed {
|
||||
keysForPodFixed = append(keysForPodFixed, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForPodFixed)
|
||||
for _, k := range keysForPodFixed {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
v := m.PodFixed[k8s_io_api_core_v1.ResourceName(k)]
|
||||
msgSize := 0
|
||||
if (&v) != nil {
|
||||
msgSize = (&v).Size()
|
||||
msgSize += 1 + sovGenerated(uint64(msgSize))
|
||||
}
|
||||
mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
|
||||
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((&v).Size()))
|
||||
n1, err := (&v).MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n1
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClass) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -146,19 +85,19 @@ func (m *RuntimeClass) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
|
||||
n2, err := m.ObjectMeta.MarshalTo(dAtA[i:])
|
||||
n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n1
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
|
||||
n2, err := m.Spec.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n2
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
|
||||
n3, err := m.Spec.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n3
|
||||
return i, nil
|
||||
}
|
||||
|
||||
|
@ -180,11 +119,11 @@ func (m *RuntimeClassList) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
|
||||
n4, err := m.ListMeta.MarshalTo(dAtA[i:])
|
||||
n3, err := m.ListMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n4
|
||||
i += n3
|
||||
if len(m.Items) > 0 {
|
||||
for _, msg := range m.Items {
|
||||
dAtA[i] = 0x12
|
||||
|
@ -219,16 +158,6 @@ func (m *RuntimeClassSpec) MarshalTo(dAtA []byte) (int, error) {
|
|||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(len(m.RuntimeHandler)))
|
||||
i += copy(dAtA[i:], m.RuntimeHandler)
|
||||
if m.Overhead != nil {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.Overhead.Size()))
|
||||
n5, err := m.Overhead.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n5
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
|
@ -241,21 +170,6 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
|
|||
dAtA[offset] = uint8(v)
|
||||
return offset + 1
|
||||
}
|
||||
func (m *Overhead) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.PodFixed) > 0 {
|
||||
for k, v := range m.PodFixed {
|
||||
_ = k
|
||||
_ = v
|
||||
l = v.Size()
|
||||
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
|
||||
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *RuntimeClass) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
|
@ -285,10 +199,6 @@ func (m *RuntimeClassSpec) Size() (n int) {
|
|||
_ = l
|
||||
l = len(m.RuntimeHandler)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
if m.Overhead != nil {
|
||||
l = m.Overhead.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
@ -305,26 +215,6 @@ func sovGenerated(x uint64) (n int) {
|
|||
func sozGenerated(x uint64) (n int) {
|
||||
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *Overhead) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
keysForPodFixed := make([]string, 0, len(this.PodFixed))
|
||||
for k := range this.PodFixed {
|
||||
keysForPodFixed = append(keysForPodFixed, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForPodFixed)
|
||||
mapStringForPodFixed := "k8s_io_api_core_v1.ResourceList{"
|
||||
for _, k := range keysForPodFixed {
|
||||
mapStringForPodFixed += fmt.Sprintf("%v: %v,", k, this.PodFixed[k8s_io_api_core_v1.ResourceName(k)])
|
||||
}
|
||||
mapStringForPodFixed += "}"
|
||||
s := strings.Join([]string{`&Overhead{`,
|
||||
`PodFixed:` + mapStringForPodFixed + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *RuntimeClass) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
|
@ -353,7 +243,6 @@ func (this *RuntimeClassSpec) String() string {
|
|||
}
|
||||
s := strings.Join([]string{`&RuntimeClassSpec{`,
|
||||
`RuntimeHandler:` + fmt.Sprintf("%v", this.RuntimeHandler) + `,`,
|
||||
`Overhead:` + strings.Replace(fmt.Sprintf("%v", this.Overhead), "Overhead", "Overhead", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -366,179 +255,6 @@ func valueToStringGenerated(v interface{}) string {
|
|||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *Overhead) 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: Overhead: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Overhead: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PodFixed", 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.PodFixed == nil {
|
||||
m.PodFixed = make(k8s_io_api_core_v1.ResourceList)
|
||||
}
|
||||
var mapkey k8s_io_api_core_v1.ResourceName
|
||||
mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
|
||||
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 = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var mapmsglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
mapmsglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if mapmsglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postmsgIndex := iNdEx + mapmsglen
|
||||
if mapmsglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postmsgIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
|
||||
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postmsgIndex
|
||||
} 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.PodFixed[k8s_io_api_core_v1.ResourceName(mapkey)] = *mapvalue
|
||||
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 *RuntimeClass) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
@ -818,39 +534,6 @@ func (m *RuntimeClassSpec) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
m.RuntimeHandler = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Overhead", 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.Overhead == nil {
|
||||
m.Overhead = &Overhead{}
|
||||
}
|
||||
if err := m.Overhead.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
|
@ -982,42 +665,32 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptorGenerated = []byte{
|
||||
// 580 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x3d, 0x6f, 0xd3, 0x40,
|
||||
0x18, 0xce, 0xa5, 0xad, 0x64, 0xae, 0x1f, 0xaa, 0x3c, 0xa0, 0x28, 0x83, 0x13, 0x79, 0x40, 0x11,
|
||||
0x52, 0xcf, 0xa4, 0x42, 0xa8, 0x62, 0x40, 0xc2, 0x7c, 0x08, 0x44, 0xa0, 0x60, 0x36, 0xc4, 0xc0,
|
||||
0xc5, 0x7e, 0x71, 0x8c, 0x63, 0x9f, 0x75, 0x3e, 0x47, 0x64, 0x43, 0x2c, 0x48, 0x4c, 0xfc, 0x04,
|
||||
0xfe, 0x08, 0xcc, 0x19, 0x33, 0xa1, 0x4e, 0x29, 0x31, 0xff, 0x82, 0x09, 0xd9, 0x3e, 0xa7, 0xf9,
|
||||
0x20, 0x34, 0x6c, 0xbe, 0xf3, 0xf3, 0x71, 0xcf, 0xf3, 0xde, 0xe1, 0xbb, 0xfe, 0x49, 0x4c, 0x3c,
|
||||
0x66, 0xf8, 0x49, 0x17, 0x78, 0x08, 0x02, 0x62, 0x63, 0x00, 0xa1, 0xc3, 0xb8, 0x21, 0x7f, 0xd0,
|
||||
0xc8, 0x33, 0x42, 0xe6, 0x80, 0x31, 0x68, 0xd3, 0x7e, 0xd4, 0xa3, 0x6d, 0xc3, 0x85, 0x10, 0x38,
|
||||
0x15, 0xe0, 0x90, 0x88, 0x33, 0xc1, 0xd4, 0x5a, 0x81, 0x24, 0x34, 0xf2, 0x48, 0x86, 0x24, 0x25,
|
||||
0xb2, 0x7e, 0xe4, 0x7a, 0xa2, 0x97, 0x74, 0x89, 0xcd, 0x02, 0xc3, 0x65, 0x2e, 0x33, 0x72, 0x42,
|
||||
0x37, 0x79, 0x9b, 0xaf, 0xf2, 0x45, 0xfe, 0x55, 0x08, 0xd5, 0xf5, 0x39, 0x4b, 0x9b, 0xf1, 0xcc,
|
||||
0x72, 0xd9, 0xac, 0x7e, 0xf3, 0x02, 0x13, 0x50, 0xbb, 0xe7, 0x85, 0xc0, 0x87, 0x46, 0xe4, 0xbb,
|
||||
0x39, 0x89, 0x43, 0xcc, 0x12, 0x6e, 0xc3, 0x7f, 0xb1, 0x62, 0x23, 0x00, 0x41, 0xff, 0xe6, 0x65,
|
||||
0xac, 0x63, 0xf1, 0x24, 0x14, 0x5e, 0xb0, 0x6a, 0x73, 0xeb, 0x32, 0x42, 0x6c, 0xf7, 0x20, 0xa0,
|
||||
0xcb, 0x3c, 0x7d, 0x5c, 0xc5, 0xca, 0xe9, 0x00, 0x78, 0x0f, 0xa8, 0xa3, 0xfe, 0x40, 0x58, 0x89,
|
||||
0x98, 0xf3, 0xd0, 0x7b, 0x0f, 0x4e, 0x0d, 0x35, 0xb7, 0x5a, 0xbb, 0xc7, 0x37, 0xc8, 0xba, 0x8a,
|
||||
0x49, 0x49, 0x23, 0xcf, 0x25, 0xe5, 0x41, 0x28, 0xf8, 0xd0, 0xfc, 0x84, 0x46, 0x93, 0x46, 0x25,
|
||||
0x9d, 0x34, 0x94, 0x72, 0xff, 0xf7, 0xa4, 0xd1, 0x58, 0xed, 0x97, 0x58, 0xb2, 0xb2, 0x8e, 0x17,
|
||||
0x8b, 0x8f, 0xe7, 0xff, 0x84, 0x3c, 0xa3, 0x01, 0x7c, 0x3e, 0x6f, 0x1c, 0x6d, 0x32, 0x01, 0xf2,
|
||||
0x22, 0xa1, 0xa1, 0xf0, 0xc4, 0xd0, 0x9a, 0x65, 0xa9, 0xfb, 0x78, 0x7f, 0xe1, 0x90, 0xea, 0x21,
|
||||
0xde, 0xf2, 0x61, 0x58, 0x43, 0x4d, 0xd4, 0xba, 0x62, 0x65, 0x9f, 0xea, 0x7d, 0xbc, 0x33, 0xa0,
|
||||
0xfd, 0x04, 0x6a, 0xd5, 0x26, 0x6a, 0xed, 0x1e, 0x93, 0xb9, 0xdc, 0x33, 0x2f, 0x12, 0xf9, 0x6e,
|
||||
0x5e, 0xc4, 0xaa, 0x57, 0x41, 0xbe, 0x5d, 0x3d, 0x41, 0xfa, 0x77, 0x84, 0xf7, 0xac, 0xa2, 0xf5,
|
||||
0x7b, 0x7d, 0x1a, 0xc7, 0xea, 0x1b, 0xac, 0x64, 0x73, 0x76, 0xa8, 0xa0, 0xb9, 0xe3, 0x62, 0xab,
|
||||
0x2b, 0xea, 0x31, 0xc9, 0xd0, 0x64, 0xd0, 0x26, 0xa7, 0xdd, 0x77, 0x60, 0x8b, 0xa7, 0x20, 0xa8,
|
||||
0xa9, 0xca, 0x52, 0xf1, 0xc5, 0x9e, 0x35, 0x53, 0x55, 0x3b, 0x78, 0x3b, 0x8e, 0xc0, 0x96, 0x67,
|
||||
0xbf, 0xbe, 0x7e, 0x66, 0xf3, 0xe7, 0x7a, 0x19, 0x81, 0x6d, 0xee, 0x49, 0xdd, 0xed, 0x6c, 0x65,
|
||||
0xe5, 0x2a, 0xfa, 0x37, 0x84, 0x0f, 0xe7, 0x81, 0xd9, 0x80, 0xd4, 0xd7, 0x2b, 0x21, 0xc8, 0x66,
|
||||
0x21, 0x32, 0x76, 0x1e, 0xe1, 0xb0, 0xbc, 0x17, 0xe5, 0xce, 0x5c, 0x80, 0x27, 0x78, 0xc7, 0x13,
|
||||
0x10, 0xc4, 0xb5, 0x6a, 0x7e, 0xeb, 0xae, 0x6d, 0x96, 0xc0, 0xdc, 0x97, 0x92, 0x3b, 0x8f, 0x33,
|
||||
0xb2, 0x55, 0x68, 0xe8, 0x5f, 0x97, 0xce, 0x9f, 0x45, 0x53, 0xef, 0xe0, 0x03, 0xf9, 0x14, 0x1e,
|
||||
0xd1, 0xd0, 0xe9, 0x03, 0x2f, 0x86, 0x6f, 0x5e, 0x95, 0x12, 0x07, 0xd6, 0xc2, 0x5f, 0x6b, 0x09,
|
||||
0xad, 0x76, 0xb0, 0xc2, 0xe4, 0x85, 0x97, 0x35, 0xeb, 0x97, 0x3f, 0x0d, 0x73, 0x2f, 0xcb, 0x5b,
|
||||
0xae, 0xac, 0x99, 0x82, 0x49, 0x46, 0x53, 0xad, 0x32, 0x9e, 0x6a, 0x95, 0xb3, 0xa9, 0x56, 0xf9,
|
||||
0x90, 0x6a, 0x68, 0x94, 0x6a, 0x68, 0x9c, 0x6a, 0xe8, 0x2c, 0xd5, 0xd0, 0xcf, 0x54, 0x43, 0x5f,
|
||||
0x7e, 0x69, 0x95, 0x57, 0x4a, 0x29, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x77, 0x13, 0xf2,
|
||||
0x2c, 0x05, 0x00, 0x00,
|
||||
// 421 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x6b, 0xd4, 0x40,
|
||||
0x14, 0xc7, 0x33, 0xb5, 0x85, 0x75, 0x5a, 0x4b, 0xc9, 0x41, 0xc2, 0x1e, 0xa6, 0x65, 0x0f, 0x52,
|
||||
0x04, 0x67, 0xdc, 0x22, 0xe2, 0x49, 0x30, 0x5e, 0x14, 0x2b, 0x42, 0xbc, 0x89, 0x07, 0x27, 0xc9,
|
||||
0x33, 0x19, 0xb3, 0xc9, 0x0c, 0x99, 0x49, 0xc0, 0x9b, 0x1f, 0xc1, 0x2f, 0xa4, 0xe7, 0x3d, 0xf6,
|
||||
0xd8, 0x53, 0x71, 0xe3, 0x17, 0x91, 0x99, 0x64, 0xbb, 0xdb, 0x2e, 0xc5, 0xbd, 0xe5, 0xbd, 0xf9,
|
||||
0xff, 0x7f, 0xef, 0xfd, 0x5f, 0xf0, 0xab, 0xe2, 0x85, 0xa6, 0x42, 0xb2, 0xa2, 0x89, 0xa1, 0xae,
|
||||
0xc0, 0x80, 0x66, 0x2d, 0x54, 0xa9, 0xac, 0xd9, 0xf0, 0xc0, 0x95, 0x60, 0x95, 0x4c, 0x81, 0xb5,
|
||||
0x53, 0x3e, 0x53, 0x39, 0x9f, 0xb2, 0x0c, 0x2a, 0xa8, 0xb9, 0x81, 0x94, 0xaa, 0x5a, 0x1a, 0xe9,
|
||||
0x07, 0xbd, 0x92, 0x72, 0x25, 0xa8, 0x55, 0xd2, 0xa5, 0x72, 0xfc, 0x24, 0x13, 0x26, 0x6f, 0x62,
|
||||
0x9a, 0xc8, 0x92, 0x65, 0x32, 0x93, 0xcc, 0x19, 0xe2, 0xe6, 0xab, 0xab, 0x5c, 0xe1, 0xbe, 0x7a,
|
||||
0xd0, 0xf8, 0xd9, 0x6a, 0x64, 0xc9, 0x93, 0x5c, 0x54, 0x50, 0x7f, 0x67, 0xaa, 0xc8, 0x6c, 0x43,
|
||||
0xb3, 0x12, 0x0c, 0x67, 0xed, 0xc6, 0xf8, 0x31, 0xbb, 0xcb, 0x55, 0x37, 0x95, 0x11, 0x25, 0x6c,
|
||||
0x18, 0x9e, 0xff, 0xcf, 0xa0, 0x93, 0x1c, 0x4a, 0x7e, 0xdb, 0x37, 0xf9, 0x8d, 0xf0, 0x41, 0xd4,
|
||||
0x4b, 0x5e, 0xcf, 0xb8, 0xd6, 0xfe, 0x17, 0x3c, 0xb2, 0x4b, 0xa5, 0xdc, 0xf0, 0x00, 0x9d, 0xa0,
|
||||
0xd3, 0xfd, 0xb3, 0xa7, 0x74, 0x75, 0x8b, 0x6b, 0x36, 0x55, 0x45, 0x66, 0x1b, 0x9a, 0x5a, 0x35,
|
||||
0x6d, 0xa7, 0xf4, 0x43, 0xfc, 0x0d, 0x12, 0xf3, 0x1e, 0x0c, 0x0f, 0xfd, 0xf9, 0xd5, 0xb1, 0xd7,
|
||||
0x5d, 0x1d, 0xe3, 0x55, 0x2f, 0xba, 0xa6, 0xfa, 0xe7, 0x78, 0x57, 0x2b, 0x48, 0x82, 0x1d, 0x47,
|
||||
0x7f, 0x4c, 0xef, 0xba, 0x34, 0x5d, 0xdf, 0xeb, 0xa3, 0x82, 0x24, 0x3c, 0x18, 0xb8, 0xbb, 0xb6,
|
||||
0x8a, 0x1c, 0x65, 0xf2, 0x0b, 0xe1, 0xa3, 0x75, 0xe1, 0xb9, 0xd0, 0xc6, 0xff, 0xbc, 0x11, 0x82,
|
||||
0x6e, 0x17, 0xc2, 0xba, 0x5d, 0x84, 0xa3, 0x61, 0xd4, 0x68, 0xd9, 0x59, 0x0b, 0xf0, 0x0e, 0xef,
|
||||
0x09, 0x03, 0xa5, 0x0e, 0x76, 0x4e, 0xee, 0x9d, 0xee, 0x9f, 0x3d, 0xda, 0x2e, 0x41, 0xf8, 0x60,
|
||||
0x40, 0xee, 0xbd, 0xb5, 0xe6, 0xa8, 0x67, 0x4c, 0xa2, 0x9b, 0xeb, 0xdb, 0x64, 0xfe, 0x4b, 0x7c,
|
||||
0x38, 0xfc, 0xb6, 0x37, 0xbc, 0x4a, 0x67, 0x50, 0xbb, 0x10, 0xf7, 0xc3, 0x87, 0x03, 0xe1, 0x30,
|
||||
0xba, 0xf1, 0x1a, 0xdd, 0x52, 0x87, 0x74, 0xbe, 0x20, 0xde, 0xc5, 0x82, 0x78, 0x97, 0x0b, 0xe2,
|
||||
0xfd, 0xe8, 0x08, 0x9a, 0x77, 0x04, 0x5d, 0x74, 0x04, 0x5d, 0x76, 0x04, 0xfd, 0xe9, 0x08, 0xfa,
|
||||
0xf9, 0x97, 0x78, 0x9f, 0x46, 0xcb, 0x35, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x94, 0x34, 0x0e,
|
||||
0xef, 0x30, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
|
16
vendor/k8s.io/api/node/v1alpha1/generated.proto
generated
vendored
16
vendor/k8s.io/api/node/v1alpha1/generated.proto
generated
vendored
|
@ -21,8 +21,6 @@ syntax = 'proto2';
|
|||
|
||||
package k8s.io.api.node.v1alpha1;
|
||||
|
||||
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";
|
||||
|
@ -30,13 +28,6 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
|||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1alpha1";
|
||||
|
||||
// Overhead structure represents the resource overhead associated with running a pod.
|
||||
message Overhead {
|
||||
// PodFixed represents the fixed resource overhead associated with running a pod.
|
||||
// +optional
|
||||
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> podFixed = 1;
|
||||
}
|
||||
|
||||
// RuntimeClass defines a class of container runtime supported in the cluster.
|
||||
// The RuntimeClass is used to determine which container runtime is used to run
|
||||
// all containers in a pod. RuntimeClasses are (currently) manually defined by a
|
||||
|
@ -81,12 +72,5 @@ message RuntimeClassSpec {
|
|||
// The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements
|
||||
// and is immutable.
|
||||
optional string runtimeHandler = 1;
|
||||
|
||||
// Overhead represents the resource overhead associated with running a pod for a
|
||||
// given RuntimeClass. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
|
||||
// This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
|
||||
// +optional
|
||||
optional Overhead overhead = 2;
|
||||
}
|
||||
|
||||
|
|
15
vendor/k8s.io/api/node/v1alpha1/types.go
generated
vendored
15
vendor/k8s.io/api/node/v1alpha1/types.go
generated
vendored
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
|
@ -59,20 +58,6 @@ type RuntimeClassSpec struct {
|
|||
// The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements
|
||||
// and is immutable.
|
||||
RuntimeHandler string `json:"runtimeHandler" protobuf:"bytes,1,opt,name=runtimeHandler"`
|
||||
|
||||
// Overhead represents the resource overhead associated with running a pod for a
|
||||
// given RuntimeClass. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
|
||||
// This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
|
||||
// +optional
|
||||
Overhead *Overhead `json:"overhead,omitempty" protobuf:"bytes,2,opt,name=overhead"`
|
||||
}
|
||||
|
||||
// Overhead structure represents the resource overhead associated with running a pod.
|
||||
type Overhead struct {
|
||||
// PodFixed represents the fixed resource overhead associated with running a pod.
|
||||
// +optional
|
||||
PodFixed corev1.ResourceList `json:"podFixed,omitempty" protobuf:"bytes,1,opt,name=podFixed,casttype=k8s.io/api/core/v1.ResourceList,castkey=k8s.io/api/core/v1.ResourceName,castvalue=k8s.io/apimachinery/pkg/api/resource.Quantity"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
|
10
vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go
generated
vendored
10
vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go
generated
vendored
|
@ -27,15 +27,6 @@ package v1alpha1
|
|||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_Overhead = map[string]string{
|
||||
"": "Overhead structure represents the resource overhead associated with running a pod.",
|
||||
"podFixed": "PodFixed represents the fixed resource overhead associated with running a pod.",
|
||||
}
|
||||
|
||||
func (Overhead) SwaggerDoc() map[string]string {
|
||||
return map_Overhead
|
||||
}
|
||||
|
||||
var map_RuntimeClass = map[string]string{
|
||||
"": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md",
|
||||
"metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
|
@ -59,7 +50,6 @@ func (RuntimeClassList) SwaggerDoc() map[string]string {
|
|||
var map_RuntimeClassSpec = map[string]string{
|
||||
"": "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.",
|
||||
"runtimeHandler": "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.",
|
||||
"overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.",
|
||||
}
|
||||
|
||||
func (RuntimeClassSpec) SwaggerDoc() map[string]string {
|
||||
|
|
31
vendor/k8s.io/api/node/v1alpha1/zz_generated.deepcopy.go
generated
vendored
31
vendor/k8s.io/api/node/v1alpha1/zz_generated.deepcopy.go
generated
vendored
|
@ -21,39 +21,15 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Overhead) DeepCopyInto(out *Overhead) {
|
||||
*out = *in
|
||||
if in.PodFixed != nil {
|
||||
in, out := &in.PodFixed, &out.PodFixed
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Overhead.
|
||||
func (in *Overhead) DeepCopy() *Overhead {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Overhead)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClass) DeepCopyInto(out *RuntimeClass) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -111,11 +87,6 @@ func (in *RuntimeClassList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClassSpec) DeepCopyInto(out *RuntimeClassSpec) {
|
||||
*out = *in
|
||||
if in.Overhead != nil {
|
||||
in, out := &in.Overhead, &out.Overhead
|
||||
*out = new(Overhead)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
391
vendor/k8s.io/api/node/v1beta1/generated.pb.go
generated
vendored
391
vendor/k8s.io/api/node/v1beta1/generated.pb.go
generated
vendored
|
@ -24,7 +24,6 @@ limitations under the License.
|
|||
k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Overhead
|
||||
RuntimeClass
|
||||
RuntimeClassList
|
||||
*/
|
||||
|
@ -34,12 +33,6 @@ import proto "github.com/gogo/protobuf/proto"
|
|||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
|
||||
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
|
@ -56,72 +49,18 @@ var _ = math.Inf
|
|||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
func (m *Overhead) Reset() { *m = Overhead{} }
|
||||
func (*Overhead) ProtoMessage() {}
|
||||
func (*Overhead) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *RuntimeClass) Reset() { *m = RuntimeClass{} }
|
||||
func (*RuntimeClass) ProtoMessage() {}
|
||||
func (*RuntimeClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
func (*RuntimeClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} }
|
||||
func (*RuntimeClassList) ProtoMessage() {}
|
||||
func (*RuntimeClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
|
||||
func (*RuntimeClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Overhead)(nil), "k8s.io.api.node.v1beta1.Overhead")
|
||||
proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1beta1.RuntimeClass")
|
||||
proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1beta1.RuntimeClassList")
|
||||
}
|
||||
func (m *Overhead) 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 *Overhead) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.PodFixed) > 0 {
|
||||
keysForPodFixed := make([]string, 0, len(m.PodFixed))
|
||||
for k := range m.PodFixed {
|
||||
keysForPodFixed = append(keysForPodFixed, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForPodFixed)
|
||||
for _, k := range keysForPodFixed {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
v := m.PodFixed[k8s_io_api_core_v1.ResourceName(k)]
|
||||
msgSize := 0
|
||||
if (&v) != nil {
|
||||
msgSize = (&v).Size()
|
||||
msgSize += 1 + sovGenerated(uint64(msgSize))
|
||||
}
|
||||
mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
|
||||
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((&v).Size()))
|
||||
n1, err := (&v).MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n1
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClass) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -140,25 +79,15 @@ func (m *RuntimeClass) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
|
||||
n2, err := m.ObjectMeta.MarshalTo(dAtA[i:])
|
||||
n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n2
|
||||
i += n1
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Handler)))
|
||||
i += copy(dAtA[i:], m.Handler)
|
||||
if m.Overhead != nil {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.Overhead.Size()))
|
||||
n3, err := m.Overhead.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n3
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
|
@ -180,11 +109,11 @@ func (m *RuntimeClassList) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
|
||||
n4, err := m.ListMeta.MarshalTo(dAtA[i:])
|
||||
n2, err := m.ListMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n4
|
||||
i += n2
|
||||
if len(m.Items) > 0 {
|
||||
for _, msg := range m.Items {
|
||||
dAtA[i] = 0x12
|
||||
|
@ -209,21 +138,6 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
|
|||
dAtA[offset] = uint8(v)
|
||||
return offset + 1
|
||||
}
|
||||
func (m *Overhead) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.PodFixed) > 0 {
|
||||
for k, v := range m.PodFixed {
|
||||
_ = k
|
||||
_ = v
|
||||
l = v.Size()
|
||||
mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
|
||||
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *RuntimeClass) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
|
@ -231,10 +145,6 @@ func (m *RuntimeClass) Size() (n int) {
|
|||
n += 1 + l + sovGenerated(uint64(l))
|
||||
l = len(m.Handler)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
if m.Overhead != nil {
|
||||
l = m.Overhead.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
@ -265,26 +175,6 @@ func sovGenerated(x uint64) (n int) {
|
|||
func sozGenerated(x uint64) (n int) {
|
||||
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *Overhead) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
keysForPodFixed := make([]string, 0, len(this.PodFixed))
|
||||
for k := range this.PodFixed {
|
||||
keysForPodFixed = append(keysForPodFixed, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForPodFixed)
|
||||
mapStringForPodFixed := "k8s_io_api_core_v1.ResourceList{"
|
||||
for _, k := range keysForPodFixed {
|
||||
mapStringForPodFixed += fmt.Sprintf("%v: %v,", k, this.PodFixed[k8s_io_api_core_v1.ResourceName(k)])
|
||||
}
|
||||
mapStringForPodFixed += "}"
|
||||
s := strings.Join([]string{`&Overhead{`,
|
||||
`PodFixed:` + mapStringForPodFixed + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *RuntimeClass) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
|
@ -292,7 +182,6 @@ func (this *RuntimeClass) String() string {
|
|||
s := strings.Join([]string{`&RuntimeClass{`,
|
||||
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Handler:` + fmt.Sprintf("%v", this.Handler) + `,`,
|
||||
`Overhead:` + strings.Replace(fmt.Sprintf("%v", this.Overhead), "Overhead", "Overhead", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
|
@ -316,179 +205,6 @@ func valueToStringGenerated(v interface{}) string {
|
|||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *Overhead) 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: Overhead: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Overhead: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PodFixed", 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.PodFixed == nil {
|
||||
m.PodFixed = make(k8s_io_api_core_v1.ResourceList)
|
||||
}
|
||||
var mapkey k8s_io_api_core_v1.ResourceName
|
||||
mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
|
||||
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 = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var mapmsglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
mapmsglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if mapmsglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postmsgIndex := iNdEx + mapmsglen
|
||||
if mapmsglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postmsgIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
|
||||
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postmsgIndex
|
||||
} 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.PodFixed[k8s_io_api_core_v1.ResourceName(mapkey)] = *mapvalue
|
||||
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 *RuntimeClass) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
@ -577,39 +293,6 @@ func (m *RuntimeClass) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
m.Handler = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Overhead", 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.Overhead == nil {
|
||||
m.Overhead = &Overhead{}
|
||||
}
|
||||
if err := m.Overhead.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
|
@ -852,40 +535,30 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptorGenerated = []byte{
|
||||
// 551 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xbb, 0x8e, 0xd3, 0x4c,
|
||||
0x14, 0xce, 0x64, 0x15, 0x25, 0x3b, 0xd9, 0xd5, 0x1f, 0xb9, 0xf9, 0xa3, 0x14, 0x4e, 0x88, 0x84,
|
||||
0x14, 0x8a, 0xcc, 0x90, 0x08, 0xa1, 0x15, 0x15, 0x32, 0x17, 0x71, 0x5f, 0x70, 0x89, 0x28, 0x98,
|
||||
0xd8, 0x07, 0xc7, 0x38, 0xf6, 0x58, 0xe3, 0x71, 0x44, 0x3a, 0x44, 0x83, 0x44, 0xc5, 0x03, 0xf1,
|
||||
0x00, 0xe9, 0xd8, 0x06, 0x69, 0xab, 0x2c, 0x31, 0x0d, 0xcf, 0x40, 0x85, 0x3c, 0xb6, 0xb3, 0x61,
|
||||
0x43, 0x76, 0x97, 0x6e, 0xe6, 0xcc, 0x77, 0x39, 0xdf, 0x39, 0x83, 0x6f, 0x7b, 0x07, 0x11, 0x71,
|
||||
0x39, 0xf5, 0xe2, 0x11, 0x88, 0x00, 0x24, 0x44, 0x74, 0x0a, 0x81, 0xcd, 0x05, 0xcd, 0x1f, 0x58,
|
||||
0xe8, 0xd2, 0x80, 0xdb, 0x40, 0xa7, 0x83, 0x11, 0x48, 0x36, 0xa0, 0x0e, 0x04, 0x20, 0x98, 0x04,
|
||||
0x9b, 0x84, 0x82, 0x4b, 0xae, 0xfd, 0x9f, 0x01, 0x09, 0x0b, 0x5d, 0x92, 0x02, 0x49, 0x0e, 0x6c,
|
||||
0xf5, 0x1d, 0x57, 0x8e, 0xe3, 0x11, 0xb1, 0xb8, 0x4f, 0x1d, 0xee, 0x70, 0xaa, 0xf0, 0xa3, 0xf8,
|
||||
0x8d, 0xba, 0xa9, 0x8b, 0x3a, 0x65, 0x3a, 0xad, 0xee, 0x9a, 0xa1, 0xc5, 0x45, 0x6a, 0x78, 0xd6,
|
||||
0xab, 0x75, 0xe3, 0x14, 0xe3, 0x33, 0x6b, 0xec, 0x06, 0x20, 0x66, 0x34, 0xf4, 0x1c, 0x45, 0x12,
|
||||
0x10, 0xf1, 0x58, 0x58, 0xf0, 0x4f, 0xac, 0x88, 0xfa, 0x20, 0xd9, 0xdf, 0xbc, 0xe8, 0x36, 0x96,
|
||||
0x88, 0x03, 0xe9, 0xfa, 0x9b, 0x36, 0x37, 0x2f, 0x22, 0x44, 0xd6, 0x18, 0x7c, 0x76, 0x96, 0xd7,
|
||||
0xfd, 0x5a, 0xc6, 0xb5, 0xc3, 0x29, 0x88, 0x31, 0x30, 0x5b, 0xfb, 0x86, 0x70, 0x2d, 0xe4, 0xf6,
|
||||
0x7d, 0xf7, 0x1d, 0xd8, 0x4d, 0xd4, 0xd9, 0xe9, 0xd5, 0x87, 0x94, 0x6c, 0x99, 0x30, 0x29, 0x58,
|
||||
0xe4, 0x79, 0xce, 0xb8, 0x17, 0x48, 0x31, 0x33, 0x3e, 0xa2, 0xf9, 0xa2, 0x5d, 0x4a, 0x16, 0xed,
|
||||
0x5a, 0x51, 0xff, 0xb5, 0x68, 0xb7, 0x37, 0xc7, 0x4b, 0xcc, 0x7c, 0x62, 0x4f, 0xdc, 0x48, 0x7e,
|
||||
0x38, 0x39, 0x17, 0xf2, 0x8c, 0xf9, 0xf0, 0xe9, 0xa4, 0xdd, 0xbf, 0xcc, 0x02, 0xc8, 0x8b, 0x98,
|
||||
0x05, 0xd2, 0x95, 0x33, 0x73, 0x15, 0xa5, 0xe5, 0xe1, 0xfd, 0x3f, 0x9a, 0xd4, 0x1a, 0x78, 0xc7,
|
||||
0x83, 0x59, 0x13, 0x75, 0x50, 0x6f, 0xd7, 0x4c, 0x8f, 0xda, 0x5d, 0x5c, 0x99, 0xb2, 0x49, 0x0c,
|
||||
0xcd, 0x72, 0x07, 0xf5, 0xea, 0x43, 0xb2, 0x16, 0x7b, 0xe5, 0x45, 0x42, 0xcf, 0x51, 0x73, 0xd8,
|
||||
0xf4, 0xca, 0xc8, 0xb7, 0xca, 0x07, 0xa8, 0xfb, 0x13, 0xe1, 0x3d, 0x33, 0x1b, 0xfa, 0x9d, 0x09,
|
||||
0x8b, 0x22, 0xed, 0x35, 0xae, 0xa5, 0x6b, 0xb6, 0x99, 0x64, 0xca, 0xb1, 0x3e, 0xbc, 0x7e, 0x9e,
|
||||
0x7a, 0x44, 0x52, 0x34, 0x99, 0x0e, 0xc8, 0xe1, 0xe8, 0x2d, 0x58, 0xf2, 0x29, 0x48, 0x66, 0x68,
|
||||
0xf9, 0x50, 0xf1, 0x69, 0xcd, 0x5c, 0xa9, 0x6a, 0xd7, 0x70, 0x75, 0xcc, 0x02, 0x7b, 0x02, 0x42,
|
||||
0xb5, 0xbf, 0x6b, 0xfc, 0x97, 0xc3, 0xab, 0x0f, 0xb2, 0xb2, 0x59, 0xbc, 0x6b, 0x8f, 0x71, 0x8d,
|
||||
0xe7, 0x8b, 0x6b, 0xee, 0xa8, 0x66, 0xae, 0x5c, 0xb8, 0x61, 0x63, 0x2f, 0x5d, 0x67, 0x71, 0x33,
|
||||
0x57, 0x02, 0xdd, 0x2f, 0x08, 0x37, 0xd6, 0xa3, 0xa6, 0xab, 0xd4, 0x5e, 0x6d, 0xc4, 0x25, 0x97,
|
||||
0x8b, 0x9b, 0xb2, 0x55, 0xd8, 0x46, 0xf1, 0x83, 0x8a, 0xca, 0x5a, 0xd4, 0x47, 0xb8, 0xe2, 0x4a,
|
||||
0xf0, 0xa3, 0x66, 0x59, 0x7d, 0xcf, 0xab, 0x5b, 0x9b, 0x5f, 0xef, 0xcb, 0xd8, 0xcf, 0x15, 0x2b,
|
||||
0x0f, 0x53, 0xae, 0x99, 0x49, 0x18, 0xfd, 0xf9, 0x52, 0x2f, 0x1d, 0x2d, 0xf5, 0xd2, 0xf1, 0x52,
|
||||
0x2f, 0xbd, 0x4f, 0x74, 0x34, 0x4f, 0x74, 0x74, 0x94, 0xe8, 0xe8, 0x38, 0xd1, 0xd1, 0xf7, 0x44,
|
||||
0x47, 0x9f, 0x7f, 0xe8, 0xa5, 0x97, 0xd5, 0x5c, 0xf1, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61,
|
||||
0xf4, 0xbb, 0x0a, 0xae, 0x04, 0x00, 0x00,
|
||||
// 389 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6a, 0xdb, 0x40,
|
||||
0x14, 0x85, 0x35, 0x2e, 0xc6, 0xae, 0xdc, 0x52, 0xa3, 0x4d, 0x8d, 0x17, 0x63, 0x63, 0x28, 0xb8,
|
||||
0x0b, 0xcf, 0xd4, 0xa6, 0x94, 0x2e, 0x8b, 0xba, 0x69, 0x4b, 0x4b, 0x41, 0xcb, 0x90, 0x45, 0x46,
|
||||
0xd2, 0x8d, 0x34, 0x91, 0xa5, 0x11, 0x9a, 0x91, 0x20, 0xbb, 0x3c, 0x42, 0xf6, 0x79, 0x95, 0x3c,
|
||||
0x80, 0x97, 0x5e, 0x7a, 0x65, 0x62, 0xe5, 0x45, 0x82, 0x7e, 0xfc, 0x43, 0x8c, 0x49, 0x76, 0xba,
|
||||
0xe7, 0x9e, 0x73, 0xee, 0x87, 0x18, 0xfd, 0x47, 0xf0, 0x5d, 0x12, 0x2e, 0x68, 0x90, 0xda, 0x90,
|
||||
0x44, 0xa0, 0x40, 0xd2, 0x0c, 0x22, 0x57, 0x24, 0xb4, 0x5e, 0xb0, 0x98, 0xd3, 0x48, 0xb8, 0x40,
|
||||
0xb3, 0xa9, 0x0d, 0x8a, 0x4d, 0xa9, 0x07, 0x11, 0x24, 0x4c, 0x81, 0x4b, 0xe2, 0x44, 0x28, 0x61,
|
||||
0x7c, 0xac, 0x8c, 0x84, 0xc5, 0x9c, 0x14, 0x46, 0x52, 0x1b, 0xfb, 0x13, 0x8f, 0x2b, 0x3f, 0xb5,
|
||||
0x89, 0x23, 0x42, 0xea, 0x09, 0x4f, 0xd0, 0xd2, 0x6f, 0xa7, 0x97, 0xe5, 0x54, 0x0e, 0xe5, 0x57,
|
||||
0xd5, 0xd3, 0xff, 0xba, 0x3f, 0x18, 0x32, 0xc7, 0xe7, 0x11, 0x24, 0xd7, 0x34, 0x0e, 0xbc, 0x42,
|
||||
0x90, 0x34, 0x04, 0xc5, 0x68, 0x76, 0x74, 0xbd, 0x4f, 0x4f, 0xa5, 0x92, 0x34, 0x52, 0x3c, 0x84,
|
||||
0xa3, 0xc0, 0xb7, 0x97, 0x02, 0xd2, 0xf1, 0x21, 0x64, 0xcf, 0x73, 0xa3, 0x3b, 0xa4, 0xbf, 0xb3,
|
||||
0x2a, 0xcb, 0xcf, 0x39, 0x93, 0xd2, 0xb8, 0xd0, 0xdb, 0x05, 0x94, 0xcb, 0x14, 0xeb, 0xa1, 0x21,
|
||||
0x1a, 0x77, 0x66, 0x5f, 0xc8, 0xfe, 0x57, 0xec, 0xba, 0x49, 0x1c, 0x78, 0x85, 0x20, 0x49, 0xe1,
|
||||
0x26, 0xd9, 0x94, 0xfc, 0xb7, 0xaf, 0xc0, 0x51, 0xff, 0x40, 0x31, 0xd3, 0x58, 0xac, 0x07, 0x5a,
|
||||
0xbe, 0x1e, 0xe8, 0x7b, 0xcd, 0xda, 0xb5, 0x1a, 0x9f, 0xf5, 0x96, 0xcf, 0x22, 0x77, 0x0e, 0x49,
|
||||
0xaf, 0x31, 0x44, 0xe3, 0xb7, 0xe6, 0x87, 0xda, 0xde, 0xfa, 0x55, 0xc9, 0xd6, 0x76, 0x3f, 0xba,
|
||||
0x47, 0x7a, 0xf7, 0x90, 0xee, 0x2f, 0x97, 0xca, 0x38, 0x3f, 0x22, 0x24, 0xaf, 0x23, 0x2c, 0xd2,
|
||||
0x25, 0x5f, 0xb7, 0x3e, 0xd8, 0xde, 0x2a, 0x07, 0x74, 0x7f, 0xf4, 0x26, 0x57, 0x10, 0xca, 0x5e,
|
||||
0x63, 0xf8, 0x66, 0xdc, 0x99, 0x7d, 0x22, 0x27, 0xde, 0x01, 0x39, 0xe4, 0x32, 0xdf, 0xd7, 0x8d,
|
||||
0xcd, 0xdf, 0x45, 0xd6, 0xaa, 0x2a, 0xcc, 0xc9, 0x62, 0x83, 0xb5, 0xe5, 0x06, 0x6b, 0xab, 0x0d,
|
||||
0xd6, 0x6e, 0x72, 0x8c, 0x16, 0x39, 0x46, 0xcb, 0x1c, 0xa3, 0x55, 0x8e, 0xd1, 0x43, 0x8e, 0xd1,
|
||||
0xed, 0x23, 0xd6, 0xce, 0x5a, 0x75, 0xe3, 0x53, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x68, 0xe5,
|
||||
0x0d, 0xb5, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
|
16
vendor/k8s.io/api/node/v1beta1/generated.proto
generated
vendored
16
vendor/k8s.io/api/node/v1beta1/generated.proto
generated
vendored
|
@ -21,8 +21,6 @@ syntax = 'proto2';
|
|||
|
||||
package k8s.io.api.node.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";
|
||||
|
@ -30,13 +28,6 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
|||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// Overhead structure represents the resource overhead associated with running a pod.
|
||||
message Overhead {
|
||||
// PodFixed represents the fixed resource overhead associated with running a pod.
|
||||
// +optional
|
||||
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> podFixed = 1;
|
||||
}
|
||||
|
||||
// RuntimeClass defines a class of container runtime supported in the cluster.
|
||||
// The RuntimeClass is used to determine which container runtime is used to run
|
||||
// all containers in a pod. RuntimeClasses are (currently) manually defined by a
|
||||
|
@ -60,13 +51,6 @@ message RuntimeClass {
|
|||
// The Handler must conform to the DNS Label (RFC 1123) requirements, and is
|
||||
// immutable.
|
||||
optional string handler = 2;
|
||||
|
||||
// Overhead represents the resource overhead associated with running a pod for a
|
||||
// given RuntimeClass. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
|
||||
// This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
|
||||
// +optional
|
||||
optional Overhead overhead = 3;
|
||||
}
|
||||
|
||||
// RuntimeClassList is a list of RuntimeClass objects.
|
||||
|
|
15
vendor/k8s.io/api/node/v1beta1/types.go
generated
vendored
15
vendor/k8s.io/api/node/v1beta1/types.go
generated
vendored
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
|
@ -49,20 +48,6 @@ type RuntimeClass struct {
|
|||
// The Handler must conform to the DNS Label (RFC 1123) requirements, and is
|
||||
// immutable.
|
||||
Handler string `json:"handler" protobuf:"bytes,2,opt,name=handler"`
|
||||
|
||||
// Overhead represents the resource overhead associated with running a pod for a
|
||||
// given RuntimeClass. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md
|
||||
// This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
|
||||
// +optional
|
||||
Overhead *Overhead `json:"overhead,omitempty" protobuf:"bytes,3,opt,name=overhead"`
|
||||
}
|
||||
|
||||
// Overhead structure represents the resource overhead associated with running a pod.
|
||||
type Overhead struct {
|
||||
// PodFixed represents the fixed resource overhead associated with running a pod.
|
||||
// +optional
|
||||
PodFixed corev1.ResourceList `json:"podFixed,omitempty" protobuf:"bytes,1,opt,name=podFixed,casttype=k8s.io/api/core/v1.ResourceList,castkey=k8s.io/api/core/v1.ResourceName,castvalue=k8s.io/apimachinery/pkg/api/resource.Quantity"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
|
10
vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go
generated
vendored
10
vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go
generated
vendored
|
@ -27,20 +27,10 @@ package v1beta1
|
|||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_Overhead = map[string]string{
|
||||
"": "Overhead structure represents the resource overhead associated with running a pod.",
|
||||
"podFixed": "PodFixed represents the fixed resource overhead associated with running a pod.",
|
||||
}
|
||||
|
||||
func (Overhead) SwaggerDoc() map[string]string {
|
||||
return map_Overhead
|
||||
}
|
||||
|
||||
var map_RuntimeClass = map[string]string{
|
||||
"": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md",
|
||||
"metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"handler": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable.",
|
||||
"overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.",
|
||||
}
|
||||
|
||||
func (RuntimeClass) SwaggerDoc() map[string]string {
|
||||
|
|
29
vendor/k8s.io/api/node/v1beta1/zz_generated.deepcopy.go
generated
vendored
29
vendor/k8s.io/api/node/v1beta1/zz_generated.deepcopy.go
generated
vendored
|
@ -21,43 +21,14 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Overhead) DeepCopyInto(out *Overhead) {
|
||||
*out = *in
|
||||
if in.PodFixed != nil {
|
||||
in, out := &in.PodFixed, &out.PodFixed
|
||||
*out = make(v1.ResourceList, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Overhead.
|
||||
func (in *Overhead) DeepCopy() *Overhead {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Overhead)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClass) DeepCopyInto(out *RuntimeClass) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
if in.Overhead != nil {
|
||||
in, out := &in.Overhead, &out.Overhead
|
||||
*out = new(Overhead)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
6
vendor/k8s.io/api/policy/v1beta1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/policy/v1beta1/generated.pb.go
generated
vendored
|
@ -55,7 +55,7 @@ import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v
|
|||
|
||||
import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -523,7 +523,7 @@ func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.DisruptedPods {
|
||||
keysForDisruptedPods = append(keysForDisruptedPods, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForDisruptedPods)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
|
||||
for _, k := range keysForDisruptedPods {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -1574,7 +1574,7 @@ func (this *PodDisruptionBudgetStatus) String() string {
|
|||
for k := range this.DisruptedPods {
|
||||
keysForDisruptedPods = append(keysForDisruptedPods, k)
|
||||
}
|
||||
sortkeys.Strings(keysForDisruptedPods)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
|
||||
mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{"
|
||||
for _, k := range keysForDisruptedPods {
|
||||
mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k])
|
||||
|
|
10
vendor/k8s.io/api/storage/v1/generated.pb.go
generated
vendored
10
vendor/k8s.io/api/storage/v1/generated.pb.go
generated
vendored
|
@ -41,7 +41,7 @@ import math "math"
|
|||
|
||||
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -133,7 +133,7 @@ func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.Parameters {
|
||||
keysForParameters = append(keysForParameters, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForParameters)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
|
||||
for _, k := range keysForParameters {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
|
@ -416,7 +416,7 @@ func (m *VolumeAttachmentStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.AttachmentMetadata {
|
||||
keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForAttachmentMetadata)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
|
||||
for _, k := range keysForAttachmentMetadata {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -656,7 +656,7 @@ func (this *StorageClass) String() string {
|
|||
for k := range this.Parameters {
|
||||
keysForParameters = append(keysForParameters, k)
|
||||
}
|
||||
sortkeys.Strings(keysForParameters)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
|
||||
mapStringForParameters := "map[string]string{"
|
||||
for _, k := range keysForParameters {
|
||||
mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
|
||||
|
@ -740,7 +740,7 @@ func (this *VolumeAttachmentStatus) String() string {
|
|||
for k := range this.AttachmentMetadata {
|
||||
keysForAttachmentMetadata = append(keysForAttachmentMetadata, k)
|
||||
}
|
||||
sortkeys.Strings(keysForAttachmentMetadata)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
|
||||
mapStringForAttachmentMetadata := "map[string]string{"
|
||||
for _, k := range keysForAttachmentMetadata {
|
||||
mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k])
|
||||
|
|
6
vendor/k8s.io/api/storage/v1alpha1/generated.pb.go
generated
vendored
6
vendor/k8s.io/api/storage/v1alpha1/generated.pb.go
generated
vendored
|
@ -39,7 +39,7 @@ import math "math"
|
|||
|
||||
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
|
||||
|
||||
import sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
@ -265,7 +265,7 @@ func (m *VolumeAttachmentStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
for k := range m.AttachmentMetadata {
|
||||
keysForAttachmentMetadata = append(keysForAttachmentMetadata, string(k))
|
||||
}
|
||||
sortkeys.Strings(keysForAttachmentMetadata)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
|
||||
for _, k := range keysForAttachmentMetadata {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
|
@ -496,7 +496,7 @@ func (this *VolumeAttachmentStatus) String() string {
|
|||
for k := range this.AttachmentMetadata {
|
||||
keysForAttachmentMetadata = append(keysForAttachmentMetadata, k)
|
||||
}
|
||||
sortkeys.Strings(keysForAttachmentMetadata)
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForAttachmentMetadata)
|
||||
mapStringForAttachmentMetadata := "map[string]string{"
|
||||
for _, k := range keysForAttachmentMetadata {
|
||||
mapStringForAttachmentMetadata += fmt.Sprintf("%v: %v,", k, this.AttachmentMetadata[k])
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue