diff --git a/go.mod b/go.mod index 749c14fbb0..2472c9c94a 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.15 require ( contrib.go.opencensus.io/exporter/jaeger v0.2.1 github.com/GeertJohan/go.rice v1.0.0 - github.com/asticode/go-astikit v0.9.1 + github.com/asticode/go-astikit v0.37.0 github.com/asticode/go-astilectron v0.18.0 github.com/asticode/go-astilectron-bundler v0.7.2 github.com/davecgh/go-spew v1.1.1 diff --git a/go.sum b/go.sum index 65ecb51aba..f8427eb9b2 100644 --- a/go.sum +++ b/go.sum @@ -4,14 +4,12 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR 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 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= @@ -63,15 +61,12 @@ github.com/GeertJohan/go.incremental v1.0.0 h1:7AH+pY1XUgQE4Y1HcXYaMqAI0m9yrFqo/ github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw= @@ -86,11 +81,10 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asticode/go-astikit v0.6.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0= -github.com/asticode/go-astikit v0.9.1 h1:MtugT/oCfBW9w9+R2mnWCxNYCR/EJbs0TzY8AgEdRWo= -github.com/asticode/go-astikit v0.9.1/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0= +github.com/asticode/go-astikit v0.37.0 h1:FaMrY4m+xUTHgwLdgNbDuEFG27UVJTSlWdPqbRsmgOM= +github.com/asticode/go-astikit v0.37.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0= github.com/asticode/go-astilectron v0.18.0 h1:4Hc069d3/8La+nWt5o/WWYmNiYfzfGGzC1ErAuL2Wq0= github.com/asticode/go-astilectron v0.18.0/go.mod h1:bF7zkk11IwP8lBPhEl3cCtkKIwsRRR6264OFM1v3Yso= github.com/asticode/go-astilectron-bundler v0.7.2 h1:0/h8rbZyTlywjnG3XGeENe4Pv0/deasZFjkG5iciWBM= @@ -99,16 +93,12 @@ github.com/asticode/go-bindata v1.0.0 h1:5whO0unjdx2kbAbzoBMS3307jKAEf3oQ1lJcx5R github.com/asticode/go-bindata v1.0.0/go.mod h1:t/Y+/iCLrvaYkv8Y6PscRnyUeYzy9y9+8JC9CMcKdHY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -118,17 +108,13 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -161,7 +147,6 @@ github.com/elazarl/goproxy v0.0.0-20190703090003-6125c262ffb0/go.mod h1:/Zj4wYkg github.com/elazarl/goproxy/ext v0.0.0-20190703090003-6125c262ffb0 h1:ht1Fo9uxmemH6/Or11+OosQxf6UKeauPI6Ure8KVuWw= github.com/elazarl/goproxy/ext v0.0.0-20190703090003-6125c262ffb0/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -187,9 +172,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= 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-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -197,58 +180,47 @@ github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70t github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5 h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= @@ -260,7 +232,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -269,7 +240,6 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= @@ -285,7 +255,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU 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/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -295,16 +264,13 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ 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/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/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/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -319,7 +285,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -343,7 +308,6 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -357,7 +321,6 @@ github.com/hashicorp/go-hclog v0.14.1 h1:nQcJDQwIAGnmoUWp8ubocEX40cCml/17YkF6csQ github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= @@ -412,11 +375,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= 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/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -428,7 +389,6 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= @@ -440,7 +400,6 @@ github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW1 github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -452,7 +411,6 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -464,7 +422,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= @@ -486,7 +443,6 @@ 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/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -504,22 +460,18 @@ github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prY github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -551,7 +503,6 @@ github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= @@ -599,32 +550,26 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5 h1:Gqga3zA9tdAcfqobUGjSoCob5L3f8Dt5EuOp3ihNZko= go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= 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/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= @@ -640,7 +585,6 @@ golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/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/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -710,9 +654,7 @@ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -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/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201024042810-be3efd7ff127 h1:pZPp9+iYUqwYKLjht0SDBbRCRK/9gAXDy7pz5fRDpjo= @@ -721,7 +663,6 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG 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/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 h1:ld7aEMNHoBnnDAX15v1T6z31v8HwR2A9FYOuAhWqkwc= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -732,7 +673,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ 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/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -776,7 +716,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/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/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -785,14 +724,12 @@ golang.org/x/sys v0.0.0-20201024232916-9f70ab9862d5/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 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-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -851,7 +788,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d h1:W07d4xkoAUSNOkOzdzXCdFG golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -869,7 +805,6 @@ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= @@ -877,7 +812,6 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl 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/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= @@ -908,7 +842,6 @@ google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200624020401-64a14ca9d1ad h1:uAwc13+y0Y8QZLTYhLCu6lHhnG99ecQU5FYTj8zxAng= google.golang.org/genproto v0.0.0-20200624020401-64a14ca9d1ad/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -942,14 +875,12 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi 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= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= 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= @@ -961,7 +892,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -972,7 +902,6 @@ 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.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/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.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -986,7 +915,6 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh 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= -honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= @@ -996,38 +924,32 @@ k8s.io/apiextensions-apiserver v0.19.3 h1:WZxBypSHW4SdXHbdPTS/Jy7L2la6Niggs8BuU5 k8s.io/apiextensions-apiserver v0.19.3/go.mod h1:igVEkrE9TzInc1tYE7qSqxaLg/rEAp6B5+k9Q7+IC8Q= k8s.io/apimachinery v0.19.3 h1:bpIQXlKjB4cB/oNpnNnV+BybGPR7iP5oYpsOTEJ4hgc= k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apiserver v0.19.3 h1:H7KUbLD74rh8NOPMLBJPSEG3Djqcv6Zxn5Ud0AL5u/k= k8s.io/apiserver v0.19.3/go.mod h1:bx6dMm+H6ifgKFpCQT/SAhPwhzoeIMlHIaibomUDec0= k8s.io/client-go v0.19.3 h1:ctqR1nQ52NUs6LpI0w+a5U+xjYwflFwA13OJKcicMxg= k8s.io/client-go v0.19.3/go.mod h1:+eEMktZM+MG0KO+PTkci8xnbCZHvj9TqR6Q1XDUIJOM= k8s.io/code-generator v0.19.3/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/component-base v0.19.3 h1:c+DzDNAQFlaoyX+yv8YuWi8xmlQvvY5DnJGbaz5U74o= k8s.io/component-base v0.19.3/go.mod h1:WhLWSIefQn8W8jxSLl5WNiR6z8oyMe/8Zywg7alOkRc= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= 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/klog/v2 v2.3.0 h1:WmkrnW7fdrm0/DMClc+HIxtftvxVIPAhlVwMQo5yLco= k8s.io/klog/v2 v2.3.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-aggregator v0.19.3 h1:neDqyJ0tiP1RNhrS9Vk9o2Id/u5+TJX7BH0QBSkLYxc= k8s.io/kube-aggregator v0.19.3/go.mod h1:5KTkDBxx4YiAYUuqTGmwjH7v54hRdrykqzcPiF8hPJc= -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/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM= k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/metrics v0.19.3 h1:p/goUqtdCslX76mSNowzZkNxiKzNRQW4bUP02U34+QQ= k8s.io/metrics v0.19.3/go.mod h1:Eap/Lk1FiAIjkaArFuv41v+ph6dbDpVGwAg7jMI+4vg= -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= k8s.io/utils v0.0.0-20201015054608-420da100c033 h1:Pqyrvq79s/H2+6GSEIfeVHifPjJ03sVEggHnXw9KRMs= k8s.io/utils v0.0.0-20201015054608-420da100c033/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9 h1:rusRLrDhjBp6aYtl9sGEvQJr6faoHoDLd0YcUBTZguI= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= 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= diff --git a/vendor/github.com/asticode/go-astikit/.travis.yml b/vendor/github.com/asticode/go-astikit/.travis.yml index c64e331fd7..2dce7ea890 100644 --- a/vendor/github.com/asticode/go-astikit/.travis.yml +++ b/vendor/github.com/asticode/go-astikit/.travis.yml @@ -2,11 +2,12 @@ language: go go: - 1.x - tip +before_install: + - go install github.com/mattn/goveralls@latest install: - bash .travis.sh - go get -t ./... - go get golang.org/x/tools/cmd/cover -- go get github.com/mattn/goveralls matrix: allow_failures: - go: tip diff --git a/vendor/github.com/asticode/go-astikit/binary.go b/vendor/github.com/asticode/go-astikit/binary.go index d523db8306..d02d4a1f74 100644 --- a/vendor/github.com/asticode/go-astikit/binary.go +++ b/vendor/github.com/asticode/go-astikit/binary.go @@ -3,9 +3,7 @@ package astikit import ( "encoding/binary" "errors" - "fmt" "io" - "math" ) // BitsWriter represents an object that can write individual bits into a writer @@ -13,22 +11,31 @@ import ( // This is particularly helpful when you want to build a slice of bytes based // on individual bits for testing purposes. type BitsWriter struct { - bo binary.ByteOrder - rs []rune - w io.Writer + bo binary.ByteOrder + cache byte + cacheLen byte + bsCache []byte + w io.Writer + writeCb BitsWriterWriteCallback } +type BitsWriterWriteCallback func([]byte) + // BitsWriterOptions represents BitsWriter options type BitsWriterOptions struct { ByteOrder binary.ByteOrder - Writer io.Writer + // WriteCallback is called every time when full byte is written + WriteCallback BitsWriterWriteCallback + Writer io.Writer } // NewBitsWriter creates a new BitsWriter func NewBitsWriter(o BitsWriterOptions) (w *BitsWriter) { w = &BitsWriter{ - bo: o.ByteOrder, - w: o.Writer, + bo: o.ByteOrder, + bsCache: make([]byte, 1), + w: o.Writer, + writeCb: o.WriteCallback, } if w.bo == nil { w.bo = binary.BigEndian @@ -36,6 +43,10 @@ func NewBitsWriter(o BitsWriterOptions) (w *BitsWriter) { return } +func (w *BitsWriter) SetWriteCallback(cb BitsWriterWriteCallback) { + w.writeCb = cb +} + // Write writes bits into the writer. Bits are only written when there are // enough to create a byte. When using a string or a bool, bits are added // from left to right as if @@ -44,80 +55,250 @@ func NewBitsWriter(o BitsWriterOptions) (w *BitsWriter) { // - []byte: processed as n bytes, n being the length of the input // - bool: processed as one bit // - uint8/uint16/uint32/uint64: processed as n bits, if type is uintn -func (w *BitsWriter) Write(i interface{}) (err error) { +func (w *BitsWriter) Write(i interface{}) error { // Transform input into "10010" format - var s string + switch a := i.(type) { case string: - s = a - case []byte: - for _, b := range a { - s += fmt.Sprintf("%.8b", b) + for _, r := range a { + var err error + if r == '1' { + err = w.writeBit(1) + } else { + err = w.writeBit(0) + } + if err != nil { + return err + } } + case []byte: + return w.writeByteSlice(a) case bool: if a { - s = "1" + return w.writeBit(1) } else { - s = "0" + return w.writeBit(0) } case uint8: - s = fmt.Sprintf("%.8b", i) + return w.writeFullByte(a) case uint16: - s = fmt.Sprintf("%.16b", i) + return w.writeFullInt(uint64(a), 2) case uint32: - s = fmt.Sprintf("%.32b", i) + return w.writeFullInt(uint64(a), 4) case uint64: - s = fmt.Sprintf("%.64b", i) + return w.writeFullInt(a, 8) default: - err = errors.New("astikit: invalid type") - return + return errors.New("astikit: invalid type") } - // Loop through runes - for _, r := range s { - // Append rune - if w.bo == binary.LittleEndian { - w.rs = append([]rune{r}, w.rs...) - } else { - w.rs = append(w.rs, r) + return nil +} + +// Writes exactly n bytes from bs +// Writes first n bytes of bs if len(bs) > n +// Pads with padByte at the end if len(bs) < n +func (w *BitsWriter) WriteBytesN(bs []byte, n int, padByte uint8) error { + if n == 0 { + return nil + } + + if len(bs) >= n { + return w.writeByteSlice(bs[:n]) + } + + if err := w.writeByteSlice(bs); err != nil { + return err + } + + // no bytes.Repeat here to avoid allocation + for i := 0; i < n-len(bs); i++ { + if err := w.writeFullByte(padByte); err != nil { + return err } + } - // There are enough bits to form a byte - if len(w.rs) == 8 { - // Get value - v := w.val() + return nil +} - // Remove runes - w.rs = w.rs[8:] +func (w *BitsWriter) writeByteSlice(in []byte) error { + if len(in) == 0 { + return nil + } - // Write - if err = binary.Write(w.w, w.bo, v); err != nil { - return + if w.cacheLen != 0 { + for _, b := range in { + if err := w.writeFullByte(b); err != nil { + return err } } + } else { + return w.write(in) } - return + + return nil +} + +func (w *BitsWriter) write(b []byte) error { + if _, err := w.w.Write(b); err != nil { + return err + } + if w.writeCb != nil { + for i := range b { + w.writeCb(b[i : i+1]) + } + } + return nil } -func (w *BitsWriter) val() (v uint8) { - var power float64 - for idx := len(w.rs) - 1; idx >= 0; idx-- { - if w.rs[idx] == '1' { - v = v + uint8(math.Pow(2, power)) +func (w *BitsWriter) writeFullInt(in uint64, len int) error { + if w.bo == binary.BigEndian { + return w.writeBitsN(in, len*8) + } else { + for i := 0; i < len; i++ { + err := w.writeFullByte(byte(in >> (i * 8))) + if err != nil { + return err + } } - power++ } + + return nil +} + +func (w *BitsWriter) flushBsCache() error { + return w.write(w.bsCache) +} + +func (w *BitsWriter) writeFullByte(b byte) error { + if w.cacheLen == 0 { + w.bsCache[0] = b + } else { + w.bsCache[0] = w.cache | (b >> w.cacheLen) + w.cache = b << (8 - w.cacheLen) + } + return w.flushBsCache() +} + +func (w *BitsWriter) writeBit(bit byte) error { + if bit != 0 { + w.cache |= 1 << (7 - w.cacheLen) + } + w.cacheLen++ + if w.cacheLen == 8 { + w.bsCache[0] = w.cache + if err := w.flushBsCache(); err != nil { + return err + } + + w.cacheLen = 0 + w.cache = 0 + } + return nil +} + +func (w *BitsWriter) writeBitsN(toWrite uint64, n int) (err error) { + toWrite &= ^uint64(0) >> (64 - n) + + for n > 0 { + if w.cacheLen == 0 { + if n >= 8 { + n -= 8 + w.bsCache[0] = byte(toWrite >> n) + if err = w.flushBsCache(); err != nil { + return + } + } else { + w.cacheLen = uint8(n) + w.cache = byte(toWrite << (8 - w.cacheLen)) + n = 0 + } + } else { + free := int(8 - w.cacheLen) + m := n + if m >= free { + m = free + } + + if n <= free { + w.cache |= byte(toWrite << (free - m)) + } else { + w.cache |= byte(toWrite >> (n - m)) + } + + n -= m + w.cacheLen += uint8(m) + + if w.cacheLen == 8 { + w.bsCache[0] = w.cache + if err = w.flushBsCache(); err != nil { + return err + } + + w.cacheLen = 0 + w.cache = 0 + } + } + } + return } // WriteN writes the input into n bits func (w *BitsWriter) WriteN(i interface{}, n int) error { - switch i.(type) { - case uint8, uint16, uint32, uint64: - return w.Write(fmt.Sprintf(fmt.Sprintf("%%.%db", n), i)) + var toWrite uint64 + switch a := i.(type) { + case uint8: + toWrite = uint64(a) + case uint16: + toWrite = uint64(a) + case uint32: + toWrite = uint64(a) + case uint64: + toWrite = a default: return errors.New("astikit: invalid type") } + + return w.writeBitsN(toWrite, n) +} + +// BitsWriterBatch allows to chain multiple Write* calls and check for error only once +// For more info see https://github.com/asticode/go-astikit/pull/6 +type BitsWriterBatch struct { + err error + w *BitsWriter +} + +func NewBitsWriterBatch(w *BitsWriter) BitsWriterBatch { + return BitsWriterBatch{ + w: w, + } +} + +// Calls BitsWriter.Write if there was no write error before +func (b *BitsWriterBatch) Write(i interface{}) { + if b.err == nil { + b.err = b.w.Write(i) + } +} + +// Calls BitsWriter.WriteN if there was no write error before +func (b *BitsWriterBatch) WriteN(i interface{}, n int) { + if b.err == nil { + b.err = b.w.WriteN(i, n) + } +} + +// Calls BitsWriter.WriteBytesN if there was no write error before +func (b *BitsWriterBatch) WriteBytesN(bs []byte, n int, padByte uint8) { + if b.err == nil { + b.err = b.w.WriteBytesN(bs, n, padByte) + } +} + +// Returns first write error +func (b *BitsWriterBatch) Err() error { + return b.err } var byteHamming84Tab = [256]uint8{ diff --git a/vendor/github.com/asticode/go-astikit/bool.go b/vendor/github.com/asticode/go-astikit/bool.go new file mode 100644 index 0000000000..77363290c6 --- /dev/null +++ b/vendor/github.com/asticode/go-astikit/bool.go @@ -0,0 +1,8 @@ +package astikit + +func BoolToUInt32(b bool) uint32 { + if b { + return 1 + } + return 0 +} diff --git a/vendor/github.com/asticode/go-astikit/bytes.go b/vendor/github.com/asticode/go-astikit/bytes.go index 0a23f65008..155e2f06a2 100644 --- a/vendor/github.com/asticode/go-astikit/bytes.go +++ b/vendor/github.com/asticode/go-astikit/bytes.go @@ -39,6 +39,20 @@ func (i *BytesIterator) NextBytes(n int) (bs []byte, err error) { return } +// NextBytesNoCopy returns the n next bytes +// Be careful with this function as it doesn't make a copy of returned data. +// bs will point to internal BytesIterator buffer. +// If you need to modify returned bytes or store it for some time, use NextBytes instead +func (i *BytesIterator) NextBytesNoCopy(n int) (bs []byte, err error) { + if len(i.bs) < i.offset+n { + err = fmt.Errorf("astikit: slice length is %d, offset %d is invalid", len(i.bs), i.offset+n) + return + } + bs = i.bs[i.offset : i.offset+n] + i.offset += n + return +} + // Seek seeks to the nth byte func (i *BytesIterator) Seek(n int) { i.offset = n diff --git a/vendor/github.com/asticode/go-astikit/defer.go b/vendor/github.com/asticode/go-astikit/defer.go index ddca03702e..091154ca72 100644 --- a/vendor/github.com/asticode/go-astikit/defer.go +++ b/vendor/github.com/asticode/go-astikit/defer.go @@ -4,36 +4,56 @@ import ( "sync" ) -// CloseFunc is a method that closes something -type CloseFunc func() error +type CloseFunc func() +type CloseFuncWithError func() error // Closer is an object that can close several things type Closer struct { - fs []CloseFunc - m *sync.Mutex + closed bool + fs []CloseFuncWithError + // We need to split into 2 mutexes to allow using .Add() in .Do() + mc *sync.Mutex // Locks .Close() + mf *sync.Mutex // Locks fs + onClosed CloserOnClosed } +type CloserOnClosed func(err error) + // NewCloser creates a new closer func NewCloser() *Closer { return &Closer{ - m: &sync.Mutex{}, + mc: &sync.Mutex{}, + mf: &sync.Mutex{}, } } // Close implements the io.Closer interface func (c *Closer) Close() error { // Lock - c.m.Lock() - defer c.m.Unlock() + c.mc.Lock() + defer c.mc.Unlock() + + // Get funcs + c.mf.Lock() + fs := c.fs + c.mf.Unlock() // Loop through closers err := NewErrors() - for _, f := range c.fs { + for _, f := range fs { err.Add(f()) } // Reset closers - c.fs = []CloseFunc{} + c.fs = []CloseFuncWithError{} + + // Update attribute + c.closed = true + + // Callback + if c.onClosed != nil { + c.onClosed(err) + } // Return if err.IsNil() { @@ -42,16 +62,65 @@ func (c *Closer) Close() error { return err } -// Add adds a close func at the beginning of the list func (c *Closer) Add(f CloseFunc) { - c.m.Lock() - defer c.m.Unlock() - c.fs = append([]CloseFunc{f}, c.fs...) + c.AddWithError(func() error { + f() + return nil + }) +} + +func (c *Closer) AddWithError(f CloseFuncWithError) { + // Lock + c.mf.Lock() + defer c.mf.Unlock() + + // Append + c.fs = append([]CloseFuncWithError{f}, c.fs...) +} + +func (c *Closer) Append(dst *Closer) { + // Lock + c.mf.Lock() + dst.mf.Lock() + defer c.mf.Unlock() + defer dst.mf.Unlock() + + // Append + c.fs = append(c.fs, dst.fs...) } // NewChild creates a new child closer func (c *Closer) NewChild() (child *Closer) { child = NewCloser() - c.Add(child.Close) + c.AddWithError(child.Close) return } + +// Do executes a callback while ensuring : +// - closer hasn't been closed before +// - closer can't be closed in between +func (c *Closer) Do(fn func()) { + // Lock + c.mc.Lock() + defer c.mc.Unlock() + + // Closer already closed + if c.closed { + return + } + + // Callback + fn() +} + +func (c *Closer) OnClosed(fn CloserOnClosed) { + c.mc.Lock() + defer c.mc.Unlock() + c.onClosed = fn +} + +func (c *Closer) IsClosed() bool { + c.mc.Lock() + defer c.mc.Unlock() + return c.closed +} diff --git a/vendor/github.com/asticode/go-astikit/http.go b/vendor/github.com/asticode/go-astikit/http.go index a173e55a90..d6d24ae2de 100644 --- a/vendor/github.com/asticode/go-astikit/http.go +++ b/vendor/github.com/asticode/go-astikit/http.go @@ -1,9 +1,13 @@ package astikit import ( + "bytes" "context" + "encoding/json" + "errors" "fmt" "io" + "io/ioutil" "net" "net/http" "os" @@ -14,6 +18,8 @@ import ( "time" ) +var ErrHTTPSenderUnmarshaledError = errors.New("astikit: unmarshaled error") + // ServeHTTPOptions represents serve options type ServeHTTPOptions struct { Addr string @@ -148,12 +154,9 @@ func (s *HTTPSender) SendWithTimeout(req *http.Request, timeout time.Duration) ( // Send request s.l.Debugf("astikit: sending %s", nr) - var errDo error - if resp, errDo = s.client.Do(req); errDo != nil { - // If error is temporary, retry - if netError, ok := errDo.(net.Error); ok && netError.Temporary() { - err = errDo - } else { + if resp, err = s.client.Do(req); err != nil { + // Retry if error is temporary, stop here otherwise + if netError, ok := err.(net.Error); !ok || !netError.Timeout() { err = fmt.Errorf("astikit: sending %s failed: %w", nr, err) return } @@ -182,6 +185,104 @@ func (s *HTTPSender) SendWithTimeout(req *http.Request, timeout time.Duration) ( return } +type HTTPSenderHeaderFunc func(h http.Header) + +type HTTPSenderStatusCodeFunc func(code int) error + +// HTTPSendJSONOptions represents SendJSON options +type HTTPSendJSONOptions struct { + BodyError interface{} + BodyIn interface{} + BodyOut interface{} + HeadersIn map[string]string + HeadersOut HTTPSenderHeaderFunc + Method string + StatusCodeFunc HTTPSenderStatusCodeFunc + URL string +} + +// SendJSON sends a new JSON HTTP request +func (s *HTTPSender) SendJSON(o HTTPSendJSONOptions) (err error) { + // Marshal body in + var bi io.Reader + if o.BodyIn != nil { + bb := &bytes.Buffer{} + if err = json.NewEncoder(bb).Encode(o.BodyIn); err != nil { + err = fmt.Errorf("astikit: marshaling body in failed: %w", err) + return + } + bi = bb + } + + // Create request + var req *http.Request + if req, err = http.NewRequest(o.Method, o.URL, bi); err != nil { + err = fmt.Errorf("astikit: creating request failed: %w", err) + return + } + + // Add headers + for k, v := range o.HeadersIn { + req.Header.Set(k, v) + } + + // Send request + var resp *http.Response + if resp, err = s.Send(req); err != nil { + err = fmt.Errorf("astikit: sending request failed: %w", err) + return + } + defer resp.Body.Close() + + // Process headers + if o.HeadersOut != nil { + o.HeadersOut(resp.Header) + } + + // Process status code + fn := HTTPSenderDefaultStatusCodeFunc + if o.StatusCodeFunc != nil { + fn = o.StatusCodeFunc + } + if err = fn(resp.StatusCode); err != nil { + // Try unmarshaling error + if o.BodyError != nil { + if err2 := json.NewDecoder(resp.Body).Decode(o.BodyError); err2 == nil { + err = ErrHTTPSenderUnmarshaledError + return + } + } + + // Default error + err = fmt.Errorf("astikit: validating status code %d failed: %w", resp.StatusCode, err) + return + } + + // Unmarshal body out + if o.BodyOut != nil { + // Read all + var b []byte + if b, err = ioutil.ReadAll(resp.Body); err != nil { + err = fmt.Errorf("astikit: reading all failed: %w", err) + return + } + + // Unmarshal + if err = json.Unmarshal(b, o.BodyOut); err != nil { + err = fmt.Errorf("astikit: unmarshaling failed: %w (json: %s)", err, b) + return + } + } + return +} + +func HTTPSenderDefaultStatusCodeFunc(code int) error { + if code < 200 || code > 299 { + return errors.New("astikit: status code should be between 200 and 299") + } + return nil +} + // HTTPResponseFunc is a func that can process an $http.Response type HTTPResponseFunc func(resp *http.Response) error @@ -310,6 +411,7 @@ func (d *HTTPDownloader) download(ctx context.Context, srcs []HTTPDownloaderSrc, } // Do + //nolint:errcheck d.l.Do(func() { // Task is done defer wg.Done() @@ -551,3 +653,12 @@ func HTTPMiddlewareHeaders(vs map[string]string) HTTPMiddleware { }) } } + +// HTTPMiddlewareCORSHeaders adds CORS headers to an HTTP handler +func HTTPMiddlewareCORSHeaders() HTTPMiddleware { + return HTTPMiddlewareHeaders(map[string]string{ + "Access-Control-Allow-Headers": "*", + "Access-Control-Allow-Methods": "*", + "Access-Control-Allow-Origin": "*", + }) +} diff --git a/vendor/github.com/asticode/go-astikit/json.go b/vendor/github.com/asticode/go-astikit/json.go new file mode 100644 index 0000000000..39de265936 --- /dev/null +++ b/vendor/github.com/asticode/go-astikit/json.go @@ -0,0 +1,35 @@ +package astikit + +import ( + "bytes" + "encoding/json" + "fmt" +) + +func JSONEqual(a, b interface{}) bool { + ba, err := json.Marshal(a) + if err != nil { + return false + } + bb, err := json.Marshal(b) + if err != nil { + return false + } + return bytes.Equal(ba, bb) +} + +func JSONClone(src, dst interface{}) (err error) { + // Marshal + var b []byte + if b, err = json.Marshal(src); err != nil { + err = fmt.Errorf("main: marshaling failed: %w", err) + return + } + + // Unmarshal + if err = json.Unmarshal(b, dst); err != nil { + err = fmt.Errorf("main: unmarshaling failed: %w", err) + return + } + return +} diff --git a/vendor/github.com/asticode/go-astikit/logger.go b/vendor/github.com/asticode/go-astikit/logger.go index 1510538c91..0780a797c4 100644 --- a/vendor/github.com/asticode/go-astikit/logger.go +++ b/vendor/github.com/asticode/go-astikit/logger.go @@ -4,15 +4,72 @@ import ( "context" ) +// LoggerLevel represents a logger level +type LoggerLevel int + +// Logger levels +const ( + LoggerLevelDebug LoggerLevel = iota + LoggerLevelInfo + LoggerLevelWarn + LoggerLevelError + LoggerLevelFatal +) + +// LoggerLevelFromString creates a logger level from string +func LoggerLevelFromString(s string) LoggerLevel { + switch s { + case "debug": + return LoggerLevelDebug + case "error": + return LoggerLevelError + case "fatal": + return LoggerLevelFatal + case "warn": + return LoggerLevelWarn + default: + return LoggerLevelInfo + } +} + +func (l LoggerLevel) String() string { + switch l { + case LoggerLevelDebug: + return "debug" + case LoggerLevelError: + return "error" + case LoggerLevelFatal: + return "fatal" + case LoggerLevelWarn: + return "warn" + default: + return "info" + } +} + +func (l *LoggerLevel) UnmarshalText(b []byte) error { + *l = LoggerLevelFromString(string(b)) + return nil +} + +func (l LoggerLevel) MarshalText() ([]byte, error) { + b := []byte(l.String()) + return b, nil +} + // CompleteLogger represents a complete logger type CompleteLogger interface { - StdLogger - SeverityLogger SeverityCtxLogger + SeverityLogger + SeverityWriteLogger + SeverityWriteCtxLogger + StdLogger } // StdLogger represents a standard logger type StdLogger interface { + Fatal(v ...interface{}) + Fatalf(format string, v ...interface{}) Print(v ...interface{}) Printf(format string, v ...interface{}) } @@ -25,6 +82,17 @@ type SeverityLogger interface { Errorf(format string, v ...interface{}) Info(v ...interface{}) Infof(format string, v ...interface{}) + Warn(v ...interface{}) + Warnf(format string, v ...interface{}) +} + +type TestLogger interface { + Error(v ...interface{}) + Errorf(format string, v ...interface{}) + Fatal(v ...interface{}) + Fatalf(format string, v ...interface{}) + Log(v ...interface{}) + Logf(format string, v ...interface{}) } // SeverityCtxLogger represents a severity with context logger @@ -33,34 +101,116 @@ type SeverityCtxLogger interface { DebugCf(ctx context.Context, format string, v ...interface{}) ErrorC(ctx context.Context, v ...interface{}) ErrorCf(ctx context.Context, format string, v ...interface{}) + FatalC(ctx context.Context, v ...interface{}) + FatalCf(ctx context.Context, format string, v ...interface{}) InfoC(ctx context.Context, v ...interface{}) InfoCf(ctx context.Context, format string, v ...interface{}) + WarnC(ctx context.Context, v ...interface{}) + WarnCf(ctx context.Context, format string, v ...interface{}) +} + +type SeverityWriteLogger interface { + Write(l LoggerLevel, v ...interface{}) + Writef(l LoggerLevel, format string, v ...interface{}) +} + +type SeverityWriteCtxLogger interface { + WriteC(ctx context.Context, l LoggerLevel, v ...interface{}) + WriteCf(ctx context.Context, l LoggerLevel, format string, v ...interface{}) } type completeLogger struct { - print, debug, error, info func(v ...interface{}) - printf, debugf, errorf, infof func(format string, v ...interface{}) - debugC, errorC, infoC func(ctx context.Context, v ...interface{}) - debugCf, errorCf, infoCf func(ctx context.Context, format string, v ...interface{}) + print, debug, error, fatal, info, warn func(v ...interface{}) + printf, debugf, errorf, fatalf, infof, warnf func(format string, v ...interface{}) + debugC, errorC, fatalC, infoC, warnC func(ctx context.Context, v ...interface{}) + debugCf, errorCf, fatalCf, infoCf, warnCf func(ctx context.Context, format string, v ...interface{}) + write func(l LoggerLevel, v ...interface{}) + writeC func(ctx context.Context, l LoggerLevel, v ...interface{}) + writeCf func(ctx context.Context, l LoggerLevel, format string, v ...interface{}) + writef func(l LoggerLevel, format string, v ...interface{}) } func newCompleteLogger() *completeLogger { - return &completeLogger{ - debug: func(v ...interface{}) {}, - debugf: func(format string, v ...interface{}) {}, - debugC: func(ctx context.Context, v ...interface{}) {}, - debugCf: func(ctx context.Context, format string, v ...interface{}) {}, - error: func(v ...interface{}) {}, - errorf: func(format string, v ...interface{}) {}, - errorC: func(ctx context.Context, v ...interface{}) {}, - errorCf: func(ctx context.Context, format string, v ...interface{}) {}, - info: func(v ...interface{}) {}, - infof: func(format string, v ...interface{}) {}, - infoC: func(ctx context.Context, v ...interface{}) {}, - infoCf: func(ctx context.Context, format string, v ...interface{}) {}, - print: func(v ...interface{}) {}, - printf: func(format string, v ...interface{}) {}, + l := &completeLogger{} + l.debug = func(v ...interface{}) { l.print(v...) } + l.debugf = func(format string, v ...interface{}) { l.printf(format, v...) } + l.debugC = func(ctx context.Context, v ...interface{}) { l.debug(v...) } + l.debugCf = func(ctx context.Context, format string, v ...interface{}) { l.debugf(format, v...) } + l.error = func(v ...interface{}) { l.print(v...) } + l.errorf = func(format string, v ...interface{}) { l.printf(format, v...) } + l.errorC = func(ctx context.Context, v ...interface{}) { l.error(v...) } + l.errorCf = func(ctx context.Context, format string, v ...interface{}) { l.errorf(format, v...) } + l.fatal = func(v ...interface{}) { l.print(v...) } + l.fatalf = func(format string, v ...interface{}) { l.printf(format, v...) } + l.fatalC = func(ctx context.Context, v ...interface{}) { l.fatal(v...) } + l.fatalCf = func(ctx context.Context, format string, v ...interface{}) { l.fatalf(format, v...) } + l.info = func(v ...interface{}) { l.print(v...) } + l.infof = func(format string, v ...interface{}) { l.printf(format, v...) } + l.infoC = func(ctx context.Context, v ...interface{}) { l.info(v...) } + l.infoCf = func(ctx context.Context, format string, v ...interface{}) { l.infof(format, v...) } + l.print = func(v ...interface{}) {} + l.printf = func(format string, v ...interface{}) {} + l.warn = func(v ...interface{}) { l.print(v...) } + l.warnf = func(format string, v ...interface{}) { l.printf(format, v...) } + l.warnC = func(ctx context.Context, v ...interface{}) { l.warn(v...) } + l.warnCf = func(ctx context.Context, format string, v ...interface{}) { l.warnf(format, v...) } + l.write = func(lv LoggerLevel, v ...interface{}) { + switch lv { + case LoggerLevelDebug: + l.debug(v...) + case LoggerLevelError: + l.error(v...) + case LoggerLevelFatal: + l.fatal(v...) + case LoggerLevelWarn: + l.warn(v...) + default: + l.info(v...) + } + } + l.writeC = func(ctx context.Context, lv LoggerLevel, v ...interface{}) { + switch lv { + case LoggerLevelDebug: + l.debugC(ctx, v...) + case LoggerLevelError: + l.errorC(ctx, v...) + case LoggerLevelFatal: + l.fatalC(ctx, v...) + case LoggerLevelWarn: + l.warnC(ctx, v...) + default: + l.infoC(ctx, v...) + } } + l.writeCf = func(ctx context.Context, lv LoggerLevel, format string, v ...interface{}) { + switch lv { + case LoggerLevelDebug: + l.debugCf(ctx, format, v...) + case LoggerLevelError: + l.errorCf(ctx, format, v...) + case LoggerLevelFatal: + l.fatalCf(ctx, format, v...) + case LoggerLevelWarn: + l.warnCf(ctx, format, v...) + default: + l.infoCf(ctx, format, v...) + } + } + l.writef = func(lv LoggerLevel, format string, v ...interface{}) { + switch lv { + case LoggerLevelDebug: + l.debugf(format, v...) + case LoggerLevelError: + l.errorf(format, v...) + case LoggerLevelFatal: + l.fatalf(format, v...) + case LoggerLevelWarn: + l.warnf(format, v...) + default: + l.infof(format, v...) + } + } + return l } func (l *completeLogger) Debug(v ...interface{}) { l.debug(v...) } @@ -75,14 +225,36 @@ func (l *completeLogger) ErrorC(ctx context.Context, v ...interface{}) { l.error func (l *completeLogger) ErrorCf(ctx context.Context, format string, v ...interface{}) { l.errorCf(ctx, format, v...) } +func (l *completeLogger) Fatal(v ...interface{}) { l.fatal(v...) } +func (l *completeLogger) Fatalf(format string, v ...interface{}) { l.fatalf(format, v...) } +func (l *completeLogger) FatalC(ctx context.Context, v ...interface{}) { l.fatalC(ctx, v...) } +func (l *completeLogger) FatalCf(ctx context.Context, format string, v ...interface{}) { + l.fatalCf(ctx, format, v...) +} func (l *completeLogger) Info(v ...interface{}) { l.info(v...) } func (l *completeLogger) Infof(format string, v ...interface{}) { l.infof(format, v...) } func (l *completeLogger) InfoC(ctx context.Context, v ...interface{}) { l.infoC(ctx, v...) } func (l *completeLogger) InfoCf(ctx context.Context, format string, v ...interface{}) { l.infoCf(ctx, format, v...) } -func (l *completeLogger) Print(v ...interface{}) { l.print(v...) } -func (l *completeLogger) Printf(format string, v ...interface{}) { l.printf(format, v...) } +func (l *completeLogger) Print(v ...interface{}) { l.print(v...) } +func (l *completeLogger) Printf(format string, v ...interface{}) { l.printf(format, v...) } +func (l *completeLogger) Warn(v ...interface{}) { l.warn(v...) } +func (l *completeLogger) Warnf(format string, v ...interface{}) { l.warnf(format, v...) } +func (l *completeLogger) WarnC(ctx context.Context, v ...interface{}) { l.warnC(ctx, v...) } +func (l *completeLogger) WarnCf(ctx context.Context, format string, v ...interface{}) { + l.warnCf(ctx, format, v...) +} +func (l *completeLogger) Write(lv LoggerLevel, v ...interface{}) { l.write(lv, v...) } +func (l *completeLogger) Writef(lv LoggerLevel, format string, v ...interface{}) { + l.writef(lv, format, v...) +} +func (l *completeLogger) WriteC(ctx context.Context, lv LoggerLevel, v ...interface{}) { + l.writeC(ctx, lv, v...) +} +func (l *completeLogger) WriteCf(ctx context.Context, lv LoggerLevel, format string, v ...interface{}) { + l.writeCf(ctx, lv, format, v...) +} // AdaptStdLogger transforms an StdLogger into a CompleteLogger if needed func AdaptStdLogger(i StdLogger) CompleteLogger { @@ -93,6 +265,8 @@ func AdaptStdLogger(i StdLogger) CompleteLogger { if i == nil { return l } + l.fatal = i.Fatal + l.fatalf = i.Fatalf l.print = i.Print l.printf = i.Printf if v, ok := i.(SeverityLogger); ok { @@ -102,28 +276,52 @@ func AdaptStdLogger(i StdLogger) CompleteLogger { l.errorf = v.Errorf l.info = v.Info l.infof = v.Infof - } else { - l.debug = l.print - l.debugf = l.printf - l.error = l.print - l.errorf = l.printf - l.info = l.print - l.infof = l.printf + l.warn = v.Warn + l.warnf = v.Warnf } if v, ok := i.(SeverityCtxLogger); ok { l.debugC = v.DebugC l.debugCf = v.DebugCf l.errorC = v.ErrorC l.errorCf = v.ErrorCf + l.fatalC = v.FatalC + l.fatalCf = v.FatalCf l.infoC = v.InfoC l.infoCf = v.InfoCf - } else { - l.debugC = func(ctx context.Context, v ...interface{}) { l.debug(v...) } - l.debugCf = func(ctx context.Context, format string, v ...interface{}) { l.debugf(format, v...) } - l.errorC = func(ctx context.Context, v ...interface{}) { l.error(v...) } - l.errorCf = func(ctx context.Context, format string, v ...interface{}) { l.errorf(format, v...) } - l.infoC = func(ctx context.Context, v ...interface{}) { l.info(v...) } - l.infoCf = func(ctx context.Context, format string, v ...interface{}) { l.infof(format, v...) } + l.warnC = v.WarnC + l.warnCf = v.WarnCf + } + if v, ok := i.(SeverityWriteLogger); ok { + l.write = v.Write + l.writef = v.Writef + } + if v, ok := i.(SeverityWriteCtxLogger); ok { + l.writeC = v.WriteC + l.writeCf = v.WriteCf + } + return l +} + +// AdaptTestLogger transforms a TestLogger into a CompleteLogger if needed +func AdaptTestLogger(i TestLogger) CompleteLogger { + if v, ok := i.(CompleteLogger); ok { + return v + } + l := newCompleteLogger() + if i == nil { + return l } + l.error = i.Error + l.errorf = i.Errorf + l.fatal = i.Fatal + l.fatalf = i.Fatalf + l.print = i.Log + l.printf = i.Logf + l.debug = l.print + l.debugf = l.printf + l.info = l.print + l.infof = l.printf + l.warn = l.print + l.warnf = l.printf return l } diff --git a/vendor/github.com/asticode/go-astikit/map.go b/vendor/github.com/asticode/go-astikit/map.go index a0baa81b30..8ec17b20fb 100644 --- a/vendor/github.com/asticode/go-astikit/map.go +++ b/vendor/github.com/asticode/go-astikit/map.go @@ -1,6 +1,7 @@ package astikit import ( + "fmt" "sync" ) @@ -33,6 +34,24 @@ func (m *BiMap) Get(k interface{}) (interface{}, bool) { return m.get(k, m.forwa // GetInverse gets the value in the inverse map based on the provided key func (m *BiMap) GetInverse(k interface{}) (interface{}, bool) { return m.get(k, m.inverse) } +// MustGet gets the value in the forward map based on the provided key and panics if key is not found +func (m *BiMap) MustGet(k interface{}) interface{} { + v, ok := m.get(k, m.forward) + if !ok { + panic(fmt.Sprintf("astikit: key %+v not found in foward map", k)) + } + return v +} + +// MustGetInverse gets the value in the inverse map based on the provided key and panics if key is not found +func (m *BiMap) MustGetInverse(k interface{}) interface{} { + v, ok := m.get(k, m.inverse) + if !ok { + panic(fmt.Sprintf("astikit: key %+v not found in inverse map", k)) + } + return v +} + func (m *BiMap) set(k, v interface{}, f, i map[interface{}]interface{}) *BiMap { m.m.Lock() defer m.m.Unlock() diff --git a/vendor/github.com/asticode/go-astikit/ptr.go b/vendor/github.com/asticode/go-astikit/ptr.go index d62e49e3f6..d7f73433bf 100644 --- a/vendor/github.com/asticode/go-astikit/ptr.go +++ b/vendor/github.com/asticode/go-astikit/ptr.go @@ -32,11 +32,21 @@ func Int64Ptr(i int64) *int64 { return &i } +// StrSlicePtr transforms a []string into a *[]string +func StrSlicePtr(i []string) *[]string { + return &i +} + // StrPtr transforms a string into a *string func StrPtr(i string) *string { return &i } +// TimePtr transforms a time.Time into a *time.Time +func TimePtr(i time.Time) *time.Time { + return &i +} + // UInt8Ptr transforms a uint8 into a *uint8 func UInt8Ptr(i uint8) *uint8 { return &i @@ -46,3 +56,8 @@ func UInt8Ptr(i uint8) *uint8 { func UInt32Ptr(i uint32) *uint32 { return &i } + +// UInt64Ptr transforms a uint64 into a *uint64 +func UInt64Ptr(i uint64) *uint64 { + return &i +} diff --git a/vendor/github.com/asticode/go-astikit/ssh.go b/vendor/github.com/asticode/go-astikit/ssh.go index e19ab861a0..ad5c3e2fff 100644 --- a/vendor/github.com/asticode/go-astikit/ssh.go +++ b/vendor/github.com/asticode/go-astikit/ssh.go @@ -6,6 +6,7 @@ import ( "io" "os" "path/filepath" + "strings" ) // SSHSession represents an SSH Session @@ -27,6 +28,9 @@ func SSHCopyFileFunc(fn SSHSessionFunc) CopyFileFunc { return } + // Escape dir path + d := strings.ReplaceAll(filepath.Dir(dst), " ", "\\ ") + // Using local closure allows better readibility for the defer c.Close() since it // isolates the use of the ssh session if err = func() (err error) { @@ -40,7 +44,7 @@ func SSHCopyFileFunc(fn SSHSessionFunc) CopyFileFunc { defer c.Close() // Create the destination folder - if err = s.Run("mkdir -p " + filepath.Dir(dst)); err != nil { + if err = s.Run("mkdir -p " + d); err != nil { err = fmt.Errorf("astikit: creating %s failed: %w", filepath.Dir(dst), err) return } @@ -70,7 +74,7 @@ func SSHCopyFileFunc(fn SSHSessionFunc) CopyFileFunc { defer stdin.Close() // Use "scp" command - if err = s.Start("scp -qt " + filepath.Dir(dst)); err != nil { + if err = s.Start("scp -qt " + d); err != nil { err = fmt.Errorf("astikit: scp to %s failed: %w", dst, err) return } diff --git a/vendor/github.com/asticode/go-astikit/stat.go b/vendor/github.com/asticode/go-astikit/stat.go index 94f93f9d92..48c7e5a797 100644 --- a/vendor/github.com/asticode/go-astikit/stat.go +++ b/vendor/github.com/asticode/go-astikit/stat.go @@ -15,11 +15,18 @@ type Stater struct { m *sync.Mutex // Locks ss period time.Duration running uint32 - ss []stat + ss map[*StatMetadata]StatOptions } -// StatsHandleFunc is a method that can handle stats -type StatsHandleFunc func(stats []Stat) +// StatOptions represents stat options +type StatOptions struct { + Metadata *StatMetadata + // Either a StatValuer or StatValuerOverTime + Valuer interface{} +} + +// StatsHandleFunc is a method that can handle stat values +type StatsHandleFunc func(stats []StatValue) // StatMetadata represents a stat metadata type StatMetadata struct { @@ -29,22 +36,21 @@ type StatMetadata struct { Unit string } -// StatHandler represents a stat handler -type StatHandler interface { - Start() - Stop() +// StatValuer represents a stat valuer +type StatValuer interface { Value(delta time.Duration) interface{} } -// Stat represents a stat -type Stat struct { - StatMetadata - Value interface{} +type StatValuerFunc func(d time.Duration) interface{} + +func (f StatValuerFunc) Value(d time.Duration) interface{} { + return f(d) } -type stat struct { - h StatHandler - m StatMetadata +// StatValue represents a stat value +type StatValue struct { + *StatMetadata + Value interface{} } // StaterOptions represents stater options @@ -59,6 +65,7 @@ func NewStater(o StaterOptions) *Stater { h: o.HandleFunc, m: &sync.Mutex{}, period: o.Period, + ss: make(map[*StatMetadata]StatOptions), } } @@ -77,13 +84,6 @@ func (s *Stater) Start(ctx context.Context) { // Reset context s.ctx, s.cancel = context.WithCancel(ctx) - // Start stats - s.m.Lock() - for _, v := range s.ss { - v.h.Start() - } - s.m.Unlock() - // Create ticker t := time.NewTicker(s.period) defer t.Stop() @@ -99,12 +99,21 @@ func (s *Stater) Start(ctx context.Context) { lastStatAt = n // Loop through stats - var stats []Stat + var stats []StatValue s.m.Lock() - for _, v := range s.ss { - stats = append(stats, Stat{ - StatMetadata: v.m, - Value: v.h.Value(delta), + for _, o := range s.ss { + // Get value + var v interface{} + if h, ok := o.Valuer.(StatValuer); ok { + v = h.Value(delta) + } else { + continue + } + + // Append + stats = append(stats, StatValue{ + StatMetadata: o.Metadata, + Value: v, }) } s.m.Unlock() @@ -112,28 +121,12 @@ func (s *Stater) Start(ctx context.Context) { // Handle stats go s.h(stats) case <-s.ctx.Done(): - // Stop stats - s.m.Lock() - for _, v := range s.ss { - v.h.Stop() - } - s.m.Unlock() return } } } } -// AddStat adds a stat -func (s *Stater) AddStat(m StatMetadata, h StatHandler) { - s.m.Lock() - defer s.m.Unlock() - s.ss = append(s.ss, stat{ - h: h, - m: m, - }) -} - // Stop stops the stater func (s *Stater) Stop() { if s.cancel != nil { @@ -141,175 +134,99 @@ func (s *Stater) Stop() { } } -// StatsMetadata returns the stats metadata -func (s *Stater) StatsMetadata() (ms []StatMetadata) { +// AddStats adds stats +func (s *Stater) AddStats(os ...StatOptions) { s.m.Lock() defer s.m.Unlock() - ms = []StatMetadata{} - for _, v := range s.ss { - ms = append(ms, v.m) + for _, o := range os { + s.ss[o.Metadata] = o } - return -} - -type durationStat struct { - d time.Duration - fn func(d, delta time.Duration) interface{} - isStarted bool - m *sync.Mutex // Locks isStarted - startedAt time.Time } -func newDurationStat(fn func(d, delta time.Duration) interface{}) *durationStat { - return &durationStat{ - fn: fn, - m: &sync.Mutex{}, - } -} - -func (s *durationStat) Begin() { - s.m.Lock() - defer s.m.Unlock() - if !s.isStarted { - return - } - s.startedAt = now() -} - -func (s *durationStat) End() { +// DelStats deletes stats +func (s *Stater) DelStats(os ...StatOptions) { s.m.Lock() defer s.m.Unlock() - if !s.isStarted { - return - } - s.d += now().Sub(s.startedAt) - s.startedAt = time.Time{} -} - -func (s *durationStat) Value(delta time.Duration) (o interface{}) { - // Lock - s.m.Lock() - defer s.m.Unlock() - - // Get current values - n := now() - d := s.d - - // Recording is still in process - if !s.startedAt.IsZero() { - d += n.Sub(s.startedAt) - s.startedAt = n + for _, o := range os { + delete(s.ss, o.Metadata) } - - // Compute stat - o = s.fn(d, delta) - s.d = 0 - return } -func (s *durationStat) Start() { - s.m.Lock() - defer s.m.Unlock() - s.d = 0 - s.isStarted = true +type AtomicUint64RateStat struct { + last *uint64 + v *uint64 } -func (s *durationStat) Stop() { - s.m.Lock() - defer s.m.Unlock() - s.isStarted = false +func NewAtomicUint64RateStat(v *uint64) *AtomicUint64RateStat { + return &AtomicUint64RateStat{v: v} } -// DurationPercentageStat is an object capable of computing the percentage of time some work is taking per second -type DurationPercentageStat struct { - *durationStat -} - -// NewDurationPercentageStat creates a new duration percentage stat -func NewDurationPercentageStat() *DurationPercentageStat { - return &DurationPercentageStat{durationStat: newDurationStat(func(d, delta time.Duration) interface{} { - if delta == 0 { - return 0 - } - return float64(d) / float64(delta) * 100 - })} -} - -type counterStat struct { - c float64 - fn func(c, t float64, delta time.Duration) interface{} - isStarted bool - m *sync.Mutex // Locks isStarted - t float64 -} - -func newCounterStat(fn func(c, t float64, delta time.Duration) interface{}) *counterStat { - return &counterStat{ - fn: fn, - m: &sync.Mutex{}, +func (s *AtomicUint64RateStat) Value(d time.Duration) interface{} { + current := atomic.LoadUint64(s.v) + defer func() { s.last = ¤t }() + if d <= 0 { + return 0.0 } -} - -func (s *counterStat) Add(delta float64) { - s.m.Lock() - defer s.m.Unlock() - if !s.isStarted { - return + var last uint64 + if s.last != nil { + last = *s.last } - s.c += delta - s.t++ + return float64(current-last) / d.Seconds() } -func (s *counterStat) Start() { - s.m.Lock() - defer s.m.Unlock() - s.c = 0 - s.isStarted = true - s.t = 0 -} - -func (s *counterStat) Stop() { - s.m.Lock() - defer s.m.Unlock() - s.isStarted = true +type AtomicDurationPercentageStat struct { + d *AtomicDuration + last *time.Duration } -func (s *counterStat) Value(delta time.Duration) interface{} { - s.m.Lock() - defer s.m.Unlock() - c := s.c - t := s.t - s.c = 0 - s.t = 0 - return s.fn(c, t, delta) +func NewAtomicDurationPercentageStat(d *AtomicDuration) *AtomicDurationPercentageStat { + return &AtomicDurationPercentageStat{d: d} } -// CounterAvgStat is an object capable of computing the average value of a counter -type CounterAvgStat struct { - *counterStat +func (s *AtomicDurationPercentageStat) Value(d time.Duration) interface{} { + current := s.d.Duration() + defer func() { s.last = ¤t }() + if d <= 0 { + return 0.0 + } + var last time.Duration + if s.last != nil { + last = *s.last + } + return float64(current-last) / float64(d) * 100 } -// NewCounterAvgStat creates a new counter avg stat -func NewCounterAvgStat() *CounterAvgStat { - return &CounterAvgStat{counterStat: newCounterStat(func(c, t float64, delta time.Duration) interface{} { - if t == 0 { - return 0 - } - return c / t - })} +type AtomicDurationAvgStat struct { + count *uint64 + d *AtomicDuration + last *time.Duration + lastCount *uint64 } -// CounterRateStat is an object capable of computing the average value of a counter per second -type CounterRateStat struct { - *counterStat +func NewAtomicDurationAvgStat(d *AtomicDuration, count *uint64) *AtomicDurationAvgStat { + return &AtomicDurationAvgStat{ + count: count, + d: d, + } } -// NewCounterRateStat creates a new counter rate stat -func NewCounterRateStat() *CounterRateStat { - return &CounterRateStat{counterStat: newCounterStat(func(c, t float64, delta time.Duration) interface{} { - if delta.Seconds() == 0 { - return 0 - } - return c / delta.Seconds() - })} +func (s *AtomicDurationAvgStat) Value(_ time.Duration) interface{} { + current := s.d.Duration() + currentCount := atomic.LoadUint64(s.count) + defer func() { + s.last = ¤t + s.lastCount = ¤tCount + }() + var last time.Duration + var lastCount uint64 + if s.last != nil { + last = *s.last + } + if s.lastCount != nil { + lastCount = *s.lastCount + } + if currentCount-lastCount <= 0 { + return time.Duration(0) + } + return time.Duration(float64(current-last) / float64(currentCount-lastCount)) } diff --git a/vendor/github.com/asticode/go-astikit/sync.go b/vendor/github.com/asticode/go-astikit/sync.go index ec3b6aac31..36a96b7d98 100644 --- a/vendor/github.com/asticode/go-astikit/sync.go +++ b/vendor/github.com/asticode/go-astikit/sync.go @@ -13,41 +13,42 @@ import ( // Stat names const ( - StatNameWaitRatio = "astikit.wait.ratio" + StatNameWorkRatio = "astikit.work.ratio" ) // Chan constants const ( + // Calling Add() only blocks if the chan has been started and the ctx + // has not been canceled ChanAddStrategyBlockWhenStarted = "block.when.started" - ChanAddStrategyNoBlock = "no.block" - ChanOrderFIFO = "fifo" - ChanOrderFILO = "filo" + // Calling Add() never blocks + ChanAddStrategyNoBlock = "no.block" + ChanOrderFIFO = "fifo" + ChanOrderFILO = "filo" ) // Chan is an object capable of executing funcs in a specific order while controlling the conditions // in which adding new funcs is blocking // Check out ChanOptions for detailed options type Chan struct { - cancel context.CancelFunc - c *sync.Cond - ctx context.Context - fs []func() - mc *sync.Mutex // Locks ctx - mf *sync.Mutex // Locks fs - o ChanOptions - running uint32 - statWait *DurationPercentageStat + cancel context.CancelFunc + c *sync.Cond + ctx context.Context + fs []func() + mc *sync.Mutex // Locks ctx + mf *sync.Mutex // Locks fs + o ChanOptions + running uint32 + statWorkDuration *AtomicDuration } // ChanOptions are Chan options type ChanOptions struct { - // Determines the conditions in which adding new funcs is blocking. - // Possible strategies are : - // - calling Add() never blocks (default). Use the ChanAddStrategyNoBlock constant. - // - calling Add() only blocks if the chan has been started and the ctx - // has not been canceled. Use the ChanAddStrategyBlockWhenStarted constant. + // Determines the conditions in which Add() blocks. See constants with pattern ChanAddStrategy* + // Default is ChanAddStrategyNoBlock AddStrategy string - // Order in which the funcs will be processed. See constants with the pattern ChanOrder* + // Order in which the funcs will be processed. See constants with pattern ChanOrder* + // Default is ChanOrderFIFO Order string // By default the funcs not yet processed when the context is cancelled are dropped. // If "ProcessAll" is true, ALL funcs are processed even after the context is cancelled. @@ -58,10 +59,11 @@ type ChanOptions struct { // NewChan creates a new Chan func NewChan(o ChanOptions) *Chan { return &Chan{ - c: sync.NewCond(&sync.Mutex{}), - mc: &sync.Mutex{}, - mf: &sync.Mutex{}, - o: o, + c: sync.NewCond(&sync.Mutex{}), + mc: &sync.Mutex{}, + mf: &sync.Mutex{}, + o: o, + statWorkDuration: NewAtomicDuration(0), } } @@ -113,13 +115,7 @@ func (c *Chan) Start(ctx context.Context) { // No funcs in buffer if l == 0 { - if c.statWait != nil { - c.statWait.Begin() - } c.c.Wait() - if c.statWait != nil { - c.statWait.End() - } c.c.L.Unlock() continue } @@ -131,7 +127,9 @@ func (c *Chan) Start(ctx context.Context) { c.mf.Unlock() // Execute func + n := time.Now() fn() + c.statWorkDuration.Add(time.Since(n)) // Remove first func c.mf.Lock() @@ -201,20 +199,29 @@ func (c *Chan) Reset() { c.fs = []func(){} } -// AddStats adds stats to the stater -func (c *Chan) AddStats(s *Stater) { - // Create stats - if c.statWait == nil { - c.statWait = NewDurationPercentageStat() - } +// ChanStats represents the chan stats +type ChanStats struct { + WorkDuration time.Duration +} - // Add wait stat - s.AddStat(StatMetadata{ - Description: "Percentage of time spent listening and waiting for new object", - Label: "Wait ratio", - Name: StatNameWaitRatio, - Unit: "%", - }, c.statWait) +// Stats returns the chan stats +func (c *Chan) Stats() ChanStats { + return ChanStats{WorkDuration: c.statWorkDuration.Duration()} +} + +// StatOptions returns the chan stat options +func (c *Chan) StatOptions() []StatOptions { + return []StatOptions{ + { + Metadata: &StatMetadata{ + Description: "Percentage of time doing work", + Label: "Work ratio", + Name: StatNameWorkRatio, + Unit: "%", + }, + Valuer: NewAtomicDurationPercentageStat(c.statWorkDuration), + }, + } } // BufferPool represents a *bytes.Buffer pool @@ -484,3 +491,27 @@ func (m *RWMutex) IsDeadlocked(timeout time.Duration) (bool, string) { <-ctx.Done() return errors.Is(ctx.Err(), context.DeadlineExceeded), m.c } + +type AtomicDuration struct { + d time.Duration + m *sync.Mutex +} + +func NewAtomicDuration(d time.Duration) *AtomicDuration { + return &AtomicDuration{ + d: d, + m: &sync.Mutex{}, + } +} + +func (d *AtomicDuration) Add(delta time.Duration) { + d.m.Lock() + defer d.m.Unlock() + d.d += delta +} + +func (d *AtomicDuration) Duration() time.Duration { + d.m.Lock() + defer d.m.Unlock() + return d.d +} diff --git a/vendor/github.com/asticode/go-astikit/translator.go b/vendor/github.com/asticode/go-astikit/translator.go index 2b052dc33d..484900ea06 100644 --- a/vendor/github.com/asticode/go-astikit/translator.go +++ b/vendor/github.com/asticode/go-astikit/translator.go @@ -7,32 +7,42 @@ import ( "net/http" "os" "path/filepath" + "sort" + "strconv" "strings" "sync" ) // Translator represents an object capable of translating stuff type Translator struct { - m *sync.RWMutex // Lock p - o TranslatorOptions - p map[string]string + defaultLanguage string + m *sync.RWMutex // Lock p + p map[string]string + validLanguages map[string]bool } // TranslatorOptions represents Translator options type TranslatorOptions struct { DefaultLanguage string + ValidLanguages []string } // NewTranslator creates a new Translator -func NewTranslator(o TranslatorOptions) *Translator { - return &Translator{ - m: &sync.RWMutex{}, - o: o, - p: make(map[string]string), +func NewTranslator(o TranslatorOptions) (t *Translator) { + t = &Translator{ + defaultLanguage: o.DefaultLanguage, + m: &sync.RWMutex{}, + p: make(map[string]string), + validLanguages: make(map[string]bool), } + for _, l := range o.ValidLanguages { + t.validLanguages[l] = true + } + return } // ParseDir adds translations located in ".json" files in the specified dir +// If ".json" files are located in child dirs, keys will be prefixed with their paths func (t *Translator) ParseDir(dirPath string) (err error) { // Default dir path if dirPath == "" { @@ -50,11 +60,8 @@ func (t *Translator) ParseDir(dirPath string) (err error) { return } - // Only process first level files + // Only process files if info.IsDir() { - if path != dirPath { - err = filepath.SkipDir - } return } @@ -64,7 +71,7 @@ func (t *Translator) ParseDir(dirPath string) (err error) { } // Parse file - if err = t.ParseFile(path); err != nil { + if err = t.ParseFile(dirPath, path); err != nil { err = fmt.Errorf("astikit: parsing %s failed: %w", path, err) return } @@ -77,7 +84,7 @@ func (t *Translator) ParseDir(dirPath string) (err error) { } // ParseFile adds translation located in the provided path -func (t *Translator) ParseFile(path string) (err error) { +func (t *Translator) ParseFile(dirPath, path string) (err error) { // Lock t.m.Lock() defer t.m.Unlock() @@ -97,8 +104,26 @@ func (t *Translator) ParseFile(path string) (err error) { return } + // Get language + language := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path)) + + // Update valid languages + t.validLanguages[language] = true + + // Get prefix + prefix := language + if dp := filepath.Dir(path); dp != dirPath { + var fs []string + for _, v := range strings.Split(strings.TrimPrefix(dp, dirPath), string(os.PathSeparator)) { + if v != "" { + fs = append(fs, v) + } + } + prefix += "." + strings.Join(fs, ".") + } + // Parse - t.parse(p, strings.TrimSuffix(filepath.Base(path), filepath.Ext(path))) + t.parse(p, prefix) return } @@ -123,7 +148,7 @@ func (t *Translator) HTTPMiddleware(h http.Handler) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { // Store language in context if l := r.Header.Get("Accept-Language"); l != "" { - *r = *r.WithContext(contextWithTranslatorLanguage(r.Context(), l)) + *r = *r.WithContext(contextWithTranslatorLanguage(r.Context(), t.parseAcceptLanguage(l))) } // Next handler @@ -131,7 +156,56 @@ func (t *Translator) HTTPMiddleware(h http.Handler) http.Handler { }) } -const contextKeyTranslatorLanguage = "astikit.translator.language" +func (t *Translator) parseAcceptLanguage(h string) string { + // Split on comma + var qs []float64 + ls := make(map[float64][]string) + for _, c := range strings.Split(strings.TrimSpace(h), ",") { + // Empty + c = strings.TrimSpace(c) + if c == "" { + continue + } + + // Split on semi colon + ss := strings.Split(c, ";") + + // Parse coefficient + q := float64(1) + if len(ss) > 1 { + s := strings.TrimSpace(ss[1]) + if strings.HasPrefix(s, "q=") { + var err error + if q, err = strconv.ParseFloat(strings.TrimPrefix(s, "q="), 64); err != nil { + q = 1 + } + } + } + + // Add + if _, ok := ls[q]; !ok { + qs = append(qs, q) + } + ls[q] = append(ls[q], strings.TrimSpace(ss[0])) + } + + // Order coefficients + sort.Float64s(qs) + + // Loop through coefficients in reverse order + for idx := len(qs) - 1; idx >= 0; idx-- { + for _, l := range ls[qs[idx]] { + if _, ok := t.validLanguages[l]; ok { + return l + } + } + } + return "" +} + +const contextKeyTranslatorLanguage = contextKey("astikit.translator.language") + +type contextKey string func contextWithTranslatorLanguage(ctx context.Context, language string) context.Context { return context.WithValue(ctx, contextKeyTranslatorLanguage, language) @@ -147,7 +221,7 @@ func translatorLanguageFromContext(ctx context.Context) string { func (t *Translator) language(language string) string { if language == "" { - return t.o.DefaultLanguage + return t.defaultLanguage } return language } @@ -164,15 +238,35 @@ func (t *Translator) Translate(language, key string) string { defer t.m.RUnlock() // Get translation - k := t.key(t.language(language), key) - v, ok := t.p[k] - if !ok { - return k + k1 := t.key(t.language(language), key) + v, ok := t.p[k1] + if ok { + return v } - return v + + // Default translation + k2 := t.key(t.defaultLanguage, key) + if v, ok = t.p[k2]; ok { + return v + } + return k1 +} + +// Translatef translates a key into a specific language with optional formatting args +func (t *Translator) Translatef(language, key string, args ...interface{}) string { + return fmt.Sprintf(t.Translate(language, key), args...) } -// TranslateCtx translates a key using the language specified in the context +// TranslateCtx is an alias for TranslateC func (t *Translator) TranslateCtx(ctx context.Context, key string) string { + return t.TranslateC(ctx, key) +} + +// TranslateC translates a key using the language specified in the context +func (t *Translator) TranslateC(ctx context.Context, key string) string { return t.Translate(translatorLanguageFromContext(ctx), key) } + +func (t *Translator) TranslateCf(ctx context.Context, key string, args ...interface{}) string { + return t.Translatef(translatorLanguageFromContext(ctx), key, args...) +} diff --git a/vendor/github.com/asticode/go-astikit/worker.go b/vendor/github.com/asticode/go-astikit/worker.go index 04c4be6767..b9a95a3a94 100644 --- a/vendor/github.com/asticode/go-astikit/worker.go +++ b/vendor/github.com/asticode/go-astikit/worker.go @@ -126,6 +126,10 @@ func (t *Task) Do(f func()) { // Custom f() + + // Wait for first level subtasks to be done + // Wait() can also be called in f() if something needs to be executed just after Wait() + t.Wait() }() } @@ -136,7 +140,7 @@ func (t *Task) Done() { }) } -// Wait waits for the task to be finished +// Wait waits for first level subtasks to be finished func (t *Task) Wait() { t.ow.Do(func() { t.wg.Wait() diff --git a/vendor/github.com/hashicorp/go-plugin/go.mod b/vendor/github.com/hashicorp/go-plugin/go.mod index c82861e6e7..f3ddf44e4c 100644 --- a/vendor/github.com/hashicorp/go-plugin/go.mod +++ b/vendor/github.com/hashicorp/go-plugin/go.mod @@ -1,7 +1,5 @@ module github.com/hashicorp/go-plugin -go 1.15 - require ( github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect github.com/golang/protobuf v1.2.0 diff --git a/vendor/modules.txt b/vendor/modules.txt index 75cab59cef..f77863d5ed 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -27,7 +27,7 @@ github.com/akavel/rsrc/coff github.com/akavel/rsrc/ico github.com/akavel/rsrc/internal github.com/akavel/rsrc/rsrc -# github.com/asticode/go-astikit v0.9.1 +# github.com/asticode/go-astikit v0.37.0 ## explicit github.com/asticode/go-astikit # github.com/asticode/go-astilectron v0.18.0