Luther Monson 4 年之前
父節點
當前提交
94b1e032bb
共有 100 個文件被更改,包括 1239 次插入9441 次删除
  1. 7 28
      go.mod
  2. 314 38
      go.sum
  3. 0 15
      vendor/cloud.google.com/go/AUTHORS
  4. 0 37
      vendor/cloud.google.com/go/CONTRIBUTORS
  5. 1 1
      vendor/cloud.google.com/go/LICENSE
  6. 12 0
      vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json
  7. 242 154
      vendor/cloud.google.com/go/compute/metadata/metadata.go
  8. 0 5
      vendor/github.com/PuerkitoBio/purell/.gitignore
  9. 0 7
      vendor/github.com/PuerkitoBio/purell/.travis.yml
  10. 0 12
      vendor/github.com/PuerkitoBio/purell/LICENSE
  11. 0 185
      vendor/github.com/PuerkitoBio/purell/README.md
  12. 0 375
      vendor/github.com/PuerkitoBio/purell/purell.go
  13. 0 11
      vendor/github.com/PuerkitoBio/urlesc/.travis.yml
  14. 0 27
      vendor/github.com/PuerkitoBio/urlesc/LICENSE
  15. 0 16
      vendor/github.com/PuerkitoBio/urlesc/README.md
  16. 0 180
      vendor/github.com/PuerkitoBio/urlesc/urlesc.go
  17. 1 1
      vendor/github.com/davecgh/go-spew/LICENSE
  18. 90 97
      vendor/github.com/davecgh/go-spew/spew/bypass.go
  19. 1 1
      vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
  20. 1 1
      vendor/github.com/davecgh/go-spew/spew/common.go
  21. 5 5
      vendor/github.com/davecgh/go-spew/spew/dump.go
  22. 2 2
      vendor/github.com/davecgh/go-spew/spew/format.go
  23. 0 133
      vendor/github.com/docker/distribution/AUTHORS
  24. 0 202
      vendor/github.com/docker/distribution/LICENSE
  25. 0 139
      vendor/github.com/docker/distribution/digest/digest.go
  26. 0 155
      vendor/github.com/docker/distribution/digest/digester.go
  27. 0 42
      vendor/github.com/docker/distribution/digest/doc.go
  28. 0 245
      vendor/github.com/docker/distribution/digest/set.go
  29. 0 44
      vendor/github.com/docker/distribution/digest/verifiers.go
  30. 0 334
      vendor/github.com/docker/distribution/reference/reference.go
  31. 0 124
      vendor/github.com/docker/distribution/reference/regexp.go
  32. 0 70
      vendor/github.com/emicklei/go-restful/.gitignore
  33. 0 171
      vendor/github.com/emicklei/go-restful/CHANGES.md
  34. 0 22
      vendor/github.com/emicklei/go-restful/LICENSE
  35. 0 74
      vendor/github.com/emicklei/go-restful/README.md
  36. 0 1
      vendor/github.com/emicklei/go-restful/Srcfile
  37. 0 10
      vendor/github.com/emicklei/go-restful/bench_test.sh
  38. 0 123
      vendor/github.com/emicklei/go-restful/compress.go
  39. 0 103
      vendor/github.com/emicklei/go-restful/compressor_cache.go
  40. 0 91
      vendor/github.com/emicklei/go-restful/compressor_pools.go
  41. 0 53
      vendor/github.com/emicklei/go-restful/compressors.go
  42. 0 30
      vendor/github.com/emicklei/go-restful/constants.go
  43. 0 361
      vendor/github.com/emicklei/go-restful/container.go
  44. 0 202
      vendor/github.com/emicklei/go-restful/cors_filter.go
  45. 0 2
      vendor/github.com/emicklei/go-restful/coverage.sh
  46. 0 164
      vendor/github.com/emicklei/go-restful/curly.go
  47. 0 52
      vendor/github.com/emicklei/go-restful/curly_route.go
  48. 0 185
      vendor/github.com/emicklei/go-restful/doc.go
  49. 0 163
      vendor/github.com/emicklei/go-restful/entity_accessors.go
  50. 0 35
      vendor/github.com/emicklei/go-restful/filter.go
  51. 0 10
      vendor/github.com/emicklei/go-restful/install.sh
  52. 0 248
      vendor/github.com/emicklei/go-restful/jsr311.go
  53. 0 31
      vendor/github.com/emicklei/go-restful/log/log.go
  54. 0 32
      vendor/github.com/emicklei/go-restful/logger.go
  55. 0 45
      vendor/github.com/emicklei/go-restful/mime.go
  56. 0 26
      vendor/github.com/emicklei/go-restful/options_filter.go
  57. 0 114
      vendor/github.com/emicklei/go-restful/parameter.go
  58. 0 69
      vendor/github.com/emicklei/go-restful/path_expression.go
  59. 0 136
      vendor/github.com/emicklei/go-restful/request.go
  60. 0 235
      vendor/github.com/emicklei/go-restful/response.go
  61. 0 183
      vendor/github.com/emicklei/go-restful/route.go
  62. 0 240
      vendor/github.com/emicklei/go-restful/route_builder.go
  63. 0 18
      vendor/github.com/emicklei/go-restful/router.go
  64. 0 23
      vendor/github.com/emicklei/go-restful/service_error.go
  65. 0 43
      vendor/github.com/emicklei/go-restful/swagger/CHANGES.md
  66. 0 76
      vendor/github.com/emicklei/go-restful/swagger/README.md
  67. 0 64
      vendor/github.com/emicklei/go-restful/swagger/api_declaration_list.go
  68. 0 46
      vendor/github.com/emicklei/go-restful/swagger/config.go
  69. 0 467
      vendor/github.com/emicklei/go-restful/swagger/model_builder.go
  70. 0 86
      vendor/github.com/emicklei/go-restful/swagger/model_list.go
  71. 0 81
      vendor/github.com/emicklei/go-restful/swagger/model_property_ext.go
  72. 0 87
      vendor/github.com/emicklei/go-restful/swagger/model_property_list.go
  73. 0 36
      vendor/github.com/emicklei/go-restful/swagger/ordered_route_map.go
  74. 0 185
      vendor/github.com/emicklei/go-restful/swagger/swagger.go
  75. 0 21
      vendor/github.com/emicklei/go-restful/swagger/swagger_builder.go
  76. 0 440
      vendor/github.com/emicklei/go-restful/swagger/swagger_webservice.go
  77. 0 268
      vendor/github.com/emicklei/go-restful/web_service.go
  78. 0 39
      vendor/github.com/emicklei/go-restful/web_service_container.go
  79. 0 7
      vendor/github.com/ghodss/yaml/.travis.yml
  80. 0 116
      vendor/github.com/ghodss/yaml/README.md
  81. 0 497
      vendor/github.com/ghodss/yaml/fields.go
  82. 0 277
      vendor/github.com/ghodss/yaml/yaml.go
  83. 201 0
      vendor/github.com/go-logr/logr/LICENSE
  84. 181 0
      vendor/github.com/go-logr/logr/README.md
  85. 3 0
      vendor/github.com/go-logr/logr/go.mod
  86. 178 0
      vendor/github.com/go-logr/logr/logr.go
  87. 0 1
      vendor/github.com/go-openapi/jsonpointer/.drone.sec
  88. 0 32
      vendor/github.com/go-openapi/jsonpointer/.drone.yml
  89. 0 1
      vendor/github.com/go-openapi/jsonpointer/.gitignore
  90. 0 13
      vendor/github.com/go-openapi/jsonpointer/.pullapprove.yml
  91. 0 74
      vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md
  92. 0 15
      vendor/github.com/go-openapi/jsonpointer/README.md
  93. 0 238
      vendor/github.com/go-openapi/jsonpointer/pointer.go
  94. 0 1
      vendor/github.com/go-openapi/jsonreference/.drone.sec
  95. 0 33
      vendor/github.com/go-openapi/jsonreference/.drone.yml
  96. 0 1
      vendor/github.com/go-openapi/jsonreference/.gitignore
  97. 0 13
      vendor/github.com/go-openapi/jsonreference/.pullapprove.yml
  98. 0 74
      vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md
  99. 0 15
      vendor/github.com/go-openapi/jsonreference/README.md
  100. 0 156
      vendor/github.com/go-openapi/jsonreference/reference.go

+ 7 - 28
go.mod

@@ -3,10 +3,7 @@ module github.com/coreos/flannel
 go 1.15
 
 require (
-	cloud.google.com/go v0.9.1-0.20170629112852-7c205da84d8d // indirect
 	github.com/Microsoft/hcsshim v0.8.6
-	github.com/PuerkitoBio/purell v1.0.0 // indirect
-	github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2 // indirect
 	github.com/aws/aws-sdk-go v1.12.54
 	github.com/bronze1man/goStrongswanVici v0.0.0-20171013065002-4d72634a2f11
 	github.com/containernetworking/plugins v0.8.6
@@ -15,41 +12,23 @@ require (
 	github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7
 	github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf
 	github.com/denverdino/aliyungo v0.0.0-20170629053852-f6cab0c35083
-	github.com/docker/distribution v2.4.0+incompatible // indirect
-	github.com/emicklei/go-restful v1.1.4-0.20161212084525-09691a3b6378 // indirect
-	github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 // indirect
 	github.com/go-ini/ini v1.28.1 // indirect
-	github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1 // indirect
-	github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9 // indirect
-	github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501 // indirect
-	github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87 // indirect
-	github.com/gogo/protobuf v0.0.0-20160824171236-909568be09de // indirect
-	github.com/golang/glog v0.0.0-20141105023935-44145f04b68c
-	github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 // indirect
-	github.com/howeyc/gopass v0.0.0-20160826175423-3ca23474a7c7 // indirect
-	github.com/imdario/mergo v0.0.0-20141206190957-6633656539c1 // indirect
+	github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
 	github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 // indirect
 	github.com/joho/godotenv v0.0.0-20161216230537-726cc8b906e3
 	github.com/jonboulle/clockwork v0.1.0
-	github.com/juju/ratelimit v0.0.0-20151125201925-77ed1c8a0121 // indirect
-	github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a // indirect
 	github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
 	github.com/pkg/errors v0.9.1
 	github.com/smartystreets/goconvey v1.6.4 // indirect
-	github.com/spf13/pflag v0.0.0-20151013200643-08b1a584251b // indirect
-	github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect
 	github.com/stretchr/testify v1.6.1 // indirect
 	github.com/ugorji/go v0.0.0-20170107133203-ded73eae5db7 // indirect
 	github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf
 	github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc
-	golang.org/x/net v0.0.0-20190311183353-d8887717615a
-	golang.org/x/oauth2 v0.0.0-20170629032740-5432cc9688e6
-	google.golang.org/api v0.0.0-20170627180304-e6586c9293b9
-	google.golang.org/appengine v0.0.0-20160823001527-4f7eeb5305a4 // indirect
+	golang.org/x/net v0.0.0-20200707034311-ab3426394381
+	golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
+	google.golang.org/api v0.15.0
 	gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
-	gopkg.in/inf.v0 v0.9.0 // indirect
-	gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 // indirect
-	gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6 // indirect
-	k8s.io/apimachinery v0.0.0-20170513172009-9603df80256c
-	k8s.io/client-go v3.0.1-0.20170829130306-a95edf803628+incompatible
+	k8s.io/api v0.19.4
+	k8s.io/apimachinery v0.19.4
+	k8s.io/client-go v0.19.4
 )

+ 314 - 38
go.sum

@@ -1,9 +1,36 @@
-cloud.google.com/go v0.9.1-0.20170629112852-7c205da84d8d h1:8yX21Ba5dcfwc9kJNmr7+6sSvq9ut9Iq+thGtfEMrNM=
-cloud.google.com/go v0.9.1-0.20170629112852-7c205da84d8d/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
+cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
+cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
+cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
+cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
+cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM=
+cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
+cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
+cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
+cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
+cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
+github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
+github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
+github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
+github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
+github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
+github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
+github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+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/Microsoft/go-winio v0.4.11 h1:zoIOcVf0xPN1tnMVbTtEdI+P8OofVk3NObnwOQ6nK2Q=
 github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
 github.com/Microsoft/hcsshim v0.8.6 h1:ZfF0+zZeYdzMIVMZHKtDKJvLHj76XCuVae/jNkjj0IA=
 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.0.0 h1:0GoNN3taZV6QI81IXgCbxMyEaJDXMSIjArYBCYzVVvs=
 github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2 h1:JCHLVE3B+kJde7bIEo5N4J+ZbLhp0J1Fs+ulyRws4gE=
@@ -14,6 +41,11 @@ github.com/aws/aws-sdk-go v1.12.54/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41Zo
 github.com/bronze1man/goStrongswanVici v0.0.0-20171013065002-4d72634a2f11 h1:BPqRtINHoFADOk8U+4CTZrbo3Oo2Ee2qpkpVXcdqhFk=
 github.com/bronze1man/goStrongswanVici v0.0.0-20171013065002-4d72634a2f11/go.mod h1:c+n7HXa5FxzR8GDsmu773UtbtrmKvMVerLVQeEbnzAE=
 github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/containernetworking/cni v0.7.1 h1:fE3r16wpSEyaqY4Z4oFrLMmIGfBYIKpPrHK31EJ9FzE=
 github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
 github.com/containernetworking/plugins v0.8.6 h1:npZTLiMa4CRn6m5P9+1Dz4O1j0UeFbm8VYN6dlsw568=
@@ -32,16 +64,29 @@ github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/
 github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
 github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/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/denverdino/aliyungo v0.0.0-20170629053852-f6cab0c35083 h1:XW41NGZPNsS9w43o/fc+xQHudjvmGAFbGjN4r8VUkHM=
 github.com/denverdino/aliyungo v0.0.0-20170629053852-f6cab0c35083/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
-github.com/docker/distribution v2.4.0+incompatible h1:JpqOwddezcGTLClCU2wfhYGq0n+KRJMcpNhJqMUDdH4=
-github.com/docker/distribution v2.4.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/emicklei/go-restful v1.1.4-0.20161212084525-09691a3b6378 h1:06njwgR6pXmS73SB2BRKPCjFO0tVALxlXQUTZD/lzAk=
-github.com/emicklei/go-restful v1.1.4-0.20161212084525-09691a3b6378/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
+github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
+github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
+github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 h1:ZktWZesgun21uEDrwW7iEV1zPCGQldM2atlJZ3TdvVM=
 github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
 github.com/go-ini/ini v1.28.1 h1:31infb1d2q1XtBq7msGogTnG0vODN/5poMiHg+cpXQw=
 github.com/go-ini/ini v1.28.1/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
+github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
+github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY=
+github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1 h1:wSt/4CYxs70xbATrGXhokKF1i0tZjENLOo1ioIO13zk=
 github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
 github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9 h1:tF+augKRWlWx0J0B7ZyyKSiTyV6E1zZe+7b3qQlcEf8=
@@ -51,20 +96,62 @@ github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nA
 github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87 h1:zP3nY8Tk2E6RTkqGYrarZXuzh+ffyLDljLxCy1iJw80=
 github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
 github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
-github.com/gogo/protobuf v0.0.0-20160824171236-909568be09de h1:x3lgSUinmYEHGtVGWoHjPdpa4pV+svd2rMhELi2jKzM=
-github.com/gogo/protobuf v0.0.0-20160824171236-909568be09de/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
-github.com/golang/glog v0.0.0-20141105023935-44145f04b68c h1:CbdkBQ1/PiAo0FYJhQGwASD8wrgNvTdf01g6+O9tNuA=
-github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
+github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA=
+github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 h1:ScAXWS+TR6MZKex+7Z8rneuSJH+FSDqd6ocQyl+ZHo4=
-github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
+github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
+github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/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/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
+github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=
+github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
 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/howeyc/gopass v0.0.0-20160826175423-3ca23474a7c7 h1:LbCYoFXPycb24uJR0m609Jat+Hq0jdrt/jnn9io95Gg=
-github.com/howeyc/gopass v0.0.0-20160826175423-3ca23474a7c7/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
-github.com/imdario/mergo v0.0.0-20141206190957-6633656539c1 h1:FeeCi0I2Fu8kA8IXrdVPtGzym+mW9bzfj9f26EaES9k=
-github.com/imdario/mergo v0.0.0-20141206190957-6633656539c1/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
+github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
+github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
 github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7 h1:SMvOWPJCES2GdFracYbBQh93GXac8fq7HeN6JnpduB8=
 github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
@@ -72,26 +159,51 @@ github.com/joho/godotenv v0.0.0-20161216230537-726cc8b906e3 h1:zShOjUfrFegEHgln4
 github.com/joho/godotenv v0.0.0-20161216230537-726cc8b906e3/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
 github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
 github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
 github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/juju/ratelimit v0.0.0-20151125201925-77ed1c8a0121 h1:tK7/W+/VbVcqFcQzl3qMnrc/z3h/XOBIrJ9e/cv5hx4=
-github.com/juju/ratelimit v0.0.0-20151125201925-77ed1c8a0121/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk=
+github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
 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-20160728113105-d5b7844b561a h1:TpvdAwDAt1K4ANVOfcihouRdvP+MgAfDWwBuct4l6ZY=
 github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
 github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
+github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
 github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b h1:Ey6yH0acn50T/v6CB75bGP4EMJqnv9WvnjN7oZaj+xE=
 github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
+github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a h1:KfNOeFvoAssuZLT7IntKZElKwi/5LRuxY71k+t6rfaM=
 github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
+github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
 github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
 github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
@@ -99,12 +211,13 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykE
 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
 github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/spf13/pflag v0.0.0-20151013200643-08b1a584251b h1:BnumbFpjTS6VXEbk2Xwk7CTt0HjRyX1rKAzaKTENl6A=
-github.com/spf13/pflag v0.0.0-20151013200643-08b1a584251b/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 h1:4bT0pPowCpQImewr+BjzfUKcuFW+KVyB8d1OF3b6oTI=
-github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4=
+github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
+github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/ugorji/go v0.0.0-20170107133203-ded73eae5db7 h1:BPPUhSq7uU6E9lFzyb81vjwVOhiWwMXp0EpKL75NX+8=
@@ -113,40 +226,203 @@ github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf h1:3J37+NPjNyG
 github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
 github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc h1:R83G5ikgLMxrBvLh22JhdfI8K6YXEPHx5P03Uu3DRs4=
 github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
+go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
+go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
+go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=
+go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
+golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
+golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
+golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/oauth2 v0.0.0-20170629032740-5432cc9688e6 h1:NNHfkA3lV0KH+RA2fvBqjAVfRlcYPiW4ziDM3EOGqmc=
-golang.org/x/oauth2 v0.0.0-20170629032740-5432cc9688e6/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs=
+golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f h1:25KHgbfyiSm6vwQLbM3zZIe1v9p/3ea4Rz+nnM5K/i4=
 golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8=
+golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/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.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-google.golang.org/api v0.0.0-20170627180304-e6586c9293b9 h1:mBOJiRv/VCBDt7w6Mn69yVg/hGn/YV9H3EfaJWLd0RA=
-google.golang.org/api v0.0.0-20170627180304-e6586c9293b9/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
-google.golang.org/appengine v0.0.0-20160823001527-4f7eeb5305a4 h1:WsXqDh29vwFPO3bhLP8QUL8uCcYISVMAMqbzqwaP8L0=
-google.golang.org/appengine v0.0.0-20160823001527-4f7eeb5305a4/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
+google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
+google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA=
+google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
+google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
+google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
+google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
 gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
 gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
 gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
-gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o=
-gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
-gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU=
-gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
-gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6 h1:CvAnnm1XvMjfib69SZzDwgWfOk+PxYz0hA0HBupilBA=
-gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
+gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-k8s.io/apimachinery v0.0.0-20170513172009-9603df80256c h1:jq0dLHQi+VhvwaCqm3G0oe9i2Njf19rWWae89DT/YIA=
-k8s.io/apimachinery v0.0.0-20170513172009-9603df80256c/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
-k8s.io/client-go v3.0.1-0.20170829130306-a95edf803628+incompatible h1:BBdM59YPzLnH+OxEMgAkbTwRM4WiBxnVFHYoxJzwhtc=
-k8s.io/client-go v3.0.1-0.20170829130306-a95edf803628+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo=
+k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk=
+k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0=
+k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
+k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8=
+k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA=
+k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
+k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
+k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
+k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
+k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ=
+k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
+k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
+k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=
+sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

+ 0 - 15
vendor/cloud.google.com/go/AUTHORS

@@ -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>

+ 0 - 37
vendor/cloud.google.com/go/CONTRIBUTORS

@@ -1,37 +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>
-Johan Euphrosine <proppy@google.com>
-Jonathan Amsterdam <jba@google.com>
-Luna Duclos <luna.duclos@palmstonegames.com>
-Magnus Hiie <magnus.hiie@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>

+ 1 - 1
vendor/cloud.google.com/go/LICENSE

@@ -187,7 +187,7 @@
       same "printed page" as the copyright notice for easier
       identification within third-party archives.
 
-   Copyright 2014 Google Inc.
+   Copyright [yyyy] [name of copyright owner]
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.

+ 12 - 0
vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json

@@ -0,0 +1,12 @@
+{
+  "name": "metadata",
+  "name_pretty": "Google Compute Engine Metadata API",
+  "product_documentation": "https://cloud.google.com/compute/docs/storing-retrieving-metadata",
+  "client_documentation": "https://godoc.org/cloud.google.com/go/compute/metadata",
+  "release_level": "ga",
+  "language": "go",
+  "repo": "googleapis/google-cloud-go",
+  "distribution_name": "cloud.google.com/go/compute/metadata",
+  "api_id": "compute:metadata",
+  "requires_billing": false
+}

+ 242 - 154
vendor/cloud.google.com/go/compute/metadata/metadata.go

@@ -1,4 +1,4 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
+// Copyright 2014 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
 package metadata // import "cloud.google.com/go/compute/metadata"
 
 import (
+	"context"
 	"encoding/json"
 	"fmt"
 	"io/ioutil"
@@ -31,9 +32,6 @@ import (
 	"strings"
 	"sync"
 	"time"
-
-	"golang.org/x/net/context"
-	"golang.org/x/net/context/ctxhttp"
 )
 
 const (
@@ -64,7 +62,7 @@ var (
 )
 
 var (
-	metaClient = &http.Client{
+	defaultClient = &Client{hc: &http.Client{
 		Transport: &http.Transport{
 			Dial: (&net.Dialer{
 				Timeout:   2 * time.Second,
@@ -72,15 +70,15 @@ var (
 			}).Dial,
 			ResponseHeaderTimeout: 2 * time.Second,
 		},
-	}
-	subscribeClient = &http.Client{
+	}}
+	subscribeClient = &Client{hc: &http.Client{
 		Transport: &http.Transport{
 			Dial: (&net.Dialer{
 				Timeout:   2 * time.Second,
 				KeepAlive: 30 * time.Second,
 			}).Dial,
 		},
-	}
+	}}
 )
 
 // NotDefinedError is returned when requested metadata is not defined.
@@ -95,74 +93,16 @@ func (suffix NotDefinedError) Error() string {
 	return fmt.Sprintf("metadata: GCE metadata %q not defined", string(suffix))
 }
 
-// Get returns a value from the metadata service.
-// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
-//
-// If the GCE_METADATA_HOST environment variable is not defined, a default of
-// 169.254.169.254 will be used instead.
-//
-// If the requested metadata is not defined, the returned error will
-// be of type NotDefinedError.
-func Get(suffix string) (string, error) {
-	val, _, err := getETag(metaClient, suffix)
-	return val, err
-}
-
-// getETag returns a value from the metadata service as well as the associated
-// ETag using the provided client. This func is otherwise equivalent to Get.
-func getETag(client *http.Client, suffix string) (value, etag string, err error) {
-	// Using a fixed IP makes it very difficult to spoof the metadata service in
-	// a container, which is an important use-case for local testing of cloud
-	// deployments. To enable spoofing of the metadata service, the environment
-	// variable GCE_METADATA_HOST is first inspected to decide where metadata
-	// requests shall go.
-	host := os.Getenv(metadataHostEnv)
-	if host == "" {
-		// Using 169.254.169.254 instead of "metadata" here because Go
-		// binaries built with the "netgo" tag and without cgo won't
-		// know the search suffix for "metadata" is
-		// ".google.internal", and this IP address is documented as
-		// being stable anyway.
-		host = metadataIP
-	}
-	url := "http://" + host + "/computeMetadata/v1/" + suffix
-	req, _ := http.NewRequest("GET", url, nil)
-	req.Header.Set("Metadata-Flavor", "Google")
-	req.Header.Set("User-Agent", userAgent)
-	res, err := client.Do(req)
-	if err != nil {
-		return "", "", err
-	}
-	defer res.Body.Close()
-	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
-	}
-	return string(all), res.Header.Get("Etag"), nil
-}
-
-func getTrimmed(suffix string) (s string, err error) {
-	s, err = Get(suffix)
-	s = strings.TrimSpace(s)
-	return
-}
-
-func (c *cachedValue) get() (v string, err error) {
+func (c *cachedValue) get(cl *Client) (v string, err error) {
 	defer c.mu.Unlock()
 	c.mu.Lock()
 	if c.v != "" {
 		return c.v, nil
 	}
 	if c.trim {
-		v, err = getTrimmed(c.k)
+		v, err = cl.getTrimmed(c.k)
 	} else {
-		v, err = Get(c.k)
+		v, err = cl.Get(c.k)
 	}
 	if err == nil {
 		c.v = v
@@ -197,11 +137,11 @@ 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)
-		res, err := ctxhttp.Do(ctx, metaClient, req)
+		res, err := defaultClient.hc.Do(req.WithContext(ctx))
 		if err != nil {
 			resc <- false
 			return
@@ -266,78 +206,199 @@ func systemInfoSuggestsGCE() bool {
 	return name == "Google" || name == "Google Compute Engine"
 }
 
-// Subscribe subscribes to a value from the metadata service.
-// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
-// The suffix may contain query parameters.
-//
-// Subscribe calls fn with the latest metadata value indicated by the provided
-// suffix. If the metadata value is deleted, fn is called with the empty string
-// and ok false. Subscribe blocks until fn returns a non-nil error or the value
-// is deleted. Subscribe returns the error value returned from the last call to
-// fn, which may be nil when ok == false.
+// Subscribe calls Client.Subscribe on a client designed for subscribing (one with no
+// ResponseHeaderTimeout).
 func Subscribe(suffix string, fn func(v string, ok bool) error) error {
-	const failedSubscribeSleep = time.Second * 5
+	return subscribeClient.Subscribe(suffix, fn)
+}
 
-	// First check to see if the metadata value exists at all.
-	val, lastETag, err := getETag(subscribeClient, suffix)
-	if err != nil {
-		return err
-	}
+// Get calls Client.Get on the default client.
+func Get(suffix string) (string, error) { return defaultClient.Get(suffix) }
 
-	if err := fn(val, true); err != nil {
-		return err
+// ProjectID returns the current instance's project ID string.
+func ProjectID() (string, error) { return defaultClient.ProjectID() }
+
+// NumericProjectID returns the current instance's numeric project ID.
+func NumericProjectID() (string, error) { return defaultClient.NumericProjectID() }
+
+// InternalIP returns the instance's primary internal IP address.
+func InternalIP() (string, error) { return defaultClient.InternalIP() }
+
+// ExternalIP returns the instance's primary external (public) IP address.
+func ExternalIP() (string, error) { return defaultClient.ExternalIP() }
+
+// Email calls Client.Email on the default client.
+func Email(serviceAccount string) (string, error) { return defaultClient.Email(serviceAccount) }
+
+// Hostname returns the instance's hostname. This will be of the form
+// "<instanceID>.c.<projID>.internal".
+func Hostname() (string, error) { return defaultClient.Hostname() }
+
+// InstanceTags returns the list of user-defined instance tags,
+// assigned when initially creating a GCE instance.
+func InstanceTags() ([]string, error) { return defaultClient.InstanceTags() }
+
+// InstanceID returns the current VM's numeric instance ID.
+func InstanceID() (string, error) { return defaultClient.InstanceID() }
+
+// InstanceName returns the current VM's instance ID string.
+func InstanceName() (string, error) { return defaultClient.InstanceName() }
+
+// Zone returns the current VM's zone, such as "us-central1-b".
+func Zone() (string, error) { return defaultClient.Zone() }
+
+// InstanceAttributes calls Client.InstanceAttributes on the default client.
+func InstanceAttributes() ([]string, error) { return defaultClient.InstanceAttributes() }
+
+// ProjectAttributes calls Client.ProjectAttributes on the default client.
+func ProjectAttributes() ([]string, error) { return defaultClient.ProjectAttributes() }
+
+// InstanceAttributeValue calls Client.InstanceAttributeValue on the default client.
+func InstanceAttributeValue(attr string) (string, error) {
+	return defaultClient.InstanceAttributeValue(attr)
+}
+
+// ProjectAttributeValue calls Client.ProjectAttributeValue on the default client.
+func ProjectAttributeValue(attr string) (string, error) {
+	return defaultClient.ProjectAttributeValue(attr)
+}
+
+// Scopes calls Client.Scopes on the default client.
+func Scopes(serviceAccount string) ([]string, error) { return defaultClient.Scopes(serviceAccount) }
+
+func strsContains(ss []string, s string) bool {
+	for _, v := range ss {
+		if v == s {
+			return true
+		}
 	}
+	return false
+}
 
-	ok := true
-	if strings.ContainsRune(suffix, '?') {
-		suffix += "&wait_for_change=true&last_etag="
-	} else {
-		suffix += "?wait_for_change=true&last_etag="
+// A Client provides metadata.
+type Client struct {
+	hc *http.Client
+}
+
+// NewClient returns a Client that can be used to fetch metadata. All HTTP requests
+// will use the given http.Client instead of the default client.
+func NewClient(c *http.Client) *Client {
+	return &Client{hc: c}
+}
+
+// getETag returns a value from the metadata service as well as the associated ETag.
+// This func is otherwise equivalent to Get.
+func (c *Client) getETag(suffix string) (value, etag string, err error) {
+	// Using a fixed IP makes it very difficult to spoof the metadata service in
+	// a container, which is an important use-case for local testing of cloud
+	// deployments. To enable spoofing of the metadata service, the environment
+	// variable GCE_METADATA_HOST is first inspected to decide where metadata
+	// requests shall go.
+	host := os.Getenv(metadataHostEnv)
+	if host == "" {
+		// Using 169.254.169.254 instead of "metadata" here because Go
+		// binaries built with the "netgo" tag and without cgo won't
+		// know the search suffix for "metadata" is
+		// ".google.internal", and this IP address is documented as
+		// being stable anyway.
+		host = metadataIP
 	}
-	for {
-		val, etag, err := getETag(subscribeClient, suffix+url.QueryEscape(lastETag))
-		if err != nil {
-			if _, deleted := err.(NotDefinedError); !deleted {
-				time.Sleep(failedSubscribeSleep)
-				continue // Retry on other errors.
-			}
-			ok = false
-		}
-		lastETag = etag
+	u := "http://" + host + "/computeMetadata/v1/" + suffix
+	req, err := http.NewRequest("GET", u, nil)
+	if err != nil {
+		return "", "", err
+	}
+	req.Header.Set("Metadata-Flavor", "Google")
+	req.Header.Set("User-Agent", userAgent)
+	res, err := c.hc.Do(req)
+	if err != nil {
+		return "", "", err
+	}
+	defer res.Body.Close()
+	if res.StatusCode == http.StatusNotFound {
+		return "", "", NotDefinedError(suffix)
+	}
+	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
+}
 
-		if err := fn(val, ok); err != nil || !ok {
-			return err
-		}
+// Get returns a value from the metadata service.
+// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
+//
+// If the GCE_METADATA_HOST environment variable is not defined, a default of
+// 169.254.169.254 will be used instead.
+//
+// If the requested metadata is not defined, the returned error will
+// be of type NotDefinedError.
+func (c *Client) Get(suffix string) (string, error) {
+	val, _, err := c.getETag(suffix)
+	return val, err
+}
+
+func (c *Client) getTrimmed(suffix string) (s string, err error) {
+	s, err = c.Get(suffix)
+	s = strings.TrimSpace(s)
+	return
+}
+
+func (c *Client) lines(suffix string) ([]string, error) {
+	j, err := c.Get(suffix)
+	if err != nil {
+		return nil, err
 	}
+	s := strings.Split(strings.TrimSpace(j), "\n")
+	for i := range s {
+		s[i] = strings.TrimSpace(s[i])
+	}
+	return s, nil
 }
 
 // ProjectID returns the current instance's project ID string.
-func ProjectID() (string, error) { return projID.get() }
+func (c *Client) ProjectID() (string, error) { return projID.get(c) }
 
 // NumericProjectID returns the current instance's numeric project ID.
-func NumericProjectID() (string, error) { return projNum.get() }
+func (c *Client) NumericProjectID() (string, error) { return projNum.get(c) }
+
+// InstanceID returns the current VM's numeric instance ID.
+func (c *Client) InstanceID() (string, error) { return instID.get(c) }
 
 // InternalIP returns the instance's primary internal IP address.
-func InternalIP() (string, error) {
-	return getTrimmed("instance/network-interfaces/0/ip")
+func (c *Client) InternalIP() (string, error) {
+	return c.getTrimmed("instance/network-interfaces/0/ip")
+}
+
+// Email returns the email address associated with the service account.
+// The account may be empty or the string "default" to use the instance's
+// main account.
+func (c *Client) Email(serviceAccount string) (string, error) {
+	if serviceAccount == "" {
+		serviceAccount = "default"
+	}
+	return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email")
 }
 
 // ExternalIP returns the instance's primary external (public) IP address.
-func ExternalIP() (string, error) {
-	return getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip")
+func (c *Client) ExternalIP() (string, error) {
+	return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip")
 }
 
 // Hostname returns the instance's hostname. This will be of the form
 // "<instanceID>.c.<projID>.internal".
-func Hostname() (string, error) {
-	return getTrimmed("instance/hostname")
+func (c *Client) Hostname() (string, error) {
+	return c.getTrimmed("instance/hostname")
 }
 
 // InstanceTags returns the list of user-defined instance tags,
 // assigned when initially creating a GCE instance.
-func InstanceTags() ([]string, error) {
+func (c *Client) InstanceTags() ([]string, error) {
 	var s []string
-	j, err := Get("instance/tags")
+	j, err := c.Get("instance/tags")
 	if err != nil {
 		return nil, err
 	}
@@ -347,23 +408,14 @@ func InstanceTags() ([]string, error) {
 	return s, nil
 }
 
-// InstanceID returns the current VM's numeric instance ID.
-func InstanceID() (string, error) {
-	return instID.get()
-}
-
 // InstanceName returns the current VM's instance ID string.
-func InstanceName() (string, error) {
-	host, err := Hostname()
-	if err != nil {
-		return "", err
-	}
-	return strings.Split(host, ".")[0], nil
+func (c *Client) InstanceName() (string, error) {
+	return c.getTrimmed("instance/name")
 }
 
 // Zone returns the current VM's zone, such as "us-central1-b".
-func Zone() (string, error) {
-	zone, err := getTrimmed("instance/zone")
+func (c *Client) Zone() (string, error) {
+	zone, err := c.getTrimmed("instance/zone")
 	// zone is of the form "projects/<projNum>/zones/<zoneName>".
 	if err != nil {
 		return "", err
@@ -374,24 +426,12 @@ func Zone() (string, error) {
 // InstanceAttributes returns the list of user-defined attributes,
 // assigned when initially creating a GCE VM instance. The value of an
 // attribute can be obtained with InstanceAttributeValue.
-func InstanceAttributes() ([]string, error) { return lines("instance/attributes/") }
+func (c *Client) InstanceAttributes() ([]string, error) { return c.lines("instance/attributes/") }
 
 // ProjectAttributes returns the list of user-defined attributes
 // applying to the project as a whole, not just this VM.  The value of
 // an attribute can be obtained with ProjectAttributeValue.
-func ProjectAttributes() ([]string, error) { return lines("project/attributes/") }
-
-func lines(suffix string) ([]string, error) {
-	j, err := Get(suffix)
-	if err != nil {
-		return nil, err
-	}
-	s := strings.Split(strings.TrimSpace(j), "\n")
-	for i := range s {
-		s[i] = strings.TrimSpace(s[i])
-	}
-	return s, nil
-}
+func (c *Client) ProjectAttributes() ([]string, error) { return c.lines("project/attributes/") }
 
 // InstanceAttributeValue returns the value of the provided VM
 // instance attribute.
@@ -401,8 +441,8 @@ func lines(suffix string) ([]string, error) {
 //
 // InstanceAttributeValue may return ("", nil) if the attribute was
 // defined to be the empty string.
-func InstanceAttributeValue(attr string) (string, error) {
-	return Get("instance/attributes/" + attr)
+func (c *Client) InstanceAttributeValue(attr string) (string, error) {
+	return c.Get("instance/attributes/" + attr)
 }
 
 // ProjectAttributeValue returns the value of the provided
@@ -413,25 +453,73 @@ func InstanceAttributeValue(attr string) (string, error) {
 //
 // ProjectAttributeValue may return ("", nil) if the attribute was
 // defined to be the empty string.
-func ProjectAttributeValue(attr string) (string, error) {
-	return Get("project/attributes/" + attr)
+func (c *Client) ProjectAttributeValue(attr string) (string, error) {
+	return c.Get("project/attributes/" + attr)
 }
 
 // Scopes returns the service account scopes for the given account.
 // The account may be empty or the string "default" to use the instance's
 // main account.
-func Scopes(serviceAccount string) ([]string, error) {
+func (c *Client) Scopes(serviceAccount string) ([]string, error) {
 	if serviceAccount == "" {
 		serviceAccount = "default"
 	}
-	return lines("instance/service-accounts/" + serviceAccount + "/scopes")
+	return c.lines("instance/service-accounts/" + serviceAccount + "/scopes")
 }
 
-func strsContains(ss []string, s string) bool {
-	for _, v := range ss {
-		if v == s {
-			return true
+// Subscribe subscribes to a value from the metadata service.
+// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/".
+// The suffix may contain query parameters.
+//
+// Subscribe calls fn with the latest metadata value indicated by the provided
+// suffix. If the metadata value is deleted, fn is called with the empty string
+// and ok false. Subscribe blocks until fn returns a non-nil error or the value
+// is deleted. Subscribe returns the error value returned from the last call to
+// fn, which may be nil when ok == false.
+func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) error {
+	const failedSubscribeSleep = time.Second * 5
+
+	// First check to see if the metadata value exists at all.
+	val, lastETag, err := c.getETag(suffix)
+	if err != nil {
+		return err
+	}
+
+	if err := fn(val, true); err != nil {
+		return err
+	}
+
+	ok := true
+	if strings.ContainsRune(suffix, '?') {
+		suffix += "&wait_for_change=true&last_etag="
+	} else {
+		suffix += "?wait_for_change=true&last_etag="
+	}
+	for {
+		val, etag, err := c.getETag(suffix + url.QueryEscape(lastETag))
+		if err != nil {
+			if _, deleted := err.(NotDefinedError); !deleted {
+				time.Sleep(failedSubscribeSleep)
+				continue // Retry on other errors.
+			}
+			ok = false
+		}
+		lastETag = etag
+
+		if err := fn(val, ok); err != nil || !ok {
+			return err
 		}
 	}
-	return false
+}
+
+// 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)
 }

+ 0 - 5
vendor/github.com/PuerkitoBio/purell/.gitignore

@@ -1,5 +0,0 @@
-*.sublime-*
-.DS_Store
-*.swp
-*.swo
-tags

+ 0 - 7
vendor/github.com/PuerkitoBio/purell/.travis.yml

@@ -1,7 +0,0 @@
-language: go
-
-go:
-    - 1.4
-    - 1.5
-    - 1.6
-    - tip

+ 0 - 12
vendor/github.com/PuerkitoBio/purell/LICENSE

@@ -1,12 +0,0 @@
-Copyright (c) 2012, Martin Angers
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 185
vendor/github.com/PuerkitoBio/purell/README.md

@@ -1,185 +0,0 @@
-# Purell
-
-Purell is a tiny Go library to normalize URLs. It returns a pure URL. Pure-ell. Sanitizer and all. Yeah, I know...
-
-Based on the [wikipedia paper][wiki] and the [RFC 3986 document][rfc].
-
-[![build status](https://secure.travis-ci.org/PuerkitoBio/purell.png)](http://travis-ci.org/PuerkitoBio/purell)
-
-## Install
-
-`go get github.com/PuerkitoBio/purell`
-
-## Changelog
-
-*    **2016-07-27 (v1.0.0)** : Normalize IDN to ASCII (thanks to @zenovich).
-*    **2015-02-08** : Add fix for relative paths issue ([PR #5][pr5]) and add fix for unnecessary encoding of reserved characters ([see issue #7][iss7]).
-*    **v0.2.0** : Add benchmarks, Attempt IDN support.
-*    **v0.1.0** : Initial release.
-
-## Examples
-
-From `example_test.go` (note that in your code, you would import "github.com/PuerkitoBio/purell", and would prefix references to its methods and constants with "purell."):
-
-```go
-package purell
-
-import (
-  "fmt"
-  "net/url"
-)
-
-func ExampleNormalizeURLString() {
-  if normalized, err := NormalizeURLString("hTTp://someWEBsite.com:80/Amazing%3f/url/",
-    FlagLowercaseScheme|FlagLowercaseHost|FlagUppercaseEscapes); err != nil {
-    panic(err)
-  } else {
-    fmt.Print(normalized)
-  }
-  // Output: http://somewebsite.com:80/Amazing%3F/url/
-}
-
-func ExampleMustNormalizeURLString() {
-  normalized := MustNormalizeURLString("hTTpS://someWEBsite.com:443/Amazing%fa/url/",
-    FlagsUnsafeGreedy)
-  fmt.Print(normalized)
-
-  // Output: http://somewebsite.com/Amazing%FA/url
-}
-
-func ExampleNormalizeURL() {
-  if u, err := url.Parse("Http://SomeUrl.com:8080/a/b/.././c///g?c=3&a=1&b=9&c=0#target"); err != nil {
-    panic(err)
-  } else {
-    normalized := NormalizeURL(u, FlagsUsuallySafeGreedy|FlagRemoveDuplicateSlashes|FlagRemoveFragment)
-    fmt.Print(normalized)
-  }
-
-  // Output: http://someurl.com:8080/a/c/g?c=3&a=1&b=9&c=0
-}
-```
-
-## API
-
-As seen in the examples above, purell offers three methods, `NormalizeURLString(string, NormalizationFlags) (string, error)`, `MustNormalizeURLString(string, NormalizationFlags) (string)` and `NormalizeURL(*url.URL, NormalizationFlags) (string)`. They all normalize the provided URL based on the specified flags. Here are the available flags:
-
-```go
-const (
-	// Safe normalizations
-	FlagLowercaseScheme           NormalizationFlags = 1 << iota // HTTP://host -> http://host, applied by default in Go1.1
-	FlagLowercaseHost                                            // http://HOST -> http://host
-	FlagUppercaseEscapes                                         // http://host/t%ef -> http://host/t%EF
-	FlagDecodeUnnecessaryEscapes                                 // http://host/t%41 -> http://host/tA
-	FlagEncodeNecessaryEscapes                                   // http://host/!"#$ -> http://host/%21%22#$
-	FlagRemoveDefaultPort                                        // http://host:80 -> http://host
-	FlagRemoveEmptyQuerySeparator                                // http://host/path? -> http://host/path
-
-	// Usually safe normalizations
-	FlagRemoveTrailingSlash // http://host/path/ -> http://host/path
-	FlagAddTrailingSlash    // http://host/path -> http://host/path/ (should choose only one of these add/remove trailing slash flags)
-	FlagRemoveDotSegments   // http://host/path/./a/b/../c -> http://host/path/a/c
-
-	// Unsafe normalizations
-	FlagRemoveDirectoryIndex   // http://host/path/index.html -> http://host/path/
-	FlagRemoveFragment         // http://host/path#fragment -> http://host/path
-	FlagForceHTTP              // https://host -> http://host
-	FlagRemoveDuplicateSlashes // http://host/path//a///b -> http://host/path/a/b
-	FlagRemoveWWW              // http://www.host/ -> http://host/
-	FlagAddWWW                 // http://host/ -> http://www.host/ (should choose only one of these add/remove WWW flags)
-	FlagSortQuery              // http://host/path?c=3&b=2&a=1&b=1 -> http://host/path?a=1&b=1&b=2&c=3
-
-	// Normalizations not in the wikipedia article, required to cover tests cases
-	// submitted by jehiah
-	FlagDecodeDWORDHost           // http://1113982867 -> http://66.102.7.147
-	FlagDecodeOctalHost           // http://0102.0146.07.0223 -> http://66.102.7.147
-	FlagDecodeHexHost             // http://0x42660793 -> http://66.102.7.147
-	FlagRemoveUnnecessaryHostDots // http://.host../path -> http://host/path
-	FlagRemoveEmptyPortSeparator  // http://host:/path -> http://host/path
-
-	// Convenience set of safe normalizations
-	FlagsSafe NormalizationFlags = FlagLowercaseHost | FlagLowercaseScheme | FlagUppercaseEscapes | FlagDecodeUnnecessaryEscapes | FlagEncodeNecessaryEscapes | FlagRemoveDefaultPort | FlagRemoveEmptyQuerySeparator
-
-	// For convenience sets, "greedy" uses the "remove trailing slash" and "remove www. prefix" flags,
-	// while "non-greedy" uses the "add (or keep) the trailing slash" and "add www. prefix".
-
-	// Convenience set of usually safe normalizations (includes FlagsSafe)
-	FlagsUsuallySafeGreedy    NormalizationFlags = FlagsSafe | FlagRemoveTrailingSlash | FlagRemoveDotSegments
-	FlagsUsuallySafeNonGreedy NormalizationFlags = FlagsSafe | FlagAddTrailingSlash | FlagRemoveDotSegments
-
-	// Convenience set of unsafe normalizations (includes FlagsUsuallySafe)
-	FlagsUnsafeGreedy    NormalizationFlags = FlagsUsuallySafeGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagRemoveWWW | FlagSortQuery
-	FlagsUnsafeNonGreedy NormalizationFlags = FlagsUsuallySafeNonGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagAddWWW | FlagSortQuery
-
-	// Convenience set of all available flags
-	FlagsAllGreedy    = FlagsUnsafeGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
-	FlagsAllNonGreedy = FlagsUnsafeNonGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
-)
-```
-
-For convenience, the set of flags `FlagsSafe`, `FlagsUsuallySafe[Greedy|NonGreedy]`, `FlagsUnsafe[Greedy|NonGreedy]` and `FlagsAll[Greedy|NonGreedy]` are provided for the similarly grouped normalizations on [wikipedia's URL normalization page][wiki]. You can add (using the bitwise OR `|` operator) or remove (using the bitwise AND NOT `&^` operator) individual flags from the sets if required, to build your own custom set.
-
-The [full godoc reference is available on gopkgdoc][godoc].
-
-Some things to note:
-
-*    `FlagDecodeUnnecessaryEscapes`, `FlagEncodeNecessaryEscapes`, `FlagUppercaseEscapes` and `FlagRemoveEmptyQuerySeparator` are always implicitly set, because internally, the URL string is parsed as an URL object, which automatically decodes unnecessary escapes, uppercases and encodes necessary ones, and removes empty query separators (an unnecessary `?` at the end of the url). So this operation cannot **not** be done. For this reason, `FlagRemoveEmptyQuerySeparator` (as well as the other three) has been included in the `FlagsSafe` convenience set, instead of `FlagsUnsafe`, where Wikipedia puts it.
-
-*    The `FlagDecodeUnnecessaryEscapes` decodes the following escapes (*from -> to*):
-    -    %24 -> $
-    -    %26 -> &
-    -    %2B-%3B -> +,-./0123456789:;
-    -    %3D -> =
-    -    %40-%5A -> @ABCDEFGHIJKLMNOPQRSTUVWXYZ
-    -    %5F -> _
-    -    %61-%7A -> abcdefghijklmnopqrstuvwxyz
-    -    %7E -> ~
-
-
-*    When the `NormalizeURL` function is used (passing an URL object), this source URL object is modified (that is, after the call, the URL object will be modified to reflect the normalization).
-
-*    The *replace IP with domain name* normalization (`http://208.77.188.166/ → http://www.example.com/`) is obviously not possible for a library without making some network requests. This is not implemented in purell.
-
-*    The *remove unused query string parameters* and *remove default query parameters* are also not implemented, since this is a very case-specific normalization, and it is quite trivial to do with an URL object.
-
-### Safe vs Usually Safe vs Unsafe
-
-Purell allows you to control the level of risk you take while normalizing an URL. You can aggressively normalize, play it totally safe, or anything in between.
-
-Consider the following URL:
-
-`HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid`
-
-Normalizing with the `FlagsSafe` gives:
-
-`https://www.root.com/toto/tE%1F///a/./b/../c/?z=3&w=2&a=4&w=1#invalid`
-
-With the `FlagsUsuallySafeGreedy`:
-
-`https://www.root.com/toto/tE%1F///a/c?z=3&w=2&a=4&w=1#invalid`
-
-And with `FlagsUnsafeGreedy`:
-
-`http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3`
-
-## TODOs
-
-*    Add a class/default instance to allow specifying custom directory index names? At the moment, removing directory index removes `(^|/)((?:default|index)\.\w{1,4})$`.
-
-## Thanks / Contributions
-
-@rogpeppe
-@jehiah
-@opennota
-@pchristopher1275
-@zenovich
-
-## License
-
-The [BSD 3-Clause license][bsd].
-
-[bsd]: http://opensource.org/licenses/BSD-3-Clause
-[wiki]: http://en.wikipedia.org/wiki/URL_normalization
-[rfc]: http://tools.ietf.org/html/rfc3986#section-6
-[godoc]: http://go.pkgdoc.org/github.com/PuerkitoBio/purell
-[pr5]: https://github.com/PuerkitoBio/purell/pull/5
-[iss7]: https://github.com/PuerkitoBio/purell/issues/7

+ 0 - 375
vendor/github.com/PuerkitoBio/purell/purell.go

@@ -1,375 +0,0 @@
-/*
-Package purell offers URL normalization as described on the wikipedia page:
-http://en.wikipedia.org/wiki/URL_normalization
-*/
-package purell
-
-import (
-	"bytes"
-	"fmt"
-	"net/url"
-	"regexp"
-	"sort"
-	"strconv"
-	"strings"
-
-	"github.com/PuerkitoBio/urlesc"
-	"golang.org/x/net/idna"
-	"golang.org/x/text/secure/precis"
-	"golang.org/x/text/unicode/norm"
-)
-
-// A set of normalization flags determines how a URL will
-// be normalized.
-type NormalizationFlags uint
-
-const (
-	// Safe normalizations
-	FlagLowercaseScheme           NormalizationFlags = 1 << iota // HTTP://host -> http://host, applied by default in Go1.1
-	FlagLowercaseHost                                            // http://HOST -> http://host
-	FlagUppercaseEscapes                                         // http://host/t%ef -> http://host/t%EF
-	FlagDecodeUnnecessaryEscapes                                 // http://host/t%41 -> http://host/tA
-	FlagEncodeNecessaryEscapes                                   // http://host/!"#$ -> http://host/%21%22#$
-	FlagRemoveDefaultPort                                        // http://host:80 -> http://host
-	FlagRemoveEmptyQuerySeparator                                // http://host/path? -> http://host/path
-
-	// Usually safe normalizations
-	FlagRemoveTrailingSlash // http://host/path/ -> http://host/path
-	FlagAddTrailingSlash    // http://host/path -> http://host/path/ (should choose only one of these add/remove trailing slash flags)
-	FlagRemoveDotSegments   // http://host/path/./a/b/../c -> http://host/path/a/c
-
-	// Unsafe normalizations
-	FlagRemoveDirectoryIndex   // http://host/path/index.html -> http://host/path/
-	FlagRemoveFragment         // http://host/path#fragment -> http://host/path
-	FlagForceHTTP              // https://host -> http://host
-	FlagRemoveDuplicateSlashes // http://host/path//a///b -> http://host/path/a/b
-	FlagRemoveWWW              // http://www.host/ -> http://host/
-	FlagAddWWW                 // http://host/ -> http://www.host/ (should choose only one of these add/remove WWW flags)
-	FlagSortQuery              // http://host/path?c=3&b=2&a=1&b=1 -> http://host/path?a=1&b=1&b=2&c=3
-
-	// Normalizations not in the wikipedia article, required to cover tests cases
-	// submitted by jehiah
-	FlagDecodeDWORDHost           // http://1113982867 -> http://66.102.7.147
-	FlagDecodeOctalHost           // http://0102.0146.07.0223 -> http://66.102.7.147
-	FlagDecodeHexHost             // http://0x42660793 -> http://66.102.7.147
-	FlagRemoveUnnecessaryHostDots // http://.host../path -> http://host/path
-	FlagRemoveEmptyPortSeparator  // http://host:/path -> http://host/path
-
-	// Convenience set of safe normalizations
-	FlagsSafe NormalizationFlags = FlagLowercaseHost | FlagLowercaseScheme | FlagUppercaseEscapes | FlagDecodeUnnecessaryEscapes | FlagEncodeNecessaryEscapes | FlagRemoveDefaultPort | FlagRemoveEmptyQuerySeparator
-
-	// For convenience sets, "greedy" uses the "remove trailing slash" and "remove www. prefix" flags,
-	// while "non-greedy" uses the "add (or keep) the trailing slash" and "add www. prefix".
-
-	// Convenience set of usually safe normalizations (includes FlagsSafe)
-	FlagsUsuallySafeGreedy    NormalizationFlags = FlagsSafe | FlagRemoveTrailingSlash | FlagRemoveDotSegments
-	FlagsUsuallySafeNonGreedy NormalizationFlags = FlagsSafe | FlagAddTrailingSlash | FlagRemoveDotSegments
-
-	// Convenience set of unsafe normalizations (includes FlagsUsuallySafe)
-	FlagsUnsafeGreedy    NormalizationFlags = FlagsUsuallySafeGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagRemoveWWW | FlagSortQuery
-	FlagsUnsafeNonGreedy NormalizationFlags = FlagsUsuallySafeNonGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagAddWWW | FlagSortQuery
-
-	// Convenience set of all available flags
-	FlagsAllGreedy    = FlagsUnsafeGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
-	FlagsAllNonGreedy = FlagsUnsafeNonGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator
-)
-
-const (
-	defaultHttpPort  = ":80"
-	defaultHttpsPort = ":443"
-)
-
-// Regular expressions used by the normalizations
-var rxPort = regexp.MustCompile(`(:\d+)/?$`)
-var rxDirIndex = regexp.MustCompile(`(^|/)((?:default|index)\.\w{1,4})$`)
-var rxDupSlashes = regexp.MustCompile(`/{2,}`)
-var rxDWORDHost = regexp.MustCompile(`^(\d+)((?:\.+)?(?:\:\d*)?)$`)
-var rxOctalHost = regexp.MustCompile(`^(0\d*)\.(0\d*)\.(0\d*)\.(0\d*)((?:\.+)?(?:\:\d*)?)$`)
-var rxHexHost = regexp.MustCompile(`^0x([0-9A-Fa-f]+)((?:\.+)?(?:\:\d*)?)$`)
-var rxHostDots = regexp.MustCompile(`^(.+?)(:\d+)?$`)
-var rxEmptyPort = regexp.MustCompile(`:+$`)
-
-// Map of flags to implementation function.
-// FlagDecodeUnnecessaryEscapes has no action, since it is done automatically
-// by parsing the string as an URL. Same for FlagUppercaseEscapes and FlagRemoveEmptyQuerySeparator.
-
-// Since maps have undefined traversing order, make a slice of ordered keys
-var flagsOrder = []NormalizationFlags{
-	FlagLowercaseScheme,
-	FlagLowercaseHost,
-	FlagRemoveDefaultPort,
-	FlagRemoveDirectoryIndex,
-	FlagRemoveDotSegments,
-	FlagRemoveFragment,
-	FlagForceHTTP, // Must be after remove default port (because https=443/http=80)
-	FlagRemoveDuplicateSlashes,
-	FlagRemoveWWW,
-	FlagAddWWW,
-	FlagSortQuery,
-	FlagDecodeDWORDHost,
-	FlagDecodeOctalHost,
-	FlagDecodeHexHost,
-	FlagRemoveUnnecessaryHostDots,
-	FlagRemoveEmptyPortSeparator,
-	FlagRemoveTrailingSlash, // These two (add/remove trailing slash) must be last
-	FlagAddTrailingSlash,
-}
-
-// ... and then the map, where order is unimportant
-var flags = map[NormalizationFlags]func(*url.URL){
-	FlagLowercaseScheme:           lowercaseScheme,
-	FlagLowercaseHost:             lowercaseHost,
-	FlagRemoveDefaultPort:         removeDefaultPort,
-	FlagRemoveDirectoryIndex:      removeDirectoryIndex,
-	FlagRemoveDotSegments:         removeDotSegments,
-	FlagRemoveFragment:            removeFragment,
-	FlagForceHTTP:                 forceHTTP,
-	FlagRemoveDuplicateSlashes:    removeDuplicateSlashes,
-	FlagRemoveWWW:                 removeWWW,
-	FlagAddWWW:                    addWWW,
-	FlagSortQuery:                 sortQuery,
-	FlagDecodeDWORDHost:           decodeDWORDHost,
-	FlagDecodeOctalHost:           decodeOctalHost,
-	FlagDecodeHexHost:             decodeHexHost,
-	FlagRemoveUnnecessaryHostDots: removeUnncessaryHostDots,
-	FlagRemoveEmptyPortSeparator:  removeEmptyPortSeparator,
-	FlagRemoveTrailingSlash:       removeTrailingSlash,
-	FlagAddTrailingSlash:          addTrailingSlash,
-}
-
-// MustNormalizeURLString returns the normalized string, and panics if an error occurs.
-// It takes an URL string as input, as well as the normalization flags.
-func MustNormalizeURLString(u string, f NormalizationFlags) string {
-	result, e := NormalizeURLString(u, f)
-	if e != nil {
-		panic(e)
-	}
-	return result
-}
-
-// NormalizeURLString returns the normalized string, or an error if it can't be parsed into an URL object.
-// It takes an URL string as input, as well as the normalization flags.
-func NormalizeURLString(u string, f NormalizationFlags) (string, error) {
-	if parsed, e := url.Parse(u); e != nil {
-		return "", e
-	} else {
-		options := make([]precis.Option, 1, 3)
-		options[0] = precis.IgnoreCase
-		if f&FlagLowercaseHost == FlagLowercaseHost {
-			options = append(options, precis.FoldCase())
-		}
-		options = append(options, precis.Norm(norm.NFC))
-		profile := precis.NewFreeform(options...)
-		if parsed.Host, e = idna.ToASCII(profile.NewTransformer().String(parsed.Host)); e != nil {
-			return "", e
-		}
-		return NormalizeURL(parsed, f), nil
-	}
-	panic("Unreachable code.")
-}
-
-// NormalizeURL returns the normalized string.
-// It takes a parsed URL object as input, as well as the normalization flags.
-func NormalizeURL(u *url.URL, f NormalizationFlags) string {
-	for _, k := range flagsOrder {
-		if f&k == k {
-			flags[k](u)
-		}
-	}
-	return urlesc.Escape(u)
-}
-
-func lowercaseScheme(u *url.URL) {
-	if len(u.Scheme) > 0 {
-		u.Scheme = strings.ToLower(u.Scheme)
-	}
-}
-
-func lowercaseHost(u *url.URL) {
-	if len(u.Host) > 0 {
-		u.Host = strings.ToLower(u.Host)
-	}
-}
-
-func removeDefaultPort(u *url.URL) {
-	if len(u.Host) > 0 {
-		scheme := strings.ToLower(u.Scheme)
-		u.Host = rxPort.ReplaceAllStringFunc(u.Host, func(val string) string {
-			if (scheme == "http" && val == defaultHttpPort) || (scheme == "https" && val == defaultHttpsPort) {
-				return ""
-			}
-			return val
-		})
-	}
-}
-
-func removeTrailingSlash(u *url.URL) {
-	if l := len(u.Path); l > 0 {
-		if strings.HasSuffix(u.Path, "/") {
-			u.Path = u.Path[:l-1]
-		}
-	} else if l = len(u.Host); l > 0 {
-		if strings.HasSuffix(u.Host, "/") {
-			u.Host = u.Host[:l-1]
-		}
-	}
-}
-
-func addTrailingSlash(u *url.URL) {
-	if l := len(u.Path); l > 0 {
-		if !strings.HasSuffix(u.Path, "/") {
-			u.Path += "/"
-		}
-	} else if l = len(u.Host); l > 0 {
-		if !strings.HasSuffix(u.Host, "/") {
-			u.Host += "/"
-		}
-	}
-}
-
-func removeDotSegments(u *url.URL) {
-	if len(u.Path) > 0 {
-		var dotFree []string
-		var lastIsDot bool
-
-		sections := strings.Split(u.Path, "/")
-		for _, s := range sections {
-			if s == ".." {
-				if len(dotFree) > 0 {
-					dotFree = dotFree[:len(dotFree)-1]
-				}
-			} else if s != "." {
-				dotFree = append(dotFree, s)
-			}
-			lastIsDot = (s == "." || s == "..")
-		}
-		// Special case if host does not end with / and new path does not begin with /
-		u.Path = strings.Join(dotFree, "/")
-		if u.Host != "" && !strings.HasSuffix(u.Host, "/") && !strings.HasPrefix(u.Path, "/") {
-			u.Path = "/" + u.Path
-		}
-		// Special case if the last segment was a dot, make sure the path ends with a slash
-		if lastIsDot && !strings.HasSuffix(u.Path, "/") {
-			u.Path += "/"
-		}
-	}
-}
-
-func removeDirectoryIndex(u *url.URL) {
-	if len(u.Path) > 0 {
-		u.Path = rxDirIndex.ReplaceAllString(u.Path, "$1")
-	}
-}
-
-func removeFragment(u *url.URL) {
-	u.Fragment = ""
-}
-
-func forceHTTP(u *url.URL) {
-	if strings.ToLower(u.Scheme) == "https" {
-		u.Scheme = "http"
-	}
-}
-
-func removeDuplicateSlashes(u *url.URL) {
-	if len(u.Path) > 0 {
-		u.Path = rxDupSlashes.ReplaceAllString(u.Path, "/")
-	}
-}
-
-func removeWWW(u *url.URL) {
-	if len(u.Host) > 0 && strings.HasPrefix(strings.ToLower(u.Host), "www.") {
-		u.Host = u.Host[4:]
-	}
-}
-
-func addWWW(u *url.URL) {
-	if len(u.Host) > 0 && !strings.HasPrefix(strings.ToLower(u.Host), "www.") {
-		u.Host = "www." + u.Host
-	}
-}
-
-func sortQuery(u *url.URL) {
-	q := u.Query()
-
-	if len(q) > 0 {
-		arKeys := make([]string, len(q))
-		i := 0
-		for k, _ := range q {
-			arKeys[i] = k
-			i++
-		}
-		sort.Strings(arKeys)
-		buf := new(bytes.Buffer)
-		for _, k := range arKeys {
-			sort.Strings(q[k])
-			for _, v := range q[k] {
-				if buf.Len() > 0 {
-					buf.WriteRune('&')
-				}
-				buf.WriteString(fmt.Sprintf("%s=%s", k, urlesc.QueryEscape(v)))
-			}
-		}
-
-		// Rebuild the raw query string
-		u.RawQuery = buf.String()
-	}
-}
-
-func decodeDWORDHost(u *url.URL) {
-	if len(u.Host) > 0 {
-		if matches := rxDWORDHost.FindStringSubmatch(u.Host); len(matches) > 2 {
-			var parts [4]int64
-
-			dword, _ := strconv.ParseInt(matches[1], 10, 0)
-			for i, shift := range []uint{24, 16, 8, 0} {
-				parts[i] = dword >> shift & 0xFF
-			}
-			u.Host = fmt.Sprintf("%d.%d.%d.%d%s", parts[0], parts[1], parts[2], parts[3], matches[2])
-		}
-	}
-}
-
-func decodeOctalHost(u *url.URL) {
-	if len(u.Host) > 0 {
-		if matches := rxOctalHost.FindStringSubmatch(u.Host); len(matches) > 5 {
-			var parts [4]int64
-
-			for i := 1; i <= 4; i++ {
-				parts[i-1], _ = strconv.ParseInt(matches[i], 8, 0)
-			}
-			u.Host = fmt.Sprintf("%d.%d.%d.%d%s", parts[0], parts[1], parts[2], parts[3], matches[5])
-		}
-	}
-}
-
-func decodeHexHost(u *url.URL) {
-	if len(u.Host) > 0 {
-		if matches := rxHexHost.FindStringSubmatch(u.Host); len(matches) > 2 {
-			// Conversion is safe because of regex validation
-			parsed, _ := strconv.ParseInt(matches[1], 16, 0)
-			// Set host as DWORD (base 10) encoded host
-			u.Host = fmt.Sprintf("%d%s", parsed, matches[2])
-			// The rest is the same as decoding a DWORD host
-			decodeDWORDHost(u)
-		}
-	}
-}
-
-func removeUnncessaryHostDots(u *url.URL) {
-	if len(u.Host) > 0 {
-		if matches := rxHostDots.FindStringSubmatch(u.Host); len(matches) > 1 {
-			// Trim the leading and trailing dots
-			u.Host = strings.Trim(matches[1], ".")
-			if len(matches) > 2 {
-				u.Host += matches[2]
-			}
-		}
-	}
-}
-
-func removeEmptyPortSeparator(u *url.URL) {
-	if len(u.Host) > 0 {
-		u.Host = rxEmptyPort.ReplaceAllString(u.Host, "")
-	}
-}

+ 0 - 11
vendor/github.com/PuerkitoBio/urlesc/.travis.yml

@@ -1,11 +0,0 @@
-language: go
-
-go:
-  - 1.4
-  - tip
-
-install:
-  - go build .
-
-script:
-  - go test -v

+ 0 - 27
vendor/github.com/PuerkitoBio/urlesc/LICENSE

@@ -1,27 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 16
vendor/github.com/PuerkitoBio/urlesc/README.md

@@ -1,16 +0,0 @@
-urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.png?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc)
-======
-
-Package urlesc implements query escaping as per RFC 3986.
-
-It contains some parts of the net/url package, modified so as to allow
-some reserved characters incorrectly escaped by net/url (see [issue 5684](https://github.com/golang/go/issues/5684)).
-
-## Install
-
-    go get github.com/PuerkitoBio/urlesc
-
-## License
-
-Go license (BSD-3-Clause)
-

+ 0 - 180
vendor/github.com/PuerkitoBio/urlesc/urlesc.go

@@ -1,180 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package urlesc implements query escaping as per RFC 3986.
-// It contains some parts of the net/url package, modified so as to allow
-// some reserved characters incorrectly escaped by net/url.
-// See https://github.com/golang/go/issues/5684
-package urlesc
-
-import (
-	"bytes"
-	"net/url"
-	"strings"
-)
-
-type encoding int
-
-const (
-	encodePath encoding = 1 + iota
-	encodeUserPassword
-	encodeQueryComponent
-	encodeFragment
-)
-
-// Return true if the specified character should be escaped when
-// appearing in a URL string, according to RFC 3986.
-func shouldEscape(c byte, mode encoding) bool {
-	// §2.3 Unreserved characters (alphanum)
-	if 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' {
-		return false
-	}
-
-	switch c {
-	case '-', '.', '_', '~': // §2.3 Unreserved characters (mark)
-		return false
-
-	// §2.2 Reserved characters (reserved)
-	case ':', '/', '?', '#', '[', ']', '@', // gen-delims
-		'!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=': // sub-delims
-		// Different sections of the URL allow a few of
-		// the reserved characters to appear unescaped.
-		switch mode {
-		case encodePath: // §3.3
-			// The RFC allows sub-delims and : @.
-			// '/', '[' and ']' can be used to assign meaning to individual path
-			// segments.  This package only manipulates the path as a whole,
-			// so we allow those as well.  That leaves only ? and # to escape.
-			return c == '?' || c == '#'
-
-		case encodeUserPassword: // §3.2.1
-			// The RFC allows : and sub-delims in
-			// userinfo.  The parsing of userinfo treats ':' as special so we must escape
-			// all the gen-delims.
-			return c == ':' || c == '/' || c == '?' || c == '#' || c == '[' || c == ']' || c == '@'
-
-		case encodeQueryComponent: // §3.4
-			// The RFC allows / and ?.
-			return c != '/' && c != '?'
-
-		case encodeFragment: // §4.1
-			// The RFC text is silent but the grammar allows
-			// everything, so escape nothing but #
-			return c == '#'
-		}
-	}
-
-	// Everything else must be escaped.
-	return true
-}
-
-// QueryEscape escapes the string so it can be safely placed
-// inside a URL query.
-func QueryEscape(s string) string {
-	return escape(s, encodeQueryComponent)
-}
-
-func escape(s string, mode encoding) string {
-	spaceCount, hexCount := 0, 0
-	for i := 0; i < len(s); i++ {
-		c := s[i]
-		if shouldEscape(c, mode) {
-			if c == ' ' && mode == encodeQueryComponent {
-				spaceCount++
-			} else {
-				hexCount++
-			}
-		}
-	}
-
-	if spaceCount == 0 && hexCount == 0 {
-		return s
-	}
-
-	t := make([]byte, len(s)+2*hexCount)
-	j := 0
-	for i := 0; i < len(s); i++ {
-		switch c := s[i]; {
-		case c == ' ' && mode == encodeQueryComponent:
-			t[j] = '+'
-			j++
-		case shouldEscape(c, mode):
-			t[j] = '%'
-			t[j+1] = "0123456789ABCDEF"[c>>4]
-			t[j+2] = "0123456789ABCDEF"[c&15]
-			j += 3
-		default:
-			t[j] = s[i]
-			j++
-		}
-	}
-	return string(t)
-}
-
-var uiReplacer = strings.NewReplacer(
-	"%21", "!",
-	"%27", "'",
-	"%28", "(",
-	"%29", ")",
-	"%2A", "*",
-)
-
-// unescapeUserinfo unescapes some characters that need not to be escaped as per RFC3986.
-func unescapeUserinfo(s string) string {
-	return uiReplacer.Replace(s)
-}
-
-// Escape reassembles the URL into a valid URL string.
-// The general form of the result is one of:
-//
-//	scheme:opaque
-//	scheme://userinfo@host/path?query#fragment
-//
-// If u.Opaque is non-empty, String uses the first form;
-// otherwise it uses the second form.
-//
-// In the second form, the following rules apply:
-//	- if u.Scheme is empty, scheme: is omitted.
-//	- if u.User is nil, userinfo@ is omitted.
-//	- if u.Host is empty, host/ is omitted.
-//	- if u.Scheme and u.Host are empty and u.User is nil,
-//	   the entire scheme://userinfo@host/ is omitted.
-//	- if u.Host is non-empty and u.Path begins with a /,
-//	   the form host/path does not add its own /.
-//	- if u.RawQuery is empty, ?query is omitted.
-//	- if u.Fragment is empty, #fragment is omitted.
-func Escape(u *url.URL) string {
-	var buf bytes.Buffer
-	if u.Scheme != "" {
-		buf.WriteString(u.Scheme)
-		buf.WriteByte(':')
-	}
-	if u.Opaque != "" {
-		buf.WriteString(u.Opaque)
-	} else {
-		if u.Scheme != "" || u.Host != "" || u.User != nil {
-			buf.WriteString("//")
-			if ui := u.User; ui != nil {
-				buf.WriteString(unescapeUserinfo(ui.String()))
-				buf.WriteByte('@')
-			}
-			if h := u.Host; h != "" {
-				buf.WriteString(h)
-			}
-		}
-		if u.Path != "" && u.Path[0] != '/' && u.Host != "" {
-			buf.WriteByte('/')
-		}
-		buf.WriteString(escape(u.Path, encodePath))
-	}
-	if u.RawQuery != "" {
-		buf.WriteByte('?')
-		buf.WriteString(u.RawQuery)
-	}
-	if u.Fragment != "" {
-		buf.WriteByte('#')
-		buf.WriteString(escape(u.Fragment, encodeFragment))
-	}
-	return buf.String()
-}

+ 1 - 1
vendor/github.com/davecgh/go-spew/LICENSE

@@ -2,7 +2,7 @@ ISC License
 
 Copyright (c) 2012-2016 Dave Collins <dave@davec.name>
 
-Permission to use, copy, modify, and distribute this software for any
+Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
 copyright notice and this permission notice appear in all copies.
 

+ 90 - 97
vendor/github.com/davecgh/go-spew/spew/bypass.go

@@ -16,7 +16,9 @@
 // when the code is not running on Google App Engine, compiled by GopherJS, and
 // "-tags safe" is not added to the go build command line.  The "disableunsafe"
 // tag is deprecated and thus should not be used.
-// +build !js,!appengine,!safe,!disableunsafe
+// Go versions prior to 1.4 are disabled because they use a different layout
+// for interfaces which make the implementation of unsafeReflectValue more complex.
+// +build !js,!appengine,!safe,!disableunsafe,go1.4
 
 package spew
 
@@ -34,80 +36,49 @@ const (
 	ptrSize = unsafe.Sizeof((*byte)(nil))
 )
 
+type flag uintptr
+
 var (
-	// offsetPtr, offsetScalar, and offsetFlag are the offsets for the
-	// internal reflect.Value fields.  These values are valid before golang
-	// commit ecccf07e7f9d which changed the format.  The are also valid
-	// after commit 82f48826c6c7 which changed the format again to mirror
-	// the original format.  Code in the init function updates these offsets
-	// as necessary.
-	offsetPtr    = uintptr(ptrSize)
-	offsetScalar = uintptr(0)
-	offsetFlag   = uintptr(ptrSize * 2)
-
-	// flagKindWidth and flagKindShift indicate various bits that the
-	// reflect package uses internally to track kind information.
-	//
-	// flagRO indicates whether or not the value field of a reflect.Value is
-	// read-only.
-	//
-	// flagIndir indicates whether the value field of a reflect.Value is
-	// the actual data or a pointer to the data.
-	//
-	// These values are valid before golang commit 90a7c3c86944 which
-	// changed their positions.  Code in the init function updates these
-	// flags as necessary.
-	flagKindWidth = uintptr(5)
-	flagKindShift = uintptr(flagKindWidth - 1)
-	flagRO        = uintptr(1 << 0)
-	flagIndir     = uintptr(1 << 1)
+	// flagRO indicates whether the value field of a reflect.Value
+	// is read-only.
+	flagRO flag
+
+	// flagAddr indicates whether the address of the reflect.Value's
+	// value may be taken.
+	flagAddr flag
 )
 
-func init() {
-	// Older versions of reflect.Value stored small integers directly in the
-	// ptr field (which is named val in the older versions).  Versions
-	// between commits ecccf07e7f9d and 82f48826c6c7 added a new field named
-	// scalar for this purpose which unfortunately came before the flag
-	// field, so the offset of the flag field is different for those
-	// versions.
-	//
-	// This code constructs a new reflect.Value from a known small integer
-	// and checks if the size of the reflect.Value struct indicates it has
-	// the scalar field. When it does, the offsets are updated accordingly.
-	vv := reflect.ValueOf(0xf00)
-	if unsafe.Sizeof(vv) == (ptrSize * 4) {
-		offsetScalar = ptrSize * 2
-		offsetFlag = ptrSize * 3
-	}
+// flagKindMask holds the bits that make up the kind
+// part of the flags field. In all the supported versions,
+// it is in the lower 5 bits.
+const flagKindMask = flag(0x1f)
 
-	// Commit 90a7c3c86944 changed the flag positions such that the low
-	// order bits are the kind.  This code extracts the kind from the flags
-	// field and ensures it's the correct type.  When it's not, the flag
-	// order has been changed to the newer format, so the flags are updated
-	// accordingly.
-	upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag)
-	upfv := *(*uintptr)(upf)
-	flagKindMask := uintptr((1<<flagKindWidth - 1) << flagKindShift)
-	if (upfv&flagKindMask)>>flagKindShift != uintptr(reflect.Int) {
-		flagKindShift = 0
-		flagRO = 1 << 5
-		flagIndir = 1 << 6
-
-		// Commit adf9b30e5594 modified the flags to separate the
-		// flagRO flag into two bits which specifies whether or not the
-		// field is embedded.  This causes flagIndir to move over a bit
-		// and means that flagRO is the combination of either of the
-		// original flagRO bit and the new bit.
-		//
-		// This code detects the change by extracting what used to be
-		// the indirect bit to ensure it's set.  When it's not, the flag
-		// order has been changed to the newer format, so the flags are
-		// updated accordingly.
-		if upfv&flagIndir == 0 {
-			flagRO = 3 << 5
-			flagIndir = 1 << 7
-		}
+// Different versions of Go have used different
+// bit layouts for the flags type. This table
+// records the known combinations.
+var okFlags = []struct {
+	ro, addr flag
+}{{
+	// From Go 1.4 to 1.5
+	ro:   1 << 5,
+	addr: 1 << 7,
+}, {
+	// Up to Go tip.
+	ro:   1<<5 | 1<<6,
+	addr: 1 << 8,
+}}
+
+var flagValOffset = func() uintptr {
+	field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
+	if !ok {
+		panic("reflect.Value has no flag field")
 	}
+	return field.Offset
+}()
+
+// flagField returns a pointer to the flag field of a reflect.Value.
+func flagField(v *reflect.Value) *flag {
+	return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset))
 }
 
 // unsafeReflectValue converts the passed reflect.Value into a one that bypasses
@@ -119,34 +90,56 @@ func init() {
 // This allows us to check for implementations of the Stringer and error
 // interfaces to be used for pretty printing ordinarily unaddressable and
 // inaccessible values such as unexported struct fields.
-func unsafeReflectValue(v reflect.Value) (rv reflect.Value) {
-	indirects := 1
-	vt := v.Type()
-	upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr)
-	rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag))
-	if rvf&flagIndir != 0 {
-		vt = reflect.PtrTo(v.Type())
-		indirects++
-	} else if offsetScalar != 0 {
-		// The value is in the scalar field when it's not one of the
-		// reference types.
-		switch vt.Kind() {
-		case reflect.Uintptr:
-		case reflect.Chan:
-		case reflect.Func:
-		case reflect.Map:
-		case reflect.Ptr:
-		case reflect.UnsafePointer:
-		default:
-			upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) +
-				offsetScalar)
-		}
+func unsafeReflectValue(v reflect.Value) reflect.Value {
+	if !v.IsValid() || (v.CanInterface() && v.CanAddr()) {
+		return v
 	}
+	flagFieldPtr := flagField(&v)
+	*flagFieldPtr &^= flagRO
+	*flagFieldPtr |= flagAddr
+	return v
+}
 
-	pv := reflect.NewAt(vt, upv)
-	rv = pv
-	for i := 0; i < indirects; i++ {
-		rv = rv.Elem()
+// Sanity checks against future reflect package changes
+// to the type or semantics of the Value.flag field.
+func init() {
+	field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag")
+	if !ok {
+		panic("reflect.Value has no flag field")
+	}
+	if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() {
+		panic("reflect.Value flag field has changed kind")
+	}
+	type t0 int
+	var t struct {
+		A t0
+		// t0 will have flagEmbedRO set.
+		t0
+		// a will have flagStickyRO set
+		a t0
+	}
+	vA := reflect.ValueOf(t).FieldByName("A")
+	va := reflect.ValueOf(t).FieldByName("a")
+	vt0 := reflect.ValueOf(t).FieldByName("t0")
+
+	// Infer flagRO from the difference between the flags
+	// for the (otherwise identical) fields in t.
+	flagPublic := *flagField(&vA)
+	flagWithRO := *flagField(&va) | *flagField(&vt0)
+	flagRO = flagPublic ^ flagWithRO
+
+	// Infer flagAddr from the difference between a value
+	// taken from a pointer and not.
+	vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A")
+	flagNoPtr := *flagField(&vA)
+	flagPtr := *flagField(&vPtrA)
+	flagAddr = flagNoPtr ^ flagPtr
+
+	// Check that the inferred flags tally with one of the known versions.
+	for _, f := range okFlags {
+		if flagRO == f.ro && flagAddr == f.addr {
+			return
+		}
 	}
-	return rv
+	panic("reflect.Value read-only flag has changed semantics")
 }

+ 1 - 1
vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

@@ -16,7 +16,7 @@
 // when the code is running on Google App Engine, compiled by GopherJS, or
 // "-tags safe" is added to the go build command line.  The "disableunsafe"
 // tag is deprecated and thus should not be used.
-// +build js appengine safe disableunsafe
+// +build js appengine safe disableunsafe !go1.4
 
 package spew
 

+ 1 - 1
vendor/github.com/davecgh/go-spew/spew/common.go

@@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) {
 	w.Write(closeParenBytes)
 }
 
-// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x'
+// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x'
 // prefix to Writer w.
 func printHexPtr(w io.Writer, p uintptr) {
 	// Null pointer.

+ 5 - 5
vendor/github.com/davecgh/go-spew/spew/dump.go

@@ -35,16 +35,16 @@ var (
 
 	// cCharRE is a regular expression that matches a cgo char.
 	// It is used to detect character arrays to hexdump them.
-	cCharRE = regexp.MustCompile("^.*\\._Ctype_char$")
+	cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`)
 
 	// cUnsignedCharRE is a regular expression that matches a cgo unsigned
 	// char.  It is used to detect unsigned character arrays to hexdump
 	// them.
-	cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$")
+	cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`)
 
 	// cUint8tCharRE is a regular expression that matches a cgo uint8_t.
 	// It is used to detect uint8_t arrays to hexdump them.
-	cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$")
+	cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`)
 )
 
 // dumpState contains information about the state of a dump operation.
@@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) {
 	// Display dereferenced value.
 	d.w.Write(openParenBytes)
 	switch {
-	case nilFound == true:
+	case nilFound:
 		d.w.Write(nilAngleBytes)
 
-	case cycleFound == true:
+	case cycleFound:
 		d.w.Write(circularBytes)
 
 	default:

+ 2 - 2
vendor/github.com/davecgh/go-spew/spew/format.go

@@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) {
 
 	// Display dereferenced value.
 	switch {
-	case nilFound == true:
+	case nilFound:
 		f.fs.Write(nilAngleBytes)
 
-	case cycleFound == true:
+	case cycleFound:
 		f.fs.Write(circularShortBytes)
 
 	default:

+ 0 - 133
vendor/github.com/docker/distribution/AUTHORS

@@ -1,133 +0,0 @@
-Aaron Lehmann <aaron.lehmann@docker.com>
-Aaron Schlesinger <aschlesinger@deis.com>
-Aaron Vinson <avinson.public@gmail.com>
-Adam Enger <adamenger@gmail.com>
-Adrian Mouat <adrian.mouat@gmail.com>
-Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
-Alex Chan <alex.chan@metaswitch.com>
-Alex Elman <aelman@indeed.com>
-amitshukla <ashukla73@hotmail.com>
-Amy Lindburg <amy.lindburg@docker.com>
-Andrew Meredith <andymeredith@gmail.com>
-Andrew T Nguyen <andrew.nguyen@docker.com>
-Andrey Kostov <kostov.andrey@gmail.com>
-Andy Goldstein <agoldste@redhat.com>
-Anton Tiurin <noxiouz@yandex.ru>
-Antonio Mercado <amercado@thinknode.com>
-Antonio Murdaca <runcom@redhat.com>
-Arnaud Porterie <arnaud.porterie@docker.com>
-Arthur Baars <arthur@semmle.com>
-Asuka Suzuki <hello@tanksuzuki.com>
-Avi Miller <avi.miller@oracle.com>
-Ayose Cazorla <ayosec@gmail.com>
-BadZen <dave.trombley@gmail.com>
-Ben Firshman <ben@firshman.co.uk>
-bin liu <liubin0329@gmail.com>
-Brian Bland <brian.bland@docker.com>
-burnettk <burnettk@gmail.com>
-Carson A <ca@carsonoid.net>
-Chris Dillon <squarism@gmail.com>
-Daisuke Fujita <dtanshi45@gmail.com>
-Daniel Huhn <daniel@danielhuhn.de>
-Darren Shepherd <darren@rancher.com>
-Dave Trombley <dave.trombley@gmail.com>
-Dave Tucker <dt@docker.com>
-David Lawrence <david.lawrence@docker.com>
-David Verhasselt <david@crowdway.com>
-David Xia <dxia@spotify.com>
-davidli <wenquan.li@hp.com>
-Dejan Golja <dejan@golja.org>
-Derek McGowan <derek@mcgstyle.net>
-Diogo Mónica <diogo.monica@gmail.com>
-DJ Enriquez <dj.enriquez@infospace.com>
-Donald Huang <don.hcd@gmail.com>
-Doug Davis <dug@us.ibm.com>
-Eric Yang <windfarer@gmail.com>
-farmerworking <farmerworking@gmail.com>
-Felix Yan <felixonmars@archlinux.org>
-Florentin Raud <florentin.raud@gmail.com>
-Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
-gabriell nascimento <gabriell@bluesoft.com.br>
-harche <p.harshal@gmail.com>
-Henri Gomez <henri.gomez@gmail.com>
-Hu Keping <hukeping@huawei.com>
-Hua Wang <wanghua.humble@gmail.com>
-HuKeping <hukeping@huawei.com>
-Ian Babrou <ibobrik@gmail.com>
-igayoso <igayoso@gmail.com>
-Jack Griffin <jackpg14@gmail.com>
-Jason Freidman <jason.freidman@gmail.com>
-Jeff Nickoloff <jeff@allingeek.com>
-Jessie Frazelle <jessie@docker.com>
-Jianqing Wang <tsing@jianqing.org>
-John Starks <jostarks@microsoft.com>
-Jon Johnson <jonjohnson@google.com>
-Jon Poler <jonathan.poler@apcera.com>
-Jonathan Boulle <jonathanboulle@gmail.com>
-Jordan Liggitt <jliggitt@redhat.com>
-Josh Hawn <josh.hawn@docker.com>
-Julien Fernandez <julien.fernandez@gmail.com>
-Keerthan Mala <kmala@engineyard.com>
-Kelsey Hightower <kelsey.hightower@gmail.com>
-Kenneth Lim <kennethlimcp@gmail.com>
-Kenny Leung <kleung@google.com>
-Li Yi <denverdino@gmail.com>
-Liu Hua <sdu.liu@huawei.com>
-liuchang0812 <liuchang0812@gmail.com>
-Louis Kottmann <louis.kottmann@gmail.com>
-Luke Carpenter <x@rubynerd.net>
-Mary Anthony <mary@docker.com>
-Matt Bentley <mbentley@mbentley.net>
-Matt Duch <matt@learnmetrics.com>
-Matt Moore <mattmoor@google.com>
-Matt Robenolt <matt@ydekproductions.com>
-Michael Prokop <mika@grml.org>
-Michal Minar <miminar@redhat.com>
-Miquel Sabaté <msabate@suse.com>
-Morgan Bauer <mbauer@us.ibm.com>
-moxiegirl <mary@docker.com>
-Nathan Sullivan <nathan@nightsys.net>
-nevermosby <robolwq@qq.com>
-Nghia Tran <tcnghia@gmail.com>
-Nuutti Kotivuori <nuutti.kotivuori@poplatek.fi>
-Oilbeater <liumengxinfly@gmail.com>
-Olivier Gambier <olivier@docker.com>
-Olivier Jacques <olivier.jacques@hp.com>
-Omer Cohen <git@omer.io>
-Patrick Devine <patrick.devine@docker.com>
-Philip Misiowiec <philip@atlashealth.com>
-Richard Scothern <richard.scothern@docker.com>
-Rodolfo Carvalho <rhcarvalho@gmail.com>
-Rusty Conover <rusty@luckydinosaur.com>
-Sean Boran <Boran@users.noreply.github.com>
-Sebastiaan van Stijn <github@gone.nl>
-Sharif Nassar <sharif@mrwacky.com>
-Shawn Falkner-Horine <dreadpirateshawn@gmail.com>
-Shreyas Karnik <karnik.shreyas@gmail.com>
-Simon Thulbourn <simon+github@thulbourn.com>
-Spencer Rinehart <anubis@overthemonkey.com>
-Stefan Majewsky <stefan.majewsky@sap.com>
-Stefan Weil <sw@weilnetz.de>
-Stephen J Day <stephen.day@docker.com>
-Sungho Moon <sungho.moon@navercorp.com>
-Sven Dowideit <SvenDowideit@home.org.au>
-Sylvain Baubeau <sbaubeau@redhat.com>
-Ted Reed <ted.reed@gmail.com>
-tgic <farmer1992@gmail.com>
-Thomas Sjögren <konstruktoid@users.noreply.github.com>
-Tianon Gravi <admwiggin@gmail.com>
-Tibor Vass <teabee89@gmail.com>
-Tonis Tiigi <tonistiigi@gmail.com>
-Tony Holdstock-Brown <tony@docker.com>
-Trevor Pounds <trevor.pounds@gmail.com>
-Troels Thomsen <troels@thomsen.io>
-Vincent Batts <vbatts@redhat.com>
-Vincent Demeester <vincent@sbr.pm>
-Vincent Giersch <vincent.giersch@ovh.net>
-W. Trevor King <wking@tremily.us>
-weiyuan.yl <weiyuan.yl@alibaba-inc.com>
-xg.song <xg.song@venusource.com>
-xiekeyang <xiekeyang@huawei.com>
-Yann ROBERT <yann.robert@anantaplex.fr>
-yuzou <zouyu7@huawei.com>
-姜继忠 <jizhong.jiangjz@alibaba-inc.com>

+ 0 - 202
vendor/github.com/docker/distribution/LICENSE

@@ -1,202 +0,0 @@
-Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-

+ 0 - 139
vendor/github.com/docker/distribution/digest/digest.go

@@ -1,139 +0,0 @@
-package digest
-
-import (
-	"fmt"
-	"hash"
-	"io"
-	"regexp"
-	"strings"
-)
-
-const (
-	// DigestSha256EmptyTar is the canonical sha256 digest of empty data
-	DigestSha256EmptyTar = "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
-)
-
-// Digest allows simple protection of hex formatted digest strings, prefixed
-// by their algorithm. Strings of type Digest have some guarantee of being in
-// the correct format and it provides quick access to the components of a
-// digest string.
-//
-// The following is an example of the contents of Digest types:
-//
-// 	sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc
-//
-// This allows to abstract the digest behind this type and work only in those
-// terms.
-type Digest string
-
-// NewDigest returns a Digest from alg and a hash.Hash object.
-func NewDigest(alg Algorithm, h hash.Hash) Digest {
-	return NewDigestFromBytes(alg, h.Sum(nil))
-}
-
-// NewDigestFromBytes returns a new digest from the byte contents of p.
-// Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...)
-// functions. This is also useful for rebuilding digests from binary
-// serializations.
-func NewDigestFromBytes(alg Algorithm, p []byte) Digest {
-	return Digest(fmt.Sprintf("%s:%x", alg, p))
-}
-
-// NewDigestFromHex returns a Digest from alg and a the hex encoded digest.
-func NewDigestFromHex(alg, hex string) Digest {
-	return Digest(fmt.Sprintf("%s:%s", alg, hex))
-}
-
-// DigestRegexp matches valid digest types.
-var DigestRegexp = regexp.MustCompile(`[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+`)
-
-// DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match.
-var DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`)
-
-var (
-	// ErrDigestInvalidFormat returned when digest format invalid.
-	ErrDigestInvalidFormat = fmt.Errorf("invalid checksum digest format")
-
-	// ErrDigestInvalidLength returned when digest has invalid length.
-	ErrDigestInvalidLength = fmt.Errorf("invalid checksum digest length")
-
-	// ErrDigestUnsupported returned when the digest algorithm is unsupported.
-	ErrDigestUnsupported = fmt.Errorf("unsupported digest algorithm")
-)
-
-// ParseDigest parses s and returns the validated digest object. An error will
-// be returned if the format is invalid.
-func ParseDigest(s string) (Digest, error) {
-	d := Digest(s)
-
-	return d, d.Validate()
-}
-
-// FromReader returns the most valid digest for the underlying content using
-// the canonical digest algorithm.
-func FromReader(rd io.Reader) (Digest, error) {
-	return Canonical.FromReader(rd)
-}
-
-// FromBytes digests the input and returns a Digest.
-func FromBytes(p []byte) Digest {
-	return Canonical.FromBytes(p)
-}
-
-// Validate checks that the contents of d is a valid digest, returning an
-// error if not.
-func (d Digest) Validate() error {
-	s := string(d)
-
-	if !DigestRegexpAnchored.MatchString(s) {
-		return ErrDigestInvalidFormat
-	}
-
-	i := strings.Index(s, ":")
-	if i < 0 {
-		return ErrDigestInvalidFormat
-	}
-
-	// case: "sha256:" with no hex.
-	if i+1 == len(s) {
-		return ErrDigestInvalidFormat
-	}
-
-	switch algorithm := Algorithm(s[:i]); algorithm {
-	case SHA256, SHA384, SHA512:
-		if algorithm.Size()*2 != len(s[i+1:]) {
-			return ErrDigestInvalidLength
-		}
-		break
-	default:
-		return ErrDigestUnsupported
-	}
-
-	return nil
-}
-
-// Algorithm returns the algorithm portion of the digest. This will panic if
-// the underlying digest is not in a valid format.
-func (d Digest) Algorithm() Algorithm {
-	return Algorithm(d[:d.sepIndex()])
-}
-
-// Hex returns the hex digest portion of the digest. This will panic if the
-// underlying digest is not in a valid format.
-func (d Digest) Hex() string {
-	return string(d[d.sepIndex()+1:])
-}
-
-func (d Digest) String() string {
-	return string(d)
-}
-
-func (d Digest) sepIndex() int {
-	i := strings.Index(string(d), ":")
-
-	if i < 0 {
-		panic("could not find ':' in digest: " + d)
-	}
-
-	return i
-}

+ 0 - 155
vendor/github.com/docker/distribution/digest/digester.go

@@ -1,155 +0,0 @@
-package digest
-
-import (
-	"crypto"
-	"fmt"
-	"hash"
-	"io"
-)
-
-// Algorithm identifies and implementation of a digester by an identifier.
-// Note the that this defines both the hash algorithm used and the string
-// encoding.
-type Algorithm string
-
-// supported digest types
-const (
-	SHA256 Algorithm = "sha256" // sha256 with hex encoding
-	SHA384 Algorithm = "sha384" // sha384 with hex encoding
-	SHA512 Algorithm = "sha512" // sha512 with hex encoding
-
-	// Canonical is the primary digest algorithm used with the distribution
-	// project. Other digests may be used but this one is the primary storage
-	// digest.
-	Canonical = SHA256
-)
-
-var (
-	// TODO(stevvooe): Follow the pattern of the standard crypto package for
-	// registration of digests. Effectively, we are a registerable set and
-	// common symbol access.
-
-	// algorithms maps values to hash.Hash implementations. Other algorithms
-	// may be available but they cannot be calculated by the digest package.
-	algorithms = map[Algorithm]crypto.Hash{
-		SHA256: crypto.SHA256,
-		SHA384: crypto.SHA384,
-		SHA512: crypto.SHA512,
-	}
-)
-
-// Available returns true if the digest type is available for use. If this
-// returns false, New and Hash will return nil.
-func (a Algorithm) Available() bool {
-	h, ok := algorithms[a]
-	if !ok {
-		return false
-	}
-
-	// check availability of the hash, as well
-	return h.Available()
-}
-
-func (a Algorithm) String() string {
-	return string(a)
-}
-
-// Size returns number of bytes returned by the hash.
-func (a Algorithm) Size() int {
-	h, ok := algorithms[a]
-	if !ok {
-		return 0
-	}
-	return h.Size()
-}
-
-// Set implemented to allow use of Algorithm as a command line flag.
-func (a *Algorithm) Set(value string) error {
-	if value == "" {
-		*a = Canonical
-	} else {
-		// just do a type conversion, support is queried with Available.
-		*a = Algorithm(value)
-	}
-
-	return nil
-}
-
-// New returns a new digester for the specified algorithm. If the algorithm
-// does not have a digester implementation, nil will be returned. This can be
-// checked by calling Available before calling New.
-func (a Algorithm) New() Digester {
-	return &digester{
-		alg:  a,
-		hash: a.Hash(),
-	}
-}
-
-// Hash returns a new hash as used by the algorithm. If not available, the
-// method will panic. Check Algorithm.Available() before calling.
-func (a Algorithm) Hash() hash.Hash {
-	if !a.Available() {
-		// NOTE(stevvooe): A missing hash is usually a programming error that
-		// must be resolved at compile time. We don't import in the digest
-		// package to allow users to choose their hash implementation (such as
-		// when using stevvooe/resumable or a hardware accelerated package).
-		//
-		// Applications that may want to resolve the hash at runtime should
-		// call Algorithm.Available before call Algorithm.Hash().
-		panic(fmt.Sprintf("%v not available (make sure it is imported)", a))
-	}
-
-	return algorithms[a].New()
-}
-
-// FromReader returns the digest of the reader using the algorithm.
-func (a Algorithm) FromReader(rd io.Reader) (Digest, error) {
-	digester := a.New()
-
-	if _, err := io.Copy(digester.Hash(), rd); err != nil {
-		return "", err
-	}
-
-	return digester.Digest(), nil
-}
-
-// FromBytes digests the input and returns a Digest.
-func (a Algorithm) FromBytes(p []byte) Digest {
-	digester := a.New()
-
-	if _, err := digester.Hash().Write(p); err != nil {
-		// Writes to a Hash should never fail. None of the existing
-		// hash implementations in the stdlib or hashes vendored
-		// here can return errors from Write. Having a panic in this
-		// condition instead of having FromBytes return an error value
-		// avoids unnecessary error handling paths in all callers.
-		panic("write to hash function returned error: " + err.Error())
-	}
-
-	return digester.Digest()
-}
-
-// TODO(stevvooe): Allow resolution of verifiers using the digest type and
-// this registration system.
-
-// Digester calculates the digest of written data. Writes should go directly
-// to the return value of Hash, while calling Digest will return the current
-// value of the digest.
-type Digester interface {
-	Hash() hash.Hash // provides direct access to underlying hash instance.
-	Digest() Digest
-}
-
-// digester provides a simple digester definition that embeds a hasher.
-type digester struct {
-	alg  Algorithm
-	hash hash.Hash
-}
-
-func (d *digester) Hash() hash.Hash {
-	return d.hash
-}
-
-func (d *digester) Digest() Digest {
-	return NewDigest(d.alg, d.hash)
-}

+ 0 - 42
vendor/github.com/docker/distribution/digest/doc.go

@@ -1,42 +0,0 @@
-// Package digest provides a generalized type to opaquely represent message
-// digests and their operations within the registry. The Digest type is
-// designed to serve as a flexible identifier in a content-addressable system.
-// More importantly, it provides tools and wrappers to work with
-// hash.Hash-based digests with little effort.
-//
-// Basics
-//
-// The format of a digest is simply a string with two parts, dubbed the
-// "algorithm" and the "digest", separated by a colon:
-//
-// 	<algorithm>:<digest>
-//
-// An example of a sha256 digest representation follows:
-//
-// 	sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc
-//
-// In this case, the string "sha256" is the algorithm and the hex bytes are
-// the "digest".
-//
-// Because the Digest type is simply a string, once a valid Digest is
-// obtained, comparisons are cheap, quick and simple to express with the
-// standard equality operator.
-//
-// Verification
-//
-// The main benefit of using the Digest type is simple verification against a
-// given digest. The Verifier interface, modeled after the stdlib hash.Hash
-// interface, provides a common write sink for digest verification. After
-// writing is complete, calling the Verifier.Verified method will indicate
-// whether or not the stream of bytes matches the target digest.
-//
-// Missing Features
-//
-// In addition to the above, we intend to add the following features to this
-// package:
-//
-// 1. A Digester type that supports write sink digest calculation.
-//
-// 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry.
-//
-package digest

+ 0 - 245
vendor/github.com/docker/distribution/digest/set.go

@@ -1,245 +0,0 @@
-package digest
-
-import (
-	"errors"
-	"sort"
-	"strings"
-	"sync"
-)
-
-var (
-	// ErrDigestNotFound is used when a matching digest
-	// could not be found in a set.
-	ErrDigestNotFound = errors.New("digest not found")
-
-	// ErrDigestAmbiguous is used when multiple digests
-	// are found in a set. None of the matching digests
-	// should be considered valid matches.
-	ErrDigestAmbiguous = errors.New("ambiguous digest string")
-)
-
-// Set is used to hold a unique set of digests which
-// may be easily referenced by easily  referenced by a string
-// representation of the digest as well as short representation.
-// The uniqueness of the short representation is based on other
-// digests in the set. If digests are omitted from this set,
-// collisions in a larger set may not be detected, therefore it
-// is important to always do short representation lookups on
-// the complete set of digests. To mitigate collisions, an
-// appropriately long short code should be used.
-type Set struct {
-	mutex   sync.RWMutex
-	entries digestEntries
-}
-
-// NewSet creates an empty set of digests
-// which may have digests added.
-func NewSet() *Set {
-	return &Set{
-		entries: digestEntries{},
-	}
-}
-
-// checkShortMatch checks whether two digests match as either whole
-// values or short values. This function does not test equality,
-// rather whether the second value could match against the first
-// value.
-func checkShortMatch(alg Algorithm, hex, shortAlg, shortHex string) bool {
-	if len(hex) == len(shortHex) {
-		if hex != shortHex {
-			return false
-		}
-		if len(shortAlg) > 0 && string(alg) != shortAlg {
-			return false
-		}
-	} else if !strings.HasPrefix(hex, shortHex) {
-		return false
-	} else if len(shortAlg) > 0 && string(alg) != shortAlg {
-		return false
-	}
-	return true
-}
-
-// Lookup looks for a digest matching the given string representation.
-// If no digests could be found ErrDigestNotFound will be returned
-// with an empty digest value. If multiple matches are found
-// ErrDigestAmbiguous will be returned with an empty digest value.
-func (dst *Set) Lookup(d string) (Digest, error) {
-	dst.mutex.RLock()
-	defer dst.mutex.RUnlock()
-	if len(dst.entries) == 0 {
-		return "", ErrDigestNotFound
-	}
-	var (
-		searchFunc func(int) bool
-		alg        Algorithm
-		hex        string
-	)
-	dgst, err := ParseDigest(d)
-	if err == ErrDigestInvalidFormat {
-		hex = d
-		searchFunc = func(i int) bool {
-			return dst.entries[i].val >= d
-		}
-	} else {
-		hex = dgst.Hex()
-		alg = dgst.Algorithm()
-		searchFunc = func(i int) bool {
-			if dst.entries[i].val == hex {
-				return dst.entries[i].alg >= alg
-			}
-			return dst.entries[i].val >= hex
-		}
-	}
-	idx := sort.Search(len(dst.entries), searchFunc)
-	if idx == len(dst.entries) || !checkShortMatch(dst.entries[idx].alg, dst.entries[idx].val, string(alg), hex) {
-		return "", ErrDigestNotFound
-	}
-	if dst.entries[idx].alg == alg && dst.entries[idx].val == hex {
-		return dst.entries[idx].digest, nil
-	}
-	if idx+1 < len(dst.entries) && checkShortMatch(dst.entries[idx+1].alg, dst.entries[idx+1].val, string(alg), hex) {
-		return "", ErrDigestAmbiguous
-	}
-
-	return dst.entries[idx].digest, nil
-}
-
-// Add adds the given digest to the set. An error will be returned
-// if the given digest is invalid. If the digest already exists in the
-// set, this operation will be a no-op.
-func (dst *Set) Add(d Digest) error {
-	if err := d.Validate(); err != nil {
-		return err
-	}
-	dst.mutex.Lock()
-	defer dst.mutex.Unlock()
-	entry := &digestEntry{alg: d.Algorithm(), val: d.Hex(), digest: d}
-	searchFunc := func(i int) bool {
-		if dst.entries[i].val == entry.val {
-			return dst.entries[i].alg >= entry.alg
-		}
-		return dst.entries[i].val >= entry.val
-	}
-	idx := sort.Search(len(dst.entries), searchFunc)
-	if idx == len(dst.entries) {
-		dst.entries = append(dst.entries, entry)
-		return nil
-	} else if dst.entries[idx].digest == d {
-		return nil
-	}
-
-	entries := append(dst.entries, nil)
-	copy(entries[idx+1:], entries[idx:len(entries)-1])
-	entries[idx] = entry
-	dst.entries = entries
-	return nil
-}
-
-// Remove removes the given digest from the set. An err will be
-// returned if the given digest is invalid. If the digest does
-// not exist in the set, this operation will be a no-op.
-func (dst *Set) Remove(d Digest) error {
-	if err := d.Validate(); err != nil {
-		return err
-	}
-	dst.mutex.Lock()
-	defer dst.mutex.Unlock()
-	entry := &digestEntry{alg: d.Algorithm(), val: d.Hex(), digest: d}
-	searchFunc := func(i int) bool {
-		if dst.entries[i].val == entry.val {
-			return dst.entries[i].alg >= entry.alg
-		}
-		return dst.entries[i].val >= entry.val
-	}
-	idx := sort.Search(len(dst.entries), searchFunc)
-	// Not found if idx is after or value at idx is not digest
-	if idx == len(dst.entries) || dst.entries[idx].digest != d {
-		return nil
-	}
-
-	entries := dst.entries
-	copy(entries[idx:], entries[idx+1:])
-	entries = entries[:len(entries)-1]
-	dst.entries = entries
-
-	return nil
-}
-
-// All returns all the digests in the set
-func (dst *Set) All() []Digest {
-	dst.mutex.RLock()
-	defer dst.mutex.RUnlock()
-	retValues := make([]Digest, len(dst.entries))
-	for i := range dst.entries {
-		retValues[i] = dst.entries[i].digest
-	}
-
-	return retValues
-}
-
-// ShortCodeTable returns a map of Digest to unique short codes. The
-// length represents the minimum value, the maximum length may be the
-// entire value of digest if uniqueness cannot be achieved without the
-// full value. This function will attempt to make short codes as short
-// as possible to be unique.
-func ShortCodeTable(dst *Set, length int) map[Digest]string {
-	dst.mutex.RLock()
-	defer dst.mutex.RUnlock()
-	m := make(map[Digest]string, len(dst.entries))
-	l := length
-	resetIdx := 0
-	for i := 0; i < len(dst.entries); i++ {
-		var short string
-		extended := true
-		for extended {
-			extended = false
-			if len(dst.entries[i].val) <= l {
-				short = dst.entries[i].digest.String()
-			} else {
-				short = dst.entries[i].val[:l]
-				for j := i + 1; j < len(dst.entries); j++ {
-					if checkShortMatch(dst.entries[j].alg, dst.entries[j].val, "", short) {
-						if j > resetIdx {
-							resetIdx = j
-						}
-						extended = true
-					} else {
-						break
-					}
-				}
-				if extended {
-					l++
-				}
-			}
-		}
-		m[dst.entries[i].digest] = short
-		if i >= resetIdx {
-			l = length
-		}
-	}
-	return m
-}
-
-type digestEntry struct {
-	alg    Algorithm
-	val    string
-	digest Digest
-}
-
-type digestEntries []*digestEntry
-
-func (d digestEntries) Len() int {
-	return len(d)
-}
-
-func (d digestEntries) Less(i, j int) bool {
-	if d[i].val != d[j].val {
-		return d[i].val < d[j].val
-	}
-	return d[i].alg < d[j].alg
-}
-
-func (d digestEntries) Swap(i, j int) {
-	d[i], d[j] = d[j], d[i]
-}

+ 0 - 44
vendor/github.com/docker/distribution/digest/verifiers.go

@@ -1,44 +0,0 @@
-package digest
-
-import (
-	"hash"
-	"io"
-)
-
-// Verifier presents a general verification interface to be used with message
-// digests and other byte stream verifications. Users instantiate a Verifier
-// from one of the various methods, write the data under test to it then check
-// the result with the Verified method.
-type Verifier interface {
-	io.Writer
-
-	// Verified will return true if the content written to Verifier matches
-	// the digest.
-	Verified() bool
-}
-
-// NewDigestVerifier returns a verifier that compares the written bytes
-// against a passed in digest.
-func NewDigestVerifier(d Digest) (Verifier, error) {
-	if err := d.Validate(); err != nil {
-		return nil, err
-	}
-
-	return hashVerifier{
-		hash:   d.Algorithm().Hash(),
-		digest: d,
-	}, nil
-}
-
-type hashVerifier struct {
-	digest Digest
-	hash   hash.Hash
-}
-
-func (hv hashVerifier) Write(p []byte) (n int, err error) {
-	return hv.hash.Write(p)
-}
-
-func (hv hashVerifier) Verified() bool {
-	return hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash)
-}

+ 0 - 334
vendor/github.com/docker/distribution/reference/reference.go

@@ -1,334 +0,0 @@
-// Package reference provides a general type to represent any way of referencing images within the registry.
-// Its main purpose is to abstract tags and digests (content-addressable hash).
-//
-// Grammar
-//
-// 	reference                       := name [ ":" tag ] [ "@" digest ]
-//	name                            := [hostname '/'] component ['/' component]*
-//	hostname                        := hostcomponent ['.' hostcomponent]* [':' port-number]
-//	hostcomponent                   := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/
-//	port-number                     := /[0-9]+/
-//	component                       := alpha-numeric [separator alpha-numeric]*
-// 	alpha-numeric                   := /[a-z0-9]+/
-//	separator                       := /[_.]|__|[-]*/
-//
-//	tag                             := /[\w][\w.-]{0,127}/
-//
-//	digest                          := digest-algorithm ":" digest-hex
-//	digest-algorithm                := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]
-//	digest-algorithm-separator      := /[+.-_]/
-//	digest-algorithm-component      := /[A-Za-z][A-Za-z0-9]*/
-//	digest-hex                      := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value
-package reference
-
-import (
-	"errors"
-	"fmt"
-
-	"github.com/docker/distribution/digest"
-)
-
-const (
-	// NameTotalLengthMax is the maximum total number of characters in a repository name.
-	NameTotalLengthMax = 255
-)
-
-var (
-	// ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference.
-	ErrReferenceInvalidFormat = errors.New("invalid reference format")
-
-	// ErrTagInvalidFormat represents an error while trying to parse a string as a tag.
-	ErrTagInvalidFormat = errors.New("invalid tag format")
-
-	// ErrDigestInvalidFormat represents an error while trying to parse a string as a tag.
-	ErrDigestInvalidFormat = errors.New("invalid digest format")
-
-	// ErrNameEmpty is returned for empty, invalid repository names.
-	ErrNameEmpty = errors.New("repository name must have at least one component")
-
-	// ErrNameTooLong is returned when a repository name is longer than NameTotalLengthMax.
-	ErrNameTooLong = fmt.Errorf("repository name must not be more than %v characters", NameTotalLengthMax)
-)
-
-// Reference is an opaque object reference identifier that may include
-// modifiers such as a hostname, name, tag, and digest.
-type Reference interface {
-	// String returns the full reference
-	String() string
-}
-
-// Field provides a wrapper type for resolving correct reference types when
-// working with encoding.
-type Field struct {
-	reference Reference
-}
-
-// AsField wraps a reference in a Field for encoding.
-func AsField(reference Reference) Field {
-	return Field{reference}
-}
-
-// Reference unwraps the reference type from the field to
-// return the Reference object. This object should be
-// of the appropriate type to further check for different
-// reference types.
-func (f Field) Reference() Reference {
-	return f.reference
-}
-
-// MarshalText serializes the field to byte text which
-// is the string of the reference.
-func (f Field) MarshalText() (p []byte, err error) {
-	return []byte(f.reference.String()), nil
-}
-
-// UnmarshalText parses text bytes by invoking the
-// reference parser to ensure the appropriately
-// typed reference object is wrapped by field.
-func (f *Field) UnmarshalText(p []byte) error {
-	r, err := Parse(string(p))
-	if err != nil {
-		return err
-	}
-
-	f.reference = r
-	return nil
-}
-
-// Named is an object with a full name
-type Named interface {
-	Reference
-	Name() string
-}
-
-// Tagged is an object which has a tag
-type Tagged interface {
-	Reference
-	Tag() string
-}
-
-// NamedTagged is an object including a name and tag.
-type NamedTagged interface {
-	Named
-	Tag() string
-}
-
-// Digested is an object which has a digest
-// in which it can be referenced by
-type Digested interface {
-	Reference
-	Digest() digest.Digest
-}
-
-// Canonical reference is an object with a fully unique
-// name including a name with hostname and digest
-type Canonical interface {
-	Named
-	Digest() digest.Digest
-}
-
-// SplitHostname splits a named reference into a
-// hostname and name string. If no valid hostname is
-// found, the hostname is empty and the full value
-// is returned as name
-func SplitHostname(named Named) (string, string) {
-	name := named.Name()
-	match := anchoredNameRegexp.FindStringSubmatch(name)
-	if match == nil || len(match) != 3 {
-		return "", name
-	}
-	return match[1], match[2]
-}
-
-// Parse parses s and returns a syntactically valid Reference.
-// If an error was encountered it is returned, along with a nil Reference.
-// NOTE: Parse will not handle short digests.
-func Parse(s string) (Reference, error) {
-	matches := ReferenceRegexp.FindStringSubmatch(s)
-	if matches == nil {
-		if s == "" {
-			return nil, ErrNameEmpty
-		}
-		// TODO(dmcgowan): Provide more specific and helpful error
-		return nil, ErrReferenceInvalidFormat
-	}
-
-	if len(matches[1]) > NameTotalLengthMax {
-		return nil, ErrNameTooLong
-	}
-
-	ref := reference{
-		name: matches[1],
-		tag:  matches[2],
-	}
-	if matches[3] != "" {
-		var err error
-		ref.digest, err = digest.ParseDigest(matches[3])
-		if err != nil {
-			return nil, err
-		}
-	}
-
-	r := getBestReferenceType(ref)
-	if r == nil {
-		return nil, ErrNameEmpty
-	}
-
-	return r, nil
-}
-
-// ParseNamed parses s and returns a syntactically valid reference implementing
-// the Named interface. The reference must have a name, otherwise an error is
-// returned.
-// If an error was encountered it is returned, along with a nil Reference.
-// NOTE: ParseNamed will not handle short digests.
-func ParseNamed(s string) (Named, error) {
-	ref, err := Parse(s)
-	if err != nil {
-		return nil, err
-	}
-	named, isNamed := ref.(Named)
-	if !isNamed {
-		return nil, fmt.Errorf("reference %s has no name", ref.String())
-	}
-	return named, nil
-}
-
-// WithName returns a named object representing the given string. If the input
-// is invalid ErrReferenceInvalidFormat will be returned.
-func WithName(name string) (Named, error) {
-	if len(name) > NameTotalLengthMax {
-		return nil, ErrNameTooLong
-	}
-	if !anchoredNameRegexp.MatchString(name) {
-		return nil, ErrReferenceInvalidFormat
-	}
-	return repository(name), nil
-}
-
-// WithTag combines the name from "name" and the tag from "tag" to form a
-// reference incorporating both the name and the tag.
-func WithTag(name Named, tag string) (NamedTagged, error) {
-	if !anchoredTagRegexp.MatchString(tag) {
-		return nil, ErrTagInvalidFormat
-	}
-	return taggedReference{
-		name: name.Name(),
-		tag:  tag,
-	}, nil
-}
-
-// WithDigest combines the name from "name" and the digest from "digest" to form
-// a reference incorporating both the name and the digest.
-func WithDigest(name Named, digest digest.Digest) (Canonical, error) {
-	if !anchoredDigestRegexp.MatchString(digest.String()) {
-		return nil, ErrDigestInvalidFormat
-	}
-	return canonicalReference{
-		name:   name.Name(),
-		digest: digest,
-	}, nil
-}
-
-func getBestReferenceType(ref reference) Reference {
-	if ref.name == "" {
-		// Allow digest only references
-		if ref.digest != "" {
-			return digestReference(ref.digest)
-		}
-		return nil
-	}
-	if ref.tag == "" {
-		if ref.digest != "" {
-			return canonicalReference{
-				name:   ref.name,
-				digest: ref.digest,
-			}
-		}
-		return repository(ref.name)
-	}
-	if ref.digest == "" {
-		return taggedReference{
-			name: ref.name,
-			tag:  ref.tag,
-		}
-	}
-
-	return ref
-}
-
-type reference struct {
-	name   string
-	tag    string
-	digest digest.Digest
-}
-
-func (r reference) String() string {
-	return r.name + ":" + r.tag + "@" + r.digest.String()
-}
-
-func (r reference) Name() string {
-	return r.name
-}
-
-func (r reference) Tag() string {
-	return r.tag
-}
-
-func (r reference) Digest() digest.Digest {
-	return r.digest
-}
-
-type repository string
-
-func (r repository) String() string {
-	return string(r)
-}
-
-func (r repository) Name() string {
-	return string(r)
-}
-
-type digestReference digest.Digest
-
-func (d digestReference) String() string {
-	return d.String()
-}
-
-func (d digestReference) Digest() digest.Digest {
-	return digest.Digest(d)
-}
-
-type taggedReference struct {
-	name string
-	tag  string
-}
-
-func (t taggedReference) String() string {
-	return t.name + ":" + t.tag
-}
-
-func (t taggedReference) Name() string {
-	return t.name
-}
-
-func (t taggedReference) Tag() string {
-	return t.tag
-}
-
-type canonicalReference struct {
-	name   string
-	digest digest.Digest
-}
-
-func (c canonicalReference) String() string {
-	return c.name + "@" + c.digest.String()
-}
-
-func (c canonicalReference) Name() string {
-	return c.name
-}
-
-func (c canonicalReference) Digest() digest.Digest {
-	return c.digest
-}

+ 0 - 124
vendor/github.com/docker/distribution/reference/regexp.go

@@ -1,124 +0,0 @@
-package reference
-
-import "regexp"
-
-var (
-	// alphaNumericRegexp defines the alpha numeric atom, typically a
-	// component of names. This only allows lower case characters and digits.
-	alphaNumericRegexp = match(`[a-z0-9]+`)
-
-	// separatorRegexp defines the separators allowed to be embedded in name
-	// components. This allow one period, one or two underscore and multiple
-	// dashes.
-	separatorRegexp = match(`(?:[._]|__|[-]*)`)
-
-	// nameComponentRegexp restricts registry path component names to start
-	// with at least one letter or number, with following parts able to be
-	// separated by one period, one or two underscore and multiple dashes.
-	nameComponentRegexp = expression(
-		alphaNumericRegexp,
-		optional(repeated(separatorRegexp, alphaNumericRegexp)))
-
-	// hostnameComponentRegexp restricts the registry hostname component of a
-	// repository name to start with a component as defined by hostnameRegexp
-	// and followed by an optional port.
-	hostnameComponentRegexp = match(`(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`)
-
-	// hostnameRegexp defines the structure of potential hostname components
-	// that may be part of image names. This is purposely a subset of what is
-	// allowed by DNS to ensure backwards compatibility with Docker image
-	// names.
-	hostnameRegexp = expression(
-		hostnameComponentRegexp,
-		optional(repeated(literal(`.`), hostnameComponentRegexp)),
-		optional(literal(`:`), match(`[0-9]+`)))
-
-	// TagRegexp matches valid tag names. From docker/docker:graph/tags.go.
-	TagRegexp = match(`[\w][\w.-]{0,127}`)
-
-	// anchoredTagRegexp matches valid tag names, anchored at the start and
-	// end of the matched string.
-	anchoredTagRegexp = anchored(TagRegexp)
-
-	// DigestRegexp matches valid digests.
-	DigestRegexp = match(`[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`)
-
-	// anchoredDigestRegexp matches valid digests, anchored at the start and
-	// end of the matched string.
-	anchoredDigestRegexp = anchored(DigestRegexp)
-
-	// NameRegexp is the format for the name component of references. The
-	// regexp has capturing groups for the hostname and name part omitting
-	// the separating forward slash from either.
-	NameRegexp = expression(
-		optional(hostnameRegexp, literal(`/`)),
-		nameComponentRegexp,
-		optional(repeated(literal(`/`), nameComponentRegexp)))
-
-	// anchoredNameRegexp is used to parse a name value, capturing the
-	// hostname and trailing components.
-	anchoredNameRegexp = anchored(
-		optional(capture(hostnameRegexp), literal(`/`)),
-		capture(nameComponentRegexp,
-			optional(repeated(literal(`/`), nameComponentRegexp))))
-
-	// ReferenceRegexp is the full supported format of a reference. The regexp
-	// is anchored and has capturing groups for name, tag, and digest
-	// components.
-	ReferenceRegexp = anchored(capture(NameRegexp),
-		optional(literal(":"), capture(TagRegexp)),
-		optional(literal("@"), capture(DigestRegexp)))
-)
-
-// match compiles the string to a regular expression.
-var match = regexp.MustCompile
-
-// literal compiles s into a literal regular expression, escaping any regexp
-// reserved characters.
-func literal(s string) *regexp.Regexp {
-	re := match(regexp.QuoteMeta(s))
-
-	if _, complete := re.LiteralPrefix(); !complete {
-		panic("must be a literal")
-	}
-
-	return re
-}
-
-// expression defines a full expression, where each regular expression must
-// follow the previous.
-func expression(res ...*regexp.Regexp) *regexp.Regexp {
-	var s string
-	for _, re := range res {
-		s += re.String()
-	}
-
-	return match(s)
-}
-
-// optional wraps the expression in a non-capturing group and makes the
-// production optional.
-func optional(res ...*regexp.Regexp) *regexp.Regexp {
-	return match(group(expression(res...)).String() + `?`)
-}
-
-// repeated wraps the regexp in a non-capturing group to get one or more
-// matches.
-func repeated(res ...*regexp.Regexp) *regexp.Regexp {
-	return match(group(expression(res...)).String() + `+`)
-}
-
-// group wraps the regexp in a non-capturing group.
-func group(res ...*regexp.Regexp) *regexp.Regexp {
-	return match(`(?:` + expression(res...).String() + `)`)
-}
-
-// capture wraps the expression in a capturing group.
-func capture(res ...*regexp.Regexp) *regexp.Regexp {
-	return match(`(` + expression(res...).String() + `)`)
-}
-
-// anchored anchors the regular expression by adding start and end delimiters.
-func anchored(res ...*regexp.Regexp) *regexp.Regexp {
-	return match(`^` + expression(res...).String() + `$`)
-}

+ 0 - 70
vendor/github.com/emicklei/go-restful/.gitignore

@@ -1,70 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-
-restful.html
-
-*.out
-
-tmp.prof
-
-go-restful.test
-
-examples/restful-basic-authentication
-
-examples/restful-encoding-filter
-
-examples/restful-filters
-
-examples/restful-hello-world
-
-examples/restful-resource-functions
-
-examples/restful-serve-static
-
-examples/restful-user-service
-
-*.DS_Store
-examples/restful-user-resource
-
-examples/restful-multi-containers
-
-examples/restful-form-handling
-
-examples/restful-CORS-filter
-
-examples/restful-options-filter
-
-examples/restful-curly-router
-
-examples/restful-cpuprofiler-service
-
-examples/restful-pre-post-filters
-
-curly.prof
-
-examples/restful-NCSA-logging
-
-examples/restful-html-template
-
-s.html
-restful-path-tail

+ 0 - 171
vendor/github.com/emicklei/go-restful/CHANGES.md

@@ -1,171 +0,0 @@
-Change history of go-restful
-=
-2016-11-26
-- Default change! now use CurlyRouter (was RouterJSR311)
-- Default change! no more caching of request content
-- Default change! do not recover from panics
-
-2016-09-22
-- fix the DefaultRequestContentType feature
-
-2016-02-14
-- take the qualify factor of the Accept header mediatype into account when deciding the contentype of the response
-- add constructors for custom entity accessors for xml and json 
-
-2015-09-27
-- rename new WriteStatusAnd... to WriteHeaderAnd... for consistency
-
-2015-09-25
-- fixed problem with changing Header after WriteHeader (issue 235)
-
-2015-09-14
-- changed behavior of WriteHeader (immediate write) and WriteEntity (no status write)
-- added support for custom EntityReaderWriters.
-
-2015-08-06
-- add support for reading entities from compressed request content
-- use sync.Pool for compressors of http response and request body
-- add Description to Parameter for documentation in Swagger UI
-
-2015-03-20
-- add configurable logging
-
-2015-03-18
-- if not specified, the Operation is derived from the Route function
-
-2015-03-17
-- expose Parameter creation functions
-- make trace logger an interface
-- fix OPTIONSFilter
-- customize rendering of ServiceError
-- JSR311 router now handles wildcards
-- add Notes to Route
-
-2014-11-27
-- (api add) PrettyPrint per response. (as proposed in #167)
-
-2014-11-12
-- (api add) ApiVersion(.) for documentation in Swagger UI
-
-2014-11-10
-- (api change) struct fields tagged with "description" show up in Swagger UI
-
-2014-10-31
-- (api change) ReturnsError -> Returns
-- (api add)    RouteBuilder.Do(aBuilder) for DRY use of RouteBuilder
-- fix swagger nested structs
-- sort Swagger response messages by code
-
-2014-10-23
-- (api add) ReturnsError allows you to document Http codes in swagger
-- fixed problem with greedy CurlyRouter
-- (api add) Access-Control-Max-Age in CORS
-- add tracing functionality (injectable) for debugging purposes
-- support JSON parse 64bit int 
-- fix empty parameters for swagger
-- WebServicesUrl is now optional for swagger
-- fixed duplicate AccessControlAllowOrigin in CORS
-- (api change) expose ServeMux in container
-- (api add) added AllowedDomains in CORS
-- (api add) ParameterNamed for detailed documentation
-
-2014-04-16
-- (api add) expose constructor of Request for testing.
-
-2014-06-27
-- (api add) ParameterNamed gives access to a Parameter definition and its data (for further specification).
-- (api add) SetCacheReadEntity allow scontrol over whether or not the request body is being cached (default true for compatibility reasons).
-
-2014-07-03
-- (api add) CORS can be configured with a list of allowed domains
-
-2014-03-12
-- (api add) Route path parameters can use wildcard or regular expressions. (requires CurlyRouter)
-
-2014-02-26
-- (api add) Request now provides information about the matched Route, see method SelectedRoutePath 
-
-2014-02-17
-- (api change) renamed parameter constants (go-lint checks)
-
-2014-01-10
- - (api add) support for CloseNotify, see http://golang.org/pkg/net/http/#CloseNotifier
-
-2014-01-07
- - (api change) Write* methods in Response now return the error or nil.
- - added example of serving HTML from a Go template.
- - fixed comparing Allowed headers in CORS (is now case-insensitive)
-
-2013-11-13
- - (api add) Response knows how many bytes are written to the response body.
-
-2013-10-29
- - (api add) RecoverHandler(handler RecoverHandleFunction) to change how panic recovery is handled. Default behavior is to log and return a stacktrace. This may be a security issue as it exposes sourcecode information.
-
-2013-10-04
- - (api add) Response knows what HTTP status has been written
- - (api add) Request can have attributes (map of string->interface, also called request-scoped variables
-
-2013-09-12
- - (api change) Router interface simplified
- - Implemented CurlyRouter, a Router that does not use|allow regular expressions in paths
-
-2013-08-05
- - add OPTIONS support
- - add CORS support
-
-2013-08-27
- - fixed some reported issues (see github)
- - (api change) deprecated use of WriteError; use WriteErrorString instead
-
-2014-04-15
- - (fix) v1.0.1 tag: fix Issue 111: WriteErrorString
-
-2013-08-08
- - (api add) Added implementation Container: a WebServices collection with its own http.ServeMux allowing multiple endpoints per program. Existing uses of go-restful will register their services to the DefaultContainer.
- - (api add) the swagger package has be extended to have a UI per container.
- - if panic is detected then a small stack trace is printed (thanks to runner-mei)
- - (api add) WriteErrorString to Response
-
-Important API changes:
-
- - (api remove) package variable DoNotRecover no longer works ; use restful.DefaultContainer.DoNotRecover(true) instead.
- - (api remove) package variable EnableContentEncoding no longer works ; use restful.DefaultContainer.EnableContentEncoding(true) instead.
- 
- 
-2013-07-06
-
- - (api add) Added support for response encoding (gzip and deflate(zlib)). This feature is disabled on default (for backwards compatibility). Use restful.EnableContentEncoding = true in your initialization to enable this feature.
-
-2013-06-19
-
- - (improve) DoNotRecover option, moved request body closer, improved ReadEntity
-
-2013-06-03
-
- - (api change) removed Dispatcher interface, hide PathExpression
- - changed receiver names of type functions to be more idiomatic Go
-
-2013-06-02
-
- - (optimize) Cache the RegExp compilation of Paths.
-
-2013-05-22
-	
- - (api add) Added support for request/response filter functions
-
-2013-05-18
-
-
- - (api add) Added feature to change the default Http Request Dispatch function (travis cline)
- - (api change) Moved Swagger Webservice to swagger package (see example restful-user)
-
-[2012-11-14 .. 2013-05-18>
- 
- - See https://github.com/emicklei/go-restful/commits
-
-2012-11-14
-
- - Initial commit
-
-

+ 0 - 22
vendor/github.com/emicklei/go-restful/LICENSE

@@ -1,22 +0,0 @@
-Copyright (c) 2012,2013 Ernest Micklei
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 74
vendor/github.com/emicklei/go-restful/README.md

@@ -1,74 +0,0 @@
-go-restful
-==========
-
-package for building REST-style Web Services using Google Go
-
-REST asks developers to use HTTP methods explicitly and in a way that's consistent with the protocol definition. This basic REST design principle establishes a one-to-one mapping between create, read, update, and delete (CRUD) operations and HTTP methods. According to this mapping:
-
-- GET = Retrieve a representation of a resource
-- POST = Create if you are sending content to the server to create a subordinate of the specified resource collection, using some server-side algorithm.
-- PUT = Create if you are sending the full content of the specified resource (URI).
-- PUT = Update if you are updating the full content of the specified resource.
-- DELETE = Delete if you are requesting the server to delete the resource
-- PATCH = Update partial content of a resource
-- OPTIONS = Get information about the communication options for the request URI
-    
-### Example
-
-```Go
-ws := new(restful.WebService)
-ws.
-	Path("/users").
-	Consumes(restful.MIME_XML, restful.MIME_JSON).
-	Produces(restful.MIME_JSON, restful.MIME_XML)
-
-ws.Route(ws.GET("/{user-id}").To(u.findUser).
-	Doc("get a user").
-	Param(ws.PathParameter("user-id", "identifier of the user").DataType("string")).
-	Writes(User{}))		
-...
-	
-func (u UserResource) findUser(request *restful.Request, response *restful.Response) {
-	id := request.PathParameter("user-id")
-	...
-}
-```
-	
-[Full API of a UserResource](https://github.com/emicklei/go-restful/tree/master/examples/restful-user-resource.go) 
-		
-### Features
-
-- Routes for request &#8594; function mapping with path parameter (e.g. {id}) support
-- Configurable router:
-	- Routing algorithm after [JSR311](http://jsr311.java.net/nonav/releases/1.1/spec/spec.html) that is implemented using (but does **not** accept) regular expressions (See RouterJSR311 which is used by default)
-	- Fast routing algorithm that allows static elements, regular expressions and dynamic parameters in the URL path (e.g. /meetings/{id} or /static/{subpath:*}, See CurlyRouter)
-- Request API for reading structs from JSON/XML and accesing parameters (path,query,header)
-- Response API for writing structs to JSON/XML and setting headers
-- Filters for intercepting the request &#8594; response flow on Service or Route level
-- Request-scoped variables using attributes
-- Containers for WebServices on different HTTP endpoints
-- Content encoding (gzip,deflate) of request and response payloads
-- Automatic responses on OPTIONS (using a filter)
-- Automatic CORS request handling (using a filter)
-- API declaration for Swagger UI (see swagger package)
-- Panic recovery to produce HTTP 500, customizable using RecoverHandler(...)
-- Route errors produce HTTP 404/405/406/415 errors, customizable using ServiceErrorHandler(...)
-- Configurable (trace) logging
-- Customizable encoding using EntityReaderWriter registration
-- Customizable gzip/deflate readers and writers using CompressorProvider registration
-	
-### Resources
-
-- [Documentation on godoc.org](http://godoc.org/github.com/emicklei/go-restful)
-- [Code examples](https://github.com/emicklei/go-restful/tree/master/examples)
-- [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/)
-- [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/)
-- [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful)
-- [gopkg.in](https://gopkg.in/emicklei/go-restful.v1)
-- [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora)
-
-[![Build Status](https://drone.io/github.com/emicklei/go-restful/status.png)](https://drone.io/github.com/emicklei/go-restful/latest)
-
-(c) 2012 - 2015, http://ernestmicklei.com. MIT License
-
-Type ```git shortlog -s``` for a full list of contributors.

+ 0 - 1
vendor/github.com/emicklei/go-restful/Srcfile

@@ -1 +0,0 @@
-{"SkipDirs": ["examples"]}

+ 0 - 10
vendor/github.com/emicklei/go-restful/bench_test.sh

@@ -1,10 +0,0 @@
-#go test -run=none -file bench_test.go -test.bench . -cpuprofile=bench_test.out
-
-go test -c
-./go-restful.test -test.run=none -test.cpuprofile=tmp.prof -test.bench=BenchmarkMany
-./go-restful.test -test.run=none -test.cpuprofile=curly.prof -test.bench=BenchmarkManyCurly
-
-#go tool pprof go-restful.test tmp.prof
-go tool pprof go-restful.test curly.prof
-
-

+ 0 - 123
vendor/github.com/emicklei/go-restful/compress.go

@@ -1,123 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bufio"
-	"compress/gzip"
-	"compress/zlib"
-	"errors"
-	"io"
-	"net"
-	"net/http"
-	"strings"
-)
-
-// OBSOLETE : use restful.DefaultContainer.EnableContentEncoding(true) to change this setting.
-var EnableContentEncoding = false
-
-// CompressingResponseWriter is a http.ResponseWriter that can perform content encoding (gzip and zlib)
-type CompressingResponseWriter struct {
-	writer     http.ResponseWriter
-	compressor io.WriteCloser
-	encoding   string
-}
-
-// Header is part of http.ResponseWriter interface
-func (c *CompressingResponseWriter) Header() http.Header {
-	return c.writer.Header()
-}
-
-// WriteHeader is part of http.ResponseWriter interface
-func (c *CompressingResponseWriter) WriteHeader(status int) {
-	c.writer.WriteHeader(status)
-}
-
-// Write is part of http.ResponseWriter interface
-// It is passed through the compressor
-func (c *CompressingResponseWriter) Write(bytes []byte) (int, error) {
-	if c.isCompressorClosed() {
-		return -1, errors.New("Compressing error: tried to write data using closed compressor")
-	}
-	return c.compressor.Write(bytes)
-}
-
-// CloseNotify is part of http.CloseNotifier interface
-func (c *CompressingResponseWriter) CloseNotify() <-chan bool {
-	return c.writer.(http.CloseNotifier).CloseNotify()
-}
-
-// Close the underlying compressor
-func (c *CompressingResponseWriter) Close() error {
-	if c.isCompressorClosed() {
-		return errors.New("Compressing error: tried to close already closed compressor")
-	}
-
-	c.compressor.Close()
-	if ENCODING_GZIP == c.encoding {
-		currentCompressorProvider.ReleaseGzipWriter(c.compressor.(*gzip.Writer))
-	}
-	if ENCODING_DEFLATE == c.encoding {
-		currentCompressorProvider.ReleaseZlibWriter(c.compressor.(*zlib.Writer))
-	}
-	// gc hint needed?
-	c.compressor = nil
-	return nil
-}
-
-func (c *CompressingResponseWriter) isCompressorClosed() bool {
-	return nil == c.compressor
-}
-
-// Hijack implements the Hijacker interface
-// This is especially useful when combining Container.EnabledContentEncoding
-// in combination with websockets (for instance gorilla/websocket)
-func (c *CompressingResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
-	hijacker, ok := c.writer.(http.Hijacker)
-	if !ok {
-		return nil, nil, errors.New("ResponseWriter doesn't support Hijacker interface")
-	}
-	return hijacker.Hijack()
-}
-
-// WantsCompressedResponse reads the Accept-Encoding header to see if and which encoding is requested.
-func wantsCompressedResponse(httpRequest *http.Request) (bool, string) {
-	header := httpRequest.Header.Get(HEADER_AcceptEncoding)
-	gi := strings.Index(header, ENCODING_GZIP)
-	zi := strings.Index(header, ENCODING_DEFLATE)
-	// use in order of appearance
-	if gi == -1 {
-		return zi != -1, ENCODING_DEFLATE
-	} else if zi == -1 {
-		return gi != -1, ENCODING_GZIP
-	} else {
-		if gi < zi {
-			return true, ENCODING_GZIP
-		}
-		return true, ENCODING_DEFLATE
-	}
-}
-
-// NewCompressingResponseWriter create a CompressingResponseWriter for a known encoding = {gzip,deflate}
-func NewCompressingResponseWriter(httpWriter http.ResponseWriter, encoding string) (*CompressingResponseWriter, error) {
-	httpWriter.Header().Set(HEADER_ContentEncoding, encoding)
-	c := new(CompressingResponseWriter)
-	c.writer = httpWriter
-	var err error
-	if ENCODING_GZIP == encoding {
-		w := currentCompressorProvider.AcquireGzipWriter()
-		w.Reset(httpWriter)
-		c.compressor = w
-		c.encoding = ENCODING_GZIP
-	} else if ENCODING_DEFLATE == encoding {
-		w := currentCompressorProvider.AcquireZlibWriter()
-		w.Reset(httpWriter)
-		c.compressor = w
-		c.encoding = ENCODING_DEFLATE
-	} else {
-		return nil, errors.New("Unknown encoding:" + encoding)
-	}
-	return c, err
-}

+ 0 - 103
vendor/github.com/emicklei/go-restful/compressor_cache.go

@@ -1,103 +0,0 @@
-package restful
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"compress/gzip"
-	"compress/zlib"
-)
-
-// BoundedCachedCompressors is a CompressorProvider that uses a cache with a fixed amount
-// of writers and readers (resources).
-// If a new resource is acquired and all are in use, it will return a new unmanaged resource.
-type BoundedCachedCompressors struct {
-	gzipWriters     chan *gzip.Writer
-	gzipReaders     chan *gzip.Reader
-	zlibWriters     chan *zlib.Writer
-	writersCapacity int
-	readersCapacity int
-}
-
-// NewBoundedCachedCompressors returns a new, with filled cache,  BoundedCachedCompressors.
-func NewBoundedCachedCompressors(writersCapacity, readersCapacity int) *BoundedCachedCompressors {
-	b := &BoundedCachedCompressors{
-		gzipWriters:     make(chan *gzip.Writer, writersCapacity),
-		gzipReaders:     make(chan *gzip.Reader, readersCapacity),
-		zlibWriters:     make(chan *zlib.Writer, writersCapacity),
-		writersCapacity: writersCapacity,
-		readersCapacity: readersCapacity,
-	}
-	for ix := 0; ix < writersCapacity; ix++ {
-		b.gzipWriters <- newGzipWriter()
-		b.zlibWriters <- newZlibWriter()
-	}
-	for ix := 0; ix < readersCapacity; ix++ {
-		b.gzipReaders <- newGzipReader()
-	}
-	return b
-}
-
-// AcquireGzipWriter returns an resettable *gzip.Writer. Needs to be released.
-func (b *BoundedCachedCompressors) AcquireGzipWriter() *gzip.Writer {
-	var writer *gzip.Writer
-	select {
-	case writer, _ = <-b.gzipWriters:
-	default:
-		// return a new unmanaged one
-		writer = newGzipWriter()
-	}
-	return writer
-}
-
-// ReleaseGzipWriter accepts a writer (does not have to be one that was cached)
-// only when the cache has room for it. It will ignore it otherwise.
-func (b *BoundedCachedCompressors) ReleaseGzipWriter(w *gzip.Writer) {
-	// forget the unmanaged ones
-	if len(b.gzipWriters) < b.writersCapacity {
-		b.gzipWriters <- w
-	}
-}
-
-// AcquireGzipReader returns a *gzip.Reader. Needs to be released.
-func (b *BoundedCachedCompressors) AcquireGzipReader() *gzip.Reader {
-	var reader *gzip.Reader
-	select {
-	case reader, _ = <-b.gzipReaders:
-	default:
-		// return a new unmanaged one
-		reader = newGzipReader()
-	}
-	return reader
-}
-
-// ReleaseGzipReader accepts a reader (does not have to be one that was cached)
-// only when the cache has room for it. It will ignore it otherwise.
-func (b *BoundedCachedCompressors) ReleaseGzipReader(r *gzip.Reader) {
-	// forget the unmanaged ones
-	if len(b.gzipReaders) < b.readersCapacity {
-		b.gzipReaders <- r
-	}
-}
-
-// AcquireZlibWriter returns an resettable *zlib.Writer. Needs to be released.
-func (b *BoundedCachedCompressors) AcquireZlibWriter() *zlib.Writer {
-	var writer *zlib.Writer
-	select {
-	case writer, _ = <-b.zlibWriters:
-	default:
-		// return a new unmanaged one
-		writer = newZlibWriter()
-	}
-	return writer
-}
-
-// ReleaseZlibWriter accepts a writer (does not have to be one that was cached)
-// only when the cache has room for it. It will ignore it otherwise.
-func (b *BoundedCachedCompressors) ReleaseZlibWriter(w *zlib.Writer) {
-	// forget the unmanaged ones
-	if len(b.zlibWriters) < b.writersCapacity {
-		b.zlibWriters <- w
-	}
-}

+ 0 - 91
vendor/github.com/emicklei/go-restful/compressor_pools.go

@@ -1,91 +0,0 @@
-package restful
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"compress/gzip"
-	"compress/zlib"
-	"sync"
-)
-
-// SyncPoolCompessors is a CompressorProvider that use the standard sync.Pool.
-type SyncPoolCompessors struct {
-	GzipWriterPool *sync.Pool
-	GzipReaderPool *sync.Pool
-	ZlibWriterPool *sync.Pool
-}
-
-// NewSyncPoolCompessors returns a new ("empty") SyncPoolCompessors.
-func NewSyncPoolCompessors() *SyncPoolCompessors {
-	return &SyncPoolCompessors{
-		GzipWriterPool: &sync.Pool{
-			New: func() interface{} { return newGzipWriter() },
-		},
-		GzipReaderPool: &sync.Pool{
-			New: func() interface{} { return newGzipReader() },
-		},
-		ZlibWriterPool: &sync.Pool{
-			New: func() interface{} { return newZlibWriter() },
-		},
-	}
-}
-
-func (s *SyncPoolCompessors) AcquireGzipWriter() *gzip.Writer {
-	return s.GzipWriterPool.Get().(*gzip.Writer)
-}
-
-func (s *SyncPoolCompessors) ReleaseGzipWriter(w *gzip.Writer) {
-	s.GzipWriterPool.Put(w)
-}
-
-func (s *SyncPoolCompessors) AcquireGzipReader() *gzip.Reader {
-	return s.GzipReaderPool.Get().(*gzip.Reader)
-}
-
-func (s *SyncPoolCompessors) ReleaseGzipReader(r *gzip.Reader) {
-	s.GzipReaderPool.Put(r)
-}
-
-func (s *SyncPoolCompessors) AcquireZlibWriter() *zlib.Writer {
-	return s.ZlibWriterPool.Get().(*zlib.Writer)
-}
-
-func (s *SyncPoolCompessors) ReleaseZlibWriter(w *zlib.Writer) {
-	s.ZlibWriterPool.Put(w)
-}
-
-func newGzipWriter() *gzip.Writer {
-	// create with an empty bytes writer; it will be replaced before using the gzipWriter
-	writer, err := gzip.NewWriterLevel(new(bytes.Buffer), gzip.BestSpeed)
-	if err != nil {
-		panic(err.Error())
-	}
-	return writer
-}
-
-func newGzipReader() *gzip.Reader {
-	// create with an empty reader (but with GZIP header); it will be replaced before using the gzipReader
-	// we can safely use currentCompressProvider because it is set on package initialization.
-	w := currentCompressorProvider.AcquireGzipWriter()
-	defer currentCompressorProvider.ReleaseGzipWriter(w)
-	b := new(bytes.Buffer)
-	w.Reset(b)
-	w.Flush()
-	w.Close()
-	reader, err := gzip.NewReader(bytes.NewReader(b.Bytes()))
-	if err != nil {
-		panic(err.Error())
-	}
-	return reader
-}
-
-func newZlibWriter() *zlib.Writer {
-	writer, err := zlib.NewWriterLevel(new(bytes.Buffer), gzip.BestSpeed)
-	if err != nil {
-		panic(err.Error())
-	}
-	return writer
-}

+ 0 - 53
vendor/github.com/emicklei/go-restful/compressors.go

@@ -1,53 +0,0 @@
-package restful
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"compress/gzip"
-	"compress/zlib"
-)
-
-type CompressorProvider interface {
-	// Returns a *gzip.Writer which needs to be released later.
-	// Before using it, call Reset().
-	AcquireGzipWriter() *gzip.Writer
-
-	// Releases an aqcuired *gzip.Writer.
-	ReleaseGzipWriter(w *gzip.Writer)
-
-	// Returns a *gzip.Reader which needs to be released later.
-	AcquireGzipReader() *gzip.Reader
-
-	// Releases an aqcuired *gzip.Reader.
-	ReleaseGzipReader(w *gzip.Reader)
-
-	// Returns a *zlib.Writer which needs to be released later.
-	// Before using it, call Reset().
-	AcquireZlibWriter() *zlib.Writer
-
-	// Releases an aqcuired *zlib.Writer.
-	ReleaseZlibWriter(w *zlib.Writer)
-}
-
-// DefaultCompressorProvider is the actual provider of compressors (zlib or gzip).
-var currentCompressorProvider CompressorProvider
-
-func init() {
-	currentCompressorProvider = NewSyncPoolCompessors()
-}
-
-// CurrentCompressorProvider returns the current CompressorProvider.
-// It is initialized using a SyncPoolCompessors.
-func CurrentCompressorProvider() CompressorProvider {
-	return currentCompressorProvider
-}
-
-// CompressorProvider sets the actual provider of compressors (zlib or gzip).
-func SetCompressorProvider(p CompressorProvider) {
-	if p == nil {
-		panic("cannot set compressor provider to nil")
-	}
-	currentCompressorProvider = p
-}

+ 0 - 30
vendor/github.com/emicklei/go-restful/constants.go

@@ -1,30 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-const (
-	MIME_XML   = "application/xml"          // Accept or Content-Type used in Consumes() and/or Produces()
-	MIME_JSON  = "application/json"         // Accept or Content-Type used in Consumes() and/or Produces()
-	MIME_OCTET = "application/octet-stream" // If Content-Type is not present in request, use the default
-
-	HEADER_Allow                         = "Allow"
-	HEADER_Accept                        = "Accept"
-	HEADER_Origin                        = "Origin"
-	HEADER_ContentType                   = "Content-Type"
-	HEADER_LastModified                  = "Last-Modified"
-	HEADER_AcceptEncoding                = "Accept-Encoding"
-	HEADER_ContentEncoding               = "Content-Encoding"
-	HEADER_AccessControlExposeHeaders    = "Access-Control-Expose-Headers"
-	HEADER_AccessControlRequestMethod    = "Access-Control-Request-Method"
-	HEADER_AccessControlRequestHeaders   = "Access-Control-Request-Headers"
-	HEADER_AccessControlAllowMethods     = "Access-Control-Allow-Methods"
-	HEADER_AccessControlAllowOrigin      = "Access-Control-Allow-Origin"
-	HEADER_AccessControlAllowCredentials = "Access-Control-Allow-Credentials"
-	HEADER_AccessControlAllowHeaders     = "Access-Control-Allow-Headers"
-	HEADER_AccessControlMaxAge           = "Access-Control-Max-Age"
-
-	ENCODING_GZIP    = "gzip"
-	ENCODING_DEFLATE = "deflate"
-)

+ 0 - 361
vendor/github.com/emicklei/go-restful/container.go

@@ -1,361 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"errors"
-	"fmt"
-	"net/http"
-	"os"
-	"runtime"
-	"strings"
-	"sync"
-
-	"github.com/emicklei/go-restful/log"
-)
-
-// Container holds a collection of WebServices and a http.ServeMux to dispatch http requests.
-// The requests are further dispatched to routes of WebServices using a RouteSelector
-type Container struct {
-	webServicesLock        sync.RWMutex
-	webServices            []*WebService
-	ServeMux               *http.ServeMux
-	isRegisteredOnRoot     bool
-	containerFilters       []FilterFunction
-	doNotRecover           bool // default is true
-	recoverHandleFunc      RecoverHandleFunction
-	serviceErrorHandleFunc ServiceErrorHandleFunction
-	router                 RouteSelector // default is a CurlyRouter (RouterJSR311 is a slower alternative)
-	contentEncodingEnabled bool          // default is false
-}
-
-// NewContainer creates a new Container using a new ServeMux and default router (RouterJSR311)
-func NewContainer() *Container {
-	return &Container{
-		webServices:            []*WebService{},
-		ServeMux:               http.NewServeMux(),
-		isRegisteredOnRoot:     false,
-		containerFilters:       []FilterFunction{},
-		doNotRecover:           true,
-		recoverHandleFunc:      logStackOnRecover,
-		serviceErrorHandleFunc: writeServiceError,
-		router:                 CurlyRouter{},
-		contentEncodingEnabled: false}
-}
-
-// RecoverHandleFunction declares functions that can be used to handle a panic situation.
-// The first argument is what recover() returns. The second must be used to communicate an error response.
-type RecoverHandleFunction func(interface{}, http.ResponseWriter)
-
-// RecoverHandler changes the default function (logStackOnRecover) to be called
-// when a panic is detected. DoNotRecover must be have its default value (=false).
-func (c *Container) RecoverHandler(handler RecoverHandleFunction) {
-	c.recoverHandleFunc = handler
-}
-
-// ServiceErrorHandleFunction declares functions that can be used to handle a service error situation.
-// The first argument is the service error, the second is the request that resulted in the error and
-// the third must be used to communicate an error response.
-type ServiceErrorHandleFunction func(ServiceError, *Request, *Response)
-
-// ServiceErrorHandler changes the default function (writeServiceError) to be called
-// when a ServiceError is detected.
-func (c *Container) ServiceErrorHandler(handler ServiceErrorHandleFunction) {
-	c.serviceErrorHandleFunc = handler
-}
-
-// DoNotRecover controls whether panics will be caught to return HTTP 500.
-// If set to true, Route functions are responsible for handling any error situation.
-// Default value is true.
-func (c *Container) DoNotRecover(doNot bool) {
-	c.doNotRecover = doNot
-}
-
-// Router changes the default Router (currently RouterJSR311)
-func (c *Container) Router(aRouter RouteSelector) {
-	c.router = aRouter
-}
-
-// EnableContentEncoding (default=false) allows for GZIP or DEFLATE encoding of responses.
-func (c *Container) EnableContentEncoding(enabled bool) {
-	c.contentEncodingEnabled = enabled
-}
-
-// Add a WebService to the Container. It will detect duplicate root paths and exit in that case.
-func (c *Container) Add(service *WebService) *Container {
-	c.webServicesLock.Lock()
-	defer c.webServicesLock.Unlock()
-
-	// if rootPath was not set then lazy initialize it
-	if len(service.rootPath) == 0 {
-		service.Path("/")
-	}
-
-	// cannot have duplicate root paths
-	for _, each := range c.webServices {
-		if each.RootPath() == service.RootPath() {
-			log.Printf("[restful] WebService with duplicate root path detected:['%v']", each)
-			os.Exit(1)
-		}
-	}
-
-	// If not registered on root then add specific mapping
-	if !c.isRegisteredOnRoot {
-		c.isRegisteredOnRoot = c.addHandler(service, c.ServeMux)
-	}
-	c.webServices = append(c.webServices, service)
-	return c
-}
-
-// addHandler may set a new HandleFunc for the serveMux
-// this function must run inside the critical region protected by the webServicesLock.
-// returns true if the function was registered on root ("/")
-func (c *Container) addHandler(service *WebService, serveMux *http.ServeMux) bool {
-	pattern := fixedPrefixPath(service.RootPath())
-	// check if root path registration is needed
-	if "/" == pattern || "" == pattern {
-		serveMux.HandleFunc("/", c.dispatch)
-		return true
-	}
-	// detect if registration already exists
-	alreadyMapped := false
-	for _, each := range c.webServices {
-		if each.RootPath() == service.RootPath() {
-			alreadyMapped = true
-			break
-		}
-	}
-	if !alreadyMapped {
-		serveMux.HandleFunc(pattern, c.dispatch)
-		if !strings.HasSuffix(pattern, "/") {
-			serveMux.HandleFunc(pattern+"/", c.dispatch)
-		}
-	}
-	return false
-}
-
-func (c *Container) Remove(ws *WebService) error {
-	if c.ServeMux == http.DefaultServeMux {
-		errMsg := fmt.Sprintf("[restful] cannot remove a WebService from a Container using the DefaultServeMux: ['%v']", ws)
-		log.Printf(errMsg)
-		return errors.New(errMsg)
-	}
-	c.webServicesLock.Lock()
-	defer c.webServicesLock.Unlock()
-	// build a new ServeMux and re-register all WebServices
-	newServeMux := http.NewServeMux()
-	newServices := []*WebService{}
-	newIsRegisteredOnRoot := false
-	for _, each := range c.webServices {
-		if each.rootPath != ws.rootPath {
-			// If not registered on root then add specific mapping
-			if !newIsRegisteredOnRoot {
-				newIsRegisteredOnRoot = c.addHandler(each, newServeMux)
-			}
-			newServices = append(newServices, each)
-		}
-	}
-	c.webServices, c.ServeMux, c.isRegisteredOnRoot = newServices, newServeMux, newIsRegisteredOnRoot
-	return nil
-}
-
-// logStackOnRecover is the default RecoverHandleFunction and is called
-// when DoNotRecover is false and the recoverHandleFunc is not set for the container.
-// Default implementation logs the stacktrace and writes the stacktrace on the response.
-// This may be a security issue as it exposes sourcecode information.
-func logStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter) {
-	var buffer bytes.Buffer
-	buffer.WriteString(fmt.Sprintf("[restful] recover from panic situation: - %v\r\n", panicReason))
-	for i := 2; ; i += 1 {
-		_, file, line, ok := runtime.Caller(i)
-		if !ok {
-			break
-		}
-		buffer.WriteString(fmt.Sprintf("    %s:%d\r\n", file, line))
-	}
-	log.Print(buffer.String())
-	httpWriter.WriteHeader(http.StatusInternalServerError)
-	httpWriter.Write(buffer.Bytes())
-}
-
-// writeServiceError is the default ServiceErrorHandleFunction and is called
-// when a ServiceError is returned during route selection. Default implementation
-// calls resp.WriteErrorString(err.Code, err.Message)
-func writeServiceError(err ServiceError, req *Request, resp *Response) {
-	resp.WriteErrorString(err.Code, err.Message)
-}
-
-// Dispatch the incoming Http Request to a matching WebService.
-func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.Request) {
-	writer := httpWriter
-
-	// CompressingResponseWriter should be closed after all operations are done
-	defer func() {
-		if compressWriter, ok := writer.(*CompressingResponseWriter); ok {
-			compressWriter.Close()
-		}
-	}()
-
-	// Instal panic recovery unless told otherwise
-	if !c.doNotRecover { // catch all for 500 response
-		defer func() {
-			if r := recover(); r != nil {
-				c.recoverHandleFunc(r, writer)
-				return
-			}
-		}()
-	}
-	// Install closing the request body (if any)
-	defer func() {
-		if nil != httpRequest.Body {
-			httpRequest.Body.Close()
-		}
-	}()
-
-	// Detect if compression is needed
-	// assume without compression, test for override
-	if c.contentEncodingEnabled {
-		doCompress, encoding := wantsCompressedResponse(httpRequest)
-		if doCompress {
-			var err error
-			writer, err = NewCompressingResponseWriter(httpWriter, encoding)
-			if err != nil {
-				log.Print("[restful] unable to install compressor: ", err)
-				httpWriter.WriteHeader(http.StatusInternalServerError)
-				return
-			}
-		}
-	}
-	// Find best match Route ; err is non nil if no match was found
-	var webService *WebService
-	var route *Route
-	var err error
-	func() {
-		c.webServicesLock.RLock()
-		defer c.webServicesLock.RUnlock()
-		webService, route, err = c.router.SelectRoute(
-			c.webServices,
-			httpRequest)
-	}()
-	if err != nil {
-		// a non-200 response has already been written
-		// run container filters anyway ; they should not touch the response...
-		chain := FilterChain{Filters: c.containerFilters, Target: func(req *Request, resp *Response) {
-			switch err.(type) {
-			case ServiceError:
-				ser := err.(ServiceError)
-				c.serviceErrorHandleFunc(ser, req, resp)
-			}
-			// TODO
-		}}
-		chain.ProcessFilter(NewRequest(httpRequest), NewResponse(writer))
-		return
-	}
-	wrappedRequest, wrappedResponse := route.wrapRequestResponse(writer, httpRequest)
-	// pass through filters (if any)
-	if len(c.containerFilters)+len(webService.filters)+len(route.Filters) > 0 {
-		// compose filter chain
-		allFilters := []FilterFunction{}
-		allFilters = append(allFilters, c.containerFilters...)
-		allFilters = append(allFilters, webService.filters...)
-		allFilters = append(allFilters, route.Filters...)
-		chain := FilterChain{Filters: allFilters, Target: func(req *Request, resp *Response) {
-			// handle request by route after passing all filters
-			route.Function(wrappedRequest, wrappedResponse)
-		}}
-		chain.ProcessFilter(wrappedRequest, wrappedResponse)
-	} else {
-		// no filters, handle request by route
-		route.Function(wrappedRequest, wrappedResponse)
-	}
-}
-
-// fixedPrefixPath returns the fixed part of the partspec ; it may include template vars {}
-func fixedPrefixPath(pathspec string) string {
-	varBegin := strings.Index(pathspec, "{")
-	if -1 == varBegin {
-		return pathspec
-	}
-	return pathspec[:varBegin]
-}
-
-// ServeHTTP implements net/http.Handler therefore a Container can be a Handler in a http.Server
-func (c *Container) ServeHTTP(httpwriter http.ResponseWriter, httpRequest *http.Request) {
-	c.ServeMux.ServeHTTP(httpwriter, httpRequest)
-}
-
-// Handle registers the handler for the given pattern. If a handler already exists for pattern, Handle panics.
-func (c *Container) Handle(pattern string, handler http.Handler) {
-	c.ServeMux.Handle(pattern, handler)
-}
-
-// HandleWithFilter registers the handler for the given pattern.
-// Container's filter chain is applied for handler.
-// If a handler already exists for pattern, HandleWithFilter panics.
-func (c *Container) HandleWithFilter(pattern string, handler http.Handler) {
-	f := func(httpResponse http.ResponseWriter, httpRequest *http.Request) {
-		if len(c.containerFilters) == 0 {
-			handler.ServeHTTP(httpResponse, httpRequest)
-			return
-		}
-
-		chain := FilterChain{Filters: c.containerFilters, Target: func(req *Request, resp *Response) {
-			handler.ServeHTTP(httpResponse, httpRequest)
-		}}
-		chain.ProcessFilter(NewRequest(httpRequest), NewResponse(httpResponse))
-	}
-
-	c.Handle(pattern, http.HandlerFunc(f))
-}
-
-// Filter appends a container FilterFunction. These are called before dispatching
-// a http.Request to a WebService from the container
-func (c *Container) Filter(filter FilterFunction) {
-	c.containerFilters = append(c.containerFilters, filter)
-}
-
-// RegisteredWebServices returns the collections of added WebServices
-func (c *Container) RegisteredWebServices() []*WebService {
-	c.webServicesLock.RLock()
-	defer c.webServicesLock.RUnlock()
-	result := make([]*WebService, len(c.webServices))
-	for ix := range c.webServices {
-		result[ix] = c.webServices[ix]
-	}
-	return result
-}
-
-// computeAllowedMethods returns a list of HTTP methods that are valid for a Request
-func (c *Container) computeAllowedMethods(req *Request) []string {
-	// Go through all RegisteredWebServices() and all its Routes to collect the options
-	methods := []string{}
-	requestPath := req.Request.URL.Path
-	for _, ws := range c.RegisteredWebServices() {
-		matches := ws.pathExpr.Matcher.FindStringSubmatch(requestPath)
-		if matches != nil {
-			finalMatch := matches[len(matches)-1]
-			for _, rt := range ws.Routes() {
-				matches := rt.pathExpr.Matcher.FindStringSubmatch(finalMatch)
-				if matches != nil {
-					lastMatch := matches[len(matches)-1]
-					if lastMatch == "" || lastMatch == "/" { // do not include if value is neither empty nor ‘/’.
-						methods = append(methods, rt.Method)
-					}
-				}
-			}
-		}
-	}
-	// methods = append(methods, "OPTIONS")  not sure about this
-	return methods
-}
-
-// newBasicRequestResponse creates a pair of Request,Response from its http versions.
-// It is basic because no parameter or (produces) content-type information is given.
-func newBasicRequestResponse(httpWriter http.ResponseWriter, httpRequest *http.Request) (*Request, *Response) {
-	resp := NewResponse(httpWriter)
-	resp.requestAccept = httpRequest.Header.Get(HEADER_Accept)
-	return NewRequest(httpRequest), resp
-}

+ 0 - 202
vendor/github.com/emicklei/go-restful/cors_filter.go

@@ -1,202 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"regexp"
-	"strconv"
-	"strings"
-)
-
-// CrossOriginResourceSharing is used to create a Container Filter that implements CORS.
-// Cross-origin resource sharing (CORS) is a mechanism that allows JavaScript on a web page
-// to make XMLHttpRequests to another domain, not the domain the JavaScript originated from.
-//
-// http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
-// http://enable-cors.org/server.html
-// http://www.html5rocks.com/en/tutorials/cors/#toc-handling-a-not-so-simple-request
-type CrossOriginResourceSharing struct {
-	ExposeHeaders  []string // list of Header names
-	AllowedHeaders []string // list of Header names
-	AllowedDomains []string // list of allowed values for Http Origin. An allowed value can be a regular expression to support subdomain matching. If empty all are allowed.
-	AllowedMethods []string
-	MaxAge         int // number of seconds before requiring new Options request
-	CookiesAllowed bool
-	Container      *Container
-
-	allowedOriginPatterns []*regexp.Regexp // internal field for origin regexp check.
-}
-
-// Filter is a filter function that implements the CORS flow as documented on http://enable-cors.org/server.html
-// and http://www.html5rocks.com/static/images/cors_server_flowchart.png
-func (c CrossOriginResourceSharing) Filter(req *Request, resp *Response, chain *FilterChain) {
-	origin := req.Request.Header.Get(HEADER_Origin)
-	if len(origin) == 0 {
-		if trace {
-			traceLogger.Print("no Http header Origin set")
-		}
-		chain.ProcessFilter(req, resp)
-		return
-	}
-	if !c.isOriginAllowed(origin) { // check whether this origin is allowed
-		if trace {
-			traceLogger.Printf("HTTP Origin:%s is not part of %v, neither matches any part of %v", origin, c.AllowedDomains, c.allowedOriginPatterns)
-		}
-		chain.ProcessFilter(req, resp)
-		return
-	}
-	if req.Request.Method != "OPTIONS" {
-		c.doActualRequest(req, resp)
-		chain.ProcessFilter(req, resp)
-		return
-	}
-	if acrm := req.Request.Header.Get(HEADER_AccessControlRequestMethod); acrm != "" {
-		c.doPreflightRequest(req, resp)
-	} else {
-		c.doActualRequest(req, resp)
-		chain.ProcessFilter(req, resp)
-		return
-	}
-}
-
-func (c CrossOriginResourceSharing) doActualRequest(req *Request, resp *Response) {
-	c.setOptionsHeaders(req, resp)
-	// continue processing the response
-}
-
-func (c *CrossOriginResourceSharing) doPreflightRequest(req *Request, resp *Response) {
-	if len(c.AllowedMethods) == 0 {
-		if c.Container == nil {
-			c.AllowedMethods = DefaultContainer.computeAllowedMethods(req)
-		} else {
-			c.AllowedMethods = c.Container.computeAllowedMethods(req)
-		}
-	}
-
-	acrm := req.Request.Header.Get(HEADER_AccessControlRequestMethod)
-	if !c.isValidAccessControlRequestMethod(acrm, c.AllowedMethods) {
-		if trace {
-			traceLogger.Printf("Http header %s:%s is not in %v",
-				HEADER_AccessControlRequestMethod,
-				acrm,
-				c.AllowedMethods)
-		}
-		return
-	}
-	acrhs := req.Request.Header.Get(HEADER_AccessControlRequestHeaders)
-	if len(acrhs) > 0 {
-		for _, each := range strings.Split(acrhs, ",") {
-			if !c.isValidAccessControlRequestHeader(strings.Trim(each, " ")) {
-				if trace {
-					traceLogger.Printf("Http header %s:%s is not in %v",
-						HEADER_AccessControlRequestHeaders,
-						acrhs,
-						c.AllowedHeaders)
-				}
-				return
-			}
-		}
-	}
-	resp.AddHeader(HEADER_AccessControlAllowMethods, strings.Join(c.AllowedMethods, ","))
-	resp.AddHeader(HEADER_AccessControlAllowHeaders, acrhs)
-	c.setOptionsHeaders(req, resp)
-
-	// return http 200 response, no body
-}
-
-func (c CrossOriginResourceSharing) setOptionsHeaders(req *Request, resp *Response) {
-	c.checkAndSetExposeHeaders(resp)
-	c.setAllowOriginHeader(req, resp)
-	c.checkAndSetAllowCredentials(resp)
-	if c.MaxAge > 0 {
-		resp.AddHeader(HEADER_AccessControlMaxAge, strconv.Itoa(c.MaxAge))
-	}
-}
-
-func (c CrossOriginResourceSharing) isOriginAllowed(origin string) bool {
-	if len(origin) == 0 {
-		return false
-	}
-	if len(c.AllowedDomains) == 0 {
-		return true
-	}
-
-	allowed := false
-	for _, domain := range c.AllowedDomains {
-		if domain == origin {
-			allowed = true
-			break
-		}
-	}
-
-	if !allowed {
-		if len(c.allowedOriginPatterns) == 0 {
-			// compile allowed domains to allowed origin patterns
-			allowedOriginRegexps, err := compileRegexps(c.AllowedDomains)
-			if err != nil {
-				return false
-			}
-			c.allowedOriginPatterns = allowedOriginRegexps
-		}
-
-		for _, pattern := range c.allowedOriginPatterns {
-			if allowed = pattern.MatchString(origin); allowed {
-				break
-			}
-		}
-	}
-
-	return allowed
-}
-
-func (c CrossOriginResourceSharing) setAllowOriginHeader(req *Request, resp *Response) {
-	origin := req.Request.Header.Get(HEADER_Origin)
-	if c.isOriginAllowed(origin) {
-		resp.AddHeader(HEADER_AccessControlAllowOrigin, origin)
-	}
-}
-
-func (c CrossOriginResourceSharing) checkAndSetExposeHeaders(resp *Response) {
-	if len(c.ExposeHeaders) > 0 {
-		resp.AddHeader(HEADER_AccessControlExposeHeaders, strings.Join(c.ExposeHeaders, ","))
-	}
-}
-
-func (c CrossOriginResourceSharing) checkAndSetAllowCredentials(resp *Response) {
-	if c.CookiesAllowed {
-		resp.AddHeader(HEADER_AccessControlAllowCredentials, "true")
-	}
-}
-
-func (c CrossOriginResourceSharing) isValidAccessControlRequestMethod(method string, allowedMethods []string) bool {
-	for _, each := range allowedMethods {
-		if each == method {
-			return true
-		}
-	}
-	return false
-}
-
-func (c CrossOriginResourceSharing) isValidAccessControlRequestHeader(header string) bool {
-	for _, each := range c.AllowedHeaders {
-		if strings.ToLower(each) == strings.ToLower(header) {
-			return true
-		}
-	}
-	return false
-}
-
-// Take a list of strings and compile them into a list of regular expressions.
-func compileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) {
-	regexps := []*regexp.Regexp{}
-	for _, regexpStr := range regexpStrings {
-		r, err := regexp.Compile(regexpStr)
-		if err != nil {
-			return regexps, err
-		}
-		regexps = append(regexps, r)
-	}
-	return regexps, nil
-}

+ 0 - 2
vendor/github.com/emicklei/go-restful/coverage.sh

@@ -1,2 +0,0 @@
-go test -coverprofile=coverage.out
-go tool cover -html=coverage.out

+ 0 - 164
vendor/github.com/emicklei/go-restful/curly.go

@@ -1,164 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"net/http"
-	"regexp"
-	"sort"
-	"strings"
-)
-
-// CurlyRouter expects Routes with paths that contain zero or more parameters in curly brackets.
-type CurlyRouter struct{}
-
-// SelectRoute is part of the Router interface and returns the best match
-// for the WebService and its Route for the given Request.
-func (c CurlyRouter) SelectRoute(
-	webServices []*WebService,
-	httpRequest *http.Request) (selectedService *WebService, selected *Route, err error) {
-
-	requestTokens := tokenizePath(httpRequest.URL.Path)
-
-	detectedService := c.detectWebService(requestTokens, webServices)
-	if detectedService == nil {
-		if trace {
-			traceLogger.Printf("no WebService was found to match URL path:%s\n", httpRequest.URL.Path)
-		}
-		return nil, nil, NewError(http.StatusNotFound, "404: Page Not Found")
-	}
-	candidateRoutes := c.selectRoutes(detectedService, requestTokens)
-	if len(candidateRoutes) == 0 {
-		if trace {
-			traceLogger.Printf("no Route in WebService with path %s was found to match URL path:%s\n", detectedService.rootPath, httpRequest.URL.Path)
-		}
-		return detectedService, nil, NewError(http.StatusNotFound, "404: Page Not Found")
-	}
-	selectedRoute, err := c.detectRoute(candidateRoutes, httpRequest)
-	if selectedRoute == nil {
-		return detectedService, nil, err
-	}
-	return detectedService, selectedRoute, nil
-}
-
-// selectRoutes return a collection of Route from a WebService that matches the path tokens from the request.
-func (c CurlyRouter) selectRoutes(ws *WebService, requestTokens []string) sortableCurlyRoutes {
-	candidates := sortableCurlyRoutes{}
-	for _, each := range ws.routes {
-		matches, paramCount, staticCount := c.matchesRouteByPathTokens(each.pathParts, requestTokens)
-		if matches {
-			candidates.add(curlyRoute{each, paramCount, staticCount}) // TODO make sure Routes() return pointers?
-		}
-	}
-	sort.Sort(sort.Reverse(candidates))
-	return candidates
-}
-
-// matchesRouteByPathTokens computes whether it matches, howmany parameters do match and what the number of static path elements are.
-func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []string) (matches bool, paramCount int, staticCount int) {
-	if len(routeTokens) < len(requestTokens) {
-		// proceed in matching only if last routeToken is wildcard
-		count := len(routeTokens)
-		if count == 0 || !strings.HasSuffix(routeTokens[count-1], "*}") {
-			return false, 0, 0
-		}
-		// proceed
-	}
-	for i, routeToken := range routeTokens {
-		if i == len(requestTokens) {
-			// reached end of request path
-			return false, 0, 0
-		}
-		requestToken := requestTokens[i]
-		if strings.HasPrefix(routeToken, "{") {
-			paramCount++
-			if colon := strings.Index(routeToken, ":"); colon != -1 {
-				// match by regex
-				matchesToken, matchesRemainder := c.regularMatchesPathToken(routeToken, colon, requestToken)
-				if !matchesToken {
-					return false, 0, 0
-				}
-				if matchesRemainder {
-					break
-				}
-			}
-		} else { // no { prefix
-			if requestToken != routeToken {
-				return false, 0, 0
-			}
-			staticCount++
-		}
-	}
-	return true, paramCount, staticCount
-}
-
-// regularMatchesPathToken tests whether the regular expression part of routeToken matches the requestToken or all remaining tokens
-// format routeToken is {someVar:someExpression}, e.g. {zipcode:[\d][\d][\d][\d][A-Z][A-Z]}
-func (c CurlyRouter) regularMatchesPathToken(routeToken string, colon int, requestToken string) (matchesToken bool, matchesRemainder bool) {
-	regPart := routeToken[colon+1 : len(routeToken)-1]
-	if regPart == "*" {
-		if trace {
-			traceLogger.Printf("wildcard parameter detected in route token %s that matches %s\n", routeToken, requestToken)
-		}
-		return true, true
-	}
-	matched, err := regexp.MatchString(regPart, requestToken)
-	return (matched && err == nil), false
-}
-
-var jsr311Router = RouterJSR311{}
-
-// detectRoute selectes from a list of Route the first match by inspecting both the Accept and Content-Type
-// headers of the Request. See also RouterJSR311 in jsr311.go
-func (c CurlyRouter) detectRoute(candidateRoutes sortableCurlyRoutes, httpRequest *http.Request) (*Route, error) {
-	// tracing is done inside detectRoute
-	return jsr311Router.detectRoute(candidateRoutes.routes(), httpRequest)
-}
-
-// detectWebService returns the best matching webService given the list of path tokens.
-// see also computeWebserviceScore
-func (c CurlyRouter) detectWebService(requestTokens []string, webServices []*WebService) *WebService {
-	var best *WebService
-	score := -1
-	for _, each := range webServices {
-		matches, eachScore := c.computeWebserviceScore(requestTokens, each.pathExpr.tokens)
-		if matches && (eachScore > score) {
-			best = each
-			score = eachScore
-		}
-	}
-	return best
-}
-
-// computeWebserviceScore returns whether tokens match and
-// the weighted score of the longest matching consecutive tokens from the beginning.
-func (c CurlyRouter) computeWebserviceScore(requestTokens []string, tokens []string) (bool, int) {
-	if len(tokens) > len(requestTokens) {
-		return false, 0
-	}
-	score := 0
-	for i := 0; i < len(tokens); i++ {
-		each := requestTokens[i]
-		other := tokens[i]
-		if len(each) == 0 && len(other) == 0 {
-			score++
-			continue
-		}
-		if len(other) > 0 && strings.HasPrefix(other, "{") {
-			// no empty match
-			if len(each) == 0 {
-				return false, score
-			}
-			score += 1
-		} else {
-			// not a parameter
-			if each != other {
-				return false, score
-			}
-			score += (len(tokens) - i) * 10 //fuzzy
-		}
-	}
-	return true, score
-}

+ 0 - 52
vendor/github.com/emicklei/go-restful/curly_route.go

@@ -1,52 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-// curlyRoute exits for sorting Routes by the CurlyRouter based on number of parameters and number of static path elements.
-type curlyRoute struct {
-	route       Route
-	paramCount  int
-	staticCount int
-}
-
-type sortableCurlyRoutes []curlyRoute
-
-func (s *sortableCurlyRoutes) add(route curlyRoute) {
-	*s = append(*s, route)
-}
-
-func (s sortableCurlyRoutes) routes() (routes []Route) {
-	for _, each := range s {
-		routes = append(routes, each.route) // TODO change return type
-	}
-	return routes
-}
-
-func (s sortableCurlyRoutes) Len() int {
-	return len(s)
-}
-func (s sortableCurlyRoutes) Swap(i, j int) {
-	s[i], s[j] = s[j], s[i]
-}
-func (s sortableCurlyRoutes) Less(i, j int) bool {
-	ci := s[i]
-	cj := s[j]
-
-	// primary key
-	if ci.staticCount < cj.staticCount {
-		return true
-	}
-	if ci.staticCount > cj.staticCount {
-		return false
-	}
-	// secundary key
-	if ci.paramCount < cj.paramCount {
-		return true
-	}
-	if ci.paramCount > cj.paramCount {
-		return false
-	}
-	return ci.route.Path < cj.route.Path
-}

+ 0 - 185
vendor/github.com/emicklei/go-restful/doc.go

@@ -1,185 +0,0 @@
-/*
-Package restful, a lean package for creating REST-style WebServices without magic.
-
-WebServices and Routes
-
-A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls.
-Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes.
-WebServices must be added to a container (see below) in order to handler Http requests from a server.
-
-A Route is defined by a HTTP method, an URL path and (optionally) the MIME types it consumes (Content-Type) and produces (Accept).
-This package has the logic to find the best matching Route and if found, call its Function.
-
-	ws := new(restful.WebService)
-	ws.
-		Path("/users").
-		Consumes(restful.MIME_JSON, restful.MIME_XML).
-		Produces(restful.MIME_JSON, restful.MIME_XML)
-
-	ws.Route(ws.GET("/{user-id}").To(u.findUser))  // u is a UserResource
-
-	...
-
-	// GET http://localhost:8080/users/1
-	func (u UserResource) findUser(request *restful.Request, response *restful.Response) {
-		id := request.PathParameter("user-id")
-		...
-	}
-
-The (*Request, *Response) arguments provide functions for reading information from the request and writing information back to the response.
-
-See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-user-resource.go with a full implementation.
-
-Regular expression matching Routes
-
-A Route parameter can be specified using the format "uri/{var[:regexp]}" or the special version "uri/{var:*}" for matching the tail of the path.
-For example, /persons/{name:[A-Z][A-Z]} can be used to restrict values for the parameter "name" to only contain capital alphabetic characters.
-Regular expressions must use the standard Go syntax as described in the regexp package. (https://code.google.com/p/re2/wiki/Syntax)
-This feature requires the use of a CurlyRouter.
-
-Containers
-
-A Container holds a collection of WebServices, Filters and a http.ServeMux for multiplexing http requests.
-Using the statements "restful.Add(...) and restful.Filter(...)" will register WebServices and Filters to the Default Container.
-The Default container of go-restful uses the http.DefaultServeMux.
-You can create your own Container and create a new http.Server for that particular container.
-
-	container := restful.NewContainer()
-	server := &http.Server{Addr: ":8081", Handler: container}
-
-Filters
-
-A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses.
-You can use filters to perform generic logging, measurement, authentication, redirect, set response headers etc.
-In the restful package there are three hooks into the request,response flow where filters can be added.
-Each filter must define a FilterFunction:
-
-	func (req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
-
-Use the following statement to pass the request,response pair to the next filter or RouteFunction
-
-	chain.ProcessFilter(req, resp)
-
-Container Filters
-
-These are processed before any registered WebService.
-
-	// install a (global) filter for the default container (processed before any webservice)
-	restful.Filter(globalLogging)
-
-WebService Filters
-
-These are processed before any Route of a WebService.
-
-	// install a webservice filter (processed before any route)
-	ws.Filter(webserviceLogging).Filter(measureTime)
-
-
-Route Filters
-
-These are processed before calling the function associated with the Route.
-
-	// install 2 chained route filters (processed before calling findUser)
-	ws.Route(ws.GET("/{user-id}").Filter(routeLogging).Filter(NewCountFilter().routeCounter).To(findUser))
-
-See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-filters.go with full implementations.
-
-Response Encoding
-
-Two encodings are supported: gzip and deflate. To enable this for all responses:
-
-	restful.DefaultContainer.EnableContentEncoding(true)
-
-If a Http request includes the Accept-Encoding header then the response content will be compressed using the specified encoding.
-Alternatively, you can create a Filter that performs the encoding and install it per WebService or Route.
-
-See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-encoding-filter.go
-
-OPTIONS support
-
-By installing a pre-defined container filter, your Webservice(s) can respond to the OPTIONS Http request.
-
-	Filter(OPTIONSFilter())
-
-CORS
-
-By installing the filter of a CrossOriginResourceSharing (CORS), your WebService(s) can handle CORS requests.
-
-	cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer}
-	Filter(cors.Filter)
-
-Error Handling
-
-Unexpected things happen. If a request cannot be processed because of a failure, your service needs to tell via the response what happened and why.
-For this reason HTTP status codes exist and it is important to use the correct code in every exceptional situation.
-
-	400: Bad Request
-
-If path or query parameters are not valid (content or type) then use http.StatusBadRequest.
-
-	404: Not Found
-
-Despite a valid URI, the resource requested may not be available
-
-	500: Internal Server Error
-
-If the application logic could not process the request (or write the response) then use http.StatusInternalServerError.
-
-	405: Method Not Allowed
-
-The request has a valid URL but the method (GET,PUT,POST,...) is not allowed.
-
-	406: Not Acceptable
-
-The request does not have or has an unknown Accept Header set for this operation.
-
-	415: Unsupported Media Type
-
-The request does not have or has an unknown Content-Type Header set for this operation.
-
-ServiceError
-
-In addition to setting the correct (error) Http status code, you can choose to write a ServiceError message on the response.
-
-Performance options
-
-This package has several options that affect the performance of your service. It is important to understand them and how you can change it.
-
-	restful.DefaultContainer.DoNotRecover(false)
-
-DoNotRecover controls whether panics will be caught to return HTTP 500.
-If set to false, the container will recover from panics.
-Default value is true
-
-	restful.SetCompressorProvider(NewBoundedCachedCompressors(20, 20))
-
-If content encoding is enabled then the default strategy for getting new gzip/zlib writers and readers is to use a sync.Pool.
-Because writers are expensive structures, performance is even more improved when using a preloaded cache. You can also inject your own implementation.
-
-Trouble shooting
-
-This package has the means to produce detail logging of the complete Http request matching process and filter invocation.
-Enabling this feature requires you to set an implementation of restful.StdLogger (e.g. log.Logger) instance such as:
-
-	restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile))
-
-Logging
-
-The restful.SetLogger() method allows you to override the logger used by the package. By default restful
-uses the standard library `log` package and logs to stdout. Different logging packages are supported as
-long as they conform to `StdLogger` interface defined in the `log` sub-package, writing an adapter for your
-preferred package is simple.
-
-Resources
-
-[project]: https://github.com/emicklei/go-restful
-
-[examples]: https://github.com/emicklei/go-restful/blob/master/examples
-
-[design]:  http://ernestmicklei.com/2012/11/11/go-restful-api-design/
-
-[showcases]: https://github.com/emicklei/mora, https://github.com/emicklei/landskape
-
-(c) 2012-2015, http://ernestmicklei.com. MIT License
-*/
-package restful

+ 0 - 163
vendor/github.com/emicklei/go-restful/entity_accessors.go

@@ -1,163 +0,0 @@
-package restful
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"encoding/json"
-	"encoding/xml"
-	"strings"
-	"sync"
-)
-
-// EntityReaderWriter can read and write values using an encoding such as JSON,XML.
-type EntityReaderWriter interface {
-	// Read a serialized version of the value from the request.
-	// The Request may have a decompressing reader. Depends on Content-Encoding.
-	Read(req *Request, v interface{}) error
-
-	// Write a serialized version of the value on the response.
-	// The Response may have a compressing writer. Depends on Accept-Encoding.
-	// status should be a valid Http Status code
-	Write(resp *Response, status int, v interface{}) error
-}
-
-// entityAccessRegistry is a singleton
-var entityAccessRegistry = &entityReaderWriters{
-	protection: new(sync.RWMutex),
-	accessors:  map[string]EntityReaderWriter{},
-}
-
-// entityReaderWriters associates MIME to an EntityReaderWriter
-type entityReaderWriters struct {
-	protection *sync.RWMutex
-	accessors  map[string]EntityReaderWriter
-}
-
-func init() {
-	RegisterEntityAccessor(MIME_JSON, NewEntityAccessorJSON(MIME_JSON))
-	RegisterEntityAccessor(MIME_XML, NewEntityAccessorXML(MIME_XML))
-}
-
-// RegisterEntityAccessor add/overrides the ReaderWriter for encoding content with this MIME type.
-func RegisterEntityAccessor(mime string, erw EntityReaderWriter) {
-	entityAccessRegistry.protection.Lock()
-	defer entityAccessRegistry.protection.Unlock()
-	entityAccessRegistry.accessors[mime] = erw
-}
-
-// NewEntityAccessorJSON returns a new EntityReaderWriter for accessing JSON content.
-// This package is already initialized with such an accessor using the MIME_JSON contentType.
-func NewEntityAccessorJSON(contentType string) EntityReaderWriter {
-	return entityJSONAccess{ContentType: contentType}
-}
-
-// NewEntityAccessorXML returns a new EntityReaderWriter for accessing XML content.
-// This package is already initialized with such an accessor using the MIME_XML contentType.
-func NewEntityAccessorXML(contentType string) EntityReaderWriter {
-	return entityXMLAccess{ContentType: contentType}
-}
-
-// accessorAt returns the registered ReaderWriter for this MIME type.
-func (r *entityReaderWriters) accessorAt(mime string) (EntityReaderWriter, bool) {
-	r.protection.RLock()
-	defer r.protection.RUnlock()
-	er, ok := r.accessors[mime]
-	if !ok {
-		// retry with reverse lookup
-		// more expensive but we are in an exceptional situation anyway
-		for k, v := range r.accessors {
-			if strings.Contains(mime, k) {
-				return v, true
-			}
-		}
-	}
-	return er, ok
-}
-
-// entityXMLAccess is a EntityReaderWriter for XML encoding
-type entityXMLAccess struct {
-	// This is used for setting the Content-Type header when writing
-	ContentType string
-}
-
-// Read unmarshalls the value from XML
-func (e entityXMLAccess) Read(req *Request, v interface{}) error {
-	return xml.NewDecoder(req.Request.Body).Decode(v)
-}
-
-// Write marshalls the value to JSON and set the Content-Type Header.
-func (e entityXMLAccess) Write(resp *Response, status int, v interface{}) error {
-	return writeXML(resp, status, e.ContentType, v)
-}
-
-// writeXML marshalls the value to JSON and set the Content-Type Header.
-func writeXML(resp *Response, status int, contentType string, v interface{}) error {
-	if v == nil {
-		resp.WriteHeader(status)
-		// do not write a nil representation
-		return nil
-	}
-	if resp.prettyPrint {
-		// pretty output must be created and written explicitly
-		output, err := xml.MarshalIndent(v, " ", " ")
-		if err != nil {
-			return err
-		}
-		resp.Header().Set(HEADER_ContentType, contentType)
-		resp.WriteHeader(status)
-		_, err = resp.Write([]byte(xml.Header))
-		if err != nil {
-			return err
-		}
-		_, err = resp.Write(output)
-		return err
-	}
-	// not-so-pretty
-	resp.Header().Set(HEADER_ContentType, contentType)
-	resp.WriteHeader(status)
-	return xml.NewEncoder(resp).Encode(v)
-}
-
-// entityJSONAccess is a EntityReaderWriter for JSON encoding
-type entityJSONAccess struct {
-	// This is used for setting the Content-Type header when writing
-	ContentType string
-}
-
-// Read unmarshalls the value from JSON
-func (e entityJSONAccess) Read(req *Request, v interface{}) error {
-	decoder := json.NewDecoder(req.Request.Body)
-	decoder.UseNumber()
-	return decoder.Decode(v)
-}
-
-// Write marshalls the value to JSON and set the Content-Type Header.
-func (e entityJSONAccess) Write(resp *Response, status int, v interface{}) error {
-	return writeJSON(resp, status, e.ContentType, v)
-}
-
-// write marshalls the value to JSON and set the Content-Type Header.
-func writeJSON(resp *Response, status int, contentType string, v interface{}) error {
-	if v == nil {
-		resp.WriteHeader(status)
-		// do not write a nil representation
-		return nil
-	}
-	if resp.prettyPrint {
-		// pretty output must be created and written explicitly
-		output, err := json.MarshalIndent(v, " ", " ")
-		if err != nil {
-			return err
-		}
-		resp.Header().Set(HEADER_ContentType, contentType)
-		resp.WriteHeader(status)
-		_, err = resp.Write(output)
-		return err
-	}
-	// not-so-pretty
-	resp.Header().Set(HEADER_ContentType, contentType)
-	resp.WriteHeader(status)
-	return json.NewEncoder(resp).Encode(v)
-}

+ 0 - 35
vendor/github.com/emicklei/go-restful/filter.go

@@ -1,35 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-// FilterChain is a request scoped object to process one or more filters before calling the target RouteFunction.
-type FilterChain struct {
-	Filters []FilterFunction // ordered list of FilterFunction
-	Index   int              // index into filters that is currently in progress
-	Target  RouteFunction    // function to call after passing all filters
-}
-
-// ProcessFilter passes the request,response pair through the next of Filters.
-// Each filter can decide to proceed to the next Filter or handle the Response itself.
-func (f *FilterChain) ProcessFilter(request *Request, response *Response) {
-	if f.Index < len(f.Filters) {
-		f.Index++
-		f.Filters[f.Index-1](request, response, f)
-	} else {
-		f.Target(request, response)
-	}
-}
-
-// FilterFunction definitions must call ProcessFilter on the FilterChain to pass on the control and eventually call the RouteFunction
-type FilterFunction func(*Request, *Response, *FilterChain)
-
-// NoBrowserCacheFilter is a filter function to set HTTP headers that disable browser caching
-// See examples/restful-no-cache-filter.go for usage
-func NoBrowserCacheFilter(req *Request, resp *Response, chain *FilterChain) {
-	resp.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") // HTTP 1.1.
-	resp.Header().Set("Pragma", "no-cache")                                   // HTTP 1.0.
-	resp.Header().Set("Expires", "0")                                         // Proxies.
-	chain.ProcessFilter(req, resp)
-}

+ 0 - 10
vendor/github.com/emicklei/go-restful/install.sh

@@ -1,10 +0,0 @@
-go test -test.v ...restful && \
-go test -test.v ...swagger && \
-go vet ...restful && \
-go fmt ...swagger && \
-go install ...swagger && \
-go fmt ...restful && \
-go install ...restful
-cd examples
-	ls *.go | xargs -I {} go build -o /tmp/ignore {}
-	cd ..

+ 0 - 248
vendor/github.com/emicklei/go-restful/jsr311.go

@@ -1,248 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"errors"
-	"fmt"
-	"net/http"
-	"sort"
-)
-
-// RouterJSR311 implements the flow for matching Requests to Routes (and consequently Resource Functions)
-// as specified by the JSR311 http://jsr311.java.net/nonav/releases/1.1/spec/spec.html.
-// RouterJSR311 implements the Router interface.
-// Concept of locators is not implemented.
-type RouterJSR311 struct{}
-
-// SelectRoute is part of the Router interface and returns the best match
-// for the WebService and its Route for the given Request.
-func (r RouterJSR311) SelectRoute(
-	webServices []*WebService,
-	httpRequest *http.Request) (selectedService *WebService, selectedRoute *Route, err error) {
-
-	// Identify the root resource class (WebService)
-	dispatcher, finalMatch, err := r.detectDispatcher(httpRequest.URL.Path, webServices)
-	if err != nil {
-		return nil, nil, NewError(http.StatusNotFound, "")
-	}
-	// Obtain the set of candidate methods (Routes)
-	routes := r.selectRoutes(dispatcher, finalMatch)
-	if len(routes) == 0 {
-		return dispatcher, nil, NewError(http.StatusNotFound, "404: Page Not Found")
-	}
-
-	// Identify the method (Route) that will handle the request
-	route, ok := r.detectRoute(routes, httpRequest)
-	return dispatcher, route, ok
-}
-
-// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2
-func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*Route, error) {
-	// http method
-	methodOk := []Route{}
-	for _, each := range routes {
-		if httpRequest.Method == each.Method {
-			methodOk = append(methodOk, each)
-		}
-	}
-	if len(methodOk) == 0 {
-		if trace {
-			traceLogger.Printf("no Route found (in %d routes) that matches HTTP method %s\n", len(routes), httpRequest.Method)
-		}
-		return nil, NewError(http.StatusMethodNotAllowed, "405: Method Not Allowed")
-	}
-	inputMediaOk := methodOk
-
-	// content-type
-	contentType := httpRequest.Header.Get(HEADER_ContentType)
-	inputMediaOk = []Route{}
-	for _, each := range methodOk {
-		if each.matchesContentType(contentType) {
-			inputMediaOk = append(inputMediaOk, each)
-		}
-	}
-	if len(inputMediaOk) == 0 {
-		if trace {
-			traceLogger.Printf("no Route found (from %d) that matches HTTP Content-Type: %s\n", len(methodOk), contentType)
-		}
-		return nil, NewError(http.StatusUnsupportedMediaType, "415: Unsupported Media Type")
-	}
-
-	// accept
-	outputMediaOk := []Route{}
-	accept := httpRequest.Header.Get(HEADER_Accept)
-	if len(accept) == 0 {
-		accept = "*/*"
-	}
-	for _, each := range inputMediaOk {
-		if each.matchesAccept(accept) {
-			outputMediaOk = append(outputMediaOk, each)
-		}
-	}
-	if len(outputMediaOk) == 0 {
-		if trace {
-			traceLogger.Printf("no Route found (from %d) that matches HTTP Accept: %s\n", len(inputMediaOk), accept)
-		}
-		return nil, NewError(http.StatusNotAcceptable, "406: Not Acceptable")
-	}
-	// return r.bestMatchByMedia(outputMediaOk, contentType, accept), nil
-	return &outputMediaOk[0], nil
-}
-
-// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2
-// n/m > n/* > */*
-func (r RouterJSR311) bestMatchByMedia(routes []Route, contentType string, accept string) *Route {
-	// TODO
-	return &routes[0]
-}
-
-// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2  (step 2)
-func (r RouterJSR311) selectRoutes(dispatcher *WebService, pathRemainder string) []Route {
-	filtered := &sortableRouteCandidates{}
-	for _, each := range dispatcher.Routes() {
-		pathExpr := each.pathExpr
-		matches := pathExpr.Matcher.FindStringSubmatch(pathRemainder)
-		if matches != nil {
-			lastMatch := matches[len(matches)-1]
-			if len(lastMatch) == 0 || lastMatch == "/" { // do not include if value is neither empty nor ‘/’.
-				filtered.candidates = append(filtered.candidates,
-					routeCandidate{each, len(matches) - 1, pathExpr.LiteralCount, pathExpr.VarCount})
-			}
-		}
-	}
-	if len(filtered.candidates) == 0 {
-		if trace {
-			traceLogger.Printf("WebService on path %s has no routes that match URL path remainder:%s\n", dispatcher.rootPath, pathRemainder)
-		}
-		return []Route{}
-	}
-	sort.Sort(sort.Reverse(filtered))
-
-	// select other routes from candidates whoes expression matches rmatch
-	matchingRoutes := []Route{filtered.candidates[0].route}
-	for c := 1; c < len(filtered.candidates); c++ {
-		each := filtered.candidates[c]
-		if each.route.pathExpr.Matcher.MatchString(pathRemainder) {
-			matchingRoutes = append(matchingRoutes, each.route)
-		}
-	}
-	return matchingRoutes
-}
-
-// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2 (step 1)
-func (r RouterJSR311) detectDispatcher(requestPath string, dispatchers []*WebService) (*WebService, string, error) {
-	filtered := &sortableDispatcherCandidates{}
-	for _, each := range dispatchers {
-		matches := each.pathExpr.Matcher.FindStringSubmatch(requestPath)
-		if matches != nil {
-			filtered.candidates = append(filtered.candidates,
-				dispatcherCandidate{each, matches[len(matches)-1], len(matches), each.pathExpr.LiteralCount, each.pathExpr.VarCount})
-		}
-	}
-	if len(filtered.candidates) == 0 {
-		if trace {
-			traceLogger.Printf("no WebService was found to match URL path:%s\n", requestPath)
-		}
-		return nil, "", errors.New("not found")
-	}
-	sort.Sort(sort.Reverse(filtered))
-	return filtered.candidates[0].dispatcher, filtered.candidates[0].finalMatch, nil
-}
-
-// Types and functions to support the sorting of Routes
-
-type routeCandidate struct {
-	route           Route
-	matchesCount    int // the number of capturing groups
-	literalCount    int // the number of literal characters (means those not resulting from template variable substitution)
-	nonDefaultCount int // the number of capturing groups with non-default regular expressions (i.e. not ‘([^  /]+?)’)
-}
-
-func (r routeCandidate) expressionToMatch() string {
-	return r.route.pathExpr.Source
-}
-
-func (r routeCandidate) String() string {
-	return fmt.Sprintf("(m=%d,l=%d,n=%d)", r.matchesCount, r.literalCount, r.nonDefaultCount)
-}
-
-type sortableRouteCandidates struct {
-	candidates []routeCandidate
-}
-
-func (rcs *sortableRouteCandidates) Len() int {
-	return len(rcs.candidates)
-}
-func (rcs *sortableRouteCandidates) Swap(i, j int) {
-	rcs.candidates[i], rcs.candidates[j] = rcs.candidates[j], rcs.candidates[i]
-}
-func (rcs *sortableRouteCandidates) Less(i, j int) bool {
-	ci := rcs.candidates[i]
-	cj := rcs.candidates[j]
-	// primary key
-	if ci.literalCount < cj.literalCount {
-		return true
-	}
-	if ci.literalCount > cj.literalCount {
-		return false
-	}
-	// secundary key
-	if ci.matchesCount < cj.matchesCount {
-		return true
-	}
-	if ci.matchesCount > cj.matchesCount {
-		return false
-	}
-	// tertiary key
-	if ci.nonDefaultCount < cj.nonDefaultCount {
-		return true
-	}
-	if ci.nonDefaultCount > cj.nonDefaultCount {
-		return false
-	}
-	// quaternary key ("source" is interpreted as Path)
-	return ci.route.Path < cj.route.Path
-}
-
-// Types and functions to support the sorting of Dispatchers
-
-type dispatcherCandidate struct {
-	dispatcher      *WebService
-	finalMatch      string
-	matchesCount    int // the number of capturing groups
-	literalCount    int // the number of literal characters (means those not resulting from template variable substitution)
-	nonDefaultCount int // the number of capturing groups with non-default regular expressions (i.e. not ‘([^  /]+?)’)
-}
-type sortableDispatcherCandidates struct {
-	candidates []dispatcherCandidate
-}
-
-func (dc *sortableDispatcherCandidates) Len() int {
-	return len(dc.candidates)
-}
-func (dc *sortableDispatcherCandidates) Swap(i, j int) {
-	dc.candidates[i], dc.candidates[j] = dc.candidates[j], dc.candidates[i]
-}
-func (dc *sortableDispatcherCandidates) Less(i, j int) bool {
-	ci := dc.candidates[i]
-	cj := dc.candidates[j]
-	// primary key
-	if ci.matchesCount < cj.matchesCount {
-		return true
-	}
-	if ci.matchesCount > cj.matchesCount {
-		return false
-	}
-	// secundary key
-	if ci.literalCount < cj.literalCount {
-		return true
-	}
-	if ci.literalCount > cj.literalCount {
-		return false
-	}
-	// tertiary key
-	return ci.nonDefaultCount < cj.nonDefaultCount
-}

+ 0 - 31
vendor/github.com/emicklei/go-restful/log/log.go

@@ -1,31 +0,0 @@
-package log
-
-import (
-	stdlog "log"
-	"os"
-)
-
-// Logger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger
-type StdLogger interface {
-	Print(v ...interface{})
-	Printf(format string, v ...interface{})
-}
-
-var Logger StdLogger
-
-func init() {
-	// default Logger
-	SetLogger(stdlog.New(os.Stderr, "[restful] ", stdlog.LstdFlags|stdlog.Lshortfile))
-}
-
-func SetLogger(customLogger StdLogger) {
-	Logger = customLogger
-}
-
-func Print(v ...interface{}) {
-	Logger.Print(v...)
-}
-
-func Printf(format string, v ...interface{}) {
-	Logger.Printf(format, v...)
-}

+ 0 - 32
vendor/github.com/emicklei/go-restful/logger.go

@@ -1,32 +0,0 @@
-package restful
-
-// Copyright 2014 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-import (
-	"github.com/emicklei/go-restful/log"
-)
-
-var trace bool = false
-var traceLogger log.StdLogger
-
-func init() {
-	traceLogger = log.Logger // use the package logger by default
-}
-
-// TraceLogger enables detailed logging of Http request matching and filter invocation. Default no logger is set.
-// You may call EnableTracing() directly to enable trace logging to the package-wide logger.
-func TraceLogger(logger log.StdLogger) {
-	traceLogger = logger
-	EnableTracing(logger != nil)
-}
-
-// expose the setter for the global logger on the top-level package
-func SetLogger(customLogger log.StdLogger) {
-	log.SetLogger(customLogger)
-}
-
-// EnableTracing can be used to Trace logging on and off.
-func EnableTracing(enabled bool) {
-	trace = enabled
-}

+ 0 - 45
vendor/github.com/emicklei/go-restful/mime.go

@@ -1,45 +0,0 @@
-package restful
-
-import (
-	"strconv"
-	"strings"
-)
-
-type mime struct {
-	media   string
-	quality float64
-}
-
-// insertMime adds a mime to a list and keeps it sorted by quality.
-func insertMime(l []mime, e mime) []mime {
-	for i, each := range l {
-		// if current mime has lower quality then insert before
-		if e.quality > each.quality {
-			left := append([]mime{}, l[0:i]...)
-			return append(append(left, e), l[i:]...)
-		}
-	}
-	return append(l, e)
-}
-
-// sortedMimes returns a list of mime sorted (desc) by its specified quality.
-func sortedMimes(accept string) (sorted []mime) {
-	for _, each := range strings.Split(accept, ",") {
-		typeAndQuality := strings.Split(strings.Trim(each, " "), ";")
-		if len(typeAndQuality) == 1 {
-			sorted = insertMime(sorted, mime{typeAndQuality[0], 1.0})
-		} else {
-			// take factor
-			parts := strings.Split(typeAndQuality[1], "=")
-			if len(parts) == 2 {
-				f, err := strconv.ParseFloat(parts[1], 64)
-				if err != nil {
-					traceLogger.Printf("unable to parse quality in %s, %v", each, err)
-				} else {
-					sorted = insertMime(sorted, mime{typeAndQuality[0], f})
-				}
-			}
-		}
-	}
-	return
-}

+ 0 - 26
vendor/github.com/emicklei/go-restful/options_filter.go

@@ -1,26 +0,0 @@
-package restful
-
-import "strings"
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-// OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method
-// and provides the response with a set of allowed methods for the request URL Path.
-// As for any filter, you can also install it for a particular WebService within a Container.
-// Note: this filter is not needed when using CrossOriginResourceSharing (for CORS).
-func (c *Container) OPTIONSFilter(req *Request, resp *Response, chain *FilterChain) {
-	if "OPTIONS" != req.Request.Method {
-		chain.ProcessFilter(req, resp)
-		return
-	}
-	resp.AddHeader(HEADER_Allow, strings.Join(c.computeAllowedMethods(req), ","))
-}
-
-// OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method
-// and provides the response with a set of allowed methods for the request URL Path.
-// Note: this filter is not needed when using CrossOriginResourceSharing (for CORS).
-func OPTIONSFilter() FilterFunction {
-	return DefaultContainer.OPTIONSFilter
-}

+ 0 - 114
vendor/github.com/emicklei/go-restful/parameter.go

@@ -1,114 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-const (
-	// PathParameterKind = indicator of Request parameter type "path"
-	PathParameterKind = iota
-
-	// QueryParameterKind = indicator of Request parameter type "query"
-	QueryParameterKind
-
-	// BodyParameterKind = indicator of Request parameter type "body"
-	BodyParameterKind
-
-	// HeaderParameterKind = indicator of Request parameter type "header"
-	HeaderParameterKind
-
-	// FormParameterKind = indicator of Request parameter type "form"
-	FormParameterKind
-)
-
-// Parameter is for documententing the parameter used in a Http Request
-// ParameterData kinds are Path,Query and Body
-type Parameter struct {
-	data *ParameterData
-}
-
-// ParameterData represents the state of a Parameter.
-// It is made public to make it accessible to e.g. the Swagger package.
-type ParameterData struct {
-	Name, Description, DataType, DataFormat string
-	Kind                                    int
-	Required                                bool
-	AllowableValues                         map[string]string
-	AllowMultiple                           bool
-	DefaultValue                            string
-}
-
-// Data returns the state of the Parameter
-func (p *Parameter) Data() ParameterData {
-	return *p.data
-}
-
-// Kind returns the parameter type indicator (see const for valid values)
-func (p *Parameter) Kind() int {
-	return p.data.Kind
-}
-
-func (p *Parameter) bePath() *Parameter {
-	p.data.Kind = PathParameterKind
-	return p
-}
-func (p *Parameter) beQuery() *Parameter {
-	p.data.Kind = QueryParameterKind
-	return p
-}
-func (p *Parameter) beBody() *Parameter {
-	p.data.Kind = BodyParameterKind
-	return p
-}
-
-func (p *Parameter) beHeader() *Parameter {
-	p.data.Kind = HeaderParameterKind
-	return p
-}
-
-func (p *Parameter) beForm() *Parameter {
-	p.data.Kind = FormParameterKind
-	return p
-}
-
-// Required sets the required field and returns the receiver
-func (p *Parameter) Required(required bool) *Parameter {
-	p.data.Required = required
-	return p
-}
-
-// AllowMultiple sets the allowMultiple field and returns the receiver
-func (p *Parameter) AllowMultiple(multiple bool) *Parameter {
-	p.data.AllowMultiple = multiple
-	return p
-}
-
-// AllowableValues sets the allowableValues field and returns the receiver
-func (p *Parameter) AllowableValues(values map[string]string) *Parameter {
-	p.data.AllowableValues = values
-	return p
-}
-
-// DataType sets the dataType field and returns the receiver
-func (p *Parameter) DataType(typeName string) *Parameter {
-	p.data.DataType = typeName
-	return p
-}
-
-// DataFormat sets the dataFormat field for Swagger UI
-func (p *Parameter) DataFormat(formatName string) *Parameter {
-	p.data.DataFormat = formatName
-	return p
-}
-
-// DefaultValue sets the default value field and returns the receiver
-func (p *Parameter) DefaultValue(stringRepresentation string) *Parameter {
-	p.data.DefaultValue = stringRepresentation
-	return p
-}
-
-// Description sets the description value field and returns the receiver
-func (p *Parameter) Description(doc string) *Parameter {
-	p.data.Description = doc
-	return p
-}

+ 0 - 69
vendor/github.com/emicklei/go-restful/path_expression.go

@@ -1,69 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"fmt"
-	"regexp"
-	"strings"
-)
-
-// PathExpression holds a compiled path expression (RegExp) needed to match against
-// Http request paths and to extract path parameter values.
-type pathExpression struct {
-	LiteralCount int // the number of literal characters (means those not resulting from template variable substitution)
-	VarCount     int // the number of named parameters (enclosed by {}) in the path
-	Matcher      *regexp.Regexp
-	Source       string // Path as defined by the RouteBuilder
-	tokens       []string
-}
-
-// NewPathExpression creates a PathExpression from the input URL path.
-// Returns an error if the path is invalid.
-func newPathExpression(path string) (*pathExpression, error) {
-	expression, literalCount, varCount, tokens := templateToRegularExpression(path)
-	compiled, err := regexp.Compile(expression)
-	if err != nil {
-		return nil, err
-	}
-	return &pathExpression{literalCount, varCount, compiled, expression, tokens}, nil
-}
-
-// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-370003.7.3
-func templateToRegularExpression(template string) (expression string, literalCount int, varCount int, tokens []string) {
-	var buffer bytes.Buffer
-	buffer.WriteString("^")
-	//tokens = strings.Split(template, "/")
-	tokens = tokenizePath(template)
-	for _, each := range tokens {
-		if each == "" {
-			continue
-		}
-		buffer.WriteString("/")
-		if strings.HasPrefix(each, "{") {
-			// check for regular expression in variable
-			colon := strings.Index(each, ":")
-			if colon != -1 {
-				// extract expression
-				paramExpr := strings.TrimSpace(each[colon+1 : len(each)-1])
-				if paramExpr == "*" { // special case
-					buffer.WriteString("(.*)")
-				} else {
-					buffer.WriteString(fmt.Sprintf("(%s)", paramExpr)) // between colon and closing moustache
-				}
-			} else {
-				// plain var
-				buffer.WriteString("([^/]+?)")
-			}
-			varCount += 1
-		} else {
-			literalCount += len(each)
-			encoded := each // TODO URI encode
-			buffer.WriteString(regexp.QuoteMeta(encoded))
-		}
-	}
-	return strings.TrimRight(buffer.String(), "/") + "(/.*)?$", literalCount, varCount, tokens
-}

+ 0 - 136
vendor/github.com/emicklei/go-restful/request.go

@@ -1,136 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"compress/zlib"
-	"io/ioutil"
-	"net/http"
-)
-
-var defaultRequestContentType string
-
-var doCacheReadEntityBytes = false
-
-// Request is a wrapper for a http Request that provides convenience methods
-type Request struct {
-	Request           *http.Request
-	bodyContent       *[]byte // to cache the request body for multiple reads of ReadEntity
-	pathParameters    map[string]string
-	attributes        map[string]interface{} // for storing request-scoped values
-	selectedRoutePath string                 // root path + route path that matched the request, e.g. /meetings/{id}/attendees
-}
-
-func NewRequest(httpRequest *http.Request) *Request {
-	return &Request{
-		Request:        httpRequest,
-		pathParameters: map[string]string{},
-		attributes:     map[string]interface{}{},
-	} // empty parameters, attributes
-}
-
-// If ContentType is missing or */* is given then fall back to this type, otherwise
-// a "Unable to unmarshal content of type:" response is returned.
-// Valid values are restful.MIME_JSON and restful.MIME_XML
-// Example:
-// 	restful.DefaultRequestContentType(restful.MIME_JSON)
-func DefaultRequestContentType(mime string) {
-	defaultRequestContentType = mime
-}
-
-// SetCacheReadEntity controls whether the response data ([]byte) is cached such that ReadEntity is repeatable.
-// Default is true (due to backwardcompatibility). For better performance, you should set it to false if you don't need it.
-func SetCacheReadEntity(doCache bool) {
-	doCacheReadEntityBytes = doCache
-}
-
-// PathParameter accesses the Path parameter value by its name
-func (r *Request) PathParameter(name string) string {
-	return r.pathParameters[name]
-}
-
-// PathParameters accesses the Path parameter values
-func (r *Request) PathParameters() map[string]string {
-	return r.pathParameters
-}
-
-// QueryParameter returns the (first) Query parameter value by its name
-func (r *Request) QueryParameter(name string) string {
-	return r.Request.FormValue(name)
-}
-
-// BodyParameter parses the body of the request (once for typically a POST or a PUT) and returns the value of the given name or an error.
-func (r *Request) BodyParameter(name string) (string, error) {
-	err := r.Request.ParseForm()
-	if err != nil {
-		return "", err
-	}
-	return r.Request.PostFormValue(name), nil
-}
-
-// HeaderParameter returns the HTTP Header value of a Header name or empty if missing
-func (r *Request) HeaderParameter(name string) string {
-	return r.Request.Header.Get(name)
-}
-
-// ReadEntity checks the Accept header and reads the content into the entityPointer.
-func (r *Request) ReadEntity(entityPointer interface{}) (err error) {
-	contentType := r.Request.Header.Get(HEADER_ContentType)
-	contentEncoding := r.Request.Header.Get(HEADER_ContentEncoding)
-
-	// OLD feature, cache the body for reads
-	if doCacheReadEntityBytes {
-		if r.bodyContent == nil {
-			data, err := ioutil.ReadAll(r.Request.Body)
-			if err != nil {
-				return err
-			}
-			r.bodyContent = &data
-		}
-		r.Request.Body = ioutil.NopCloser(bytes.NewReader(*r.bodyContent))
-	}
-
-	// check if the request body needs decompression
-	if ENCODING_GZIP == contentEncoding {
-		gzipReader := currentCompressorProvider.AcquireGzipReader()
-		defer currentCompressorProvider.ReleaseGzipReader(gzipReader)
-		gzipReader.Reset(r.Request.Body)
-		r.Request.Body = gzipReader
-	} else if ENCODING_DEFLATE == contentEncoding {
-		zlibReader, err := zlib.NewReader(r.Request.Body)
-		if err != nil {
-			return err
-		}
-		r.Request.Body = zlibReader
-	}
-
-	// lookup the EntityReader, use defaultRequestContentType if needed and provided
-	entityReader, ok := entityAccessRegistry.accessorAt(contentType)
-	if !ok {
-		if len(defaultRequestContentType) != 0 {
-			entityReader, ok = entityAccessRegistry.accessorAt(defaultRequestContentType)
-		}
-		if !ok {
-			return NewError(http.StatusBadRequest, "Unable to unmarshal content of type:"+contentType)
-		}
-	}
-	return entityReader.Read(r, entityPointer)
-}
-
-// SetAttribute adds or replaces the attribute with the given value.
-func (r *Request) SetAttribute(name string, value interface{}) {
-	r.attributes[name] = value
-}
-
-// Attribute returns the value associated to the given name. Returns nil if absent.
-func (r Request) Attribute(name string) interface{} {
-	return r.attributes[name]
-}
-
-// SelectedRoutePath root path + route path that matched the request, e.g. /meetings/{id}/attendees
-func (r Request) SelectedRoutePath() string {
-	return r.selectedRoutePath
-}

+ 0 - 235
vendor/github.com/emicklei/go-restful/response.go

@@ -1,235 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"errors"
-	"net/http"
-)
-
-// DEPRECATED, use DefaultResponseContentType(mime)
-var DefaultResponseMimeType string
-
-//PrettyPrintResponses controls the indentation feature of XML and JSON serialization
-var PrettyPrintResponses = true
-
-// Response is a wrapper on the actual http ResponseWriter
-// It provides several convenience methods to prepare and write response content.
-type Response struct {
-	http.ResponseWriter
-	requestAccept string   // mime-type what the Http Request says it wants to receive
-	routeProduces []string // mime-types what the Route says it can produce
-	statusCode    int      // HTTP status code that has been written explicity (if zero then net/http has written 200)
-	contentLength int      // number of bytes written for the response body
-	prettyPrint   bool     // controls the indentation feature of XML and JSON serialization. It is initialized using var PrettyPrintResponses.
-	err           error    // err property is kept when WriteError is called
-}
-
-// Creates a new response based on a http ResponseWriter.
-func NewResponse(httpWriter http.ResponseWriter) *Response {
-	return &Response{httpWriter, "", []string{}, http.StatusOK, 0, PrettyPrintResponses, nil} // empty content-types
-}
-
-// If Accept header matching fails, fall back to this type.
-// Valid values are restful.MIME_JSON and restful.MIME_XML
-// Example:
-// 	restful.DefaultResponseContentType(restful.MIME_JSON)
-func DefaultResponseContentType(mime string) {
-	DefaultResponseMimeType = mime
-}
-
-// InternalServerError writes the StatusInternalServerError header.
-// DEPRECATED, use WriteErrorString(http.StatusInternalServerError,reason)
-func (r Response) InternalServerError() Response {
-	r.WriteHeader(http.StatusInternalServerError)
-	return r
-}
-
-// PrettyPrint changes whether this response must produce pretty (line-by-line, indented) JSON or XML output.
-func (r *Response) PrettyPrint(bePretty bool) {
-	r.prettyPrint = bePretty
-}
-
-// AddHeader is a shortcut for .Header().Add(header,value)
-func (r Response) AddHeader(header string, value string) Response {
-	r.Header().Add(header, value)
-	return r
-}
-
-// SetRequestAccepts tells the response what Mime-type(s) the HTTP request said it wants to accept. Exposed for testing.
-func (r *Response) SetRequestAccepts(mime string) {
-	r.requestAccept = mime
-}
-
-// EntityWriter returns the registered EntityWriter that the entity (requested resource)
-// can write according to what the request wants (Accept) and what the Route can produce or what the restful defaults say.
-// If called before WriteEntity and WriteHeader then a false return value can be used to write a 406: Not Acceptable.
-func (r *Response) EntityWriter() (EntityReaderWriter, bool) {
-	sorted := sortedMimes(r.requestAccept)
-	for _, eachAccept := range sorted {
-		for _, eachProduce := range r.routeProduces {
-			if eachProduce == eachAccept.media {
-				if w, ok := entityAccessRegistry.accessorAt(eachAccept.media); ok {
-					return w, true
-				}
-			}
-		}
-		if eachAccept.media == "*/*" {
-			for _, each := range r.routeProduces {
-				if w, ok := entityAccessRegistry.accessorAt(each); ok {
-					return w, true
-				}
-			}
-		}
-	}
-	// if requestAccept is empty
-	writer, ok := entityAccessRegistry.accessorAt(r.requestAccept)
-	if !ok {
-		// if not registered then fallback to the defaults (if set)
-		if DefaultResponseMimeType == MIME_JSON {
-			return entityAccessRegistry.accessorAt(MIME_JSON)
-		}
-		if DefaultResponseMimeType == MIME_XML {
-			return entityAccessRegistry.accessorAt(MIME_XML)
-		}
-		// Fallback to whatever the route says it can produce.
-		// https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
-		for _, each := range r.routeProduces {
-			if w, ok := entityAccessRegistry.accessorAt(each); ok {
-				return w, true
-			}
-		}
-		if trace {
-			traceLogger.Printf("no registered EntityReaderWriter found for %s", r.requestAccept)
-		}
-	}
-	return writer, ok
-}
-
-// WriteEntity calls WriteHeaderAndEntity with Http Status OK (200)
-func (r *Response) WriteEntity(value interface{}) error {
-	return r.WriteHeaderAndEntity(http.StatusOK, value)
-}
-
-// WriteHeaderAndEntity marshals the value using the representation denoted by the Accept Header and the registered EntityWriters.
-// If no Accept header is specified (or */*) then respond with the Content-Type as specified by the first in the Route.Produces.
-// If an Accept header is specified then respond with the Content-Type as specified by the first in the Route.Produces that is matched with the Accept header.
-// If the value is nil then no response is send except for the Http status. You may want to call WriteHeader(http.StatusNotFound) instead.
-// If there is no writer available that can represent the value in the requested MIME type then Http Status NotAcceptable is written.
-// Current implementation ignores any q-parameters in the Accept Header.
-// Returns an error if the value could not be written on the response.
-func (r *Response) WriteHeaderAndEntity(status int, value interface{}) error {
-	writer, ok := r.EntityWriter()
-	if !ok {
-		r.WriteHeader(http.StatusNotAcceptable)
-		return nil
-	}
-	return writer.Write(r, status, value)
-}
-
-// WriteAsXml is a convenience method for writing a value in xml (requires Xml tags on the value)
-// It uses the standard encoding/xml package for marshalling the value ; not using a registered EntityReaderWriter.
-func (r *Response) WriteAsXml(value interface{}) error {
-	return writeXML(r, http.StatusOK, MIME_XML, value)
-}
-
-// WriteHeaderAndXml is a convenience method for writing a status and value in xml (requires Xml tags on the value)
-// It uses the standard encoding/xml package for marshalling the value ; not using a registered EntityReaderWriter.
-func (r *Response) WriteHeaderAndXml(status int, value interface{}) error {
-	return writeXML(r, status, MIME_XML, value)
-}
-
-// WriteAsJson is a convenience method for writing a value in json.
-// It uses the standard encoding/json package for marshalling the value ; not using a registered EntityReaderWriter.
-func (r *Response) WriteAsJson(value interface{}) error {
-	return writeJSON(r, http.StatusOK, MIME_JSON, value)
-}
-
-// WriteJson is a convenience method for writing a value in Json with a given Content-Type.
-// It uses the standard encoding/json package for marshalling the value ; not using a registered EntityReaderWriter.
-func (r *Response) WriteJson(value interface{}, contentType string) error {
-	return writeJSON(r, http.StatusOK, contentType, value)
-}
-
-// WriteHeaderAndJson is a convenience method for writing the status and a value in Json with a given Content-Type.
-// It uses the standard encoding/json package for marshalling the value ; not using a registered EntityReaderWriter.
-func (r *Response) WriteHeaderAndJson(status int, value interface{}, contentType string) error {
-	return writeJSON(r, status, contentType, value)
-}
-
-// WriteError write the http status and the error string on the response.
-func (r *Response) WriteError(httpStatus int, err error) error {
-	r.err = err
-	return r.WriteErrorString(httpStatus, err.Error())
-}
-
-// WriteServiceError is a convenience method for a responding with a status and a ServiceError
-func (r *Response) WriteServiceError(httpStatus int, err ServiceError) error {
-	r.err = err
-	return r.WriteHeaderAndEntity(httpStatus, err)
-}
-
-// WriteErrorString is a convenience method for an error status with the actual error
-func (r *Response) WriteErrorString(httpStatus int, errorReason string) error {
-	if r.err == nil {
-		// if not called from WriteError
-		r.err = errors.New(errorReason)
-	}
-	r.WriteHeader(httpStatus)
-	if _, err := r.Write([]byte(errorReason)); err != nil {
-		return err
-	}
-	return nil
-}
-
-// Flush implements http.Flusher interface, which sends any buffered data to the client.
-func (r *Response) Flush() {
-	if f, ok := r.ResponseWriter.(http.Flusher); ok {
-		f.Flush()
-	} else if trace {
-		traceLogger.Printf("ResponseWriter %v doesn't support Flush", r)
-	}
-}
-
-// WriteHeader is overridden to remember the Status Code that has been written.
-// Changes to the Header of the response have no effect after this.
-func (r *Response) WriteHeader(httpStatus int) {
-	r.statusCode = httpStatus
-	r.ResponseWriter.WriteHeader(httpStatus)
-}
-
-// StatusCode returns the code that has been written using WriteHeader.
-func (r Response) StatusCode() int {
-	if 0 == r.statusCode {
-		// no status code has been written yet; assume OK
-		return http.StatusOK
-	}
-	return r.statusCode
-}
-
-// Write writes the data to the connection as part of an HTTP reply.
-// Write is part of http.ResponseWriter interface.
-func (r *Response) Write(bytes []byte) (int, error) {
-	written, err := r.ResponseWriter.Write(bytes)
-	r.contentLength += written
-	return written, err
-}
-
-// ContentLength returns the number of bytes written for the response content.
-// Note that this value is only correct if all data is written through the Response using its Write* methods.
-// Data written directly using the underlying http.ResponseWriter is not accounted for.
-func (r Response) ContentLength() int {
-	return r.contentLength
-}
-
-// CloseNotify is part of http.CloseNotifier interface
-func (r Response) CloseNotify() <-chan bool {
-	return r.ResponseWriter.(http.CloseNotifier).CloseNotify()
-}
-
-// Error returns the err created by WriteError
-func (r Response) Error() error {
-	return r.err
-}

+ 0 - 183
vendor/github.com/emicklei/go-restful/route.go

@@ -1,183 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"net/http"
-	"strings"
-)
-
-// RouteFunction declares the signature of a function that can be bound to a Route.
-type RouteFunction func(*Request, *Response)
-
-// Route binds a HTTP Method,Path,Consumes combination to a RouteFunction.
-type Route struct {
-	Method   string
-	Produces []string
-	Consumes []string
-	Path     string // webservice root path + described path
-	Function RouteFunction
-	Filters  []FilterFunction
-
-	// cached values for dispatching
-	relativePath string
-	pathParts    []string
-	pathExpr     *pathExpression // cached compilation of relativePath as RegExp
-
-	// documentation
-	Doc                     string
-	Notes                   string
-	Operation               string
-	ParameterDocs           []*Parameter
-	ResponseErrors          map[int]ResponseError
-	ReadSample, WriteSample interface{} // structs that model an example request or response payload
-}
-
-// Initialize for Route
-func (r *Route) postBuild() {
-	r.pathParts = tokenizePath(r.Path)
-}
-
-// Create Request and Response from their http versions
-func (r *Route) wrapRequestResponse(httpWriter http.ResponseWriter, httpRequest *http.Request) (*Request, *Response) {
-	params := r.extractParameters(httpRequest.URL.Path)
-	wrappedRequest := NewRequest(httpRequest)
-	wrappedRequest.pathParameters = params
-	wrappedRequest.selectedRoutePath = r.Path
-	wrappedResponse := NewResponse(httpWriter)
-	wrappedResponse.requestAccept = httpRequest.Header.Get(HEADER_Accept)
-	wrappedResponse.routeProduces = r.Produces
-	return wrappedRequest, wrappedResponse
-}
-
-// dispatchWithFilters call the function after passing through its own filters
-func (r *Route) dispatchWithFilters(wrappedRequest *Request, wrappedResponse *Response) {
-	if len(r.Filters) > 0 {
-		chain := FilterChain{Filters: r.Filters, Target: r.Function}
-		chain.ProcessFilter(wrappedRequest, wrappedResponse)
-	} else {
-		// unfiltered
-		r.Function(wrappedRequest, wrappedResponse)
-	}
-}
-
-// Return whether the mimeType matches to what this Route can produce.
-func (r Route) matchesAccept(mimeTypesWithQuality string) bool {
-	parts := strings.Split(mimeTypesWithQuality, ",")
-	for _, each := range parts {
-		var withoutQuality string
-		if strings.Contains(each, ";") {
-			withoutQuality = strings.Split(each, ";")[0]
-		} else {
-			withoutQuality = each
-		}
-		// trim before compare
-		withoutQuality = strings.Trim(withoutQuality, " ")
-		if withoutQuality == "*/*" {
-			return true
-		}
-		for _, producibleType := range r.Produces {
-			if producibleType == "*/*" || producibleType == withoutQuality {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-// Return whether this Route can consume content with a type specified by mimeTypes (can be empty).
-func (r Route) matchesContentType(mimeTypes string) bool {
-
-	if len(r.Consumes) == 0 {
-		// did not specify what it can consume ;  any media type (“*/*”) is assumed
-		return true
-	}
-
-	if len(mimeTypes) == 0 {
-		// idempotent methods with (most-likely or garanteed) empty content match missing Content-Type
-		m := r.Method
-		if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" {
-			return true
-		}
-		// proceed with default
-		mimeTypes = MIME_OCTET
-	}
-
-	parts := strings.Split(mimeTypes, ",")
-	for _, each := range parts {
-		var contentType string
-		if strings.Contains(each, ";") {
-			contentType = strings.Split(each, ";")[0]
-		} else {
-			contentType = each
-		}
-		// trim before compare
-		contentType = strings.Trim(contentType, " ")
-		for _, consumeableType := range r.Consumes {
-			if consumeableType == "*/*" || consumeableType == contentType {
-				return true
-			}
-		}
-	}
-	return false
-}
-
-// Extract the parameters from the request url path
-func (r Route) extractParameters(urlPath string) map[string]string {
-	urlParts := tokenizePath(urlPath)
-	pathParameters := map[string]string{}
-	for i, key := range r.pathParts {
-		var value string
-		if i >= len(urlParts) {
-			value = ""
-		} else {
-			value = urlParts[i]
-		}
-		if strings.HasPrefix(key, "{") { // path-parameter
-			if colon := strings.Index(key, ":"); colon != -1 {
-				// extract by regex
-				regPart := key[colon+1 : len(key)-1]
-				keyPart := key[1:colon]
-				if regPart == "*" {
-					pathParameters[keyPart] = untokenizePath(i, urlParts)
-					break
-				} else {
-					pathParameters[keyPart] = value
-				}
-			} else {
-				// without enclosing {}
-				pathParameters[key[1:len(key)-1]] = value
-			}
-		}
-	}
-	return pathParameters
-}
-
-// Untokenize back into an URL path using the slash separator
-func untokenizePath(offset int, parts []string) string {
-	var buffer bytes.Buffer
-	for p := offset; p < len(parts); p++ {
-		buffer.WriteString(parts[p])
-		// do not end
-		if p < len(parts)-1 {
-			buffer.WriteString("/")
-		}
-	}
-	return buffer.String()
-}
-
-// Tokenize an URL path using the slash separator ; the result does not have empty tokens
-func tokenizePath(path string) []string {
-	if "/" == path {
-		return []string{}
-	}
-	return strings.Split(strings.Trim(path, "/"), "/")
-}
-
-// for debugging
-func (r Route) String() string {
-	return r.Method + " " + r.Path
-}

+ 0 - 240
vendor/github.com/emicklei/go-restful/route_builder.go

@@ -1,240 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"os"
-	"reflect"
-	"runtime"
-	"strings"
-
-	"github.com/emicklei/go-restful/log"
-)
-
-// RouteBuilder is a helper to construct Routes.
-type RouteBuilder struct {
-	rootPath    string
-	currentPath string
-	produces    []string
-	consumes    []string
-	httpMethod  string        // required
-	function    RouteFunction // required
-	filters     []FilterFunction
-	// documentation
-	doc                     string
-	notes                   string
-	operation               string
-	readSample, writeSample interface{}
-	parameters              []*Parameter
-	errorMap                map[int]ResponseError
-}
-
-// Do evaluates each argument with the RouteBuilder itself.
-// This allows you to follow DRY principles without breaking the fluent programming style.
-// Example:
-// 		ws.Route(ws.DELETE("/{name}").To(t.deletePerson).Do(Returns200, Returns500))
-//
-//		func Returns500(b *RouteBuilder) {
-//			b.Returns(500, "Internal Server Error", restful.ServiceError{})
-//		}
-func (b *RouteBuilder) Do(oneArgBlocks ...func(*RouteBuilder)) *RouteBuilder {
-	for _, each := range oneArgBlocks {
-		each(b)
-	}
-	return b
-}
-
-// To bind the route to a function.
-// If this route is matched with the incoming Http Request then call this function with the *Request,*Response pair. Required.
-func (b *RouteBuilder) To(function RouteFunction) *RouteBuilder {
-	b.function = function
-	return b
-}
-
-// Method specifies what HTTP method to match. Required.
-func (b *RouteBuilder) Method(method string) *RouteBuilder {
-	b.httpMethod = method
-	return b
-}
-
-// Produces specifies what MIME types can be produced ; the matched one will appear in the Content-Type Http header.
-func (b *RouteBuilder) Produces(mimeTypes ...string) *RouteBuilder {
-	b.produces = mimeTypes
-	return b
-}
-
-// Consumes specifies what MIME types can be consumes ; the Accept Http header must matched any of these
-func (b *RouteBuilder) Consumes(mimeTypes ...string) *RouteBuilder {
-	b.consumes = mimeTypes
-	return b
-}
-
-// Path specifies the relative (w.r.t WebService root path) URL path to match. Default is "/".
-func (b *RouteBuilder) Path(subPath string) *RouteBuilder {
-	b.currentPath = subPath
-	return b
-}
-
-// Doc tells what this route is all about. Optional.
-func (b *RouteBuilder) Doc(documentation string) *RouteBuilder {
-	b.doc = documentation
-	return b
-}
-
-// A verbose explanation of the operation behavior. Optional.
-func (b *RouteBuilder) Notes(notes string) *RouteBuilder {
-	b.notes = notes
-	return b
-}
-
-// Reads tells what resource type will be read from the request payload. Optional.
-// A parameter of type "body" is added ,required is set to true and the dataType is set to the qualified name of the sample's type.
-func (b *RouteBuilder) Reads(sample interface{}) *RouteBuilder {
-	b.readSample = sample
-	typeAsName := reflect.TypeOf(sample).String()
-	bodyParameter := &Parameter{&ParameterData{Name: "body"}}
-	bodyParameter.beBody()
-	bodyParameter.Required(true)
-	bodyParameter.DataType(typeAsName)
-	b.Param(bodyParameter)
-	return b
-}
-
-// ParameterNamed returns a Parameter already known to the RouteBuilder. Returns nil if not.
-// Use this to modify or extend information for the Parameter (through its Data()).
-func (b RouteBuilder) ParameterNamed(name string) (p *Parameter) {
-	for _, each := range b.parameters {
-		if each.Data().Name == name {
-			return each
-		}
-	}
-	return p
-}
-
-// Writes tells what resource type will be written as the response payload. Optional.
-func (b *RouteBuilder) Writes(sample interface{}) *RouteBuilder {
-	b.writeSample = sample
-	return b
-}
-
-// Param allows you to document the parameters of the Route. It adds a new Parameter (does not check for duplicates).
-func (b *RouteBuilder) Param(parameter *Parameter) *RouteBuilder {
-	if b.parameters == nil {
-		b.parameters = []*Parameter{}
-	}
-	b.parameters = append(b.parameters, parameter)
-	return b
-}
-
-// Operation allows you to document what the actual method/function call is of the Route.
-// Unless called, the operation name is derived from the RouteFunction set using To(..).
-func (b *RouteBuilder) Operation(name string) *RouteBuilder {
-	b.operation = name
-	return b
-}
-
-// ReturnsError is deprecated, use Returns instead.
-func (b *RouteBuilder) ReturnsError(code int, message string, model interface{}) *RouteBuilder {
-	log.Print("ReturnsError is deprecated, use Returns instead.")
-	return b.Returns(code, message, model)
-}
-
-// Returns allows you to document what responses (errors or regular) can be expected.
-// The model parameter is optional ; either pass a struct instance or use nil if not applicable.
-func (b *RouteBuilder) Returns(code int, message string, model interface{}) *RouteBuilder {
-	err := ResponseError{
-		Code:    code,
-		Message: message,
-		Model:   model,
-	}
-	// lazy init because there is no NewRouteBuilder (yet)
-	if b.errorMap == nil {
-		b.errorMap = map[int]ResponseError{}
-	}
-	b.errorMap[code] = err
-	return b
-}
-
-type ResponseError struct {
-	Code    int
-	Message string
-	Model   interface{}
-}
-
-func (b *RouteBuilder) servicePath(path string) *RouteBuilder {
-	b.rootPath = path
-	return b
-}
-
-// Filter appends a FilterFunction to the end of filters for this Route to build.
-func (b *RouteBuilder) Filter(filter FilterFunction) *RouteBuilder {
-	b.filters = append(b.filters, filter)
-	return b
-}
-
-// If no specific Route path then set to rootPath
-// If no specific Produces then set to rootProduces
-// If no specific Consumes then set to rootConsumes
-func (b *RouteBuilder) copyDefaults(rootProduces, rootConsumes []string) {
-	if len(b.produces) == 0 {
-		b.produces = rootProduces
-	}
-	if len(b.consumes) == 0 {
-		b.consumes = rootConsumes
-	}
-}
-
-// Build creates a new Route using the specification details collected by the RouteBuilder
-func (b *RouteBuilder) Build() Route {
-	pathExpr, err := newPathExpression(b.currentPath)
-	if err != nil {
-		log.Printf("[restful] Invalid path:%s because:%v", b.currentPath, err)
-		os.Exit(1)
-	}
-	if b.function == nil {
-		log.Printf("[restful] No function specified for route:" + b.currentPath)
-		os.Exit(1)
-	}
-	operationName := b.operation
-	if len(operationName) == 0 && b.function != nil {
-		// extract from definition
-		operationName = nameOfFunction(b.function)
-	}
-	route := Route{
-		Method:         b.httpMethod,
-		Path:           concatPath(b.rootPath, b.currentPath),
-		Produces:       b.produces,
-		Consumes:       b.consumes,
-		Function:       b.function,
-		Filters:        b.filters,
-		relativePath:   b.currentPath,
-		pathExpr:       pathExpr,
-		Doc:            b.doc,
-		Notes:          b.notes,
-		Operation:      operationName,
-		ParameterDocs:  b.parameters,
-		ResponseErrors: b.errorMap,
-		ReadSample:     b.readSample,
-		WriteSample:    b.writeSample}
-	route.postBuild()
-	return route
-}
-
-func concatPath(path1, path2 string) string {
-	return strings.TrimRight(path1, "/") + "/" + strings.TrimLeft(path2, "/")
-}
-
-// nameOfFunction returns the short name of the function f for documentation.
-// It uses a runtime feature for debugging ; its value may change for later Go versions.
-func nameOfFunction(f interface{}) string {
-	fun := runtime.FuncForPC(reflect.ValueOf(f).Pointer())
-	tokenized := strings.Split(fun.Name(), ".")
-	last := tokenized[len(tokenized)-1]
-	last = strings.TrimSuffix(last, ")·fm") // < Go 1.5
-	last = strings.TrimSuffix(last, ")-fm") // Go 1.5
-	last = strings.TrimSuffix(last, "·fm")  // < Go 1.5
-	last = strings.TrimSuffix(last, "-fm")  // Go 1.5
-	return last
-}

+ 0 - 18
vendor/github.com/emicklei/go-restful/router.go

@@ -1,18 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import "net/http"
-
-// A RouteSelector finds the best matching Route given the input HTTP Request
-type RouteSelector interface {
-
-	// SelectRoute finds a Route given the input HTTP Request and a list of WebServices.
-	// It returns a selected Route and its containing WebService or an error indicating
-	// a problem.
-	SelectRoute(
-		webServices []*WebService,
-		httpRequest *http.Request) (selectedService *WebService, selected *Route, err error)
-}

+ 0 - 23
vendor/github.com/emicklei/go-restful/service_error.go

@@ -1,23 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import "fmt"
-
-// ServiceError is a transport object to pass information about a non-Http error occurred in a WebService while processing a request.
-type ServiceError struct {
-	Code    int
-	Message string
-}
-
-// NewError returns a ServiceError using the code and reason
-func NewError(code int, message string) ServiceError {
-	return ServiceError{Code: code, Message: message}
-}
-
-// Error returns a text representation of the service error
-func (s ServiceError) Error() string {
-	return fmt.Sprintf("[ServiceError:%v] %v", s.Code, s.Message)
-}

+ 0 - 43
vendor/github.com/emicklei/go-restful/swagger/CHANGES.md

@@ -1,43 +0,0 @@
-Change history of swagger
-=
-2015-10-16
-- add type override mechanism for swagger models (MR 254, nathanejohnson)
-- replace uses of wildcard in generated apidocs (issue 251)
-
-2015-05-25
-- (api break) changed the type of Properties in Model
-- (api break) changed the type of Models in ApiDeclaration
-- (api break) changed the parameter type of PostBuildDeclarationMapFunc
-
-2015-04-09
-- add ModelBuildable interface for customization of Model
-
-2015-03-17
-- preserve order of Routes per WebService in Swagger listing
-- fix use of $ref and type in Swagger models
-- add api version to listing
-
-2014-11-14
-- operation parameters are now sorted using ordering path,query,form,header,body
-
-2014-11-12
-- respect omitempty tag value for embedded structs
-- expose ApiVersion of WebService to Swagger ApiDeclaration
-
-2014-05-29
-- (api add) Ability to define custom http.Handler to serve swagger-ui static files
-
-2014-05-04
-- (fix) include model for array element type of response
-
-2014-01-03
-- (fix) do not add primitive type to the Api models
-
-2013-11-27
-- (fix) make Swagger work for WebServices with root ("/" or "") paths
-
-2013-10-29
-- (api add) package variable LogInfo to customize logging function
-
-2013-10-15
-- upgraded to spec version 1.2 (https://github.com/wordnik/swagger-core/wiki/1.2-transition)

+ 0 - 76
vendor/github.com/emicklei/go-restful/swagger/README.md

@@ -1,76 +0,0 @@
-How to use Swagger UI with go-restful
-=
-
-Get the Swagger UI sources (version 1.2 only)
-
-	git clone https://github.com/wordnik/swagger-ui.git
-	
-The project contains a "dist" folder.
-Its contents has all the Swagger UI files you need.
-
-The `index.html` has an `url` set to `http://petstore.swagger.wordnik.com/api/api-docs`.
-You need to change that to match your WebService JSON endpoint  e.g. `http://localhost:8080/apidocs.json`
-
-Now, you can install the Swagger WebService for serving the Swagger specification in JSON.
-
-	config := swagger.Config{
-		WebServices:    restful.RegisteredWebServices(),
-		ApiPath:        "/apidocs.json",
-		SwaggerPath:     "/apidocs/",
-		SwaggerFilePath: "/Users/emicklei/Projects/swagger-ui/dist"}
-	swagger.InstallSwaggerService(config)		
-	
-	
-Documenting Structs
---
-
-Currently there are 2 ways to document your structs in the go-restful Swagger.
-
-###### By using struct tags
-- Use tag "description" to annotate a struct field with a description to show in the UI
-- Use tag "modelDescription" to annotate the struct itself with a description to show in the UI. The tag can be added in an field of the struct and in case that there are multiple definition, they will be appended with an empty line.
-
-###### By using the SwaggerDoc method
-Here is an example with an `Address` struct and the documentation for each of the fields. The `""` is a special entry for **documenting the struct itself**.
-
-	type Address struct {
-		Country  string `json:"country,omitempty"`
-		PostCode int    `json:"postcode,omitempty"`
-	}
-
-	func (Address) SwaggerDoc() map[string]string {
-		return map[string]string{
-			"":         "Address doc",
-			"country":  "Country doc",
-			"postcode": "PostCode doc",
-		}
-	}
-
-This example will generate a JSON like this
-
-	{
-		"Address": {
-			"id": "Address",
-			"description": "Address doc",
-			"properties": {
-				"country": {
-				"type": "string",
-				"description": "Country doc"
-				},
-				"postcode": {
-				"type": "integer",
-				"format": "int32",
-				"description": "PostCode doc"
-				}
-			}
-		}
-	}
-
-**Very Important Notes:**
-- `SwaggerDoc()` is using a **NON-Pointer** receiver (e.g. func (Address) and not func (*Address))
-- The returned map should use as key the name of the field as defined in the JSON parameter (e.g. `"postcode"` and not `"PostCode"`)
-
-Notes
---
-- The Nickname of an Operation is automatically set by finding the name of the function. You can override it using RouteBuilder.Operation(..) 
-- The WebServices field of swagger.Config can be used to control which service you want to expose and document ; you can have multiple configs and therefore multiple endpoints.

+ 0 - 64
vendor/github.com/emicklei/go-restful/swagger/api_declaration_list.go

@@ -1,64 +0,0 @@
-package swagger
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"encoding/json"
-)
-
-// ApiDeclarationList maintains an ordered list of ApiDeclaration.
-type ApiDeclarationList struct {
-	List []ApiDeclaration
-}
-
-// At returns the ApiDeclaration by its path unless absent, then ok is false
-func (l *ApiDeclarationList) At(path string) (a ApiDeclaration, ok bool) {
-	for _, each := range l.List {
-		if each.ResourcePath == path {
-			return each, true
-		}
-	}
-	return a, false
-}
-
-// Put adds or replaces a ApiDeclaration with this name
-func (l *ApiDeclarationList) Put(path string, a ApiDeclaration) {
-	// maybe replace existing
-	for i, each := range l.List {
-		if each.ResourcePath == path {
-			// replace
-			l.List[i] = a
-			return
-		}
-	}
-	// add
-	l.List = append(l.List, a)
-}
-
-// Do enumerates all the properties, each with its assigned name
-func (l *ApiDeclarationList) Do(block func(path string, decl ApiDeclaration)) {
-	for _, each := range l.List {
-		block(each.ResourcePath, each)
-	}
-}
-
-// MarshalJSON writes the ModelPropertyList as if it was a map[string]ModelProperty
-func (l ApiDeclarationList) MarshalJSON() ([]byte, error) {
-	var buf bytes.Buffer
-	encoder := json.NewEncoder(&buf)
-	buf.WriteString("{\n")
-	for i, each := range l.List {
-		buf.WriteString("\"")
-		buf.WriteString(each.ResourcePath)
-		buf.WriteString("\": ")
-		encoder.Encode(each)
-		if i < len(l.List)-1 {
-			buf.WriteString(",\n")
-		}
-	}
-	buf.WriteString("}")
-	return buf.Bytes(), nil
-}

+ 0 - 46
vendor/github.com/emicklei/go-restful/swagger/config.go

@@ -1,46 +0,0 @@
-package swagger
-
-import (
-	"net/http"
-	"reflect"
-
-	"github.com/emicklei/go-restful"
-)
-
-// PostBuildDeclarationMapFunc can be used to modify the api declaration map.
-type PostBuildDeclarationMapFunc func(apiDeclarationMap *ApiDeclarationList)
-
-// MapSchemaFormatFunc can be used to modify typeName at definition time.
-type MapSchemaFormatFunc func(typeName string) string
-
-// MapModelTypeNameFunc can be used to return the desired typeName for a given
-// type. It will return false if the default name should be used.
-type MapModelTypeNameFunc func(t reflect.Type) (string, bool)
-
-type Config struct {
-	// url where the services are available, e.g. http://localhost:8080
-	// if left empty then the basePath of Swagger is taken from the actual request
-	WebServicesUrl string
-	// path where the JSON api is avaiable , e.g. /apidocs
-	ApiPath string
-	// [optional] path where the swagger UI will be served, e.g. /swagger
-	SwaggerPath string
-	// [optional] location of folder containing Swagger HTML5 application index.html
-	SwaggerFilePath string
-	// api listing is constructed from this list of restful WebServices.
-	WebServices []*restful.WebService
-	// will serve all static content (scripts,pages,images)
-	StaticHandler http.Handler
-	// [optional] on default CORS (Cross-Origin-Resource-Sharing) is enabled.
-	DisableCORS bool
-	// Top-level API version. Is reflected in the resource listing.
-	ApiVersion string
-	// If set then call this handler after building the complete ApiDeclaration Map
-	PostBuildHandler PostBuildDeclarationMapFunc
-	// Swagger global info struct
-	Info Info
-	// [optional] If set, model builder should call this handler to get addition typename-to-swagger-format-field conversion.
-	SchemaFormatHandler MapSchemaFormatFunc
-	// [optional] If set, model builder should call this handler to retrieve the name for a given type.
-	ModelTypeNameHandler MapModelTypeNameFunc
-}

+ 0 - 467
vendor/github.com/emicklei/go-restful/swagger/model_builder.go

@@ -1,467 +0,0 @@
-package swagger
-
-import (
-	"encoding/json"
-	"reflect"
-	"strings"
-)
-
-// ModelBuildable is used for extending Structs that need more control over
-// how the Model appears in the Swagger api declaration.
-type ModelBuildable interface {
-	PostBuildModel(m *Model) *Model
-}
-
-type modelBuilder struct {
-	Models *ModelList
-	Config *Config
-}
-
-type documentable interface {
-	SwaggerDoc() map[string]string
-}
-
-// Check if this structure has a method with signature func (<theModel>) SwaggerDoc() map[string]string
-// If it exists, retrive the documentation and overwrite all struct tag descriptions
-func getDocFromMethodSwaggerDoc2(model reflect.Type) map[string]string {
-	if docable, ok := reflect.New(model).Elem().Interface().(documentable); ok {
-		return docable.SwaggerDoc()
-	}
-	return make(map[string]string)
-}
-
-// addModelFrom creates and adds a Model to the builder and detects and calls
-// the post build hook for customizations
-func (b modelBuilder) addModelFrom(sample interface{}) {
-	if modelOrNil := b.addModel(reflect.TypeOf(sample), ""); modelOrNil != nil {
-		// allow customizations
-		if buildable, ok := sample.(ModelBuildable); ok {
-			modelOrNil = buildable.PostBuildModel(modelOrNil)
-			b.Models.Put(modelOrNil.Id, *modelOrNil)
-		}
-	}
-}
-
-func (b modelBuilder) addModel(st reflect.Type, nameOverride string) *Model {
-	// Turn pointers into simpler types so further checks are
-	// correct.
-	if st.Kind() == reflect.Ptr {
-		st = st.Elem()
-	}
-
-	modelName := b.keyFrom(st)
-	if nameOverride != "" {
-		modelName = nameOverride
-	}
-	// no models needed for primitive types
-	if b.isPrimitiveType(modelName) {
-		return nil
-	}
-	// golang encoding/json packages says array and slice values encode as
-	// JSON arrays, except that []byte encodes as a base64-encoded string.
-	// If we see a []byte here, treat it at as a primitive type (string)
-	// and deal with it in buildArrayTypeProperty.
-	if (st.Kind() == reflect.Slice || st.Kind() == reflect.Array) &&
-		st.Elem().Kind() == reflect.Uint8 {
-		return nil
-	}
-	// see if we already have visited this model
-	if _, ok := b.Models.At(modelName); ok {
-		return nil
-	}
-	sm := Model{
-		Id:         modelName,
-		Required:   []string{},
-		Properties: ModelPropertyList{}}
-
-	// reference the model before further initializing (enables recursive structs)
-	b.Models.Put(modelName, sm)
-
-	// check for slice or array
-	if st.Kind() == reflect.Slice || st.Kind() == reflect.Array {
-		b.addModel(st.Elem(), "")
-		return &sm
-	}
-	// check for structure or primitive type
-	if st.Kind() != reflect.Struct {
-		return &sm
-	}
-
-	fullDoc := getDocFromMethodSwaggerDoc2(st)
-	modelDescriptions := []string{}
-
-	for i := 0; i < st.NumField(); i++ {
-		field := st.Field(i)
-		jsonName, modelDescription, prop := b.buildProperty(field, &sm, modelName)
-		if len(modelDescription) > 0 {
-			modelDescriptions = append(modelDescriptions, modelDescription)
-		}
-
-		// add if not omitted
-		if len(jsonName) != 0 {
-			// update description
-			if fieldDoc, ok := fullDoc[jsonName]; ok {
-				prop.Description = fieldDoc
-			}
-			// update Required
-			if b.isPropertyRequired(field) {
-				sm.Required = append(sm.Required, jsonName)
-			}
-			sm.Properties.Put(jsonName, prop)
-		}
-	}
-
-	// We always overwrite documentation if SwaggerDoc method exists
-	// "" is special for documenting the struct itself
-	if modelDoc, ok := fullDoc[""]; ok {
-		sm.Description = modelDoc
-	} else if len(modelDescriptions) != 0 {
-		sm.Description = strings.Join(modelDescriptions, "\n")
-	}
-
-	// update model builder with completed model
-	b.Models.Put(modelName, sm)
-
-	return &sm
-}
-
-func (b modelBuilder) isPropertyRequired(field reflect.StructField) bool {
-	required := true
-	if jsonTag := field.Tag.Get("json"); jsonTag != "" {
-		s := strings.Split(jsonTag, ",")
-		if len(s) > 1 && s[1] == "omitempty" {
-			return false
-		}
-	}
-	return required
-}
-
-func (b modelBuilder) buildProperty(field reflect.StructField, model *Model, modelName string) (jsonName, modelDescription string, prop ModelProperty) {
-	jsonName = b.jsonNameOfField(field)
-	if len(jsonName) == 0 {
-		// empty name signals skip property
-		return "", "", prop
-	}
-
-	if field.Name == "XMLName" && field.Type.String() == "xml.Name" {
-		// property is metadata for the xml.Name attribute, can be skipped
-		return "", "", prop
-	}
-
-	if tag := field.Tag.Get("modelDescription"); tag != "" {
-		modelDescription = tag
-	}
-
-	prop.setPropertyMetadata(field)
-	if prop.Type != nil {
-		return jsonName, modelDescription, prop
-	}
-	fieldType := field.Type
-
-	// check if type is doing its own marshalling
-	marshalerType := reflect.TypeOf((*json.Marshaler)(nil)).Elem()
-	if fieldType.Implements(marshalerType) {
-		var pType = "string"
-		if prop.Type == nil {
-			prop.Type = &pType
-		}
-		if prop.Format == "" {
-			prop.Format = b.jsonSchemaFormat(b.keyFrom(fieldType))
-		}
-		return jsonName, modelDescription, prop
-	}
-
-	// check if annotation says it is a string
-	if jsonTag := field.Tag.Get("json"); jsonTag != "" {
-		s := strings.Split(jsonTag, ",")
-		if len(s) > 1 && s[1] == "string" {
-			stringt := "string"
-			prop.Type = &stringt
-			return jsonName, modelDescription, prop
-		}
-	}
-
-	fieldKind := fieldType.Kind()
-	switch {
-	case fieldKind == reflect.Struct:
-		jsonName, prop := b.buildStructTypeProperty(field, jsonName, model)
-		return jsonName, modelDescription, prop
-	case fieldKind == reflect.Slice || fieldKind == reflect.Array:
-		jsonName, prop := b.buildArrayTypeProperty(field, jsonName, modelName)
-		return jsonName, modelDescription, prop
-	case fieldKind == reflect.Ptr:
-		jsonName, prop := b.buildPointerTypeProperty(field, jsonName, modelName)
-		return jsonName, modelDescription, prop
-	case fieldKind == reflect.String:
-		stringt := "string"
-		prop.Type = &stringt
-		return jsonName, modelDescription, prop
-	case fieldKind == reflect.Map:
-		// if it's a map, it's unstructured, and swagger 1.2 can't handle it
-		objectType := "object"
-		prop.Type = &objectType
-		return jsonName, modelDescription, prop
-	}
-
-	fieldTypeName := b.keyFrom(fieldType)
-	if b.isPrimitiveType(fieldTypeName) {
-		mapped := b.jsonSchemaType(fieldTypeName)
-		prop.Type = &mapped
-		prop.Format = b.jsonSchemaFormat(fieldTypeName)
-		return jsonName, modelDescription, prop
-	}
-	modelType := b.keyFrom(fieldType)
-	prop.Ref = &modelType
-
-	if fieldType.Name() == "" { // override type of anonymous structs
-		nestedTypeName := modelName + "." + jsonName
-		prop.Ref = &nestedTypeName
-		b.addModel(fieldType, nestedTypeName)
-	}
-	return jsonName, modelDescription, prop
-}
-
-func hasNamedJSONTag(field reflect.StructField) bool {
-	parts := strings.Split(field.Tag.Get("json"), ",")
-	if len(parts) == 0 {
-		return false
-	}
-	for _, s := range parts[1:] {
-		if s == "inline" {
-			return false
-		}
-	}
-	return len(parts[0]) > 0
-}
-
-func (b modelBuilder) buildStructTypeProperty(field reflect.StructField, jsonName string, model *Model) (nameJson string, prop ModelProperty) {
-	prop.setPropertyMetadata(field)
-	// Check for type override in tag
-	if prop.Type != nil {
-		return jsonName, prop
-	}
-	fieldType := field.Type
-	// check for anonymous
-	if len(fieldType.Name()) == 0 {
-		// anonymous
-		anonType := model.Id + "." + jsonName
-		b.addModel(fieldType, anonType)
-		prop.Ref = &anonType
-		return jsonName, prop
-	}
-
-	if field.Name == fieldType.Name() && field.Anonymous && !hasNamedJSONTag(field) {
-		// embedded struct
-		sub := modelBuilder{new(ModelList), b.Config}
-		sub.addModel(fieldType, "")
-		subKey := sub.keyFrom(fieldType)
-		// merge properties from sub
-		subModel, _ := sub.Models.At(subKey)
-		subModel.Properties.Do(func(k string, v ModelProperty) {
-			model.Properties.Put(k, v)
-			// if subModel says this property is required then include it
-			required := false
-			for _, each := range subModel.Required {
-				if k == each {
-					required = true
-					break
-				}
-			}
-			if required {
-				model.Required = append(model.Required, k)
-			}
-		})
-		// add all new referenced models
-		sub.Models.Do(func(key string, sub Model) {
-			if key != subKey {
-				if _, ok := b.Models.At(key); !ok {
-					b.Models.Put(key, sub)
-				}
-			}
-		})
-		// empty name signals skip property
-		return "", prop
-	}
-	// simple struct
-	b.addModel(fieldType, "")
-	var pType = b.keyFrom(fieldType)
-	prop.Ref = &pType
-	return jsonName, prop
-}
-
-func (b modelBuilder) buildArrayTypeProperty(field reflect.StructField, jsonName, modelName string) (nameJson string, prop ModelProperty) {
-	// check for type override in tags
-	prop.setPropertyMetadata(field)
-	if prop.Type != nil {
-		return jsonName, prop
-	}
-	fieldType := field.Type
-	if fieldType.Elem().Kind() == reflect.Uint8 {
-		stringt := "string"
-		prop.Type = &stringt
-		return jsonName, prop
-	}
-	var pType = "array"
-	prop.Type = &pType
-	isPrimitive := b.isPrimitiveType(fieldType.Elem().Name())
-	elemTypeName := b.getElementTypeName(modelName, jsonName, fieldType.Elem())
-	prop.Items = new(Item)
-	if isPrimitive {
-		mapped := b.jsonSchemaType(elemTypeName)
-		prop.Items.Type = &mapped
-	} else {
-		prop.Items.Ref = &elemTypeName
-	}
-	// add|overwrite model for element type
-	if fieldType.Elem().Kind() == reflect.Ptr {
-		fieldType = fieldType.Elem()
-	}
-	if !isPrimitive {
-		b.addModel(fieldType.Elem(), elemTypeName)
-	}
-	return jsonName, prop
-}
-
-func (b modelBuilder) buildPointerTypeProperty(field reflect.StructField, jsonName, modelName string) (nameJson string, prop ModelProperty) {
-	prop.setPropertyMetadata(field)
-	// Check for type override in tags
-	if prop.Type != nil {
-		return jsonName, prop
-	}
-	fieldType := field.Type
-
-	// override type of pointer to list-likes
-	if fieldType.Elem().Kind() == reflect.Slice || fieldType.Elem().Kind() == reflect.Array {
-		var pType = "array"
-		prop.Type = &pType
-		isPrimitive := b.isPrimitiveType(fieldType.Elem().Elem().Name())
-		elemName := b.getElementTypeName(modelName, jsonName, fieldType.Elem().Elem())
-		if isPrimitive {
-			primName := b.jsonSchemaType(elemName)
-			prop.Items = &Item{Ref: &primName}
-		} else {
-			prop.Items = &Item{Ref: &elemName}
-		}
-		if !isPrimitive {
-			// add|overwrite model for element type
-			b.addModel(fieldType.Elem().Elem(), elemName)
-		}
-	} else {
-		// non-array, pointer type
-		fieldTypeName := b.keyFrom(fieldType.Elem())
-		var pType = b.jsonSchemaType(fieldTypeName) // no star, include pkg path
-		if b.isPrimitiveType(fieldTypeName) {
-			prop.Type = &pType
-			prop.Format = b.jsonSchemaFormat(fieldTypeName)
-			return jsonName, prop
-		}
-		prop.Ref = &pType
-		elemName := ""
-		if fieldType.Elem().Name() == "" {
-			elemName = modelName + "." + jsonName
-			prop.Ref = &elemName
-		}
-		b.addModel(fieldType.Elem(), elemName)
-	}
-	return jsonName, prop
-}
-
-func (b modelBuilder) getElementTypeName(modelName, jsonName string, t reflect.Type) string {
-	if t.Kind() == reflect.Ptr {
-		t = t.Elem()
-	}
-	if t.Name() == "" {
-		return modelName + "." + jsonName
-	}
-	return b.keyFrom(t)
-}
-
-func (b modelBuilder) keyFrom(st reflect.Type) string {
-	key := st.String()
-	if b.Config != nil && b.Config.ModelTypeNameHandler != nil {
-		if name, ok := b.Config.ModelTypeNameHandler(st); ok {
-			key = name
-		}
-	}
-	if len(st.Name()) == 0 { // unnamed type
-		// Swagger UI has special meaning for [
-		key = strings.Replace(key, "[]", "||", -1)
-	}
-	return key
-}
-
-// see also https://golang.org/ref/spec#Numeric_types
-func (b modelBuilder) isPrimitiveType(modelName string) bool {
-	if len(modelName) == 0 {
-		return false
-	}
-	return strings.Contains("uint uint8 uint16 uint32 uint64 int int8 int16 int32 int64 float32 float64 bool string byte rune time.Time", modelName)
-}
-
-// jsonNameOfField returns the name of the field as it should appear in JSON format
-// An empty string indicates that this field is not part of the JSON representation
-func (b modelBuilder) jsonNameOfField(field reflect.StructField) string {
-	if jsonTag := field.Tag.Get("json"); jsonTag != "" {
-		s := strings.Split(jsonTag, ",")
-		if s[0] == "-" {
-			// empty name signals skip property
-			return ""
-		} else if s[0] != "" {
-			return s[0]
-		}
-	}
-	return field.Name
-}
-
-// see also http://json-schema.org/latest/json-schema-core.html#anchor8
-func (b modelBuilder) jsonSchemaType(modelName string) string {
-	schemaMap := map[string]string{
-		"uint":   "integer",
-		"uint8":  "integer",
-		"uint16": "integer",
-		"uint32": "integer",
-		"uint64": "integer",
-
-		"int":   "integer",
-		"int8":  "integer",
-		"int16": "integer",
-		"int32": "integer",
-		"int64": "integer",
-
-		"byte":      "integer",
-		"float64":   "number",
-		"float32":   "number",
-		"bool":      "boolean",
-		"time.Time": "string",
-	}
-	mapped, ok := schemaMap[modelName]
-	if !ok {
-		return modelName // use as is (custom or struct)
-	}
-	return mapped
-}
-
-func (b modelBuilder) jsonSchemaFormat(modelName string) string {
-	if b.Config != nil && b.Config.SchemaFormatHandler != nil {
-		if mapped := b.Config.SchemaFormatHandler(modelName); mapped != "" {
-			return mapped
-		}
-	}
-	schemaMap := map[string]string{
-		"int":        "int32",
-		"int32":      "int32",
-		"int64":      "int64",
-		"byte":       "byte",
-		"uint":       "integer",
-		"uint8":      "byte",
-		"float64":    "double",
-		"float32":    "float",
-		"time.Time":  "date-time",
-		"*time.Time": "date-time",
-	}
-	mapped, ok := schemaMap[modelName]
-	if !ok {
-		return "" // no format
-	}
-	return mapped
-}

+ 0 - 86
vendor/github.com/emicklei/go-restful/swagger/model_list.go

@@ -1,86 +0,0 @@
-package swagger
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"encoding/json"
-)
-
-// NamedModel associates a name with a Model (not using its Id)
-type NamedModel struct {
-	Name  string
-	Model Model
-}
-
-// ModelList encapsulates a list of NamedModel (association)
-type ModelList struct {
-	List []NamedModel
-}
-
-// Put adds or replaces a Model by its name
-func (l *ModelList) Put(name string, model Model) {
-	for i, each := range l.List {
-		if each.Name == name {
-			// replace
-			l.List[i] = NamedModel{name, model}
-			return
-		}
-	}
-	// add
-	l.List = append(l.List, NamedModel{name, model})
-}
-
-// At returns a Model by its name, ok is false if absent
-func (l *ModelList) At(name string) (m Model, ok bool) {
-	for _, each := range l.List {
-		if each.Name == name {
-			return each.Model, true
-		}
-	}
-	return m, false
-}
-
-// Do enumerates all the models, each with its assigned name
-func (l *ModelList) Do(block func(name string, value Model)) {
-	for _, each := range l.List {
-		block(each.Name, each.Model)
-	}
-}
-
-// MarshalJSON writes the ModelList as if it was a map[string]Model
-func (l ModelList) MarshalJSON() ([]byte, error) {
-	var buf bytes.Buffer
-	encoder := json.NewEncoder(&buf)
-	buf.WriteString("{\n")
-	for i, each := range l.List {
-		buf.WriteString("\"")
-		buf.WriteString(each.Name)
-		buf.WriteString("\": ")
-		encoder.Encode(each.Model)
-		if i < len(l.List)-1 {
-			buf.WriteString(",\n")
-		}
-	}
-	buf.WriteString("}")
-	return buf.Bytes(), nil
-}
-
-// UnmarshalJSON reads back a ModelList. This is an expensive operation.
-func (l *ModelList) UnmarshalJSON(data []byte) error {
-	raw := map[string]interface{}{}
-	json.NewDecoder(bytes.NewReader(data)).Decode(&raw)
-	for k, v := range raw {
-		// produces JSON bytes for each value
-		data, err := json.Marshal(v)
-		if err != nil {
-			return err
-		}
-		var m Model
-		json.NewDecoder(bytes.NewReader(data)).Decode(&m)
-		l.Put(k, m)
-	}
-	return nil
-}

+ 0 - 81
vendor/github.com/emicklei/go-restful/swagger/model_property_ext.go

@@ -1,81 +0,0 @@
-package swagger
-
-import (
-	"reflect"
-	"strings"
-)
-
-func (prop *ModelProperty) setDescription(field reflect.StructField) {
-	if tag := field.Tag.Get("description"); tag != "" {
-		prop.Description = tag
-	}
-}
-
-func (prop *ModelProperty) setDefaultValue(field reflect.StructField) {
-	if tag := field.Tag.Get("default"); tag != "" {
-		prop.DefaultValue = Special(tag)
-	}
-}
-
-func (prop *ModelProperty) setEnumValues(field reflect.StructField) {
-	// We use | to separate the enum values.  This value is chosen
-	// since its unlikely to be useful in actual enumeration values.
-	if tag := field.Tag.Get("enum"); tag != "" {
-		prop.Enum = strings.Split(tag, "|")
-	}
-}
-
-func (prop *ModelProperty) setMaximum(field reflect.StructField) {
-	if tag := field.Tag.Get("maximum"); tag != "" {
-		prop.Maximum = tag
-	}
-}
-
-func (prop *ModelProperty) setType(field reflect.StructField) {
-	if tag := field.Tag.Get("type"); tag != "" {
-		// Check if the first two characters of the type tag are
-		// intended to emulate slice/array behaviour.
-		//
-		// If type is intended to be a slice/array then add the
-		// overriden type to the array item instead of the main property
-		if len(tag) > 2 && tag[0:2] == "[]" {
-			pType := "array"
-			prop.Type = &pType
-			prop.Items = new(Item)
-
-			iType := tag[2:]
-			prop.Items.Type = &iType
-			return
-		}
-
-		prop.Type = &tag
-	}
-}
-
-func (prop *ModelProperty) setMinimum(field reflect.StructField) {
-	if tag := field.Tag.Get("minimum"); tag != "" {
-		prop.Minimum = tag
-	}
-}
-
-func (prop *ModelProperty) setUniqueItems(field reflect.StructField) {
-	tag := field.Tag.Get("unique")
-	switch tag {
-	case "true":
-		v := true
-		prop.UniqueItems = &v
-	case "false":
-		v := false
-		prop.UniqueItems = &v
-	}
-}
-
-func (prop *ModelProperty) setPropertyMetadata(field reflect.StructField) {
-	prop.setDescription(field)
-	prop.setEnumValues(field)
-	prop.setMinimum(field)
-	prop.setMaximum(field)
-	prop.setUniqueItems(field)
-	prop.setDefaultValue(field)
-	prop.setType(field)
-}

+ 0 - 87
vendor/github.com/emicklei/go-restful/swagger/model_property_list.go

@@ -1,87 +0,0 @@
-package swagger
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"bytes"
-	"encoding/json"
-)
-
-// NamedModelProperty associates a name to a ModelProperty
-type NamedModelProperty struct {
-	Name     string
-	Property ModelProperty
-}
-
-// ModelPropertyList encapsulates a list of NamedModelProperty (association)
-type ModelPropertyList struct {
-	List []NamedModelProperty
-}
-
-// At returns the ModelPropety by its name unless absent, then ok is false
-func (l *ModelPropertyList) At(name string) (p ModelProperty, ok bool) {
-	for _, each := range l.List {
-		if each.Name == name {
-			return each.Property, true
-		}
-	}
-	return p, false
-}
-
-// Put adds or replaces a ModelProperty with this name
-func (l *ModelPropertyList) Put(name string, prop ModelProperty) {
-	// maybe replace existing
-	for i, each := range l.List {
-		if each.Name == name {
-			// replace
-			l.List[i] = NamedModelProperty{Name: name, Property: prop}
-			return
-		}
-	}
-	// add
-	l.List = append(l.List, NamedModelProperty{Name: name, Property: prop})
-}
-
-// Do enumerates all the properties, each with its assigned name
-func (l *ModelPropertyList) Do(block func(name string, value ModelProperty)) {
-	for _, each := range l.List {
-		block(each.Name, each.Property)
-	}
-}
-
-// MarshalJSON writes the ModelPropertyList as if it was a map[string]ModelProperty
-func (l ModelPropertyList) MarshalJSON() ([]byte, error) {
-	var buf bytes.Buffer
-	encoder := json.NewEncoder(&buf)
-	buf.WriteString("{\n")
-	for i, each := range l.List {
-		buf.WriteString("\"")
-		buf.WriteString(each.Name)
-		buf.WriteString("\": ")
-		encoder.Encode(each.Property)
-		if i < len(l.List)-1 {
-			buf.WriteString(",\n")
-		}
-	}
-	buf.WriteString("}")
-	return buf.Bytes(), nil
-}
-
-// UnmarshalJSON reads back a ModelPropertyList. This is an expensive operation.
-func (l *ModelPropertyList) UnmarshalJSON(data []byte) error {
-	raw := map[string]interface{}{}
-	json.NewDecoder(bytes.NewReader(data)).Decode(&raw)
-	for k, v := range raw {
-		// produces JSON bytes for each value
-		data, err := json.Marshal(v)
-		if err != nil {
-			return err
-		}
-		var m ModelProperty
-		json.NewDecoder(bytes.NewReader(data)).Decode(&m)
-		l.Put(k, m)
-	}
-	return nil
-}

+ 0 - 36
vendor/github.com/emicklei/go-restful/swagger/ordered_route_map.go

@@ -1,36 +0,0 @@
-package swagger
-
-// Copyright 2015 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import "github.com/emicklei/go-restful"
-
-type orderedRouteMap struct {
-	elements map[string][]restful.Route
-	keys     []string
-}
-
-func newOrderedRouteMap() *orderedRouteMap {
-	return &orderedRouteMap{
-		elements: map[string][]restful.Route{},
-		keys:     []string{},
-	}
-}
-
-func (o *orderedRouteMap) Add(key string, route restful.Route) {
-	routes, ok := o.elements[key]
-	if ok {
-		routes = append(routes, route)
-		o.elements[key] = routes
-		return
-	}
-	o.elements[key] = []restful.Route{route}
-	o.keys = append(o.keys, key)
-}
-
-func (o *orderedRouteMap) Do(block func(key string, routes []restful.Route)) {
-	for _, k := range o.keys {
-		block(k, o.elements[k])
-	}
-}

+ 0 - 185
vendor/github.com/emicklei/go-restful/swagger/swagger.go

@@ -1,185 +0,0 @@
-// Package swagger implements the structures of the Swagger
-// https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md
-package swagger
-
-const swaggerVersion = "1.2"
-
-// 4.3.3 Data Type Fields
-type DataTypeFields struct {
-	Type         *string  `json:"type,omitempty"` // if Ref not used
-	Ref          *string  `json:"$ref,omitempty"` // if Type not used
-	Format       string   `json:"format,omitempty"`
-	DefaultValue Special  `json:"defaultValue,omitempty"`
-	Enum         []string `json:"enum,omitempty"`
-	Minimum      string   `json:"minimum,omitempty"`
-	Maximum      string   `json:"maximum,omitempty"`
-	Items        *Item    `json:"items,omitempty"`
-	UniqueItems  *bool    `json:"uniqueItems,omitempty"`
-}
-
-type Special string
-
-// 4.3.4 Items Object
-type Item struct {
-	Type   *string `json:"type,omitempty"`
-	Ref    *string `json:"$ref,omitempty"`
-	Format string  `json:"format,omitempty"`
-}
-
-// 5.1 Resource Listing
-type ResourceListing struct {
-	SwaggerVersion string          `json:"swaggerVersion"` // e.g 1.2
-	Apis           []Resource      `json:"apis"`
-	ApiVersion     string          `json:"apiVersion"`
-	Info           Info            `json:"info"`
-	Authorizations []Authorization `json:"authorizations,omitempty"`
-}
-
-// 5.1.2 Resource Object
-type Resource struct {
-	Path        string `json:"path"` // relative or absolute, must start with /
-	Description string `json:"description"`
-}
-
-// 5.1.3 Info Object
-type Info struct {
-	Title             string `json:"title"`
-	Description       string `json:"description"`
-	TermsOfServiceUrl string `json:"termsOfServiceUrl,omitempty"`
-	Contact           string `json:"contact,omitempty"`
-	License           string `json:"license,omitempty"`
-	LicenseUrl        string `json:"licenseUrl,omitempty"`
-}
-
-// 5.1.5
-type Authorization struct {
-	Type       string      `json:"type"`
-	PassAs     string      `json:"passAs"`
-	Keyname    string      `json:"keyname"`
-	Scopes     []Scope     `json:"scopes"`
-	GrantTypes []GrantType `json:"grandTypes"`
-}
-
-// 5.1.6, 5.2.11
-type Scope struct {
-	// Required. The name of the scope.
-	Scope string `json:"scope"`
-	// Recommended. A short description of the scope.
-	Description string `json:"description"`
-}
-
-// 5.1.7
-type GrantType struct {
-	Implicit          Implicit          `json:"implicit"`
-	AuthorizationCode AuthorizationCode `json:"authorization_code"`
-}
-
-// 5.1.8 Implicit Object
-type Implicit struct {
-	// Required. The login endpoint definition.
-	loginEndpoint LoginEndpoint `json:"loginEndpoint"`
-	// An optional alternative name to standard "access_token" OAuth2 parameter.
-	TokenName string `json:"tokenName"`
-}
-
-// 5.1.9 Authorization Code Object
-type AuthorizationCode struct {
-	TokenRequestEndpoint TokenRequestEndpoint `json:"tokenRequestEndpoint"`
-	TokenEndpoint        TokenEndpoint        `json:"tokenEndpoint"`
-}
-
-// 5.1.10 Login Endpoint Object
-type LoginEndpoint struct {
-	// Required. The URL of the authorization endpoint for the implicit grant flow. The value SHOULD be in a URL format.
-	Url string `json:"url"`
-}
-
-// 5.1.11 Token Request Endpoint Object
-type TokenRequestEndpoint struct {
-	// Required. The URL of the authorization endpoint for the authentication code grant flow. The value SHOULD be in a URL format.
-	Url string `json:"url"`
-	// An optional alternative name to standard "client_id" OAuth2 parameter.
-	ClientIdName string `json:"clientIdName"`
-	// An optional alternative name to the standard "client_secret" OAuth2 parameter.
-	ClientSecretName string `json:"clientSecretName"`
-}
-
-// 5.1.12 Token Endpoint Object
-type TokenEndpoint struct {
-	// Required. The URL of the token endpoint for the authentication code grant flow. The value SHOULD be in a URL format.
-	Url string `json:"url"`
-	// An optional alternative name to standard "access_token" OAuth2 parameter.
-	TokenName string `json:"tokenName"`
-}
-
-// 5.2 API Declaration
-type ApiDeclaration struct {
-	SwaggerVersion string          `json:"swaggerVersion"`
-	ApiVersion     string          `json:"apiVersion"`
-	BasePath       string          `json:"basePath"`
-	ResourcePath   string          `json:"resourcePath"` // must start with /
-	Info           Info            `json:"info"`
-	Apis           []Api           `json:"apis,omitempty"`
-	Models         ModelList       `json:"models,omitempty"`
-	Produces       []string        `json:"produces,omitempty"`
-	Consumes       []string        `json:"consumes,omitempty"`
-	Authorizations []Authorization `json:"authorizations,omitempty"`
-}
-
-// 5.2.2 API Object
-type Api struct {
-	Path        string      `json:"path"` // relative or absolute, must start with /
-	Description string      `json:"description"`
-	Operations  []Operation `json:"operations,omitempty"`
-}
-
-// 5.2.3 Operation Object
-type Operation struct {
-	DataTypeFields
-	Method           string            `json:"method"`
-	Summary          string            `json:"summary,omitempty"`
-	Notes            string            `json:"notes,omitempty"`
-	Nickname         string            `json:"nickname"`
-	Authorizations   []Authorization   `json:"authorizations,omitempty"`
-	Parameters       []Parameter       `json:"parameters"`
-	ResponseMessages []ResponseMessage `json:"responseMessages,omitempty"` // optional
-	Produces         []string          `json:"produces,omitempty"`
-	Consumes         []string          `json:"consumes,omitempty"`
-	Deprecated       string            `json:"deprecated,omitempty"`
-}
-
-// 5.2.4 Parameter Object
-type Parameter struct {
-	DataTypeFields
-	ParamType     string `json:"paramType"` // path,query,body,header,form
-	Name          string `json:"name"`
-	Description   string `json:"description"`
-	Required      bool   `json:"required"`
-	AllowMultiple bool   `json:"allowMultiple"`
-}
-
-// 5.2.5 Response Message Object
-type ResponseMessage struct {
-	Code          int    `json:"code"`
-	Message       string `json:"message"`
-	ResponseModel string `json:"responseModel,omitempty"`
-}
-
-// 5.2.6, 5.2.7 Models Object
-type Model struct {
-	Id            string            `json:"id"`
-	Description   string            `json:"description,omitempty"`
-	Required      []string          `json:"required,omitempty"`
-	Properties    ModelPropertyList `json:"properties"`
-	SubTypes      []string          `json:"subTypes,omitempty"`
-	Discriminator string            `json:"discriminator,omitempty"`
-}
-
-// 5.2.8 Properties Object
-type ModelProperty struct {
-	DataTypeFields
-	Description string `json:"description,omitempty"`
-}
-
-// 5.2.10
-type Authorizations map[string]Authorization

+ 0 - 21
vendor/github.com/emicklei/go-restful/swagger/swagger_builder.go

@@ -1,21 +0,0 @@
-package swagger
-
-type SwaggerBuilder struct {
-	SwaggerService
-}
-
-func NewSwaggerBuilder(config Config) *SwaggerBuilder {
-	return &SwaggerBuilder{*newSwaggerService(config)}
-}
-
-func (sb SwaggerBuilder) ProduceListing() ResourceListing {
-	return sb.SwaggerService.produceListing()
-}
-
-func (sb SwaggerBuilder) ProduceAllDeclarations() map[string]ApiDeclaration {
-	return sb.SwaggerService.produceAllDeclarations()
-}
-
-func (sb SwaggerBuilder) ProduceDeclarations(route string) (*ApiDeclaration, bool) {
-	return sb.SwaggerService.produceDeclarations(route)
-}

+ 0 - 440
vendor/github.com/emicklei/go-restful/swagger/swagger_webservice.go

@@ -1,440 +0,0 @@
-package swagger
-
-import (
-	"fmt"
-
-	"github.com/emicklei/go-restful"
-	// "github.com/emicklei/hopwatch"
-	"net/http"
-	"reflect"
-	"sort"
-	"strings"
-
-	"github.com/emicklei/go-restful/log"
-)
-
-type SwaggerService struct {
-	config            Config
-	apiDeclarationMap *ApiDeclarationList
-}
-
-func newSwaggerService(config Config) *SwaggerService {
-	sws := &SwaggerService{
-		config:            config,
-		apiDeclarationMap: new(ApiDeclarationList)}
-
-	// Build all ApiDeclarations
-	for _, each := range config.WebServices {
-		rootPath := each.RootPath()
-		// skip the api service itself
-		if rootPath != config.ApiPath {
-			if rootPath == "" || rootPath == "/" {
-				// use routes
-				for _, route := range each.Routes() {
-					entry := staticPathFromRoute(route)
-					_, exists := sws.apiDeclarationMap.At(entry)
-					if !exists {
-						sws.apiDeclarationMap.Put(entry, sws.composeDeclaration(each, entry))
-					}
-				}
-			} else { // use root path
-				sws.apiDeclarationMap.Put(each.RootPath(), sws.composeDeclaration(each, each.RootPath()))
-			}
-		}
-	}
-
-	// if specified then call the PostBuilderHandler
-	if config.PostBuildHandler != nil {
-		config.PostBuildHandler(sws.apiDeclarationMap)
-	}
-	return sws
-}
-
-// LogInfo is the function that is called when this package needs to log. It defaults to log.Printf
-var LogInfo = func(format string, v ...interface{}) {
-	// use the restful package-wide logger
-	log.Printf(format, v...)
-}
-
-// InstallSwaggerService add the WebService that provides the API documentation of all services
-// conform the Swagger documentation specifcation. (https://github.com/wordnik/swagger-core/wiki).
-func InstallSwaggerService(aSwaggerConfig Config) {
-	RegisterSwaggerService(aSwaggerConfig, restful.DefaultContainer)
-}
-
-// RegisterSwaggerService add the WebService that provides the API documentation of all services
-// conform the Swagger documentation specifcation. (https://github.com/wordnik/swagger-core/wiki).
-func RegisterSwaggerService(config Config, wsContainer *restful.Container) {
-	sws := newSwaggerService(config)
-	ws := new(restful.WebService)
-	ws.Path(config.ApiPath)
-	ws.Produces(restful.MIME_JSON)
-	if config.DisableCORS {
-		ws.Filter(enableCORS)
-	}
-	ws.Route(ws.GET("/").To(sws.getListing))
-	ws.Route(ws.GET("/{a}").To(sws.getDeclarations))
-	ws.Route(ws.GET("/{a}/{b}").To(sws.getDeclarations))
-	ws.Route(ws.GET("/{a}/{b}/{c}").To(sws.getDeclarations))
-	ws.Route(ws.GET("/{a}/{b}/{c}/{d}").To(sws.getDeclarations))
-	ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}").To(sws.getDeclarations))
-	ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}/{f}").To(sws.getDeclarations))
-	ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}/{f}/{g}").To(sws.getDeclarations))
-	LogInfo("[restful/swagger] listing is available at %v%v", config.WebServicesUrl, config.ApiPath)
-	wsContainer.Add(ws)
-
-	// Check paths for UI serving
-	if config.StaticHandler == nil && config.SwaggerFilePath != "" && config.SwaggerPath != "" {
-		swaggerPathSlash := config.SwaggerPath
-		// path must end with slash /
-		if "/" != config.SwaggerPath[len(config.SwaggerPath)-1:] {
-			LogInfo("[restful/swagger] use corrected SwaggerPath ; must end with slash (/)")
-			swaggerPathSlash += "/"
-		}
-
-		LogInfo("[restful/swagger] %v%v is mapped to folder %v", config.WebServicesUrl, swaggerPathSlash, config.SwaggerFilePath)
-		wsContainer.Handle(swaggerPathSlash, http.StripPrefix(swaggerPathSlash, http.FileServer(http.Dir(config.SwaggerFilePath))))
-
-		//if we define a custom static handler use it
-	} else if config.StaticHandler != nil && config.SwaggerPath != "" {
-		swaggerPathSlash := config.SwaggerPath
-		// path must end with slash /
-		if "/" != config.SwaggerPath[len(config.SwaggerPath)-1:] {
-			LogInfo("[restful/swagger] use corrected SwaggerFilePath ; must end with slash (/)")
-			swaggerPathSlash += "/"
-
-		}
-		LogInfo("[restful/swagger] %v%v is mapped to custom Handler %T", config.WebServicesUrl, swaggerPathSlash, config.StaticHandler)
-		wsContainer.Handle(swaggerPathSlash, config.StaticHandler)
-
-	} else {
-		LogInfo("[restful/swagger] Swagger(File)Path is empty ; no UI is served")
-	}
-}
-
-func staticPathFromRoute(r restful.Route) string {
-	static := r.Path
-	bracket := strings.Index(static, "{")
-	if bracket <= 1 { // result cannot be empty
-		return static
-	}
-	if bracket != -1 {
-		static = r.Path[:bracket]
-	}
-	if strings.HasSuffix(static, "/") {
-		return static[:len(static)-1]
-	} else {
-		return static
-	}
-}
-
-func enableCORS(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) {
-	if origin := req.HeaderParameter(restful.HEADER_Origin); origin != "" {
-		// prevent duplicate header
-		if len(resp.Header().Get(restful.HEADER_AccessControlAllowOrigin)) == 0 {
-			resp.AddHeader(restful.HEADER_AccessControlAllowOrigin, origin)
-		}
-	}
-	chain.ProcessFilter(req, resp)
-}
-
-func (sws SwaggerService) getListing(req *restful.Request, resp *restful.Response) {
-	listing := sws.produceListing()
-	resp.WriteAsJson(listing)
-}
-
-func (sws SwaggerService) produceListing() ResourceListing {
-	listing := ResourceListing{SwaggerVersion: swaggerVersion, ApiVersion: sws.config.ApiVersion, Info: sws.config.Info}
-	sws.apiDeclarationMap.Do(func(k string, v ApiDeclaration) {
-		ref := Resource{Path: k}
-		if len(v.Apis) > 0 { // use description of first (could still be empty)
-			ref.Description = v.Apis[0].Description
-		}
-		listing.Apis = append(listing.Apis, ref)
-	})
-	return listing
-}
-
-func (sws SwaggerService) getDeclarations(req *restful.Request, resp *restful.Response) {
-	decl, ok := sws.produceDeclarations(composeRootPath(req))
-	if !ok {
-		resp.WriteErrorString(http.StatusNotFound, "ApiDeclaration not found")
-		return
-	}
-	// unless WebServicesUrl is given
-	if len(sws.config.WebServicesUrl) == 0 {
-		// update base path from the actual request
-		// TODO how to detect https? assume http for now
-		var host string
-		// X-Forwarded-Host or Host or Request.Host
-		hostvalues, ok := req.Request.Header["X-Forwarded-Host"] // apache specific?
-		if !ok || len(hostvalues) == 0 {
-			forwarded, ok := req.Request.Header["Host"] // without reverse-proxy
-			if !ok || len(forwarded) == 0 {
-				// fallback to Host field
-				host = req.Request.Host
-			} else {
-				host = forwarded[0]
-			}
-		} else {
-			host = hostvalues[0]
-		}
-		// inspect Referer for the scheme (http vs https)
-		scheme := "http"
-		if referer := req.Request.Header["Referer"]; len(referer) > 0 {
-			if strings.HasPrefix(referer[0], "https") {
-				scheme = "https"
-			}
-		}
-		decl.BasePath = fmt.Sprintf("%s://%s", scheme, host)
-	}
-	resp.WriteAsJson(decl)
-}
-
-func (sws SwaggerService) produceAllDeclarations() map[string]ApiDeclaration {
-	decls := map[string]ApiDeclaration{}
-	sws.apiDeclarationMap.Do(func(k string, v ApiDeclaration) {
-		decls[k] = v
-	})
-	return decls
-}
-
-func (sws SwaggerService) produceDeclarations(route string) (*ApiDeclaration, bool) {
-	decl, ok := sws.apiDeclarationMap.At(route)
-	if !ok {
-		return nil, false
-	}
-	decl.BasePath = sws.config.WebServicesUrl
-	return &decl, true
-}
-
-// composeDeclaration uses all routes and parameters to create a ApiDeclaration
-func (sws SwaggerService) composeDeclaration(ws *restful.WebService, pathPrefix string) ApiDeclaration {
-	decl := ApiDeclaration{
-		SwaggerVersion: swaggerVersion,
-		BasePath:       sws.config.WebServicesUrl,
-		ResourcePath:   pathPrefix,
-		Models:         ModelList{},
-		ApiVersion:     ws.Version()}
-
-	// collect any path parameters
-	rootParams := []Parameter{}
-	for _, param := range ws.PathParameters() {
-		rootParams = append(rootParams, asSwaggerParameter(param.Data()))
-	}
-	// aggregate by path
-	pathToRoutes := newOrderedRouteMap()
-	for _, other := range ws.Routes() {
-		if strings.HasPrefix(other.Path, pathPrefix) {
-			pathToRoutes.Add(other.Path, other)
-		}
-	}
-	pathToRoutes.Do(func(path string, routes []restful.Route) {
-		api := Api{Path: strings.TrimSuffix(withoutWildcard(path), "/"), Description: ws.Documentation()}
-		voidString := "void"
-		for _, route := range routes {
-			operation := Operation{
-				Method:  route.Method,
-				Summary: route.Doc,
-				Notes:   route.Notes,
-				// Type gets overwritten if there is a write sample
-				DataTypeFields:   DataTypeFields{Type: &voidString},
-				Parameters:       []Parameter{},
-				Nickname:         route.Operation,
-				ResponseMessages: composeResponseMessages(route, &decl, &sws.config)}
-
-			operation.Consumes = route.Consumes
-			operation.Produces = route.Produces
-
-			// share root params if any
-			for _, swparam := range rootParams {
-				operation.Parameters = append(operation.Parameters, swparam)
-			}
-			// route specific params
-			for _, param := range route.ParameterDocs {
-				operation.Parameters = append(operation.Parameters, asSwaggerParameter(param.Data()))
-			}
-
-			sws.addModelsFromRouteTo(&operation, route, &decl)
-			api.Operations = append(api.Operations, operation)
-		}
-		decl.Apis = append(decl.Apis, api)
-	})
-	return decl
-}
-
-func withoutWildcard(path string) string {
-	if strings.HasSuffix(path, ":*}") {
-		return path[0:len(path)-3] + "}"
-	}
-	return path
-}
-
-// composeResponseMessages takes the ResponseErrors (if any) and creates ResponseMessages from them.
-func composeResponseMessages(route restful.Route, decl *ApiDeclaration, config *Config) (messages []ResponseMessage) {
-	if route.ResponseErrors == nil {
-		return messages
-	}
-	// sort by code
-	codes := sort.IntSlice{}
-	for code := range route.ResponseErrors {
-		codes = append(codes, code)
-	}
-	codes.Sort()
-	for _, code := range codes {
-		each := route.ResponseErrors[code]
-		message := ResponseMessage{
-			Code:    code,
-			Message: each.Message,
-		}
-		if each.Model != nil {
-			st := reflect.TypeOf(each.Model)
-			isCollection, st := detectCollectionType(st)
-			modelName := modelBuilder{}.keyFrom(st)
-			if isCollection {
-				modelName = "array[" + modelName + "]"
-			}
-			modelBuilder{Models: &decl.Models, Config: config}.addModel(st, "")
-			// reference the model
-			message.ResponseModel = modelName
-		}
-		messages = append(messages, message)
-	}
-	return
-}
-
-// addModelsFromRoute takes any read or write sample from the Route and creates a Swagger model from it.
-func (sws SwaggerService) addModelsFromRouteTo(operation *Operation, route restful.Route, decl *ApiDeclaration) {
-	if route.ReadSample != nil {
-		sws.addModelFromSampleTo(operation, false, route.ReadSample, &decl.Models)
-	}
-	if route.WriteSample != nil {
-		sws.addModelFromSampleTo(operation, true, route.WriteSample, &decl.Models)
-	}
-}
-
-func detectCollectionType(st reflect.Type) (bool, reflect.Type) {
-	isCollection := false
-	if st.Kind() == reflect.Slice || st.Kind() == reflect.Array {
-		st = st.Elem()
-		isCollection = true
-	} else {
-		if st.Kind() == reflect.Ptr {
-			if st.Elem().Kind() == reflect.Slice || st.Elem().Kind() == reflect.Array {
-				st = st.Elem().Elem()
-				isCollection = true
-			}
-		}
-	}
-	return isCollection, st
-}
-
-// addModelFromSample creates and adds (or overwrites) a Model from a sample resource
-func (sws SwaggerService) addModelFromSampleTo(operation *Operation, isResponse bool, sample interface{}, models *ModelList) {
-	if isResponse {
-		type_, items := asDataType(sample, &sws.config)
-		operation.Type = type_
-		operation.Items = items
-	}
-	modelBuilder{Models: models, Config: &sws.config}.addModelFrom(sample)
-}
-
-func asSwaggerParameter(param restful.ParameterData) Parameter {
-	return Parameter{
-		DataTypeFields: DataTypeFields{
-			Type:         &param.DataType,
-			Format:       asFormat(param.DataType, param.DataFormat),
-			DefaultValue: Special(param.DefaultValue),
-		},
-		Name:        param.Name,
-		Description: param.Description,
-		ParamType:   asParamType(param.Kind),
-
-		Required: param.Required}
-}
-
-// Between 1..7 path parameters is supported
-func composeRootPath(req *restful.Request) string {
-	path := "/" + req.PathParameter("a")
-	b := req.PathParameter("b")
-	if b == "" {
-		return path
-	}
-	path = path + "/" + b
-	c := req.PathParameter("c")
-	if c == "" {
-		return path
-	}
-	path = path + "/" + c
-	d := req.PathParameter("d")
-	if d == "" {
-		return path
-	}
-	path = path + "/" + d
-	e := req.PathParameter("e")
-	if e == "" {
-		return path
-	}
-	path = path + "/" + e
-	f := req.PathParameter("f")
-	if f == "" {
-		return path
-	}
-	path = path + "/" + f
-	g := req.PathParameter("g")
-	if g == "" {
-		return path
-	}
-	return path + "/" + g
-}
-
-func asFormat(dataType string, dataFormat string) string {
-	if dataFormat != "" {
-		return dataFormat
-	}
-	return "" // TODO
-}
-
-func asParamType(kind int) string {
-	switch {
-	case kind == restful.PathParameterKind:
-		return "path"
-	case kind == restful.QueryParameterKind:
-		return "query"
-	case kind == restful.BodyParameterKind:
-		return "body"
-	case kind == restful.HeaderParameterKind:
-		return "header"
-	case kind == restful.FormParameterKind:
-		return "form"
-	}
-	return ""
-}
-
-func asDataType(any interface{}, config *Config) (*string, *Item) {
-	// If it's not a collection, return the suggested model name
-	st := reflect.TypeOf(any)
-	isCollection, st := detectCollectionType(st)
-	modelName := modelBuilder{}.keyFrom(st)
-	// if it's not a collection we are done
-	if !isCollection {
-		return &modelName, nil
-	}
-
-	// XXX: This is not very elegant
-	// We create an Item object referring to the given model
-	models := ModelList{}
-	mb := modelBuilder{Models: &models, Config: config}
-	mb.addModelFrom(any)
-
-	elemTypeName := mb.getElementTypeName(modelName, "", st)
-	item := new(Item)
-	if mb.isPrimitiveType(elemTypeName) {
-		mapped := mb.jsonSchemaType(elemTypeName)
-		item.Type = &mapped
-	} else {
-		item.Ref = &elemTypeName
-	}
-	tmp := "array"
-	return &tmp, item
-}

+ 0 - 268
vendor/github.com/emicklei/go-restful/web_service.go

@@ -1,268 +0,0 @@
-package restful
-
-import (
-	"errors"
-	"os"
-	"sync"
-
-	"github.com/emicklei/go-restful/log"
-)
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-// WebService holds a collection of Route values that bind a Http Method + URL Path to a function.
-type WebService struct {
-	rootPath       string
-	pathExpr       *pathExpression // cached compilation of rootPath as RegExp
-	routes         []Route
-	produces       []string
-	consumes       []string
-	pathParameters []*Parameter
-	filters        []FilterFunction
-	documentation  string
-	apiVersion     string
-
-	dynamicRoutes bool
-
-	// protects 'routes' if dynamic routes are enabled
-	routesLock sync.RWMutex
-}
-
-func (w *WebService) SetDynamicRoutes(enable bool) {
-	w.dynamicRoutes = enable
-}
-
-// compilePathExpression ensures that the path is compiled into a RegEx for those routers that need it.
-func (w *WebService) compilePathExpression() {
-	compiled, err := newPathExpression(w.rootPath)
-	if err != nil {
-		log.Printf("[restful] invalid path:%s because:%v", w.rootPath, err)
-		os.Exit(1)
-	}
-	w.pathExpr = compiled
-}
-
-// ApiVersion sets the API version for documentation purposes.
-func (w *WebService) ApiVersion(apiVersion string) *WebService {
-	w.apiVersion = apiVersion
-	return w
-}
-
-// Version returns the API version for documentation purposes.
-func (w *WebService) Version() string { return w.apiVersion }
-
-// Path specifies the root URL template path of the WebService.
-// All Routes will be relative to this path.
-func (w *WebService) Path(root string) *WebService {
-	w.rootPath = root
-	if len(w.rootPath) == 0 {
-		w.rootPath = "/"
-	}
-	w.compilePathExpression()
-	return w
-}
-
-// Param adds a PathParameter to document parameters used in the root path.
-func (w *WebService) Param(parameter *Parameter) *WebService {
-	if w.pathParameters == nil {
-		w.pathParameters = []*Parameter{}
-	}
-	w.pathParameters = append(w.pathParameters, parameter)
-	return w
-}
-
-// PathParameter creates a new Parameter of kind Path for documentation purposes.
-// It is initialized as required with string as its DataType.
-func (w *WebService) PathParameter(name, description string) *Parameter {
-	return PathParameter(name, description)
-}
-
-// PathParameter creates a new Parameter of kind Path for documentation purposes.
-// It is initialized as required with string as its DataType.
-func PathParameter(name, description string) *Parameter {
-	p := &Parameter{&ParameterData{Name: name, Description: description, Required: true, DataType: "string"}}
-	p.bePath()
-	return p
-}
-
-// QueryParameter creates a new Parameter of kind Query for documentation purposes.
-// It is initialized as not required with string as its DataType.
-func (w *WebService) QueryParameter(name, description string) *Parameter {
-	return QueryParameter(name, description)
-}
-
-// QueryParameter creates a new Parameter of kind Query for documentation purposes.
-// It is initialized as not required with string as its DataType.
-func QueryParameter(name, description string) *Parameter {
-	p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}}
-	p.beQuery()
-	return p
-}
-
-// BodyParameter creates a new Parameter of kind Body for documentation purposes.
-// It is initialized as required without a DataType.
-func (w *WebService) BodyParameter(name, description string) *Parameter {
-	return BodyParameter(name, description)
-}
-
-// BodyParameter creates a new Parameter of kind Body for documentation purposes.
-// It is initialized as required without a DataType.
-func BodyParameter(name, description string) *Parameter {
-	p := &Parameter{&ParameterData{Name: name, Description: description, Required: true}}
-	p.beBody()
-	return p
-}
-
-// HeaderParameter creates a new Parameter of kind (Http) Header for documentation purposes.
-// It is initialized as not required with string as its DataType.
-func (w *WebService) HeaderParameter(name, description string) *Parameter {
-	return HeaderParameter(name, description)
-}
-
-// HeaderParameter creates a new Parameter of kind (Http) Header for documentation purposes.
-// It is initialized as not required with string as its DataType.
-func HeaderParameter(name, description string) *Parameter {
-	p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}}
-	p.beHeader()
-	return p
-}
-
-// FormParameter creates a new Parameter of kind Form (using application/x-www-form-urlencoded) for documentation purposes.
-// It is initialized as required with string as its DataType.
-func (w *WebService) FormParameter(name, description string) *Parameter {
-	return FormParameter(name, description)
-}
-
-// FormParameter creates a new Parameter of kind Form (using application/x-www-form-urlencoded) for documentation purposes.
-// It is initialized as required with string as its DataType.
-func FormParameter(name, description string) *Parameter {
-	p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}}
-	p.beForm()
-	return p
-}
-
-// Route creates a new Route using the RouteBuilder and add to the ordered list of Routes.
-func (w *WebService) Route(builder *RouteBuilder) *WebService {
-	w.routesLock.Lock()
-	defer w.routesLock.Unlock()
-	builder.copyDefaults(w.produces, w.consumes)
-	w.routes = append(w.routes, builder.Build())
-	return w
-}
-
-// RemoveRoute removes the specified route, looks for something that matches 'path' and 'method'
-func (w *WebService) RemoveRoute(path, method string) error {
-	if !w.dynamicRoutes {
-		return errors.New("dynamic routes are not enabled.")
-	}
-	w.routesLock.Lock()
-	defer w.routesLock.Unlock()
-	newRoutes := make([]Route, (len(w.routes) - 1))
-	current := 0
-	for ix := range w.routes {
-		if w.routes[ix].Method == method && w.routes[ix].Path == path {
-			continue
-		}
-		newRoutes[current] = w.routes[ix]
-		current = current + 1
-	}
-	w.routes = newRoutes
-	return nil
-}
-
-// Method creates a new RouteBuilder and initialize its http method
-func (w *WebService) Method(httpMethod string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method(httpMethod)
-}
-
-// Produces specifies that this WebService can produce one or more MIME types.
-// Http requests must have one of these values set for the Accept header.
-func (w *WebService) Produces(contentTypes ...string) *WebService {
-	w.produces = contentTypes
-	return w
-}
-
-// Consumes specifies that this WebService can consume one or more MIME types.
-// Http requests must have one of these values set for the Content-Type header.
-func (w *WebService) Consumes(accepts ...string) *WebService {
-	w.consumes = accepts
-	return w
-}
-
-// Routes returns the Routes associated with this WebService
-func (w *WebService) Routes() []Route {
-	if !w.dynamicRoutes {
-		return w.routes
-	}
-	// Make a copy of the array to prevent concurrency problems
-	w.routesLock.RLock()
-	defer w.routesLock.RUnlock()
-	result := make([]Route, len(w.routes))
-	for ix := range w.routes {
-		result[ix] = w.routes[ix]
-	}
-	return result
-}
-
-// RootPath returns the RootPath associated with this WebService. Default "/"
-func (w *WebService) RootPath() string {
-	return w.rootPath
-}
-
-// PathParameters return the path parameter names for (shared amoung its Routes)
-func (w *WebService) PathParameters() []*Parameter {
-	return w.pathParameters
-}
-
-// Filter adds a filter function to the chain of filters applicable to all its Routes
-func (w *WebService) Filter(filter FilterFunction) *WebService {
-	w.filters = append(w.filters, filter)
-	return w
-}
-
-// Doc is used to set the documentation of this service.
-func (w *WebService) Doc(plainText string) *WebService {
-	w.documentation = plainText
-	return w
-}
-
-// Documentation returns it.
-func (w *WebService) Documentation() string {
-	return w.documentation
-}
-
-/*
-	Convenience methods
-*/
-
-// HEAD is a shortcut for .Method("HEAD").Path(subPath)
-func (w *WebService) HEAD(subPath string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method("HEAD").Path(subPath)
-}
-
-// GET is a shortcut for .Method("GET").Path(subPath)
-func (w *WebService) GET(subPath string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method("GET").Path(subPath)
-}
-
-// POST is a shortcut for .Method("POST").Path(subPath)
-func (w *WebService) POST(subPath string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method("POST").Path(subPath)
-}
-
-// PUT is a shortcut for .Method("PUT").Path(subPath)
-func (w *WebService) PUT(subPath string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method("PUT").Path(subPath)
-}
-
-// PATCH is a shortcut for .Method("PATCH").Path(subPath)
-func (w *WebService) PATCH(subPath string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method("PATCH").Path(subPath)
-}
-
-// DELETE is a shortcut for .Method("DELETE").Path(subPath)
-func (w *WebService) DELETE(subPath string) *RouteBuilder {
-	return new(RouteBuilder).servicePath(w.rootPath).Method("DELETE").Path(subPath)
-}

+ 0 - 39
vendor/github.com/emicklei/go-restful/web_service_container.go

@@ -1,39 +0,0 @@
-package restful
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-import (
-	"net/http"
-)
-
-// DefaultContainer is a restful.Container that uses http.DefaultServeMux
-var DefaultContainer *Container
-
-func init() {
-	DefaultContainer = NewContainer()
-	DefaultContainer.ServeMux = http.DefaultServeMux
-}
-
-// If set the true then panics will not be caught to return HTTP 500.
-// In that case, Route functions are responsible for handling any error situation.
-// Default value is false = recover from panics. This has performance implications.
-// OBSOLETE ; use restful.DefaultContainer.DoNotRecover(true)
-var DoNotRecover = false
-
-// Add registers a new WebService add it to the DefaultContainer.
-func Add(service *WebService) {
-	DefaultContainer.Add(service)
-}
-
-// Filter appends a container FilterFunction from the DefaultContainer.
-// These are called before dispatching a http.Request to a WebService.
-func Filter(filter FilterFunction) {
-	DefaultContainer.Filter(filter)
-}
-
-// RegisteredWebServices returns the collections of WebServices from the DefaultContainer
-func RegisteredWebServices() []*WebService {
-	return DefaultContainer.RegisteredWebServices()
-}

+ 0 - 7
vendor/github.com/ghodss/yaml/.travis.yml

@@ -1,7 +0,0 @@
-language: go
-go:
-  - 1.3
-  - 1.4
-script:
-  - go test
-  - go build

+ 0 - 116
vendor/github.com/ghodss/yaml/README.md

@@ -1,116 +0,0 @@
-# YAML marshaling and unmarshaling support for Go
-
-[![Build Status](https://travis-ci.org/ghodss/yaml.svg)](https://travis-ci.org/ghodss/yaml)
-
-## Introduction
-
-A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs. 
-
-In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/).
-
-## Compatibility
-
-This package uses [go-yaml v2](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility).
-
-## Caveats
-
-**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example:
-
-```
-BAD:
-	exampleKey: !!binary gIGC
-
-GOOD:
-	exampleKey: gIGC
-... and decode the base64 data in your code.
-```
-
-**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys.
-
-## Installation and usage
-
-To install, run:
-
-```
-$ go get github.com/ghodss/yaml
-```
-
-And import using:
-
-```
-import "github.com/ghodss/yaml"
-```
-
-Usage is very similar to the JSON library:
-
-```go
-import (
-	"fmt"
-
-	"github.com/ghodss/yaml"
-)
-
-type Person struct {
-	Name string `json:"name"`  // Affects YAML field names too.
-	Age int `json:"name"`
-}
-
-func main() {
-	// Marshal a Person struct to YAML.
-	p := Person{"John", 30}
-	y, err := yaml.Marshal(p)
-	if err != nil {
-		fmt.Printf("err: %v\n", err)
-		return
-	}
-	fmt.Println(string(y))
-	/* Output:
-	name: John
-	age: 30
-	*/
-
-	// Unmarshal the YAML back into a Person struct.
-	var p2 Person
-	err := yaml.Unmarshal(y, &p2)
-	if err != nil {
-		fmt.Printf("err: %v\n", err)
-		return
-	}
-	fmt.Println(p2)
-	/* Output:
-	{John 30}
-	*/
-}
-```
-
-`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available:
-
-```go
-import (
-	"fmt"
-
-	"github.com/ghodss/yaml"
-)
-func main() {
-	j := []byte(`{"name": "John", "age": 30}`)
-	y, err := yaml.JSONToYAML(j)
-	if err != nil {
-		fmt.Printf("err: %v\n", err)
-		return
-	}
-	fmt.Println(string(y))
-	/* Output:
-	name: John
-	age: 30
-	*/
-	j2, err := yaml.YAMLToJSON(y)
-	if err != nil {
-		fmt.Printf("err: %v\n", err)
-		return
-	}
-	fmt.Println(string(j2))
-	/* Output:
-	{"age":30,"name":"John"}
-	*/
-}
-```

+ 0 - 497
vendor/github.com/ghodss/yaml/fields.go

@@ -1,497 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-package yaml
-
-import (
-	"bytes"
-	"encoding"
-	"encoding/json"
-	"reflect"
-	"sort"
-	"strings"
-	"sync"
-	"unicode"
-	"unicode/utf8"
-)
-
-// indirect walks down v allocating pointers as needed,
-// until it gets to a non-pointer.
-// if it encounters an Unmarshaler, indirect stops and returns that.
-// if decodingNull is true, indirect stops at the last pointer so it can be set to nil.
-func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {
-	// If v is a named type and is addressable,
-	// start with its address, so that if the type has pointer methods,
-	// we find them.
-	if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() {
-		v = v.Addr()
-	}
-	for {
-		// Load value from interface, but only if the result will be
-		// usefully addressable.
-		if v.Kind() == reflect.Interface && !v.IsNil() {
-			e := v.Elem()
-			if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) {
-				v = e
-				continue
-			}
-		}
-
-		if v.Kind() != reflect.Ptr {
-			break
-		}
-
-		if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() {
-			break
-		}
-		if v.IsNil() {
-			v.Set(reflect.New(v.Type().Elem()))
-		}
-		if v.Type().NumMethod() > 0 {
-			if u, ok := v.Interface().(json.Unmarshaler); ok {
-				return u, nil, reflect.Value{}
-			}
-			if u, ok := v.Interface().(encoding.TextUnmarshaler); ok {
-				return nil, u, reflect.Value{}
-			}
-		}
-		v = v.Elem()
-	}
-	return nil, nil, v
-}
-
-// A field represents a single field found in a struct.
-type field struct {
-	name      string
-	nameBytes []byte                 // []byte(name)
-	equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
-
-	tag       bool
-	index     []int
-	typ       reflect.Type
-	omitEmpty bool
-	quoted    bool
-}
-
-func fillField(f field) field {
-	f.nameBytes = []byte(f.name)
-	f.equalFold = foldFunc(f.nameBytes)
-	return f
-}
-
-// byName sorts field by name, breaking ties with depth,
-// then breaking ties with "name came from json tag", then
-// breaking ties with index sequence.
-type byName []field
-
-func (x byName) Len() int { return len(x) }
-
-func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byName) Less(i, j int) bool {
-	if x[i].name != x[j].name {
-		return x[i].name < x[j].name
-	}
-	if len(x[i].index) != len(x[j].index) {
-		return len(x[i].index) < len(x[j].index)
-	}
-	if x[i].tag != x[j].tag {
-		return x[i].tag
-	}
-	return byIndex(x).Less(i, j)
-}
-
-// byIndex sorts field by index sequence.
-type byIndex []field
-
-func (x byIndex) Len() int { return len(x) }
-
-func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-
-func (x byIndex) Less(i, j int) bool {
-	for k, xik := range x[i].index {
-		if k >= len(x[j].index) {
-			return false
-		}
-		if xik != x[j].index[k] {
-			return xik < x[j].index[k]
-		}
-	}
-	return len(x[i].index) < len(x[j].index)
-}
-
-// typeFields returns a list of fields that JSON should recognize for the given type.
-// The algorithm is breadth-first search over the set of structs to include - the top struct
-// and then any reachable anonymous structs.
-func typeFields(t reflect.Type) []field {
-	// Anonymous fields to explore at the current level and the next.
-	current := []field{}
-	next := []field{{typ: t}}
-
-	// Count of queued names for current level and the next.
-	count := map[reflect.Type]int{}
-	nextCount := map[reflect.Type]int{}
-
-	// Types already visited at an earlier level.
-	visited := map[reflect.Type]bool{}
-
-	// Fields found.
-	var fields []field
-
-	for len(next) > 0 {
-		current, next = next, current[:0]
-		count, nextCount = nextCount, map[reflect.Type]int{}
-
-		for _, f := range current {
-			if visited[f.typ] {
-				continue
-			}
-			visited[f.typ] = true
-
-			// Scan f.typ for fields to include.
-			for i := 0; i < f.typ.NumField(); i++ {
-				sf := f.typ.Field(i)
-				if sf.PkgPath != "" { // unexported
-					continue
-				}
-				tag := sf.Tag.Get("json")
-				if tag == "-" {
-					continue
-				}
-				name, opts := parseTag(tag)
-				if !isValidTag(name) {
-					name = ""
-				}
-				index := make([]int, len(f.index)+1)
-				copy(index, f.index)
-				index[len(f.index)] = i
-
-				ft := sf.Type
-				if ft.Name() == "" && ft.Kind() == reflect.Ptr {
-					// Follow pointer.
-					ft = ft.Elem()
-				}
-
-				// Record found field and index sequence.
-				if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
-					tagged := name != ""
-					if name == "" {
-						name = sf.Name
-					}
-					fields = append(fields, fillField(field{
-						name:      name,
-						tag:       tagged,
-						index:     index,
-						typ:       ft,
-						omitEmpty: opts.Contains("omitempty"),
-						quoted:    opts.Contains("string"),
-					}))
-					if count[f.typ] > 1 {
-						// If there were multiple instances, add a second,
-						// so that the annihilation code will see a duplicate.
-						// It only cares about the distinction between 1 or 2,
-						// so don't bother generating any more copies.
-						fields = append(fields, fields[len(fields)-1])
-					}
-					continue
-				}
-
-				// Record new anonymous struct to explore in next round.
-				nextCount[ft]++
-				if nextCount[ft] == 1 {
-					next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
-				}
-			}
-		}
-	}
-
-	sort.Sort(byName(fields))
-
-	// Delete all fields that are hidden by the Go rules for embedded fields,
-	// except that fields with JSON tags are promoted.
-
-	// The fields are sorted in primary order of name, secondary order
-	// of field index length. Loop over names; for each name, delete
-	// hidden fields by choosing the one dominant field that survives.
-	out := fields[:0]
-	for advance, i := 0, 0; i < len(fields); i += advance {
-		// One iteration per name.
-		// Find the sequence of fields with the name of this first field.
-		fi := fields[i]
-		name := fi.name
-		for advance = 1; i+advance < len(fields); advance++ {
-			fj := fields[i+advance]
-			if fj.name != name {
-				break
-			}
-		}
-		if advance == 1 { // Only one field with this name
-			out = append(out, fi)
-			continue
-		}
-		dominant, ok := dominantField(fields[i : i+advance])
-		if ok {
-			out = append(out, dominant)
-		}
-	}
-
-	fields = out
-	sort.Sort(byIndex(fields))
-
-	return fields
-}
-
-// dominantField looks through the fields, all of which are known to
-// have the same name, to find the single field that dominates the
-// others using Go's embedding rules, modified by the presence of
-// JSON tags. If there are multiple top-level fields, the boolean
-// will be false: This condition is an error in Go and we skip all
-// the fields.
-func dominantField(fields []field) (field, bool) {
-	// The fields are sorted in increasing index-length order. The winner
-	// must therefore be one with the shortest index length. Drop all
-	// longer entries, which is easy: just truncate the slice.
-	length := len(fields[0].index)
-	tagged := -1 // Index of first tagged field.
-	for i, f := range fields {
-		if len(f.index) > length {
-			fields = fields[:i]
-			break
-		}
-		if f.tag {
-			if tagged >= 0 {
-				// Multiple tagged fields at the same level: conflict.
-				// Return no field.
-				return field{}, false
-			}
-			tagged = i
-		}
-	}
-	if tagged >= 0 {
-		return fields[tagged], true
-	}
-	// All remaining fields have the same length. If there's more than one,
-	// we have a conflict (two fields named "X" at the same level) and we
-	// return no field.
-	if len(fields) > 1 {
-		return field{}, false
-	}
-	return fields[0], true
-}
-
-var fieldCache struct {
-	sync.RWMutex
-	m map[reflect.Type][]field
-}
-
-// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
-func cachedTypeFields(t reflect.Type) []field {
-	fieldCache.RLock()
-	f := fieldCache.m[t]
-	fieldCache.RUnlock()
-	if f != nil {
-		return f
-	}
-
-	// Compute fields without lock.
-	// Might duplicate effort but won't hold other computations back.
-	f = typeFields(t)
-	if f == nil {
-		f = []field{}
-	}
-
-	fieldCache.Lock()
-	if fieldCache.m == nil {
-		fieldCache.m = map[reflect.Type][]field{}
-	}
-	fieldCache.m[t] = f
-	fieldCache.Unlock()
-	return f
-}
-
-func isValidTag(s string) bool {
-	if s == "" {
-		return false
-	}
-	for _, c := range s {
-		switch {
-		case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
-			// Backslash and quote chars are reserved, but
-			// otherwise any punctuation chars are allowed
-			// in a tag name.
-		default:
-			if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
-				return false
-			}
-		}
-	}
-	return true
-}
-
-const (
-	caseMask     = ^byte(0x20) // Mask to ignore case in ASCII.
-	kelvin       = '\u212a'
-	smallLongEss = '\u017f'
-)
-
-// foldFunc returns one of four different case folding equivalence
-// functions, from most general (and slow) to fastest:
-//
-// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8
-// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S')
-// 3) asciiEqualFold, no special, but includes non-letters (including _)
-// 4) simpleLetterEqualFold, no specials, no non-letters.
-//
-// The letters S and K are special because they map to 3 runes, not just 2:
-//  * S maps to s and to U+017F 'ſ' Latin small letter long s
-//  * k maps to K and to U+212A 'K' Kelvin sign
-// See http://play.golang.org/p/tTxjOc0OGo
-//
-// The returned function is specialized for matching against s and
-// should only be given s. It's not curried for performance reasons.
-func foldFunc(s []byte) func(s, t []byte) bool {
-	nonLetter := false
-	special := false // special letter
-	for _, b := range s {
-		if b >= utf8.RuneSelf {
-			return bytes.EqualFold
-		}
-		upper := b & caseMask
-		if upper < 'A' || upper > 'Z' {
-			nonLetter = true
-		} else if upper == 'K' || upper == 'S' {
-			// See above for why these letters are special.
-			special = true
-		}
-	}
-	if special {
-		return equalFoldRight
-	}
-	if nonLetter {
-		return asciiEqualFold
-	}
-	return simpleLetterEqualFold
-}
-
-// equalFoldRight is a specialization of bytes.EqualFold when s is
-// known to be all ASCII (including punctuation), but contains an 's',
-// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t.
-// See comments on foldFunc.
-func equalFoldRight(s, t []byte) bool {
-	for _, sb := range s {
-		if len(t) == 0 {
-			return false
-		}
-		tb := t[0]
-		if tb < utf8.RuneSelf {
-			if sb != tb {
-				sbUpper := sb & caseMask
-				if 'A' <= sbUpper && sbUpper <= 'Z' {
-					if sbUpper != tb&caseMask {
-						return false
-					}
-				} else {
-					return false
-				}
-			}
-			t = t[1:]
-			continue
-		}
-		// sb is ASCII and t is not. t must be either kelvin
-		// sign or long s; sb must be s, S, k, or K.
-		tr, size := utf8.DecodeRune(t)
-		switch sb {
-		case 's', 'S':
-			if tr != smallLongEss {
-				return false
-			}
-		case 'k', 'K':
-			if tr != kelvin {
-				return false
-			}
-		default:
-			return false
-		}
-		t = t[size:]
-
-	}
-	if len(t) > 0 {
-		return false
-	}
-	return true
-}
-
-// asciiEqualFold is a specialization of bytes.EqualFold for use when
-// s is all ASCII (but may contain non-letters) and contains no
-// special-folding letters.
-// See comments on foldFunc.
-func asciiEqualFold(s, t []byte) bool {
-	if len(s) != len(t) {
-		return false
-	}
-	for i, sb := range s {
-		tb := t[i]
-		if sb == tb {
-			continue
-		}
-		if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') {
-			if sb&caseMask != tb&caseMask {
-				return false
-			}
-		} else {
-			return false
-		}
-	}
-	return true
-}
-
-// simpleLetterEqualFold is a specialization of bytes.EqualFold for
-// use when s is all ASCII letters (no underscores, etc) and also
-// doesn't contain 'k', 'K', 's', or 'S'.
-// See comments on foldFunc.
-func simpleLetterEqualFold(s, t []byte) bool {
-	if len(s) != len(t) {
-		return false
-	}
-	for i, b := range s {
-		if b&caseMask != t[i]&caseMask {
-			return false
-		}
-	}
-	return true
-}
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type tagOptions string
-
-// parseTag splits a struct field's json tag into its name and
-// comma-separated options.
-func parseTag(tag string) (string, tagOptions) {
-	if idx := strings.Index(tag, ","); idx != -1 {
-		return tag[:idx], tagOptions(tag[idx+1:])
-	}
-	return tag, tagOptions("")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o tagOptions) Contains(optionName string) bool {
-	if len(o) == 0 {
-		return false
-	}
-	s := string(o)
-	for s != "" {
-		var next string
-		i := strings.Index(s, ",")
-		if i >= 0 {
-			s, next = s[:i], s[i+1:]
-		}
-		if s == optionName {
-			return true
-		}
-		s = next
-	}
-	return false
-}

+ 0 - 277
vendor/github.com/ghodss/yaml/yaml.go

@@ -1,277 +0,0 @@
-package yaml
-
-import (
-	"bytes"
-	"encoding/json"
-	"fmt"
-	"reflect"
-	"strconv"
-
-	"gopkg.in/yaml.v2"
-)
-
-// Marshals the object into JSON then converts JSON to YAML and returns the
-// YAML.
-func Marshal(o interface{}) ([]byte, error) {
-	j, err := json.Marshal(o)
-	if err != nil {
-		return nil, fmt.Errorf("error marshaling into JSON: ", err)
-	}
-
-	y, err := JSONToYAML(j)
-	if err != nil {
-		return nil, fmt.Errorf("error converting JSON to YAML: ", err)
-	}
-
-	return y, nil
-}
-
-// Converts YAML to JSON then uses JSON to unmarshal into an object.
-func Unmarshal(y []byte, o interface{}) error {
-	vo := reflect.ValueOf(o)
-	j, err := yamlToJSON(y, &vo)
-	if err != nil {
-		return fmt.Errorf("error converting YAML to JSON: %v", err)
-	}
-
-	err = json.Unmarshal(j, o)
-	if err != nil {
-		return fmt.Errorf("error unmarshaling JSON: %v", err)
-	}
-
-	return nil
-}
-
-// Convert JSON to YAML.
-func JSONToYAML(j []byte) ([]byte, error) {
-	// Convert the JSON to an object.
-	var jsonObj interface{}
-	// We are using yaml.Unmarshal here (instead of json.Unmarshal) because the
-	// Go JSON library doesn't try to pick the right number type (int, float,
-	// etc.) when unmarshling to interface{}, it just picks float64
-	// universally. go-yaml does go through the effort of picking the right
-	// number type, so we can preserve number type throughout this process.
-	err := yaml.Unmarshal(j, &jsonObj)
-	if err != nil {
-		return nil, err
-	}
-
-	// Marshal this object into YAML.
-	return yaml.Marshal(jsonObj)
-}
-
-// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through
-// this method should be a no-op.
-//
-// Things YAML can do that are not supported by JSON:
-// * In YAML you can have binary and null keys in your maps. These are invalid
-//   in JSON. (int and float keys are converted to strings.)
-// * Binary data in YAML with the !!binary tag is not supported. If you want to
-//   use binary data with this library, encode the data as base64 as usual but do
-//   not use the !!binary tag in your YAML. This will ensure the original base64
-//   encoded data makes it all the way through to the JSON.
-func YAMLToJSON(y []byte) ([]byte, error) {
-	return yamlToJSON(y, nil)
-}
-
-func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) {
-	// Convert the YAML to an object.
-	var yamlObj interface{}
-	err := yaml.Unmarshal(y, &yamlObj)
-	if err != nil {
-		return nil, err
-	}
-
-	// YAML objects are not completely compatible with JSON objects (e.g. you
-	// can have non-string keys in YAML). So, convert the YAML-compatible object
-	// to a JSON-compatible object, failing with an error if irrecoverable
-	// incompatibilties happen along the way.
-	jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget)
-	if err != nil {
-		return nil, err
-	}
-
-	// Convert this object to JSON and return the data.
-	return json.Marshal(jsonObj)
-}
-
-func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) {
-	var err error
-
-	// Resolve jsonTarget to a concrete value (i.e. not a pointer or an
-	// interface). We pass decodingNull as false because we're not actually
-	// decoding into the value, we're just checking if the ultimate target is a
-	// string.
-	if jsonTarget != nil {
-		ju, tu, pv := indirect(*jsonTarget, false)
-		// We have a JSON or Text Umarshaler at this level, so we can't be trying
-		// to decode into a string.
-		if ju != nil || tu != nil {
-			jsonTarget = nil
-		} else {
-			jsonTarget = &pv
-		}
-	}
-
-	// If yamlObj is a number or a boolean, check if jsonTarget is a string -
-	// if so, coerce.  Else return normal.
-	// If yamlObj is a map or array, find the field that each key is
-	// unmarshaling to, and when you recurse pass the reflect.Value for that
-	// field back into this function.
-	switch typedYAMLObj := yamlObj.(type) {
-	case map[interface{}]interface{}:
-		// JSON does not support arbitrary keys in a map, so we must convert
-		// these keys to strings.
-		//
-		// From my reading of go-yaml v2 (specifically the resolve function),
-		// keys can only have the types string, int, int64, float64, binary
-		// (unsupported), or null (unsupported).
-		strMap := make(map[string]interface{})
-		for k, v := range typedYAMLObj {
-			// Resolve the key to a string first.
-			var keyString string
-			switch typedKey := k.(type) {
-			case string:
-				keyString = typedKey
-			case int:
-				keyString = strconv.Itoa(typedKey)
-			case int64:
-				// go-yaml will only return an int64 as a key if the system
-				// architecture is 32-bit and the key's value is between 32-bit
-				// and 64-bit. Otherwise the key type will simply be int.
-				keyString = strconv.FormatInt(typedKey, 10)
-			case float64:
-				// Stolen from go-yaml to use the same conversion to string as
-				// the go-yaml library uses to convert float to string when
-				// Marshaling.
-				s := strconv.FormatFloat(typedKey, 'g', -1, 32)
-				switch s {
-				case "+Inf":
-					s = ".inf"
-				case "-Inf":
-					s = "-.inf"
-				case "NaN":
-					s = ".nan"
-				}
-				keyString = s
-			case bool:
-				if typedKey {
-					keyString = "true"
-				} else {
-					keyString = "false"
-				}
-			default:
-				return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v",
-					reflect.TypeOf(k), k, v)
-			}
-
-			// jsonTarget should be a struct or a map. If it's a struct, find
-			// the field it's going to map to and pass its reflect.Value. If
-			// it's a map, find the element type of the map and pass the
-			// reflect.Value created from that type. If it's neither, just pass
-			// nil - JSON conversion will error for us if it's a real issue.
-			if jsonTarget != nil {
-				t := *jsonTarget
-				if t.Kind() == reflect.Struct {
-					keyBytes := []byte(keyString)
-					// Find the field that the JSON library would use.
-					var f *field
-					fields := cachedTypeFields(t.Type())
-					for i := range fields {
-						ff := &fields[i]
-						if bytes.Equal(ff.nameBytes, keyBytes) {
-							f = ff
-							break
-						}
-						// Do case-insensitive comparison.
-						if f == nil && ff.equalFold(ff.nameBytes, keyBytes) {
-							f = ff
-						}
-					}
-					if f != nil {
-						// Find the reflect.Value of the most preferential
-						// struct field.
-						jtf := t.Field(f.index[0])
-						strMap[keyString], err = convertToJSONableObject(v, &jtf)
-						if err != nil {
-							return nil, err
-						}
-						continue
-					}
-				} else if t.Kind() == reflect.Map {
-					// Create a zero value of the map's element type to use as
-					// the JSON target.
-					jtv := reflect.Zero(t.Type().Elem())
-					strMap[keyString], err = convertToJSONableObject(v, &jtv)
-					if err != nil {
-						return nil, err
-					}
-					continue
-				}
-			}
-			strMap[keyString], err = convertToJSONableObject(v, nil)
-			if err != nil {
-				return nil, err
-			}
-		}
-		return strMap, nil
-	case []interface{}:
-		// We need to recurse into arrays in case there are any
-		// map[interface{}]interface{}'s inside and to convert any
-		// numbers to strings.
-
-		// If jsonTarget is a slice (which it really should be), find the
-		// thing it's going to map to. If it's not a slice, just pass nil
-		// - JSON conversion will error for us if it's a real issue.
-		var jsonSliceElemValue *reflect.Value
-		if jsonTarget != nil {
-			t := *jsonTarget
-			if t.Kind() == reflect.Slice {
-				// By default slices point to nil, but we need a reflect.Value
-				// pointing to a value of the slice type, so we create one here.
-				ev := reflect.Indirect(reflect.New(t.Type().Elem()))
-				jsonSliceElemValue = &ev
-			}
-		}
-
-		// Make and use a new array.
-		arr := make([]interface{}, len(typedYAMLObj))
-		for i, v := range typedYAMLObj {
-			arr[i], err = convertToJSONableObject(v, jsonSliceElemValue)
-			if err != nil {
-				return nil, err
-			}
-		}
-		return arr, nil
-	default:
-		// If the target type is a string and the YAML type is a number,
-		// convert the YAML type to a string.
-		if jsonTarget != nil && (*jsonTarget).Kind() == reflect.String {
-			// Based on my reading of go-yaml, it may return int, int64,
-			// float64, or uint64.
-			var s string
-			switch typedVal := typedYAMLObj.(type) {
-			case int:
-				s = strconv.FormatInt(int64(typedVal), 10)
-			case int64:
-				s = strconv.FormatInt(typedVal, 10)
-			case float64:
-				s = strconv.FormatFloat(typedVal, 'g', -1, 32)
-			case uint64:
-				s = strconv.FormatUint(typedVal, 10)
-			case bool:
-				if typedVal {
-					s = "true"
-				} else {
-					s = "false"
-				}
-			}
-			if len(s) > 0 {
-				yamlObj = interface{}(s)
-			}
-		}
-		return yamlObj, nil
-	}
-
-	return nil, nil
-}

+ 201 - 0
vendor/github.com/go-logr/logr/LICENSE

@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

+ 181 - 0
vendor/github.com/go-logr/logr/README.md

@@ -0,0 +1,181 @@
+# A more minimal logging API for Go
+
+Before you consider this package, please read [this blog post by the
+inimitable Dave Cheney][warning-makes-no-sense].  I really appreciate what
+he has to say, and it largely aligns with my own experiences.  Too many
+choices of levels means inconsistent logs.
+
+This package offers a purely abstract interface, based on these ideas but with
+a few twists.  Code can depend on just this interface and have the actual
+logging implementation be injected from callers.  Ideally only `main()` knows
+what logging implementation is being used.
+
+# Differences from Dave's ideas
+
+The main differences are:
+
+1) Dave basically proposes doing away with the notion of a logging API in favor
+of `fmt.Printf()`.  I disagree, especially when you consider things like output
+locations, timestamps, file and line decorations, and structured logging.  I
+restrict the API to just 2 types of logs: info and error.
+
+Info logs are things you want to tell the user which are not errors.  Error
+logs are, well, errors.  If your code receives an `error` from a subordinate
+function call and is logging that `error` *and not returning it*, use error
+logs.
+
+2) Verbosity-levels on info logs.  This gives developers a chance to indicate
+arbitrary grades of importance for info logs, without assigning names with
+semantic meaning such as "warning", "trace", and "debug".  Superficially this
+may feel very similar, but the primary difference is the lack of semantics.
+Because verbosity is a numerical value, it's safe to assume that an app running
+with higher verbosity means more (and less important) logs will be generated.
+
+This is a BETA grade API.
+
+There are implementations for the following logging libraries:
+
+- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr)
+- **k8s.io/klog**: [klogr](https://git.k8s.io/klog/klogr)
+- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr)
+- **log** (the Go standard library logger):
+  [stdr](https://github.com/go-logr/stdr)
+- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr)
+
+# FAQ
+
+## Conceptual
+
+## Why structured logging?
+
+- **Structured logs are more easily queriable**: Since you've got
+  key-value pairs, it's much easier to query your structured logs for
+  particular values by filtering on the contents of a particular key --
+  think searching request logs for error codes, Kubernetes reconcilers for
+  the name and namespace of the reconciled object, etc
+
+- **Structured logging makes it easier to have cross-referencable logs**:
+  Similarly to searchability, if you maintain conventions around your
+  keys, it becomes easy to gather all log lines related to a particular
+  concept.
+ 
+- **Structured logs allow better dimensions of filtering**: if you have
+  structure to your logs, you've got more precise control over how much
+  information is logged -- you might choose in a particular configuration
+  to log certain keys but not others, only log lines where a certain key
+  matches a certain value, etc, instead of just having v-levels and names
+  to key off of.
+
+- **Structured logs better represent structured data**: sometimes, the
+  data that you want to log is inherently structured (think tuple-link
+  objects).  Structured logs allow you to preserve that structure when
+  outputting.
+
+## Why V-levels?
+
+**V-levels give operators an easy way to control the chattiness of log
+operations**.  V-levels provide a way for a given package to distinguish
+the relative importance or verbosity of a given log message.  Then, if
+a particular logger or package is logging too many messages, the user
+of the package can simply change the v-levels for that library. 
+
+## Why not more named levels, like Warning?
+
+Read [Dave Cheney's post][warning-makes-no-sense].  Then read [Differences
+from Dave's ideas](#differences-from-daves-ideas).
+
+## Why not allow format strings, too?
+
+**Format strings negate many of the benefits of structured logs**:
+
+- They're not easily searchable without resorting to fuzzy searching,
+  regular expressions, etc
+
+- They don't store structured data well, since contents are flattened into
+  a string
+
+- They're not cross-referencable
+
+- They don't compress easily, since the message is not constant
+
+(unless you turn positional parameters into key-value pairs with numerical
+keys, at which point you've gotten key-value logging with meaningless
+keys)
+
+## Practical
+
+## Why key-value pairs, and not a map?
+
+Key-value pairs are *much* easier to optimize, especially around
+allocations.  Zap (a structured logger that inspired logr's interface) has
+[performance measurements](https://github.com/uber-go/zap#performance)
+that show this quite nicely.
+
+While the interface ends up being a little less obvious, you get
+potentially better performance, plus avoid making users type
+`map[string]string{}` every time they want to log.
+
+## What if my V-levels differ between libraries?
+
+That's fine.  Control your V-levels on a per-logger basis, and use the
+`WithName` function to pass different loggers to different libraries.
+
+Generally, you should take care to ensure that you have relatively
+consistent V-levels within a given logger, however, as this makes deciding
+on what verbosity of logs to request easier.
+
+## But I *really* want to use a format string!
+
+That's not actually a question.  Assuming your question is "how do
+I convert my mental model of logging with format strings to logging with
+constant messages":
+
+1. figure out what the error actually is, as you'd write in a TL;DR style,
+   and use that as a message
+
+2. For every place you'd write a format specifier, look to the word before
+   it, and add that as a key value pair
+
+For instance, consider the following examples (all taken from spots in the
+Kubernetes codebase):
+
+- `klog.V(4).Infof("Client is returning errors: code %v, error %v",
+  responseCode, err)` becomes `logger.Error(err, "client returned an
+  error", "code", responseCode)`
+
+- `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v",
+  seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after
+  response when requesting url", "attempt", retries, "after
+  seconds", seconds, "url", url)`
+
+If you *really* must use a format string, place it as a key value, and
+call `fmt.Sprintf` yourself -- for instance, `log.Printf("unable to
+reflect over type %T")` becomes `logger.Info("unable to reflect over
+type", "type", fmt.Sprintf("%T"))`.  In general though, the cases where
+this is necessary should be few and far between.
+
+## How do I choose my V-levels?
+
+This is basically the only hard constraint: increase V-levels to denote
+more verbose or more debug-y logs.
+
+Otherwise, you can start out with `0` as "you always want to see this",
+`1` as "common logging that you might *possibly* want to turn off", and
+`10` as "I would like to performance-test your log collection stack".
+
+Then gradually choose levels in between as you need them, working your way
+down from 10 (for debug and trace style logs) and up from 1 (for chattier
+info-type logs).
+
+## How do I choose my keys
+
+- make your keys human-readable
+- constant keys are generally a good idea
+- be consistent across your codebase
+- keys should naturally match parts of the message string
+
+While key names are mostly unrestricted (and spaces are acceptable),
+it's generally a good idea to stick to printable ascii characters, or at
+least match the general character set of your log lines.
+
+[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging

+ 3 - 0
vendor/github.com/go-logr/logr/go.mod

@@ -0,0 +1,3 @@
+module github.com/go-logr/logr
+
+go 1.14

+ 178 - 0
vendor/github.com/go-logr/logr/logr.go

@@ -0,0 +1,178 @@
+/*
+Copyright 2019 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package logr defines abstract interfaces for logging.  Packages can depend on
+// these interfaces and callers can implement logging in whatever way is
+// appropriate.
+//
+// This design derives from Dave Cheney's blog:
+//     http://dave.cheney.net/2015/11/05/lets-talk-about-logging
+//
+// This is a BETA grade API.  Until there is a significant 2nd implementation,
+// I don't really know how it will change.
+//
+// The logging specifically makes it non-trivial to use format strings, to encourage
+// attaching structured information instead of unstructured format strings.
+//
+// Usage
+//
+// Logging is done using a Logger.  Loggers can have name prefixes and named
+// values attached, so that all log messages logged with that Logger have some
+// base context associated.
+//
+// The term "key" is used to refer to the name associated with a particular
+// value, to disambiguate it from the general Logger name.
+//
+// For instance, suppose we're trying to reconcile the state of an object, and
+// we want to log that we've made some decision.
+//
+// With the traditional log package, we might write:
+//  log.Printf(
+//      "decided to set field foo to value %q for object %s/%s",
+//       targetValue, object.Namespace, object.Name)
+//
+// With logr's structured logging, we'd write:
+//  // elsewhere in the file, set up the logger to log with the prefix of "reconcilers",
+//  // and the named value target-type=Foo, for extra context.
+//  log := mainLogger.WithName("reconcilers").WithValues("target-type", "Foo")
+//
+//  // later on...
+//  log.Info("setting field foo on object", "value", targetValue, "object", object)
+//
+// Depending on our logging implementation, we could then make logging decisions
+// based on field values (like only logging such events for objects in a certain
+// namespace), or copy the structured information into a structured log store.
+//
+// For logging errors, Logger has a method called Error.  Suppose we wanted to
+// log an error while reconciling.  With the traditional log package, we might
+// write:
+//   log.Errorf("unable to reconcile object %s/%s: %v", object.Namespace, object.Name, err)
+//
+// With logr, we'd instead write:
+//   // assuming the above setup for log
+//   log.Error(err, "unable to reconcile object", "object", object)
+//
+// This functions similarly to:
+//   log.Info("unable to reconcile object", "error", err, "object", object)
+//
+// However, it ensures that a standard key for the error value ("error") is used
+// across all error logging.  Furthermore, certain implementations may choose to
+// attach additional information (such as stack traces) on calls to Error, so
+// it's preferred to use Error to log errors.
+//
+// Parts of a log line
+//
+// Each log message from a Logger has four types of context:
+// logger name, log verbosity, log message, and the named values.
+//
+// The Logger name constists of a series of name "segments" added by successive
+// calls to WithName.  These name segments will be joined in some way by the
+// underlying implementation.  It is strongly reccomended that name segements
+// contain simple identifiers (letters, digits, and hyphen), and do not contain
+// characters that could muddle the log output or confuse the joining operation
+// (e.g.  whitespace, commas, periods, slashes, brackets, quotes, etc).
+//
+// Log verbosity represents how little a log matters.  Level zero, the default,
+// matters most.  Increasing levels matter less and less.  Try to avoid lots of
+// different verbosity levels, and instead provide useful keys, logger names,
+// and log messages for users to filter on.  It's illegal to pass a log level
+// below zero.
+//
+// The log message consists of a constant message attached to the the log line.
+// This should generally be a simple description of what's occuring, and should
+// never be a format string.
+//
+// Variable information can then be attached using named values (key/value
+// pairs).  Keys are arbitrary strings, while values may be any Go value.
+//
+// Key Naming Conventions
+//
+// Keys are not strictly required to conform to any specification or regex, but
+// it is recommended that they:
+//   * be human-readable and meaningful (not auto-generated or simple ordinals)
+//   * be constant (not dependent on input data)
+//   * contain only printable characters
+//   * not contain whitespace or punctuation
+//
+// These guidelines help ensure that log data is processed properly regardless
+// of the log implementation.  For example, log implementations will try to
+// output JSON data or will store data for later database (e.g. SQL) queries.
+//
+// While users are generally free to use key names of their choice, it's
+// generally best to avoid using the following keys, as they're frequently used
+// by implementations:
+//
+// - `"caller"`: the calling information (file/line) of a particular log line.
+// - `"error"`: the underlying error value in the `Error` method.
+// - `"level"`: the log level.
+// - `"logger"`: the name of the associated logger.
+// - `"msg"`: the log message.
+// - `"stacktrace"`: the stack trace associated with a particular log line or
+//                   error (often from the `Error` message).
+// - `"ts"`: the timestamp for a log line.
+//
+// Implementations are encouraged to make use of these keys to represent the
+// above concepts, when neccessary (for example, in a pure-JSON output form, it
+// would be necessary to represent at least message and timestamp as ordinary
+// named values).
+package logr
+
+// TODO: consider adding back in format strings if they're really needed
+// TODO: consider other bits of zap/zapcore functionality like ObjectMarshaller (for arbitrary objects)
+// TODO: consider other bits of glog functionality like Flush, InfoDepth, OutputStats
+
+// Logger represents the ability to log messages, both errors and not.
+type Logger interface {
+	// Enabled tests whether this Logger is enabled.  For example, commandline
+	// flags might be used to set the logging verbosity and disable some info
+	// logs.
+	Enabled() bool
+
+	// Info logs a non-error message with the given key/value pairs as context.
+	//
+	// The msg argument should be used to add some constant description to
+	// the log line.  The key/value pairs can then be used to add additional
+	// variable information.  The key/value pairs should alternate string
+	// keys and arbitrary values.
+	Info(msg string, keysAndValues ...interface{})
+
+	// Error logs an error, with the given message and key/value pairs as context.
+	// It functions similarly to calling Info with the "error" named value, but may
+	// have unique behavior, and should be preferred for logging errors (see the
+	// package documentations for more information).
+	//
+	// The msg field should be used to add context to any underlying error,
+	// while the err field should be used to attach the actual error that
+	// triggered this log line, if present.
+	Error(err error, msg string, keysAndValues ...interface{})
+
+	// V returns an Logger value for a specific verbosity level, relative to
+	// this Logger.  In other words, V values are additive.  V higher verbosity
+	// level means a log message is less important.  It's illegal to pass a log
+	// level less than zero.
+	V(level int) Logger
+
+	// WithValues adds some key-value pairs of context to a logger.
+	// See Info for documentation on how key/value pairs work.
+	WithValues(keysAndValues ...interface{}) Logger
+
+	// WithName adds a new element to the logger's name.
+	// Successive calls with WithName continue to append
+	// suffixes to the logger's name.  It's strongly reccomended
+	// that name segments contain only letters, digits, and hyphens
+	// (see the package documentation for more information).
+	WithName(name string) Logger
+}

+ 0 - 1
vendor/github.com/go-openapi/jsonpointer/.drone.sec

@@ -1 +0,0 @@
-eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.pDqezepze0YqRx4u6M8GFaWtnVR-utTWZic-GX-RvMATAoYpG4H2sc9tlnGNCxa44dbRY0vY10qfBU7Sno8vkp21fsK42ofGLfen_suum_0ilm0sFS0X-kAwk7TIq5L5lPPKiChPMUiGp5oJW-g5MqMFX1jNiI-4fP-vSM3B3-eyZtJD_O517TgfIRLnblCzqwIkyRmAfPNopi-Fe8Y31TmO2Vd0nFc1Aqro_VaJSACzEVxOHTNpjETcMjlYzwgMXLeiAfLV-5hM0f6DXgHMlLSuMkB_Ndnw25dkB7hreGk4x0tHQ3X9mUfTgLq1hIDoyeeKDIM83Tqw4LBRph20BQ.qd_pNuyi23B0PlWz.JtpO7kqOm0SWOGzWDalkWheHuNd-eDpVbqI9WPAEFDOIBvz7TbsYMBlIYVWEGWbat4mkx_ejxnMn1L1l996NJnyP7eY-QE82cfPJbjx94d0Ob70KZ4DCm_UxcY2t-OKFiPJqxW7MA5jKyDuGD16bdxpjLEoe_cMSEr8FNu-MVG6wcchPcyYyRkqTQSl4mb09KikkAzHjwjo-DcO0f8ps4Uzsoc0aqAAWdE-ocG0YqierLoemjusYMiLH-eLF6MvaLRvHSte-cLzPuYCeZURnBDgxu3i3UApgddnX7g1c7tdGGBGvgCl-tEEDW58Vxgdjksim2S7y3lfoJ8FFzSWeRH2y7Kq04hgew3b2J_RiDB9ejzIopzG8ZGjJa3EO1-i9ORTl12nXK1RdlLGqu604ENaeVOPCIHL-0C8e6_wHdUGHydLZImSxKYSrNvy8resP1D_9t4B-3q2mkS9mhnMONrXbPDVw5QY5mvXlWs0Db99ARwzsl-Qlu0A_tsZwMjWT2I1QMvWPyTRScmMm0FJSv9zStjzxWa_q2GL7Naz1fI4Dd6ZgNJWYYq-mHN5chEeBdIcwb_zMPHczMQXXNL5nmfRGM1aPffkToFWCDpIlI8IXec83ZC6_POxZegS6n9Drrvc.6Nz8EXxs1lWX3ASaCeNElA

+ 0 - 32
vendor/github.com/go-openapi/jsonpointer/.drone.yml

@@ -1,32 +0,0 @@
-clone:
-  path: github.com/go-openapi/jsonpointer
-
-matrix:
-  GO_VERSION:
-    - "1.6"
-
-build:
-  integration:
-    image: golang:$$GO_VERSION
-    pull: true
-    commands:
-      - go get -u github.com/stretchr/testify/assert
-      - go get -u github.com/go-openapi/swag
-      - go test -race
-      - go test -v -cover -coverprofile=coverage.out -covermode=count ./...
-
-notify:
-  slack:
-    channel: bots
-    webhook_url: $$SLACK_URL
-    username: drone
-
-publish:
-  coverage:
-    server: https://coverage.vmware.run
-    token: $$GITHUB_TOKEN
-    # threshold: 70
-    # must_increase: true
-    when:
-      matrix:
-        GO_VERSION: "1.6"

+ 0 - 1
vendor/github.com/go-openapi/jsonpointer/.gitignore

@@ -1 +0,0 @@
-secrets.yml

+ 0 - 13
vendor/github.com/go-openapi/jsonpointer/.pullapprove.yml

@@ -1,13 +0,0 @@
-approve_by_comment: true
-approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)'
-reject_regex: ^[Rr]ejected
-reset_on_push: false
-reviewers:
-  members:
-  - casualjim
-  - chancez
-  - frapposelli
-  - vburenin
-  - pytlesk4
-  name: pullapprove
-  required: 1

+ 0 - 74
vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md

@@ -1,74 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
-  address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
-  professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at ivan+abuse@flanders.co.nz. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/

+ 0 - 15
vendor/github.com/go-openapi/jsonpointer/README.md

@@ -1,15 +0,0 @@
-# gojsonpointer [![Build Status](https://ci.vmware.run/api/badges/go-openapi/jsonpointer/status.svg)](https://ci.vmware.run/go-openapi/jsonpointer) [![Coverage](https://coverage.vmware.run/badges/go-openapi/jsonpointer/coverage.svg)](https://coverage.vmware.run/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io)
-
-[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer)
-An implementation of JSON Pointer - Go language
-
-## Status
-Completed YES
-
-Tested YES
-
-## References
-http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
-
-### Note
-The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented.

+ 0 - 238
vendor/github.com/go-openapi/jsonpointer/pointer.go

@@ -1,238 +0,0 @@
-// Copyright 2013 sigu-399 ( https://github.com/sigu-399 )
-//
-// 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.
-
-// author       sigu-399
-// author-github  https://github.com/sigu-399
-// author-mail    sigu.399@gmail.com
-//
-// repository-name  jsonpointer
-// repository-desc  An implementation of JSON Pointer - Go language
-//
-// description    Main and unique file.
-//
-// created        25-02-2013
-
-package jsonpointer
-
-import (
-	"errors"
-	"fmt"
-	"reflect"
-	"strconv"
-	"strings"
-
-	"github.com/go-openapi/swag"
-)
-
-const (
-	emptyPointer     = ``
-	pointerSeparator = `/`
-
-	invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator
-)
-
-var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem()
-
-// JSONPointable is an interface for structs to implement when they need to customize the
-// json pointer process
-type JSONPointable interface {
-	JSONLookup(string) (interface{}, error)
-}
-
-type implStruct struct {
-	mode string // "SET" or "GET"
-
-	inDocument interface{}
-
-	setInValue interface{}
-
-	getOutNode interface{}
-	getOutKind reflect.Kind
-	outError   error
-}
-
-// New creates a new json pointer for the given string
-func New(jsonPointerString string) (Pointer, error) {
-
-	var p Pointer
-	err := p.parse(jsonPointerString)
-	return p, err
-
-}
-
-// Pointer the json pointer reprsentation
-type Pointer struct {
-	referenceTokens []string
-}
-
-// "Constructor", parses the given string JSON pointer
-func (p *Pointer) parse(jsonPointerString string) error {
-
-	var err error
-
-	if jsonPointerString != emptyPointer {
-		if !strings.HasPrefix(jsonPointerString, pointerSeparator) {
-			err = errors.New(invalidStart)
-		} else {
-			referenceTokens := strings.Split(jsonPointerString, pointerSeparator)
-			for _, referenceToken := range referenceTokens[1:] {
-				p.referenceTokens = append(p.referenceTokens, referenceToken)
-			}
-		}
-	}
-
-	return err
-}
-
-// Get uses the pointer to retrieve a value from a JSON document
-func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) {
-	return p.get(document, swag.DefaultJSONNameProvider)
-}
-
-// GetForToken gets a value for a json pointer token 1 level deep
-func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) {
-	return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider)
-}
-
-func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) {
-	kind := reflect.Invalid
-	rValue := reflect.Indirect(reflect.ValueOf(node))
-	kind = rValue.Kind()
-	switch kind {
-
-	case reflect.Struct:
-		if rValue.Type().Implements(jsonPointableType) {
-			r, err := node.(JSONPointable).JSONLookup(decodedToken)
-			if err != nil {
-				return nil, kind, err
-			}
-			return r, kind, nil
-		}
-		nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
-		if !ok {
-			return nil, kind, fmt.Errorf("object has no field %q", decodedToken)
-		}
-		fld := rValue.FieldByName(nm)
-		return fld.Interface(), kind, nil
-
-	case reflect.Map:
-		kv := reflect.ValueOf(decodedToken)
-		mv := rValue.MapIndex(kv)
-		if mv.IsValid() && !swag.IsZero(mv) {
-			return mv.Interface(), kind, nil
-		}
-		return nil, kind, fmt.Errorf("object has no key %q", decodedToken)
-
-	case reflect.Slice:
-		tokenIndex, err := strconv.Atoi(decodedToken)
-		if err != nil {
-			return nil, kind, err
-		}
-		sLength := rValue.Len()
-		if tokenIndex < 0 || tokenIndex >= sLength {
-			return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex)
-		}
-
-		elem := rValue.Index(tokenIndex)
-		return elem.Interface(), kind, nil
-
-	default:
-		return nil, kind, fmt.Errorf("invalid token reference %q", decodedToken)
-	}
-
-}
-
-func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) {
-
-	if nameProvider == nil {
-		nameProvider = swag.DefaultJSONNameProvider
-	}
-
-	kind := reflect.Invalid
-
-	// Full document when empty
-	if len(p.referenceTokens) == 0 {
-		return node, kind, nil
-	}
-
-	for _, token := range p.referenceTokens {
-
-		decodedToken := Unescape(token)
-
-		r, knd, err := getSingleImpl(node, decodedToken, nameProvider)
-		if err != nil {
-			return nil, knd, err
-		}
-		node, kind = r, knd
-
-	}
-
-	rValue := reflect.ValueOf(node)
-	kind = rValue.Kind()
-
-	return node, kind, nil
-}
-
-// DecodedTokens returns the decoded tokens
-func (p *Pointer) DecodedTokens() []string {
-	result := make([]string, 0, len(p.referenceTokens))
-	for _, t := range p.referenceTokens {
-		result = append(result, Unescape(t))
-	}
-	return result
-}
-
-// IsEmpty returns true if this is an empty json pointer
-// this indicates that it points to the root document
-func (p *Pointer) IsEmpty() bool {
-	return len(p.referenceTokens) == 0
-}
-
-// Pointer to string representation function
-func (p *Pointer) String() string {
-
-	if len(p.referenceTokens) == 0 {
-		return emptyPointer
-	}
-
-	pointerString := pointerSeparator + strings.Join(p.referenceTokens, pointerSeparator)
-
-	return pointerString
-}
-
-// Specific JSON pointer encoding here
-// ~0 => ~
-// ~1 => /
-// ... and vice versa
-
-const (
-	encRefTok0 = `~0`
-	encRefTok1 = `~1`
-	decRefTok0 = `~`
-	decRefTok1 = `/`
-)
-
-// Unescape unescapes a json pointer reference token string to the original representation
-func Unescape(token string) string {
-	step1 := strings.Replace(token, encRefTok1, decRefTok1, -1)
-	step2 := strings.Replace(step1, encRefTok0, decRefTok0, -1)
-	return step2
-}
-
-// Escape escapes a pointer reference token string
-func Escape(token string) string {
-	step1 := strings.Replace(token, decRefTok0, encRefTok0, -1)
-	step2 := strings.Replace(step1, decRefTok1, encRefTok1, -1)
-	return step2
-}

+ 0 - 1
vendor/github.com/go-openapi/jsonreference/.drone.sec

@@ -1 +0,0 @@
-eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.Xe40Wx6g5Y-iN0JVMhKyFfubtOId3zAVE564szw_yYGzFNhc_cGZO9F3BtAcJ55CfHG9C_ozn9dpnUDl_zYZoy_6cPCq13Ekb95z8NAC3ekDtbAATsc9HZwRNwI7UfkhstdwxljEouGB01qoLcUn6lFutrou-Ho21COHeDb2caemnPSA-rEAnXkOiBFu0RQ1MIwMygzvHXIHHYNpNwAtXqmiggM10miSjqBM3JmRPxCi7VK6_Rxij5p6LlhmK1BDi8Y6oBh-9BX3--5GAJeWZ6Vof5TnP-Enioia18j8c8KFtfY4q0y6Ednjb-AarLZ12gj695ppkBNJUdTJQmwGwA.fVcz_RiLrUB5fgMS.rjWllDYC6m_NB-ket_LizNEy9mlJ27odBTZQcMKaUqqXZBtWUCmPrOoMXGq-_cc-c7chg7D-WMh9SPQ23pV0P-DY-jsDpbOqHG2STOMEfW9ZREoaOLJXQaWcuBldLjRyWFcq0HGj97LgE6szD1Zlou3bmdHS_Q-U9Up9YQ_8_YnDcESD_cj1w5FZom7HjchKJFeGjQjfDQpoCKCQNMJaavUqy9jHQEeQ_uVocSrETg3GpewDcUF2tuv8uGq7ZZWu7Vl8zmnY1MFTynaGBWzTCSRmCkAXjcsaUheDP_NT5D7k-xUS6LwtqEUiXAXV07SNFraorFj5lnBQZRDlZMYcA3NWR6zHiOxekR9LBYPofst6w1rIqUchj_5m1tDpVTBMPir1eAaFcnJtPgo4ch17OF-kmcmQGLhJI3U7n8wv4sTrmP1dewtRRKrvlJe5r3_6eDiK4xZ8K0rnK1D4g6zuQqU1gA8KaU7pmZkKpFx3Bew4v-6DH32YwQBvAI7Lbb8afou9WsCNB_iswz5XGimP4bifiJRwpWBEz9VGhZFdiw-hZpYWgbxzVb5gtqfTDLIvpbLDmFz1vge16uUQHHVFpo1pSozyr7A60X8qsh9pmmO3RcJ-ZGZBWqiRC-Kl5ejz7WQ.LFoK4Ibi11B2lWQ5WcPSag

+ 0 - 33
vendor/github.com/go-openapi/jsonreference/.drone.yml

@@ -1,33 +0,0 @@
-clone:
-  path: github.com/go-openapi/jsonreference
-
-matrix:
-  GO_VERSION:
-    - "1.6"
-
-build:
-  integration:
-    image: golang:$$GO_VERSION
-    pull: true
-    commands:
-      - go get -u github.com/stretchr/testify/assert
-      - go get -u github.com/PuerkitoBio/purell
-      - go get -u github.com/go-openapi/jsonpointer
-      - go test -race
-      - go test -v -cover -coverprofile=coverage.out -covermode=count ./...
-
-notify:
-  slack:
-    channel: bots
-    webhook_url: $$SLACK_URL
-    username: drone
-
-publish:
-  coverage:
-    server: https://coverage.vmware.run
-    token: $$GITHUB_TOKEN
-    # threshold: 70
-    # must_increase: true
-    when:
-      matrix:
-        GO_VERSION: "1.6"

+ 0 - 1
vendor/github.com/go-openapi/jsonreference/.gitignore

@@ -1 +0,0 @@
-secrets.yml

+ 0 - 13
vendor/github.com/go-openapi/jsonreference/.pullapprove.yml

@@ -1,13 +0,0 @@
-approve_by_comment: true
-approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)'
-reject_regex: ^[Rr]ejected
-reset_on_push: false
-reviewers:
-  members:
-  - casualjim
-  - chancez
-  - frapposelli
-  - vburenin
-  - pytlesk4
-  name: pullapprove
-  required: 1

+ 0 - 74
vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md

@@ -1,74 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
-  address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
-  professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at ivan+abuse@flanders.co.nz. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/

+ 0 - 15
vendor/github.com/go-openapi/jsonreference/README.md

@@ -1,15 +0,0 @@
-# gojsonreference [![Build Status](https://ci.vmware.run/api/badges/go-openapi/jsonreference/status.svg)](https://ci.vmware.run/go-openapi/jsonreference) [![Coverage](https://coverage.vmware.run/badges/go-openapi/jsonreference/coverage.svg)](https://coverage.vmware.run/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io)
-
-[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference)
-An implementation of JSON Reference - Go language
-
-## Status
-Work in progress ( 90% done )
-
-## Dependencies
-https://github.com/xeipuuv/gojsonpointer
-
-## References
-http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
-
-http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03

+ 0 - 156
vendor/github.com/go-openapi/jsonreference/reference.go

@@ -1,156 +0,0 @@
-// Copyright 2013 sigu-399 ( https://github.com/sigu-399 )
-//
-// 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.
-
-// author       sigu-399
-// author-github  https://github.com/sigu-399
-// author-mail    sigu.399@gmail.com
-//
-// repository-name  jsonreference
-// repository-desc  An implementation of JSON Reference - Go language
-//
-// description    Main and unique file.
-//
-// created        26-02-2013
-
-package jsonreference
-
-import (
-	"errors"
-	"net/url"
-	"strings"
-
-	"github.com/PuerkitoBio/purell"
-	"github.com/go-openapi/jsonpointer"
-)
-
-const (
-	fragmentRune = `#`
-)
-
-// New creates a new reference for the given string
-func New(jsonReferenceString string) (Ref, error) {
-
-	var r Ref
-	err := r.parse(jsonReferenceString)
-	return r, err
-
-}
-
-// MustCreateRef parses the ref string and panics when it's invalid.
-// Use the New method for a version that returns an error
-func MustCreateRef(ref string) Ref {
-	r, err := New(ref)
-	if err != nil {
-		panic(err)
-	}
-	return r
-}
-
-// Ref represents a json reference object
-type Ref struct {
-	referenceURL     *url.URL
-	referencePointer jsonpointer.Pointer
-
-	HasFullURL      bool
-	HasURLPathOnly  bool
-	HasFragmentOnly bool
-	HasFileScheme   bool
-	HasFullFilePath bool
-}
-
-// GetURL gets the URL for this reference
-func (r *Ref) GetURL() *url.URL {
-	return r.referenceURL
-}
-
-// GetPointer gets the json pointer for this reference
-func (r *Ref) GetPointer() *jsonpointer.Pointer {
-	return &r.referencePointer
-}
-
-// String returns the best version of the url for this reference
-func (r *Ref) String() string {
-
-	if r.referenceURL != nil {
-		return r.referenceURL.String()
-	}
-
-	if r.HasFragmentOnly {
-		return fragmentRune + r.referencePointer.String()
-	}
-
-	return r.referencePointer.String()
-}
-
-// IsRoot returns true if this reference is a root document
-func (r *Ref) IsRoot() bool {
-	return r.referenceURL != nil &&
-		!r.IsCanonical() &&
-		!r.HasURLPathOnly &&
-		r.referenceURL.Fragment == ""
-}
-
-// IsCanonical returns true when this pointer starts with http(s):// or file://
-func (r *Ref) IsCanonical() bool {
-	return (r.HasFileScheme && r.HasFullFilePath) || (!r.HasFileScheme && r.HasFullURL)
-}
-
-// "Constructor", parses the given string JSON reference
-func (r *Ref) parse(jsonReferenceString string) error {
-
-	parsed, err := url.Parse(jsonReferenceString)
-	if err != nil {
-		return err
-	}
-
-	r.referenceURL, _ = url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes))
-	refURL := r.referenceURL
-
-	if refURL.Scheme != "" && refURL.Host != "" {
-		r.HasFullURL = true
-	} else {
-		if refURL.Path != "" {
-			r.HasURLPathOnly = true
-		} else if refURL.RawQuery == "" && refURL.Fragment != "" {
-			r.HasFragmentOnly = true
-		}
-	}
-
-	r.HasFileScheme = refURL.Scheme == "file"
-	r.HasFullFilePath = strings.HasPrefix(refURL.Path, "/")
-
-	// invalid json-pointer error means url has no json-pointer fragment. simply ignore error
-	r.referencePointer, _ = jsonpointer.New(refURL.Fragment)
-
-	return nil
-}
-
-// Inherits creates a new reference from a parent and a child
-// If the child cannot inherit from the parent, an error is returned
-func (r *Ref) Inherits(child Ref) (*Ref, error) {
-	childURL := child.GetURL()
-	parentURL := r.GetURL()
-	if childURL == nil {
-		return nil, errors.New("child url is nil")
-	}
-	if parentURL == nil {
-		return &child, nil
-	}
-
-	ref, err := New(parentURL.ResolveReference(childURL).String())
-	if err != nil {
-		return nil, err
-	}
-	return &ref, nil
-}

部分文件因文件數量過多而無法顯示