diff --git a/cmd/stash-mongodb/main.go b/cmd/stash-mongodb/main.go index e41ff37dc..98fdfbe73 100644 --- a/cmd/stash-mongodb/main.go +++ b/cmd/stash-mongodb/main.go @@ -23,7 +23,7 @@ import ( _ "stash.appscode.dev/apimachinery/client/clientset/versioned/fake" "stash.appscode.dev/mongodb/pkg" - "github.com/appscode/go/log" + "gomodules.xyz/x/log" _ "k8s.io/client-go/kubernetes/fake" _ "k8s.io/client-go/plugin/pkg/client/auth" "kmodules.xyz/client-go/logs" diff --git a/cmd/stash-mongodb/version.go b/cmd/stash-mongodb/version.go index 698f05e28..bbb1dc8cf 100644 --- a/cmd/stash-mongodb/version.go +++ b/cmd/stash-mongodb/version.go @@ -17,7 +17,7 @@ limitations under the License. package main import ( - v "github.com/appscode/go/version" + v "gomodules.xyz/x/version" ) var ( diff --git a/go.mod b/go.mod index 18155b269..4fc1a8096 100644 --- a/go.mod +++ b/go.mod @@ -3,57 +3,32 @@ module stash.appscode.dev/mongodb go 1.12 require ( - cloud.google.com/go v0.56.0 // indirect - github.com/Azure/go-autorest/autorest v0.10.2 // indirect - github.com/Azure/go-autorest/autorest/adal v0.8.3 // indirect - github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 github.com/codeskyblue/go-sh v0.0.0-20200712050446-30169cf553fe github.com/go-openapi/spec v0.19.8 - github.com/go-openapi/swag v0.19.9 // indirect github.com/gogo/protobuf v1.3.1 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b - github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 // indirect github.com/google/gofuzz v1.1.0 - github.com/googleapis/gnostic v0.4.0 // indirect - github.com/gophercloud/gophercloud v0.11.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.14.6 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/kr/pretty v0.2.0 // indirect - github.com/mailru/easyjson v0.7.1 // indirect - github.com/mitchellh/mapstructure v1.2.2 // indirect github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.6.0 // indirect github.com/spf13/cobra v1.1.1 github.com/yudai/gojsondiff v1.0.0 go.bytebuilders.dev/license-verifier/kubernetes v0.3.0 - go.uber.org/atomic v1.6.0 // indirect - go.uber.org/zap v1.13.0 // indirect - golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect - golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect - golang.org/x/tools v0.0.0-20200603131246-cc40288be839 // indirect - google.golang.org/appengine v1.6.6 // indirect - google.golang.org/genproto v0.0.0-20200603110839-e855014d5736 // indirect - gopkg.in/yaml.v2 v2.3.0 // indirect + gomodules.xyz/pointer v0.0.0-20201105071923-daf60fa55209 + gomodules.xyz/runtime v0.0.0-20201104200926-d838b09dda8b + gomodules.xyz/x v0.0.0-20201105065653-91c568df6331 k8s.io/api v0.18.9 k8s.io/apiextensions-apiserver v0.18.9 k8s.io/apimachinery v0.18.9 k8s.io/client-go v12.0.0+incompatible k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 - k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 // indirect kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8 kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4 kmodules.xyz/custom-resources v0.0.0-20201105075444-3c6af51b4f79 - kmodules.xyz/objectstore-api v0.0.0-20201105133858-cbb2af88d50a // indirect kmodules.xyz/offshoot-api v0.0.0-20201105074700-8675f5f686f2 - kmodules.xyz/prober v0.0.0-20201105074402-a243b3a27fd8 // indirect kubedb.dev/apimachinery v0.14.0-beta.2 sigs.k8s.io/yaml v1.2.0 - stash.appscode.dev/apimachinery v0.11.3 + stash.appscode.dev/apimachinery v0.11.6-0.20201106214826-132a511faa97 ) -// release-1.18 - replace bitbucket.org/ww/goautoneg => gomodules.xyz/goautoneg v0.0.0-20120707110453-a547fc61f48d replace cloud.google.com/go => cloud.google.com/go v0.49.0 @@ -84,6 +59,26 @@ replace github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logg replace github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.5.0 +replace github.com/go-openapi/analysis => github.com/go-openapi/analysis v0.19.5 + +replace github.com/go-openapi/errors => github.com/go-openapi/errors v0.19.2 + +replace github.com/go-openapi/jsonpointer => github.com/go-openapi/jsonpointer v0.19.3 + +replace github.com/go-openapi/jsonreference => github.com/go-openapi/jsonreference v0.19.3 + +replace github.com/go-openapi/loads => github.com/go-openapi/loads v0.19.4 + +replace github.com/go-openapi/runtime => github.com/go-openapi/runtime v0.19.4 + +replace github.com/go-openapi/spec => github.com/go-openapi/spec v0.19.3 + +replace github.com/go-openapi/strfmt => github.com/go-openapi/strfmt v0.19.3 + +replace github.com/go-openapi/swag => github.com/go-openapi/swag v0.19.5 + +replace github.com/go-openapi/validate => github.com/go-openapi/validate v0.19.5 + replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.1 replace github.com/golang/protobuf => github.com/golang/protobuf v1.3.2 diff --git a/go.sum b/go.sum index f42691495..066dd7fc3 100644 --- a/go.sum +++ b/go.sum @@ -49,7 +49,6 @@ github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdII github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= 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= @@ -74,10 +73,7 @@ github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQY github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/appscode/docker-registry-client v0.0.0-20180426150142-1bb02bb202b0/go.mod h1:W9bsWfSbgJXUXzBZ+tSBV2g+zzT7ANPHQFsSXRHYKsA= -github.com/appscode/go v0.0.0-20200323182826-54e98e09185a h1:cZ80NKoLRaW1PVCWXAJE+YFkBAmLZ8BnrJmH0ClY1Gs= github.com/appscode/go v0.0.0-20200323182826-54e98e09185a/go.mod h1:lIcm8Z6VPuvcw/a3EeOWcG6R3I13iHMLYbtVP7TKufY= -github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 h1:a5T6J190+3yXrGoq7qjng7EnseLj/IMoRhmV48+Y1iU= -github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91/go.mod h1:oWiTjcudxE2UxyEDtsgJl3d84JD75S7j3UsrLKC7U68= github.com/appscode/osm v0.14.0/go.mod h1:3bxEjMJSVhSNBXVrdrCy8EwMudOWKK6UgHzAOdZY7LQ= github.com/appscode/osm v0.15.1/go.mod h1:OaqYqVzmBBVqUy3HulHaCf3JKl9gi2EeNBaMZFVoOKw= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= @@ -87,7 +83,6 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/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/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= github.com/aws/aws-sdk-go v1.20.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -193,7 +188,6 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= @@ -242,8 +236,6 @@ github.com/gabriel-vasile/mimetype v1.1.1/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pm github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA= @@ -259,67 +251,19 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.17.2/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/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= 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.17.2/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.17.2/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.17.2/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/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.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= 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.17.2/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/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.17.2/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.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= 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.17.2/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/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -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/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -405,7 +349,6 @@ github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OI github.com/google/readahead v0.0.0-20161222183148-eaceba169032/go.mod h1:qYysrqQXuV4tzsizt4oOQ6mrBZQ0xnQXP3ylXX8Jk5Y= 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.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= @@ -587,14 +530,10 @@ github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -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/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -945,7 +884,6 @@ golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422183909-d864b10871cd/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -995,7 +933,6 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1005,7 +942,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1033,6 +969,7 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7 golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd h1:QPwSajcTUrFriMF1nJ3XzgoqakqQEsnZf9LdXdi2nkI= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1070,7 +1007,6 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1178,11 +1114,12 @@ gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0 gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/password-generator v0.2.3/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= gomodules.xyz/password-generator v0.2.6/go.mod h1:TvwYYTx9+P1pPwKQKfZgB/wr2Id9MqAQ3B5auY7reNg= +gomodules.xyz/pointer v0.0.0-20201105040656-991dd254b680 h1:MqQStdJSfPUtcgDUQFU00ZmJBtGiujZWnBfXseFZK3g= gomodules.xyz/pointer v0.0.0-20201105040656-991dd254b680/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqoplvo= gomodules.xyz/pointer v0.0.0-20201105071923-daf60fa55209 h1:7tRaHoF3a725gtWs/NKkRNK5sBMXUyopVIsJ4WvhcTI= gomodules.xyz/pointer v0.0.0-20201105071923-daf60fa55209/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqoplvo= +gomodules.xyz/runtime v0.0.0-20201104200926-d838b09dda8b h1:7Sd2I7mKCfwJ01/xTIZfWkwQ8K6zwCGKeacpK95pEEM= gomodules.xyz/runtime v0.0.0-20201104200926-d838b09dda8b/go.mod h1:EXjUBLZuX+7Fd7aE9W338XgtMbrAt9XvAgvxf2MjhuA= gomodules.xyz/sets v0.0.0-20200817084356-ae6e5e14ce3d h1:iikjtYw6tLPrD2dXkzDVMygYLaqzGRxQTDFZI23MXes= gomodules.xyz/sets v0.0.0-20200817084356-ae6e5e14ce3d/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= @@ -1334,9 +1271,6 @@ kmodules.xyz/client-go v0.0.0-20200818143024-600fef263e03/go.mod h1:sY/eoe4ktxZE kmodules.xyz/client-go v0.0.0-20200818171030-24b2ce405feb h1:0yIIoTfkhR4JAgx8UyXbP7oAveVAOcf66+D+20Uj/Uc= kmodules.xyz/client-go v0.0.0-20200818171030-24b2ce405feb/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= kmodules.xyz/client-go v0.0.0-20200903033732-dab39b86c81b/go.mod h1:sY/eoe4ktxZEoHpr5NpAQ5s22VSwTE8psJtKVeVgLRY= -kmodules.xyz/client-go v0.0.0-20200922200830-63d86b6e5b63/go.mod h1:JZN34jqk6ZlR+QOnBPpnUVBab4rmfamqxfSvLaulBMY= -kmodules.xyz/client-go v0.0.0-20201021051118-03dac1aea508 h1:LjidyEzvw1rSlwRQLWNfElleLJ6vr9Uu5tn5H6JO+QA= -kmodules.xyz/client-go v0.0.0-20201021051118-03dac1aea508/go.mod h1:pnRh7gtJ6ErPJQBkQeRlpD95KRtxhD4eGrYagZEU8RM= kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8 h1:zs2+yI/Ola5HjdtfP29XD76Bx5BO4WchC2uN9lkhxQM= kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw= kmodules.xyz/constants v0.0.0-20200506032633-a21e58ceec72/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= @@ -1347,28 +1281,20 @@ kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4 h1:NWWv+Qju8xzHZ kmodules.xyz/crd-schema-fuzz v0.0.0-20200922204806-c1426cd7fcf4/go.mod h1:WrO3fryNyFCgqqyWnwI89lnzWA7kN072Ehya7ELGfzE= kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9 h1:W+k1qhU0W1rptia2PWPOb7IWUvWnf31EMnatXt7MW6w= kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9/go.mod h1:bu1V7HdnuHc1hgvbqAdcwTViQ0TfZwF3Nu/SjB4vai4= -kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4 h1:eftT0CrrAYK1uniwsVhheYao4mwGk+eFT9eftRX9BMo= -kmodules.xyz/custom-resources v0.0.0-20201008012351-6d8090f759d4/go.mod h1:+YU32jSWaGGE4etTr/iCF88tLAeDNq1lhptVymjUbjg= kmodules.xyz/custom-resources v0.0.0-20201105075444-3c6af51b4f79 h1:BKPPUY/w0ac4R6g172zrejs+MLae2CHGqHCFpzrbRLc= kmodules.xyz/custom-resources v0.0.0-20201105075444-3c6af51b4f79/go.mod h1:/r3/eJ3LIfwGyBEVaobqUZRZGh7GJv5RJojj/bdD14Q= kmodules.xyz/monitoring-agent-api v0.0.0-20200828051750-42aa8e7852f3/go.mod h1:ybC7USLPa1dCpNeiJBuoJ5TMucpFUklnj+Dhq/sSky0= kmodules.xyz/objectstore-api v0.0.0-20200521103120-92080446e04d h1:ud3XDScnBdD5q6nLQI/tHLSbuuSwIFaav6IhcQAz2qA= kmodules.xyz/objectstore-api v0.0.0-20200521103120-92080446e04d/go.mod h1:k6sbzLWYBLRGDNmCj/NwLgj1cniRXCl9ux/P6+7Xd+A= -kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41 h1:BsCSSPoY0uRGylfPTUzzQ28h2axuXremPGPzwpmxvYI= -kmodules.xyz/objectstore-api v0.0.0-20200922210707-59bab27e5d41/go.mod h1:XAWxC/b1ICoufU6XDV0AOHNQY+y+4/B3Z5uyLnW1B6s= kmodules.xyz/objectstore-api v0.0.0-20201105133858-cbb2af88d50a h1:FJ8Fwn+BCalLuzkhjmyDf7Fuh19LBIEf/Fx/+xaYDB0= kmodules.xyz/objectstore-api v0.0.0-20201105133858-cbb2af88d50a/go.mod h1:87wP8pKn5ICyQcbK+w+4Jlx5JQy/+mkDGj7T/Qnfrpk= kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226 h1:RZ7H0gl1z/9jLI74YOlGEtNeAknxTEKeAeYH0jakUcM= kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226/go.mod h1:IbK+hCI23UfTDMzG7hos9sERCase2xsFK+XC0Ns3OCg= -kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab h1:d/4AFAN0TfKgwhjbQYzwXXHT/5/vTP7SAAvS4uJX+wQ= -kmodules.xyz/offshoot-api v0.0.0-20200922211229-36acc531abab/go.mod h1:Wy3/mWK2lWQOviKVpBtiCEYtLaYIaSiym8leZNKBUd4= kmodules.xyz/offshoot-api v0.0.0-20201105074700-8675f5f686f2 h1:JVuNeHhVq/iRRM2yRF7nuYUdq1necfAPGpA5JjUcBuk= kmodules.xyz/offshoot-api v0.0.0-20201105074700-8675f5f686f2/go.mod h1:RMHLigHILAk04wMAuMqBerskKdWlLyjqb0zLLL68cBM= kmodules.xyz/openshift v0.0.0-20200522123204-ce4abf5433c8/go.mod h1:nVhGcoB3Bi7Ots5+g972Ap/vtyIrrtoK3Z3aulNux7w= kmodules.xyz/prober v0.0.0-20200521101241-adf06150535c h1:aV6O9NbDpnFVra/D8c7b7TjI05w/CyI5CYJ8IBg6lg8= kmodules.xyz/prober v0.0.0-20200521101241-adf06150535c/go.mod h1:XYWZkfQquD09Mn+O7piHS+SEPq9oFV1Wy2WZ9DA+oeA= -kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e h1:NASVP0dOE5Zdlq+3Op7Fh2Yc8ei32uf9PxEbuwGLQm0= -kmodules.xyz/prober v0.0.0-20200922212142-743a6514664e/go.mod h1:AZ58K5hrxkkNPf8tM+UWeZjtNG3/mn192nKcUyC93F8= kmodules.xyz/prober v0.0.0-20201105074402-a243b3a27fd8 h1:UJb5lHQVFKbmlgmRLq5IWJGtz3JqYYbyVG+dNdjC9Cc= kmodules.xyz/prober v0.0.0-20201105074402-a243b3a27fd8/go.mod h1:2eN8X5Wq7/AAgE5AWMAX8T0lE51HZiYEldG2RQuouX4= kmodules.xyz/webhook-runtime v0.0.0-20200522123600-ca70a7e28ed0/go.mod h1:9hUftUcjvzDSiO5LIbe2U8Naz4tyS9Ndf1LRzsytMzs= @@ -1402,6 +1328,6 @@ software.sslmate.com/src/go-pkcs12 v0.0.0-20180114231543-2291e8f0f237/go.mod h1: sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= stash.appscode.dev/apimachinery v0.10.0 h1:zKmaANWOTH89J7a/D1FwXFUWAQdI1rA5Nr82WbnLGm8= stash.appscode.dev/apimachinery v0.10.0/go.mod h1:TpdBIAiHCtpkUB13SDUyCZ6y+5wmzXBMAf9e72cSPO4= -stash.appscode.dev/apimachinery v0.11.3 h1:QtDA1w1Piu350toPE++99NvKM1y+zqv44A9sr7LBRCw= -stash.appscode.dev/apimachinery v0.11.3/go.mod h1:j6XQeyMu0BoUwI9+n3wuts0RpZzU8HNYaGOrCuD3I6U= +stash.appscode.dev/apimachinery v0.11.6-0.20201106214826-132a511faa97 h1:UR+jW3PbIPmdG1fWLVSIYiOsBsnMSc55feLZCvobXjQ= +stash.appscode.dev/apimachinery v0.11.6-0.20201106214826-132a511faa97/go.mod h1:JQtqMYDOMkcxmcsUnOiRhi/BIvFWlceAIcauBw1a48M= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/hack/gencrd/main.go b/hack/gencrd/main.go index caf504e3a..b88c7cc36 100644 --- a/hack/gencrd/main.go +++ b/hack/gencrd/main.go @@ -24,9 +24,9 @@ import ( "stash.appscode.dev/mongodb/apis/installer/install" api "stash.appscode.dev/mongodb/apis/installer/v1alpha1" - gort "github.com/appscode/go/runtime" "github.com/go-openapi/spec" "github.com/golang/glog" + gort "gomodules.xyz/runtime" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/kube-openapi/pkg/common" @@ -48,17 +48,13 @@ func generateSwaggerJson() { Title: "Stash", Version: "v0", Contact: &spec.ContactInfo{ - ContactInfoProps: spec.ContactInfoProps{ - Name: "AppsCode Inc.", - URL: "https://appscode.com", - Email: "hello@appscode.com", - }, + Name: "AppsCode Inc.", + URL: "https://appscode.com", + Email: "hello@appscode.com", }, License: &spec.License{ - LicenseProps: spec.LicenseProps{ - Name: "Apache 2.0", - URL: "https://www.apache.org/licenses/LICENSE-2.0.html", - }, + Name: "Apache 2.0", + URL: "https://www.apache.org/licenses/LICENSE-2.0.html", }, }, OpenAPIDefinitions: []common.GetOpenAPIDefinitions{ diff --git a/pkg/backup.go b/pkg/backup.go index 0d250f5d4..03f20841d 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -36,15 +36,16 @@ import ( "stash.appscode.dev/apimachinery/pkg/restic" api_util "stash.appscode.dev/apimachinery/pkg/util" - "github.com/appscode/go/flags" - "github.com/appscode/go/log" - "github.com/appscode/go/types" "github.com/codeskyblue/go-sh" "github.com/pkg/errors" "github.com/spf13/cobra" license "go.bytebuilders.dev/license-verifier/kubernetes" + "gomodules.xyz/pointer" + "gomodules.xyz/x/flags" + "gomodules.xyz/x/log" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" @@ -279,9 +280,9 @@ func (opt *mongoOptions) backupMongoDB(targetRef api_v1beta1.TargetRef) (*restic context.TODO(), opt.stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(status *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { - status.Targets[i].TotalHosts = types.Int32P(int32(len(parameters.ReplicaSets) + 1)) // for each shard there will be one key in parameters.ReplicaSet - return status + func(status *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { + status.Targets[i].TotalHosts = pointer.Int32P(int32(len(parameters.ReplicaSets) + 1)) // for each shard there will be one key in parameters.ReplicaSet + return backupSession.UID, status }, metav1.UpdateOptions{}, ) diff --git a/pkg/restore.go b/pkg/restore.go index cf3eac828..b4d824de1 100644 --- a/pkg/restore.go +++ b/pkg/restore.go @@ -30,14 +30,15 @@ import ( stash_cs_util "stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util" "stash.appscode.dev/apimachinery/pkg/restic" - "github.com/appscode/go/flags" - "github.com/appscode/go/log" - "github.com/appscode/go/types" "github.com/pkg/errors" "github.com/spf13/cobra" license "go.bytebuilders.dev/license-verifier/kubernetes" + "gomodules.xyz/pointer" + "gomodules.xyz/x/flags" + "gomodules.xyz/x/log" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" @@ -212,9 +213,9 @@ func (opt *mongoOptions) restoreMongoDB(targetRef api_v1beta1.TargetRef) (*resti context.TODO(), opt.stashClient.StashV1beta1(), restoreSession.ObjectMeta, - func(status *api_v1beta1.RestoreSessionStatus) *api_v1beta1.RestoreSessionStatus { - status.TotalHosts = types.Int32P(int32(len(parameters.ReplicaSets) + 1)) // for each shard there will be one key in parameters.ReplicaSet - return status + func(status *api_v1beta1.RestoreSessionStatus) (types.UID, *api_v1beta1.RestoreSessionStatus) { + status.TotalHosts = pointer.Int32P(int32(len(parameters.ReplicaSets) + 1)) // for each shard there will be one key in parameters.ReplicaSet + return restoreSession.UID, status }, metav1.UpdateOptions{}, ) diff --git a/pkg/root.go b/pkg/root.go index e1550321c..86db17758 100644 --- a/pkg/root.go +++ b/pkg/root.go @@ -21,9 +21,9 @@ import ( "stash.appscode.dev/apimachinery/client/clientset/versioned/scheme" - "github.com/appscode/go/flags" - v "github.com/appscode/go/version" "github.com/spf13/cobra" + "gomodules.xyz/x/flags" + v "gomodules.xyz/x/version" clientsetscheme "k8s.io/client-go/kubernetes/scheme" "kmodules.xyz/client-go/logs" "kmodules.xyz/client-go/tools/cli" diff --git a/pkg/utils.go b/pkg/utils.go index 567d81efc..4a56719e6 100644 --- a/pkg/utils.go +++ b/pkg/utils.go @@ -25,7 +25,7 @@ import ( stash_cs "stash.appscode.dev/apimachinery/client/clientset/versioned" "stash.appscode.dev/apimachinery/pkg/restic" - "github.com/appscode/go/log" + "gomodules.xyz/x/log" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/kubernetes" appcatalog_cs "kmodules.xyz/custom-resources/client/clientset/versioned" diff --git a/vendor/github.com/appscode/go/encoding/json/types/array_or_int.go b/vendor/github.com/appscode/go/encoding/json/types/array_or_int.go deleted file mode 100644 index 9494ff1db..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/array_or_int.go +++ /dev/null @@ -1,55 +0,0 @@ -package types - -import ( - "bytes" - "encoding/json" - "errors" - "strconv" -) - -/* - GO => Json - [] => `[]` - [1] => `1` -[1, 2] => `[1,2]` -*/ -type ArrayOrInt []int - -func (m *ArrayOrInt) MarshalJSON() ([]byte, error) { - a := *m - n := len(a) - var buf bytes.Buffer - if n == 1 { - buf.WriteString(strconv.Itoa(a[0])) - } else { - buf.WriteString(`[`) - - for i := 0; i < n; i++ { - if i > 0 { - buf.WriteString(`,`) - } - buf.WriteString(strconv.Itoa(a[i])) - } - - buf.WriteString(`]`) - } - return buf.Bytes(), nil -} - -func (m *ArrayOrInt) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("jsontypes.ArrayOrInt: UnmarshalJSON on nil pointer") - } - var err error - if data[0] == '[' { - var a []int - err = json.Unmarshal(data, &a) - if err == nil { - *m = a - } - } else { - v, _ := strconv.Atoi(string(data)) - *m = append((*m)[0:0], v) - } - return err -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/array_or_string.go b/vendor/github.com/appscode/go/encoding/json/types/array_or_string.go deleted file mode 100644 index 10015f145..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/array_or_string.go +++ /dev/null @@ -1,57 +0,0 @@ -package types - -import ( - "bytes" - "encoding/json" - "errors" -) - -/* - GO => Json - [] => `[]` - ["a"] => `"a"` -["a", "b"] => `["a","b"]` -*/ -type ArrayOrString []string - -func (m *ArrayOrString) MarshalJSON() ([]byte, error) { - a := *m - n := len(a) - var buf bytes.Buffer - if n == 1 { - buf.WriteString(`"`) - buf.WriteString(a[0]) - buf.WriteString(`"`) - } else { - buf.WriteString(`[`) - - for i := 0; i < n; i++ { - if i > 0 { - buf.WriteString(`,`) - } - buf.WriteString(`"`) - buf.WriteString(a[i]) - buf.WriteString(`"`) - } - - buf.WriteString(`]`) - } - return buf.Bytes(), nil -} - -func (m *ArrayOrString) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("jsontypes.ArrayOrString: UnmarshalJSON on nil pointer") - } - var err error - if data[0] == '[' { - var a []string - err = json.Unmarshal(data, &a) - if err == nil { - *m = a - } - } else { - *m = append((*m)[0:0], string(data[1:len(data)-1])) - } - return err -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/bool_yo.go b/vendor/github.com/appscode/go/encoding/json/types/bool_yo.go deleted file mode 100644 index ea8395430..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/bool_yo.go +++ /dev/null @@ -1,33 +0,0 @@ -package types - -import ( - "errors" - "strconv" -) - -type BoolYo bool - -func (m *BoolYo) MarshalJSON() ([]byte, error) { - a := *m - if a { - return []byte(`"true"`), nil - } - return []byte(`"false"`), nil -} - -func (m *BoolYo) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("jsontypes.BoolYo: UnmarshalJSON on nil pointer") - } - - n := len(data) - var in string - if data[0] == '"' && data[n-1] == '"' { - in = string(data[1 : n-1]) - } else { - in = string(data) - } - v, err := strconv.ParseBool(in) - *m = BoolYo(v) - return err -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/doc.go b/vendor/github.com/appscode/go/encoding/json/types/doc.go deleted file mode 100644 index d3ca266e2..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package types provides a collection of Golang types with JSON marshaling support -package types diff --git a/vendor/github.com/appscode/go/encoding/json/types/int_hash.go b/vendor/github.com/appscode/go/encoding/json/types/int_hash.go deleted file mode 100644 index 7ad701cbb..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/int_hash.go +++ /dev/null @@ -1,193 +0,0 @@ -package types - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - - "github.com/appscode/go/types" -) - -/* -IntHash represents as int64 Generation and string Hash. It is json serialized into $. -*/ -// +k8s:openapi-gen=true -type IntHash struct { - generation int64 - hash string -} - -func ParseIntHash(v interface{}) (*IntHash, error) { - switch m := v.(type) { - case nil: - return &IntHash{}, nil - case int: - return &IntHash{generation: int64(m)}, nil - case int64: - return &IntHash{generation: m}, nil - case *int64: - return &IntHash{generation: types.Int64(m)}, nil - case IntHash: - return &m, nil - case *IntHash: - return m, nil - case string: - return parseStringIntoIntHash(m) - case *string: - return parseStringIntoIntHash(types.String(m)) - default: - return nil, fmt.Errorf("failed to parse type %s into IntHash", reflect.TypeOf(v).String()) - } -} - -func parseStringIntoIntHash(s string) (*IntHash, error) { - if s == "" { - return &IntHash{}, nil - } - - idx := strings.IndexRune(s, '$') - switch { - case idx <= 0: - return nil, errors.New("missing generation") - case idx == len(s)-1: - return nil, errors.New("missing hash") - default: - i, err := strconv.ParseInt(s[:idx], 10, 64) - if err != nil { - return nil, err - } - h := s[idx+1:] - return &IntHash{generation: i, hash: h}, nil - } -} - -func NewIntHash(i int64, h string) *IntHash { return &IntHash{generation: i, hash: h} } - -func IntHashForGeneration(i int64) *IntHash { return &IntHash{generation: i} } - -func IntHashForHash(h string) *IntHash { return &IntHash{hash: h} } - -func (m IntHash) Generation() int64 { - return m.generation -} - -func (m IntHash) Hash() string { - return m.hash -} - -// IsZero returns true if the value is nil or time is zero. -func (m *IntHash) IsZero() bool { - if m == nil { - return true - } - return m.generation == 0 && m.hash == "" -} - -func (m *IntHash) Equal(u *IntHash) bool { - if m == nil { - return u == nil - } - if u == nil { // t != nil - return false - } - if m == u { - return true - } - if m.generation == u.generation { - return m.hash == u.hash - } - return false -} - -func (m *IntHash) MatchGeneration(u *IntHash) bool { - if m == nil { - return u == nil - } - if u == nil { // t != nil - return false - } - if m == u { - return true - } - return m.generation == u.generation -} - -func (m *IntHash) DeepCopyInto(out *IntHash) { - *out = *m -} - -func (m *IntHash) DeepCopy() *IntHash { - if m == nil { - return nil - } - out := new(IntHash) - m.DeepCopyInto(out) - return out -} - -func (m IntHash) String() string { - return fmt.Sprintf(`%d$%s`, m.generation, m.hash) -} - -func (m *IntHash) MarshalJSON() ([]byte, error) { - if m == nil { - return nil, nil - } - if m.hash == "" { - return json.Marshal(m.generation) - } - return json.Marshal(m.String()) -} - -func (m *IntHash) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("jsontypes.IntHash: UnmarshalJSON on nil pointer") - } - - if data[0] == '"' { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - ih, err := ParseIntHash(s) - if err != nil { - return err - } - *m = *ih - return nil - } else if bytes.Equal(data, []byte("null")) { - return nil - } - - var i int64 - err := json.Unmarshal(data, &i) - if err != nil { - return err - } - m.generation = i - return nil -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ IntHash) OpenAPISchemaType() []string { return []string{"string"} } - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ IntHash) OpenAPISchemaFormat() string { return "" } - -// MarshalQueryParameter converts to a URL query parameter value -func (m IntHash) MarshalQueryParameter() (string, error) { - if m.IsZero() { - // Encode unset/nil objects as an empty string - return "", nil - } - return m.String(), nil -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/str_to_bool.go b/vendor/github.com/appscode/go/encoding/json/types/str_to_bool.go deleted file mode 100644 index b8fcc7169..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/str_to_bool.go +++ /dev/null @@ -1,44 +0,0 @@ -package types - -import ( - "errors" -) - -/* -StrToBool turns strings into bool when marshaled to Json. Empty strings are converted to false. Non-empty string, eg, -`"false"` will become True bool value. If already a json bool, then no change is made. - -This can be used to turn a string to bool if you have existing Json data. -*/ -type StrToBool bool - -func (m *StrToBool) MarshalJSON() ([]byte, error) { - a := *m - if a { - return []byte("true"), nil - } - return []byte("false"), nil -} - -func (m *StrToBool) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("jsontypes.StrToBool: UnmarshalJSON on nil pointer") - } - var err error - if data[0] == '"' { - // non empty string == true - *m = (len(data) - 2) > 0 - } else { - switch string(data) { - case "true": - *m = true - err = nil - case "false": - *m = false - err = nil - default: - err = errors.New("jsontypes.StrToBool: UnmarshalJSON failed for " + string(data)) - } - } - return err -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/str_yo.go b/vendor/github.com/appscode/go/encoding/json/types/str_yo.go deleted file mode 100644 index 1dd083f12..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/str_yo.go +++ /dev/null @@ -1,43 +0,0 @@ -package types - -import ( - "bytes" - "encoding/json" - "errors" - "unicode/utf8" -) - -/* -StrYo turns non-strings into into a string by adding quotes around it into bool, -when marshaled to Json. If input is already string, no change is done. -*/ -type StrYo string - -func (m *StrYo) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("jsontypes.StrYo: UnmarshalJSON on nil pointer") - } - - if data[0] == '"' { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - *m = StrYo(s) - return nil - } else if data[0] == '{' { - return errors.New("jsontypes.StrYo: Expected string, found object") - } else if data[0] == '[' { - return errors.New("jsontypes.StrYo: Expected string, found array") - } else if bytes.Equal(data, []byte("null")) { - *m = "" - return nil - } - d := string(data) - if utf8.ValidString(d) { - *m = StrYo(d) - return nil - } - return errors.New("jsontypes.StrYo: Found invalid utf8 byte array") -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/urlamp.go b/vendor/github.com/appscode/go/encoding/json/types/urlamp.go deleted file mode 100644 index 49cf04d89..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/urlamp.go +++ /dev/null @@ -1,105 +0,0 @@ -package types - -import ( - "bytes" - "errors" - "fmt" - "net/url" - "reflect" - "sort" - "strconv" - "strings" -) - -type URLMap struct { - Scheme string - Hosts map[string]string - Port int -} - -func NewURLMap(scheme string, port int) *URLMap { - return &URLMap{ - Scheme: scheme, - Hosts: map[string]string{}, - Port: port, - } -} - -func (um *URLMap) Insert(name, host string) { - um.Hosts[name] = host -} - -func (um *URLMap) Delete(hosts ...string) { - for _, host := range hosts { - delete(um.Hosts, host) - } -} - -func (um *URLMap) Has(host string) bool { - _, contained := um.Hosts[host] - return contained -} - -func (um URLMap) Equal(s2 URLMap) bool { - return um.Scheme == s2.Scheme && - um.Port == s2.Port && - reflect.DeepEqual(um.Hosts, s2.Hosts) -} - -func (um *URLMap) MarshalJSON() ([]byte, error) { - var b bytes.Buffer - b.WriteRune('"') - if um != nil { - names := make([]string, 0, len(um.Hosts)) - for name := range um.Hosts { - names = append(names, name) - } - sort.Strings(names) - - for i, name := range names { - if i > 0 { - b.WriteRune(',') - } - b.WriteString(name) - b.WriteRune('=') - b.WriteString(um.Scheme) - b.WriteString("://") - b.WriteString(um.Hosts[name]) - b.WriteString(":") - b.WriteString(strconv.Itoa(um.Port)) - } - } - b.WriteRune('"') - return []byte(b.String()), nil -} - -func (um *URLMap) UnmarshalJSON(data []byte) error { - if um == nil { - return errors.New("jsontypes.URLMap: UnmarshalJSON on nil pointer") - } - - n := len(data) - if n < 2 { - return fmt.Errorf("jsontypes.URLMap: UnmarshalJSON on invalid data %s", string(data)) - } - if n == 2 && string(data) == `""` { - return nil - } - um.Hosts = map[string]string{} - - entries := strings.Split(string(data[1:n-1]), ",") - for _, entry := range entries { - parts := strings.Split(entry, "=") - if u, err := url.Parse(parts[1]); err == nil { - um.Scheme = u.Scheme - um.Hosts[parts[0]] = u.Hostname() - um.Port, err = strconv.Atoi(u.Port()) - if err != nil { - return err - } - } else { - return err - } - } - return nil -} diff --git a/vendor/github.com/appscode/go/encoding/json/types/urlset.go b/vendor/github.com/appscode/go/encoding/json/types/urlset.go deleted file mode 100644 index eacaa896a..000000000 --- a/vendor/github.com/appscode/go/encoding/json/types/urlset.go +++ /dev/null @@ -1,97 +0,0 @@ -package types - -import ( - "errors" - "fmt" - "net/url" - "sort" - "strconv" - "strings" - - "bytes" - - "github.com/appscode/go/sets" -) - -type URLSet struct { - Scheme string - Hosts sets.String - Port int -} - -func NewURLSet(scheme string, port int) *URLSet { - return &URLSet{ - Scheme: scheme, - Hosts: sets.NewString(), - Port: port, - } -} - -func (us *URLSet) Insert(hosts ...string) { - us.Hosts.Insert(hosts...) -} - -func (us *URLSet) Delete(hosts ...string) { - us.Hosts.Delete(hosts...) -} - -func (us *URLSet) Has(host string) bool { - return us.Hosts.Has(host) -} - -func (s1 URLSet) Equal(s2 URLSet) bool { - return s1.Scheme == s2.Scheme && - s1.Port == s2.Port && - s1.Hosts.Equal(s2.Hosts) -} - -func (us *URLSet) MarshalJSON() ([]byte, error) { - var b bytes.Buffer - b.WriteRune('"') - if us != nil { - urls := us.Hosts.List() - sort.Strings(urls) - for i, h := range urls { - if i > 0 { - b.WriteRune(',') - } - b.WriteString(us.Scheme) - b.WriteString("://") - b.WriteString(h) - b.WriteString(":") - b.WriteString(strconv.Itoa(us.Port)) - } - } - b.WriteRune('"') - return []byte(b.String()), nil -} - -func (us *URLSet) UnmarshalJSON(data []byte) error { - if us == nil { - return errors.New("jsontypes.URLSet: UnmarshalJSON on nil pointer") - } - - n := len(data) - if n < 2 { - return fmt.Errorf("jsontypes.URLSet: UnmarshalJSON on invalid data %s", string(data)) - } - if n == 2 && string(data) == `""` { - return nil - } - us.Hosts = sets.NewString() - - urls := strings.Split(string(data[1:n-1]), ",") - for _, rawurl := range urls { - if u, err := url.Parse(rawurl); err == nil { - us.Scheme = u.Scheme - us.Hosts.Insert(u.Hostname()) - us.Port, err = strconv.Atoi(u.Port()) - if err != nil { - return err - } - } else { - return err - } - } - return nil -} diff --git a/vendor/github.com/appscode/go/sets/BUILD b/vendor/github.com/appscode/go/sets/BUILD deleted file mode 100644 index 5a6175ad4..000000000 --- a/vendor/github.com/appscode/go/sets/BUILD +++ /dev/null @@ -1,72 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load("@io_kubernetes_build//defs:go.bzl", "go_genrule") -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "byte.go", - "doc.go", - "empty.go", - "int.go", - "int64.go", - "string.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/sets", -) - -go_genrule( - name = "set-gen", - srcs = [ - "//hack/boilerplate:boilerplate.go.txt", - ], - outs = [ - "byte.go", - "doc.go", - "empty.go", - "int.go", - "int64.go", - "string.go", - ], - cmd = """ -$(location //vendor/k8s.io/code-generator/cmd/set-gen) \ - --input-dirs ./vendor/k8s.io/apimachinery/pkg/util/sets/types \ - --output-base $$(dirname $$(dirname $(location :byte.go))) \ - --go-header-file $(location //hack/boilerplate:boilerplate.go.txt) \ - --output-package sets - """, - go_deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/sets/types:go_default_library", - ], - tools = [ - "//vendor/k8s.io/code-generator/cmd/set-gen", - ], -) - -go_test( - name = "go_default_test", - srcs = ["set_test.go"], - importpath = "k8s.io/apimachinery/pkg/util/sets", - library = ":go_default_library", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/util/sets/types:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/github.com/appscode/go/sets/README.md b/vendor/github.com/appscode/go/sets/README.md deleted file mode 100644 index 288edde48..000000000 --- a/vendor/github.com/appscode/go/sets/README.md +++ /dev/null @@ -1 +0,0 @@ -Forked from https://github.com/kubernetes/apimachinery/blob/20bbfef868144faf29af69ddb2f01646ead5c1a1/pkg/util/sets/byte.go#L19 diff --git a/vendor/github.com/appscode/go/sets/byte.go b/vendor/github.com/appscode/go/sets/byte.go deleted file mode 100644 index a460e4b1f..000000000 --- a/vendor/github.com/appscode/go/sets/byte.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. -type Byte map[byte]Empty - -// New creates a Byte from a list of values. -func NewByte(items ...byte) Byte { - ss := Byte{} - ss.Insert(items...) - return ss -} - -// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func ByteKeySet(theMap interface{}) Byte { - v := reflect.ValueOf(theMap) - ret := Byte{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(byte)) - } - return ret -} - -// Insert adds items to the set. -func (s Byte) Insert(items ...byte) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s Byte) Delete(items ...byte) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s Byte) Has(item byte) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Byte) HasAll(items ...byte) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Byte) HasAny(items ...byte) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Byte) Difference(s2 Byte) Byte { - result := NewByte() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Byte) Union(s2 Byte) Byte { - result := NewByte() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Byte) Intersection(s2 Byte) Byte { - var walk, other Byte - result := NewByte() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Byte) IsSuperset(s2 Byte) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Byte) Equal(s2 Byte) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfByte []byte - -func (s sortableSliceOfByte) Len() int { return len(s) } -func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) } -func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted byte slice. -func (s Byte) List() []byte { - res := make(sortableSliceOfByte, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []byte(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Byte) UnsortedList() []byte { - res := make([]byte, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Byte) PopAny() (byte, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue byte - return zeroValue, false -} - -// Len returns the size of the set. -func (s Byte) Len() int { - return len(s) -} - -func lessByte(lhs, rhs byte) bool { - return lhs < rhs -} diff --git a/vendor/github.com/appscode/go/sets/doc.go b/vendor/github.com/appscode/go/sets/doc.go deleted file mode 100644 index 28a6a7d5c..000000000 --- a/vendor/github.com/appscode/go/sets/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -// Package sets has auto-generated set types. -package sets diff --git a/vendor/github.com/appscode/go/sets/empty.go b/vendor/github.com/appscode/go/sets/empty.go deleted file mode 100644 index cd22b953a..000000000 --- a/vendor/github.com/appscode/go/sets/empty.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} diff --git a/vendor/github.com/appscode/go/sets/int.go b/vendor/github.com/appscode/go/sets/int.go deleted file mode 100644 index 0614e9fb0..000000000 --- a/vendor/github.com/appscode/go/sets/int.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. -type Int map[int]Empty - -// New creates a Int from a list of values. -func NewInt(items ...int) Int { - ss := Int{} - ss.Insert(items...) - return ss -} - -// IntKeySet creates a Int from a keys of a map[int](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func IntKeySet(theMap interface{}) Int { - v := reflect.ValueOf(theMap) - ret := Int{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int)) - } - return ret -} - -// Insert adds items to the set. -func (s Int) Insert(items ...int) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s Int) Delete(items ...int) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s Int) Has(item int) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int) HasAll(items ...int) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int) HasAny(items ...int) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int) Difference(s2 Int) Int { - result := NewInt() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int) Union(s2 Int) Int { - result := NewInt() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int) Intersection(s2 Int) Int { - var walk, other Int - result := NewInt() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int) IsSuperset(s2 Int) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int) Equal(s2 Int) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt []int - -func (s sortableSliceOfInt) Len() int { return len(s) } -func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) } -func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int slice. -func (s Int) List() []int { - res := make(sortableSliceOfInt, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int) UnsortedList() []int { - res := make([]int, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int) PopAny() (int, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int) Len() int { - return len(s) -} - -func lessInt(lhs, rhs int) bool { - return lhs < rhs -} diff --git a/vendor/github.com/appscode/go/sets/int64.go b/vendor/github.com/appscode/go/sets/int64.go deleted file mode 100644 index 82e1ba782..000000000 --- a/vendor/github.com/appscode/go/sets/int64.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. -type Int64 map[int64]Empty - -// New creates a Int64 from a list of values. -func NewInt64(items ...int64) Int64 { - ss := Int64{} - ss.Insert(items...) - return ss -} - -// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Int64KeySet(theMap interface{}) Int64 { - v := reflect.ValueOf(theMap) - ret := Int64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int64)) - } - return ret -} - -// Insert adds items to the set. -func (s Int64) Insert(items ...int64) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s Int64) Delete(items ...int64) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s Int64) Has(item int64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int64) HasAll(items ...int64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int64) HasAny(items ...int64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int64) Difference(s2 Int64) Int64 { - result := NewInt64() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int64) Union(s2 Int64) Int64 { - result := NewInt64() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int64) Intersection(s2 Int64) Int64 { - var walk, other Int64 - result := NewInt64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int64) IsSuperset(s2 Int64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int64) Equal(s2 Int64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt64 []int64 - -func (s sortableSliceOfInt64) Len() int { return len(s) } -func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) } -func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int64 slice. -func (s Int64) List() []int64 { - res := make(sortableSliceOfInt64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int64) UnsortedList() []int64 { - res := make([]int64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int64) PopAny() (int64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int64) Len() int { - return len(s) -} - -func lessInt64(lhs, rhs int64) bool { - return lhs < rhs -} diff --git a/vendor/github.com/appscode/go/sets/string.go b/vendor/github.com/appscode/go/sets/string.go deleted file mode 100644 index baef7a6a2..000000000 --- a/vendor/github.com/appscode/go/sets/string.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// New creates a String from a list of values. -func NewString(items ...string) String { - ss := String{} - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s String) Difference(s2 String) String { - result := NewString() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := NewString() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/vendor/github.com/appscode/go/types/convert_types.go b/vendor/github.com/appscode/go/types/convert_types.go deleted file mode 100644 index b60ac2300..000000000 --- a/vendor/github.com/appscode/go/types/convert_types.go +++ /dev/null @@ -1,501 +0,0 @@ -package types - -import "time" - -// StringP returns a pointer to the string value passed in. -func StringP(v string) *string { - return &v -} - -// String returns the value of the string pointer passed in or -// "" if the pointer is nil. -func String(v *string) string { - if v != nil { - return *v - } - return "" -} - -// StringPSlice converts a slice of string values into a slice of -// string pointers -func StringPSlice(src []string) []*string { - dst := make([]*string, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// StringSlice converts a slice of string pointers into a slice of -// string values -func StringSlice(src []*string) []string { - dst := make([]string, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// StringPMap converts a string map of string values into a string -// map of string pointers -func StringPMap(src map[string]string) map[string]*string { - dst := make(map[string]*string) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// StringMap converts a string map of string pointers into a string -// map of string values -func StringMap(src map[string]*string) map[string]string { - dst := make(map[string]string) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -var trueP = BoolP(true) - -// FalseP returns a pointer to `true` boolean value. -func TrueP() *bool { - return trueP -} - -var falseP = BoolP(false) - -// FalseP returns a pointer to `false` boolean value. -func FalseP() *bool { - return falseP -} - -// BoolP returns a pointer to the bool value passed in. -func BoolP(v bool) *bool { - return &v -} - -// Bool returns the value of the bool pointer passed in or -// false if the pointer is nil. -func Bool(v *bool) bool { - if v != nil { - return *v - } - return false -} - -// BoolPSlice converts a slice of bool values into a slice of -// bool pointers -func BoolPSlice(src []bool) []*bool { - dst := make([]*bool, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// BoolSlice converts a slice of bool pointers into a slice of -// bool values -func BoolSlice(src []*bool) []bool { - dst := make([]bool, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// BoolPMap converts a string map of bool values into a string -// map of bool pointers -func BoolPMap(src map[string]bool) map[string]*bool { - dst := make(map[string]*bool) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// BoolMap converts a string map of bool pointers into a string -// map of bool values -func BoolMap(src map[string]*bool) map[string]bool { - dst := make(map[string]bool) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -// IntP returns a pointer to the int value passed in. -func IntP(v int) *int { - return &v -} - -// Int returns the value of the int pointer passed in or -// 0 if the pointer is nil. -func Int(v *int) int { - if v != nil { - return *v - } - return 0 -} - -// IntPSlice converts a slice of int values into a slice of -// int pointers -func IntPSlice(src []int) []*int { - dst := make([]*int, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// IntSlice converts a slice of int pointers into a slice of -// int values -func IntSlice(src []*int) []int { - dst := make([]int, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// IntPMap converts a string map of int values into a string -// map of int pointers -func IntPMap(src map[string]int) map[string]*int { - dst := make(map[string]*int) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// IntMap converts a string map of int pointers into a string -// map of int values -func IntMap(src map[string]*int) map[string]int { - dst := make(map[string]int) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -// UIntP returns a pointer to the uint value passed in. -func UIntP(v uint) *uint { - return &v -} - -// UInt returns the value of the uint pointer passed in or -// 0 if the pointer is nil. -func UInt(v *uint) uint { - if v != nil { - return *v - } - return 0 -} - -// UIntPSlice converts a slice of uint values into a slice of -// uint pointers -func UIntPSlice(src []uint) []*uint { - dst := make([]*uint, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// UIntSlice converts a slice of uint pointers into a slice of -// uint values -func UIntSlice(src []*uint) []uint { - dst := make([]uint, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// UIntPMap converts a string map of uint values into a string -// map of uint pointers -func UIntPMap(src map[string]uint) map[string]*uint { - dst := make(map[string]*uint) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// UIntMap converts a string map of uint pointers into a string -// map of uint values -func UIntMap(src map[string]*uint) map[string]uint { - dst := make(map[string]uint) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -// Int32P returns a pointer to the int32 value passed in. -func Int32P(v int32) *int32 { - return &v -} - -// Int32 returns the value of the int32 pointer passed in or -// 0 if the pointer is nil. -func Int32(v *int32) int32 { - if v != nil { - return *v - } - return 0 -} - -// Int32PSlice converts a slice of int32 values into a slice of -// int32 pointers -func Int32PSlice(src []int32) []*int32 { - dst := make([]*int32, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// Int32Slice converts a slice of int32 pointers into a slice of -// int32 values -func Int32Slice(src []*int32) []int32 { - dst := make([]int32, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// Int32PMap converts a string map of int32 values into a string -// map of int32 pointers -func Int32PMap(src map[string]int32) map[string]*int32 { - dst := make(map[string]*int32) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// Int32Map converts a string map of int32 pointers into a string -// map of int32 values -func Int32Map(src map[string]*int32) map[string]int32 { - dst := make(map[string]int32) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -// Int64P returns a pointer to the int64 value passed in. -func Int64P(v int64) *int64 { - return &v -} - -// Int64 returns the value of the int64 pointer passed in or -// 0 if the pointer is nil. -func Int64(v *int64) int64 { - if v != nil { - return *v - } - return 0 -} - -// Int64PSlice converts a slice of int64 values into a slice of -// int64 pointers -func Int64PSlice(src []int64) []*int64 { - dst := make([]*int64, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// Int64Slice converts a slice of int64 pointers into a slice of -// int64 values -func Int64Slice(src []*int64) []int64 { - dst := make([]int64, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// Int64PMap converts a string map of int64 values into a string -// map of int64 pointers -func Int64PMap(src map[string]int64) map[string]*int64 { - dst := make(map[string]*int64) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// Int64Map converts a string map of int64 pointers into a string -// map of int64 values -func Int64Map(src map[string]*int64) map[string]int64 { - dst := make(map[string]int64) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -// Float64P returns a pointer to the float64 value passed in. -func Float64P(v float64) *float64 { - return &v -} - -// Float64 returns the value of the float64 pointer passed in or -// 0 if the pointer is nil. -func Float64(v *float64) float64 { - if v != nil { - return *v - } - return 0 -} - -// Float64PSlice converts a slice of float64 values into a slice of -// float64 pointers -func Float64PSlice(src []float64) []*float64 { - dst := make([]*float64, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// Float64Slice converts a slice of float64 pointers into a slice of -// float64 values -func Float64Slice(src []*float64) []float64 { - dst := make([]float64, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// Float64PMap converts a string map of float64 values into a string -// map of float64 pointers -func Float64PMap(src map[string]float64) map[string]*float64 { - dst := make(map[string]*float64) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// Float64Map converts a string map of float64 pointers into a string -// map of float64 values -func Float64Map(src map[string]*float64) map[string]float64 { - dst := make(map[string]float64) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} - -// TimeP returns a pointer to the time.Time value passed in. -func TimeP(v time.Time) *time.Time { - return &v -} - -// Time returns the value of the time.Time pointer passed in or -// time.Time{} if the pointer is nil. -func Time(v *time.Time) time.Time { - if v != nil { - return *v - } - return time.Time{} -} - -// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". -// The result is undefined if the Unix time cannot be represented by an int64. -// Which includes calling TimeUnixMilli on a zero Time is undefined. -// -// This utility is useful for service API's such as CloudWatch Logs which require -// their unix time values to be in milliseconds. -// -// See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information. -func TimeUnixMilli(t time.Time) int64 { - return t.UnixNano() / int64(time.Millisecond/time.Nanosecond) -} - -// TimePSlice converts a slice of time.Time values into a slice of -// time.Time pointers -func TimePSlice(src []time.Time) []*time.Time { - dst := make([]*time.Time, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - return dst -} - -// TimeSlice converts a slice of time.Time pointers into a slice of -// time.Time values -func TimeSlice(src []*time.Time) []time.Time { - dst := make([]time.Time, len(src)) - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - return dst -} - -// TimePMap converts a string map of time.Time values into a string -// map of time.Time pointers -func TimePMap(src map[string]time.Time) map[string]*time.Time { - dst := make(map[string]*time.Time) - for k, val := range src { - v := val - dst[k] = &v - } - return dst -} - -// TimeMap converts a string map of time.Time pointers into a string -// map of time.Time values -func TimeMap(src map[string]*time.Time) map[string]time.Time { - dst := make(map[string]time.Time) - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - return dst -} diff --git a/vendor/github.com/appscode/go/types/doc.go b/vendor/github.com/appscode/go/types/doc.go deleted file mode 100644 index 031caf593..000000000 --- a/vendor/github.com/appscode/go/types/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -/* -GOlang value <--> pointer - -##Acknowledgements -This repo was started as a fork of https://github.com/aws/aws-sdk-go/blob/master/aws/convert_types.go -*/ -package types diff --git a/vendor/github.com/go-openapi/spec/.golangci.yml b/vendor/github.com/go-openapi/spec/.golangci.yml index 4e17ed497..3e33f9f2e 100644 --- a/vendor/github.com/go-openapi/spec/.golangci.yml +++ b/vendor/github.com/go-openapi/spec/.golangci.yml @@ -21,8 +21,3 @@ linters: - lll - gochecknoinits - gochecknoglobals - - funlen - - godox - - gocognit - - whitespace - - wsl diff --git a/vendor/github.com/go-openapi/spec/.travis.yml b/vendor/github.com/go-openapi/spec/.travis.yml index f1a3f80b3..aa26d8763 100644 --- a/vendor/github.com/go-openapi/spec/.travis.yml +++ b/vendor/github.com/go-openapi/spec/.travis.yml @@ -1,10 +1,12 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.13.x -- 1.14.x +- 1.11.x +- 1.12.x install: - GO111MODULE=off go get -u gotest.tools/gotestsum +env: +- GO111MODULE=on language: go notifications: slack: diff --git a/vendor/github.com/go-openapi/spec/bindata.go b/vendor/github.com/go-openapi/spec/bindata.go index 66b1f3263..c67e2d877 100644 --- a/vendor/github.com/go-openapi/spec/bindata.go +++ b/vendor/github.com/go-openapi/spec/bindata.go @@ -1,7 +1,7 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: // schemas/jsonschema-draft-04.json (4.357kB) -// schemas/v2/schema.json (40.248kB) +// schemas/v2/schema.json (40.249kB) package spec @@ -70,43 +70,43 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _jsonschemaDraft04Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00") +var _jsonschemaDraft04JSON = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00") -func jsonschemaDraft04JsonBytes() ([]byte, error) { +func jsonschemaDraft04JSONBytes() ([]byte, error) { return bindataRead( - _jsonschemaDraft04Json, + _jsonschemaDraft04JSON, "jsonschema-draft-04.json", ) } -func jsonschemaDraft04Json() (*asset, error) { - bytes, err := jsonschemaDraft04JsonBytes() +func jsonschemaDraft04JSON() (*asset, error) { + bytes, err := jsonschemaDraft04JSONBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0640), modTime: time.Unix(1568963823, 0)} + info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0644), modTime: time.Unix(1567900649, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe1, 0x48, 0x9d, 0xb, 0x47, 0x55, 0xf0, 0x27, 0x93, 0x30, 0x25, 0x91, 0xd3, 0xfc, 0xb8, 0xf0, 0x7b, 0x68, 0x93, 0xa8, 0x2a, 0x94, 0xf2, 0x48, 0x95, 0xf8, 0xe4, 0xed, 0xf1, 0x1b, 0x82, 0xe2}} return a, nil } -var _v2SchemaJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\xe3\x08\xb5\x8b\x99\xbd\x82\xbc\x9e\xc2\xe8\x53\x46\x83\x3f\x33\x54\x2b\x5b\xad\x92\x79\xd9\x8f\x5d\x93\x98\xf2\xe6\xc6\x1c\xe6\x9a\x9e\xfc\x43\x82\x31\x66\x8e\x53\x77\xfe\x90\xe7\xf3\xf6\xe9\x62\x23\x3f\x10\x93\x18\xae\x72\x1a\x9d\xf9\x48\xcb\xcc\x5a\x65\xc7\x4a\x04\xf0\xf3\xd5\xd5\x05\x8a\x41\x08\xbc\x86\x86\x43\x51\x6c\xe0\x46\x57\xf6\x44\x40\x0d\xfb\xff\xa2\xc3\x7c\x3d\x39\x84\xdc\x09\x22\x64\x4f\x12\xd9\xba\xaa\xf6\xe3\xbd\x56\xdd\x91\x25\x6a\x14\x9c\x89\x34\x8e\x31\xdf\xee\x15\x7e\x2f\x39\x81\x15\x2a\x28\x95\x66\x51\xf5\xfd\x83\xc5\xfe\x15\x07\xcf\xf7\x08\xee\x1d\x8e\xb6\xc5\x52\xcc\x8c\x5a\x93\x66\xc5\xd8\x79\x38\x46\xd6\xa7\x88\x37\xc9\x2e\xe3\xd2\xa5\x7b\x4b\x3a\xdc\xa1\xdc\x9e\x29\xf1\x8c\x8a\x99\x16\x47\x8d\xd4\x78\x8b\xf6\x1c\xe9\x71\x54\x1b\x69\xa8\x4a\x93\x37\xe5\xb2\x2c\x4f\x0c\x92\xab\xa0\x73\x32\x72\x59\xd3\xf0\x2d\x8d\xed\xca\x37\x16\x19\x9e\xdb\x1c\xab\x17\x49\xc3\x0f\x37\xdc\x88\xb1\xb4\xd4\x42\xcb\x58\x5e\x6a\x52\x0b\x15\x10\x0a\xb0\x04\xe7\xf8\x58\x32\x16\x01\xa6\xcd\x01\xb2\xc2\x69\x24\x35\x38\x6f\x30\x6a\xae\x1b\xb4\x71\xaa\xad\x1d\xa0\xd6\x20\x2d\x8b\x3c\xc6\x82\x62\x27\x34\x6d\x15\x84\x7b\x43\xb1\x35\x78\xa6\x24\x77\x28\xc1\x6e\xfc\xe9\x48\x74\xf4\x15\xe3\xe1\x84\x42\x88\x40\x7a\x26\x49\x3b\x48\xb1\xa4\x19\x8e\x0c\xa7\xb5\x01\x6c\x0c\x97\x61\x8a\xc2\x32\xd8\x8c\x44\x69\x24\xbf\x65\x1d\x74\xd6\xe5\x44\xef\xec\x48\x5e\xb7\x8a\xa3\x29\x8e\x41\x64\xce\x1f\x88\xdc\x00\x47\x4b\x40\x98\x6e\xd1\x0d\x8e\x48\x98\x63\x5c\x21\xb1\x4c\x05\x0a\x58\x98\xc5\x6d\x4f\x0a\x77\x53\x4f\x8b\xc4\x44\x1f\xb2\xdf\x8d\x3b\xea\x9f\xfe\xf6\xf2\xc5\xff\x5d\x7f\xfe\x9f\xfb\x67\x8f\xff\xf3\xe9\x69\xd1\xfe\xb3\xc7\xfd\x3c\xf8\x3f\x71\x94\x82\x23\xd1\x72\x00\xb7\x42\x99\x6c\xc0\x60\x7b\x0f\x79\xea\xa8\x53\x4b\x56\x31\xfa\x0b\x52\x9f\x96\xdb\xcd\x2f\xd7\x67\xcd\x04\x19\x85\xfe\xdb\x02\x9a\x59\x03\xad\x63\x3c\xea\xff\x2e\x18\xfd\x00\xd9\xe2\x56\x60\x59\x93\xb9\xb6\xb2\x3e\x3c\x2c\xab\x0f\xa7\xb2\x89\x43\xc7\xf6\xd5\xce\x2e\xad\xa6\xa9\xed\xa6\xc6\x5a\xb4\xa6\x67\xdf\x8c\x26\x7b\x50\x5a\x91\x08\x2e\x6d\xd4\x3a\xc1\x9d\xf2\xdb\xde\x1e\xb2\x2c\x6c\xa5\x64\xc9\x16\xb4\x90\xaa\x4a\xb7\x0c\xde\x13\xc3\x2a\x9a\x11\x9b\x7a\x1b\x3d\x95\x97\x37\x31\x6b\x69\x7e\x34\xc0\x67\x1f\x66\x19\x49\xef\xf1\x25\xf5\xac\x0e\xea\x0a\x28\x8d\x4d\x7e\xd9\x57\x4b\x49\xe5\xc6\xb3\x25\xfd\xe6\x57\x42\x25\xac\xcd\xcf\x36\x74\x8e\xca\x24\x47\xe7\x80\xa8\x92\x72\xbd\x3d\x84\x2d\x65\xe2\x82\x1a\x9c\xc4\x44\x92\x1b\x10\x79\x8a\xc4\x4a\x2f\x60\x51\x04\x81\xaa\xf0\xa3\x95\x27\xd7\x12\x7b\xa3\x96\x03\x45\x96\xc1\x8a\x07\xc9\xb2\xb0\x95\x52\x8c\xef\x48\x9c\xc6\x7e\x94\xca\xc2\x0e\x07\x12\x44\xa9\x20\x37\xf0\xae\x0f\x49\xa3\x96\x9d\x4b\x42\x7b\x70\x59\x14\xee\xe0\xb2\x0f\x49\xa3\x96\x4b\x97\xbf\x00\x5d\x4b\x4f\xfc\xbb\x2b\xee\x92\xb9\x17\xb5\xaa\xb8\x0b\x97\x17\x9b\x43\xfd\xd6\xc2\xb2\xc2\x2e\x29\xcf\xfd\x87\x4a\x55\xda\x25\x63\x1f\x5a\x65\x69\x2b\x2d\x3d\x67\xe9\x41\xae\x5e\xc1\x6e\x2b\xd4\xdb\x3e\xa8\xd3\x26\xd2\x48\x92\x24\xca\x61\x86\x8f\x8c\xbb\xf2\x8e\x91\xdf\x1f\x06\x19\x33\xf3\x03\x4d\xba\xcd\xe2\x2d\xfb\x69\xe9\x16\x15\x13\xd5\x56\x85\x4e\x3c\x5b\x8a\xbf\x25\x72\x83\xee\x5e\x20\x22\xf2\xc8\xaa\x7b\xdb\x8e\xe4\x29\x58\xca\x38\xb7\x3f\x2e\x59\xb8\xbd\xa8\x16\x16\xf7\xdb\x79\x51\x9f\x5a\xb4\x8d\x87\x3a\x6e\xbc\x3e\xc5\xb4\xcd\x58\xf9\xf5\x3c\xb9\x6f\x49\xaf\x57\xc1\xfa\x1c\x5d\x6d\x88\x8a\x8b\xd3\x28\xcc\xb7\xef\x10\x8a\x4a\x74\xa9\x4a\xa7\x62\xbf\x0d\x76\x23\x6f\x59\xd9\x31\xee\x40\x11\xfb\x28\xec\x8d\x22\x1c\x13\x5a\x64\x94\x23\x16\x60\xbb\xd2\x7c\xa0\x98\xb2\xe5\x6e\xbc\x54\x33\xe0\x3e\xb9\x52\x17\xdb\xb7\x1b\xc8\x12\x20\x8c\x23\xca\x64\x7e\x78\xa3\x62\x5b\x75\x56\xd9\x9e\x2a\x91\x27\xb0\x70\x34\x1f\x90\x89\xb5\x86\x73\x7e\x71\xda\x1e\xfb\x3a\x72\xdc\x5e\x79\x88\xcb\x74\x79\xd9\x64\xe4\xd4\xc2\x9e\xce\xb1\xfe\x85\x5a\xc0\xe9\x0c\x34\x3d\xd0\x43\xce\xa1\x36\x39\xd5\xa1\x4e\xf5\xf8\xb1\xa9\x23\x08\x75\x84\xac\x53\x6c\x3a\xc5\xa6\x53\x6c\x3a\xc5\xa6\x7f\xc5\xd8\xf4\x51\xfd\xff\x25\x4e\xfa\x33\x05\xbe\x9d\x60\xd2\x04\x93\x6a\x5f\x33\x9b\x98\x50\xd2\xe1\x50\x52\xc6\xcc\xdb\x38\x91\xdb\xe6\xaa\xa2\x8f\xa1\x6a\xa6\xd4\xc6\x56\xd6\x8c\x40\x02\x68\x48\xe8\x1a\xe1\x9a\xd9\x2e\xb7\x05\xc3\x34\xda\x2a\xbb\xcd\x12\x36\x98\x22\x50\x4c\xa1\x1b\xc5\xd5\x84\xf0\xbe\x24\x84\xf7\x2f\x22\x37\xef\x94\xd7\x9f\xa0\xde\x04\xf5\x26\xa8\x37\x41\x3d\x64\x40\x3d\xe5\xf2\xde\x60\x89\x27\xb4\x37\xa1\xbd\xda\xd7\xd2\x2c\x26\xc0\x37\x01\x3e\x1b\xef\x5f\x06\xe0\x6b\x7c\x5c\x91\x08\x26\x10\x38\x81\xc0\x09\x04\x76\x4a\x3d\x81\xc0\xbf\x12\x08\x4c\xb0\xdc\x7c\x99\x00\xd0\x75\x70\xb4\xf8\x5a\x7c\xea\xde\x3e\x39\x08\x30\x5a\x27\x35\xed\xb4\x65\xad\x69\x74\x10\x88\x79\xe2\x30\x52\x19\xd6\x04\x21\xa7\x95\xd5\x0e\x03\xf8\xda\x20\xd7\x84\xb4\x26\xa4\x35\x21\xad\x09\x69\x21\x03\x69\x51\x46\xff\xff\x18\x9b\x54\xed\x87\x47\x06\x9d\x4e\x73\x6e\x9a\xb3\xa9\xce\x83\x5e\x4b\xc6\x71\x20\x45\xd7\x72\xf5\x40\x72\x0e\x34\x6c\xf4\x6c\xf3\xba\x5e\x4b\x97\x0e\x52\xb8\xbe\x8b\x79\xa0\x10\x86\xa1\x75\xb0\x6f\xec\xc8\xf4\x3d\x4d\x7b\x86\xc2\x02\x31\x12\x51\xbf\x07\x94\xad\x10\xd6\x2e\x79\xcf\xe9\x1c\xf5\x1e\x31\x23\x5c\x18\xfb\x9c\xfb\x70\xe0\x62\xbd\xf7\xb5\x94\xcf\xf3\xf6\xfa\xc5\x4e\x9c\x85\x76\x1d\xae\x37\xbc\xde\xa3\x41\xcb\x29\xd0\x5e\x70\x67\x50\x93\x6d\x98\xa8\xd3\x67\x0f\x68\xb1\xeb\x38\x47\x07\x10\x1b\xd2\xe2\x18\x68\x6d\x40\xbb\xa3\x40\xba\x21\xf2\x8e\x81\xfb\xf6\x92\x77\x2f\x70\xe8\xdb\xb2\x36\xbf\x30\x91\xc5\x21\xe7\x45\xcc\x34\x0c\x48\x8e\xd0\xf2\x9b\x7c\x3c\xbd\x1c\x04\x3e\x07\xe8\x7c\x2f\x84\x7a\x48\x4d\x1f\xba\xe1\x76\x45\x7b\x60\xe0\x01\xca\xee\x04\xca\x31\xbe\x73\x5f\xa3\x70\x0c\xad\x1f\xa5\xf5\x76\xd5\xbb\xd2\x7e\xfb\x30\x90\xcf\xfa\x67\x7a\xe6\xc3\x37\x42\x19\xe2\xc9\x9c\x61\x4c\xe7\xd1\x77\x55\x86\x6e\x8f\x7b\x85\x42\x33\xa3\xaa\x57\xae\xfd\xd5\xcc\x9c\x56\x68\xe2\xde\x0e\xa8\x2c\xa9\xb0\x7d\xf0\x54\x2d\x80\xf2\x48\x39\x3d\x98\x1a\x6d\x0b\x9d\xba\x53\xfb\xce\xf8\xd1\x7e\xbb\x60\x4f\x06\xf5\xce\xda\xab\xeb\xca\xcb\xd5\xac\x20\xda\x72\x3b\xa2\x4b\x38\xd7\xb5\x89\xbe\x42\xd9\xb9\x73\xc4\x0c\x6d\xb7\xd9\xf8\x8d\xbd\x3e\x9c\xf5\x53\x68\x48\x14\x36\x8f\x09\xc5\x92\xf1\x21\xd1\x09\x07\x1c\xbe\xa7\x91\xf3\x6a\xc8\xc1\x57\xb0\xdd\xc5\xc6\x1d\xad\x76\x1d\xa8\x82\x0e\x4c\x38\xfe\xa5\x8c\xc5\x0a\x40\x5d\xa1\xbb\x98\xd1\xfb\x74\x61\xed\x1a\x98\xaf\x3c\x8c\x1e\xe3\xc2\x92\x29\x74\x3e\x99\xd0\xf9\x41\x50\xd0\x38\x4b\x57\x7e\x5b\x7a\x0e\xe6\xce\x4e\xd7\x19\x35\x57\xbb\x3c\x3c\xd2\x5e\x4f\x4b\x4c\xf7\x0f\x4d\x2b\x91\x5d\x94\xa6\x95\xc8\x69\x25\x72\x5a\x89\x7c\xb8\x95\xc8\x07\x80\x8c\xda\x9c\x64\x7b\xb7\x71\xdf\x57\x12\x4b\x9a\x1f\x72\x0c\x13\x03\xad\x3c\xd5\x4e\xde\x8e\x57\x13\x6d\x34\x86\xcf\x97\xe6\xa4\x68\xc4\xb0\xf6\xc9\xc2\xeb\x8d\x0b\xd7\xcd\xfe\xba\xa6\xf5\x30\xeb\x30\x33\xbe\xc7\x56\x27\xab\x08\xd9\x6d\xbb\x09\xee\x7c\x2d\xcf\xee\x87\x38\xac\xc8\xdd\x90\x9a\x58\x4a\x4e\x96\xa9\x79\x79\xf3\xde\x20\xf0\x96\xe3\x24\x19\xeb\xba\xf2\x53\x19\xab\x12\xaf\x47\xb3\xa0\x3e\xef\x9b\x8d\x6d\x6d\x7b\xde\x3b\x3b\x1a\xc0\x3f\x95\x7e\xed\x78\xfb\x76\xb8\xaf\xb3\xdd\xc5\xeb\x95\xed\x5a\x62\x41\x82\xb3\x54\x6e\x80\x4a\x92\x6f\x36\xbd\x34\xae\xde\x6f\xa4\xc0\xbc\x08\xe3\x84\xfc\x1d\xb6\xe3\xd0\x62\x38\x95\x9b\x57\xe7\x71\x12\x91\x80\xc8\x31\x69\x5e\x60\x21\x6e\x19\x0f\xc7\xa4\x79\x96\x28\x3e\x47\x54\x65\x41\x36\x08\x40\x88\x1f\x58\x08\x56\xaa\xd5\xbf\xaf\xad\x96\xd7\xd6\xcf\x87\xf5\x34\x0f\x71\x93\x6e\x26\xed\x98\x5b\x9f\x4f\xcf\x95\x34\xc6\xd7\x11\xfa\xb0\x81\x22\x1a\xdb\xdf\x8e\xdc\xc3\xb9\xf8\xdd\x5d\x3c\x74\xe6\xea\xb7\x8b\xbf\xf5\x6e\xb3\x46\x2e\x64\xf4\xab\x3c\x4e\xcf\x36\x1d\xfe\xfa\xb8\x36\xba\x8a\xd8\xad\xf6\xc6\x41\x2a\x37\x8c\x17\x0f\xda\xfe\xda\xe7\x65\xbc\x71\x2c\x36\x57\x8a\x47\x12\x4c\xf1\xbd\x77\x6b\xa4\x50\x7e\x77\x7b\x22\x60\x89\xef\xcd\xf5\xb9\x0c\x97\x79\x0d\x2b\x35\x43\xcb\x3d\x24\xf1\x78\xfc\xf8\xcb\x1f\x15\x06\xe2\x78\xd8\x51\x21\xd9\x1f\xf0\xf5\x8f\x86\xa4\x50\xfa\xb1\x47\x43\xa5\xdd\x69\x14\xe8\xa3\xc0\x86\x91\xa7\x81\x50\xb4\x7c\xc0\x81\x80\x77\x7a\x9f\xc6\xc2\xa9\x8c\x05\x33\xb0\x3b\x31\xa4\xf4\xd7\x1b\x26\x55\x97\x7c\x65\xf8\x69\x1a\x84\x8e\x41\x78\xd9\xec\xc5\x11\x16\x1e\x74\x91\xf5\x56\xf5\x57\x49\x47\x5c\x92\xa9\x1e\x99\x36\xf4\xdb\xb1\x0e\xd3\x78\x02\xb0\x9b\x25\xcb\xe9\xe9\x1d\x0d\x44\x01\x42\x08\x91\x64\xd9\xdd\x37\x08\x17\xef\xf9\xe5\x0f\xbd\x46\x91\xf5\xf9\x89\x92\x37\xdd\x89\x59\x44\x1f\x9c\xee\x34\x1e\xbe\x47\x83\x32\x72\x8e\x37\xdf\xac\x69\x38\xef\x75\xb0\xda\xdb\xac\x83\x94\x2f\x39\xa6\x62\x05\x1c\x25\x9c\x49\x16\xb0\xa8\x3c\xc7\x7e\x76\x71\x3e\x6f\xb5\x24\xe7\xe8\xb7\xb9\xc7\x6c\x43\x92\xee\x21\xd4\x17\xa1\x7f\xba\x35\xfe\xae\x39\xbc\xde\xba\x69\xd9\x8e\xe1\x62\xde\x64\x7d\x16\x88\x1b\xed\x29\x11\xfd\x4f\xa9\xff\x99\x90\xc4\xf6\xf4\xf9\x6e\xe9\x28\x23\xd7\xca\xe5\xee\xee\x9f\x63\xb1\x5b\xfb\x10\xd7\x2f\x1d\xf2\xe3\xbf\xb9\xb5\x6f\xa4\x6d\x7d\x25\x79\xfb\x24\x31\xea\x56\xbe\x5d\x53\xcd\x2d\x36\xa3\x6d\xdf\xab\x1c\xb8\x6d\x6f\xc0\x98\xa7\xdd\xaa\x86\x8c\x1d\x39\xa3\x9d\x70\x2b\x9b\x68\xd9\xfd\x33\xfe\xa9\xb6\x4a\x2e\x63\x0f\xcf\x68\x27\xd9\x4c\xb9\x46\x6d\xcb\xbe\xa1\xa8\xd6\x5f\xc6\xd6\x9f\xf1\x4f\xf4\xd4\xb4\x78\xd0\xd6\xf4\x13\x3c\x3b\xac\xd0\xdc\x90\x34\xda\xc9\xb4\x9a\x1a\x8d\xbd\x93\x87\xd4\xe2\x21\x1b\xb3\x2b\xd1\xbe\xe7\x69\xd4\x53\x67\xd5\x40\xa0\xe3\x19\x3f\x6d\x1a\xbc\x0e\x86\x3c\x10\xb4\x3d\x2a\xcd\x78\x32\xe6\xab\xbd\x36\xc9\xf4\x3a\x58\xae\xc3\xf4\x47\xea\xbf\xfb\x47\xff\x0d\x00\x00\xff\xff\xd2\x32\x5a\x28\x38\x9d\x00\x00") +var _v2SchemaJSON = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\x87\x15\xca\x15\xe5\xf5\x94\x46\x9f\x33\x1a\x0c\x9a\xb1\x5a\xd9\x6a\x95\xcd\xcb\x7e\xec\x9a\xc5\x94\x3b\x37\x26\x31\xd7\xfc\xe4\x1f\x13\x8c\x31\x75\x9c\xba\xf7\x87\x3c\xa1\xb7\x4f\x17\x1b\x09\x82\x98\xc4\x70\x95\xd3\xe8\x4c\x48\x5a\xa6\xd6\x2a\x3d\x56\x42\x80\x9f\xaf\xae\x2e\x50\x0c\x42\xe0\x35\x34\x3c\x8a\x62\x03\x37\xba\xb2\x27\x04\xda\x25\x8d\x06\xe2\xa0\x13\x8a\xf3\xf5\xec\x10\x72\x67\x88\x90\x3d\x4b\x64\xeb\xaa\xda\x8f\xf7\x5a\x75\x47\x9a\xa8\x51\x70\x26\xd2\x38\xc6\x7c\xbb\x57\xfc\xbd\xe4\x04\x56\xa8\xa0\x54\x9a\x45\xd5\xf7\x0f\x16\xfc\x57\x1c\x3c\xdf\x23\xba\x77\x38\xda\x16\x4b\x31\x53\x6a\x4d\x9a\x15\x63\xe7\xe1\x18\x69\x9f\x22\xe0\x24\xbb\x94\x4b\x97\xee\x2d\xf9\x70\x87\x72\x7b\xe6\xc4\x33\x2a\x66\x5e\x1c\x35\x72\xe3\x2d\xda\x73\xe4\xc7\x51\x6d\xa4\xa1\x2a\x4f\xde\x94\xcb\xb2\x3e\x31\x48\xae\x82\xce\xc9\xc8\x65\xcd\xc3\xb7\x34\xb6\x2b\xdf\x58\x65\x78\x6e\x73\xac\x5e\x24\x0d\x3f\xdc\x70\x23\xc6\xda\x52\x0b\x2d\x63\x7d\xa9\x49\x2d\x54\x48\x28\xc0\x12\x9c\xe3\x63\xc9\x58\x04\x98\x36\x07\xc8\x0a\xa7\x91\xd4\xf0\xbc\xc1\xa8\xb9\x70\xd0\xc6\xa9\xb6\x78\x80\x5a\xa3\xb4\x2c\xf4\x18\x0b\x8a\x9d\xd0\xb4\x55\x10\xee\x0d\xc5\xd6\xe0\x99\x93\xdc\xa1\x04\xbb\xf1\xa7\x23\xd1\xd1\x97\x8c\x87\x13\x0a\x21\x02\xe9\x99\x25\xed\x20\xc5\x92\x66\x3c\x32\x9c\xd6\x06\xb0\x31\x5c\x86\x29\x0a\xcb\x60\x33\x12\xa5\x91\xfc\x96\x75\xd0\x59\xd7\x13\xbd\xd3\x23\x79\xdd\x2a\x90\xa6\x38\x06\x91\x39\x7f\x20\x72\x03\x1c\x2d\x01\x61\xba\x45\x37\x38\x22\x61\x8e\x71\x85\xc4\x32\x15\x28\x60\x61\x16\xb8\x3d\x29\xdc\x4d\x3d\x2f\x12\x13\x7d\xc8\x7e\x37\xee\xa8\x7f\xfa\xdb\xcb\x17\xff\x77\xfd\xf9\x7f\xee\x9f\x3d\xfe\xcf\xa7\xa7\x45\xfb\xcf\x1e\xf7\xf3\xe0\xff\xc4\x51\x0a\x8e\x4c\xcb\x01\xdc\x0a\x65\xb2\x01\x83\xed\x3d\xe4\xa9\xa3\x4e\x2d\x59\xc5\xe8\x2f\x48\x7d\x5a\x6e\x37\xbf\x5c\x9f\x35\x13\x64\x14\xfa\xef\x0b\x68\xa6\x0d\xb4\x8e\xf1\xa8\xff\xbb\x60\xf4\x03\x64\xab\x5b\x81\x65\x51\xe6\xda\xca\xfa\xf0\xb0\xac\x3e\x9c\xca\x26\x0e\x1d\xdb\x57\x5b\xbb\xb4\x9a\xa6\xb6\x9b\x1a\x6b\xd1\x9a\x9e\x7e\x33\x9a\xec\x41\x69\x45\x22\xb8\xb4\x51\xeb\x04\x77\xca\x6f\x7b\x7b\xc8\xb2\xb0\x95\x92\x25\x5b\xd0\x42\xaa\x2a\xdd\x32\x78\x4f\x0c\xab\x68\x46\x6c\xea\x6d\xf4\x5c\x5e\xde\xc4\xac\xa5\xf9\xd1\x00\x9f\x7d\x98\x65\x24\xbd\xc7\x97\xd4\xb3\x3a\xa8\x2b\xa0\x34\x76\xf9\x65\x5f\x2d\x25\x95\x1b\xcf\xd6\xf4\x9b\x5f\x09\x95\xb0\x36\x3f\xdb\xd0\x39\x2a\x93\x1c\x9d\x03\xa2\x4a\xca\xf5\xf6\x10\xb6\x94\x89\x0b\x6a\x70\x12\x13\x49\x6e\x40\xe4\x29\x12\x2b\xbd\x80\x45\x11\x04\xaa\xc2\x8f\x56\x9e\x5c\x6b\xec\x8d\x5a\x0e\x14\x59\x06\x2b\x1e\x24\xcb\xc2\x56\x4a\x31\xbe\x23\x71\x1a\xfb\x51\x2a\x0b\x3b\x1c\x48\x10\xa5\x82\xdc\xc0\xbb\x3e\x24\x8d\x5a\x76\x2e\x09\xed\xc1\x65\x51\xb8\x83\xcb\x3e\x24\x8d\x5a\x2e\x5d\xfe\x02\x74\x2d\x3d\xf1\xef\xae\xb8\x4b\xe6\x5e\xd4\xaa\xe2\x2e\x5c\x5e\xec\x0e\xf5\x5b\x0c\xcb\x0a\xbb\xa4\x3c\xf7\x1f\x2a\x55\x69\x97\x8c\x7d\x68\x95\xa5\xad\xb4\xf4\x9c\xa5\x07\xb9\x7a\x05\xbb\xad\x50\x6f\xfb\xa0\x4e\x9b\x48\x23\x49\x92\x28\x87\x19\x3e\x32\xee\xca\x3b\x46\x7e\x7f\x18\x64\xcc\xcc\x0f\x34\xe9\x36\x8b\xb7\x6c\xa8\xa5\x5b\x54\x4c\x54\x5b\x15\x3a\xf1\x6c\x2d\xfe\x96\xc8\x0d\xba\x7b\x81\x88\xc8\x23\xab\xee\x7d\x3b\x92\xa7\x60\x29\xe3\xdc\xff\xb8\x64\xe1\xf6\xa2\x5a\x59\xdc\x6f\xeb\x45\x7d\x6a\xd1\x76\x1e\xea\xb8\xf1\xfa\x14\xd3\x36\x63\xe5\xd7\xf3\xe4\xbe\x25\xbd\x5e\x05\xeb\x73\x74\xb5\x21\x2a\x2e\x4e\xa3\x30\xdf\xbf\x43\x28\x2a\xd1\xa5\x2a\x9d\x8a\xfd\x76\xd8\x8d\xbc\x67\x65\xc7\xb8\x03\x45\xec\xa3\xb0\x37\x8a\x70\x4c\x68\x91\x51\x8e\x58\x80\xed\x4a\xf3\x81\x62\xca\x96\xbb\xf1\x52\xcd\x80\xfb\xe4\x4a\x5d\x6c\xdf\x6e\x20\x4b\x80\x30\x8e\x28\x93\xf9\xe9\x8d\x8a\x6d\xd5\x59\x65\x7b\xaa\x44\x9e\xc0\xc2\xd1\x7c\x40\x26\xd6\x1a\xce\xf9\xc5\x69\x7b\x6c\xec\xc8\x71\x7b\xe5\x21\x2e\xd3\xe5\x65\x93\x91\x53\x0b\x7b\x3a\xc7\xfa\x17\x6a\x01\xa7\x33\xd0\xf4\x40\x0f\x39\x87\xda\xe4\x54\x87\x3a\xd5\xe3\xc7\xa6\x8e\x20\xd4\x11\xb2\x4e\xb1\xe9\x14\x9b\x4e\xb1\xe9\x14\x9b\xfe\x15\x63\xd3\x47\xf5\xff\x97\x38\xe9\xcf\x14\xf8\x76\x82\x49\x13\x4c\xaa\x7d\xcd\x6c\x62\x42\x49\x87\x43\x49\x19\x33\x6f\xe3\x44\x6e\x9b\xab\x8a\x3e\x86\xaa\x99\x52\x1b\x5b\x59\x33\x02\x09\xa0\x21\xa1\x6b\x84\x6b\x66\xbb\xdc\x16\x0c\xd3\x68\xab\xec\x36\x4b\xd8\x60\x8a\x40\x31\x85\x6e\x14\x57\x13\xc2\xfb\x92\x10\xde\xbf\x88\xdc\xbc\x53\x5e\x7f\x82\x7a\x13\xd4\x9b\xa0\xde\x04\xf5\x90\x01\xf5\x94\xcb\x7b\x83\x25\x9e\xd0\xde\x84\xf6\x6a\x5f\x4b\xb3\x98\x00\xdf\x04\xf8\x6c\xbc\x7f\x19\x80\xaf\xf1\x71\x45\x22\x98\x40\xe0\x04\x02\x27\x10\xd8\x29\xf5\x04\x02\xff\x4a\x20\x30\xc1\x72\xf3\x65\x02\x40\xd7\xc1\xd1\xe2\x6b\xf1\xa9\x7b\xfb\xe4\x20\xc0\x68\x9d\xd4\xb4\xd3\x96\xb5\xa6\xd1\x41\x20\xe6\x89\xc3\x48\x65\x58\x13\x84\x9c\x56\x56\x3b\x0c\xe0\x6b\x83\x5c\x13\xd2\x9a\x90\xd6\x84\xb4\x26\xa4\x85\x0c\xa4\x45\x19\xfd\xff\x63\x6c\x52\xb5\x1f\x1e\x19\x74\x3a\xcd\xb9\x69\xce\xa6\x3a\x0f\x7a\x2d\x19\xc7\x81\x14\x5d\xcb\xd5\x03\xc9\x39\xd0\xb0\xd1\xb3\xcd\xfb\x7a\x2d\x5d\x3a\x48\xe1\xfa\x2e\xe6\x81\x42\x18\x86\xd6\xc1\xbe\xb1\x23\xd3\xf7\x34\xed\x19\x0a\x0b\xc4\x48\x44\xfd\x22\x50\xb6\x42\x58\xbb\xe5\x3d\xa7\x73\xd4\x8b\xc4\x8c\x70\x61\xec\x73\xee\xc3\x81\x8b\xf5\xe2\xd7\x52\x3e\xcf\xeb\xeb\x17\x3b\x71\x16\xda\x7d\xb8\xde\xf0\x7a\x8f\x06\x2d\xa7\x40\x7b\xc1\x9d\x41\x4d\xb6\x61\xa2\x4e\x9f\x3d\xa0\xc5\xae\xe3\x1c\x1d\x40\x6c\x48\x8b\x63\xa0\xb5\x01\xed\x8e\x02\xe9\x86\xc8\x3b\x06\xee\xdb\x4b\xde\xbd\xc0\xa1\x6f\xcb\xda\xfc\xc2\x44\x16\x87\x9c\x17\x31\xd3\x30\x20\x39\x42\xcb\x6f\xf2\xf1\xf4\x72\x10\xf8\x1c\xa0\xf3\xbd\x10\xea\x21\x35\x7d\xe8\x86\xdb\x15\xed\x81\x81\x07\x28\xbb\x13\x28\xc7\xf8\xce\x7d\x8d\xc2\x31\xb4\x7e\x94\xd6\xdb\x55\xef\x4a\xfb\xed\xc3\x40\x3e\xeb\x9f\xe9\x99\x0f\xdf\x08\x65\x88\x27\x73\x86\x31\x9d\x47\xdf\x55\x19\xba\x3d\xee\x15\x0a\xcd\x8c\xaa\x5e\xb9\xf6\x57\x33\x73\x5a\xa1\x89\x7b\x3b\xa0\xb2\xa4\xc2\xf6\xc1\x53\xb5\x00\xca\x23\xe5\xf4\x60\x6a\xb4\x2d\x74\xea\x4e\xed\x3b\xe3\x47\xfb\xed\x82\x3d\x19\xd4\x3b\x6b\xaf\xae\x2b\x2f\x57\xb3\x82\x68\xcb\xed\x88\x2e\xe1\x5c\xd7\x26\xfa\x0a\x65\xe7\xce\x11\x33\xb4\xdd\x66\xe3\x37\xf6\xfa\x70\xd6\x4f\xa1\x21\x51\xd8\x3c\x26\x14\x4b\xc6\x87\x44\x27\x1c\x70\xf8\x9e\x46\xce\xab\x21\x07\x5f\xc1\x76\x17\x1b\x77\xb4\xda\x75\xa0\x0a\x3a\x30\xe1\xf8\x97\x32\x16\x2b\x00\x75\x85\xee\x62\x46\xef\xd3\x85\xb5\x6b\x60\xbe\xf2\x30\x7a\x8c\x0b\x4b\xa6\xd0\xf9\x64\x42\xe7\x07\x41\x41\xe3\x2c\x5d\xf9\x6d\xe9\x39\x98\x3b\x3b\x5d\x67\xd4\x5c\xed\xf2\xf0\x48\x7b\xbd\x2d\x31\xdd\x3f\x34\xad\x44\x76\x51\x9a\x56\x22\xa7\x95\xc8\x69\x25\xf2\xe1\x56\x22\x1f\x00\x32\x6a\x73\x92\xed\xe1\xc6\x7d\x9f\x49\x2c\x69\x7e\xc8\x31\x4c\x0c\xb4\xf2\x54\x3b\x79\x3b\x9e\x4d\xb4\xd1\x18\x3e\x5f\x9a\x93\xa2\x11\xc3\xda\x27\x0b\xaf\x37\x2e\x5c\x37\xfb\xeb\x9a\xd6\xc3\xac\xc3\xcc\xf8\x1e\x5b\x9d\xac\x22\x64\xb7\xed\x26\xb8\xf3\xb9\x3c\xbb\x1f\xe2\xb0\x22\x77\x43\x6a\x62\x29\x39\x59\xa6\xe6\xe5\xcd\x7b\x83\xc0\x5b\x8e\x93\x64\xac\xeb\xca\x4f\x65\xac\x4a\xbc\x1e\xcd\x82\xfa\x3c\x70\x36\xb6\xb5\xed\x79\xef\xec\x68\x00\xff\x54\xfa\xb5\xe3\xf1\xdb\xe1\xbe\xce\x76\x17\xaf\x57\xb6\x6b\x89\x05\x09\xce\x52\xb9\x01\x2a\x49\xbe\xd9\xf4\xd2\xb8\x7a\xbf\x91\x02\xf3\x22\x8c\x13\xf2\x77\xd8\x8e\x43\x8b\xe1\x54\x6e\x5e\x9d\xc7\x49\x44\x02\x22\xc7\xa4\x79\x81\x85\xb8\x65\x3c\x1c\x93\xe6\x59\xa2\xf8\x1c\x51\x95\x05\xd9\x20\x00\x21\x7e\x60\x21\x58\xa9\x56\xff\xbe\xb6\x5a\x5e\x5b\x3f\x1f\xd6\xd3\x3c\xc4\x4d\xba\x99\xb4\x63\x6e\x7d\x3e\x3d\x57\xd2\x18\x5f\x47\xe8\xc3\x06\x8a\x68\x6c\x7f\x3b\x72\x0f\xe7\xe2\x77\x77\xf1\xd0\x99\xab\xdf\x2e\xfe\xd6\xbb\xcd\x1a\xb9\x90\xd1\xaf\xf2\x38\x3d\xdb\x74\xf8\xeb\xe3\xda\xe8\x2a\x62\xb7\xda\x1b\x07\xa9\xdc\x30\x5e\xbc\x68\xfb\x6b\x9f\x97\xf1\xc6\xb1\xd8\x5c\x29\x1e\x49\x30\xc5\xf7\xde\xad\x91\x42\xf9\xdd\xed\x89\x80\x25\xbe\x37\xd7\xe7\x32\x5c\xe6\x35\xac\xd4\x0c\x2d\xf7\x90\xc4\xe3\xf5\xe3\x2f\x7f\x54\x18\x88\xe3\x61\x47\x85\x64\x7f\xc0\xd7\x3f\x1a\x92\x42\xe9\xc7\x1e\x0d\x95\x76\xa7\x51\xa0\x8f\x02\x1b\x46\x9e\x06\x42\xd1\xf2\x01\x07\x02\xde\xe9\x7d\x1a\x0b\xa7\x32\x16\xcc\xc0\xee\xc4\x90\xd2\x5f\x6f\x98\x54\x5d\xf2\x95\xe1\xa7\x69\x10\x3a\x06\xe1\x65\xb3\x17\x47\x58\x78\xd0\x45\xd6\x5b\xd5\x5f\x25\x1d\x71\x49\xa6\x7a\x64\xda\xd0\x6f\xc7\x3a\x4c\xe3\x09\xc0\x6e\x96\x2c\xa7\xa7\x77\x34\x10\x05\x08\x21\x44\x92\x65\x77\xdf\x20\x5c\xbc\xe7\x97\x3f\xf4\x1a\x45\xd6\xe7\x27\x4a\xde\x74\x27\x66\x11\x7d\x70\xba\xd3\x78\xf9\x1e\x0d\xca\xc8\x39\xde\x7c\xb3\xa6\xe1\xbc\xd7\xc1\x6a\x6f\xb3\x0e\x52\xbe\xe4\x98\x8a\x15\x70\x94\x70\x26\x59\xc0\xa2\xf2\x1c\xfb\xd9\xc5\xf9\xbc\xd5\x92\x9c\xa3\xdf\xe6\x1e\xb3\x0d\x49\xba\x87\x50\x5f\x84\xfe\xe9\xd6\xf8\xbb\xe6\xf0\x7a\xeb\xa6\x65\x3b\x86\x8b\x79\x93\xf5\x59\x20\x6e\xb4\xa7\x44\xf4\x3f\xa5\xfe\x67\x42\x12\xdb\xd3\xe7\xbb\xa5\xa3\x8c\x5c\x2b\x97\xbb\xbb\x7f\x8e\xc5\x6e\xed\x43\x5c\xbf\x74\xc8\x8f\xff\xe6\xd6\xbe\x91\xb6\xf5\x95\xe4\xed\x93\xc4\xa8\x5b\xf9\x76\x4d\x35\xb7\xd8\x8c\xb6\x7d\xaf\x72\xe0\xb6\xbd\x01\x63\x9e\x76\xab\x1a\x32\x76\xe4\x8c\x76\xc2\xad\x6c\xa2\x65\xf7\xcf\xf8\xa7\xda\x2a\xb9\x8c\x3d\x3c\xa3\x9d\x64\x33\xe5\x1a\xb5\x2d\xfb\x86\xa2\x5a\x7f\x19\x5b\x7f\xc6\x3f\xd1\x53\xd3\xe2\x41\x5b\xd3\x4f\xf0\xec\xb0\x42\x73\x43\xd2\x68\x27\xd3\x6a\x6a\x34\xf6\x4e\x1e\x52\x8b\x87\x6c\xcc\xae\x44\xfb\x9e\xa7\x51\x4f\x9d\x55\x03\x81\x8e\x67\xfc\xb4\x69\xf0\x3a\x18\xf2\x40\xd0\xf6\xa8\x34\xe3\xc9\x98\xaf\xf6\xda\x24\xd3\xeb\x60\xb9\x0e\xd3\x1f\xa9\xff\xee\x1f\xfd\x37\x00\x00\xff\xff\x69\x5d\x0a\x6a\x39\x9d\x00\x00") -func v2SchemaJsonBytes() ([]byte, error) { +func v2SchemaJSONBytes() ([]byte, error) { return bindataRead( - _v2SchemaJson, + _v2SchemaJSON, "v2/schema.json", ) } -func v2SchemaJson() (*asset, error) { - bytes, err := v2SchemaJsonBytes() +func v2SchemaJSON() (*asset, error) { + bytes, err := v2SchemaJSONBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "v2/schema.json", size: 40248, mode: os.FileMode(0640), modTime: time.Unix(1568964748, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xab, 0x88, 0x5e, 0xf, 0xbf, 0x17, 0x74, 0x0, 0xb2, 0x5a, 0x7f, 0xbc, 0x58, 0xcd, 0xc, 0x25, 0x73, 0xd5, 0x29, 0x1c, 0x7a, 0xd0, 0xce, 0x79, 0xd4, 0x89, 0x31, 0x27, 0x90, 0xf2, 0xff, 0xe6}} + info := bindataFileInfo{name: "v2/schema.json", size: 40249, mode: os.FileMode(0644), modTime: time.Unix(1567900649, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcb, 0x25, 0x27, 0xe8, 0x46, 0xae, 0x22, 0xc4, 0xf4, 0x8b, 0x1, 0x32, 0x4d, 0x1f, 0xf8, 0xdf, 0x75, 0x15, 0xc8, 0x2d, 0xc7, 0xed, 0xe, 0x7e, 0x0, 0x75, 0xc0, 0xf9, 0xd2, 0x1f, 0x75, 0x57}} return a, nil } @@ -201,9 +201,9 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "jsonschema-draft-04.json": jsonschemaDraft04Json, + "jsonschema-draft-04.json": jsonschemaDraft04JSON, - "v2/schema.json": v2SchemaJson, + "v2/schema.json": v2SchemaJSON, } // AssetDir returns the file names below a certain @@ -247,9 +247,9 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "jsonschema-draft-04.json": &bintree{jsonschemaDraft04Json, map[string]*bintree{}}, + "jsonschema-draft-04.json": &bintree{jsonschemaDraft04JSON, map[string]*bintree{}}, "v2": &bintree{nil, map[string]*bintree{ - "schema.json": &bintree{v2SchemaJson, map[string]*bintree{}}, + "schema.json": &bintree{v2SchemaJSON, map[string]*bintree{}}, }}, }} diff --git a/vendor/github.com/go-openapi/spec/contact_info.go b/vendor/github.com/go-openapi/spec/contact_info.go index f9bf42e8d..f285970aa 100644 --- a/vendor/github.com/go-openapi/spec/contact_info.go +++ b/vendor/github.com/go-openapi/spec/contact_info.go @@ -14,41 +14,11 @@ package spec -import ( - "encoding/json" - - "github.com/go-openapi/swag" -) - // ContactInfo contact information for the exposed API. // // For more information: http://goo.gl/8us55a#contactObject type ContactInfo struct { - ContactInfoProps - VendorExtensible -} - -type ContactInfoProps struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Email string `json:"email,omitempty"` } - -func (c *ContactInfo) UnmarshalJSON(data []byte) error { - if err := json.Unmarshal(data, &c.ContactInfoProps); err != nil { - return err - } - return json.Unmarshal(data, &c.VendorExtensible) -} - -func (c ContactInfo) MarshalJSON() ([]byte, error) { - b1, err := json.Marshal(c.ContactInfoProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(c.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil -} diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go index 1f30e7f8b..1e7fc8c49 100644 --- a/vendor/github.com/go-openapi/spec/expander.go +++ b/vendor/github.com/go-openapi/spec/expander.go @@ -200,11 +200,11 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error { return nil } -const rootBase = "root" // baseForRoot loads in the cache the root document and produces a fake "root" base path entry // for further $ref resolution func baseForRoot(root interface{}, cache ResolutionCache) string { // cache the root document to resolve $ref's + const rootBase = "root" if root != nil { base, _ := absPath(rootBase) normalizedBase := normalizeAbsPath(base) @@ -452,12 +452,11 @@ func expandPathItem(pathItem *PathItem, resolver *schemaLoader, basePath string) return err } if pathItem.Ref.String() != "" { - transitiveResolver, err := resolver.transitiveResolver(basePath, pathItem.Ref) - if transitiveResolver.shouldStopOnError(err) { + var err error + resolver, err = resolver.transitiveResolver(basePath, pathItem.Ref) + if resolver.shouldStopOnError(err) { return err } - basePath = transitiveResolver.updateBasePath(resolver, basePath) - resolver = transitiveResolver } pathItem.Ref = Ref{} diff --git a/vendor/github.com/go-openapi/spec/go.mod b/vendor/github.com/go-openapi/spec/go.mod index 14e5f2dac..02a142c03 100644 --- a/vendor/github.com/go-openapi/spec/go.mod +++ b/vendor/github.com/go-openapi/spec/go.mod @@ -4,9 +4,14 @@ require ( github.com/go-openapi/jsonpointer v0.19.3 github.com/go-openapi/jsonreference v0.19.2 github.com/go-openapi/swag v0.19.5 + github.com/kr/pty v1.1.5 // indirect + github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.3.0 + golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect - gopkg.in/yaml.v2 v2.2.4 + golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect + golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect + gopkg.in/yaml.v2 v2.2.2 ) go 1.13 diff --git a/vendor/github.com/go-openapi/spec/go.sum b/vendor/github.com/go-openapi/spec/go.sum index c209ff971..86db601c9 100644 --- a/vendor/github.com/go-openapi/spec/go.sum +++ b/vendor/github.com/go-openapi/spec/go.sum @@ -1,3 +1,5 @@ +github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= @@ -5,12 +7,20 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= +github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= +github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= @@ -18,8 +28,11 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= @@ -27,23 +40,35 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/spec/license.go b/vendor/github.com/go-openapi/spec/license.go index e1529b401..f20961b4f 100644 --- a/vendor/github.com/go-openapi/spec/license.go +++ b/vendor/github.com/go-openapi/spec/license.go @@ -14,40 +14,10 @@ package spec -import ( - "encoding/json" - - "github.com/go-openapi/swag" -) - // License information for the exposed API. // // For more information: http://goo.gl/8us55a#licenseObject type License struct { - LicenseProps - VendorExtensible -} - -type LicenseProps struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` } - -func (l *License) UnmarshalJSON(data []byte) error { - if err := json.Unmarshal(data, &l.LicenseProps); err != nil { - return err - } - return json.Unmarshal(data, &l.VendorExtensible) -} - -func (l License) MarshalJSON() ([]byte, error) { - b1, err := json.Marshal(l.LicenseProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(l.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil -} diff --git a/vendor/github.com/go-openapi/spec/ref.go b/vendor/github.com/go-openapi/spec/ref.go index 1f31a9ead..08ff869b2 100644 --- a/vendor/github.com/go-openapi/spec/ref.go +++ b/vendor/github.com/go-openapi/spec/ref.go @@ -68,12 +68,10 @@ func (r *Ref) IsValidURI(basepaths ...string) bool { } if r.HasFullURL { - //#nosec rr, err := http.Get(v) if err != nil { return false } - defer rr.Body.Close() return rr.StatusCode/100 == 2 } diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go index 02d9966c1..9e20e96c2 100644 --- a/vendor/github.com/go-openapi/spec/schema_loader.go +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -86,7 +86,12 @@ func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) (*schemaLoad newOptions := r.options newOptions.RelativeBase = rootURL.String() debugLog("setting new root: %s", newOptions.RelativeBase) - return defaultSchemaLoader(root, newOptions, r.cache, r.context) + resolver, err := defaultSchemaLoader(root, newOptions, r.cache, r.context) + if err != nil { + return nil, err + } + + return resolver, nil } func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) string { @@ -149,15 +154,7 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) toFetch := *refURL toFetch.Fragment = "" - var err error - path := toFetch.String() - if path == rootBase { - path, err = absPath(rootBase) - if err != nil { - return nil, url.URL{}, false, err - } - } - normalized := normalizeAbsPath(path) + normalized := normalizeAbsPath(toFetch.String()) data, fromCache := r.cache.Get(normalized) if !fromCache { diff --git a/vendor/github.com/go-openapi/swag/.travis.yml b/vendor/github.com/go-openapi/swag/.travis.yml index f1a3f80b3..aa26d8763 100644 --- a/vendor/github.com/go-openapi/swag/.travis.yml +++ b/vendor/github.com/go-openapi/swag/.travis.yml @@ -1,10 +1,12 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.13.x -- 1.14.x +- 1.11.x +- 1.12.x install: - GO111MODULE=off go get -u gotest.tools/gotestsum +env: +- GO111MODULE=on language: go notifications: slack: diff --git a/vendor/github.com/go-openapi/swag/convert.go b/vendor/github.com/go-openapi/swag/convert.go index fc085aeb8..7da35c316 100644 --- a/vendor/github.com/go-openapi/swag/convert.go +++ b/vendor/github.com/go-openapi/swag/convert.go @@ -88,7 +88,7 @@ func ConvertFloat64(str string) (float64, error) { return strconv.ParseFloat(str, 64) } -// ConvertInt8 turn a string into an int8 +// ConvertInt8 turn a string into int8 boolean func ConvertInt8(str string) (int8, error) { i, err := strconv.ParseInt(str, 10, 8) if err != nil { @@ -97,7 +97,7 @@ func ConvertInt8(str string) (int8, error) { return int8(i), nil } -// ConvertInt16 turn a string into an int16 +// ConvertInt16 turn a string into a int16 func ConvertInt16(str string) (int16, error) { i, err := strconv.ParseInt(str, 10, 16) if err != nil { @@ -106,7 +106,7 @@ func ConvertInt16(str string) (int16, error) { return int16(i), nil } -// ConvertInt32 turn a string into an int32 +// ConvertInt32 turn a string into a int32 func ConvertInt32(str string) (int32, error) { i, err := strconv.ParseInt(str, 10, 32) if err != nil { @@ -115,12 +115,12 @@ func ConvertInt32(str string) (int32, error) { return int32(i), nil } -// ConvertInt64 turn a string into an int64 +// ConvertInt64 turn a string into a int64 func ConvertInt64(str string) (int64, error) { return strconv.ParseInt(str, 10, 64) } -// ConvertUint8 turn a string into an uint8 +// ConvertUint8 turn a string into a uint8 func ConvertUint8(str string) (uint8, error) { i, err := strconv.ParseUint(str, 10, 8) if err != nil { @@ -129,7 +129,7 @@ func ConvertUint8(str string) (uint8, error) { return uint8(i), nil } -// ConvertUint16 turn a string into an uint16 +// ConvertUint16 turn a string into a uint16 func ConvertUint16(str string) (uint16, error) { i, err := strconv.ParseUint(str, 10, 16) if err != nil { @@ -138,7 +138,7 @@ func ConvertUint16(str string) (uint16, error) { return uint16(i), nil } -// ConvertUint32 turn a string into an uint32 +// ConvertUint32 turn a string into a uint32 func ConvertUint32(str string) (uint32, error) { i, err := strconv.ParseUint(str, 10, 32) if err != nil { @@ -147,7 +147,7 @@ func ConvertUint32(str string) (uint32, error) { return uint32(i), nil } -// ConvertUint64 turn a string into an uint64 +// ConvertUint64 turn a string into a uint64 func ConvertUint64(str string) (uint64, error) { return strconv.ParseUint(str, 10, 64) } diff --git a/vendor/github.com/go-openapi/swag/convert_types.go b/vendor/github.com/go-openapi/swag/convert_types.go index c49cc473a..c95e4e78b 100644 --- a/vendor/github.com/go-openapi/swag/convert_types.go +++ b/vendor/github.com/go-openapi/swag/convert_types.go @@ -181,12 +181,12 @@ func IntValueMap(src map[string]*int) map[string]int { return dst } -// Int32 returns a pointer to of the int32 value passed in. +// Int32 returns a pointer to of the int64 value passed in. func Int32(v int32) *int32 { return &v } -// Int32Value returns the value of the int32 pointer passed in or +// Int32Value returns the value of the int64 pointer passed in or // 0 if the pointer is nil. func Int32Value(v *int32) int32 { if v != nil { @@ -195,7 +195,7 @@ func Int32Value(v *int32) int32 { return 0 } -// Int32Slice converts a slice of int32 values into a slice of +// Int32Slice converts a slice of int64 values into a slice of // int32 pointers func Int32Slice(src []int32) []*int32 { dst := make([]*int32, len(src)) @@ -299,80 +299,13 @@ func Int64ValueMap(src map[string]*int64) map[string]int64 { return dst } -// Uint16 returns a pointer to of the uint16 value passed in. -func Uint16(v uint16) *uint16 { - return &v -} - -// Uint16Value returns the value of the uint16 pointer passed in or -// 0 if the pointer is nil. -func Uint16Value(v *uint16) uint16 { - if v != nil { - return *v - } - - return 0 -} - -// Uint16Slice converts a slice of uint16 values into a slice of -// uint16 pointers -func Uint16Slice(src []uint16) []*uint16 { - dst := make([]*uint16, len(src)) - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - - return dst -} - -// Uint16ValueSlice converts a slice of uint16 pointers into a slice of -// uint16 values -func Uint16ValueSlice(src []*uint16) []uint16 { - dst := make([]uint16, len(src)) - - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - - return dst -} - -// Uint16Map converts a string map of uint16 values into a string -// map of uint16 pointers -func Uint16Map(src map[string]uint16) map[string]*uint16 { - dst := make(map[string]*uint16) - - for k, val := range src { - v := val - dst[k] = &v - } - - return dst -} - -// Uint16ValueMap converts a string map of uint16 pointers into a string -// map of uint16 values -func Uint16ValueMap(src map[string]*uint16) map[string]uint16 { - dst := make(map[string]uint16) - - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - - return dst -} - -// Uint returns a pointer to of the uint value passed in. +// Uint returns a pouinter to of the uint value passed in. func Uint(v uint) *uint { return &v } -// UintValue returns the value of the uint pointer passed in or -// 0 if the pointer is nil. +// UintValue returns the value of the uint pouinter passed in or +// 0 if the pouinter is nil. func UintValue(v *uint) uint { if v != nil { return *v @@ -380,8 +313,8 @@ func UintValue(v *uint) uint { return 0 } -// UintSlice converts a slice of uint values into a slice of -// uint pointers +// UintSlice converts a slice of uint values uinto a slice of +// uint pouinters func UintSlice(src []uint) []*uint { dst := make([]*uint, len(src)) for i := 0; i < len(src); i++ { @@ -390,7 +323,7 @@ func UintSlice(src []uint) []*uint { return dst } -// UintValueSlice converts a slice of uint pointers into a slice of +// UintValueSlice converts a slice of uint pouinters uinto a slice of // uint values func UintValueSlice(src []*uint) []uint { dst := make([]uint, len(src)) @@ -402,8 +335,8 @@ func UintValueSlice(src []*uint) []uint { return dst } -// UintMap converts a string map of uint values into a string -// map of uint pointers +// UintMap converts a string map of uint values uinto a string +// map of uint pouinters func UintMap(src map[string]uint) map[string]*uint { dst := make(map[string]*uint) for k, val := range src { @@ -413,7 +346,7 @@ func UintMap(src map[string]uint) map[string]*uint { return dst } -// UintValueMap converts a string map of uint pointers into a string +// UintValueMap converts a string map of uint pouinters uinto a string // map of uint values func UintValueMap(src map[string]*uint) map[string]uint { dst := make(map[string]uint) @@ -425,13 +358,13 @@ func UintValueMap(src map[string]*uint) map[string]uint { return dst } -// Uint32 returns a pointer to of the uint32 value passed in. +// Uint32 returns a pouinter to of the uint64 value passed in. func Uint32(v uint32) *uint32 { return &v } -// Uint32Value returns the value of the uint32 pointer passed in or -// 0 if the pointer is nil. +// Uint32Value returns the value of the uint64 pouinter passed in or +// 0 if the pouinter is nil. func Uint32Value(v *uint32) uint32 { if v != nil { return *v @@ -439,8 +372,8 @@ func Uint32Value(v *uint32) uint32 { return 0 } -// Uint32Slice converts a slice of uint32 values into a slice of -// uint32 pointers +// Uint32Slice converts a slice of uint64 values uinto a slice of +// uint32 pouinters func Uint32Slice(src []uint32) []*uint32 { dst := make([]*uint32, len(src)) for i := 0; i < len(src); i++ { @@ -449,7 +382,7 @@ func Uint32Slice(src []uint32) []*uint32 { return dst } -// Uint32ValueSlice converts a slice of uint32 pointers into a slice of +// Uint32ValueSlice converts a slice of uint32 pouinters uinto a slice of // uint32 values func Uint32ValueSlice(src []*uint32) []uint32 { dst := make([]uint32, len(src)) @@ -461,8 +394,8 @@ func Uint32ValueSlice(src []*uint32) []uint32 { return dst } -// Uint32Map converts a string map of uint32 values into a string -// map of uint32 pointers +// Uint32Map converts a string map of uint32 values uinto a string +// map of uint32 pouinters func Uint32Map(src map[string]uint32) map[string]*uint32 { dst := make(map[string]*uint32) for k, val := range src { @@ -472,7 +405,7 @@ func Uint32Map(src map[string]uint32) map[string]*uint32 { return dst } -// Uint32ValueMap converts a string map of uint32 pointers into a string +// Uint32ValueMap converts a string map of uint32 pouinters uinto a string // map of uint32 values func Uint32ValueMap(src map[string]*uint32) map[string]uint32 { dst := make(map[string]uint32) @@ -484,13 +417,13 @@ func Uint32ValueMap(src map[string]*uint32) map[string]uint32 { return dst } -// Uint64 returns a pointer to of the uint64 value passed in. +// Uint64 returns a pouinter to of the uint64 value passed in. func Uint64(v uint64) *uint64 { return &v } -// Uint64Value returns the value of the uint64 pointer passed in or -// 0 if the pointer is nil. +// Uint64Value returns the value of the uint64 pouinter passed in or +// 0 if the pouinter is nil. func Uint64Value(v *uint64) uint64 { if v != nil { return *v @@ -498,8 +431,8 @@ func Uint64Value(v *uint64) uint64 { return 0 } -// Uint64Slice converts a slice of uint64 values into a slice of -// uint64 pointers +// Uint64Slice converts a slice of uint64 values uinto a slice of +// uint64 pouinters func Uint64Slice(src []uint64) []*uint64 { dst := make([]*uint64, len(src)) for i := 0; i < len(src); i++ { @@ -508,7 +441,7 @@ func Uint64Slice(src []uint64) []*uint64 { return dst } -// Uint64ValueSlice converts a slice of uint64 pointers into a slice of +// Uint64ValueSlice converts a slice of uint64 pouinters uinto a slice of // uint64 values func Uint64ValueSlice(src []*uint64) []uint64 { dst := make([]uint64, len(src)) @@ -520,8 +453,8 @@ func Uint64ValueSlice(src []*uint64) []uint64 { return dst } -// Uint64Map converts a string map of uint64 values into a string -// map of uint64 pointers +// Uint64Map converts a string map of uint64 values uinto a string +// map of uint64 pouinters func Uint64Map(src map[string]uint64) map[string]*uint64 { dst := make(map[string]*uint64) for k, val := range src { @@ -531,7 +464,7 @@ func Uint64Map(src map[string]uint64) map[string]*uint64 { return dst } -// Uint64ValueMap converts a string map of uint64 pointers into a string +// Uint64ValueMap converts a string map of uint64 pouinters uinto a string // map of uint64 values func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { dst := make(map[string]uint64) @@ -543,74 +476,6 @@ func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { return dst } -// Float32 returns a pointer to of the float32 value passed in. -func Float32(v float32) *float32 { - return &v -} - -// Float32Value returns the value of the float32 pointer passed in or -// 0 if the pointer is nil. -func Float32Value(v *float32) float32 { - if v != nil { - return *v - } - - return 0 -} - -// Float32Slice converts a slice of float32 values into a slice of -// float32 pointers -func Float32Slice(src []float32) []*float32 { - dst := make([]*float32, len(src)) - - for i := 0; i < len(src); i++ { - dst[i] = &(src[i]) - } - - return dst -} - -// Float32ValueSlice converts a slice of float32 pointers into a slice of -// float32 values -func Float32ValueSlice(src []*float32) []float32 { - dst := make([]float32, len(src)) - - for i := 0; i < len(src); i++ { - if src[i] != nil { - dst[i] = *(src[i]) - } - } - - return dst -} - -// Float32Map converts a string map of float32 values into a string -// map of float32 pointers -func Float32Map(src map[string]float32) map[string]*float32 { - dst := make(map[string]*float32) - - for k, val := range src { - v := val - dst[k] = &v - } - - return dst -} - -// Float32ValueMap converts a string map of float32 pointers into a string -// map of float32 values -func Float32ValueMap(src map[string]*float32) map[string]float32 { - dst := make(map[string]float32) - - for k, val := range src { - if val != nil { - dst[k] = *val - } - } - - return dst -} - // Float64 returns a pointer to of the float64 value passed in. func Float64(v float64) *float64 { return &v diff --git a/vendor/github.com/go-openapi/swag/go.mod b/vendor/github.com/go-openapi/swag/go.mod index 4aef463e4..15bbb0822 100644 --- a/vendor/github.com/go-openapi/swag/go.mod +++ b/vendor/github.com/go-openapi/swag/go.mod @@ -6,11 +6,9 @@ require ( github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 github.com/stretchr/testify v1.3.0 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect - gopkg.in/yaml.v2 v2.2.4 + gopkg.in/yaml.v2 v2.2.2 ) replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422 replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1 - -go 1.13 diff --git a/vendor/github.com/go-openapi/swag/go.sum b/vendor/github.com/go-openapi/swag/go.sum index e8a80bacf..33469f54a 100644 --- a/vendor/github.com/go-openapi/swag/go.sum +++ b/vendor/github.com/go-openapi/swag/go.sum @@ -16,5 +16,5 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/swag/json.go b/vendor/github.com/go-openapi/swag/json.go index 7e9902ca3..edf93d84c 100644 --- a/vendor/github.com/go-openapi/swag/json.go +++ b/vendor/github.com/go-openapi/swag/json.go @@ -51,7 +51,7 @@ type ejUnmarshaler interface { UnmarshalEasyJSON(w *jlexer.Lexer) } -// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaler +// WriteJSON writes json data, prefers finding an appropriate interface to short-circuit the marshaller // so it takes the fastest option available. func WriteJSON(data interface{}) ([]byte, error) { if d, ok := data.(ejMarshaler); ok { @@ -65,8 +65,8 @@ func WriteJSON(data interface{}) ([]byte, error) { return json.Marshal(data) } -// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaler -// so it takes the fastest option available +// ReadJSON reads json data, prefers finding an appropriate interface to short-circuit the unmarshaller +// so it takes the fastes option available func ReadJSON(data []byte, value interface{}) error { trimmedData := bytes.Trim(data, "\x00") if d, ok := value.(ejUnmarshaler); ok { @@ -189,7 +189,7 @@ func FromDynamicJSON(data, target interface{}) error { return json.Unmarshal(b, target) } -// NameProvider represents an object capable of translating from go property names +// NameProvider represents an object capabale of translating from go property names // to json property names // This type is thread-safe. type NameProvider struct { diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go index 04160b89b..70f4fb361 100644 --- a/vendor/github.com/go-openapi/swag/loading.go +++ b/vendor/github.com/go-openapi/swag/loading.go @@ -27,15 +27,6 @@ import ( // LoadHTTPTimeout the default timeout for load requests var LoadHTTPTimeout = 30 * time.Second -// LoadHTTPBasicAuthUsername the username to use when load requests require basic auth -var LoadHTTPBasicAuthUsername = "" - -// LoadHTTPBasicAuthPassword the password to use when load requests require basic auth -var LoadHTTPBasicAuthPassword = "" - -// LoadHTTPCustomHeaders an optional collection of custom HTTP headers for load requests -var LoadHTTPCustomHeaders = map[string]string{} - // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in func LoadFromFileOrHTTP(path string) ([]byte, error) { return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path) @@ -68,15 +59,6 @@ func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) { if err != nil { return nil, err } - - if LoadHTTPBasicAuthUsername != "" && LoadHTTPBasicAuthPassword != "" { - req.SetBasicAuth(LoadHTTPBasicAuthUsername, LoadHTTPBasicAuthPassword) - } - - for key, val := range LoadHTTPCustomHeaders { - req.Header.Set(key, val) - } - resp, err := client.Do(req) defer func() { if resp != nil { diff --git a/vendor/github.com/mailru/easyjson/jwriter/writer.go b/vendor/github.com/mailru/easyjson/jwriter/writer.go index eb8547ccc..b9ed7ccaa 100644 --- a/vendor/github.com/mailru/easyjson/jwriter/writer.go +++ b/vendor/github.com/mailru/easyjson/jwriter/writer.go @@ -270,25 +270,16 @@ func (w *Writer) Bool(v bool) { const chars = "0123456789abcdef" -func getTable(falseValues ...int) [128]bool { - table := [128]bool{} - - for i := 0; i < 128; i++ { - table[i] = true - } - - for _, v := range falseValues { - table[v] = false +func isNotEscapedSingleChar(c byte, escapeHTML bool) bool { + // Note: might make sense to use a table if there are more chars to escape. With 4 chars + // it benchmarks the same. + if escapeHTML { + return c != '<' && c != '>' && c != '&' && c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf + } else { + return c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf } - - return table } -var ( - htmlEscapeTable = getTable(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, '"', '&', '<', '>', '\\') - htmlNoEscapeTable = getTable(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, '"', '\\') -) - func (w *Writer) String(s string) { w.Buffer.AppendByte('"') @@ -297,23 +288,15 @@ func (w *Writer) String(s string) { p := 0 // last non-escape symbol - var escapeTable [128]bool - if w.NoEscapeHTML { - escapeTable = htmlNoEscapeTable - } else { - escapeTable = htmlEscapeTable - } - for i := 0; i < len(s); { c := s[i] - if c < utf8.RuneSelf { - if escapeTable[c] { - // single-width character, no escaping is required - i++ - continue - } - + if isNotEscapedSingleChar(c, !w.NoEscapeHTML) { + // single-width character, no escaping is required + i++ + continue + } else if c < utf8.RuneSelf { + // single-with character, need to escape w.Buffer.AppendString(s[p:i]) switch c { case '\t': diff --git a/vendor/github.com/appscode/go/LICENSE b/vendor/gomodules.xyz/runtime/LICENSE similarity index 99% rename from vendor/github.com/appscode/go/LICENSE rename to vendor/gomodules.xyz/runtime/LICENSE index 8dada3eda..d64569567 100644 --- a/vendor/github.com/appscode/go/LICENSE +++ b/vendor/gomodules.xyz/runtime/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/gomodules.xyz/runtime/README.md b/vendor/gomodules.xyz/runtime/README.md new file mode 100644 index 000000000..c31377b1c --- /dev/null +++ b/vendor/gomodules.xyz/runtime/README.md @@ -0,0 +1,3 @@ +# runtime + +Fork of https://github.com/kubernetes/apimachinery/tree/v0.18.9/pkg/util/runtime diff --git a/vendor/gomodules.xyz/runtime/go.mod b/vendor/gomodules.xyz/runtime/go.mod new file mode 100644 index 000000000..2d4f3ecbb --- /dev/null +++ b/vendor/gomodules.xyz/runtime/go.mod @@ -0,0 +1,5 @@ +module gomodules.xyz/runtime + +go 1.15 + +require k8s.io/klog v1.0.0 diff --git a/vendor/github.com/appscode/go/runtime/runtime.go b/vendor/gomodules.xyz/runtime/runtime.go similarity index 53% rename from vendor/github.com/appscode/go/runtime/runtime.go rename to vendor/gomodules.xyz/runtime/runtime.go index e89d148c2..1ba363c7d 100644 --- a/vendor/github.com/appscode/go/runtime/runtime.go +++ b/vendor/gomodules.xyz/runtime/runtime.go @@ -18,11 +18,15 @@ package runtime import ( "fmt" - "log" + "net/http" "os" "os/exec" "runtime" "strings" + "sync" + "time" + + "k8s.io/klog" ) var ( @@ -40,11 +44,7 @@ var PanicHandlers = []func(interface{}){logPanic} // called in case of panic. HandleCrash actually crashes, after calling the // handlers and logging the panic message. // -// TODO: remove this function. We are switching to a world where it's safe for -// apiserver to panic, since it will be restarted by kubelet. At the beginning -// of the Kubernetes project, nothing was going to restart apiserver and so -// catching panics was important. But it's actually much simpler for montoring -// software if we just exit when an unexpected panic happens. +// E.g., you can provide one or more additional handlers for something like shutting down go routines gracefully. func HandleCrash(additionalHandlers ...func(interface{})) { if r := recover(); r != nil { for _, fn := range PanicHandlers { @@ -60,28 +60,42 @@ func HandleCrash(additionalHandlers ...func(interface{})) { } } -// logPanic logs the caller tree when a panic occurs. +// logPanic logs the caller tree when a panic occurs (except in the special case of http.ErrAbortHandler). func logPanic(r interface{}) { - callers := getCallers(r) - log.Printf("Observed a panic: %#v (%v)\n%v", r, r, callers) -} - -func getCallers(r interface{}) string { - callers := "" - for i := 0; true; i++ { - _, file, line, ok := runtime.Caller(i) - if !ok { - break - } - callers = callers + fmt.Sprintf("%v:%v\n", file, line) + if r == http.ErrAbortHandler { + // honor the http.ErrAbortHandler sentinel panic value: + // ErrAbortHandler is a sentinel panic value to abort a handler. + // While any panic from ServeHTTP aborts the response to the client, + // panicking with ErrAbortHandler also suppresses logging of a stack trace to the server's error log. + return } - return callers + // Same as stdlib http server code. Manually allocate stack trace buffer size + // to prevent excessively large logs + const size = 64 << 10 + stacktrace := make([]byte, size) + stacktrace = stacktrace[:runtime.Stack(stacktrace, false)] + if _, ok := r.(string); ok { + klog.Errorf("Observed a panic: %s\n%s", r, stacktrace) + } else { + klog.Errorf("Observed a panic: %#v (%v)\n%s", r, r, stacktrace) + } } // ErrorHandlers is a list of functions which will be invoked when an unreturnable // error occurs. -var ErrorHandlers = []func(error){logError} +// TODO(lavalamp): for testability, this and the below HandleError function +// should be packaged up into a testable and reusable object. +var ErrorHandlers = []func(error){ + logError, + (&rudimentaryErrorBackoff{ + lastErrorTime: time.Now(), + // 1ms was the number folks were able to stomach as a global rate limit. + // If you need to log errors more than 1000 times a second you + // should probably consider fixing your code instead. :) + minPeriod: time.Millisecond, + }).OnError, +} // HandlerError is a method to invoke when a non-user facing piece of code cannot // return an error and needs to indicate it has been ignored. Invoking this method @@ -100,7 +114,28 @@ func HandleError(err error) { // logError prints an error with the call stack of the location it was reported func logError(err error) { - log.Println(err) + klog.ErrorDepth(2, err) +} + +type rudimentaryErrorBackoff struct { + minPeriod time.Duration // immutable + // TODO(lavalamp): use the clock for testability. Need to move that + // package for that to be accessible here. + lastErrorTimeLock sync.Mutex + lastErrorTime time.Time +} + +// OnError will block if it is called more often than the embedded period time. +// This will prevent overly tight hot error loops. +func (r *rudimentaryErrorBackoff) OnError(error) { + r.lastErrorTimeLock.Lock() + defer r.lastErrorTimeLock.Unlock() + d := time.Since(r.lastErrorTime) + if d < r.minPeriod { + // If the time moves backwards for any reason, do nothing + time.Sleep(r.minPeriod - d) + } + r.lastErrorTime = time.Now() } // GetCaller returns the caller of the function that calls it. @@ -119,16 +154,28 @@ func GetCaller() string { // handlers to handle errors and panics the same way. func RecoverFromPanic(err *error) { if r := recover(); r != nil { - callers := getCallers(r) + // Same as stdlib http server code. Manually allocate stack trace buffer size + // to prevent excessively large logs + const size = 64 << 10 + stacktrace := make([]byte, size) + stacktrace = stacktrace[:runtime.Stack(stacktrace, false)] *err = fmt.Errorf( - "recovered from panic %q. (err=%v) Call stack:\n%v", + "recovered from panic %q. (err=%v) Call stack:\n%s", r, *err, - callers) + stacktrace) + } +} + +// Must panics on non-nil errors. Useful to handling programmer level errors. +func Must(err error) { + if err != nil { + panic(err) } } +// GOPath returns the go path for the current host func GOPath() string { gopath := os.Getenv("GOPATH") if gopath != "" { @@ -136,7 +183,7 @@ func GOPath() string { } out, err := exec.Command("go", "env", "GOPATH").Output() if err != nil { - log.Fatal(err) + klog.Fatal(err) } return strings.TrimSpace(string(out)) } diff --git a/vendor/github.com/appscode/go/context/context.go b/vendor/gomodules.xyz/x/context/context.go similarity index 100% rename from vendor/github.com/appscode/go/context/context.go rename to vendor/gomodules.xyz/x/context/context.go diff --git a/vendor/github.com/appscode/go/flags/flags.go b/vendor/gomodules.xyz/x/flags/flags.go similarity index 98% rename from vendor/github.com/appscode/go/flags/flags.go rename to vendor/gomodules.xyz/x/flags/flags.go index 46c022e85..ad4311bac 100644 --- a/vendor/github.com/appscode/go/flags/flags.go +++ b/vendor/gomodules.xyz/x/flags/flags.go @@ -9,9 +9,9 @@ import ( "strings" "sync" - "github.com/appscode/go/sets" "github.com/spf13/cobra" "github.com/spf13/pflag" + "gomodules.xyz/sets" ) func init() { diff --git a/vendor/github.com/appscode/go/log/README.md b/vendor/gomodules.xyz/x/log/README.md similarity index 100% rename from vendor/github.com/appscode/go/log/README.md rename to vendor/gomodules.xyz/x/log/README.md diff --git a/vendor/github.com/appscode/go/log/context.go b/vendor/gomodules.xyz/x/log/context.go similarity index 98% rename from vendor/github.com/appscode/go/log/context.go rename to vendor/gomodules.xyz/x/log/context.go index 10128f49d..8d070768a 100644 --- a/vendor/github.com/appscode/go/log/context.go +++ b/vendor/gomodules.xyz/x/log/context.go @@ -4,8 +4,8 @@ import ( gtx "context" "fmt" - "github.com/appscode/go/context" "github.com/golang/glog" + "gomodules.xyz/x/context" ) // Type logger enables logging with context with glog diff --git a/vendor/github.com/appscode/go/log/log.go b/vendor/gomodules.xyz/x/log/log.go similarity index 100% rename from vendor/github.com/appscode/go/log/log.go rename to vendor/gomodules.xyz/x/log/log.go diff --git a/vendor/github.com/appscode/go/version/version.go b/vendor/gomodules.xyz/x/version/version.go similarity index 100% rename from vendor/github.com/appscode/go/version/version.go rename to vendor/gomodules.xyz/x/version/version.go diff --git a/vendor/modules.txt b/vendor/modules.txt index 8f32ef759..bb078dd72 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -19,15 +19,6 @@ github.com/NYTimes/gziphandler github.com/PuerkitoBio/purell # github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 github.com/PuerkitoBio/urlesc -# github.com/appscode/go v0.0.0-20200928211031-cc0c23082d91 -github.com/appscode/go/context -github.com/appscode/go/encoding/json/types -github.com/appscode/go/flags -github.com/appscode/go/log -github.com/appscode/go/runtime -github.com/appscode/go/sets -github.com/appscode/go/types -github.com/appscode/go/version # github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e github.com/armon/circbuf # github.com/beorn7/perks v1.0.1 @@ -56,13 +47,13 @@ github.com/emicklei/go-restful/log github.com/evanphx/json-patch # github.com/fatih/structs v1.1.0 github.com/fatih/structs -# github.com/go-openapi/jsonpointer v0.19.3 +# github.com/go-openapi/jsonpointer v0.19.3 => github.com/go-openapi/jsonpointer v0.19.3 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.19.3 +# github.com/go-openapi/jsonreference v0.19.3 => github.com/go-openapi/jsonreference v0.19.3 github.com/go-openapi/jsonreference -# github.com/go-openapi/spec v0.19.8 +# github.com/go-openapi/spec v0.19.8 => github.com/go-openapi/spec v0.19.3 github.com/go-openapi/spec -# github.com/go-openapi/swag v0.19.9 +# github.com/go-openapi/swag v0.19.9 => github.com/go-openapi/swag v0.19.5 github.com/go-openapi/swag # github.com/gogo/protobuf v1.3.1 => github.com/gogo/protobuf v1.3.1 github.com/gogo/protobuf/gogoproto @@ -118,7 +109,7 @@ github.com/inconshreveable/mousetrap github.com/jpillora/go-ogle-analytics # github.com/json-iterator/go v1.1.10 github.com/json-iterator/go -# github.com/mailru/easyjson v0.7.1 +# github.com/mailru/easyjson v0.7.0 github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter @@ -275,13 +266,19 @@ gomodules.xyz/homedir gomodules.xyz/jsonpatch/v2 # gomodules.xyz/pointer v0.0.0-20201105071923-daf60fa55209 gomodules.xyz/pointer +# gomodules.xyz/runtime v0.0.0-20201104200926-d838b09dda8b +gomodules.xyz/runtime # gomodules.xyz/sets v0.0.0-20200930152147-4f4543544799 gomodules.xyz/sets # gomodules.xyz/version v0.1.0 gomodules.xyz/version # gomodules.xyz/x v0.0.0-20201105065653-91c568df6331 gomodules.xyz/x/analytics +gomodules.xyz/x/context +gomodules.xyz/x/flags +gomodules.xyz/x/log gomodules.xyz/x/log/golog +gomodules.xyz/x/version # google.golang.org/appengine v1.6.6 google.golang.org/appengine google.golang.org/appengine/internal @@ -891,7 +888,7 @@ sigs.k8s.io/structured-merge-diff/v3/typed sigs.k8s.io/structured-merge-diff/v3/value # sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml -# stash.appscode.dev/apimachinery v0.11.3 +# stash.appscode.dev/apimachinery v0.11.6-0.20201106214826-132a511faa97 stash.appscode.dev/apimachinery/apis stash.appscode.dev/apimachinery/apis/repositories stash.appscode.dev/apimachinery/apis/repositories/v1alpha1 @@ -910,5 +907,6 @@ stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/f stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util stash.appscode.dev/apimachinery/crds stash.appscode.dev/apimachinery/pkg/conditions +stash.appscode.dev/apimachinery/pkg/invoker stash.appscode.dev/apimachinery/pkg/restic stash.appscode.dev/apimachinery/pkg/util diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go index 27ddcf2f4..3ce44ad53 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go @@ -23,7 +23,6 @@ limitations under the License. package v1alpha1 import ( - types "github.com/appscode/go/encoding/json/types" spec "github.com/go-openapi/spec" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,7 +33,6 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/appscode/go/encoding/json/types.IntHash": schema_go_encoding_json_types_IntHash(ref), "k8s.io/api/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), @@ -380,18 +378,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA } } -func schema_go_encoding_json_types_IntHash(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IntHash represents as int64 Generation and string Hash. It is json serialized into $.", - Type: types.IntHash{}.OpenAPISchemaType(), - Format: types.IntHash{}.OpenAPISchemaFormat(), - }, - }, - } -} - func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -17367,11 +17353,24 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback Ref: ref("k8s.io/api/core/v1.Lifecycle"), }, }, + "dnsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Type: []string{"string"}, + Format: "", + }, + }, + "dnsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, } } diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go index edfd91c34..37cc2573c 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go @@ -23,7 +23,6 @@ limitations under the License. package v1alpha1 import ( - types "github.com/appscode/go/encoding/json/types" spec "github.com/go-openapi/spec" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,7 +33,6 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/appscode/go/encoding/json/types.IntHash": schema_go_encoding_json_types_IntHash(ref), "k8s.io/api/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), @@ -392,18 +390,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA } } -func schema_go_encoding_json_types_IntHash(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IntHash represents as int64 Generation and string Hash. It is json serialized into $.", - Type: types.IntHash{}.OpenAPISchemaType(), - Format: types.IntHash{}.OpenAPISchemaFormat(), - }, - }, - } -} - func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -17379,11 +17365,24 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback Ref: ref("k8s.io/api/core/v1.Lifecycle"), }, }, + "dnsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Type: []string{"string"}, + Format: "", + }, + }, + "dnsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, } } diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go index c2db32b30..8dde67268 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go @@ -23,7 +23,6 @@ limitations under the License. package v1beta1 import ( - types "github.com/appscode/go/encoding/json/types" spec "github.com/go-openapi/spec" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,7 +33,6 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/appscode/go/encoding/json/types.IntHash": schema_go_encoding_json_types_IntHash(ref), "k8s.io/api/apps/v1.ControllerRevision": schema_k8sio_api_apps_v1_ControllerRevision(ref), "k8s.io/api/apps/v1.ControllerRevisionList": schema_k8sio_api_apps_v1_ControllerRevisionList(ref), "k8s.io/api/apps/v1.DaemonSet": schema_k8sio_api_apps_v1_DaemonSet(ref), @@ -426,18 +424,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA } } -func schema_go_encoding_json_types_IntHash(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IntHash represents as int64 Generation and string Hash. It is json serialized into $.", - Type: types.IntHash{}.OpenAPISchemaType(), - Format: types.IntHash{}.OpenAPISchemaFormat(), - }, - }, - } -} - func schema_k8sio_api_apps_v1_ControllerRevision(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -17413,11 +17399,24 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback Ref: ref("k8s.io/api/core/v1.Lifecycle"), }, }, + "dnsPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + Type: []string{"string"}, + Format: "", + }, + }, + "dnsConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, + "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, } } diff --git a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupbatch.go b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupbatch.go index c89a6f8a0..185b06f0e 100644 --- a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupbatch.go +++ b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupbatch.go @@ -105,15 +105,20 @@ func UpdateBackupBatchStatus( ctx context.Context, c cs.StashV1beta1Interface, meta metav1.ObjectMeta, - transform func(*api.BackupBatchStatus) *api.BackupBatchStatus, + transform func(*api.BackupBatchStatus) (types.UID, *api.BackupBatchStatus), opts metav1.UpdateOptions, ) (result *api.BackupBatch, err error) { apply := func(x *api.BackupBatch) *api.BackupBatch { + uid, updatedStatus := transform(x.Status.DeepCopy()) + // Ignore status update when uid does not match + if uid != "" && uid != x.UID { + return x + } out := &api.BackupBatch{ TypeMeta: x.TypeMeta, ObjectMeta: x.ObjectMeta, Spec: x.Spec, - Status: *transform(x.Status.DeepCopy()), + Status: *updatedStatus, } return out } diff --git a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupconfiguration.go b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupconfiguration.go index 78f332431..3b7a44aa9 100644 --- a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupconfiguration.go +++ b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupconfiguration.go @@ -105,15 +105,20 @@ func UpdateBackupConfigurationStatus( ctx context.Context, c cs.StashV1beta1Interface, meta metav1.ObjectMeta, - transform func(*api.BackupConfigurationStatus) *api.BackupConfigurationStatus, + transform func(*api.BackupConfigurationStatus) (types.UID, *api.BackupConfigurationStatus), opts metav1.UpdateOptions, ) (result *api.BackupConfiguration, err error) { apply := func(x *api.BackupConfiguration) *api.BackupConfiguration { + uid, updatedStatus := transform(x.Status.DeepCopy()) + // Ignore status update when uid does not match + if uid != "" && uid != x.UID { + return x + } out := &api.BackupConfiguration{ TypeMeta: x.TypeMeta, ObjectMeta: x.ObjectMeta, Spec: x.Spec, - Status: *transform(x.Status.DeepCopy()), + Status: *updatedStatus, } return out } diff --git a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupsession.go b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupsession.go index 42807d9d1..8e9016816 100644 --- a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupsession.go +++ b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/backupsession.go @@ -105,15 +105,20 @@ func UpdateBackupSessionStatus( ctx context.Context, c cs.StashV1beta1Interface, meta metav1.ObjectMeta, - transform func(*api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus, + transform func(*api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus), opts metav1.UpdateOptions, ) (result *api_v1beta1.BackupSession, err error) { apply := func(x *api_v1beta1.BackupSession) *api_v1beta1.BackupSession { + uid, updatedStatus := transform(x.Status.DeepCopy()) + // Ignore status update when uid does not match + if uid != "" && uid != x.UID { + return x + } out := &api_v1beta1.BackupSession{ TypeMeta: x.TypeMeta, ObjectMeta: x.ObjectMeta, Spec: x.Spec, - Status: *transform(x.Status.DeepCopy()), + Status: *updatedStatus, } return out } @@ -158,10 +163,9 @@ func UpdateBackupSessionStatusForHost( hostStats api_v1beta1.HostBackupStats, opts metav1.UpdateOptions, ) (*api_v1beta1.BackupSession, error) { - - return UpdateBackupSessionStatus(ctx, c, backupSession, func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + return UpdateBackupSessionStatus(ctx, c, backupSession, func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Targets = UpsertHostForTarget(in.Targets, targetRef, hostStats) - return in + return "", in }, opts) } diff --git a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/kubernetes.go b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/kubernetes.go index d90de382a..f71de1175 100644 --- a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/kubernetes.go +++ b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/kubernetes.go @@ -17,33 +17,7 @@ limitations under the License. package util import ( - "fmt" - "reflect" - - api "stash.appscode.dev/apimachinery/apis/stash/v1alpha1" - jsoniter "github.com/json-iterator/go" - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/runtime/schema" - "kmodules.xyz/client-go/meta" ) var json = jsoniter.ConfigFastest - -func GetGroupVersionKind(v interface{}) schema.GroupVersionKind { - return api.SchemeGroupVersion.WithKind(meta.GetKind(v)) -} - -func AssignTypeKind(v interface{}) error { - if reflect.ValueOf(v).Kind() != reflect.Ptr { - return fmt.Errorf("%v must be a pointer", v) - } - - switch u := v.(type) { - case *api.Restic: - u.APIVersion = api.SchemeGroupVersion.String() - u.Kind = meta.GetKind(v) - return nil - } - return errors.New("unknown api object type") -} diff --git a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restorebatch.go b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restorebatch.go index e63265e8c..b7023b29c 100644 --- a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restorebatch.go +++ b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restorebatch.go @@ -105,15 +105,20 @@ func UpdateRestoreBatchStatus( ctx context.Context, c cs.StashV1beta1Interface, meta metav1.ObjectMeta, - transform func(*api.RestoreBatchStatus) *api.RestoreBatchStatus, + transform func(*api.RestoreBatchStatus) (types.UID, *api.RestoreBatchStatus), opts metav1.UpdateOptions, ) (result *api.RestoreBatch, err error) { apply := func(x *api.RestoreBatch) *api.RestoreBatch { + uid, updatedStatus := transform(x.Status.DeepCopy()) + // Ignore status update when uid does not match + if uid != "" && uid != x.UID { + return x + } out := &api.RestoreBatch{ TypeMeta: x.TypeMeta, ObjectMeta: x.ObjectMeta, Spec: x.Spec, - Status: *transform(x.Status.DeepCopy()), + Status: *updatedStatus, } return out } diff --git a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restoresession.go b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restoresession.go index cd8f0572d..4b1f54c74 100644 --- a/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restoresession.go +++ b/vendor/stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util/restoresession.go @@ -105,15 +105,20 @@ func UpdateRestoreSessionStatus( ctx context.Context, c cs.StashV1beta1Interface, meta metav1.ObjectMeta, - transform func(*api_v1beta1.RestoreSessionStatus) *api_v1beta1.RestoreSessionStatus, + transform func(*api_v1beta1.RestoreSessionStatus) (types.UID, *api_v1beta1.RestoreSessionStatus), opts metav1.UpdateOptions, ) (result *api_v1beta1.RestoreSession, err error) { apply := func(x *api_v1beta1.RestoreSession) *api_v1beta1.RestoreSession { + uid, updatedStatus := transform(x.Status.DeepCopy()) + // Ignore status update when uid does not match + if uid != "" && uid != x.UID { + return x + } out := &api_v1beta1.RestoreSession{ TypeMeta: x.TypeMeta, ObjectMeta: x.ObjectMeta, Spec: x.Spec, - Status: *transform(x.Status.DeepCopy()), + Status: *updatedStatus, } return out } @@ -151,16 +156,16 @@ func UpdateRestoreSessionStatus( } func UpdateRestoreSessionStatusForHost(ctx context.Context, c cs.StashV1beta1Interface, restoreSession metav1.ObjectMeta, hostStats api_v1beta1.HostRestoreStats, opts metav1.UpdateOptions) (*api_v1beta1.RestoreSession, error) { - return UpdateRestoreSessionStatus(ctx, c, restoreSession, func(in *api_v1beta1.RestoreSessionStatus) *api_v1beta1.RestoreSessionStatus { + return UpdateRestoreSessionStatus(ctx, c, restoreSession, func(in *api_v1beta1.RestoreSessionStatus) (types.UID, *api_v1beta1.RestoreSessionStatus) { // if an entry already exist for this host then update it for i, v := range in.Stats { if v.Hostname == hostStats.Hostname { in.Stats[i] = hostStats - return in + return "", in } } // no entry for this host. so add a new entry. in.Stats = append(in.Stats, hostStats) - return in + return "", in }, opts) } diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/backup.go b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/backup.go index 2680b4f40..921e32fa1 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/backup.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/backup.go @@ -22,12 +22,13 @@ import ( "stash.appscode.dev/apimachinery/apis" api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" + "stash.appscode.dev/apimachinery/pkg/invoker" core "k8s.io/api/core/v1" kmapi "kmodules.xyz/client-go/api/v1" ) -func SetBackupTargetFoundConditionToUnknown(invoker apis.Invoker, tref api_v1beta1.TargetRef, err error) error { +func SetBackupTargetFoundConditionToUnknown(invoker invoker.BackupInvoker, tref api_v1beta1.TargetRef, err error) error { return invoker.SetCondition(&tref, kmapi.Condition{ Type: apis.BackupTargetFound, Status: core.ConditionUnknown, @@ -41,7 +42,7 @@ func SetBackupTargetFoundConditionToUnknown(invoker apis.Invoker, tref api_v1bet }) } -func SetBackupTargetFoundConditionToFalse(invoker apis.Invoker, tref api_v1beta1.TargetRef) error { +func SetBackupTargetFoundConditionToFalse(invoker invoker.BackupInvoker, tref api_v1beta1.TargetRef) error { return invoker.SetCondition(&tref, kmapi.Condition{ // Set the "BackupTargetFound" condition to "False" Type: apis.BackupTargetFound, @@ -55,7 +56,7 @@ func SetBackupTargetFoundConditionToFalse(invoker apis.Invoker, tref api_v1beta1 }) } -func SetBackupTargetFoundConditionToTrue(invoker apis.Invoker, tref api_v1beta1.TargetRef) error { +func SetBackupTargetFoundConditionToTrue(invoker invoker.BackupInvoker, tref api_v1beta1.TargetRef) error { return invoker.SetCondition(&tref, kmapi.Condition{ Type: apis.BackupTargetFound, Status: core.ConditionTrue, @@ -68,7 +69,7 @@ func SetBackupTargetFoundConditionToTrue(invoker apis.Invoker, tref api_v1beta1. }) } -func SetCronJobCreatedConditionToFalse(invoker apis.Invoker, err error) error { +func SetCronJobCreatedConditionToFalse(invoker invoker.BackupInvoker, err error) error { return invoker.SetCondition(nil, kmapi.Condition{ Type: apis.CronJobCreated, Status: core.ConditionFalse, @@ -77,7 +78,7 @@ func SetCronJobCreatedConditionToFalse(invoker apis.Invoker, err error) error { }) } -func SetCronJobCreatedConditionToTrue(invoker apis.Invoker) error { +func SetCronJobCreatedConditionToTrue(invoker invoker.BackupInvoker) error { return invoker.SetCondition(nil, kmapi.Condition{ Type: apis.CronJobCreated, Status: core.ConditionTrue, @@ -86,7 +87,7 @@ func SetCronJobCreatedConditionToTrue(invoker apis.Invoker) error { }) } -func SetSidecarInjectedConditionToTrue(invoker apis.Invoker, tref api_v1beta1.TargetRef) error { +func SetSidecarInjectedConditionToTrue(invoker invoker.BackupInvoker, tref api_v1beta1.TargetRef) error { return invoker.SetCondition(&tref, kmapi.Condition{ Type: apis.StashSidecarInjected, Status: core.ConditionTrue, @@ -99,7 +100,7 @@ func SetSidecarInjectedConditionToTrue(invoker apis.Invoker, tref api_v1beta1.Ta }) } -func SetSidecarInjectedConditionToFalse(invoker apis.Invoker, tref api_v1beta1.TargetRef, err error) error { +func SetSidecarInjectedConditionToFalse(invoker invoker.BackupInvoker, tref api_v1beta1.TargetRef, err error) error { return invoker.SetCondition(&tref, kmapi.Condition{ Type: apis.StashSidecarInjected, Status: core.ConditionFalse, diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/hooks.go b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/hooks.go index d8064fe15..540a21b51 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/hooks.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/hooks.go @@ -24,9 +24,11 @@ import ( api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" cs "stash.appscode.dev/apimachinery/client/clientset/versioned" stash_util "stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util" + "stash.appscode.dev/apimachinery/pkg/invoker" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" kmapi "kmodules.xyz/client-go/api/v1" ) @@ -35,7 +37,7 @@ func SetGlobalPreBackupHookSucceededConditionToFalse(stashClient cs.Interface, b context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.GlobalPreBackupHookSucceeded, Status: core.ConditionFalse, @@ -43,7 +45,7 @@ func SetGlobalPreBackupHookSucceededConditionToFalse(stashClient cs.Interface, b Message: fmt.Sprintf("Failed to execute global PreBackup Hook. Reason: %v.", hookErr), }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -54,7 +56,7 @@ func SetGlobalPreBackupHookSucceededConditionToTrue(stashClient cs.Interface, ba context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.GlobalPreBackupHookSucceeded, Status: core.ConditionTrue, @@ -62,7 +64,7 @@ func SetGlobalPreBackupHookSucceededConditionToTrue(stashClient cs.Interface, ba Message: "Global PreBackup hook has been executed successfully", }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -73,7 +75,7 @@ func SetGlobalPostBackupHookSucceededConditionToFalse(stashClient cs.Interface, context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.GlobalPostBackupHookSucceeded, Status: core.ConditionFalse, @@ -81,7 +83,7 @@ func SetGlobalPostBackupHookSucceededConditionToFalse(stashClient cs.Interface, Message: fmt.Sprintf("Failed to execute global PostBackup Hook. Reason: %v.", hookErr), }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -92,7 +94,7 @@ func SetGlobalPostBackupHookSucceededConditionToTrue(stashClient cs.Interface, b context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.GlobalPostBackupHookSucceeded, Status: core.ConditionTrue, @@ -100,13 +102,13 @@ func SetGlobalPostBackupHookSucceededConditionToTrue(stashClient cs.Interface, b Message: "Global PostBackup hook has been executed successfully", }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) } -func SetGlobalPreRestoreHookSucceededConditionToFalse(invoker apis.RestoreInvoker, hookErr error) error { +func SetGlobalPreRestoreHookSucceededConditionToFalse(invoker invoker.RestoreInvoker, hookErr error) error { return invoker.SetCondition(nil, kmapi.Condition{ Type: apis.GlobalPreRestoreHookSucceeded, Status: core.ConditionFalse, @@ -115,7 +117,7 @@ func SetGlobalPreRestoreHookSucceededConditionToFalse(invoker apis.RestoreInvoke }) } -func SetGlobalPreRestoreHookSucceededConditionToTrue(invoker apis.RestoreInvoker) error { +func SetGlobalPreRestoreHookSucceededConditionToTrue(invoker invoker.RestoreInvoker) error { return invoker.SetCondition(nil, kmapi.Condition{ Type: apis.GlobalPreRestoreHookSucceeded, Status: core.ConditionTrue, @@ -124,7 +126,7 @@ func SetGlobalPreRestoreHookSucceededConditionToTrue(invoker apis.RestoreInvoker }) } -func SetGlobalPostRestoreHookSucceededConditionToFalse(invoker apis.RestoreInvoker, hookErr error) error { +func SetGlobalPostRestoreHookSucceededConditionToFalse(invoker invoker.RestoreInvoker, hookErr error) error { return invoker.SetCondition(nil, kmapi.Condition{ Type: apis.GlobalPostRestoreHookSucceeded, Status: core.ConditionFalse, @@ -133,7 +135,7 @@ func SetGlobalPostRestoreHookSucceededConditionToFalse(invoker apis.RestoreInvok }) } -func SetGlobalPostRestoreHookSucceededConditionToTrue(invoker apis.RestoreInvoker) error { +func SetGlobalPostRestoreHookSucceededConditionToTrue(invoker invoker.RestoreInvoker) error { return invoker.SetCondition(nil, kmapi.Condition{ Type: apis.GlobalPostRestoreHookSucceeded, Status: core.ConditionTrue, diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/repository.go b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/repository.go index 3d65e03e3..3847631c9 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/repository.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/repository.go @@ -25,9 +25,11 @@ import ( api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" cs "stash.appscode.dev/apimachinery/client/clientset/versioned" stash_util "stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util" + "stash.appscode.dev/apimachinery/pkg/invoker" core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" kmapi "kmodules.xyz/client-go/api/v1" ) @@ -36,7 +38,7 @@ func SetBackendRepositoryInitializedConditionToFalse(stashClient cs.Interface, b context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.BackendRepositoryInitialized, Status: core.ConditionFalse, @@ -44,7 +46,7 @@ func SetBackendRepositoryInitializedConditionToFalse(stashClient cs.Interface, b Message: fmt.Sprintf("Failed to initialize backend repository. Reason: %v", err.Error()), }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -55,23 +57,22 @@ func SetBackendRepositoryInitializedConditionToTrue(stashClient cs.Interface, ba context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.BackendRepositoryInitialized, Status: core.ConditionTrue, Reason: apis.BackendRepositoryFound, Message: "Repository exist in the backend.", - }, - ) - return in + }) + return backupSession.UID, in }, metav1.UpdateOptions{}, ) } -func SetRepositoryFoundConditionToUnknown(invoker interface{}, err error) error { - switch in := invoker.(type) { - case apis.Invoker: +func SetRepositoryFoundConditionToUnknown(i interface{}, err error) error { + switch in := i.(type) { + case invoker.BackupInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.RepositoryFound, Status: core.ConditionUnknown, @@ -82,7 +83,7 @@ func SetRepositoryFoundConditionToUnknown(invoker interface{}, err error) error err.Error(), ), }) - case apis.RestoreInvoker: + case invoker.RestoreInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.RepositoryFound, Status: core.ConditionUnknown, @@ -98,9 +99,9 @@ func SetRepositoryFoundConditionToUnknown(invoker interface{}, err error) error } } -func SetRepositoryFoundConditionToFalse(invoker interface{}) error { - switch in := invoker.(type) { - case apis.Invoker: +func SetRepositoryFoundConditionToFalse(i interface{}) error { + switch in := i.(type) { + case invoker.BackupInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.RepositoryFound, Status: core.ConditionFalse, @@ -110,7 +111,7 @@ func SetRepositoryFoundConditionToFalse(invoker interface{}) error { in.Repository, ), }) - case apis.RestoreInvoker: + case invoker.RestoreInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.RepositoryFound, Status: core.ConditionFalse, @@ -125,9 +126,9 @@ func SetRepositoryFoundConditionToFalse(invoker interface{}) error { } } -func SetRepositoryFoundConditionToTrue(invoker interface{}) error { - switch in := invoker.(type) { - case apis.Invoker: +func SetRepositoryFoundConditionToTrue(i interface{}) error { + switch in := i.(type) { + case invoker.BackupInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.RepositoryFound, Status: core.ConditionTrue, @@ -137,7 +138,7 @@ func SetRepositoryFoundConditionToTrue(invoker interface{}) error { in.Repository, ), }) - case apis.RestoreInvoker: + case invoker.RestoreInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.RepositoryFound, Status: core.ConditionTrue, @@ -152,9 +153,9 @@ func SetRepositoryFoundConditionToTrue(invoker interface{}) error { } } -func SetBackendSecretFoundConditionToUnknown(invoker interface{}, secretName string, err error) error { - switch in := invoker.(type) { - case apis.Invoker: +func SetBackendSecretFoundConditionToUnknown(i interface{}, secretName string, err error) error { + switch in := i.(type) { + case invoker.BackupInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.BackendSecretFound, Status: core.ConditionUnknown, @@ -165,7 +166,7 @@ func SetBackendSecretFoundConditionToUnknown(invoker interface{}, secretName str err.Error(), ), }) - case apis.RestoreInvoker: + case invoker.RestoreInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.BackendSecretFound, Status: core.ConditionUnknown, @@ -181,9 +182,9 @@ func SetBackendSecretFoundConditionToUnknown(invoker interface{}, secretName str } } -func SetBackendSecretFoundConditionToFalse(invoker interface{}, secretName string) error { - switch in := invoker.(type) { - case apis.Invoker: +func SetBackendSecretFoundConditionToFalse(i interface{}, secretName string) error { + switch in := i.(type) { + case invoker.BackupInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.BackendSecretFound, Status: core.ConditionFalse, @@ -193,7 +194,7 @@ func SetBackendSecretFoundConditionToFalse(invoker interface{}, secretName strin secretName, ), }) - case apis.RestoreInvoker: + case invoker.RestoreInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.BackendSecretFound, Status: core.ConditionFalse, @@ -208,9 +209,9 @@ func SetBackendSecretFoundConditionToFalse(invoker interface{}, secretName strin } } -func SetBackendSecretFoundConditionToTrue(invoker interface{}, secretName string) error { - switch in := invoker.(type) { - case apis.Invoker: +func SetBackendSecretFoundConditionToTrue(i interface{}, secretName string) error { + switch in := i.(type) { + case invoker.BackupInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.BackendSecretFound, Status: core.ConditionTrue, @@ -220,7 +221,7 @@ func SetBackendSecretFoundConditionToTrue(invoker interface{}, secretName string secretName, ), }) - case apis.RestoreInvoker: + case invoker.RestoreInvoker: return in.SetCondition(nil, kmapi.Condition{ Type: apis.BackendSecretFound, Status: core.ConditionTrue, @@ -240,7 +241,7 @@ func SetRetentionPolicyAppliedConditionToFalse(stashClient cs.Interface, backupS context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.RetentionPolicyApplied, Status: core.ConditionFalse, @@ -248,7 +249,7 @@ func SetRetentionPolicyAppliedConditionToFalse(stashClient cs.Interface, backupS Message: fmt.Sprintf("Failed to apply retention policy. Reason: %v", err.Error()), }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -259,7 +260,7 @@ func SetRetentionPolicyAppliedConditionToTrue(stashClient cs.Interface, backupSe context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.RetentionPolicyApplied, Status: core.ConditionTrue, @@ -267,7 +268,7 @@ func SetRetentionPolicyAppliedConditionToTrue(stashClient cs.Interface, backupSe Message: "Successfully applied retention policy.", }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -278,7 +279,7 @@ func SetRepositoryIntegrityVerifiedConditionToFalse(stashClient cs.Interface, ba context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.RepositoryIntegrityVerified, Status: core.ConditionFalse, @@ -286,7 +287,7 @@ func SetRepositoryIntegrityVerifiedConditionToFalse(stashClient cs.Interface, ba Message: fmt.Sprintf("Repository integrity verification failed. Reason: %v", err.Error()), }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -297,7 +298,7 @@ func SetRepositoryIntegrityVerifiedConditionToTrue(stashClient cs.Interface, bac context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.RepositoryIntegrityVerified, Status: core.ConditionTrue, @@ -305,7 +306,7 @@ func SetRepositoryIntegrityVerifiedConditionToTrue(stashClient cs.Interface, bac Message: "Repository integrity verification succeeded.", }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -316,7 +317,7 @@ func SetRepositoryMetricsPushedConditionToFalse(stashClient cs.Interface, backup context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.RepositoryMetricsPushed, Status: core.ConditionFalse, @@ -324,7 +325,7 @@ func SetRepositoryMetricsPushedConditionToFalse(stashClient cs.Interface, backup Message: fmt.Sprintf("Failed to push repository metrics. Reason: %v", err.Error()), }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) @@ -335,7 +336,7 @@ func SetRepositoryMetricsPushedConditionToTrue(stashClient cs.Interface, backupS context.TODO(), stashClient.StashV1beta1(), backupSession.ObjectMeta, - func(in *api_v1beta1.BackupSessionStatus) *api_v1beta1.BackupSessionStatus { + func(in *api_v1beta1.BackupSessionStatus) (types.UID, *api_v1beta1.BackupSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, kmapi.Condition{ Type: apis.RepositoryMetricsPushed, Status: core.ConditionTrue, @@ -343,7 +344,7 @@ func SetRepositoryMetricsPushedConditionToTrue(stashClient cs.Interface, backupS Message: "Successfully pushed repository metrics.", }, ) - return in + return backupSession.UID, in }, metav1.UpdateOptions{}, ) diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/restore.go b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/restore.go index 3132a708f..d5661dfff 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/conditions/restore.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/conditions/restore.go @@ -22,14 +22,15 @@ import ( "stash.appscode.dev/apimachinery/apis" api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" + "stash.appscode.dev/apimachinery/pkg/invoker" core "k8s.io/api/core/v1" kmapi "kmodules.xyz/client-go/api/v1" ) -func SetRestoreTargetFoundConditionToTrue(invoker apis.RestoreInvoker, index int) error { - target := invoker.TargetsInfo[index].Target - return invoker.SetCondition(&target.Ref, kmapi.Condition{ +func SetRestoreTargetFoundConditionToTrue(inv invoker.RestoreInvoker, index int) error { + target := inv.TargetsInfo[index].Target + return inv.SetCondition(&target.Ref, kmapi.Condition{ Type: apis.RestoreTargetFound, Status: core.ConditionTrue, Reason: apis.TargetAvailable, @@ -41,9 +42,9 @@ func SetRestoreTargetFoundConditionToTrue(invoker apis.RestoreInvoker, index int }) } -func SetRestoreTargetFoundConditionToFalse(invoker apis.RestoreInvoker, index int) error { - target := invoker.TargetsInfo[index].Target - return invoker.SetCondition(&target.Ref, kmapi.Condition{ +func SetRestoreTargetFoundConditionToFalse(inv invoker.RestoreInvoker, index int) error { + target := inv.TargetsInfo[index].Target + return inv.SetCondition(&target.Ref, kmapi.Condition{ Type: apis.RestoreTargetFound, Status: core.ConditionFalse, Reason: apis.TargetNotAvailable, @@ -55,9 +56,9 @@ func SetRestoreTargetFoundConditionToFalse(invoker apis.RestoreInvoker, index in }) } -func SetRestoreTargetFoundConditionToUnknown(invoker apis.RestoreInvoker, index int, err error) error { - target := invoker.TargetsInfo[index].Target - return invoker.SetCondition(&target.Ref, kmapi.Condition{ +func SetRestoreTargetFoundConditionToUnknown(inv invoker.RestoreInvoker, index int, err error) error { + target := inv.TargetsInfo[index].Target + return inv.SetCondition(&target.Ref, kmapi.Condition{ Type: apis.RestoreTargetFound, Status: core.ConditionUnknown, Reason: apis.UnableToCheckTargetAvailability, @@ -70,8 +71,8 @@ func SetRestoreTargetFoundConditionToUnknown(invoker apis.RestoreInvoker, index }) } -func SetRestoreJobCreatedConditionToTrue(invoker apis.RestoreInvoker, tref *api_v1beta1.TargetRef) error { - return invoker.SetCondition(tref, kmapi.Condition{ +func SetRestoreJobCreatedConditionToTrue(inv invoker.RestoreInvoker, tref *api_v1beta1.TargetRef) error { + return inv.SetCondition(tref, kmapi.Condition{ Type: apis.RestoreJobCreated, Status: core.ConditionTrue, Reason: apis.RestoreJobCreationSucceeded, @@ -79,8 +80,8 @@ func SetRestoreJobCreatedConditionToTrue(invoker apis.RestoreInvoker, tref *api_ }) } -func SetRestoreJobCreatedConditionToFalse(invoker apis.RestoreInvoker, tref *api_v1beta1.TargetRef, err error) error { - return invoker.SetCondition(tref, kmapi.Condition{ +func SetRestoreJobCreatedConditionToFalse(inv invoker.RestoreInvoker, tref *api_v1beta1.TargetRef, err error) error { + return inv.SetCondition(tref, kmapi.Condition{ Type: apis.RestoreJobCreated, Status: core.ConditionFalse, Reason: apis.RestoreJobCreationFailed, @@ -88,8 +89,8 @@ func SetRestoreJobCreatedConditionToFalse(invoker apis.RestoreInvoker, tref *api }) } -func SetInitContainerInjectedConditionToTrue(invoker apis.RestoreInvoker, tref api_v1beta1.TargetRef) error { - return invoker.SetCondition(&tref, kmapi.Condition{ +func SetInitContainerInjectedConditionToTrue(inv invoker.RestoreInvoker, tref api_v1beta1.TargetRef) error { + return inv.SetCondition(&tref, kmapi.Condition{ Type: apis.StashInitContainerInjected, Status: core.ConditionTrue, Reason: apis.InitContainerInjectionSucceeded, @@ -97,8 +98,8 @@ func SetInitContainerInjectedConditionToTrue(invoker apis.RestoreInvoker, tref a }) } -func SetInitContainerInjectedConditionToFalse(invoker apis.RestoreInvoker, tref api_v1beta1.TargetRef, err error) error { - return invoker.SetCondition(&tref, kmapi.Condition{ +func SetInitContainerInjectedConditionToFalse(inv invoker.RestoreInvoker, tref api_v1beta1.TargetRef, err error) error { + return inv.SetCondition(&tref, kmapi.Condition{ Type: apis.StashInitContainerInjected, Status: core.ConditionFalse, Reason: apis.InitContainerInjectionFailed, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/invoker.go b/vendor/stash.appscode.dev/apimachinery/pkg/invoker/backup_invoker.go similarity index 96% rename from vendor/stash.appscode.dev/apimachinery/apis/invoker.go rename to vendor/stash.appscode.dev/apimachinery/pkg/invoker/backup_invoker.go index c5c236d6d..51d4e01d7 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/invoker.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/invoker/backup_invoker.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package apis +package invoker import ( "context" @@ -28,6 +28,7 @@ import ( core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/reference" kmapi "kmodules.xyz/client-go/api/v1" core_util "kmodules.xyz/client-go/core/v1" @@ -35,7 +36,7 @@ import ( ofst "kmodules.xyz/offshoot-api/api/v1" ) -type TargetInfo struct { +type BackupTargetInfo struct { Task v1beta1.TaskRef Target *v1beta1.BackupTarget RuntimeSettings ofst.RuntimeSettings @@ -44,7 +45,7 @@ type TargetInfo struct { Hooks *v1beta1.BackupHooks } -type Invoker struct { +type BackupInvoker struct { TypeMeta metav1.TypeMeta ObjectMeta metav1.ObjectMeta Labels map[string]string @@ -56,7 +57,7 @@ type Invoker struct { RetentionPolicy v1alpha1.RetentionPolicy RuntimeSettings ofst.RuntimeSettings BackupHistoryLimit *int32 - TargetsInfo []TargetInfo + TargetsInfo []BackupTargetInfo ExecutionOrder v1beta1.ExecutionOrder Hooks *v1beta1.BackupHooks ObjectRef *core.ObjectReference @@ -71,8 +72,8 @@ type Invoker struct { NextInOrder func(v1beta1.TargetRef, []v1beta1.BackupTargetStatus) bool } -func ExtractBackupInvokerInfo(stashClient cs.Interface, invokerType, invokerName, namespace string) (Invoker, error) { - var invoker Invoker +func ExtractBackupInvokerInfo(stashClient cs.Interface, invokerType, invokerName, namespace string) (BackupInvoker, error) { + var invoker BackupInvoker switch invokerType { case v1beta1.ResourceKindBackupBatch: // get BackupBatch @@ -108,7 +109,7 @@ func ExtractBackupInvokerInfo(stashClient cs.Interface, invokerType, invokerName } for _, member := range backupBatch.Spec.Members { - invoker.TargetsInfo = append(invoker.TargetsInfo, TargetInfo{ + invoker.TargetsInfo = append(invoker.TargetsInfo, BackupTargetInfo{ Task: member.Task, Target: member.Target, RuntimeSettings: member.RuntimeSettings, @@ -155,13 +156,13 @@ func ExtractBackupInvokerInfo(stashClient cs.Interface, invokerType, invokerName } invoker.SetCondition = func(target *v1beta1.TargetRef, condition kmapi.Condition) error { - _, err = v1beta1_util.UpdateBackupBatchStatus(context.TODO(), stashClient.StashV1beta1(), backupBatch.ObjectMeta, func(in *v1beta1.BackupBatchStatus) *v1beta1.BackupBatchStatus { + _, err = v1beta1_util.UpdateBackupBatchStatus(context.TODO(), stashClient.StashV1beta1(), backupBatch.ObjectMeta, func(in *v1beta1.BackupBatchStatus) (types.UID, *v1beta1.BackupBatchStatus) { if target != nil { in.MemberConditions = setMemberCondition(in.MemberConditions, *target, condition) } else { in.Conditions = kmapi.SetCondition(in.Conditions, condition) } - return in + return backupBatch.UID, in }, metav1.UpdateOptions{}) return err } @@ -220,7 +221,7 @@ func ExtractBackupInvokerInfo(stashClient cs.Interface, invokerType, invokerName return invoker, err } - invoker.TargetsInfo = append(invoker.TargetsInfo, TargetInfo{ + invoker.TargetsInfo = append(invoker.TargetsInfo, BackupTargetInfo{ Task: backupConfig.Spec.Task, Target: backupConfig.Spec.Target, RuntimeSettings: backupConfig.Spec.RuntimeSettings, @@ -258,9 +259,9 @@ func ExtractBackupInvokerInfo(stashClient cs.Interface, invokerType, invokerName return idx, cond, nil } invoker.SetCondition = func(target *v1beta1.TargetRef, condition kmapi.Condition) error { - _, err = v1beta1_util.UpdateBackupConfigurationStatus(context.TODO(), stashClient.StashV1beta1(), backupConfig.ObjectMeta, func(in *v1beta1.BackupConfigurationStatus) *v1beta1.BackupConfigurationStatus { + _, err = v1beta1_util.UpdateBackupConfigurationStatus(context.TODO(), stashClient.StashV1beta1(), backupConfig.ObjectMeta, func(in *v1beta1.BackupConfigurationStatus) (types.UID, *v1beta1.BackupConfigurationStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, condition) - return in + return backupConfig.UID, in }, metav1.UpdateOptions{}) return err } diff --git a/vendor/stash.appscode.dev/apimachinery/apis/restore_invoker.go b/vendor/stash.appscode.dev/apimachinery/pkg/invoker/restore_invoker.go similarity index 97% rename from vendor/stash.appscode.dev/apimachinery/apis/restore_invoker.go rename to vendor/stash.appscode.dev/apimachinery/pkg/invoker/restore_invoker.go index 8a3f9a00d..b594fc27b 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/restore_invoker.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/invoker/restore_invoker.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package apis +package invoker import ( "context" @@ -28,6 +28,7 @@ import ( core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/reference" kmapi "kmodules.xyz/client-go/api/v1" @@ -165,13 +166,13 @@ func ExtractRestoreInvokerInfo(kubeClient kubernetes.Interface, stashClient cs.I } invoker.SetCondition = func(target *v1beta1.TargetRef, condition kmapi.Condition) error { - _, err = v1beta1_util.UpdateRestoreBatchStatus(context.TODO(), stashClient.StashV1beta1(), restoreBatch.ObjectMeta, func(in *v1beta1.RestoreBatchStatus) *v1beta1.RestoreBatchStatus { + _, err = v1beta1_util.UpdateRestoreBatchStatus(context.TODO(), stashClient.StashV1beta1(), restoreBatch.ObjectMeta, func(in *v1beta1.RestoreBatchStatus) (types.UID, *v1beta1.RestoreBatchStatus) { if target != nil { in.Members = setRestoreMemberCondition(in.Members, *target, condition) } else { in.Conditions = kmapi.SetCondition(in.Conditions, condition) } - return in + return restoreBatch.UID, in }, metav1.UpdateOptions{}) return err } @@ -206,7 +207,7 @@ func ExtractRestoreInvokerInfo(kubeClient kubernetes.Interface, stashClient cs.I context.TODO(), stashClient.StashV1beta1(), invoker.ObjectMeta, - func(in *v1beta1.RestoreBatchStatus) *v1beta1.RestoreBatchStatus { + func(in *v1beta1.RestoreBatchStatus) (types.UID, *v1beta1.RestoreBatchStatus) { if status.Phase != "" { in.Phase = status.Phase } @@ -221,7 +222,7 @@ func ExtractRestoreInvokerInfo(kubeClient kubernetes.Interface, stashClient cs.I in.Members = upsertRestoreMemberStatus(in.Members, status.TargetStatus[i]) } } - return in + return invoker.ObjectMeta.UID, in }, metav1.UpdateOptions{}, ) @@ -319,9 +320,9 @@ func ExtractRestoreInvokerInfo(kubeClient kubernetes.Interface, stashClient cs.I return idx, cond, nil } invoker.SetCondition = func(target *v1beta1.TargetRef, condition kmapi.Condition) error { - _, err = v1beta1_util.UpdateRestoreSessionStatus(context.TODO(), stashClient.StashV1beta1(), restoreSession.ObjectMeta, func(in *v1beta1.RestoreSessionStatus) *v1beta1.RestoreSessionStatus { + _, err = v1beta1_util.UpdateRestoreSessionStatus(context.TODO(), stashClient.StashV1beta1(), restoreSession.ObjectMeta, func(in *v1beta1.RestoreSessionStatus) (types.UID, *v1beta1.RestoreSessionStatus) { in.Conditions = kmapi.SetCondition(in.Conditions, condition) - return in + return restoreSession.UID, in }, metav1.UpdateOptions{}) return err } @@ -353,7 +354,7 @@ func ExtractRestoreInvokerInfo(kubeClient kubernetes.Interface, stashClient cs.I context.TODO(), stashClient.StashV1beta1(), invoker.ObjectMeta, - func(in *v1beta1.RestoreSessionStatus) *v1beta1.RestoreSessionStatus { + func(in *v1beta1.RestoreSessionStatus) (types.UID, *v1beta1.RestoreSessionStatus) { if status.Phase != "" { in.Phase = status.Phase } @@ -378,7 +379,7 @@ func ExtractRestoreInvokerInfo(kubeClient kubernetes.Interface, stashClient cs.I in.Phase = v1beta1.RestorePhase(targetStatus.Phase) } } - return in + return invoker.ObjectMeta.UID, in }, metav1.UpdateOptions{}, ) diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/restic/backup.go b/vendor/stash.appscode.dev/apimachinery/pkg/restic/backup.go index 06a0c8cb6..d1e0e5a64 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/restic/backup.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/restic/backup.go @@ -23,7 +23,7 @@ import ( api_v1alpha1 "stash.appscode.dev/apimachinery/apis/stash/v1alpha1" api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" - "github.com/appscode/go/types" + "gomodules.xyz/pointer" "k8s.io/apimachinery/pkg/util/errors" ) @@ -231,5 +231,5 @@ func (w *ResticWrapper) VerifyRepositoryIntegrity() (*RepositoryStats, error) { if err != nil { return nil, err } - return &RepositoryStats{Integrity: types.BoolP(integrity), Size: repoSize}, nil + return &RepositoryStats{Integrity: pointer.BoolP(integrity), Size: repoSize}, nil } diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/restic/commands.go b/vendor/stash.appscode.dev/apimachinery/pkg/restic/commands.go index 6a659303d..76c1ee3e1 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/restic/commands.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/restic/commands.go @@ -30,8 +30,8 @@ import ( "stash.appscode.dev/apimachinery/apis/stash/v1alpha1" - "github.com/appscode/go/log" "github.com/armon/circbuf" + "gomodules.xyz/x/log" storage "kmodules.xyz/objectstore-api/api/v1" ) diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/restic/metrics.go b/vendor/stash.appscode.dev/apimachinery/pkg/restic/metrics.go index 01619dfdf..47082969a 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/restic/metrics.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/restic/metrics.go @@ -26,6 +26,7 @@ import ( "stash.appscode.dev/apimachinery/apis" api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1" cs "stash.appscode.dev/apimachinery/client/clientset/versioned" + "stash.appscode.dev/apimachinery/pkg/invoker" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/push" @@ -454,12 +455,12 @@ func newRestoreHostMetrics(labels prometheus.Labels) *RestoreMetrics { } // SendBackupSessionMetrics send backup session related metrics to the Pushgateway -func (metricOpt *MetricsOptions) SendBackupSessionMetrics(invoker apis.Invoker, status api_v1beta1.BackupSessionStatus) error { +func (metricOpt *MetricsOptions) SendBackupSessionMetrics(inv invoker.BackupInvoker, status api_v1beta1.BackupSessionStatus) error { // create metric registry registry := prometheus.NewRegistry() // generate metrics labels - labels, err := backupInvokerLabels(invoker, metricOpt.Labels) + labels, err := backupInvokerLabels(inv, metricOpt.Labels) if err != nil { return err } @@ -501,17 +502,17 @@ func (metricOpt *MetricsOptions) SendBackupSessionMetrics(invoker apis.Invoker, } // SendBackupSessionMetrics send backup session metrics to the Pushgateway -func (metricOpt *MetricsOptions) SendBackupTargetMetrics(config *rest.Config, invoker apis.Invoker, targetRef api_v1beta1.TargetRef, status api_v1beta1.BackupSessionStatus) error { +func (metricOpt *MetricsOptions) SendBackupTargetMetrics(config *rest.Config, i invoker.BackupInvoker, targetRef api_v1beta1.TargetRef, status api_v1beta1.BackupSessionStatus) error { // create metric registry registry := prometheus.NewRegistry() // generate backup session related labels - labels, err := backupInvokerLabels(invoker, metricOpt.Labels) + labels, err := backupInvokerLabels(i, metricOpt.Labels) if err != nil { return err } // generate target related labels - targetLabels, err := targetLabels(config, targetRef, invoker.ObjectMeta.Namespace) + targetLabels, err := targetLabels(config, targetRef, i.ObjectMeta.Namespace) if err != nil { return err } @@ -522,7 +523,7 @@ func (metricOpt *MetricsOptions) SendBackupTargetMetrics(config *rest.Config, in // only send the metric for the target specified by targetRef for _, targetStatus := range status.Targets { - if apis.TargetMatched(targetStatus.Ref, targetRef) { + if invoker.TargetMatched(targetStatus.Ref, targetRef) { if targetStatus.Phase == api_v1beta1.TargetBackupSucceeded { // mark target backup as succeeded metrics.BackupTargetMetrics.TargetBackupSucceeded.Set(1) @@ -555,7 +556,7 @@ func (metricOpt *MetricsOptions) SendBackupTargetMetrics(config *rest.Config, in } // SendBackupSessionMetrics send backup metrics for individual hosts to the Pushgateway -func (metricOpt *MetricsOptions) SendBackupHostMetrics(config *rest.Config, invoker apis.Invoker, targetRef api_v1beta1.TargetRef, backupOutput *BackupOutput) error { +func (metricOpt *MetricsOptions) SendBackupHostMetrics(config *rest.Config, i invoker.BackupInvoker, targetRef api_v1beta1.TargetRef, backupOutput *BackupOutput) error { if backupOutput == nil { return fmt.Errorf("invalid backup output. Backup output shouldn't be nil") } @@ -564,12 +565,12 @@ func (metricOpt *MetricsOptions) SendBackupHostMetrics(config *rest.Config, invo registry := prometheus.NewRegistry() // generate backup session related labels - labels, err := backupInvokerLabels(invoker, metricOpt.Labels) + labels, err := backupInvokerLabels(i, metricOpt.Labels) if err != nil { return err } // generate target related labels - targetLabels, err := targetLabels(config, targetRef, invoker.ObjectMeta.Namespace) + targetLabels, err := targetLabels(config, targetRef, i.ObjectMeta.Namespace) if err != nil { return err } @@ -616,17 +617,17 @@ func (metricOpt *MetricsOptions) SendBackupHostMetrics(config *rest.Config, invo } // SendRepositoryMetrics send backup session related metrics to the Pushgateway -func (metricOpt *MetricsOptions) SendRepositoryMetrics(config *rest.Config, invoker apis.Invoker, repoStats RepositoryStats) error { +func (metricOpt *MetricsOptions) SendRepositoryMetrics(config *rest.Config, i invoker.BackupInvoker, repoStats RepositoryStats) error { // create metric registry registry := prometheus.NewRegistry() // generate backup invoker labels - labels, err := backupInvokerLabels(invoker, metricOpt.Labels) + labels, err := backupInvokerLabels(i, metricOpt.Labels) if err != nil { return err } - repoMetricLabels, err := repoMetricLabels(config, invoker, metricOpt.Labels) + repoMetricLabels, err := repoMetricLabels(config, i, metricOpt.Labels) if err != nil { return err } @@ -649,31 +650,31 @@ func (metricOpt *MetricsOptions) SendRepositoryMetrics(config *rest.Config, invo } // SendRestoreSessionMetrics send restore session related metrics to the Pushgateway -func (metricOpt *MetricsOptions) SendRestoreSessionMetrics(invoker apis.RestoreInvoker) error { +func (metricOpt *MetricsOptions) SendRestoreSessionMetrics(inv invoker.RestoreInvoker) error { // create metric registry registry := prometheus.NewRegistry() // generate metrics labels - labels, err := restoreInvokerLabels(invoker, metricOpt.Labels) + labels, err := restoreInvokerLabels(inv, metricOpt.Labels) if err != nil { return err } // create metrics metrics := newRestoreSessionMetrics(labels) - if invoker.Status.Phase == api_v1beta1.RestoreSucceeded { + if inv.Status.Phase == api_v1beta1.RestoreSucceeded { // mark the entire restore session as succeeded metrics.RestoreSessionMetrics.SessionSuccess.Set(1) // set total time taken to complete the restore session - duration, err := time.ParseDuration(invoker.Status.SessionDuration) + duration, err := time.ParseDuration(inv.Status.SessionDuration) if err != nil { return err } metrics.RestoreSessionMetrics.SessionDuration.Set(duration.Seconds()) // set total number of target that was restored in this restore session - metrics.RestoreSessionMetrics.TargetCount.Set(float64(len(invoker.Status.TargetStatus))) + metrics.RestoreSessionMetrics.TargetCount.Set(float64(len(inv.Status.TargetStatus))) // register metrics to the registry registry.MustRegister( @@ -692,17 +693,17 @@ func (metricOpt *MetricsOptions) SendRestoreSessionMetrics(invoker apis.RestoreI } // SendRestoreTargetMetrics send restore target related metrics to the Pushgateway -func (metricOpt *MetricsOptions) SendRestoreTargetMetrics(config *rest.Config, invoker apis.RestoreInvoker, targetRef api_v1beta1.TargetRef) error { +func (metricOpt *MetricsOptions) SendRestoreTargetMetrics(config *rest.Config, i invoker.RestoreInvoker, targetRef api_v1beta1.TargetRef) error { // create metric registry registry := prometheus.NewRegistry() // generate metrics labels - labels, err := restoreInvokerLabels(invoker, metricOpt.Labels) + labels, err := restoreInvokerLabels(i, metricOpt.Labels) if err != nil { return err } // generate target related labels - targetLabels, err := targetLabels(config, targetRef, invoker.ObjectMeta.Namespace) + targetLabels, err := targetLabels(config, targetRef, i.ObjectMeta.Namespace) if err != nil { return err } @@ -712,8 +713,8 @@ func (metricOpt *MetricsOptions) SendRestoreTargetMetrics(config *rest.Config, i metrics := newRestoreTargetMetrics(labels) // only send the metric of the target specified by targetRef - for _, targetStatus := range invoker.Status.TargetStatus { - if apis.TargetMatched(targetStatus.Ref, targetRef) { + for _, targetStatus := range i.Status.TargetStatus { + if invoker.TargetMatched(targetStatus.Ref, targetRef) { if targetStatus.Phase == api_v1beta1.TargetRestoreSucceeded { // mark entire restore target as succeeded metrics.RestoreTargetMetrics.TargetRestoreSucceeded.Set(1) @@ -742,7 +743,7 @@ func (metricOpt *MetricsOptions) SendRestoreTargetMetrics(config *rest.Config, i } // SendRestoreHostMetrics send restore metrics for individual hosts to the Pushgateway -func (metricOpt *MetricsOptions) SendRestoreHostMetrics(config *rest.Config, invoker apis.RestoreInvoker, targetRef api_v1beta1.TargetRef, restoreOutput *RestoreOutput) error { +func (metricOpt *MetricsOptions) SendRestoreHostMetrics(config *rest.Config, i invoker.RestoreInvoker, targetRef api_v1beta1.TargetRef, restoreOutput *RestoreOutput) error { if restoreOutput == nil { return fmt.Errorf("invalid restore output. Restore output shouldn't be nil") } @@ -751,12 +752,12 @@ func (metricOpt *MetricsOptions) SendRestoreHostMetrics(config *rest.Config, inv registry := prometheus.NewRegistry() // generate restore session related labels - labels, err := restoreInvokerLabels(invoker, metricOpt.Labels) + labels, err := restoreInvokerLabels(i, metricOpt.Labels) if err != nil { return err } // generate target related labels - targetLabels, err := targetLabels(config, targetRef, invoker.ObjectMeta.Namespace) + targetLabels, err := targetLabels(config, targetRef, i.ObjectMeta.Namespace) if err != nil { return err } @@ -889,48 +890,48 @@ func (metricOpt *MetricsOptions) sendMetrics(registry *prometheus.Registry, jobN } // nolint:unparam -func backupInvokerLabels(invoker apis.Invoker, userProvidedLabels []string) (prometheus.Labels, error) { +func backupInvokerLabels(inv invoker.BackupInvoker, userProvidedLabels []string) (prometheus.Labels, error) { // add user provided labels promLabels := parseUserProvidedLabels(userProvidedLabels) // add invoker information - promLabels[MetricLabelInvokerKind] = invoker.TypeMeta.Kind - promLabels[MetricLabelInvokerName] = invoker.ObjectMeta.Name - promLabels[MetricsLabelNamespace] = invoker.ObjectMeta.Namespace + promLabels[MetricLabelInvokerKind] = inv.TypeMeta.Kind + promLabels[MetricLabelInvokerName] = inv.ObjectMeta.Name + promLabels[MetricsLabelNamespace] = inv.ObjectMeta.Namespace // insert target information as metrics label - if invoker.Driver == api_v1beta1.VolumeSnapshotter { + if inv.Driver == api_v1beta1.VolumeSnapshotter { promLabels = upsertLabel(promLabels, volumeSnapshotterLabels()) } else { promLabels[MetricsLabelDriver] = string(api_v1beta1.ResticSnapshotter) - promLabels[MetricsLabelRepository] = invoker.Repository + promLabels[MetricsLabelRepository] = inv.Repository } return promLabels, nil } // nolint:unparam -func restoreInvokerLabels(invoker apis.RestoreInvoker, userProvidedLabels []string) (prometheus.Labels, error) { +func restoreInvokerLabels(inv invoker.RestoreInvoker, userProvidedLabels []string) (prometheus.Labels, error) { // add user provided labels promLabels := parseUserProvidedLabels(userProvidedLabels) // add invoker information - promLabels[MetricLabelInvokerKind] = invoker.TypeMeta.Kind - promLabels[MetricLabelInvokerName] = invoker.ObjectMeta.Name - promLabels[MetricsLabelNamespace] = invoker.ObjectMeta.Namespace + promLabels[MetricLabelInvokerKind] = inv.TypeMeta.Kind + promLabels[MetricLabelInvokerName] = inv.ObjectMeta.Name + promLabels[MetricsLabelNamespace] = inv.ObjectMeta.Namespace // insert target information as metrics label - if invoker.Driver == api_v1beta1.VolumeSnapshotter { + if inv.Driver == api_v1beta1.VolumeSnapshotter { promLabels = upsertLabel(promLabels, volumeSnapshotterLabels()) } else { promLabels[MetricsLabelDriver] = string(api_v1beta1.ResticSnapshotter) - promLabels[MetricsLabelRepository] = invoker.Repository + promLabels[MetricsLabelRepository] = inv.Repository } return promLabels, nil } -func repoMetricLabels(clientConfig *rest.Config, invoker apis.Invoker, userProvidedLabels []string) (prometheus.Labels, error) { +func repoMetricLabels(clientConfig *rest.Config, i invoker.BackupInvoker, userProvidedLabels []string) (prometheus.Labels, error) { // add user provided labels promLabels := parseUserProvidedLabels(userProvidedLabels) @@ -939,7 +940,7 @@ func repoMetricLabels(clientConfig *rest.Config, invoker apis.Invoker, userProvi if err != nil { return nil, err } - repository, err := stashClient.StashV1alpha1().Repositories(invoker.ObjectMeta.Namespace).Get(context.TODO(), invoker.Repository, metav1.GetOptions{}) + repository, err := stashClient.StashV1alpha1().Repositories(i.ObjectMeta.Namespace).Get(context.TODO(), i.Repository, metav1.GetOptions{}) if err != nil { return nil, err } diff --git a/vendor/stash.appscode.dev/apimachinery/pkg/util/backup.go b/vendor/stash.appscode.dev/apimachinery/pkg/util/backup.go index 75c1d845b..80c5420f2 100644 --- a/vendor/stash.appscode.dev/apimachinery/pkg/util/backup.go +++ b/vendor/stash.appscode.dev/apimachinery/pkg/util/backup.go @@ -25,6 +25,7 @@ import ( "stash.appscode.dev/apimachinery/apis/stash/v1beta1" cs "stash.appscode.dev/apimachinery/client/clientset/versioned" "stash.appscode.dev/apimachinery/pkg/conditions" + "stash.appscode.dev/apimachinery/pkg/invoker" "stash.appscode.dev/apimachinery/pkg/restic" "github.com/golang/glog" @@ -49,7 +50,7 @@ func ExecutePreBackupActions(opt ActionOptions) error { return err } for _, targetStatus := range backupSession.Status.Targets { - if apis.TargetMatched(targetStatus.Ref, opt.TargetRef) { + if invoker.TargetMatched(targetStatus.Ref, opt.TargetRef) { // check if it has any pre-backup action assigned to it if len(targetStatus.PreBackupActions) > 0 { // execute the pre-backup actions